From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 02:42:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6024A63; Sun, 5 Apr 2015 02:42:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 872BF95A; Sun, 5 Apr 2015 02:42:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t352grCv028470; Sun, 5 Apr 2015 02:42:53 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t352gqFO028468; Sun, 5 Apr 2015 02:42:52 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504050242.t352gqFO028468@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 5 Apr 2015 02:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281096 - in head/sys/powerpc: aim booke powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 02:42:53 -0000 Author: jhibbits Date: Sun Apr 5 02:42:52 2015 New Revision: 281096 URL: https://svnweb.freebsd.org/changeset/base/281096 Log: Unify Book-E and AIM trap.c Summary: Book-E and AIM trap.c are almost identical, except for a few bits. This is step 1 in unifying them. This also renumbers EXC_DEBUG, to not conflict with AIM vector numbers. Since this is the only one thus far that is used in the switch statement in trap(), it's the only one renumbered. If others get added to the switch, which conflict with AIM numbers, they should also be renumbered. Reviewers: #powerpc, marcel, nwhitehorn Reviewed By: marcel Subscribers: imp Differential Revision: https://reviews.freebsd.org/D2215 Added: head/sys/powerpc/powerpc/trap.c - copied, changed from r280833, head/sys/powerpc/aim/trap.c Deleted: head/sys/powerpc/aim/trap.c head/sys/powerpc/booke/trap.c Modified: head/sys/powerpc/aim/machdep.c Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Sun Apr 5 01:03:11 2015 (r281095) +++ head/sys/powerpc/aim/machdep.c Sun Apr 5 02:42:52 2015 (r281096) @@ -760,31 +760,6 @@ spinlock_exit(void) } } -int db_trap_glue(struct trapframe *); /* Called from trap_subr.S */ - -int -db_trap_glue(struct trapframe *frame) -{ - if (!(frame->srr1 & PSL_PR) - && (frame->exc == EXC_TRC || frame->exc == EXC_RUNMODETRC - || (frame->exc == EXC_PGM - && (frame->srr1 & 0x20000)) - || frame->exc == EXC_BPT - || frame->exc == EXC_DSI)) { - int type = frame->exc; - - /* Ignore DTrace traps. */ - if (*(uint32_t *)frame->srr0 == EXC_DTRACE) - return (0); - if (type == EXC_PGM && (frame->srr1 & 0x20000)) { - type = T_BREAKPOINT; - } - return (kdb_trap(type, 0, frame)); - } - - return (0); -} - #ifndef __powerpc64__ uint64_t Copied and modified: head/sys/powerpc/powerpc/trap.c (from r280833, head/sys/powerpc/aim/trap.c) ============================================================================== --- head/sys/powerpc/aim/trap.c Sun Mar 29 22:46:07 2015 (r280833, copy source) +++ head/sys/powerpc/powerpc/trap.c Sun Apr 5 02:42:52 2015 (r281096) @@ -74,6 +74,12 @@ __FBSDID("$FreeBSD$"); #include #include +#define FAULTBUF_LR 0 +#define FAULTBUF_R1 1 +#define FAULTBUF_R2 2 +#define FAULTBUF_CR 3 +#define FAULTBUF_R13 6 + static void trap_fatal(struct trapframe *frame); static void printtrap(u_int vector, struct trapframe *frame, int isfatal, int user); @@ -100,32 +106,37 @@ int (*dtrace_invop_jump_addr)(struct tra #endif static struct powerpc_exception powerpc_exceptions[] = { - { 0x0100, "system reset" }, - { 0x0200, "machine check" }, - { 0x0300, "data storage interrupt" }, - { 0x0380, "data segment exception" }, - { 0x0400, "instruction storage interrupt" }, - { 0x0480, "instruction segment exception" }, - { 0x0500, "external interrupt" }, - { 0x0600, "alignment" }, - { 0x0700, "program" }, - { 0x0800, "floating-point unavailable" }, - { 0x0900, "decrementer" }, - { 0x0c00, "system call" }, - { 0x0d00, "trace" }, - { 0x0e00, "floating-point assist" }, - { 0x0f00, "performance monitoring" }, - { 0x0f20, "altivec unavailable" }, - { 0x0f40, "vsx unavailable" }, - { 0x1000, "instruction tlb miss" }, - { 0x1100, "data load tlb miss" }, - { 0x1200, "data store tlb miss" }, - { 0x1300, "instruction breakpoint" }, - { 0x1400, "system management" }, - { 0x1600, "altivec assist" }, - { 0x1700, "thermal management" }, - { 0x2000, "run mode/trace" }, - { 0x3000, NULL } + { EXC_CRIT, "critical input" }, + { EXC_RST, "system reset" }, + { EXC_MCHK, "machine check" }, + { EXC_DSI, "data storage interrupt" }, + { EXC_DSE, "data segment exception" }, + { EXC_ISI, "instruction storage interrupt" }, + { EXC_ISE, "instruction segment exception" }, + { EXC_EXI, "external interrupt" }, + { EXC_ALI, "alignment" }, + { EXC_PGM, "program" }, + { EXC_FPU, "floating-point unavailable" }, + { EXC_APU, "auxiliary proc unavailable" }, + { EXC_DECR, "decrementer" }, + { EXC_FIT, "fixed-interval timer" }, + { EXC_WDOG, "watchdog timer" }, + { EXC_SC, "system call" }, + { EXC_TRC, "trace" }, + { EXC_FPA, "floating-point assist" }, + { EXC_DEBUG, "debug" }, + { EXC_PERF, "performance monitoring" }, + { EXC_VEC, "altivec unavailable" }, + { EXC_VSX, "vsx unavailable" }, + { EXC_ITMISS, "instruction tlb miss" }, + { EXC_DLMISS, "data load tlb miss" }, + { EXC_DSMISS, "data store tlb miss" }, + { EXC_BPT, "instruction breakpoint" }, + { EXC_SMI, "system management" }, + { EXC_VECAST_G4, "altivec assist" }, + { EXC_THRM, "thermal management" }, + { EXC_RUNMODETRC, "run mode/trace" }, + { EXC_LAST, NULL } }; static const char * @@ -133,7 +144,7 @@ trapname(u_int vector) { struct powerpc_exception *pe; - for (pe = powerpc_exceptions; pe->vector != 0x3000; pe++) { + for (pe = powerpc_exceptions; pe->vector != EXC_LAST; pe++) { if (pe->vector == vector) return (pe->name); } @@ -265,9 +276,21 @@ trap(struct trapframe *frame) frame->srr0 += 4; break; + case EXC_DEBUG: /* Single stepping */ + mtspr(SPR_DBSR, mfspr(SPR_DBSR)); + frame->srr1 &= ~PSL_DE; + frame->cpu.booke.dbcr0 &= ~(DBCR0_IDM || DBCR0_IC); + sig = SIGTRAP; + ucode = TRAP_TRACE; + break; + case EXC_PGM: /* Identify the trap reason */ +#ifdef AIM if (frame->srr1 & EXC_PGM_TRAP) { +#else + if (frame->cpu.booke.esr & ESR_PTR) { +#endif #ifdef KDTRACE_HOOKS inst = fuword32((const void *)frame->srr0); if (inst == 0x0FFFDDDD && @@ -384,12 +407,14 @@ printtrap(u_int vector, struct trapframe printf("\n"); printf(" exception = 0x%x (%s)\n", vector, trapname(vector)); switch (vector) { + case EXC_DTMISS: case EXC_DSE: case EXC_DSI: printf(" virtual address = 0x%" PRIxPTR "\n", frame->dar); printf(" dsisr = 0x%" PRIxPTR "\n", frame->cpu.aim.dsisr); break; + case EXC_ITMISS: case EXC_ISE: case EXC_ISI: printf(" virtual address = 0x%" PRIxPTR "\n", frame->srr0); @@ -418,12 +443,12 @@ handle_onfault(struct trapframe *frame) td = curthread; fb = td->td_pcb->pcb_onfault; if (fb != NULL) { - frame->srr0 = (*fb)[0]; - frame->fixreg[1] = (*fb)[1]; - frame->fixreg[2] = (*fb)[2]; + frame->srr0 = (*fb)[FAULTBUF_LR]; + frame->fixreg[1] = (*fb)[FAULTBUF_R1]; + frame->fixreg[2] = (*fb)[FAULTBUF_R2]; frame->fixreg[3] = 1; - frame->cr = (*fb)[3]; - bcopy(&(*fb)[4], &frame->fixreg[13], + frame->cr = (*fb)[FAULTBUF_CR]; + bcopy(&(*fb)[FAULTBUF_R13], &frame->fixreg[13], 19 * sizeof(register_t)); return (1); } @@ -630,7 +655,9 @@ trap_pfault(struct trapframe *frame, int vm_map_t map; vm_prot_t ftype; int rv; +#ifdef AIM register_t user_sr; +#endif td = curthread; p = td->td_proc; @@ -641,24 +668,35 @@ trap_pfault(struct trapframe *frame, int ftype |= VM_PROT_READ; } else { eva = frame->dar; +#ifdef BOOKE + if (frame->cpu.booke.esr & ESR_ST) +#else if (frame->cpu.aim.dsisr & DSISR_STORE) +#endif ftype = VM_PROT_WRITE; else ftype = VM_PROT_READ; } if (user) { + KASSERT(p->p_vmspace != NULL, ("trap_pfault: vmspace NULL")); map = &p->p_vmspace->vm_map; } else { +#ifdef BOOKE + if (eva < VM_MAXUSER_ADDRESS) { +#else if ((eva >> ADDR_SR_SHFT) == (USER_ADDR >> ADDR_SR_SHFT)) { +#endif if (p->p_vmspace == NULL) return (SIGSEGV); map = &p->p_vmspace->vm_map; +#ifdef AIM user_sr = td->td_pcb->pcb_cpu.aim.usr_segm; eva &= ADDR_PIDX | ADDR_POFF; eva |= user_sr << ADDR_SR_SHFT; +#endif } else { map = kernel_map; } @@ -736,17 +774,43 @@ fix_unaligned(struct thread *td, struct if (indicator == EXC_ALI_LFD) { if (copyin((void *)frame->dar, fpr, sizeof(double)) != 0) - return -1; + return (-1); enable_fpu(td); } else { if (copyout(fpr, (void *)frame->dar, sizeof(double)) != 0) - return -1; + return (-1); } - return 0; + return (0); break; } - return -1; + return (-1); } +#ifdef KDB +int db_trap_glue(struct trapframe *); /* Called from trap_subr.S */ + +int +db_trap_glue(struct trapframe *frame) +{ + if (!(frame->srr1 & PSL_PR) + && (frame->exc == EXC_TRC || frame->exc == EXC_RUNMODETRC + || (frame->exc == EXC_PGM + && (frame->srr1 & 0x20000)) + || frame->exc == EXC_BPT + || frame->exc == EXC_DSI)) { + int type = frame->exc; + + /* Ignore DTrace traps. */ + if (*(uint32_t *)frame->srr0 == EXC_DTRACE) + return (0); + if (type == EXC_PGM && (frame->srr1 & 0x20000)) { + type = T_BREAKPOINT; + } + return (kdb_trap(type, 0, frame)); + } + + return (0); +} +#endif From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 02:43:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FB60BA1; Sun, 5 Apr 2015 02:43:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EED9F95F; Sun, 5 Apr 2015 02:43:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t352ha7d028593; Sun, 5 Apr 2015 02:43:36 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t352ha69028592; Sun, 5 Apr 2015 02:43:36 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504050243.t352ha69028592@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 5 Apr 2015 02:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281097 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 02:43:37 -0000 Author: jhibbits Date: Sun Apr 5 02:43:36 2015 New Revision: 281097 URL: https://svnweb.freebsd.org/changeset/base/281097 Log: Add file missed in r281096. Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun Apr 5 02:42:52 2015 (r281096) +++ head/sys/conf/files.powerpc Sun Apr 5 02:43:36 2015 (r281097) @@ -103,7 +103,6 @@ powerpc/aim/moea64_if.m optional aim powerpc/aim/moea64_native.c optional aim powerpc/aim/mp_cpudep.c optional aim powerpc/aim/slb.c optional aim powerpc64 -powerpc/aim/trap.c optional aim powerpc/aim/uma_machdep.c optional aim powerpc/booke/interrupt.c optional booke powerpc/booke/locore.S optional booke no-obj @@ -112,7 +111,6 @@ powerpc/booke/machdep_e500.c optional bo powerpc/booke/mp_cpudep.c optional booke smp powerpc/booke/platform_bare.c optional booke powerpc/booke/pmap.c optional booke -powerpc/booke/trap.c optional booke powerpc/cpufreq/dfs.c optional cpufreq powerpc/cpufreq/pcr.c optional cpufreq aim powerpc/cpufreq/pmufreq.c optional cpufreq aim pmu @@ -216,6 +214,7 @@ powerpc/powerpc/stack_machdep.c optional powerpc/powerpc/suswintr.c standard powerpc/powerpc/syncicache.c standard powerpc/powerpc/sys_machdep.c standard +powerpc/powerpc/trap.c standard powerpc/powerpc/uio_machdep.c standard powerpc/powerpc/vm_machdep.c standard powerpc/ps3/ehci_ps3.c optional ps3 ehci From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 02:57:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17370DD8; Sun, 5 Apr 2015 02:57:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00BBEA43; Sun, 5 Apr 2015 02:57:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t352v38F033541; Sun, 5 Apr 2015 02:57:03 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t352v2OY033534; Sun, 5 Apr 2015 02:57:02 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504050257.t352v2OY033534@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 5 Apr 2015 02:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281098 - in head: lib/libpmc sys/conf sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 02:57:04 -0000 Author: adrian Date: Sun Apr 5 02:57:02 2015 New Revision: 281098 URL: https://svnweb.freebsd.org/changeset/base/281098 Log: Add support for the MIPS74K SoC family performance counters events. These are similar to the mips24k performance counters - some are available on perfcnt0/3, some are available on perfcnt1/4. However, the events aren't all the same. * Add the events, named the same as from Linux oprofile. * Verify they're the same as "MIPS32(R) 74KTM Processor Core Family Software User's Manual"; Document Number: MD00519; Revision 01.05. * Rename INSTRUCTIONS to something else, so it doesn't clash with the alias INSTRUCTIONS. I'll try to tidy this up later; there are a few other aliases to add and shuffle around. Tested: * QCA9558 SoC (AP135 board) - MIPS74Kc core (no FPU.) * make universe; where it didn't fail for other reasons. TODO: * It'd be nice to support the four performance counters in at least this hardware, rather than just two. Reviewed by: bsdimp ("looks good; don't break world".) Added: head/sys/dev/hwpmc/hwpmc_mips74k.c (contents, props changed) Modified: head/lib/libpmc/libpmc.c head/sys/conf/files.mips head/sys/dev/hwpmc/pmc_events.h Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Sun Apr 5 02:43:36 2015 (r281097) +++ head/lib/libpmc/libpmc.c Sun Apr 5 02:57:02 2015 (r281098) @@ -159,6 +159,7 @@ PMC_CLASSDEP_TABLE(p6, P6); PMC_CLASSDEP_TABLE(xscale, XSCALE); PMC_CLASSDEP_TABLE(armv7, ARMV7); PMC_CLASSDEP_TABLE(mips24k, MIPS24K); +PMC_CLASSDEP_TABLE(mips74k, MIPS74K); PMC_CLASSDEP_TABLE(octeon, OCTEON); PMC_CLASSDEP_TABLE(ucf, UCF); PMC_CLASSDEP_TABLE(ppc7450, PPC7450); @@ -293,6 +294,7 @@ PMC_MDEP_TABLE(p6, P6, PMC_CLASS_SOFT, P PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_SOFT, PMC_CLASS_XSCALE); PMC_MDEP_TABLE(armv7, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7); PMC_MDEP_TABLE(mips24k, MIPS24K, PMC_CLASS_SOFT, PMC_CLASS_MIPS24K); +PMC_MDEP_TABLE(mips74k, MIPS74K, PMC_CLASS_SOFT, PMC_CLASS_MIPS74K); PMC_MDEP_TABLE(octeon, OCTEON, PMC_CLASS_SOFT, PMC_CLASS_OCTEON); PMC_MDEP_TABLE(ppc7450, PPC7450, PMC_CLASS_SOFT, PMC_CLASS_PPC7450); PMC_MDEP_TABLE(ppc970, PPC970, PMC_CLASS_SOFT, PMC_CLASS_PPC970); @@ -360,6 +362,7 @@ PMC_CLASS_TABLE_DESC(armv7, ARMV7, armv7 #endif #if defined(__mips__) PMC_CLASS_TABLE_DESC(mips24k, MIPS24K, mips24k, mips); +PMC_CLASS_TABLE_DESC(mips74k, MIPS74K, mips74k, mips); PMC_CLASS_TABLE_DESC(octeon, OCTEON, octeon, mips); #endif /* __mips__ */ #if defined(__powerpc__) @@ -2432,6 +2435,13 @@ static struct pmc_event_alias mips24k_al EV_ALIAS(NULL, NULL) }; +static struct pmc_event_alias mips74k_aliases[] = { + EV_ALIAS("instructions", "INSTR_EXECUTED"), + EV_ALIAS("branches", "BRANCH_INSNS"), + EV_ALIAS("branch-mispredicts", "MISPREDICTED_BRANCH_INSNS"), + EV_ALIAS(NULL, NULL) +}; + static struct pmc_event_alias octeon_aliases[] = { EV_ALIAS("instructions", "RET"), EV_ALIAS("branches", "BR"), @@ -2923,6 +2933,10 @@ pmc_event_names_of_class(enum pmc_class ev = mips24k_event_table; count = PMC_EVENT_TABLE_SIZE(mips24k); break; + case PMC_CLASS_MIPS74K: + ev = mips74k_event_table; + count = PMC_EVENT_TABLE_SIZE(mips74k); + break; case PMC_CLASS_OCTEON: ev = octeon_event_table; count = PMC_EVENT_TABLE_SIZE(octeon); @@ -3213,6 +3227,10 @@ pmc_init(void) PMC_MDEP_INIT(mips24k); pmc_class_table[n] = &mips24k_class_table_descr; break; + case PMC_CPU_MIPS_74K: + PMC_MDEP_INIT(mips74k); + pmc_class_table[n] = &mips74k_class_table_descr; + break; case PMC_CPU_MIPS_OCTEON: PMC_MDEP_INIT(octeon); pmc_class_table[n] = &octeon_class_table_descr; @@ -3414,6 +3432,9 @@ _pmc_name_of_event(enum pmc_event pe, en } else if (pe >= PMC_EV_MIPS24K_FIRST && pe <= PMC_EV_MIPS24K_LAST) { ev = mips24k_event_table; evfence = mips24k_event_table + PMC_EVENT_TABLE_SIZE(mips24k); + } else if (pe >= PMC_EV_MIPS74K_FIRST && pe <= PMC_EV_MIPS74K_LAST) { + ev = mips74k_event_table; + evfence = mips74k_event_table + PMC_EVENT_TABLE_SIZE(mips74k); } else if (pe >= PMC_EV_OCTEON_FIRST && pe <= PMC_EV_OCTEON_LAST) { ev = octeon_event_table; evfence = octeon_event_table + PMC_EVENT_TABLE_SIZE(octeon); Modified: head/sys/conf/files.mips ============================================================================== --- head/sys/conf/files.mips Sun Apr 5 02:43:36 2015 (r281097) +++ head/sys/conf/files.mips Sun Apr 5 02:57:02 2015 (r281098) @@ -89,3 +89,4 @@ dev/nvram2env/nvram2env.c optional nvra # hwpmc support dev/hwpmc/hwpmc_mips.c optional hwpmc dev/hwpmc/hwpmc_mips24k.c optional hwpmc_mips24k +dev/hwpmc/hwpmc_mips74k.c optional hwpmc_mips74k Added: head/sys/dev/hwpmc/hwpmc_mips74k.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hwpmc/hwpmc_mips74k.c Sun Apr 5 02:57:02 2015 (r281098) @@ -0,0 +1,261 @@ +/*- + * Copyright (c) 2010 George V. Neville-Neil + * Copyright (c) 2015 Adrian Chadd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include +#include + +#define MIPS74K_PMC_CAPS (PMC_CAP_INTERRUPT | PMC_CAP_USER | \ + PMC_CAP_SYSTEM | PMC_CAP_EDGE | \ + PMC_CAP_THRESHOLD | PMC_CAP_READ | \ + PMC_CAP_WRITE | PMC_CAP_INVERT | \ + PMC_CAP_QUALIFIER) + +/* 0x1 - Exception_enable */ +#define MIPS74K_PMC_INTERRUPT_ENABLE 0x10 /* Enable interrupts */ +#define MIPS74K_PMC_USER_ENABLE 0x08 /* Count in USER mode */ +#define MIPS74K_PMC_SUPER_ENABLE 0x04 /* Count in SUPERVISOR mode */ +#define MIPS74K_PMC_KERNEL_ENABLE 0x02 /* Count in KERNEL mode */ +#define MIPS74K_PMC_ENABLE (MIPS74K_PMC_USER_ENABLE | \ + MIPS74K_PMC_SUPER_ENABLE | \ + MIPS74K_PMC_KERNEL_ENABLE) + +#define MIPS74K_PMC_SELECT 5 /* Which bit position the event starts at. */ + +const struct mips_event_code_map mips_event_codes[] = { + { PMC_EV_MIPS74K_CYCLES, MIPS_CTR_ALL, 0 }, + { PMC_EV_MIPS74K_INSTR_EXECUTED, MIPS_CTR_ALL, 1 }, + { PMC_EV_MIPS74K_PREDICTED_JR_31, MIPS_CTR_0, 2 }, + { PMC_EV_MIPS74K_JR_31_MISPREDICTIONS, MIPS_CTR_1, 2 }, + { PMC_EV_MIPS74K_REDIRECT_STALLS, MIPS_CTR_0, 3 }, + { PMC_EV_MIPS74K_JR_31_NO_PREDICTIONS, MIPS_CTR_1, 3 }, + { PMC_EV_MIPS74K_ITLB_ACCESSES, MIPS_CTR_0, 4 }, + { PMC_EV_MIPS74K_ITLB_MISSES, MIPS_CTR_1, 4 }, + { PMC_EV_MIPS74K_JTLB_INSN_MISSES, MIPS_CTR_1, 5 }, + { PMC_EV_MIPS74K_ICACHE_ACCESSES, MIPS_CTR_0, 6 }, + { PMC_EV_MIPS74K_ICACHE_MISSES, MIPS_CTR_1, 6 }, + { PMC_EV_MIPS74K_ICACHE_MISS_STALLS, MIPS_CTR_0, 7 }, + { PMC_EV_MIPS74K_UNCACHED_IFETCH_STALLS, MIPS_CTR_0, 8 }, + { PMC_EV_MIPS74K_PDTRACE_BACK_STALLS, MIPS_CTR_1, 8 }, + { PMC_EV_MIPS74K_IFU_REPLAYS, MIPS_CTR_0, 9 }, + { PMC_EV_MIPS74K_KILLED_FETCH_SLOTS, MIPS_CTR_1, 9 }, + { PMC_EV_MIPS74K_IFU_IDU_MISS_PRED_UPSTREAM_CYCLES, MIPS_CTR_0, 11 }, + { PMC_EV_MIPS74K_IFU_IDU_NO_FETCH_CYCLES, MIPS_CTR_1, 11 }, + { PMC_EV_MIPS74K_IFU_IDU_CLOGED_DOWNSTREAM_CYCLES, MIPS_CTR_0, 12 }, + { PMC_EV_MIPS74K_DDQ0_FULL_DR_STALLS, MIPS_CTR_0, 13 }, + { PMC_EV_MIPS74K_DDQ1_FULL_DR_STALLS, MIPS_CTR_1, 13 }, + { PMC_EV_MIPS74K_ALCB_FULL_DR_STALLS, MIPS_CTR_0, 14 }, + { PMC_EV_MIPS74K_AGCB_FULL_DR_STALLS, MIPS_CTR_1, 14 }, + { PMC_EV_MIPS74K_CLDQ_FULL_DR_STALLS, MIPS_CTR_0, 15 }, + { PMC_EV_MIPS74K_IODQ_FULL_DR_STALLS, MIPS_CTR_1, 15 }, + { PMC_EV_MIPS74K_ALU_EMPTY_CYCLES, MIPS_CTR_0, 16 }, + { PMC_EV_MIPS74K_AGEN_EMPTY_CYCLES, MIPS_CTR_1, 16 }, + { PMC_EV_MIPS74K_ALU_OPERANDS_NOT_READY_CYCLES, MIPS_CTR_0, 17 }, + { PMC_EV_MIPS74K_AGEN_OPERANDS_NOT_READY_CYCLES, MIPS_CTR_1, 17 }, + { PMC_EV_MIPS74K_ALU_NO_ISSUES_CYCLES, MIPS_CTR_0, 18 }, + { PMC_EV_MIPS74K_AGEN_NO_ISSUES_CYCLES, MIPS_CTR_1, 18 }, + { PMC_EV_MIPS74K_ALU_BUBBLE_CYCLES, MIPS_CTR_0, 19 }, + { PMC_EV_MIPS74K_AGEN_BUBBLE_CYCLES, MIPS_CTR_1, 19 }, + { PMC_EV_MIPS74K_SINGLE_ISSUE_CYCLES, MIPS_CTR_0, 20 }, + { PMC_EV_MIPS74K_DUAL_ISSUE_CYCLES, MIPS_CTR_1, 20 }, + { PMC_EV_MIPS74K_OOO_ALU_ISSUE_CYCLES, MIPS_CTR_0, 21 }, + { PMC_EV_MIPS74K_OOO_AGEN_ISSUE_CYCLES, MIPS_CTR_1, 21 }, + { PMC_EV_MIPS74K_JALR_JALR_HB_INSNS, MIPS_CTR_0, 22 }, + { PMC_EV_MIPS74K_DCACHE_LINE_REFILL_REQUESTS, MIPS_CTR_1, 22 }, + { PMC_EV_MIPS74K_DCACHE_LOAD_ACCESSES, MIPS_CTR_0, 23 }, + { PMC_EV_MIPS74K_DCACHE_ACCESSES, MIPS_CTR_1, 23 }, + { PMC_EV_MIPS74K_DCACHE_WRITEBACKS, MIPS_CTR_0, 24 }, + { PMC_EV_MIPS74K_DCACHE_MISSES, MIPS_CTR_1, 24 }, + { PMC_EV_MIPS74K_JTLB_DATA_ACCESSES, MIPS_CTR_0, 25 }, + { PMC_EV_MIPS74K_JTLB_DATA_MISSES, MIPS_CTR_1, 25 }, + { PMC_EV_MIPS74K_LOAD_STORE_REPLAYS, MIPS_CTR_0, 26 }, + { PMC_EV_MIPS74K_VA_TRANSALTION_CORNER_CASES, MIPS_CTR_1, 26 }, + { PMC_EV_MIPS74K_LOAD_STORE_BLOCKED_CYCLES, MIPS_CTR_0, 27 }, + { PMC_EV_MIPS74K_LOAD_STORE_NO_FILL_REQUESTS, MIPS_CTR_1, 27 }, + { PMC_EV_MIPS74K_L2_CACHE_WRITEBACKS, MIPS_CTR_0, 28 }, + { PMC_EV_MIPS74K_L2_CACHE_ACCESSES, MIPS_CTR_1, 28 }, + { PMC_EV_MIPS74K_L2_CACHE_MISSES, MIPS_CTR_0, 29 }, + { PMC_EV_MIPS74K_L2_CACHE_MISS_CYCLES, MIPS_CTR_1, 29 }, + { PMC_EV_MIPS74K_FSB_FULL_STALLS, MIPS_CTR_0, 30 }, + { PMC_EV_MIPS74K_FSB_OVER_50_FULL, MIPS_CTR_1, 30 }, + { PMC_EV_MIPS74K_LDQ_FULL_STALLS, MIPS_CTR_0, 31 }, + { PMC_EV_MIPS74K_LDQ_OVER_50_FULL, MIPS_CTR_1, 31 }, + { PMC_EV_MIPS74K_WBB_FULL_STALLS, MIPS_CTR_0, 32 }, + { PMC_EV_MIPS74K_WBB_OVER_50_FULL, MIPS_CTR_1, 32 }, + { PMC_EV_MIPS74K_LOAD_MISS_CONSUMER_REPLAYS, MIPS_CTR_0, 35 }, + { PMC_EV_MIPS74K_CP1_CP2_LOAD_INSNS, MIPS_CTR_1, 35 }, + { PMC_EV_MIPS74K_JR_NON_31_INSNS, MIPS_CTR_0, 36 }, + { PMC_EV_MIPS74K_MISPREDICTED_JR_31_INSNS, MIPS_CTR_1, 36 }, + { PMC_EV_MIPS74K_BRANCH_INSNS, MIPS_CTR_0, 37 }, + { PMC_EV_MIPS74K_CP1_CP2_COND_BRANCH_INSNS, MIPS_CTR_1, 37 }, + { PMC_EV_MIPS74K_BRANCH_LIKELY_INSNS, MIPS_CTR_0, 38 }, + { PMC_EV_MIPS74K_MISPREDICTED_BRANCH_LIKELY_INSNS, MIPS_CTR_1, 38 }, + { PMC_EV_MIPS74K_COND_BRANCH_INSNS, MIPS_CTR_0, 39 }, + { PMC_EV_MIPS74K_MISPREDICTED_BRANCH_INSNS, MIPS_CTR_1, 39 }, + { PMC_EV_MIPS74K_INTEGER_INSNS, MIPS_CTR_0, 40 }, + { PMC_EV_MIPS74K_FPU_INSNS, MIPS_CTR_1, 40 }, + { PMC_EV_MIPS74K_LOAD_INSNS, MIPS_CTR_0, 41 }, + { PMC_EV_MIPS74K_STORE_INSNS, MIPS_CTR_1, 41 }, + { PMC_EV_MIPS74K_J_JAL_INSNS, MIPS_CTR_0, 42 }, + { PMC_EV_MIPS74K_MIPS16_INSNS, MIPS_CTR_1, 42 }, + { PMC_EV_MIPS74K_NOP_INSNS, MIPS_CTR_0, 43 }, + { PMC_EV_MIPS74K_NT_MUL_DIV_INSNS, MIPS_CTR_1, 43 }, + { PMC_EV_MIPS74K_DSP_INSNS, MIPS_CTR_0, 44 }, + { PMC_EV_MIPS74K_ALU_DSP_SATURATION_INSNS, MIPS_CTR_1, 44 }, + { PMC_EV_MIPS74K_DSP_BRANCH_INSNS, MIPS_CTR_0, 45 }, + { PMC_EV_MIPS74K_MDU_DSP_SATURATION_INSNS, MIPS_CTR_1, 45 }, + { PMC_EV_MIPS74K_UNCACHED_LOAD_INSNS, MIPS_CTR_0, 46 }, + { PMC_EV_MIPS74K_UNCACHED_STORE_INSNS, MIPS_CTR_1, 46 }, + { PMC_EV_MIPS74K_EJTAG_INSN_TRIGGERS, MIPS_CTR_0, 49 }, + { PMC_EV_MIPS74K_CP1_BRANCH_MISPREDICTIONS, MIPS_CTR_0, 50 }, + { PMC_EV_MIPS74K_SC_INSNS, MIPS_CTR_0, 51 }, + { PMC_EV_MIPS74K_FAILED_SC_INSNS, MIPS_CTR_1, 51 }, + { PMC_EV_MIPS74K_PREFETCH_INSNS, MIPS_CTR_0, 52 }, + { PMC_EV_MIPS74K_CACHE_HIT_PREFETCH_INSNS, MIPS_CTR_1, 52 }, + { PMC_EV_MIPS74K_NO_INSN_CYCLES, MIPS_CTR_0, 53 }, + { PMC_EV_MIPS74K_LOAD_MISS_INSNS, MIPS_CTR_1, 53 }, + { PMC_EV_MIPS74K_ONE_INSN_CYCLES, MIPS_CTR_0, 54 }, + { PMC_EV_MIPS74K_TWO_INSNS_CYCLES, MIPS_CTR_1, 54 }, + { PMC_EV_MIPS74K_GFIFO_BLOCKED_CYCLES, MIPS_CTR_0, 55 }, + { PMC_EV_MIPS74K_CP1_CP2_STORE_INSNS, MIPS_CTR_1, 55 }, + { PMC_EV_MIPS74K_MISPREDICTION_STALLS, MIPS_CTR_0, 56 }, + { PMC_EV_MIPS74K_MISPREDICTED_BRANCH_INSNS_CYCLES, MIPS_CTR_0, 57 }, + { PMC_EV_MIPS74K_EXCEPTIONS_TAKEN, MIPS_CTR_0, 58 }, + { PMC_EV_MIPS74K_GRADUATION_REPLAYS, MIPS_CTR_1, 58 }, + { PMC_EV_MIPS74K_COREEXTEND_EVENTS, MIPS_CTR_0, 59 }, + { PMC_EV_MIPS74K_ISPRAM_EVENTS, MIPS_CTR_0, 62 }, + { PMC_EV_MIPS74K_DSPRAM_EVENTS, MIPS_CTR_1, 62 }, + { PMC_EV_MIPS74K_L2_CACHE_SINGLE_BIT_ERRORS, MIPS_CTR_0, 63 }, + { PMC_EV_MIPS74K_SYSTEM_EVENT_0, MIPS_CTR_0, 64 }, + { PMC_EV_MIPS74K_SYSTEM_EVENT_1, MIPS_CTR_1, 64 }, + { PMC_EV_MIPS74K_SYSTEM_EVENT_2, MIPS_CTR_0, 65 }, + { PMC_EV_MIPS74K_SYSTEM_EVENT_3, MIPS_CTR_1, 65 }, + { PMC_EV_MIPS74K_SYSTEM_EVENT_4, MIPS_CTR_0, 66 }, + { PMC_EV_MIPS74K_SYSTEM_EVENT_5, MIPS_CTR_1, 66 }, + { PMC_EV_MIPS74K_SYSTEM_EVENT_6, MIPS_CTR_0, 67 }, + { PMC_EV_MIPS74K_SYSTEM_EVENT_7, MIPS_CTR_1, 67 }, + { PMC_EV_MIPS74K_OCP_ALL_REQUESTS, MIPS_CTR_0, 68 }, + { PMC_EV_MIPS74K_OCP_ALL_CACHEABLE_REQUESTS, MIPS_CTR_1, 68 }, + { PMC_EV_MIPS74K_OCP_READ_REQUESTS, MIPS_CTR_0, 69 }, + { PMC_EV_MIPS74K_OCP_READ_CACHEABLE_REQUESTS, MIPS_CTR_1, 69 }, + { PMC_EV_MIPS74K_OCP_WRITE_REQUESTS, MIPS_CTR_0, 70 }, + { PMC_EV_MIPS74K_OCP_WRITE_CACHEABLE_REQUESTS, MIPS_CTR_1, 70 }, + { PMC_EV_MIPS74K_FSB_LESS_25_FULL, MIPS_CTR_0, 74 }, + { PMC_EV_MIPS74K_FSB_25_50_FULL, MIPS_CTR_1, 74 }, + { PMC_EV_MIPS74K_LDQ_LESS_25_FULL, MIPS_CTR_0, 75 }, + { PMC_EV_MIPS74K_LDQ_25_50_FULL, MIPS_CTR_1, 75 }, + { PMC_EV_MIPS74K_WBB_LESS_25_FULL, MIPS_CTR_0, 76 }, + { PMC_EV_MIPS74K_WBB_25_50_FULL, MIPS_CTR_1, 76 }, +}; + +const int mips_event_codes_size = + sizeof(mips_event_codes) / sizeof(mips_event_codes[0]); + +struct mips_pmc_spec mips_pmc_spec = { + .ps_cpuclass = PMC_CLASS_MIPS74K, + .ps_cputype = PMC_CPU_MIPS_74K, + .ps_capabilities = MIPS74K_PMC_CAPS, + .ps_counter_width = 32 +}; + +/* + * Performance Count Register N + */ +uint64_t +mips_pmcn_read(unsigned int pmc) +{ + uint32_t reg = 0; + + KASSERT(pmc < mips_npmcs, ("[mips74k,%d] illegal PMC number %d", + __LINE__, pmc)); + + /* The counter value is the next value after the control register. */ + switch (pmc) { + case 0: + reg = mips_rd_perfcnt1(); + break; + case 1: + reg = mips_rd_perfcnt3(); + break; + default: + return 0; + } + return (reg); +} + +uint64_t +mips_pmcn_write(unsigned int pmc, uint64_t reg) +{ + + KASSERT(pmc < mips_npmcs, ("[mips74k,%d] illegal PMC number %d", + __LINE__, pmc)); + + switch (pmc) { + case 0: + mips_wr_perfcnt1(reg); + break; + case 1: + mips_wr_perfcnt3(reg); + break; + default: + return 0; + } + return (reg); +} + +uint32_t +mips_get_perfctl(int cpu, int ri, uint32_t event, uint32_t caps) +{ + uint32_t config; + + config = event; + + config <<= MIPS74K_PMC_SELECT; + + if (caps & PMC_CAP_SYSTEM) + config |= (MIPS74K_PMC_SUPER_ENABLE | + MIPS74K_PMC_KERNEL_ENABLE); + if (caps & PMC_CAP_USER) + config |= MIPS74K_PMC_USER_ENABLE; + if ((caps & (PMC_CAP_USER | PMC_CAP_SYSTEM)) == 0) + config |= MIPS74K_PMC_ENABLE; + if (caps & PMC_CAP_INTERRUPT) + config |= MIPS74K_PMC_INTERRUPT_ENABLE; + + PMCDBG(MDP,ALL,2,"mips74k-get_perfctl ri=%d -> config=0x%x", ri, config); + + return (config); +} Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Sun Apr 5 02:43:36 2015 (r281097) +++ head/sys/dev/hwpmc/pmc_events.h Sun Apr 5 02:57:02 2015 (r281098) @@ -4893,6 +4893,138 @@ __PMC_EV_ALIAS("IMPC_C0H_TRK_REQUEST.ALL #define PMC_EV_MIPS24K_LAST PMC_EV_MIPS24K_WBB_FULL_PIPELINE_STALLS /* + * MIPS74k events. Similar to MIPS24k, the arrangement + * is (0,2) then (1,3) events. + */ +#define __PMC_EV_MIPS74K() \ + __PMC_EV(MIPS74K, CYCLES) \ + __PMC_EV(MIPS74K, INSTR_EXECUTED) \ + __PMC_EV(MIPS74K, PREDICTED_JR_31) \ + __PMC_EV(MIPS74K, JR_31_MISPREDICTIONS) \ + __PMC_EV(MIPS74K, REDIRECT_STALLS) \ + __PMC_EV(MIPS74K, JR_31_NO_PREDICTIONS) \ + __PMC_EV(MIPS74K, ITLB_ACCESSES) \ + __PMC_EV(MIPS74K, ITLB_MISSES) \ + __PMC_EV(MIPS74K, JTLB_INSN_MISSES) \ + __PMC_EV(MIPS74K, ICACHE_ACCESSES) \ + __PMC_EV(MIPS74K, ICACHE_MISSES) \ + __PMC_EV(MIPS74K, ICACHE_MISS_STALLS) \ + __PMC_EV(MIPS74K, UNCACHED_IFETCH_STALLS) \ + __PMC_EV(MIPS74K, PDTRACE_BACK_STALLS) \ + __PMC_EV(MIPS74K, IFU_REPLAYS) \ + __PMC_EV(MIPS74K, KILLED_FETCH_SLOTS) \ + __PMC_EV(MIPS74K, IFU_IDU_MISS_PRED_UPSTREAM_CYCLES) \ + __PMC_EV(MIPS74K, IFU_IDU_NO_FETCH_CYCLES) \ + __PMC_EV(MIPS74K, IFU_IDU_CLOGED_DOWNSTREAM_CYCLES) \ + __PMC_EV(MIPS74K, DDQ0_FULL_DR_STALLS) \ + __PMC_EV(MIPS74K, DDQ1_FULL_DR_STALLS) \ + __PMC_EV(MIPS74K, ALCB_FULL_DR_STALLS) \ + __PMC_EV(MIPS74K, AGCB_FULL_DR_STALLS) \ + __PMC_EV(MIPS74K, CLDQ_FULL_DR_STALLS) \ + __PMC_EV(MIPS74K, IODQ_FULL_DR_STALLS) \ + __PMC_EV(MIPS74K, ALU_EMPTY_CYCLES) \ + __PMC_EV(MIPS74K, AGEN_EMPTY_CYCLES) \ + __PMC_EV(MIPS74K, ALU_OPERANDS_NOT_READY_CYCLES) \ + __PMC_EV(MIPS74K, AGEN_OPERANDS_NOT_READY_CYCLES) \ + __PMC_EV(MIPS74K, ALU_NO_ISSUES_CYCLES) \ + __PMC_EV(MIPS74K, AGEN_NO_ISSUES_CYCLES) \ + __PMC_EV(MIPS74K, ALU_BUBBLE_CYCLES) \ + __PMC_EV(MIPS74K, AGEN_BUBBLE_CYCLES) \ + __PMC_EV(MIPS74K, SINGLE_ISSUE_CYCLES) \ + __PMC_EV(MIPS74K, DUAL_ISSUE_CYCLES) \ + __PMC_EV(MIPS74K, OOO_ALU_ISSUE_CYCLES) \ + __PMC_EV(MIPS74K, OOO_AGEN_ISSUE_CYCLES) \ + __PMC_EV(MIPS74K, JALR_JALR_HB_INSNS) \ + __PMC_EV(MIPS74K, DCACHE_LINE_REFILL_REQUESTS) \ + __PMC_EV(MIPS74K, DCACHE_LOAD_ACCESSES) \ + __PMC_EV(MIPS74K, DCACHE_ACCESSES) \ + __PMC_EV(MIPS74K, DCACHE_WRITEBACKS) \ + __PMC_EV(MIPS74K, DCACHE_MISSES) \ + __PMC_EV(MIPS74K, JTLB_DATA_ACCESSES) \ + __PMC_EV(MIPS74K, JTLB_DATA_MISSES) \ + __PMC_EV(MIPS74K, LOAD_STORE_REPLAYS) \ + __PMC_EV(MIPS74K, VA_TRANSALTION_CORNER_CASES) \ + __PMC_EV(MIPS74K, LOAD_STORE_BLOCKED_CYCLES) \ + __PMC_EV(MIPS74K, LOAD_STORE_NO_FILL_REQUESTS) \ + __PMC_EV(MIPS74K, L2_CACHE_WRITEBACKS) \ + __PMC_EV(MIPS74K, L2_CACHE_ACCESSES) \ + __PMC_EV(MIPS74K, L2_CACHE_MISSES) \ + __PMC_EV(MIPS74K, L2_CACHE_MISS_CYCLES) \ + __PMC_EV(MIPS74K, FSB_FULL_STALLS) \ + __PMC_EV(MIPS74K, FSB_OVER_50_FULL) \ + __PMC_EV(MIPS74K, LDQ_FULL_STALLS) \ + __PMC_EV(MIPS74K, LDQ_OVER_50_FULL) \ + __PMC_EV(MIPS74K, WBB_FULL_STALLS) \ + __PMC_EV(MIPS74K, WBB_OVER_50_FULL) \ + __PMC_EV(MIPS74K, LOAD_MISS_CONSUMER_REPLAYS) \ + __PMC_EV(MIPS74K, CP1_CP2_LOAD_INSNS) \ + __PMC_EV(MIPS74K, JR_NON_31_INSNS) \ + __PMC_EV(MIPS74K, MISPREDICTED_JR_31_INSNS) \ + __PMC_EV(MIPS74K, BRANCH_INSNS) \ + __PMC_EV(MIPS74K, CP1_CP2_COND_BRANCH_INSNS) \ + __PMC_EV(MIPS74K, BRANCH_LIKELY_INSNS) \ + __PMC_EV(MIPS74K, MISPREDICTED_BRANCH_LIKELY_INSNS) \ + __PMC_EV(MIPS74K, COND_BRANCH_INSNS) \ + __PMC_EV(MIPS74K, MISPREDICTED_BRANCH_INSNS) \ + __PMC_EV(MIPS74K, INTEGER_INSNS) \ + __PMC_EV(MIPS74K, FPU_INSNS) \ + __PMC_EV(MIPS74K, LOAD_INSNS) \ + __PMC_EV(MIPS74K, STORE_INSNS) \ + __PMC_EV(MIPS74K, J_JAL_INSNS) \ + __PMC_EV(MIPS74K, MIPS16_INSNS) \ + __PMC_EV(MIPS74K, NOP_INSNS) \ + __PMC_EV(MIPS74K, NT_MUL_DIV_INSNS) \ + __PMC_EV(MIPS74K, DSP_INSNS) \ + __PMC_EV(MIPS74K, ALU_DSP_SATURATION_INSNS) \ + __PMC_EV(MIPS74K, DSP_BRANCH_INSNS) \ + __PMC_EV(MIPS74K, MDU_DSP_SATURATION_INSNS) \ + __PMC_EV(MIPS74K, UNCACHED_LOAD_INSNS) \ + __PMC_EV(MIPS74K, UNCACHED_STORE_INSNS) \ + __PMC_EV(MIPS74K, EJTAG_INSN_TRIGGERS) \ + __PMC_EV(MIPS74K, CP1_BRANCH_MISPREDICTIONS) \ + __PMC_EV(MIPS74K, SC_INSNS) \ + __PMC_EV(MIPS74K, FAILED_SC_INSNS) \ + __PMC_EV(MIPS74K, PREFETCH_INSNS) \ + __PMC_EV(MIPS74K, CACHE_HIT_PREFETCH_INSNS) \ + __PMC_EV(MIPS74K, NO_INSN_CYCLES) \ + __PMC_EV(MIPS74K, LOAD_MISS_INSNS) \ + __PMC_EV(MIPS74K, ONE_INSN_CYCLES) \ + __PMC_EV(MIPS74K, TWO_INSNS_CYCLES) \ + __PMC_EV(MIPS74K, GFIFO_BLOCKED_CYCLES) \ + __PMC_EV(MIPS74K, CP1_CP2_STORE_INSNS) \ + __PMC_EV(MIPS74K, MISPREDICTION_STALLS) \ + __PMC_EV(MIPS74K, MISPREDICTED_BRANCH_INSNS_CYCLES) \ + __PMC_EV(MIPS74K, EXCEPTIONS_TAKEN) \ + __PMC_EV(MIPS74K, GRADUATION_REPLAYS) \ + __PMC_EV(MIPS74K, COREEXTEND_EVENTS) \ + __PMC_EV(MIPS74K, ISPRAM_EVENTS) \ + __PMC_EV(MIPS74K, DSPRAM_EVENTS) \ + __PMC_EV(MIPS74K, L2_CACHE_SINGLE_BIT_ERRORS) \ + __PMC_EV(MIPS74K, SYSTEM_EVENT_0) \ + __PMC_EV(MIPS74K, SYSTEM_EVENT_1) \ + __PMC_EV(MIPS74K, SYSTEM_EVENT_2) \ + __PMC_EV(MIPS74K, SYSTEM_EVENT_3) \ + __PMC_EV(MIPS74K, SYSTEM_EVENT_4) \ + __PMC_EV(MIPS74K, SYSTEM_EVENT_5) \ + __PMC_EV(MIPS74K, SYSTEM_EVENT_6) \ + __PMC_EV(MIPS74K, SYSTEM_EVENT_7) \ + __PMC_EV(MIPS74K, OCP_ALL_REQUESTS) \ + __PMC_EV(MIPS74K, OCP_ALL_CACHEABLE_REQUESTS) \ + __PMC_EV(MIPS74K, OCP_READ_REQUESTS) \ + __PMC_EV(MIPS74K, OCP_READ_CACHEABLE_REQUESTS) \ + __PMC_EV(MIPS74K, OCP_WRITE_REQUESTS) \ + __PMC_EV(MIPS74K, OCP_WRITE_CACHEABLE_REQUESTS) \ + __PMC_EV(MIPS74K, FSB_LESS_25_FULL) \ + __PMC_EV(MIPS74K, FSB_25_50_FULL) \ + __PMC_EV(MIPS74K, LDQ_LESS_25_FULL) \ + __PMC_EV(MIPS74K, LDQ_25_50_FULL) \ + __PMC_EV(MIPS74K, WBB_LESS_25_FULL) \ + __PMC_EV(MIPS74K, WBB_25_50_FULL) + +#define PMC_EV_MIPS74K_FIRST PMC_EV_MIPS74K_CYCLES +#define PMC_EV_MIPS74K_LAST PMC_EV_MIPS74K_WBB_25_50_FULL + +/* * Cavium Octeon counters. Obtained from cvmx-core.h */ #define __PMC_EV_OCTEON() \ @@ -5256,6 +5388,8 @@ __PMC_EV_ALIAS("IMPC_C0H_TRK_REQUEST.ALL * 0x11100 0x0100 INTEL Pentium Pro/P-II/P-III/Pentium-M events * 0x11200 0x00FF INTEL XScale events * 0x11300 0x00FF MIPS 24K events + * 0x11400 0x00FF Octeon events + * 0x11500 0x00FF MIPS 74K events * 0x14000 0x0100 ARMv7 events * 0x20000 0x1000 Software events */ @@ -5282,6 +5416,8 @@ __PMC_EV_ALIAS("IMPC_C0H_TRK_REQUEST.ALL __PMC_EV_MIPS24K() \ __PMC_EV_BLOCK(OCTEON, 0x11400) \ __PMC_EV_OCTEON() \ + __PMC_EV_BLOCK(MIPS74K, 0x11500) \ + __PMC_EV_MIPS74K() \ __PMC_EV_BLOCK(UCF, 0x12000) \ __PMC_EV_UCF() \ __PMC_EV_BLOCK(UCP, 0x12080) \ From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 05:00:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D17B217A; Sun, 5 Apr 2015 05:00:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD40E868; Sun, 5 Apr 2015 05:00:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3550Q8w092531; Sun, 5 Apr 2015 05:00:26 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3550QRh092530; Sun, 5 Apr 2015 05:00:26 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504050500.t3550QRh092530@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 5 Apr 2015 05:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281099 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 05:00:26 -0000 Author: adrian Date: Sun Apr 5 05:00:25 2015 New Revision: 281099 URL: https://svnweb.freebsd.org/changeset/base/281099 Log: Oops, add missing file from previous commit. (Sorry bsdimp, I did break the build.) Modified: head/sys/sys/pmc.h Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Sun Apr 5 02:57:02 2015 (r281098) +++ head/sys/sys/pmc.h Sun Apr 5 05:00:25 2015 (r281099) @@ -99,6 +99,7 @@ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ + __PMC_CPU(MIPS_74K, 0x202, "MIPS 74K") \ __PMC_CPU(PPC_7450, 0x300, "PowerPC MPC7450") \ __PMC_CPU(PPC_970, 0x380, "IBM PowerPC 970") \ __PMC_CPU(GENERIC, 0x400, "Generic") @@ -131,6 +132,7 @@ enum pmc_cputype { __PMC_CLASS(ARMV7) /* ARMv7 */ \ __PMC_CLASS(MIPS24K) /* MIPS 24K */ \ __PMC_CLASS(OCTEON) /* Cavium Octeon */ \ + __PMC_CLASS(MIPS74K) /* MIPS 74K */ \ __PMC_CLASS(PPC7450) /* Motorola MPC7450 class */ \ __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ __PMC_CLASS(SOFT) /* Software events */ From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 05:07:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F1BC399; Sun, 5 Apr 2015 05:07:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AD73927; Sun, 5 Apr 2015 05:07:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3557Ppf096784; Sun, 5 Apr 2015 05:07:25 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3557PBR096782; Sun, 5 Apr 2015 05:07:25 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504050507.t3557PBR096782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 5 Apr 2015 05:07:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281100 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 05:07:25 -0000 Author: eadler Date: Sun Apr 5 05:07:24 2015 New Revision: 281100 URL: https://svnweb.freebsd.org/changeset/base/281100 Log: head/sys/amd64/amd64/support.S: unroll loop unroll the loop in ENTRY(pagezero) acc' to the submitter this results in a reproducible 1% perf improvement under buildworld like workload I validated correctness and run-testing, but not performance impact Submitted by: lidl@pix.net Reviewed by: adrian PR: 199151 MFC After: 1 month Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Sun Apr 5 05:00:25 2015 (r281099) +++ head/sys/amd64/amd64/support.S Sun Apr 5 05:07:24 2015 (r281100) @@ -73,7 +73,11 @@ ENTRY(pagezero) movnti %rax,8(%rdi,%rdx) movnti %rax,16(%rdi,%rdx) movnti %rax,24(%rdi,%rdx) - addq $32,%rdx + movnti %rax,32(%rdi,%rdx) + movnti %rax,40(%rdi,%rdx) + movnti %rax,48(%rdi,%rdx) + movnti %rax,56(%rdi,%rdx) + addq $64,%rdx jne 1b sfence POP_FRAME_POINTER From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 05:09:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 173D94FA; Sun, 5 Apr 2015 05:09:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 020A4935; Sun, 5 Apr 2015 05:09:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3559cod097088; Sun, 5 Apr 2015 05:09:38 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3559c2N097087; Sun, 5 Apr 2015 05:09:38 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504050509.t3559c2N097087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sun, 5 Apr 2015 05:09:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281101 - head/sys/dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 05:09:39 -0000 Author: rpaulo Date: Sun Apr 5 05:09:38 2015 New Revision: 281101 URL: https://svnweb.freebsd.org/changeset/base/281101 Log: Remove whitespace. Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Sun Apr 5 05:07:24 2015 (r281100) +++ head/sys/dev/hwpmc/hwpmc_core.c Sun Apr 5 05:09:38 2015 (r281101) @@ -410,7 +410,7 @@ iaf_start_pmc(int cpu, int ri) iafc->pc_resync = 0; iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET)); msr = rdmsr(IA_GLOBAL_CTRL) & ~IAF_GLOBAL_CTRL_MASK; - wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); @@ -487,7 +487,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value /* Turn off fixed counters */ msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK; - wrmsr(IAF_CTRL, msr); + wrmsr(IAF_CTRL, msr); wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1)); @@ -704,7 +704,7 @@ static struct iap_event_descr iap_events IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | + IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX), IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1316,7 +1316,7 @@ static struct iap_event_descr iap_events IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | + IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), @@ -1466,7 +1466,7 @@ static struct iap_event_descr iap_events IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), IAPDESCR(C3H_02H, 0xC3, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | @@ -1623,10 +1623,10 @@ static struct iap_event_descr iap_events IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_04H, 0xD1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | + IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_10H, 0xD1, 0x10, IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX), - IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | + IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_40H, 0xD1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), @@ -1716,7 +1716,7 @@ static struct iap_event_descr iap_events IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(E6H_08H, 0xE6, 0x08, IAP_F_CAS), IAPDESCR(E6H_10H, 0xE6, 0x10, IAP_F_CAS), - IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | + IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_CAS), @@ -1876,7 +1876,7 @@ iap_is_event_architectural(enum pmc_even return (EV_IS_NOTARCH); } - return (((core_architectural_events & (1 << ae)) == 0) ? + return (((core_architectural_events & (1 << ae)) == 0) ? EV_IS_ARCH_NOTSUPP : EV_IS_ARCH_SUPP); } From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 05:14:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D277D66C; Sun, 5 Apr 2015 05:14:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B55D39DC; Sun, 5 Apr 2015 05:14:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t355EMH2001257; Sun, 5 Apr 2015 05:14:22 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t355ELbP001250; Sun, 5 Apr 2015 05:14:21 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504050514.t355ELbP001250@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sun, 5 Apr 2015 05:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281102 - in head/sys: dev/hwpmc sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 05:14:22 -0000 Author: rpaulo Date: Sun Apr 5 05:14:20 2015 New Revision: 281102 URL: https://svnweb.freebsd.org/changeset/base/281102 Log: hwpmc: add initial Intel Broadwell support. The full list of aliases and events will follow in a subsequent commit. MFC after: 1 month Modified: head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_intel.c head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Sun Apr 5 05:09:38 2015 (r281101) +++ head/sys/dev/hwpmc/hwpmc_core.c Sun Apr 5 05:14:20 2015 (r281102) @@ -574,7 +574,8 @@ struct iap_event_descr { #define IAP_F_HW (1 << 10) /* CPU: Haswell */ #define IAP_F_CAS (1 << 11) /* CPU: Atom Silvermont */ #define IAP_F_HWX (1 << 12) /* CPU: Haswell Xeon */ -#define IAP_F_FM (1 << 13) /* Fixed mask */ +#define IAP_F_BW (1 << 13) /* CPU: Broadwell */ +#define IAP_F_FM (1 << 14) /* Fixed mask */ #define IAP_F_ALLCPUSCORE2 \ (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) @@ -2074,6 +2075,7 @@ iap_allocate_pmc(int cpu, int ri, struct if (iap_event_corei7_ok_on_counter(ev, ri) == 0) return (EINVAL); break; + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_SANDYBRIDGE: case PMC_CPU_INTEL_SANDYBRIDGE_XEON: case PMC_CPU_INTEL_IVYBRIDGE: @@ -2106,6 +2108,9 @@ iap_allocate_pmc(int cpu, int ri, struct case PMC_CPU_INTEL_ATOM_SILVERMONT: cpuflag = IAP_F_CAS; break; + case PMC_CPU_INTEL_BROADWELL: + cpuflag = IAP_F_BW; + break; case PMC_CPU_INTEL_CORE: cpuflag = IAP_F_CC; break; Modified: head/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_intel.c Sun Apr 5 05:09:38 2015 (r281101) +++ head/sys/dev/hwpmc/hwpmc_intel.c Sun Apr 5 05:14:20 2015 (r281102) @@ -179,6 +179,10 @@ pmc_intel_initialize(void) cputype = PMC_CPU_INTEL_IVYBRIDGE_XEON; nclasses = 3; break; + case 0x3D: + cputype = PMC_CPU_INTEL_BROADWELL; + nclasses = 3; + break; case 0x3F: /* Per Intel document 325462-045US 09/2014. */ case 0x46: /* Per Intel document 325462-045US 09/2014. */ /* Should 46 be XEON. probably its own? */ @@ -227,6 +231,7 @@ pmc_intel_initialize(void) */ case PMC_CPU_INTEL_ATOM: case PMC_CPU_INTEL_ATOM_SILVERMONT: + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: @@ -295,6 +300,7 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_HASWELL: case PMC_CPU_INTEL_SANDYBRIDGE: case PMC_CPU_INTEL_WESTMERE: + case PMC_CPU_INTEL_BROADWELL: error = pmc_uncore_initialize(pmc_mdep, ncpus); break; default: @@ -319,6 +325,7 @@ pmc_intel_finalize(struct pmc_mdep *md) #if defined(__i386__) || defined(__amd64__) case PMC_CPU_INTEL_ATOM: case PMC_CPU_INTEL_ATOM_SILVERMONT: + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: @@ -360,6 +367,7 @@ pmc_intel_finalize(struct pmc_mdep *md) */ #if defined(__i386__) || defined(__amd64__) switch (md->pmd_cputype) { + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_COREI7: case PMC_CPU_INTEL_HASWELL: case PMC_CPU_INTEL_SANDYBRIDGE: Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Sun Apr 5 05:09:38 2015 (r281101) +++ head/sys/dev/hwpmc/pmc_events.h Sun Apr 5 05:14:20 2015 (r281102) @@ -1554,6 +1554,11 @@ __PMC_EV_ALIAS("BACLEARS.RETURN", I __PMC_EV_ALIAS("BACLEARS.COND", IAP_EVENT_E6H_10H) \ __PMC_EV_ALIAS("MS_DECODED.MS_ENTRY", IAP_EVENT_E7H_01H) +/* + * Aliases for Broadwell PMC events. + */ +#define __PMC_EV_ALIAS_BROADWELL() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() /* * Aliases for Core PMC events. @@ -4228,6 +4233,11 @@ __PMC_EV(UCP, EVENT_86H_01H) #define PMC_EV_UCP_FIRST PMC_EV_UCP_EVENT_00H_01H #define PMC_EV_UCP_LAST PMC_EV_UCP_EVENT_86H_01H +/* + * Aliases for Broadwell uncore PMC events + */ +#define __PMC_EV_ALIAS_BROADWELLUC() + #define __PMC_EV_ALIAS_COREI7UC() \ __PMC_EV_ALIAS("GQ_CYCLES_FULL.READ_TRACKER", UCP_EVENT_00H_01H) \ __PMC_EV_ALIAS("GQ_CYCLES_FULL.WRITE_TRACKER", UCP_EVENT_00H_02H) \ Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Sun Apr 5 05:09:38 2015 (r281101) +++ head/sys/sys/pmc.h Sun Apr 5 05:14:20 2015 (r281102) @@ -96,6 +96,7 @@ __PMC_CPU(INTEL_NEHALEM_EX, 0x93, "Intel Nehalem Xeon 7500") \ __PMC_CPU(INTEL_WESTMERE_EX, 0x94, "Intel Westmere Xeon E7") \ __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ + __PMC_CPU(INTEL_BROADWELL, 0x96, "Intel Broadwell") \ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 05:18:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31746863; Sun, 5 Apr 2015 05:18:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D19C9F9; Sun, 5 Apr 2015 05:18:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t355IFsY001787; Sun, 5 Apr 2015 05:18:15 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t355IFVJ001786; Sun, 5 Apr 2015 05:18:15 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504050518.t355IFVJ001786@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 5 Apr 2015 05:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281103 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 05:18:16 -0000 Author: eadler Date: Sun Apr 5 05:18:14 2015 New Revision: 281103 URL: https://svnweb.freebsd.org/changeset/base/281103 Log: adrian asked me to revert and get more testing Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Sun Apr 5 05:14:20 2015 (r281102) +++ head/sys/amd64/amd64/support.S Sun Apr 5 05:18:14 2015 (r281103) @@ -73,11 +73,7 @@ ENTRY(pagezero) movnti %rax,8(%rdi,%rdx) movnti %rax,16(%rdi,%rdx) movnti %rax,24(%rdi,%rdx) - movnti %rax,32(%rdi,%rdx) - movnti %rax,40(%rdi,%rdx) - movnti %rax,48(%rdi,%rdx) - movnti %rax,56(%rdi,%rdx) - addq $64,%rdx + addq $32,%rdx jne 1b sfence POP_FRAME_POINTER From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 06:55:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF44B504; Sun, 5 Apr 2015 06:55:33 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id D3DD5278; Sun, 5 Apr 2015 06:55:32 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 178E93C375B; Sun, 5 Apr 2015 16:55:24 +1000 (AEST) Date: Sun, 5 Apr 2015 16:55:23 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler Subject: Re: svn commit: r281103 - head/sys/amd64/amd64 In-Reply-To: <201504050518.t355IFVJ001786@svn.freebsd.org> Message-ID: <20150405163305.A2515@besplex.bde.org> References: <201504050518.t355IFVJ001786@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=bz_mcmIv9LyV8_vcxFEA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 06:55:33 -0000 On Sun, 5 Apr 2015, Eitan Adler wrote: > Log: > adrian asked me to revert and get more testing > > Modified: > head/sys/amd64/amd64/support.S > > Modified: head/sys/amd64/amd64/support.S > ============================================================================== > --- head/sys/amd64/amd64/support.S Sun Apr 5 05:14:20 2015 (r281102) > +++ head/sys/amd64/amd64/support.S Sun Apr 5 05:18:14 2015 (r281103) > @@ -73,11 +73,7 @@ ENTRY(pagezero) > movnti %rax,8(%rdi,%rdx) > movnti %rax,16(%rdi,%rdx) > movnti %rax,24(%rdi,%rdx) > - movnti %rax,32(%rdi,%rdx) > - movnti %rax,40(%rdi,%rdx) > - movnti %rax,48(%rdi,%rdx) > - movnti %rax,56(%rdi,%rdx) > - addq $64,%rdx > + addq $32,%rdx > jne 1b > sfence > POP_FRAME_POINTER My tests show that such changes make no difference unless you throttle the CPU to make the memory fast in comparision. Counting cycles shows that no unrolling is useful on a 4GHz CPU with memory slower than 16GB/sec. But there may be complications for write buffering. 8 bytes at a time is too small, so although movnti bypasses the caches it must go through write buffers to combine writes. Then writing in groups of the same size as the write buffer may be best. Tests on ref11-amd64 now show no significant difference between 4-way, 1-way, 8-way and 2-way unrolling. 4-way seems to be insignificantly slowest and 2-way and 8-way insignificantly equally fastest. "Insignificantly" means less than 2% on a micro-benchmark but there is some variance whch I wasn't careful to determine. Old tests show that if you improve the speed of pagecopy and pagezero by a lot more than 1% like I do for i386-with-no-SSE2 using movntps, then you get insignificant speedups for makeworld. (-current uses movnti for both pagecopy and pagezero on amd64, but on i386 it only uses movnti for sse2_pagezero.) movnti is used to bypass the cache. It is not clear that this is best. Bypassing the cache for other things seemed to give just large complexity for a small loss. I got best results for makeworld from an old version of FreeBSD that did page zeroing in idle context. That is unsupported/broken/done differently now. With page zeroing in idle context, bypassing the cache is clearly right, and the speed of pagezero doesn't matter much iff it is executed in idle context, and it should run slower if necessary to bypass the cache. It is probably wrong to bypass the cache for zeroing on demand. Then at least the bytes that caused the page to be demanded are sure to be used soon. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 09:50:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FBB0966; Sun, 5 Apr 2015 09:50:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF43063D; Sun, 5 Apr 2015 09:50:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t359oMXF028382; Sun, 5 Apr 2015 09:50:22 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t359oM18028381; Sun, 5 Apr 2015 09:50:22 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504050950.t359oM18028381@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 5 Apr 2015 09:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281106 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 09:50:23 -0000 Author: andrew Date: Sun Apr 5 09:50:22 2015 New Revision: 281106 URL: https://svnweb.freebsd.org/changeset/base/281106 Log: dev/ofw/openfirm.h is not needed in the arm machine/fdt.h Modified: head/sys/arm/include/fdt.h Modified: head/sys/arm/include/fdt.h ============================================================================== --- head/sys/arm/include/fdt.h Sun Apr 5 06:54:28 2015 (r281105) +++ head/sys/arm/include/fdt.h Sun Apr 5 09:50:22 2015 (r281106) @@ -32,8 +32,6 @@ #ifndef _MACHINE_FDT_H_ #define _MACHINE_FDT_H_ -#include - #include /* Max interrupt number */ From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 13:26:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B22290; Sun, 5 Apr 2015 13:26:26 +0000 (UTC) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E601C6D; Sun, 5 Apr 2015 13:26:26 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 193AA358C61; Sun, 5 Apr 2015 15:26:23 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id DD14A28494; Sun, 5 Apr 2015 15:26:22 +0200 (CEST) Date: Sun, 5 Apr 2015 15:26:22 +0200 From: Jilles Tjoelker To: Sergey Kandaurov Subject: Re: svn commit: r281086 - head/sys/kern Message-ID: <20150405132622.GA48066@stack.nl> References: <201504042147.t34LltiZ084425@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 13:26:26 -0000 On Sun, Apr 05, 2015 at 02:23:05AM +0300, Sergey Kandaurov wrote: > On 5 April 2015 at 00:47, Jilles Tjoelker wrote: > > Author: jilles > > Date: Sat Apr 4 21:47:54 2015 > > New Revision: 281086 > > URL: https://svnweb.freebsd.org/changeset/base/281086 > > Log: > > utimensat: Correct Capsicum required capability rights. > [snip] > What about kern_lutimes()? > It seems it needs CAP_FUTIMES as well due its path argument. The current directory and the root directory don't have capability rights associated with them, so requiring CAP_FUTIMES does not have any effect. For the same reason, lutimes() is not permitted in capability mode. -- Jilles Tjoelker From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 14:06:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8545353C; Sun, 5 Apr 2015 14:06:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F703F7F; Sun, 5 Apr 2015 14:06:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35E6CQF049823; Sun, 5 Apr 2015 14:06:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35E6Cxm049822; Sun, 5 Apr 2015 14:06:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504051406.t35E6Cxm049822@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 5 Apr 2015 14:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281107 - head/libexec/rtld-elf/mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 14:06:12 -0000 Author: emaste Date: Sun Apr 5 14:06:11 2015 New Revision: 281107 URL: https://svnweb.freebsd.org/changeset/base/281107 Log: MIPS rtld: report missing symbol rather than segfaulting This is only an interim fix; MIPS should be using the MI code instead, which does not have this issue. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D661 Modified: head/libexec/rtld-elf/mips/reloc.c Modified: head/libexec/rtld-elf/mips/reloc.c ============================================================================== --- head/libexec/rtld-elf/mips/reloc.c Sun Apr 5 09:50:22 2015 (r281106) +++ head/libexec/rtld-elf/mips/reloc.c Sun Apr 5 14:06:11 2015 (r281107) @@ -245,7 +245,7 @@ _mips_rtld_bind(Obj_Entry *obj, Elf_Size def = find_symdef(reloff, obj, &defobj, SYMLOOK_IN_PLT, NULL, NULL); if (def == NULL) - _rtld_error("bind failed no symbol"); + rtld_die(); target = (Elf_Addr)(defobj->relocbase + def->st_value); dbg("bind now/fixup at %s sym # %jd in %s --> was=%p new=%p", From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 14:17:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2EA77E8; Sun, 5 Apr 2015 14:17:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDDDDB5; Sun, 5 Apr 2015 14:17:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35EHR92054731; Sun, 5 Apr 2015 14:17:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35EHRXW054730; Sun, 5 Apr 2015 14:17:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504051417.t35EHRXW054730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 5 Apr 2015 14:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281108 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 14:17:28 -0000 Author: mav Date: Sun Apr 5 14:17:26 2015 New Revision: 281108 URL: https://svnweb.freebsd.org/changeset/base/281108 Log: Add vmem locking to r281026. While races there are not fatal, they cause result underestimation, that cause unneeded ARC reclaims. MFC after: 1 month Modified: head/sys/kern/subr_vmem.c Modified: head/sys/kern/subr_vmem.c ============================================================================== --- head/sys/kern/subr_vmem.c Sun Apr 5 14:06:11 2015 (r281107) +++ head/sys/kern/subr_vmem.c Sun Apr 5 14:17:26 2015 (r281108) @@ -1330,12 +1330,15 @@ vmem_size(vmem_t *vm, int typemask) case VMEM_FREE|VMEM_ALLOC: return vm->vm_size; case VMEM_MAXFREE: + VMEM_LOCK(vm); for (i = VMEM_MAXORDER - 1; i >= 0; i--) { if (LIST_EMPTY(&vm->vm_freelist[i])) continue; + VMEM_UNLOCK(vm); return ((vmem_size_t)ORDER2SIZE(i) << vm->vm_quantum_shift); } + VMEM_UNLOCK(vm); return (0); default: panic("vmem_size"); From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 14:45:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F18F5CC2; Sun, 5 Apr 2015 14:45:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBBC434D; Sun, 5 Apr 2015 14:45:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35Ejrmt068405; Sun, 5 Apr 2015 14:45:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35Ejr4X068404; Sun, 5 Apr 2015 14:45:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504051445.t35Ejr4X068404@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 5 Apr 2015 14:45:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281109 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 14:45:54 -0000 Author: mav Date: Sun Apr 5 14:45:52 2015 New Revision: 281109 URL: https://svnweb.freebsd.org/changeset/base/281109 Log: Add DTrace probe to the new ARC reclaim cause added in r281026. MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Apr 5 14:17:26 2015 (r281108) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Apr 5 14:45:52 2015 (r281109) @@ -2671,8 +2671,12 @@ arc_reclaim_needed(void) * Above limits know nothing about real level of KVA fragmentation. * Start aggressive reclamation if too little sequential KVA left. */ - if (vmem_size(heap_arena, VMEM_MAXFREE) < zfs_max_recordsize) + if (vmem_size(heap_arena, VMEM_MAXFREE) < zfs_max_recordsize) { + DTRACE_PROBE2(arc__reclaim_maxfree, uint64_t, + vmem_size(heap_arena, VMEM_MAXFREE), + uint64_t, zfs_max_recordsize); return (1); + } #else /* _KERNEL */ if (spa_get_random(100) == 0) From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 16:35:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 820DE307; Sun, 5 Apr 2015 16:35:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D8FCEDA; Sun, 5 Apr 2015 16:35:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35GZEvr021881; Sun, 5 Apr 2015 16:35:14 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35GZEAZ021880; Sun, 5 Apr 2015 16:35:14 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504051635.t35GZEAZ021880@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 5 Apr 2015 16:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281111 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 16:35:14 -0000 Author: jhibbits Date: Sun Apr 5 16:35:13 2015 New Revision: 281111 URL: https://svnweb.freebsd.org/changeset/base/281111 Log: Missed this in r281096 as well. Renumber EXC_DEBUG to be above EXC_LAST, so as not to conflict with AIM trap vectors. Modified: head/sys/powerpc/include/trap.h Modified: head/sys/powerpc/include/trap.h ============================================================================== --- head/sys/powerpc/include/trap.h Sun Apr 5 15:27:56 2015 (r281110) +++ head/sys/powerpc/include/trap.h Sun Apr 5 16:35:13 2015 (r281111) @@ -85,7 +85,7 @@ #define EXC_DTMISS 0x1100 /* Data TLB Miss */ #define EXC_ITMISS 0x1200 /* Instruction TLB Miss */ #define EXC_APU 0x1300 /* Auxiliary Processing Unit */ -#define EXC_DEBUG 0x2000 /* Debug trap */ +#define EXC_DEBUG 0x2f10 /* Debug trap */ #define EXC_LAST 0x2f00 /* Last possible exception vector */ From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 17:10:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB54A7EC; Sun, 5 Apr 2015 17:09:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D679B1B2; Sun, 5 Apr 2015 17:09:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35H9xDx036828; Sun, 5 Apr 2015 17:09:59 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35H9xG3036827; Sun, 5 Apr 2015 17:09:59 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201504051709.t35H9xG3036827@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Sun, 5 Apr 2015 17:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281112 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 17:10:00 -0000 Author: jpaetzel Date: Sun Apr 5 17:09:58 2015 New Revision: 281112 URL: https://svnweb.freebsd.org/changeset/base/281112 Log: Bug fixes and feature adds - Remove extranious echo that breaks puppet - Handle restarts of multiple pflog devices correctly - Add the ability to perform actions on specific pflog devices. PR: 199150 Submitted by: jason.unovitch@gmail.com MFC after: 3 days Modified: head/etc/rc.d/pflog Modified: head/etc/rc.d/pflog ============================================================================== --- head/etc/rc.d/pflog Sun Apr 5 16:35:13 2015 (r281111) +++ head/etc/rc.d/pflog Sun Apr 5 17:09:58 2015 (r281112) @@ -24,30 +24,30 @@ pflog_prestart() { load_kld pflog || return 1 + # create pflog_dev interface if needed + if ! ifconfig $pflog_dev > /dev/null 2>&1; then + if ! ifconfig $pflog_dev create; then + warn "could not create $pflog_dev." + return 1 + fi + fi + # set pflog_dev interface to up state if ! ifconfig $pflog_dev up; then warn "could not bring up $pflog_dev." return 1 fi + # -p flag requires striping pidfile's leading /var/run and trailing .pid + pidfile=$(echo $pidfile | sed -e 's|/var/run/||' -e 's|.pid$||') + # prepare the command line for pflogd - rc_flags="-f $pflog_logfile -i $pflog_dev $rc_flags" + rc_flags="-p $pidfile -f $pflog_logfile -i $pflog_dev $rc_flags" # report we're ready to run pflogd return 0 } -pflog_poststart() { - # Allow child pflogd to settle - sleep 0.10 - # More elegant(?) method for getting a unique pid - if [ -f /var/run/pflogd.pid ]; then - mv /var/run/pflogd.pid $pidfile - else - warn "/var/run/pflogd.pid does not exist. Too fast." - fi -} - pflog_poststop() { if ! ifconfig $pflog_dev down; then @@ -70,29 +70,33 @@ pflog_resync() load_rc_config $name -# Check if spawning multiple pflogd -echo "Starting pflogd: $pflog_instances" -if [ "$pflog_instances" ] && [ -n "$pflog_instances" ]; then - start_postcmd="pflog_poststart" +# Check if spawning multiple pflogd and told what to spawn +if [ -n "$2" ]; then + # Set required variables + eval pflog_dev=\$pflog_${2}_dev + eval pflog_logfile=\$pflog_${2}_logfile + eval pflog_flags=\$pflog_${2}_flags + # Check that required vars have non-zero length, warn if not. + if [ -z $pflog_dev ]; then + warn "pflog_dev not set" + continue + fi + if [ -z $pflog_logfile ]; then + warn "pflog_logfile not set" + continue + fi + + # Provide a unique pidfile name for pflogd -p flag + pidfile="/var/run/pflogd.$2.pid" + + # Override service name and execute command + name=$pflog_dev + run_rc_command "$1" +# Check if spawning multiple pflogd and not told what to spawn +elif [ "$pflog_instances" ] && [ -n "$pflog_instances" ]; then # Interate through requested instances. for i in $pflog_instances; do - # Set required variables - eval pflog_dev=\$pflog_${i}_dev - eval pflog_logfile=\$pflog_${i}_logfile - eval pflog_flags=\$pflog_${i}_flags - # Check that required vars have non-zero length, warn if not. - if [ -z $pflog_dev ]; then - warn "pflog_dev not set" - continue - fi - if [ -z $pflog_logfile ]; then - warn "pflog_logfile not set" - continue - fi - # pflogd sets a pidfile, but the name is hardcoded. Concoct a - # unique pidfile name. - pidfile="/var/run/pflogd.$i.pid" - run_rc_command "$1" + /etc/rc.d/pflog $1 $i done else # Typical case, spawn single instance only. From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 17:16:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B532B53; Sun, 5 Apr 2015 17:16:16 +0000 (UTC) Received: from mail-pd0-x234.google.com (mail-pd0-x234.google.com [IPv6:2607:f8b0:400e:c02::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 04FA12B1; Sun, 5 Apr 2015 17:16:16 +0000 (UTC) Received: by pdbnk13 with SMTP id nk13so21073234pdb.0; Sun, 05 Apr 2015 10:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=bUkZBgLbuWhCkNFci1Jf8+JEXHrJBTyIpe+J2A6JjHI=; b=oaPcaT6KR41SHnoaDw5Bsf+iPr6yw8P9aY9pKssbYKTl3EPpMKQ3HlGuMAZFrgHgV0 GwXYs7H8QxH86kP8QGXM2pXS6LYqZIKFzxbIHF2t3SMivRjuIghsvr6HLLoCk2neCqWJ 6d6soexkYqBdKjETcyKCRaciymZaj3f8x1PJm3hX2ev+mT5MGazTbc4+sQk1LPHkVoFW 6BlX5tc9qaHp/1MvPTIEk1Z7fe8mTT7RWsPUSoAL42KXGFARmgQBbTKzwhk/QHAF5HZm jXD+gakSgIAk6gZw+8pnH8yv7QCZPT+WDOAP3+7tYdKGaYQCtwspXiAZZro4h+5Ox+En oJ2A== X-Received: by 10.68.102.228 with SMTP id fr4mr20822713pbb.87.1428254175498; Sun, 05 Apr 2015 10:16:15 -0700 (PDT) Received: from [10.22.190.54] (mobile-166-171-249-060.mycingular.net. [166.171.249.60]) by mx.google.com with ESMTPSA id w9sm2035626pdm.89.2015.04.05.10.16.14 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 05 Apr 2015 10:16:14 -0700 (PDT) References: <201504051709.t35H9xG3036827@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201504051709.t35H9xG3036827@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: X-Mailer: iPhone Mail (12D508) From: Garrett Cooper Subject: Re: svn commit: r281112 - head/etc/rc.d Date: Sun, 5 Apr 2015 10:16:09 -0700 To: Josh Paetzel Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 17:16:16 -0000 Hi Josh, > On Apr 5, 2015, at 10:09, Josh Paetzel wrote: >=20 > Author: jpaetzel > Date: Sun Apr 5 17:09:58 2015 > New Revision: 281112 > URL: https://svnweb.freebsd.org/changeset/base/281112 >=20 > Log: > Bug fixes and feature adds >=20 > - Remove extranious echo that breaks puppet > - Handle restarts of multiple pflog devices correctly > - Add the ability to perform actions on specific pflog devices. >=20 > PR: 199150 > Submitted by: jason.unovitch@gmail.com > MFC after: 3 days >=20 > Modified: > head/etc/rc.d/pflog >=20 > Modified: head/etc/rc.d/pflog > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/etc/rc.d/pflog Sun Apr 5 16:35:13 2015 (r281111) > +++ head/etc/rc.d/pflog Sun Apr 5 17:09:58 2015 (r281112) > @@ -24,30 +24,30 @@ pflog_prestart() > { > load_kld pflog || return 1 >=20 > + # create pflog_dev interface if needed > + if ! ifconfig $pflog_dev > /dev/null 2>&1; then > + if ! ifconfig $pflog_dev create; then > + warn "could not create $pflog_dev." > + return 1 > + fi > + fi Is a character device created for pflog? > + > # set pflog_dev interface to up state > if ! ifconfig $pflog_dev up; then > warn "could not bring up $pflog_dev." > return 1 > fi >=20 > + # -p flag requires striping pidfile's leading /var/run and trailing .= pid > + pidfile=3D$(echo $pidfile | sed -e 's|/var/run/||' -e 's|.pid$||') > + Could this use pgrep with a custom pidfile? Thanks!= From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 18:25:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F1F0254; Sun, 5 Apr 2015 18:25:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B048C0F; Sun, 5 Apr 2015 18:25:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35IPORc078391; Sun, 5 Apr 2015 18:25:24 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35IPO7t078390; Sun, 5 Apr 2015 18:25:24 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201504051825.t35IPO7t078390@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 5 Apr 2015 18:25:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281113 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 18:25:24 -0000 Author: dchagin Date: Sun Apr 5 18:25:23 2015 New Revision: 281113 URL: https://svnweb.freebsd.org/changeset/base/281113 Log: Fix wrong kassert msg in uma. PR: 199172 Submitted by: luke.tw gmail com MFC after: 1 week Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun Apr 5 17:09:58 2015 (r281112) +++ head/sys/vm/uma_core.c Sun Apr 5 18:25:23 2015 (r281113) @@ -3060,7 +3060,7 @@ uma_zone_set_fini(uma_zone_t zone, uma_f uma_keg_t keg; keg = zone_first_keg(zone); - KASSERT(keg != NULL, ("uma_zone_set_init: Invalid zone type")); + KASSERT(keg != NULL, ("uma_zone_set_fini: Invalid zone type")); KEG_LOCK(keg); KASSERT(keg->uk_pages == 0, ("uma_zone_set_fini on non-empty keg")); @@ -3100,7 +3100,7 @@ uma_zone_set_freef(uma_zone_t zone, uma_ uma_keg_t keg; keg = zone_first_keg(zone); - KASSERT(keg != NULL, ("uma_zone_set_init: Invalid zone type")); + KASSERT(keg != NULL, ("uma_zone_set_freef: Invalid zone type")); KEG_LOCK(keg); keg->uk_freef = freef; KEG_UNLOCK(keg); From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 18:37:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 600673F4; Sun, 5 Apr 2015 18:37:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4E8D5E; Sun, 5 Apr 2015 18:37:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35IbfDE085908; Sun, 5 Apr 2015 18:37:41 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35Ibdpj085896; Sun, 5 Apr 2015 18:37:39 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504051837.t35Ibdpj085896@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 5 Apr 2015 18:37:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281114 - in head/sys/boot/efi: . loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 18:37:41 -0000 Author: andrew Date: Sun Apr 5 18:37:39 2015 New Revision: 281114 URL: https://svnweb.freebsd.org/changeset/base/281114 Log: Add FDT support to loader.efi. This will be used on arm and arm64. Differential Revision: https://reviews.freebsd.org/D2219 Modified: head/sys/boot/efi/Makefile head/sys/boot/efi/loader/Makefile head/sys/boot/efi/loader/bootinfo.c head/sys/boot/efi/loader/main.c Modified: head/sys/boot/efi/Makefile ============================================================================== --- head/sys/boot/efi/Makefile Sun Apr 5 18:25:23 2015 (r281113) +++ head/sys/boot/efi/Makefile Sun Apr 5 18:37:39 2015 (r281114) @@ -1,7 +1,15 @@ # $FreeBSD$ +.include + SUBDIR= libefi +.if ${TARGET_CPUARCH} == "aarch64" || ${TARGET_CPUARCH} == "arm" +.if ${MK_FDT} != "no" +SUBDIR+= fdt +.endif +.endif + .if ${MACHINE_CPUARCH} == "amd64" SUBDIR+= loader boot1 .endif Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Sun Apr 5 18:25:23 2015 (r281113) +++ head/sys/boot/efi/loader/Makefile Sun Apr 5 18:37:39 2015 (r281114) @@ -42,6 +42,15 @@ CFLAGS+= -I${.CURDIR}/../../ficl/${MACHI LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif +LOADER_FDT_SUPPORT?= no +.if ${MK_FDT} != "no" && ${LOADER_FDT_SUPPORT} != "no" +CFLAGS+= -I${.CURDIR}/../../fdt +CFLAGS+= -I${.OBJDIR}/../../fdt +CFLAGS+= -DLOADER_FDT_SUPPORT +LIBEFI_FDT= ${.OBJDIR}/../../efi/fdt/libefi_fdt.a +LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a +.endif + # Include bcache code. HAVE_BCACHE= yes @@ -88,8 +97,9 @@ loader.efi: loader.sym LIBEFI= ${.OBJDIR}/../libefi/libefi.a -DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} ${LDSCRIPT} -LDADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} +DPADD= ${LIBFICL} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSTAND} \ + ${LDSCRIPT} +LDADD= ${LIBFICL} ${LIBEFI} ${LIBFDT} ${LIBEFI_FDT} ${LIBSTAND} .endif # ${COMPILER_TYPE} != "gcc" Modified: head/sys/boot/efi/loader/bootinfo.c ============================================================================== --- head/sys/boot/efi/loader/bootinfo.c Sun Apr 5 18:25:23 2015 (r281113) +++ head/sys/boot/efi/loader/bootinfo.c Sun Apr 5 18:37:39 2015 (r281114) @@ -51,6 +51,10 @@ __FBSDID("$FreeBSD$"); #include "framebuffer.h" #endif +#if defined(LOADER_FDT_SUPPORT) +#include +#endif + UINTN efi_mapkey; static const char howto_switches[] = "aCdrgDmphsv"; @@ -324,6 +328,10 @@ bi_load(char *args, vm_offset_t *modulep vm_offset_t size; char *rootdevname; int howto; +#if defined(LOADER_FDT_SUPPORT) + vm_offset_t dtbp; + int dtb_size; +#endif howto = bi_getboothowto(args); @@ -358,6 +366,16 @@ bi_load(char *args, vm_offset_t *modulep /* Pad to a page boundary. */ addr = roundup(addr, PAGE_SIZE); +#if defined(LOADER_FDT_SUPPORT) + /* Handle device tree blob */ + dtbp = addr; + dtb_size = fdt_copy(addr); + + /* Pad to a page boundary */ + if (dtb_size) + addr += roundup(dtb_size, PAGE_SIZE); +#endif + kfp = file_findfile(NULL, "elf kernel"); if (kfp == NULL) kfp = file_findfile(NULL, "elf64 kernel"); @@ -366,6 +384,13 @@ bi_load(char *args, vm_offset_t *modulep kernend = 0; /* fill it in later */ file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto); file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp); +#if defined(LOADER_FDT_SUPPORT) + if (dtb_size) + file_addmetadata(kfp, MODINFOMD_DTBP, sizeof dtbp, &dtbp); + else + pager_output("WARNING! Trying to fire up the kernel, but no " + "device tree blob found!\n"); +#endif file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); bi_load_efi_data(kfp); Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Sun Apr 5 18:25:23 2015 (r281113) +++ head/sys/boot/efi/loader/main.c Sun Apr 5 18:37:39 2015 (r281114) @@ -387,3 +387,22 @@ command_nvram(int argc, char *argv[]) return (CMD_OK); } + +#ifdef LOADER_FDT_SUPPORT +extern int command_fdt_internal(int argc, char *argv[]); + +/* + * Since proper fdt command handling function is defined in fdt_loader_cmd.c, + * and declaring it as extern is in contradiction with COMMAND_SET() macro + * (which uses static pointer), we're defining wrapper function, which + * calls the proper fdt handling routine. + */ +static int +command_fdt(int argc, char *argv[]) +{ + + return (command_fdt_internal(argc, argv)); +} + +COMMAND_SET(fdt, "fdt", "flattened device tree handling", command_fdt); +#endif From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 18:39:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC296625; Sun, 5 Apr 2015 18:39:53 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51AD8D75; Sun, 5 Apr 2015 18:39:53 +0000 (UTC) Received: by wiaa2 with SMTP id a2so16170956wia.0; Sun, 05 Apr 2015 11:39:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=rmzGSOdD3+P3H4p2ceYo3TqQtMjlQqXVfF3YEqEvqoI=; b=rLnKdQh7DZ3XjZXp59SqcVAyI5y4TCpOyCuAO71Dpo9HCPT07WnkJLQdNTHoehYW71 T8QHJHyMYrxp3ubDsE8txELxfWAt8ZHWLihI0M5zkVLoejJNbCUjj/nYZLvx64UvNZcB ytWzCm9P3HCt/Mpr3YzvfYKtwxgX0bp034AqxVmfcauxA8XhyOrdR/0CCfo0F2udaEAk XaDjK/YimhlkRc9rENuKG0L7fSle+keeKrhFWiUQ2IYbveYAjr0WQmDZbSohziYm2MfX 1/Xlat6iyWRi1GUvOq/eOW4lRjIKqamCrF/bIptIdmjOrtwuOs7uhX9xGUXJEx8ROJ5Q 5+VA== X-Received: by 10.194.77.7 with SMTP id o7mr6668960wjw.95.1428259191594; Sun, 05 Apr 2015 11:39:51 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id pv2sm3312728wjc.33.2015.04.05.11.39.49 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 05 Apr 2015 11:39:50 -0700 (PDT) Date: Sun, 5 Apr 2015 20:39:47 +0200 From: Mateusz Guzik To: Dmitry Chagin Subject: Re: svn commit: r281113 - head/sys/vm Message-ID: <20150405183947.GA24293@dft-labs.eu> References: <201504051825.t35IPO7t078390@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201504051825.t35IPO7t078390@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 18:39:53 -0000 On Sun, Apr 05, 2015 at 06:25:24PM +0000, Dmitry Chagin wrote: > Author: dchagin > Date: Sun Apr 5 18:25:23 2015 > New Revision: 281113 > URL: https://svnweb.freebsd.org/changeset/base/281113 > > Log: > Fix wrong kassert msg in uma. > > PR: 199172 > Submitted by: luke.tw gmail com > MFC after: 1 week > > Modified: > head/sys/vm/uma_core.c > > Modified: head/sys/vm/uma_core.c > ============================================================================== > --- head/sys/vm/uma_core.c Sun Apr 5 17:09:58 2015 (r281112) > +++ head/sys/vm/uma_core.c Sun Apr 5 18:25:23 2015 (r281113) > @@ -3060,7 +3060,7 @@ uma_zone_set_fini(uma_zone_t zone, uma_f > uma_keg_t keg; > > keg = zone_first_keg(zone); > - KASSERT(keg != NULL, ("uma_zone_set_init: Invalid zone type")); > + KASSERT(keg != NULL, ("uma_zone_set_fini: Invalid zone type")); > KEG_LOCK(keg); > KASSERT(keg->uk_pages == 0, > ("uma_zone_set_fini on non-empty keg")); > @@ -3100,7 +3100,7 @@ uma_zone_set_freef(uma_zone_t zone, uma_ > uma_keg_t keg; > > keg = zone_first_keg(zone); > - KASSERT(keg != NULL, ("uma_zone_set_init: Invalid zone type")); > + KASSERT(keg != NULL, ("uma_zone_set_freef: Invalid zone type")); > KEG_LOCK(keg); > keg->uk_freef = freef; > KEG_UNLOCK(keg); > This seems to be a recurring problem (go figure). Was __func__ usage flamed over? I really think that linux's oops-like dump would be of great help here. It includes file + line info along with register dump which alone can give sufficient hints in several cases. -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 18:42:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0CF2794; Sun, 5 Apr 2015 18:42:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCF99E2C; Sun, 5 Apr 2015 18:42:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35Igh0J090290; Sun, 5 Apr 2015 18:42:43 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35IghGB090289; Sun, 5 Apr 2015 18:42:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504051842.t35IghGB090289@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 5 Apr 2015 18:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281115 - head/sys/boot/efi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 18:42:44 -0000 Author: andrew Date: Sun Apr 5 18:42:43 2015 New Revision: 281115 URL: https://svnweb.freebsd.org/changeset/base/281115 Log: Spell MACHINE_CPUARCH correctly Modified: head/sys/boot/efi/Makefile Modified: head/sys/boot/efi/Makefile ============================================================================== --- head/sys/boot/efi/Makefile Sun Apr 5 18:37:39 2015 (r281114) +++ head/sys/boot/efi/Makefile Sun Apr 5 18:42:43 2015 (r281115) @@ -4,7 +4,7 @@ SUBDIR= libefi -.if ${TARGET_CPUARCH} == "aarch64" || ${TARGET_CPUARCH} == "arm" +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" .if ${MK_FDT} != "no" SUBDIR+= fdt .endif From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 18:53:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3617EA30; Sun, 5 Apr 2015 18:53:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08BF0F13; Sun, 5 Apr 2015 18:53:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35IrnaE095175; Sun, 5 Apr 2015 18:53:49 GMT (envelope-from rakuco@FreeBSD.org) Received: (from rakuco@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35IrnGd095174; Sun, 5 Apr 2015 18:53:49 GMT (envelope-from rakuco@FreeBSD.org) Message-Id: <201504051853.t35IrnGd095174@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rakuco set sender to rakuco@FreeBSD.org using -f From: Raphael Kubo da Costa Date: Sun, 5 Apr 2015 18:53:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281116 - head/usr.sbin/bluetooth/bthidd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 18:53:50 -0000 Author: rakuco (ports committer) Date: Sun Apr 5 18:53:48 2015 New Revision: 281116 URL: https://svnweb.freebsd.org/changeset/base/281116 Log: bthidd: Consider usage ranges when dealing with array inputs. So far, we were always using HID_USAGE() to determine the Usage ID of a certain HID report input item. This does not work as intended if a field is an array and the allowed usages are specified with a usage range, as HID_USAGE() will return 0. We need to use the field value as an index in the usage range list in this case instead. This makes the volume keys in a Microsoft Bluetooth Mobile Keyboard 5000 be properly recognized. The relevant part of the HID report looks like this: 0xA1, 0x01, // Collection (Application) 0x85, 0x07, // Report ID (7) 0x05, 0x0C, // Usage Page (Consumer) 0x19, 0x00, // Usage Minimum (Unassigned) 0x2A, 0xFF, 0x03, // Usage Maximum (0x03FF) 0x95, 0x01, // Report Count (1) 0x75, 0x10, // Report Size (16) 0x15, 0x00, // Logical Minimum (0) 0x27, 0xFF, 0x03, 0x00, 0x00, // Logical Maximum (1023) 0x81, 0x00, // Input (Data,Array,Abs,No Wrap,Linear,Preferred // State,No Null Position) When a key such as "volume down" is pressed, the following data is transferred through Interrupt In: 0x07 0xEA 0x00 Differential Revision: https://reviews.freebsd.org/D2229 Reviewed by: emax Approved by: emax MFC after: 1 week Modified: head/usr.sbin/bluetooth/bthidd/hid.c Modified: head/usr.sbin/bluetooth/bthidd/hid.c ============================================================================== --- head/usr.sbin/bluetooth/bthidd/hid.c Sun Apr 5 18:42:43 2015 (r281115) +++ head/usr.sbin/bluetooth/bthidd/hid.c Sun Apr 5 18:53:48 2015 (r281116) @@ -165,9 +165,21 @@ hid_interrupt(bthid_session_p s, uint8_t continue; page = HID_PAGE(h.usage); - usage = HID_USAGE(h.usage); val = hid_get_data(data, &h); + /* + * When the input field is an array and the usage is specified + * with a range instead of an ID, we have to derive the actual + * usage by using the item value as an index in the usage range + * list. + */ + if ((h.flags & HIO_VARIABLE)) { + usage = HID_USAGE(h.usage); + } else { + const uint32_t usage_offset = val - h.logical_minimum; + usage = HID_USAGE(h.usage_minimum + usage_offset); + } + switch (page) { case HUP_GENERIC_DESKTOP: switch (usage) { From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 18:54:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCCF3C15; Sun, 5 Apr 2015 18:54:29 +0000 (UTC) Received: from dchagin.static.corbina.net (dchagin.static.corbina.ru [78.107.232.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "dchagin.static.corbina.net", Issuer "dchagin.static.corbina.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 43774F2D; Sun, 5 Apr 2015 18:54:28 +0000 (UTC) Received: from dchagin.static.corbina.net (localhost [127.0.0.1]) by dchagin.static.corbina.net (8.14.9/8.14.9) with ESMTP id t35IsJa7046101 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 5 Apr 2015 21:54:20 +0300 (MSK) (envelope-from dchagin@dchagin.static.corbina.net) Received: (from dchagin@localhost) by dchagin.static.corbina.net (8.14.9/8.14.9/Submit) id t35IsJN2046100; Sun, 5 Apr 2015 21:54:19 +0300 (MSK) (envelope-from dchagin) Date: Sun, 5 Apr 2015 21:54:19 +0300 From: Chagin Dmitry To: Mateusz Guzik Subject: Re: svn commit: r281113 - head/sys/vm Message-ID: <20150405185419.GA46092@dchagin.static.corbina.net> References: <201504051825.t35IPO7t078390@svn.freebsd.org> <20150405183947.GA24293@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150405183947.GA24293@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 18:54:29 -0000 On Sun, Apr 05, 2015 at 08:39:47PM +0200, Mateusz Guzik wrote: > On Sun, Apr 05, 2015 at 06:25:24PM +0000, Dmitry Chagin wrote: > > Author: dchagin > > Date: Sun Apr 5 18:25:23 2015 > > New Revision: 281113 > > URL: https://svnweb.freebsd.org/changeset/base/281113 > > > > Log: > > Fix wrong kassert msg in uma. > > > > PR: 199172 > > Submitted by: luke.tw gmail com > > MFC after: 1 week > > > > Modified: > > head/sys/vm/uma_core.c > > > > Modified: head/sys/vm/uma_core.c > > ============================================================================== > > --- head/sys/vm/uma_core.c Sun Apr 5 17:09:58 2015 (r281112) > > +++ head/sys/vm/uma_core.c Sun Apr 5 18:25:23 2015 (r281113) > > @@ -3060,7 +3060,7 @@ uma_zone_set_fini(uma_zone_t zone, uma_f > > uma_keg_t keg; > > > > keg = zone_first_keg(zone); > > - KASSERT(keg != NULL, ("uma_zone_set_init: Invalid zone type")); > > + KASSERT(keg != NULL, ("uma_zone_set_fini: Invalid zone type")); > > KEG_LOCK(keg); > > KASSERT(keg->uk_pages == 0, > > ("uma_zone_set_fini on non-empty keg")); > > @@ -3100,7 +3100,7 @@ uma_zone_set_freef(uma_zone_t zone, uma_ > > uma_keg_t keg; > > > > keg = zone_first_keg(zone); > > - KASSERT(keg != NULL, ("uma_zone_set_init: Invalid zone type")); > > + KASSERT(keg != NULL, ("uma_zone_set_freef: Invalid zone type")); > > KEG_LOCK(keg); > > keg->uk_freef = freef; > > KEG_UNLOCK(keg); > > > > This seems to be a recurring problem (go figure). > > Was __func__ usage flamed over? > > I really think that linux's oops-like dump would be of great help here. > It includes file + line info along with register dump which alone can > give sufficient hints in several cases. > finally, kassert prints backtrace. also feel free to set debug.kassert.do_kdb. -- Have fun! chd From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 18:57:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AEBAE53; Sun, 5 Apr 2015 18:57:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66EDCF4C; Sun, 5 Apr 2015 18:57:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35Ivxen095864; Sun, 5 Apr 2015 18:57:59 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35IvxZs095863; Sun, 5 Apr 2015 18:57:59 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504051857.t35IvxZs095863@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 5 Apr 2015 18:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281117 - head/sys/boot/efi/boot1 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 18:57:59 -0000 Author: andrew Date: Sun Apr 5 18:57:58 2015 New Revision: 281117 URL: https://svnweb.freebsd.org/changeset/base/281117 Log: Move boot1.efi to the global CLEANFILES list, it's not x86 specific. Modified: head/sys/boot/efi/boot1/Makefile Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Sun Apr 5 18:53:48 2015 (r281116) +++ head/sys/boot/efi/boot1/Makefile Sun Apr 5 18:57:58 2015 (r281117) @@ -71,7 +71,7 @@ boot1.efifat: boot1.efi bzip2 -f -d ${.TARGET}.bz2 dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc -CLEANFILES= boot1.efifat +CLEANFILES= boot1.efi boot1.efifat .endif # ${COMPILER_TYPE} != "gcc" @@ -80,7 +80,7 @@ CLEANFILES= boot1.efifat .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" beforedepend ${OBJS}: machine x86 -CLEANFILES+= machine x86 boot1.efi +CLEANFILES+= machine x86 machine: ln -sf ${.CURDIR}/../../../amd64/include machine From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 19:06:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 360A025A; Sun, 5 Apr 2015 19:06:26 +0000 (UTC) Received: from kazon.borderworlds.dk (kazon-old.borderworlds.dk [IPv6:2a01:4f8:201:220c::1:1]) by mx1.freebsd.org (Postfix) with ESMTP id EE4CB97; Sun, 5 Apr 2015 19:06:25 +0000 (UTC) Received: from sona.borderworlds.dk (localhost [127.0.0.1]) by kazon.borderworlds.dk (Postfix) with ESMTP id 1F7352E04E; Sun, 5 Apr 2015 21:06:15 +0200 (CEST) Message-ID: <552187A6.2030803@borderworlds.dk> Date: Sun, 05 Apr 2015 21:06:14 +0200 From: Christian Laursen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Peter Grehan , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r272481 - head/usr.sbin/bhyve References: <201410031727.s93HRVnH084592@svn.freebsd.org> In-Reply-To: <201410031727.s93HRVnH084592@svn.freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 19:06:26 -0000 On 10/03/14 19:27, Peter Grehan wrote: > Author: grehan > Date: Fri Oct 3 17:27:30 2014 > New Revision: 272481 > URL: https://svnweb.freebsd.org/changeset/base/272481 > > Log: > Add new fields in the FADT, required by IASL 20140926-64. > > The new IASL from the recent acpi-ca import will error out > if it doesn't see these new fields, which were previously > reserved. Please MFC this to stable/10. Thanks. -- Christian Laursen From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 20:07:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F56FEAF; Sun, 5 Apr 2015 20:07:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B48883D; Sun, 5 Apr 2015 20:07:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35K7YeV029896; Sun, 5 Apr 2015 20:07:34 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35K7YTx029895; Sun, 5 Apr 2015 20:07:34 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201504052007.t35K7YTx029895@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 5 Apr 2015 20:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281118 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 20:07:34 -0000 Author: alc Date: Sun Apr 5 20:07:33 2015 New Revision: 281118 URL: https://svnweb.freebsd.org/changeset/base/281118 Log: Until the lock assertions in vm_page_advise() are properly reevaluated, vm_fault_dontneed() should acquire a write lock on the first object in the shadow chain. Reported by: gleb, David Wolfskill Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sun Apr 5 18:57:58 2015 (r281117) +++ head/sys/vm/vm_fault.c Sun Apr 5 20:07:33 2015 (r281118) @@ -1060,9 +1060,9 @@ vm_fault_dontneed(const struct faultstat VM_OBJECT_ASSERT_WLOCKED(object); first_object = fs->first_object; if (first_object != object) { - if (!VM_OBJECT_TRYRLOCK(first_object)) { + if (!VM_OBJECT_TRYWLOCK(first_object)) { VM_OBJECT_WUNLOCK(object); - VM_OBJECT_RLOCK(first_object); + VM_OBJECT_WLOCK(first_object); VM_OBJECT_WLOCK(object); } } @@ -1097,7 +1097,7 @@ vm_fault_dontneed(const struct faultstat } } if (first_object != object) - VM_OBJECT_RUNLOCK(first_object); + VM_OBJECT_WUNLOCK(first_object); } /* From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 20:56:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98B4F8C1; Sun, 5 Apr 2015 20:56:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A02AC97; Sun, 5 Apr 2015 20:56:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35KuqiY053540; Sun, 5 Apr 2015 20:56:52 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35Kuqff053539; Sun, 5 Apr 2015 20:56:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504052056.t35Kuqff053539@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 5 Apr 2015 20:56:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281119 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 20:56:52 -0000 Author: adrian Date: Sun Apr 5 20:56:51 2015 New Revision: 281119 URL: https://svnweb.freebsd.org/changeset/base/281119 Log: Update the board MAC address configuration for the DIR-655A1. The MAC addresses were totally wrong. They're like the DIR-625C1 - at 0x1ffe0004 and 0x1ffe0018. They're however stored as text strings. The ath0 MAC address is also not set, even though the calibration partition is valid. So, pick the board address / first MAC as the ath0 MAC, and derive arge0/arge1 from that. That way they're hopefully unique enough for people with multiple devices. Tested: * DIR-655A1 TODO: * Do the same for the DIR-625A1 and DIR-625C1. Modified: head/sys/mips/conf/DIR-655A1.hints Modified: head/sys/mips/conf/DIR-655A1.hints ============================================================================== --- head/sys/mips/conf/DIR-655A1.hints Sun Apr 5 20:07:33 2015 (r281118) +++ head/sys/mips/conf/DIR-655A1.hints Sun Apr 5 20:56:51 2015 (r281119) @@ -7,6 +7,32 @@ # QCA955X_ETH_CFG_RGMII_EN (1 << 0) hint.qca955x_gmac.0.gmac_cfg=0x1 +# Use this to derive ath0 from arge0 MAC address. +# 0x1ffe0004 is the arge0 MAC; but it's also the "unit MAC". +# So make that the ath0 MAC, and make arge0 -1 from that. +# ath0: offset 0 +# arge0: offset -1 +# arge1: use +1 from the arge0 MAC, even though +# there's a secondary MAC address configured in EEPROM +# at 0x1ffe0018. +hint.ar71xx.0.eeprom_mac_addr=0x1ffe0004 +hint.ar71xx.0.eeprom_mac_isascii=1 + +hint.ar71xx_mac_map.0.devid=ath +hint.ar71xx_mac_map.0.unitid=0 +hint.ar71xx_mac_map.0.offset=0 +hint.ar71xx_mac_map.0.is_local=0 + +hint.ar71xx_mac_map.1.devid=arge +hint.ar71xx_mac_map.1.unitid=0 +hint.ar71xx_mac_map.1.offset=-1 +hint.ar71xx_mac_map.1.is_local=0 + +hint.ar71xx_mac_map.2.devid=arge +hint.ar71xx_mac_map.2.unitid=1 +hint.ar71xx_mac_map.2.offset=1 +hint.ar71xx_mac_map.2.is_local=0 + # mdiobus0 on arge0 hint.argemdio.0.at="nexus0" hint.argemdio.0.maddr=0x19000000 @@ -91,9 +117,8 @@ hint.arge.0.miimode=3 # RGMII hint.arge.0.media=1000 hint.arge.0.fduplex=1 hint.arge.0.pll_1000=0x56000000 - -# MAC for arge0 is the first 6 bytes of the ART -hint.arge.0.eeprommac=0x1fff0000 +# hint.arge.0.eeprommac=0x1ffe0004 +# hint.arge.0.readascii=1 # arge1 - lock up to 1000/full hint.arge.1.phymask=0x0 @@ -101,11 +126,12 @@ hint.arge.1.media=1000 hint.arge.1.fduplex=1 hint.arge.1.miimode=5 # SGMII hint.arge.1.pll_1000=0x03000101 - -# MAC for arge1 is the second 6 bytes of the ART -hint.arge.1.eeprommac=0x1fff0006 +#hint.arge.1.eeprommac=0x1ffe0018 +#hint.arge.1.readascii=1 # ath0: Where the ART is - last 64k in the flash +# Note: ath0 MAC is default (00:11:22:33:44:55) and thus +# requires replacing via the board MAC address map. hint.ath.0.eepromaddr=0x1fff0000 hint.ath.0.eepromsize=16384 From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 21:08:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 391D5F46; Sun, 5 Apr 2015 21:08:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24533E46; Sun, 5 Apr 2015 21:08:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35L85Ms058466; Sun, 5 Apr 2015 21:08:05 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35L84jl058465; Sun, 5 Apr 2015 21:08:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504052108.t35L84jl058465@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 5 Apr 2015 21:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281120 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 21:08:05 -0000 Author: kib Date: Sun Apr 5 21:08:04 2015 New Revision: 281120 URL: https://svnweb.freebsd.org/changeset/base/281120 Log: Assert that an msdosfs mount is not read-only when FAT modifications are requested. PR: 199152 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/msdosfs/msdosfs_fat.c Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Sun Apr 5 20:56:51 2015 (r281119) +++ head/sys/fs/msdosfs/msdosfs_fat.c Sun Apr 5 21:08:04 2015 (r281120) @@ -380,6 +380,8 @@ usemap_alloc(struct msdosfsmount *pmp, u MSDOSFS_ASSERT_MP_LOCKED(pmp); + KASSERT((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0, + ("usemap_alloc on ro msdosfs mount")); KASSERT((pmp->pm_inusemap[cn / N_INUSEBITS] & (1 << (cn % N_INUSEBITS))) == 0, ("Allocating used sector %ld %ld %x", cn, cn % N_INUSEBITS, (unsigned)pmp->pm_inusemap[cn / N_INUSEBITS])); @@ -394,6 +396,8 @@ usemap_free(struct msdosfsmount *pmp, u_ { MSDOSFS_ASSERT_MP_LOCKED(pmp); + KASSERT((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0, + ("usemap_free on ro msdosfs mount")); pmp->pm_freeclustercount++; pmp->pm_flags |= MSDOSFS_FSIMOD; KASSERT((pmp->pm_inusemap[cn / N_INUSEBITS] & (1 << (cn % N_INUSEBITS))) @@ -675,6 +679,8 @@ chainalloc(struct msdosfsmount *pmp, u_l u_long cl, n; MSDOSFS_ASSERT_MP_LOCKED(pmp); + KASSERT((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0, + ("chainalloc on ro msdosfs mount")); for (cl = start, n = count; n-- > 0;) usemap_alloc(pmp, cl++); From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 21:10:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B394196; Sun, 5 Apr 2015 21:10:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86F01E5C; Sun, 5 Apr 2015 21:10:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35LAdMZ059470; Sun, 5 Apr 2015 21:10:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35LAdRW059469; Sun, 5 Apr 2015 21:10:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504052110.t35LAdRW059469@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 5 Apr 2015 21:10:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281121 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 21:10:39 -0000 Author: kib Date: Sun Apr 5 21:10:38 2015 New Revision: 281121 URL: https://svnweb.freebsd.org/changeset/base/281121 Log: Do not call msdosfs_sync() on the read-only msdosfs mounts. In fact, it should be a nop for ro. PR: 199152 Reviewed by: bde (PR version of the patch) Submitted by: longwitz@incore.de MFC after: 1 week Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Apr 5 21:08:04 2015 (r281120) +++ head/sys/fs/msdosfs/msdosfs_vfsops.c Sun Apr 5 21:10:38 2015 (r281121) @@ -796,17 +796,17 @@ msdosfs_unmount(struct mount *mp, int mn struct msdosfsmount *pmp; int error, flags; - flags = 0; - error = msdosfs_sync(mp, MNT_WAIT); - if ((mntflags & MNT_FORCE) != 0) { + error = flags = 0; + pmp = VFSTOMSDOSFS(mp); + if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0) + error = msdosfs_sync(mp, MNT_WAIT); + if ((mntflags & MNT_FORCE) != 0) flags |= FORCECLOSE; - } else if (error != 0) { + else if (error != 0) return (error); - } error = vflush(mp, 0, flags, curthread); if (error != 0 && error != ENXIO) return (error); - pmp = VFSTOMSDOSFS(mp); if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0) { error = markvoldirty(pmp, 0); if (error && error != ENXIO) { From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 22:00:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E2ACE17; Sun, 5 Apr 2015 22:00:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7968B350; Sun, 5 Apr 2015 22:00:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35M0jt7087919; Sun, 5 Apr 2015 22:00:45 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35M0jur087918; Sun, 5 Apr 2015 22:00:45 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504052200.t35M0jur087918@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 5 Apr 2015 22:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281122 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 22:00:45 -0000 Author: adrian Date: Sun Apr 5 22:00:44 2015 New Revision: 281122 URL: https://svnweb.freebsd.org/changeset/base/281122 Log: Convert the DIR-825C1 to use the new map based MAC address configuration. Tested: * DIR-825C1 Modified: head/sys/mips/conf/DIR-825C1.hints Modified: head/sys/mips/conf/DIR-825C1.hints ============================================================================== --- head/sys/mips/conf/DIR-825C1.hints Sun Apr 5 21:10:38 2015 (r281121) +++ head/sys/mips/conf/DIR-825C1.hints Sun Apr 5 22:00:44 2015 (r281122) @@ -1,13 +1,37 @@ # $FreeBSD$ -# This is a placeholder until the hardware support is complete. - # mdiobus0 on arge0 hint.argemdio.0.at="nexus0" hint.argemdio.0.maddr=0x19000000 hint.argemdio.0.msize=0x1000 hint.argemdio.0.order=0 +# 0x1ffe0004 is the the "unit MAC". +# 0x1ffe0018 is the second "MAC". +# Right now this doesn't have any option for more than one +# "unit MACs", so: +# ath0: unit MAC +# ath1: unit MAC + 1 +# arge0: unit MAC + 2 +# arge1: leave as default; not used. +hint.ar71xx.0.eeprom_mac_addr=0x1ffe0004 +hint.ar71xx.0.eeprom_mac_isascii=1 + +hint.ar71xx_mac_map.0.devid=ath +hint.ar71xx_mac_map.0.unitid=0 +hint.ar71xx_mac_map.0.offset=0 +hint.ar71xx_mac_map.0.is_local=0 + +hint.ar71xx_mac_map.1.devid=ath +hint.ar71xx_mac_map.1.unitid=1 +hint.ar71xx_mac_map.1.offset=1 +hint.ar71xx_mac_map.1.is_local=0 + +hint.ar71xx_mac_map.2.devid=arge +hint.ar71xx_mac_map.2.unitid=0 +hint.ar71xx_mac_map.2.offset=2 +hint.ar71xx_mac_map.2.is_local=0 + # DIR-825C1 GMAC configuration # + AR934X_ETH_CFG_RGMII_GMAC0 (1 << 0) # Onboard AR9344 10/100 switch is not wired up From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 22:22:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B33D28E; Sun, 5 Apr 2015 22:22:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D18E7E2; Sun, 5 Apr 2015 22:22:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35MMk3Y098859; Sun, 5 Apr 2015 22:22:46 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35MMiQm098849; Sun, 5 Apr 2015 22:22:44 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504052222.t35MMiQm098849@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 5 Apr 2015 22:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281123 - head/usr.bin/sort X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 22:22:46 -0000 Author: pfg Date: Sun Apr 5 22:22:43 2015 New Revision: 281123 URL: https://svnweb.freebsd.org/changeset/base/281123 Log: sort: Cleanup small issues with spaces. Obtained from: OpenBSD Modified: head/usr.bin/sort/coll.c head/usr.bin/sort/file.c head/usr.bin/sort/file.h head/usr.bin/sort/radixsort.c head/usr.bin/sort/sort.1.in head/usr.bin/sort/vsort.c Modified: head/usr.bin/sort/coll.c ============================================================================== --- head/usr.bin/sort/coll.c Sun Apr 5 22:00:44 2015 (r281122) +++ head/usr.bin/sort/coll.c Sun Apr 5 22:22:43 2015 (r281123) @@ -78,7 +78,7 @@ keys_array_alloc(void) } /* - * Calculate whether we need key hint space + * Calculate whether we need key hint space */ static size_t key_hint_size(void) @@ -595,12 +595,12 @@ list_coll(struct sort_list_item **ss1, s return (list_coll_offset(ss1, ss2, 0)); } -#define LSCDEF(N) \ -static int \ -list_coll_##N(struct sort_list_item **ss1, struct sort_list_item **ss2) \ -{ \ - \ - return (list_coll_offset(ss1, ss2, N)); \ +#define LSCDEF(N) \ +static int \ +list_coll_##N(struct sort_list_item **ss1, struct sort_list_item **ss2) \ +{ \ + \ + return (list_coll_offset(ss1, ss2, N)); \ } LSCDEF(1) Modified: head/usr.bin/sort/file.c ============================================================================== --- head/usr.bin/sort/file.c Sun Apr 5 22:00:44 2015 (r281122) +++ head/usr.bin/sort/file.c Sun Apr 5 22:22:43 2015 (r281123) @@ -1127,7 +1127,7 @@ file_headers_merge(size_t fnum, struct f memset(&lp, 0, sizeof(lp)); /* - * construct the initial sort structure + * construct the initial sort structure */ for (i = 0; i < fnum; i++) file_header_list_push(fh[i], fh, i); Modified: head/usr.bin/sort/file.h ============================================================================== --- head/usr.bin/sort/file.h Sun Apr 5 22:00:44 2015 (r281122) +++ head/usr.bin/sort/file.h Sun Apr 5 22:22:43 2015 (r281123) @@ -55,7 +55,7 @@ struct sort_list }; /* - * File reader object + * File reader object */ struct file_reader; Modified: head/usr.bin/sort/radixsort.c ============================================================================== --- head/usr.bin/sort/radixsort.c Sun Apr 5 22:00:44 2015 (r281122) +++ head/usr.bin/sort/radixsort.c Sun Apr 5 22:22:43 2015 (r281123) @@ -129,7 +129,7 @@ have_sort_left(void) * Push sort level to the stack */ static inline void -push_ls(struct sort_level* sl) +push_ls(struct sort_level *sl) { struct level_stack *new_ls; @@ -231,7 +231,6 @@ add_to_sublevel(struct sort_level *sl, s static inline void add_leaf(struct sort_level *sl, struct sort_list_item *item) { - if (++(sl->leaves_num) > sl->leaves_sz) { sl->leaves_sz = sl->leaves_num + 128; sl->leaves = sort_realloc(sl->leaves, Modified: head/usr.bin/sort/sort.1.in ============================================================================== --- head/usr.bin/sort/sort.1.in Sun Apr 5 22:00:44 2015 (r281122) +++ head/usr.bin/sort/sort.1.in Sun Apr 5 22:22:43 2015 (r281123) @@ -1,4 +1,4 @@ -.\" $OpenBSD: sort.1,v 1.31 2007/08/21 21:22:37 millert Exp $ +.\" $OpenBSD: sort.1,v 1.45 2015/03/19 13:51:10 jmc Exp $ .\" $FreeBSD$ .\" .\" Copyright (c) 1991, 1993 @@ -33,7 +33,7 @@ .\" .\" @(#)sort.1 8.1 (Berkeley) 6/6/93 .\" -.Dd July 3, 2012 +.Dd March 19 2015 .Dt SORT 1 .Os .Sh NAME @@ -160,9 +160,10 @@ before comparison, that is, perform case Sort by general numerical value. As opposed to .Fl n , -this option handles general floating points, which have a much -permissive format than those allowed by -. Fl n , +this option handles general floating points. +It has a more +permissive format than that allowed by +.Fl n but it has a significant performance drawback. .It Fl h, Fl Fl human-numeric-sort, Fl Fl sort=human-numeric Sort by numerical value, but take into account the SI suffix, @@ -247,9 +248,8 @@ can be attached independently to each argument of the key specifications. .Fl b . .It Xo -.Sm off -.Fl k\ \& Ar field1 Op , Ar field2 , Fl Fl key Ns = Ns Ar field1 Op , Ar field2 -.Sm on +.Fl k Ar field1 Ns Op , Ns Ar field2 , +.Fl Fl key Ns = Ns Ar field1 Ns Op , Ns Ar field2 .Xc Define a restricted sort key that has the starting position .Ar field1 , @@ -334,7 +334,7 @@ standard output. %%THREADS%%Default number equals to the number of CPUs. .It Fl Fl files0-from Ns = Ns Ar filename Take the input file list from the file -.Ar filename. +.Ar filename . The file names must be separated by NUL (like the output produced by the command "find ... -print0"). .It Fl Fl radixsort Modified: head/usr.bin/sort/vsort.c ============================================================================== --- head/usr.bin/sort/vsort.c Sun Apr 5 22:00:44 2015 (r281122) +++ head/usr.bin/sort/vsort.c Sun Apr 5 22:22:43 2015 (r281123) @@ -40,21 +40,18 @@ __FBSDID("$FreeBSD$"); static inline bool isdigit_clocale(wchar_t c) { - return (c >= L'0' && c <= L'9'); } static inline bool isalpha_clocale(wchar_t c) { - return ((c >= L'a' && c <= L'z') || (c >= L'A' && c <= L'Z')); } static inline bool isalnum_clocale(wchar_t c) { - return ((c >= L'a' && c <= L'z') || (c >= L'A' && c <= L'Z') || (c >= L'0' && c <= L'9')); } @@ -115,7 +112,6 @@ find_suffix(bwstring_iterator si, bwstri static inline int cmp_chars(wchar_t c1, wchar_t c2) { - if (c1 == c2) return (0); From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 22:34:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89449581; Sun, 5 Apr 2015 22:34:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7542D8C0; Sun, 5 Apr 2015 22:34:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35MY4Ri003992; Sun, 5 Apr 2015 22:34:04 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35MY4Mr003991; Sun, 5 Apr 2015 22:34:04 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504052234.t35MY4Mr003991@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 5 Apr 2015 22:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281124 - head/usr.bin/sort X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 22:34:04 -0000 Author: pfg Date: Sun Apr 5 22:34:03 2015 New Revision: 281124 URL: https://svnweb.freebsd.org/changeset/base/281124 Log: sort: Fix a comment. Obtained from: OpenBSD Modified: head/usr.bin/sort/bwstring.c Modified: head/usr.bin/sort/bwstring.c ============================================================================== --- head/usr.bin/sort/bwstring.c Sun Apr 5 22:22:43 2015 (r281123) +++ head/usr.bin/sort/bwstring.c Sun Apr 5 22:34:03 2015 (r281124) @@ -234,7 +234,7 @@ bwsdup(const struct bwstring *s) } /* - * Create a new binary string from a raw binary buffer. + * Create a new binary string from a wide character buffer. */ struct bwstring * bwssbdup(const wchar_t *str, size_t len) From owner-svn-src-head@FreeBSD.ORG Sun Apr 5 23:06:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97AE69CF; Sun, 5 Apr 2015 23:06:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 829B3B9D; Sun, 5 Apr 2015 23:06:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35N6j7d018222; Sun, 5 Apr 2015 23:06:45 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35N6hbP018212; Sun, 5 Apr 2015 23:06:43 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504052306.t35N6hbP018212@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 5 Apr 2015 23:06:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281125 - head/usr.bin/sort X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 23:06:45 -0000 Author: pfg Date: Sun Apr 5 23:06:42 2015 New Revision: 281125 URL: https://svnweb.freebsd.org/changeset/base/281125 Log: sort: style knits / cleanups. Obtained from: OpenBSD Modified: head/usr.bin/sort/bwstring.c head/usr.bin/sort/coll.c head/usr.bin/sort/file.c head/usr.bin/sort/mem.c head/usr.bin/sort/radixsort.c head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/bwstring.c ============================================================================== --- head/usr.bin/sort/bwstring.c Sun Apr 5 22:34:03 2015 (r281124) +++ head/usr.bin/sort/bwstring.c Sun Apr 5 23:06:42 2015 (r281125) @@ -147,7 +147,6 @@ wide_str_coll(const wchar_t *s1, const w void bwsprintf(FILE *f, struct bwstring *bws, const char *prefix, const char *suffix) { - if (MB_CUR_MAX == 1) fprintf(f, "%s%s%s", prefix, bws->data.cstr, suffix); else @@ -156,20 +155,17 @@ bwsprintf(FILE *f, struct bwstring *bws, const void* bwsrawdata(const struct bwstring *bws) { - return (&(bws->data)); } size_t bwsrawlen(const struct bwstring *bws) { - return ((MB_CUR_MAX == 1) ? bws->len : SIZEOF_WCHAR_STRING(bws->len)); } size_t bws_memsize(const struct bwstring *bws) { - return ((MB_CUR_MAX == 1) ? (bws->len + 2 + sizeof(struct bwstring)) : (SIZEOF_WCHAR_STRING(bws->len + 1) + sizeof(struct bwstring))); } @@ -177,7 +173,6 @@ bws_memsize(const struct bwstring *bws) void bws_setlen(struct bwstring *bws, size_t newlen) { - if (bws && newlen != bws->len && newlen <= bws->len) { bws->len = newlen; if (MB_CUR_MAX == 1) @@ -217,7 +212,6 @@ bwsalloc(size_t sz) struct bwstring * bwsdup(const struct bwstring *s) { - if (s == NULL) return (NULL); else { @@ -239,7 +233,6 @@ bwsdup(const struct bwstring *s) struct bwstring * bwssbdup(const wchar_t *str, size_t len) { - if (str == NULL) return ((len == 0) ? bwsalloc(0) : NULL); else { @@ -320,7 +313,6 @@ bwscsbdup(const unsigned char *str, size void bwsfree(const struct bwstring *s) { - if (s) sort_free(s); } @@ -391,7 +383,6 @@ struct bwstring * bwsnocpy(struct bwstring *dst, const struct bwstring *src, size_t offset, size_t size) { - if (offset >= src->len) { dst->data.wstr[0] = 0; dst->len = 0; @@ -424,7 +415,6 @@ bwsnocpy(struct bwstring *dst, const str size_t bwsfwrite(struct bwstring *bws, FILE *f, bool zero_ended) { - if (MB_CUR_MAX == 1) { size_t len = bws->len; @@ -914,7 +904,6 @@ bwstod(struct bwstring *s0, bool *empty) int bws_month_score(const struct bwstring *s0) { - if (MB_CUR_MAX == 1) { const unsigned char *end, *s; size_t len; @@ -1120,7 +1109,6 @@ dictionary_order(struct bwstring *str) struct bwstring * ignore_case(struct bwstring *str) { - if (MB_CUR_MAX == 1) { unsigned char *end, *s; @@ -1148,7 +1136,6 @@ ignore_case(struct bwstring *str) void bws_disorder_warnx(struct bwstring *s, const char *fn, size_t pos) { - if (MB_CUR_MAX == 1) warnx("%s:%zu: disorder: %s", fn, pos + 1, s->data.cstr); else Modified: head/usr.bin/sort/coll.c ============================================================================== --- head/usr.bin/sort/coll.c Sun Apr 5 22:34:03 2015 (r281124) +++ head/usr.bin/sort/coll.c Sun Apr 5 23:06:42 2015 (r281125) @@ -93,7 +93,6 @@ key_hint_size(void) size_t keys_array_size(void) { - return (keys_num * (sizeof(struct key_value) + key_hint_size())); } @@ -103,7 +102,6 @@ keys_array_size(void) void clean_keys_array(const struct bwstring *s, struct keys_array *ka) { - if (ka) { for (size_t i = 0; i < keys_num; ++i) if (ka->key[i].k && ka->key[i].k != s) @@ -118,7 +116,6 @@ clean_keys_array(const struct bwstring * void set_key_on_keys_array(struct keys_array *ka, struct bwstring *s, size_t ind) { - if (ka && keys_num > ind) { struct key_value *kv; @@ -173,7 +170,6 @@ sort_list_item_size(struct sort_list_ite static void sort_list_item_make_key(struct sort_list_item *si) { - preproc(si->str, &(si->ka)); } @@ -184,7 +180,6 @@ sort_list_item_make_key(struct sort_list void sort_list_item_set(struct sort_list_item *si, struct bwstring *str) { - if (si) { clean_keys_array(si->str, &(si->ka)); if (si->str) { @@ -207,7 +202,6 @@ sort_list_item_set(struct sort_list_item void sort_list_item_clean(struct sort_list_item *si) { - if (si) { clean_keys_array(si->str, &(si->ka)); if (si->str) { @@ -248,7 +242,6 @@ skip_cols_to_start(const struct bwstring static size_t skip_fields_to_start(const struct bwstring *s, size_t fields, bool *empty_field) { - if (fields < 2) { if (BWSLEN(s) == 0) *empty_field = true; @@ -297,7 +290,6 @@ static void find_field_start(const struct bwstring *s, struct key_specs *ks, size_t *field_start, size_t *key_start, bool *empty_field, bool *empty_key) { - *field_start = skip_fields_to_start(s, ks->f1, empty_field); if (!*empty_field) *key_start = skip_cols_to_start(s, ks->c1, *field_start, @@ -394,7 +386,6 @@ cut_field(const struct bwstring *s, stru int preproc(struct bwstring *s, struct keys_array *ka) { - if (sort_opts_vals.kflag) for (size_t i = 0; i < keys_num; i++) { struct bwstring *key; @@ -449,7 +440,6 @@ preproc(struct bwstring *s, struct keys_ cmpcoll_t get_sort_func(struct sort_mods *sm) { - if (sm->nflag) return (numcoll); else if (sm->hflag) @@ -502,7 +492,6 @@ key_coll(struct keys_array *ps1, struct int top_level_str_coll(const struct bwstring *s1, const struct bwstring *s2) { - if (default_sort_mods->rflag) { const struct bwstring *tmp; @@ -591,7 +580,6 @@ list_coll_offset(struct sort_list_item * int list_coll(struct sort_list_item **ss1, struct sort_list_item **ss2) { - return (list_coll_offset(ss1, ss2, 0)); } @@ -646,7 +634,6 @@ get_list_call_func(size_t offset) int list_coll_by_str_only(struct sort_list_item **ss1, struct sort_list_item **ss2) { - return (top_level_str_coll(((*ss1)->str), ((*ss2)->str))); } @@ -784,7 +771,6 @@ wstrcoll(struct key_value *kv1, struct k static inline int cmpsuffix(unsigned char si1, unsigned char si2) { - return ((char)si1 - (char)si2); } @@ -950,7 +936,6 @@ numcoll_impl(struct key_value *kv1, stru static int numcoll(struct key_value *kv1, struct key_value *kv2, size_t offset) { - return (numcoll_impl(kv1, kv2, offset, false)); } @@ -960,7 +945,6 @@ numcoll(struct key_value *kv1, struct ke static int hnumcoll(struct key_value *kv1, struct key_value *kv2, size_t offset) { - return (numcoll_impl(kv1, kv2, offset, true)); } @@ -1046,7 +1030,6 @@ versioncoll(struct key_value *kv1, struc static inline bool huge_minus(double d, int err1) { - if (err1 == ERANGE) if (d == -HUGE_VAL || d == -HUGE_VALF || d == -HUGE_VALL) return (+1); @@ -1060,7 +1043,6 @@ huge_minus(double d, int err1) static inline bool huge_plus(double d, int err1) { - if (err1 == ERANGE) if (d == HUGE_VAL || d == HUGE_VALF || d == HUGE_VALL) return (+1); @@ -1074,7 +1056,6 @@ huge_plus(double d, int err1) static bool is_nan(double d) { - return ((d == NAN) || (isnan(d))); } @@ -1084,7 +1065,6 @@ is_nan(double d) static int cmp_nans(double d1, double d2) { - if (d1 < d2) return (-1); if (d2 > d2) Modified: head/usr.bin/sort/file.c ============================================================================== --- head/usr.bin/sort/file.c Sun Apr 5 22:34:03 2015 (r281124) +++ head/usr.bin/sort/file.c Sun Apr 5 23:06:42 2015 (r281125) @@ -125,7 +125,6 @@ static void mt_sort(struct sort_list *li void init_tmp_files(void) { - LIST_INIT(&tmp_files); sem_init(&tmp_files_sem, 0, 1); } @@ -136,7 +135,6 @@ init_tmp_files(void) void tmp_file_atexit(const char *tmp_file) { - if (tmp_file) { sem_wait(&tmp_files_sem); struct CLEANABLE_FILE *item = @@ -248,7 +246,6 @@ new_tmp_file_name(void) void file_list_init(struct file_list *fl, bool tmp) { - if (fl) { fl->count = 0; fl->sz = 0; @@ -263,7 +260,6 @@ file_list_init(struct file_list *fl, boo void file_list_add(struct file_list *fl, char *fn, bool allocate) { - if (fl && fn) { if (fl->count >= fl->sz || (fl->fns == NULL)) { fl->sz = (fl->sz) * 2 + 1; @@ -281,7 +277,6 @@ file_list_add(struct file_list *fl, char void file_list_populate(struct file_list *fl, int argc, char **argv, bool allocate) { - if (fl && argv) { int i; @@ -297,7 +292,6 @@ file_list_populate(struct file_list *fl, void file_list_clean(struct file_list *fl) { - if (fl) { if (fl->fns) { size_t i; @@ -325,7 +319,6 @@ file_list_clean(struct file_list *fl) void sort_list_init(struct sort_list *l) { - if (l) { l->count = 0; l->size = 0; @@ -340,7 +333,6 @@ sort_list_init(struct sort_list *l) void sort_list_add(struct sort_list *l, struct bwstring *str) { - if (l && str) { size_t indx = l->count; @@ -366,7 +358,6 @@ sort_list_add(struct sort_list *l, struc void sort_list_clean(struct sort_list *l) { - if (l) { if (l->list) { size_t i; @@ -397,7 +388,6 @@ sort_list_clean(struct sort_list *l) void sort_list_dump(struct sort_list *l, const char *fn) { - if (l && fn) { FILE *f; @@ -833,7 +823,6 @@ file_reader_readline(struct file_reader static void file_reader_clean(struct file_reader *fr) { - if (fr) { if (fr->mmapaddr) munmap(fr->mmapaddr, fr->mmapsize); @@ -858,7 +847,6 @@ file_reader_clean(struct file_reader *fr void file_reader_free(struct file_reader *fr) { - if (fr) { file_reader_clean(fr); sort_free(fr); @@ -906,7 +894,6 @@ procfile(const char *fsrc, struct sort_l static int file_header_cmp(struct file_header *f1, struct file_header *f2) { - if (f1 == f2) return (0); else { @@ -931,7 +918,6 @@ file_header_cmp(struct file_header *f1, static void file_header_init(struct file_header **fh, const char *fn, size_t file_pos) { - if (fh && fn) { struct bwstring *line; @@ -960,7 +946,6 @@ file_header_init(struct file_header **fh static void file_header_close(struct file_header **fh) { - if (fh && *fh) { if ((*fh)->fr) { file_reader_free((*fh)->fr); @@ -998,7 +983,6 @@ file_header_swap(struct file_header **fh static void file_header_heap_swim(struct file_header **fh, size_t indx) { - if (indx > 0) { size_t parent_index; @@ -1048,7 +1032,6 @@ file_header_heap_sink(struct file_header static void file_header_list_rearrange_from_header(struct file_header **fh, size_t size) { - file_header_heap_sink(fh, 0, size); } @@ -1058,7 +1041,6 @@ file_header_list_rearrange_from_header(s static void file_header_list_push(struct file_header *f, struct file_header **fh, size_t size) { - fh[size++] = f; file_header_heap_swim(fh, size - 1); } @@ -1074,7 +1056,6 @@ struct last_printed static void file_header_print(struct file_header *fh, FILE *f_out, struct last_printed *lp) { - if (fh && fh->fr && f_out && fh->si && fh->si->str) { if (sort_opts_vals.uflag) { if ((lp->str == NULL) || (str_list_coll(lp->str, &(fh->si)))) { @@ -1094,7 +1075,6 @@ file_header_print(struct file_header *fh static void file_header_read_next(struct file_header *fh) { - if (fh && fh->fr) { struct bwstring *tmp; @@ -1152,7 +1132,6 @@ file_headers_merge(size_t fnum, struct f static void merge_files_array(size_t argc, char **argv, const char *fn_out) { - if (argv && fn_out) { struct file_header **fh; FILE *f_out; @@ -1185,7 +1164,6 @@ merge_files_array(size_t argc, char **ar static int shrink_file_list(struct file_list *fl) { - if ((fl == NULL) || (size_t) (fl->count) < max_open_files) return (0); else { @@ -1230,7 +1208,6 @@ shrink_file_list(struct file_list *fl) void merge_files(struct file_list *fl, const char *fn_out) { - if (fl && fn_out) { while (shrink_file_list(fl)); @@ -1241,7 +1218,6 @@ merge_files(struct file_list *fl, const static const char * get_sort_method_name(int sm) { - if (sm == SORT_MERGESORT) return "mergesort"; else if (sort_opts_vals.sort_method == SORT_RADIXSORT) Modified: head/usr.bin/sort/mem.c ============================================================================== --- head/usr.bin/sort/mem.c Sun Apr 5 22:34:03 2015 (r281124) +++ head/usr.bin/sort/mem.c Sun Apr 5 23:06:42 2015 (r281125) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include @@ -54,7 +53,6 @@ sort_malloc(size_t size) void sort_free(const void *ptr) { - if (ptr) free(__DECONST(void *, ptr)); } Modified: head/usr.bin/sort/radixsort.c ============================================================================== --- head/usr.bin/sort/radixsort.c Sun Apr 5 22:34:03 2015 (r281124) +++ head/usr.bin/sort/radixsort.c Sun Apr 5 23:06:42 2015 (r281125) @@ -269,7 +269,6 @@ place_item(struct sort_level *sl, size_t static void free_sort_level(struct sort_level *sl) { - if (sl) { if (sl->leaves) sort_free(sl->leaves); @@ -307,7 +306,7 @@ run_sort_level_next(struct sort_level *s sl->sublevels = NULL; } - switch (sl->tosort_num){ + switch (sl->tosort_num) { case 0: goto end; case (1): Modified: head/usr.bin/sort/sort.c ============================================================================== --- head/usr.bin/sort/sort.c Sun Apr 5 22:34:03 2015 (r281124) +++ head/usr.bin/sort/sort.c Sun Apr 5 23:06:42 2015 (r281125) @@ -196,7 +196,6 @@ void fix_obsolete_keys(int *argc, char * static bool sort_modifier_empty(struct sort_mods *sm) { - if (sm == NULL) return (true); return (!(sm->Mflag || sm->Vflag || sm->nflag || sm->gflag || @@ -306,7 +305,6 @@ set_hw_params(void) static void conv_mbtowc(wchar_t *wc, const char *c, const wchar_t def) { - if (wc && c) { int res; @@ -386,7 +384,6 @@ set_tmpdir(void) static unsigned long long parse_memory_buffer_value(const char *value) { - if (value == NULL) return (available_free_memory); else { @@ -449,7 +446,6 @@ static void sig_handler(int sig __unused, siginfo_t *siginfo __unused, void *context __unused) { - clear_tmp_files(); exit(-1); } @@ -510,7 +506,6 @@ set_signal_handler(void) static void unknown(const char *what) { - errx(2, "%s: %s", getstr(3), what); } @@ -523,7 +518,7 @@ check_mutually_exclusive_flags(char c, b int fo_index, mec; bool found_others, found_this; - found_others = found_this =false; + found_others = found_this = false; fo_index = 0; for (int i = 0; i < NUMBER_OF_MUTUALLY_EXCLUSIVE_FLAGS; i++) { @@ -551,7 +546,6 @@ check_mutually_exclusive_flags(char c, b static void set_sort_opts(void) { - memset(&default_sort_mods_object, 0, sizeof(default_sort_mods_object)); memset(&sort_opts_vals, 0, sizeof(sort_opts_vals)); @@ -565,7 +559,6 @@ set_sort_opts(void) static bool set_sort_modifier(struct sort_mods *sm, int c) { - if (sm) { switch (c){ case 'b': From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 00:35:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9B31E87; Mon, 6 Apr 2015 00:35:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95F4B3BB; Mon, 6 Apr 2015 00:35:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t360Z0k9062375; Mon, 6 Apr 2015 00:35:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t360Z0XL062374; Mon, 6 Apr 2015 00:35:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504060035.t360Z0XL062374@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Apr 2015 00:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281126 - head/tools/tools/ath/athstats X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 00:35:00 -0000 Author: adrian Date: Mon Apr 6 00:34:59 2015 New Revision: 281126 URL: https://svnweb.freebsd.org/changeset/base/281126 Log: Typecast things. Modified: head/tools/tools/ath/athstats/athstats.c Modified: head/tools/tools/ath/athstats/athstats.c ============================================================================== --- head/tools/tools/ath/athstats/athstats.c Sun Apr 5 23:06:42 2015 (r281125) +++ head/tools/tools/ath/athstats/athstats.c Mon Apr 6 00:34:59 2015 (r281126) @@ -796,10 +796,12 @@ ath_get_totstat(struct bsdstat *sf, int switch (s) { case S_INPUT: snprintf(b, bs, "%lu", - wf->total.ath.ast_rx_packets - wf->total.ath.ast_rx_mgt); + (unsigned long) wf->total.ath.ast_rx_packets - + (unsigned long) wf->total.ath.ast_rx_mgt); return 1; case S_OUTPUT: - snprintf(b, bs, "%lu", wf->total.ath.ast_tx_packets); + snprintf(b, bs, "%lu", + (unsigned long) wf->total.ath.ast_tx_packets); return 1; case S_RATE: snprintrate(b, bs, wf->total.ath.ast_tx_rate); From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 01:04:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFB17442; Mon, 6 Apr 2015 01:04:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2B67856; Mon, 6 Apr 2015 01:04:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36149nZ076490; Mon, 6 Apr 2015 01:04:09 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36148i3076488; Mon, 6 Apr 2015 01:04:08 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504060104.t36148i3076488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Mon, 6 Apr 2015 01:04:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281127 - in head/sys: dev/atkbdc sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 01:04:10 -0000 Author: rpaulo Date: Mon Apr 6 01:04:08 2015 New Revision: 281127 URL: https://svnweb.freebsd.org/changeset/base/281127 Log: psm: print newer Synaptics Touchpad capabilities. Modified: head/sys/dev/atkbdc/psm.c head/sys/sys/mouse.h Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Mon Apr 6 00:34:59 2015 (r281126) +++ head/sys/dev/atkbdc/psm.c Mon Apr 6 01:04:08 2015 (r281127) @@ -4483,8 +4483,12 @@ enable_synaptics(KBDC kbdc, struct psm_s synhw.nExtendedQueries = (status[0] & 0x70) != 0; synhw.capMiddle = (status[0] & 0x04) != 0; synhw.capPassthrough = (status[2] & 0x80) != 0; + synhw.capLowPower = (status[2] & 0x40) != 0; + synhw.capMultiFingerReport = + (status[2] & 0x20) != 0; synhw.capSleep = (status[2] & 0x10) != 0; synhw.capFourButtons = (status[2] & 0x08) != 0; + synhw.capBallistics = (status[2] & 0x04) != 0; synhw.capMultiFinger = (status[2] & 0x02) != 0; synhw.capPalmDetect = (status[2] & 0x01) != 0; @@ -4495,8 +4499,12 @@ enable_synaptics(KBDC kbdc, struct psm_s printf(" nExtendedQueries: %d\n", synhw.nExtendedQueries); printf(" capPassthrough: %d\n", synhw.capPassthrough); + printf(" capLowPower: %d\n", synhw.capLowPower); + printf(" capMultiFingerReport: %d\n", + synhw.capMultiFingerReport); printf(" capSleep: %d\n", synhw.capSleep); printf(" capFourButtons: %d\n", synhw.capFourButtons); + printf(" capBallistics: %d\n", synhw.capBallistics); printf(" capMultiFinger: %d\n", synhw.capMultiFinger); printf(" capPalmDetect: %d\n", synhw.capPalmDetect); } Modified: head/sys/sys/mouse.h ============================================================================== --- head/sys/sys/mouse.h Mon Apr 6 00:34:59 2015 (r281126) +++ head/sys/sys/mouse.h Mon Apr 6 01:04:08 2015 (r281127) @@ -108,6 +108,9 @@ typedef struct synapticshw { int capPalmDetect; int capPassthrough; int capMiddle; + int capLowPower; + int capMultiFingerReport; + int capBallistics; int nExtendedButtons; int nExtendedQueries; } synapticshw_t; From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 01:12:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5441964C; Mon, 6 Apr 2015 01:12:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36C6C91F; Mon, 6 Apr 2015 01:12:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t361CsOW080999; Mon, 6 Apr 2015 01:12:54 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t361CsCd080997; Mon, 6 Apr 2015 01:12:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504060112.t361CsCd080997@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 6 Apr 2015 01:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281128 - head/sys/dev/ath/ath_hal/ar5212 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 01:12:55 -0000 Author: adrian Date: Mon Apr 6 01:12:53 2015 New Revision: 281128 URL: https://svnweb.freebsd.org/changeset/base/281128 Log: Return the correct HAL data type for HAL_DIAG_ANI_STATS. I .. stupidly added code to return HAL_ANI_STATS to HAL_DIAG_ANI_STATS. I discovered this in a noisy environment when the returned values were enough to .. well, make everything terrible. So - restore functionality. Tested: * AR5416 (uses the AR5212 HAL), in a /very/ noisy 2GHz environment. Enough to trigger ANI to get upset and generate useful data. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Mon Apr 6 01:04:08 2015 (r281127) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Mon Apr 6 01:12:53 2015 (r281128) @@ -345,7 +345,9 @@ struct ath_hal_5212 { uint32_t ah_txBusy; uint32_t ah_rx_chainmask; uint32_t ah_tx_chainmask; - HAL_ANI_STATE ext_ani_state; + + /* Used to return ANI statistics to the diagnostic API */ + HAL_ANI_STATS ext_ani_stats; }; #define AH5212(_ah) ((struct ath_hal_5212 *)(_ah)) Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Mon Apr 6 01:04:08 2015 (r281127) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Mon Apr 6 01:12:53 2015 (r281128) @@ -1052,7 +1052,7 @@ ar5212GetDiagState(struct ath_hal *ah, i void **result, uint32_t *resultsize) { struct ath_hal_5212 *ahp = AH5212(ah); - struct ar5212AniState *astate; + HAL_ANI_STATS *astats; (void) ahp; if (ath_hal_getdiagstate(ah, request, args, argsize, result, resultsize)) @@ -1084,27 +1084,15 @@ ar5212GetDiagState(struct ath_hal *ah, i 0 : sizeof(struct ar5212AniState); return AH_TRUE; case HAL_DIAG_ANI_STATS: - OS_MEMZERO(&ahp->ext_ani_state, sizeof(ahp->ext_ani_state)); - astate = ar5212AniGetCurrentState(ah); - if (astate == NULL) { + OS_MEMZERO(&ahp->ext_ani_stats, sizeof(ahp->ext_ani_stats)); + astats = ar5212AniGetCurrentStats(ah); + if (astats == NULL) { *result = NULL; *resultsize = 0; } else { - ahp->ext_ani_state.noiseImmunityLevel = - astate->noiseImmunityLevel; - ahp->ext_ani_state.spurImmunityLevel = - astate->spurImmunityLevel; - ahp->ext_ani_state.firstepLevel = - astate->firstepLevel; - ahp->ext_ani_state.ofdmWeakSigDetectOff = - astate->ofdmWeakSigDetectOff; - ahp->ext_ani_state.cckWeakSigThreshold = - astate->cckWeakSigThreshold; - ahp->ext_ani_state.listenTime = - astate->listenTime; - - *result = &ahp->ext_ani_state; - *resultsize = sizeof(ahp->ext_ani_state); + OS_MEMCPY(&ahp->ext_ani_stats, astats, sizeof(HAL_ANI_STATS)); + *result = &ahp->ext_ani_stats; + *resultsize = sizeof(ahp->ext_ani_stats); } return AH_TRUE; case HAL_DIAG_ANI_CMD: From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 01:32:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF86290D; Mon, 6 Apr 2015 01:32:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBBC2ACD; Mon, 6 Apr 2015 01:32:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t361WRnM090235; Mon, 6 Apr 2015 01:32:27 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t361WRVe090234; Mon, 6 Apr 2015 01:32:27 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201504060132.t361WRVe090234@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Mon, 6 Apr 2015 01:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281129 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 01:32:27 -0000 Author: amdmi3 (ports committer) Date: Mon Apr 6 01:32:26 2015 New Revision: 281129 URL: https://svnweb.freebsd.org/changeset/base/281129 Log: Switch russian login class to UTF-8 Reviewed by: glebius Approved by: glebius Differential Revision: D2129 Modified: head/etc/login.conf Modified: head/etc/login.conf ============================================================================== --- head/etc/login.conf Mon Apr 6 01:12:53 2015 (r281128) +++ head/etc/login.conf Mon Apr 6 01:32:26 2015 (r281129) @@ -81,8 +81,8 @@ root:\ # Russian Users Accounts. Setup proper environment variables. # russian|Russian Users Accounts:\ - :charset=KOI8-R:\ - :lang=ru_RU.KOI8-R:\ + :charset=UTF-8:\ + :lang=ru_RU.UTF-8:\ :tc=default: From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 01:39:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04222A75; Mon, 6 Apr 2015 01:39:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3F77AE5; Mon, 6 Apr 2015 01:39:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t361dImi091090; Mon, 6 Apr 2015 01:39:18 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t361dHZB091087; Mon, 6 Apr 2015 01:39:17 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504060139.t361dHZB091087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 6 Apr 2015 01:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281130 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 01:39:19 -0000 Author: pfg Date: Mon Apr 6 01:39:16 2015 New Revision: 281130 URL: https://svnweb.freebsd.org/changeset/base/281130 Log: Make use of gcc attributes in some standard include headers. The `nonnull' attribute specifies that some function parameters should be non-null pointers. This is very useful as it helps the compiler generate warnings on suspicious code and can also enable some small optimizations. Also start using 'alloc_size' attribute in the allocator functions. This is an initial step to better integrate our libc with the compiler: these attributes are fully supported by clang and they are also useful for the static analyzer. Note that due to some bogus internal procedure in the way gcc ports are built they may require updating if they were built before r280801. Relnotes: yes Hinted by: Android's bionic libc Differential Revision: https://reviews.freebsd.org/D2107 Modified: head/include/pthread.h head/include/signal.h head/include/stdlib.h Modified: head/include/pthread.h ============================================================================== --- head/include/pthread.h Mon Apr 6 01:32:26 2015 (r281129) +++ head/include/pthread.h Mon Apr 6 01:39:16 2015 (r281130) @@ -144,19 +144,25 @@ struct _pthread_cleanup_info { */ __BEGIN_DECLS int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)); -int pthread_attr_destroy(pthread_attr_t *); +int pthread_attr_destroy(pthread_attr_t *) __nonnull(1); int pthread_attr_getstack(const pthread_attr_t * __restrict, - void ** __restrict, size_t * __restrict); -int pthread_attr_getstacksize(const pthread_attr_t *, size_t *); + void ** __restrict, size_t * __restrict) + __nonnull_all; +int pthread_attr_getstacksize(const pthread_attr_t *, size_t *) + __nonnull_all; int pthread_attr_getguardsize(const pthread_attr_t *, size_t *); int pthread_attr_getstackaddr(const pthread_attr_t *, void **); -int pthread_attr_getdetachstate(const pthread_attr_t *, int *); -int pthread_attr_init(pthread_attr_t *); -int pthread_attr_setstacksize(pthread_attr_t *, size_t); -int pthread_attr_setguardsize(pthread_attr_t *, size_t); -int pthread_attr_setstack(pthread_attr_t *, void *, size_t); +int pthread_attr_getdetachstate(const pthread_attr_t *, int *) + __nonnull_all; +int pthread_attr_init(pthread_attr_t *) __nonnull(1); +int pthread_attr_setstacksize(pthread_attr_t *, size_t) + __nonnull(1); +int pthread_attr_setguardsize(pthread_attr_t *, size_t) + __nonnull(1); +int pthread_attr_setstack(pthread_attr_t *, void *, size_t) + __nonnull(1); int pthread_attr_setstackaddr(pthread_attr_t *, void *); -int pthread_attr_setdetachstate(pthread_attr_t *, int); +int pthread_attr_setdetachstate(pthread_attr_t *, int) __nonnull(1); int pthread_barrier_destroy(pthread_barrier_t *); int pthread_barrier_init(pthread_barrier_t *, const pthread_barrierattr_t *, unsigned); @@ -164,7 +170,7 @@ int pthread_barrier_wait(pthread_barrie int pthread_barrierattr_destroy(pthread_barrierattr_t *); int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, int *); -int pthread_barrierattr_init(pthread_barrierattr_t *); +int pthread_barrierattr_init(pthread_barrierattr_t *) __nonnull(1); int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int); #define pthread_cleanup_push(cleanup_routine, cleanup_arg) \ @@ -180,98 +186,109 @@ int pthread_barrierattr_setpshared(pthr __pthread_cleanup_pop_imp(execute); \ } -int pthread_condattr_destroy(pthread_condattr_t *); +int pthread_condattr_destroy(pthread_condattr_t *) __nonnull(1); int pthread_condattr_getclock(const pthread_condattr_t *, - clockid_t *); -int pthread_condattr_getpshared(const pthread_condattr_t *, int *); -int pthread_condattr_init(pthread_condattr_t *); -int pthread_condattr_setclock(pthread_condattr_t *, clockid_t); -int pthread_condattr_setpshared(pthread_condattr_t *, int); -int pthread_cond_broadcast(pthread_cond_t *); -int pthread_cond_destroy(pthread_cond_t *); + clockid_t *) __nonnull_all; +int pthread_condattr_getpshared(const pthread_condattr_t *, int *) + __nonnull_all; +int pthread_condattr_init(pthread_condattr_t *) __nonnull(1); +int pthread_condattr_setclock(pthread_condattr_t *, clockid_t) + __nonnull(1); +int pthread_condattr_setpshared(pthread_condattr_t *, int) + __nonnull(1); +int pthread_cond_broadcast(pthread_cond_t *) + __nonnull(1); +int pthread_cond_destroy(pthread_cond_t *) + __nonnull(1); int pthread_cond_init(pthread_cond_t *, - const pthread_condattr_t *); -int pthread_cond_signal(pthread_cond_t *); + const pthread_condattr_t *) __nonnull(1); +int pthread_cond_signal(pthread_cond_t *) __nonnull(1); int pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *__mutex, const struct timespec *) - __requires_exclusive(*__mutex); + __nonnull_all __requires_exclusive(*__mutex); int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *__mutex) - __requires_exclusive(*__mutex); + __nonnull_all __requires_exclusive(*__mutex); int pthread_create(pthread_t *, const pthread_attr_t *, - void *(*) (void *), void *); + void *(*) (void *), void *) __nonnull(1) __nonnull(3); int pthread_detach(pthread_t); int pthread_equal(pthread_t, pthread_t); void pthread_exit(void *) __dead2; void *pthread_getspecific(pthread_key_t); -int pthread_getcpuclockid(pthread_t, clockid_t *); +int pthread_getcpuclockid(pthread_t, clockid_t *) __nonnull(2); int pthread_join(pthread_t, void **); int pthread_key_create(pthread_key_t *, - void (*) (void *)); + void (*) (void *)) __nonnull(1); int pthread_key_delete(pthread_key_t); -int pthread_mutexattr_init(pthread_mutexattr_t *); -int pthread_mutexattr_destroy(pthread_mutexattr_t *); +int pthread_mutexattr_init(pthread_mutexattr_t *) __nonnull(1); +int pthread_mutexattr_destroy(pthread_mutexattr_t *) __nonnull(1); int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, - int *); -int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *); -int pthread_mutexattr_settype(pthread_mutexattr_t *, int); -int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); + int *) __nonnull_all; +int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *) + __nonnull_all; +int pthread_mutexattr_settype(pthread_mutexattr_t *, int) + __nonnull(1); +int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int) + __nonnull(1); int pthread_mutex_destroy(pthread_mutex_t *__mutex) - __requires_unlocked(*__mutex); + __nonnull(1) __requires_unlocked(*__mutex); int pthread_mutex_init(pthread_mutex_t *__mutex, const pthread_mutexattr_t *) - __requires_unlocked(*__mutex); + __nonnull(1) __requires_unlocked(*__mutex); int pthread_mutex_lock(pthread_mutex_t *__mutex) - __locks_exclusive(*__mutex); + __nonnull(1) __locks_exclusive(*__mutex); int pthread_mutex_trylock(pthread_mutex_t *__mutex) - __trylocks_exclusive(0, *__mutex); + __nonnull(1) __trylocks_exclusive(0, *__mutex); int pthread_mutex_timedlock(pthread_mutex_t *__mutex, const struct timespec *) - __trylocks_exclusive(0, *__mutex); + __nonnull_all __trylocks_exclusive(0, *__mutex); int pthread_mutex_unlock(pthread_mutex_t *__mutex) - __unlocks(*__mutex); -int pthread_once(pthread_once_t *, void (*) (void)); + __nonnull(1) __unlocks(*__mutex); +int pthread_once(pthread_once_t *, void (*) (void)) __nonnull_all; int pthread_rwlock_destroy(pthread_rwlock_t *__rwlock) - __requires_unlocked(*__rwlock); + __nonnull(1) __requires_unlocked(*__rwlock); int pthread_rwlock_init(pthread_rwlock_t *__rwlock, const pthread_rwlockattr_t *) - __requires_unlocked(*__rwlock); + __nonnull(1) __requires_unlocked(*__rwlock); int pthread_rwlock_rdlock(pthread_rwlock_t *__rwlock) - __locks_shared(*__rwlock); + __nonnull(1) __locks_shared(*__rwlock); int pthread_rwlock_timedrdlock(pthread_rwlock_t *__rwlock, const struct timespec *) - __trylocks_shared(0, *__rwlock); + __nonnull_all __trylocks_shared(0, *__rwlock); int pthread_rwlock_timedwrlock(pthread_rwlock_t *__rwlock, const struct timespec *) - __trylocks_exclusive(0, *__rwlock); + __nonnull_all __trylocks_exclusive(0, *__rwlock); int pthread_rwlock_tryrdlock(pthread_rwlock_t *__rwlock) - __trylocks_shared(0, *__rwlock); + __nonnull(1) __trylocks_shared(0, *__rwlock); int pthread_rwlock_trywrlock(pthread_rwlock_t *__rwlock) - __trylocks_exclusive(0, *__rwlock); + __nonnull(1) __trylocks_exclusive(0, *__rwlock); int pthread_rwlock_unlock(pthread_rwlock_t *__rwlock) - __unlocks(*__rwlock); + __nonnull(1) __unlocks(*__rwlock); int pthread_rwlock_wrlock(pthread_rwlock_t *__rwlock) - __locks_exclusive(*__rwlock); -int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); + __nonnull(1) __locks_exclusive(*__rwlock); +int pthread_rwlockattr_destroy(pthread_rwlockattr_t *) + __nonnull(1); int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *, int *); int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *, - int *); -int pthread_rwlockattr_init(pthread_rwlockattr_t *); + int *) __nonnull_all; +int pthread_rwlockattr_init(pthread_rwlockattr_t *) + __nonnull(1); int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *, int); -int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int); +int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int) + __nonnull(1); pthread_t pthread_self(void); int pthread_setspecific(pthread_key_t, const void *); int pthread_spin_init(pthread_spinlock_t *__spin, int) - __requires_unlocked(*__spin); + __requires_unlocked(*__spin); int pthread_spin_destroy(pthread_spinlock_t *__spin) - __requires_unlocked(*__spin); + __requires_unlocked(*__spin); int pthread_spin_lock(pthread_spinlock_t *__spin) - __locks_exclusive(*__spin); + __locks_exclusive(*__spin); int pthread_spin_trylock(pthread_spinlock_t *__spin) - __trylocks_exclusive(0, *__spin); + __trylocks_exclusive(0, *__spin); int pthread_spin_unlock(pthread_spinlock_t *__spin) - __unlocks(*__spin); + __unlocks(*__spin); int pthread_cancel(pthread_t); int pthread_setcancelstate(int, int *); int pthread_setcanceltype(int, int *); @@ -295,18 +312,20 @@ int pthread_mutexattr_setprotocol(pthre int pthread_attr_getinheritsched(const pthread_attr_t *, int *); int pthread_attr_getschedparam(const pthread_attr_t *, - struct sched_param *); -int pthread_attr_getschedpolicy(const pthread_attr_t *, int *); -int pthread_attr_getscope(const pthread_attr_t *, int *); + struct sched_param *) __nonnull_all; +int pthread_attr_getschedpolicy(const pthread_attr_t *, int *) + __nonnull_all; +int pthread_attr_getscope(const pthread_attr_t *, int *) + __nonnull_all; int pthread_attr_setinheritsched(pthread_attr_t *, int); int pthread_attr_setschedparam(pthread_attr_t *, - const struct sched_param *); -int pthread_attr_setschedpolicy(pthread_attr_t *, int); -int pthread_attr_setscope(pthread_attr_t *, int); + const struct sched_param *) __nonnull(1) __nonnull(2); +int pthread_attr_setschedpolicy(pthread_attr_t *, int) __nonnull(1); +int pthread_attr_setscope(pthread_attr_t *, int) __nonnull(1); int pthread_getschedparam(pthread_t pthread, int *, - struct sched_param *); + struct sched_param *) __nonnull(2) __nonnull(3); int pthread_setschedparam(pthread_t, int, - const struct sched_param *); + const struct sched_param *) __nonnull(3); #if __XSI_VISIBLE int pthread_getconcurrency(void); int pthread_setconcurrency(int); Modified: head/include/signal.h ============================================================================== --- head/include/signal.h Mon Apr 6 01:32:26 2015 (r281129) +++ head/include/signal.h Mon Apr 6 01:39:16 2015 (r281130) @@ -78,10 +78,10 @@ int sigdelset(sigset_t *, int); int sigemptyset(sigset_t *); int sigfillset(sigset_t *); int sigismember(const sigset_t *, int); -int sigpending(sigset_t *); +int sigpending(sigset_t *) __nonnull(1); int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict); -int sigsuspend(const sigset_t *); -int sigwait(const sigset_t * __restrict, int * __restrict); +int sigsuspend(const sigset_t *) __nonnull(1); +int sigwait(const sigset_t * __restrict, int * __restrict) __nonnull_all; #endif #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600 Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Mon Apr 6 01:32:26 2015 (r281129) +++ head/include/stdlib.h Mon Apr 6 01:39:16 2015 (r281130) @@ -87,21 +87,22 @@ int atoi(const char *); long atol(const char *); void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); -void *calloc(size_t, size_t) __malloc_like; +void *calloc(size_t, size_t) __malloc_like __result_use_check + __alloc_size(1) __alloc_size(2); div_t div(int, int) __pure2; _Noreturn void exit(int); void free(void *); char *getenv(const char *); long labs(long) __pure2; ldiv_t ldiv(long, long) __pure2; -void *malloc(size_t) __malloc_like; +void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1); int mblen(const char *, size_t); size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); int rand(void); -void *realloc(void *, size_t); +void *realloc(void *, size_t) __result_use_check __alloc_size(2); void srand(unsigned); double strtod(const char * __restrict, char ** __restrict); float strtof(const char * __restrict, char ** __restrict); @@ -155,7 +156,7 @@ _Noreturn void _Exit(int); * If we're in a mode greater than C99, expose C11 functions. */ #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L -void * aligned_alloc(size_t, size_t) __malloc_like; +void * aligned_alloc(size_t, size_t) __malloc_like __alloc_size(2); int at_quick_exit(void (*)(void)); _Noreturn void quick_exit(int); @@ -170,7 +171,8 @@ char *realpath(const char * __restrict, int rand_r(unsigned *); /* (TSF) */ #endif #if __POSIX_VISIBLE >= 200112 -int posix_memalign(void **, size_t, size_t); /* (ADV) */ +int posix_memalign(void **, size_t, size_t) __nonnull(1) + __alloc_size(3); /* (ADV) */ int setenv(const char *, const char *, int); int unsetenv(const char *); #endif @@ -301,7 +303,7 @@ void qsort_r(void *, size_t, size_t, vo int (*)(void *, const void *, const void *)); int radixsort(const unsigned char **, int, const unsigned char *, unsigned); -void *reallocf(void *, size_t); +void *reallocf(void *, size_t) __result_use_check __alloc_size(2); int rpmatch(const char *); void setprogname(const char *); int sradixsort(const unsigned char **, int, const unsigned char *, From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 01:53:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79C42E0E; Mon, 6 Apr 2015 01:53:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66287CB2; Mon, 6 Apr 2015 01:53:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t361rmSX099626; Mon, 6 Apr 2015 01:53:48 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t361rmhV099625; Mon, 6 Apr 2015 01:53:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504060153.t361rmhV099625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 6 Apr 2015 01:53:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281131 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 01:53:48 -0000 Author: bapt Date: Mon Apr 6 01:53:47 2015 New Revision: 281131 URL: https://svnweb.freebsd.org/changeset/base/281131 Log: Enforce LC_COLLATE="C" until we do support proper UTF-8 collation Modified: head/etc/login.conf Modified: head/etc/login.conf ============================================================================== --- head/etc/login.conf Mon Apr 6 01:39:16 2015 (r281130) +++ head/etc/login.conf Mon Apr 6 01:53:47 2015 (r281131) @@ -26,7 +26,7 @@ default:\ :passwd_format=sha512:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ - :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ + :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:LC_COLLATE=C:\ :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\ :nologin=/var/run/nologin:\ :cputime=unlimited:\ From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 02:35:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D76643E; Mon, 6 Apr 2015 02:35:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87971FD0; Mon, 6 Apr 2015 02:35:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t362Zwqn017614; Mon, 6 Apr 2015 02:35:58 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t362ZtuS017607; Mon, 6 Apr 2015 02:35:55 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504060235.t362ZtuS017607@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 6 Apr 2015 02:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281132 - head/usr.bin/sort X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 02:35:58 -0000 Author: pfg Date: Mon Apr 6 02:35:55 2015 New Revision: 281132 URL: https://svnweb.freebsd.org/changeset/base/281132 Log: Revert (partial) r281123, r281125: sort: style knits / cleanups. Our style guide(9) specifies that in absence of local variables an empty line must be inserted. Pointed out by: eadler Modified: head/usr.bin/sort/bwstring.c head/usr.bin/sort/coll.c head/usr.bin/sort/file.c head/usr.bin/sort/mem.c head/usr.bin/sort/radixsort.c head/usr.bin/sort/sort.c head/usr.bin/sort/vsort.c Modified: head/usr.bin/sort/bwstring.c ============================================================================== --- head/usr.bin/sort/bwstring.c Mon Apr 6 01:53:47 2015 (r281131) +++ head/usr.bin/sort/bwstring.c Mon Apr 6 02:35:55 2015 (r281132) @@ -147,6 +147,7 @@ wide_str_coll(const wchar_t *s1, const w void bwsprintf(FILE *f, struct bwstring *bws, const char *prefix, const char *suffix) { + if (MB_CUR_MAX == 1) fprintf(f, "%s%s%s", prefix, bws->data.cstr, suffix); else @@ -155,17 +156,20 @@ bwsprintf(FILE *f, struct bwstring *bws, const void* bwsrawdata(const struct bwstring *bws) { + return (&(bws->data)); } size_t bwsrawlen(const struct bwstring *bws) { + return ((MB_CUR_MAX == 1) ? bws->len : SIZEOF_WCHAR_STRING(bws->len)); } size_t bws_memsize(const struct bwstring *bws) { + return ((MB_CUR_MAX == 1) ? (bws->len + 2 + sizeof(struct bwstring)) : (SIZEOF_WCHAR_STRING(bws->len + 1) + sizeof(struct bwstring))); } @@ -173,6 +177,7 @@ bws_memsize(const struct bwstring *bws) void bws_setlen(struct bwstring *bws, size_t newlen) { + if (bws && newlen != bws->len && newlen <= bws->len) { bws->len = newlen; if (MB_CUR_MAX == 1) @@ -212,6 +217,7 @@ bwsalloc(size_t sz) struct bwstring * bwsdup(const struct bwstring *s) { + if (s == NULL) return (NULL); else { @@ -233,6 +239,7 @@ bwsdup(const struct bwstring *s) struct bwstring * bwssbdup(const wchar_t *str, size_t len) { + if (str == NULL) return ((len == 0) ? bwsalloc(0) : NULL); else { @@ -313,6 +320,7 @@ bwscsbdup(const unsigned char *str, size void bwsfree(const struct bwstring *s) { + if (s) sort_free(s); } @@ -383,6 +391,7 @@ struct bwstring * bwsnocpy(struct bwstring *dst, const struct bwstring *src, size_t offset, size_t size) { + if (offset >= src->len) { dst->data.wstr[0] = 0; dst->len = 0; @@ -415,6 +424,7 @@ bwsnocpy(struct bwstring *dst, const str size_t bwsfwrite(struct bwstring *bws, FILE *f, bool zero_ended) { + if (MB_CUR_MAX == 1) { size_t len = bws->len; @@ -904,6 +914,7 @@ bwstod(struct bwstring *s0, bool *empty) int bws_month_score(const struct bwstring *s0) { + if (MB_CUR_MAX == 1) { const unsigned char *end, *s; size_t len; @@ -1109,6 +1120,7 @@ dictionary_order(struct bwstring *str) struct bwstring * ignore_case(struct bwstring *str) { + if (MB_CUR_MAX == 1) { unsigned char *end, *s; @@ -1136,6 +1148,7 @@ ignore_case(struct bwstring *str) void bws_disorder_warnx(struct bwstring *s, const char *fn, size_t pos) { + if (MB_CUR_MAX == 1) warnx("%s:%zu: disorder: %s", fn, pos + 1, s->data.cstr); else Modified: head/usr.bin/sort/coll.c ============================================================================== --- head/usr.bin/sort/coll.c Mon Apr 6 01:53:47 2015 (r281131) +++ head/usr.bin/sort/coll.c Mon Apr 6 02:35:55 2015 (r281132) @@ -93,6 +93,7 @@ key_hint_size(void) size_t keys_array_size(void) { + return (keys_num * (sizeof(struct key_value) + key_hint_size())); } @@ -102,6 +103,7 @@ keys_array_size(void) void clean_keys_array(const struct bwstring *s, struct keys_array *ka) { + if (ka) { for (size_t i = 0; i < keys_num; ++i) if (ka->key[i].k && ka->key[i].k != s) @@ -116,6 +118,7 @@ clean_keys_array(const struct bwstring * void set_key_on_keys_array(struct keys_array *ka, struct bwstring *s, size_t ind) { + if (ka && keys_num > ind) { struct key_value *kv; @@ -170,6 +173,7 @@ sort_list_item_size(struct sort_list_ite static void sort_list_item_make_key(struct sort_list_item *si) { + preproc(si->str, &(si->ka)); } @@ -180,6 +184,7 @@ sort_list_item_make_key(struct sort_list void sort_list_item_set(struct sort_list_item *si, struct bwstring *str) { + if (si) { clean_keys_array(si->str, &(si->ka)); if (si->str) { @@ -202,6 +207,7 @@ sort_list_item_set(struct sort_list_item void sort_list_item_clean(struct sort_list_item *si) { + if (si) { clean_keys_array(si->str, &(si->ka)); if (si->str) { @@ -242,6 +248,7 @@ skip_cols_to_start(const struct bwstring static size_t skip_fields_to_start(const struct bwstring *s, size_t fields, bool *empty_field) { + if (fields < 2) { if (BWSLEN(s) == 0) *empty_field = true; @@ -290,6 +297,7 @@ static void find_field_start(const struct bwstring *s, struct key_specs *ks, size_t *field_start, size_t *key_start, bool *empty_field, bool *empty_key) { + *field_start = skip_fields_to_start(s, ks->f1, empty_field); if (!*empty_field) *key_start = skip_cols_to_start(s, ks->c1, *field_start, @@ -386,6 +394,7 @@ cut_field(const struct bwstring *s, stru int preproc(struct bwstring *s, struct keys_array *ka) { + if (sort_opts_vals.kflag) for (size_t i = 0; i < keys_num; i++) { struct bwstring *key; @@ -440,6 +449,7 @@ preproc(struct bwstring *s, struct keys_ cmpcoll_t get_sort_func(struct sort_mods *sm) { + if (sm->nflag) return (numcoll); else if (sm->hflag) @@ -492,6 +502,7 @@ key_coll(struct keys_array *ps1, struct int top_level_str_coll(const struct bwstring *s1, const struct bwstring *s2) { + if (default_sort_mods->rflag) { const struct bwstring *tmp; @@ -580,15 +591,16 @@ list_coll_offset(struct sort_list_item * int list_coll(struct sort_list_item **ss1, struct sort_list_item **ss2) { + return (list_coll_offset(ss1, ss2, 0)); } -#define LSCDEF(N) \ -static int \ -list_coll_##N(struct sort_list_item **ss1, struct sort_list_item **ss2) \ -{ \ - \ - return (list_coll_offset(ss1, ss2, N)); \ +#define LSCDEF(N) \ +static int \ +list_coll_##N(struct sort_list_item **ss1, struct sort_list_item **ss2) \ +{ \ + \ + return (list_coll_offset(ss1, ss2, N)); \ } LSCDEF(1) @@ -634,6 +646,7 @@ get_list_call_func(size_t offset) int list_coll_by_str_only(struct sort_list_item **ss1, struct sort_list_item **ss2) { + return (top_level_str_coll(((*ss1)->str), ((*ss2)->str))); } @@ -771,6 +784,7 @@ wstrcoll(struct key_value *kv1, struct k static inline int cmpsuffix(unsigned char si1, unsigned char si2) { + return ((char)si1 - (char)si2); } @@ -936,6 +950,7 @@ numcoll_impl(struct key_value *kv1, stru static int numcoll(struct key_value *kv1, struct key_value *kv2, size_t offset) { + return (numcoll_impl(kv1, kv2, offset, false)); } @@ -945,6 +960,7 @@ numcoll(struct key_value *kv1, struct ke static int hnumcoll(struct key_value *kv1, struct key_value *kv2, size_t offset) { + return (numcoll_impl(kv1, kv2, offset, true)); } @@ -1030,6 +1046,7 @@ versioncoll(struct key_value *kv1, struc static inline bool huge_minus(double d, int err1) { + if (err1 == ERANGE) if (d == -HUGE_VAL || d == -HUGE_VALF || d == -HUGE_VALL) return (+1); @@ -1043,6 +1060,7 @@ huge_minus(double d, int err1) static inline bool huge_plus(double d, int err1) { + if (err1 == ERANGE) if (d == HUGE_VAL || d == HUGE_VALF || d == HUGE_VALL) return (+1); @@ -1056,6 +1074,7 @@ huge_plus(double d, int err1) static bool is_nan(double d) { + return ((d == NAN) || (isnan(d))); } @@ -1065,6 +1084,7 @@ is_nan(double d) static int cmp_nans(double d1, double d2) { + if (d1 < d2) return (-1); if (d2 > d2) Modified: head/usr.bin/sort/file.c ============================================================================== --- head/usr.bin/sort/file.c Mon Apr 6 01:53:47 2015 (r281131) +++ head/usr.bin/sort/file.c Mon Apr 6 02:35:55 2015 (r281132) @@ -125,6 +125,7 @@ static void mt_sort(struct sort_list *li void init_tmp_files(void) { + LIST_INIT(&tmp_files); sem_init(&tmp_files_sem, 0, 1); } @@ -135,6 +136,7 @@ init_tmp_files(void) void tmp_file_atexit(const char *tmp_file) { + if (tmp_file) { sem_wait(&tmp_files_sem); struct CLEANABLE_FILE *item = @@ -246,6 +248,7 @@ new_tmp_file_name(void) void file_list_init(struct file_list *fl, bool tmp) { + if (fl) { fl->count = 0; fl->sz = 0; @@ -260,6 +263,7 @@ file_list_init(struct file_list *fl, boo void file_list_add(struct file_list *fl, char *fn, bool allocate) { + if (fl && fn) { if (fl->count >= fl->sz || (fl->fns == NULL)) { fl->sz = (fl->sz) * 2 + 1; @@ -277,6 +281,7 @@ file_list_add(struct file_list *fl, char void file_list_populate(struct file_list *fl, int argc, char **argv, bool allocate) { + if (fl && argv) { int i; @@ -292,6 +297,7 @@ file_list_populate(struct file_list *fl, void file_list_clean(struct file_list *fl) { + if (fl) { if (fl->fns) { size_t i; @@ -319,6 +325,7 @@ file_list_clean(struct file_list *fl) void sort_list_init(struct sort_list *l) { + if (l) { l->count = 0; l->size = 0; @@ -333,6 +340,7 @@ sort_list_init(struct sort_list *l) void sort_list_add(struct sort_list *l, struct bwstring *str) { + if (l && str) { size_t indx = l->count; @@ -358,6 +366,7 @@ sort_list_add(struct sort_list *l, struc void sort_list_clean(struct sort_list *l) { + if (l) { if (l->list) { size_t i; @@ -388,6 +397,7 @@ sort_list_clean(struct sort_list *l) void sort_list_dump(struct sort_list *l, const char *fn) { + if (l && fn) { FILE *f; @@ -823,6 +833,7 @@ file_reader_readline(struct file_reader static void file_reader_clean(struct file_reader *fr) { + if (fr) { if (fr->mmapaddr) munmap(fr->mmapaddr, fr->mmapsize); @@ -847,6 +858,7 @@ file_reader_clean(struct file_reader *fr void file_reader_free(struct file_reader *fr) { + if (fr) { file_reader_clean(fr); sort_free(fr); @@ -894,6 +906,7 @@ procfile(const char *fsrc, struct sort_l static int file_header_cmp(struct file_header *f1, struct file_header *f2) { + if (f1 == f2) return (0); else { @@ -918,6 +931,7 @@ file_header_cmp(struct file_header *f1, static void file_header_init(struct file_header **fh, const char *fn, size_t file_pos) { + if (fh && fn) { struct bwstring *line; @@ -946,6 +960,7 @@ file_header_init(struct file_header **fh static void file_header_close(struct file_header **fh) { + if (fh && *fh) { if ((*fh)->fr) { file_reader_free((*fh)->fr); @@ -983,6 +998,7 @@ file_header_swap(struct file_header **fh static void file_header_heap_swim(struct file_header **fh, size_t indx) { + if (indx > 0) { size_t parent_index; @@ -1032,6 +1048,7 @@ file_header_heap_sink(struct file_header static void file_header_list_rearrange_from_header(struct file_header **fh, size_t size) { + file_header_heap_sink(fh, 0, size); } @@ -1041,6 +1058,7 @@ file_header_list_rearrange_from_header(s static void file_header_list_push(struct file_header *f, struct file_header **fh, size_t size) { + fh[size++] = f; file_header_heap_swim(fh, size - 1); } @@ -1056,6 +1074,7 @@ struct last_printed static void file_header_print(struct file_header *fh, FILE *f_out, struct last_printed *lp) { + if (fh && fh->fr && f_out && fh->si && fh->si->str) { if (sort_opts_vals.uflag) { if ((lp->str == NULL) || (str_list_coll(lp->str, &(fh->si)))) { @@ -1075,6 +1094,7 @@ file_header_print(struct file_header *fh static void file_header_read_next(struct file_header *fh) { + if (fh && fh->fr) { struct bwstring *tmp; @@ -1132,6 +1152,7 @@ file_headers_merge(size_t fnum, struct f static void merge_files_array(size_t argc, char **argv, const char *fn_out) { + if (argv && fn_out) { struct file_header **fh; FILE *f_out; @@ -1164,6 +1185,7 @@ merge_files_array(size_t argc, char **ar static int shrink_file_list(struct file_list *fl) { + if ((fl == NULL) || (size_t) (fl->count) < max_open_files) return (0); else { @@ -1208,6 +1230,7 @@ shrink_file_list(struct file_list *fl) void merge_files(struct file_list *fl, const char *fn_out) { + if (fl && fn_out) { while (shrink_file_list(fl)); @@ -1218,6 +1241,7 @@ merge_files(struct file_list *fl, const static const char * get_sort_method_name(int sm) { + if (sm == SORT_MERGESORT) return "mergesort"; else if (sort_opts_vals.sort_method == SORT_RADIXSORT) Modified: head/usr.bin/sort/mem.c ============================================================================== --- head/usr.bin/sort/mem.c Mon Apr 6 01:53:47 2015 (r281131) +++ head/usr.bin/sort/mem.c Mon Apr 6 02:35:55 2015 (r281132) @@ -53,6 +53,7 @@ sort_malloc(size_t size) void sort_free(const void *ptr) { + if (ptr) free(__DECONST(void *, ptr)); } Modified: head/usr.bin/sort/radixsort.c ============================================================================== --- head/usr.bin/sort/radixsort.c Mon Apr 6 01:53:47 2015 (r281131) +++ head/usr.bin/sort/radixsort.c Mon Apr 6 02:35:55 2015 (r281132) @@ -231,6 +231,7 @@ add_to_sublevel(struct sort_level *sl, s static inline void add_leaf(struct sort_level *sl, struct sort_list_item *item) { + if (++(sl->leaves_num) > sl->leaves_sz) { sl->leaves_sz = sl->leaves_num + 128; sl->leaves = sort_realloc(sl->leaves, @@ -269,6 +270,7 @@ place_item(struct sort_level *sl, size_t static void free_sort_level(struct sort_level *sl) { + if (sl) { if (sl->leaves) sort_free(sl->leaves); @@ -306,7 +308,7 @@ run_sort_level_next(struct sort_level *s sl->sublevels = NULL; } - switch (sl->tosort_num) { + switch (sl->tosort_num){ case 0: goto end; case (1): Modified: head/usr.bin/sort/sort.c ============================================================================== --- head/usr.bin/sort/sort.c Mon Apr 6 01:53:47 2015 (r281131) +++ head/usr.bin/sort/sort.c Mon Apr 6 02:35:55 2015 (r281132) @@ -196,6 +196,7 @@ void fix_obsolete_keys(int *argc, char * static bool sort_modifier_empty(struct sort_mods *sm) { + if (sm == NULL) return (true); return (!(sm->Mflag || sm->Vflag || sm->nflag || sm->gflag || @@ -305,6 +306,7 @@ set_hw_params(void) static void conv_mbtowc(wchar_t *wc, const char *c, const wchar_t def) { + if (wc && c) { int res; @@ -384,6 +386,7 @@ set_tmpdir(void) static unsigned long long parse_memory_buffer_value(const char *value) { + if (value == NULL) return (available_free_memory); else { @@ -446,6 +449,7 @@ static void sig_handler(int sig __unused, siginfo_t *siginfo __unused, void *context __unused) { + clear_tmp_files(); exit(-1); } @@ -506,6 +510,7 @@ set_signal_handler(void) static void unknown(const char *what) { + errx(2, "%s: %s", getstr(3), what); } @@ -518,7 +523,7 @@ check_mutually_exclusive_flags(char c, b int fo_index, mec; bool found_others, found_this; - found_others = found_this = false; + found_others = found_this =false; fo_index = 0; for (int i = 0; i < NUMBER_OF_MUTUALLY_EXCLUSIVE_FLAGS; i++) { @@ -546,6 +551,7 @@ check_mutually_exclusive_flags(char c, b static void set_sort_opts(void) { + memset(&default_sort_mods_object, 0, sizeof(default_sort_mods_object)); memset(&sort_opts_vals, 0, sizeof(sort_opts_vals)); @@ -559,6 +565,7 @@ set_sort_opts(void) static bool set_sort_modifier(struct sort_mods *sm, int c) { + if (sm) { switch (c){ case 'b': Modified: head/usr.bin/sort/vsort.c ============================================================================== --- head/usr.bin/sort/vsort.c Mon Apr 6 01:53:47 2015 (r281131) +++ head/usr.bin/sort/vsort.c Mon Apr 6 02:35:55 2015 (r281132) @@ -40,18 +40,21 @@ __FBSDID("$FreeBSD$"); static inline bool isdigit_clocale(wchar_t c) { + return (c >= L'0' && c <= L'9'); } static inline bool isalpha_clocale(wchar_t c) { + return ((c >= L'a' && c <= L'z') || (c >= L'A' && c <= L'Z')); } static inline bool isalnum_clocale(wchar_t c) { + return ((c >= L'a' && c <= L'z') || (c >= L'A' && c <= L'Z') || (c >= L'0' && c <= L'9')); } @@ -112,6 +115,7 @@ find_suffix(bwstring_iterator si, bwstri static inline int cmp_chars(wchar_t c1, wchar_t c2) { + if (c1 == c2) return (0); From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 03:02:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B11EE96E; Mon, 6 Apr 2015 03:02:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C58B3C8; Mon, 6 Apr 2015 03:02:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3632Lbe031855; Mon, 6 Apr 2015 03:02:21 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3632L5U031853; Mon, 6 Apr 2015 03:02:21 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504060302.t3632L5U031853@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 6 Apr 2015 03:02:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281133 - head/usr.bin/sort X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 03:02:21 -0000 Author: pfg Date: Mon Apr 6 03:02:20 2015 New Revision: 281133 URL: https://svnweb.freebsd.org/changeset/base/281133 Log: sort: style knits / cleanups. Minor cleanups that got accidentally reverted. Obtained from: OpenBSD Modified: head/usr.bin/sort/radixsort.c head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/radixsort.c ============================================================================== --- head/usr.bin/sort/radixsort.c Mon Apr 6 02:35:55 2015 (r281132) +++ head/usr.bin/sort/radixsort.c Mon Apr 6 03:02:20 2015 (r281133) @@ -308,7 +308,7 @@ run_sort_level_next(struct sort_level *s sl->sublevels = NULL; } - switch (sl->tosort_num){ + switch (sl->tosort_num) { case 0: goto end; case (1): Modified: head/usr.bin/sort/sort.c ============================================================================== --- head/usr.bin/sort/sort.c Mon Apr 6 02:35:55 2015 (r281132) +++ head/usr.bin/sort/sort.c Mon Apr 6 03:02:20 2015 (r281133) @@ -523,7 +523,7 @@ check_mutually_exclusive_flags(char c, b int fo_index, mec; bool found_others, found_this; - found_others = found_this =false; + found_others = found_this = false; fo_index = 0; for (int i = 0; i < NUMBER_OF_MUTUALLY_EXCLUSIVE_FLAGS; i++) { From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 03:17:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 847D4CE3; Mon, 6 Apr 2015 03:17:43 +0000 (UTC) Received: from mail-wg0-x234.google.com (mail-wg0-x234.google.com [IPv6:2a00:1450:400c:c00::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 18CA46A6; Mon, 6 Apr 2015 03:17:43 +0000 (UTC) Received: by wgyo15 with SMTP id o15so6372277wgy.2; Sun, 05 Apr 2015 20:17:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Jtf7fL4iaJOXOX9nz9ANuo2pUDEUBwswU8Q4LBixOS4=; b=qqsaCwUnAheMwNPYHlsSKGX9B5kvCKXO0YzGMkswwK0bPv3DmqUqpBB4hua8Qyr1/n LylHq9kfAUI1g57e1lrqBu60VESB7YhCCrxp3HG/C8csHBs6hrkiG5JXaqzWusnfrpko aANU6xZ2R8+CbZ+dOAOjgcqh0ldidGYcdawr6VJrprdakOD8QdBAjQtp4pdVzzLXLZX3 DO3pIEqCApVzHD5rfkHL6rOTpntgPwglxi0Xnob8hxeTRJqO/I5KOuzXdZdansq+U6Y1 exGpVAxcVYGSsI/CjH/V2xt18P9YPLRJwYFWjp6gufyg8LIlTKcbaZ8UzxN6FSHccme1 oHBA== MIME-Version: 1.0 X-Received: by 10.194.176.4 with SMTP id ce4mr27315646wjc.75.1428290261496; Sun, 05 Apr 2015 20:17:41 -0700 (PDT) Received: by 10.27.9.9 with HTTP; Sun, 5 Apr 2015 20:17:41 -0700 (PDT) In-Reply-To: <552187A6.2030803@borderworlds.dk> References: <201410031727.s93HRVnH084592@svn.freebsd.org> <552187A6.2030803@borderworlds.dk> Date: Sun, 5 Apr 2015 20:17:41 -0700 Message-ID: Subject: Re: svn commit: r272481 - head/usr.sbin/bhyve From: Neel Natu To: Christian Laursen Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Peter Grehan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 03:17:43 -0000 Hi Christian, On Sun, Apr 5, 2015 at 12:06 PM, Christian Laursen wrote: > On 10/03/14 19:27, Peter Grehan wrote: >> >> Author: grehan >> Date: Fri Oct 3 17:27:30 2014 >> New Revision: 272481 >> URL: https://svnweb.freebsd.org/changeset/base/272481 >> >> Log: >> Add new fields in the FADT, required by IASL 20140926-64. >> >> The new IASL from the recent acpi-ca import will error out >> if it doesn't see these new fields, which were previously >> reserved. > > > Please MFC this to stable/10. > > Thanks. > Committed as r281134. best Neel > -- > Christian Laursen > From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 03:21:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 961ACE53; Mon, 6 Apr 2015 03:21:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 779EF7A5; Mon, 6 Apr 2015 03:21:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t363LNRQ041173; Mon, 6 Apr 2015 03:21:23 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t363LMkr041171; Mon, 6 Apr 2015 03:21:22 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504060321.t363LMkr041171@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 6 Apr 2015 03:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281135 - head/lib/libc/string X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 03:21:23 -0000 Author: pfg Date: Mon Apr 6 03:21:22 2015 New Revision: 281135 URL: https://svnweb.freebsd.org/changeset/base/281135 Log: Make strlcpy/strlcat slightly easier to read. Bring small upstream updates. Obtained from: OpenBSD Modified: head/lib/libc/string/strlcat.c head/lib/libc/string/strlcpy.c Modified: head/lib/libc/string/strlcat.c ============================================================================== --- head/lib/libc/string/strlcat.c Mon Apr 6 03:16:20 2015 (r281134) +++ head/lib/libc/string/strlcat.c Mon Apr 6 03:21:22 2015 (r281135) @@ -1,7 +1,7 @@ -/* $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */ +/* $OpenBSD: strlcat.c,v 1.15 2015/03/02 21:41:08 millert Exp $ */ /* - * Copyright (c) 1998 Todd C. Miller + * Copyright (c) 1998, 2015 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -23,36 +23,36 @@ __FBSDID("$FreeBSD$"); #include /* - * Appends src to string dst of size siz (unlike strncat, siz is the - * full size of dst, not space left). At most siz-1 characters - * will be copied. Always NUL terminates (unless siz <= strlen(dst)). - * Returns strlen(src) + MIN(siz, strlen(initial dst)). - * If retval >= siz, truncation occurred. + * Appends src to string dst of size dsize (unlike strncat, dsize is the + * full size of dst, not space left). At most dsize-1 characters + * will be copied. Always NUL terminates (unless dsize <= strlen(dst)). + * Returns strlen(src) + MIN(dsize, strlen(initial dst)). + * If retval >= dsize, truncation occurred. */ size_t -strlcat(char * __restrict dst, const char * __restrict src, size_t siz) +strlcat(char * __restrict dst, const char * __restrict src, size_t dsize) { - char *d = dst; - const char *s = src; - size_t n = siz; + const char *odst = dst; + const char *osrc = src; + size_t n = dsize; size_t dlen; - /* Find the end of dst and adjust bytes left but don't go past end */ - while (n-- != 0 && *d != '\0') - d++; - dlen = d - dst; - n = siz - dlen; - - if (n == 0) - return(dlen + strlen(s)); - while (*s != '\0') { - if (n != 1) { - *d++ = *s; + /* Find the end of dst and adjust bytes left but don't go past end. */ + while (n-- != 0 && *dst != '\0') + dst++; + dlen = dst - odst; + n = dsize - dlen; + + if (n-- == 0) + return(dlen + strlen(src)); + while (*src != '\0') { + if (n != 0) { + *dst++ = *src; n--; } - s++; + src++; } - *d = '\0'; + *dst = '\0'; - return(dlen + (s - src)); /* count does not include NUL */ + return(dlen + (src - osrc)); /* count does not include NUL */ } Modified: head/lib/libc/string/strlcpy.c ============================================================================== --- head/lib/libc/string/strlcpy.c Mon Apr 6 03:16:20 2015 (r281134) +++ head/lib/libc/string/strlcpy.c Mon Apr 6 03:21:22 2015 (r281135) @@ -1,7 +1,7 @@ -/* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */ +/* $OpenBSD: strlcpy.c,v 1.12 2015/01/15 03:54:12 millert Exp $ */ /* - * Copyright (c) 1998 Todd C. Miller + * Copyright (c) 1998, 2015 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -23,32 +23,31 @@ __FBSDID("$FreeBSD$"); #include /* - * Copy src to string dst of size siz. At most siz-1 characters - * will be copied. Always NUL terminates (unless siz == 0). - * Returns strlen(src); if retval >= siz, truncation occurred. + * Copy string src to buffer dst of size dsize. At most dsize-1 + * chars will be copied. Always NUL terminates (unless dsize == 0). + * Returns strlen(src); if retval >= dsize, truncation occurred. */ size_t -strlcpy(char * __restrict dst, const char * __restrict src, size_t siz) +strlcpy(char * __restrict dst, const char * __restrict src, size_t dsize) { - char *d = dst; - const char *s = src; - size_t n = siz; - - /* Copy as many bytes as will fit */ - if (n != 0) { - while (--n != 0) { - if ((*d++ = *s++) == '\0') + const char *osrc = src; + size_t nleft = dsize; + + /* Copy as many bytes as will fit. */ + if (nleft != 0) { + while (--nleft != 0) { + if ((*dst++ = *src++) == '\0') break; } } - /* Not enough room in dst, add NUL and traverse rest of src */ - if (n == 0) { - if (siz != 0) - *d = '\0'; /* NUL-terminate dst */ - while (*s++) + /* Not enough room in dst, add NUL and traverse rest of src. */ + if (nleft == 0) { + if (dsize != 0) + *dst = '\0'; /* NUL-terminate dst */ + while (*src++) ; } - return(s - src - 1); /* count does not include NUL */ + return(src - osrc - 1); /* count does not include NUL */ } From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 04:17:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A984D3C5 for ; Mon, 6 Apr 2015 04:17:03 +0000 (UTC) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 453F9C10 for ; Mon, 6 Apr 2015 04:17:03 +0000 (UTC) Received: by wiun10 with SMTP id n10so23422200wiu.1 for ; Sun, 05 Apr 2015 21:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=x0n7H6kEuaDk6ARUPDMZ7il1zPRFoV1I3MZAsV6x6bk=; b=RGiFPB7kJGR37ELDLCW492yx0vE+WAo5URxbSzJB27fa9kXrsUEPg5/oXB1oBWGLoD Cns7rdwrsMsaZK8fjMgaLZTQK0s6HDghnC3Z0IXG05b7pF8jZKc9ZErbROnemDtl97S+ Mz60E12OBDjRZQq0rpTKGkhDMCI6uBpfba/sw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=x0n7H6kEuaDk6ARUPDMZ7il1zPRFoV1I3MZAsV6x6bk=; b=YpDChlxuqdoEwEsiMitDj/kjm5Hp7OaatJXtfhVGjjOHqhm6IMPICHgyU9zuUbyN+I Obn+QJF1PTEpx7OJuBQLN657wqjhtGnA5epVyt9D5+c82UJbu7vH1ZbWcR2jD3bmHNHb iEy+qxvZYCCxO87LEbhp46chUbD7TDWRtKCfcPsml2aqghXJdouLlBuWYfNt9URF5KYQ 4I/TQSepJRThGGWj2FgBpaE6/psIezx4H0v7yX1ohywrCOSeHIupKTsjl2s/501Y6A6j ZvtJkdOCg885LZQNpiy2SZnWSuTzxkMFBBMzZW5wZgUxxbapoMCWmw8CAC17+5Y4Cv26 r3xQ== X-Gm-Message-State: ALoCoQm4kFkGOCFhdds49KqbPHlVbbJj754wTouoeCdrHdvazLx7BhP5ZkhNlr2dJVubFb7OCRMF X-Received: by 10.180.102.34 with SMTP id fl2mr29351668wib.73.1428293821720; Sun, 05 Apr 2015 21:17:01 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Sun, 5 Apr 2015 21:16:31 -0700 (PDT) In-Reply-To: <20150405163305.A2515@besplex.bde.org> References: <201504050518.t355IFVJ001786@svn.freebsd.org> <20150405163305.A2515@besplex.bde.org> From: Eitan Adler Date: Mon, 6 Apr 2015 00:16:31 -0400 X-Google-Sender-Auth: MvRecjcc7l9Ufx2jBEjOul7J9Y8 Message-ID: Subject: Re: svn commit: r281103 - head/sys/amd64/amd64 To: Bruce Evans , Adrian Chadd , Kurt Lidl Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 04:17:03 -0000 + a few people interested in the diff On 5 April 2015 at 02:55, Bruce Evans wrote: > On Sun, 5 Apr 2015, Eitan Adler wrote: I did not confirm the performance impact, but the submitter and others indicated they saw a difference. Do you have specific data that shows that there was an improvement? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 04:18:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52F0A511 for ; Mon, 6 Apr 2015 04:18:38 +0000 (UTC) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D109FC1B for ; Mon, 6 Apr 2015 04:18:37 +0000 (UTC) Received: by wiaa2 with SMTP id a2so23497757wia.0 for ; Sun, 05 Apr 2015 21:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=gLXdUNhx6JoyNMRKXbBoyk+ZUHoAV+Bcbphmg8+IkJo=; b=S2U7N9lwZ/h155M4NfAQ/VE+2E0rKTwRmJtAXVRhWbKeED+WHwDN+bhP7ym0eaEKz0 S78ErWsARepra5AcSHIPDlKDvsnqKssq1N68270L+/m16dvX/Lk7zIGf2ws2vdQSUvxX 5M8a3YgNrX398UaU4RrP6Hy896BKlGLwWLGt0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=gLXdUNhx6JoyNMRKXbBoyk+ZUHoAV+Bcbphmg8+IkJo=; b=PPYpd17JUA1oq2gMgetbGLNpvU9WRnpZAulh6ohYrowy9JKi9RNU4zcHsW+yo98PTB 1ea/pqGs13HFPxgSYbW2Cqfa6XlDMfKVXQOBZ7wWF9UyPHAKb98GWemjR4F+ATIqBi8B gdBYTgNgECHB+cVnsV17Im4gbni7Rn91ik2BPcxFqaVQ9JWvyi18bRDOfmLAJQs9WxnC pRW0ZfEF4P3Yuqzgs2HSTyaaTdjjSyx+mKfH83AI42rFgxUHTpKqfvOOnmY6UUwDnBhF L2TsAjCT0UFsIOHADdbg/hA8Y7FvMFiAym+5DQBGgzDI73Dq40mmwmkxKq3r/WmszCe1 G4mQ== X-Gm-Message-State: ALoCoQklnlaeGNnuoHQArASJ3lD2EM2DDGvMq3rKI2mRTJ5bcqjM6CC9/LXvMSKo8oqpbCI4A+Si X-Received: by 10.180.14.135 with SMTP id p7mr26595241wic.8.1428293916347; Sun, 05 Apr 2015 21:18:36 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Sun, 5 Apr 2015 21:18:06 -0700 (PDT) In-Reply-To: <201504060321.t363LMkr041171@svn.freebsd.org> References: <201504060321.t363LMkr041171@svn.freebsd.org> From: Eitan Adler Date: Mon, 6 Apr 2015 00:18:06 -0400 X-Google-Sender-Auth: -CKaiKLJNo3w3V5Z9bz9pX17EM4 Message-ID: Subject: Re: svn commit: r281135 - head/lib/libc/string To: "Pedro F. Giffuni" Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 04:18:38 -0000 On 5 April 2015 at 23:21, Pedro F. Giffuni wrote: > Author: pfg > Date: Mon Apr 6 03:21:22 2015 > New Revision: 281135 > URL: https://svnweb.freebsd.org/changeset/base/281135 > > Log: > Make strlcpy/strlcat slightly easier to read. Thanks! -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 05:43:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A0972B1; Mon, 6 Apr 2015 05:43:12 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id EC5743CA; Mon, 6 Apr 2015 05:43:11 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 7F2E8420650; Mon, 6 Apr 2015 15:42:59 +1000 (AEST) Date: Mon, 6 Apr 2015 15:42:53 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Eitan Adler Subject: Re: svn commit: r281103 - head/sys/amd64/amd64 In-Reply-To: Message-ID: <20150406152653.K1066@besplex.bde.org> References: <201504050518.t355IFVJ001786@svn.freebsd.org> <20150405163305.A2515@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=EZy2da6TBZUl6oeKAScA:9 a=CjuIK1q_8ugA:10 Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Kurt Lidl , Bruce Evans , "svn-src-head@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 05:43:12 -0000 On Mon, 6 Apr 2015, Eitan Adler wrote: > + a few people interested in the diff > > On 5 April 2015 at 02:55, Bruce Evans wrote: >> On Sun, 5 Apr 2015, Eitan Adler wrote: > > I did not confirm the performance impact, but the submitter and others > indicated they saw a difference. > > Do you have specific data that shows that there was an improvement? Only micro-benchmark output that indicates little difference. This is probably very MD (depending on write combining hardware), so you might only see a difference on some systems. I also have micro-benchmark output for network packets/second that shows 10% differences for the change of adding 1 byte of padding in code that is never executed. This seems to be due to different cache misses. To eliminate differences from this (except ones caused by actually running different code), create a reference version by padding the functions or data to be changed so that the change doesn't affect the address of anything except the internals of the changed parts. I might try a makeworld run to see if changing the non-temporal accesses in pagecopy and pagezero to cached. Bruce From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 06:02:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8A83583; Mon, 6 Apr 2015 06:02:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3D71799; Mon, 6 Apr 2015 06:02:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3662xMd015797; Mon, 6 Apr 2015 06:02:59 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3662xpJ015796; Mon, 6 Apr 2015 06:02:59 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504060602.t3662xpJ015796@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Mon, 6 Apr 2015 06:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281136 - head/sys/dev/ichsmb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 06:02:59 -0000 Author: rpaulo Date: Mon Apr 6 06:02:58 2015 New Revision: 281136 URL: https://svnweb.freebsd.org/changeset/base/281136 Log: ichsmb: add a device id for the Wildcat Point-LP. MFC after: 1 week Modified: head/sys/dev/ichsmb/ichsmb_pci.c Modified: head/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- head/sys/dev/ichsmb/ichsmb_pci.c Mon Apr 6 03:21:22 2015 (r281135) +++ head/sys/dev/ichsmb/ichsmb_pci.c Mon Apr 6 06:02:58 2015 (r281136) @@ -86,9 +86,10 @@ __FBSDID("$FreeBSD$"); #define ID_CPT 0x1c228086 #define ID_PPT 0x1e228086 #define ID_AVOTON 0x1f3c8086 -#define ID_COLETOCRK 0x23B08086 +#define ID_COLETOCRK 0x23B08086 #define ID_LPT 0x8c228086 #define ID_WCPT 0x8ca28086 +#define ID_WCPTLP 0x9ca28086 #define PCIS_SERIALBUS_SMBUS_PROGIF 0x00 @@ -201,6 +202,9 @@ ichsmb_pci_probe(device_t dev) case ID_WCPT: device_set_desc(dev, "Intel Wildcat Point SMBus controller"); break; + case ID_WCPTLP: + device_set_desc(dev, "Intel Wildcat Point-LP SMBus controller"); + break; case ID_COLETOCRK: device_set_desc(dev, "Intel Coleto Creek SMBus controller"); break; From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 06:21:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39FA27DB; Mon, 6 Apr 2015 06:21:17 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 14AAC92E; Mon, 6 Apr 2015 06:21:16 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t366LFOM000795 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 5 Apr 2015 23:21:15 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t366LFn8000794; Sun, 5 Apr 2015 23:21:15 -0700 (PDT) (envelope-from jmg) Date: Sun, 5 Apr 2015 23:21:15 -0700 From: John-Mark Gurney To: Dmitry Marakasov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406062115.GT51048@funkthat.com> References: <201504060132.t361WRVe090234@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504060132.t361WRVe090234@svn.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sun, 05 Apr 2015 23:21:15 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 06:21:17 -0000 Dmitry Marakasov wrote this message on Mon, Apr 06, 2015 at 01:32 +0000: > Author: amdmi3 (ports committer) > Date: Mon Apr 6 01:32:26 2015 > New Revision: 281129 > URL: https://svnweb.freebsd.org/changeset/base/281129 > > Log: > Switch russian login class to UTF-8 > > Reviewed by: glebius > Approved by: glebius > Differential Revision: D2129 This probably needs a relnotes listing.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 06:55:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1006EDAE; Mon, 6 Apr 2015 06:55:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED166C36; Mon, 6 Apr 2015 06:55:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t366tnju039688; Mon, 6 Apr 2015 06:55:49 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t366tloT039675; Mon, 6 Apr 2015 06:55:47 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504060655.t366tloT039675@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Mon, 6 Apr 2015 06:55:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281138 - in head/sys/boot: efi/loader i386/libi386 i386/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 06:55:50 -0000 Author: rpaulo Date: Mon Apr 6 06:55:47 2015 New Revision: 281138 URL: https://svnweb.freebsd.org/changeset/base/281138 Log: SMBIOS support for EFI. MFC after: 1 week Added: head/sys/boot/i386/libi386/smbios.h (contents, props changed) Modified: head/sys/boot/efi/loader/Makefile head/sys/boot/efi/loader/main.c head/sys/boot/i386/libi386/libi386.h head/sys/boot/i386/libi386/smbios.c head/sys/boot/i386/loader/main.c Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Mon Apr 6 06:44:48 2015 (r281137) +++ head/sys/boot/efi/loader/Makefile Mon Apr 6 06:55:47 2015 (r281138) @@ -20,9 +20,12 @@ SRCS= autoload.c \ copy.c \ devicename.c \ main.c \ + smbios.c \ vers.c .PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH} +# For smbios.c +.PATH: ${.CURDIR}/../../i386/libi386 .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" CFLAGS+= -fPIC @@ -32,7 +35,8 @@ CFLAGS+= -I${.CURDIR}/../include CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include CFLAGS+= -I${.CURDIR}/../../.. -CFLAGS+= -DNO_PCI +CFLAGS+= -I${.CURDIR}/../../i386/libi386 +CFLAGS+= -DNO_PCI -DEFI .if ${MK_FORTH} != "no" BOOT_FORTH= yes Modified: head/sys/boot/efi/loader/main.c ============================================================================== --- head/sys/boot/efi/loader/main.c Mon Apr 6 06:44:48 2015 (r281137) +++ head/sys/boot/efi/loader/main.c Mon Apr 6 06:55:47 2015 (r281138) @@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "loader_efi.h" extern char bootprog_name[]; @@ -63,6 +65,7 @@ main(int argc, CHAR16 *argv[]) { char vendor[128]; EFI_LOADED_IMAGE *img; + EFI_GUID *guid; int i; /* @@ -128,6 +131,14 @@ main(int argc, CHAR16 *argv[]) archsw.arch_copyout = efi_copyout; archsw.arch_readin = efi_readin; + for (i = 0; i < ST->NumberOfTableEntries; i++) { + guid = &ST->ConfigurationTable[i].VendorGuid; + if (!memcmp(guid, &smbios, sizeof(EFI_GUID))) { + smbios_detect(ST->ConfigurationTable[i].VendorTable); + break; + } + } + interact(NULL); /* doesn't return */ return (EFI_SUCCESS); /* keep compiler happy */ Modified: head/sys/boot/i386/libi386/libi386.h ============================================================================== --- head/sys/boot/i386/libi386/libi386.h Mon Apr 6 06:44:48 2015 (r281137) +++ head/sys/boot/i386/libi386/libi386.h Mon Apr 6 06:55:47 2015 (r281138) @@ -113,10 +113,6 @@ uint32_t biospci_locator(int8_t bus, uin void biosacpi_detect(void); -void smbios_detect(void); -int smbios_match(const char* bios_vendor, const char* maker, - const char* product); - int i386_autoload(void); int bi_getboothowto(char *kargs); Modified: head/sys/boot/i386/libi386/smbios.c ============================================================================== --- head/sys/boot/i386/libi386/smbios.c Mon Apr 6 06:44:48 2015 (r281137) +++ head/sys/boot/i386/libi386/smbios.c Mon Apr 6 06:55:47 2015 (r281138) @@ -31,8 +31,13 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef EFI +/* In EFI, we don't need PTOV(). */ +#define PTOV(x) (caddr_t)(x) +#else #include "btxv86.h" -#include "libi386.h" +#endif +#include "smbios.h" /* * Detect SMBIOS and export information about the SMBIOS into the @@ -347,17 +352,18 @@ smbios_find_struct(int type) } static void -smbios_probe(void) +smbios_probe(const caddr_t addr) { caddr_t saddr, info; - u_int32_t paddr; + uintptr_t paddr; if (smbios.probed) return; smbios.probed = 1; /* Search signatures and validate checksums. */ - saddr = smbios_sigsearch(PTOV(SMBIOS_START), SMBIOS_LENGTH); + saddr = smbios_sigsearch(addr ? addr : PTOV(SMBIOS_START), + SMBIOS_LENGTH); if (saddr == NULL) return; @@ -392,13 +398,13 @@ smbios_probe(void) } void -smbios_detect(void) +smbios_detect(const caddr_t addr) { char buf[16]; caddr_t dmi; int i; - smbios_probe(); + smbios_probe(addr); if (smbios.addr == NULL) return; @@ -433,7 +439,8 @@ int smbios_match(const char* bios_vendor, const char* maker, const char* product) { - smbios_probe(); + /* XXXRP currently, only called from non-EFI. */ + smbios_probe(NULL); return (smbios_match_str(bios_vendor, smbios.bios_vendor) && smbios_match_str(maker, smbios.maker) && smbios_match_str(product, smbios.product)); Added: head/sys/boot/i386/libi386/smbios.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/libi386/smbios.h Mon Apr 6 06:55:47 2015 (r281138) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2015 Rui Paulo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ +#ifndef _SMBIOS_H_ +#define _SMBIOS_H_ + +void smbios_detect(const caddr_t); +int smbios_match(const char *, const char *, const char *); + +#endif /* _SMBIOS_H_ */ Modified: head/sys/boot/i386/loader/main.c ============================================================================== --- head/sys/boot/i386/loader/main.c Mon Apr 6 06:44:48 2015 (r281137) +++ head/sys/boot/i386/loader/main.c Mon Apr 6 06:55:47 2015 (r281138) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "common/bootargs.h" #include "libi386/libi386.h" +#include "libi386/smbios.h" #include "btxv86.h" #ifdef LOADER_ZFS_SUPPORT @@ -115,7 +116,7 @@ main(void) } setheap(heap_bottom, heap_top); - /* + /* * XXX Chicken-and-egg problem; we want to have console output early, but some * console attributes may depend on reading from eg. the boot device, which we * can't do yet. @@ -181,7 +182,7 @@ main(void) biosacpi_detect(); /* detect SMBIOS for future reference */ - smbios_detect(); + smbios_detect(NULL); /* detect PCI BIOS for future reference */ biospci_detect(); From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 06:56:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B230EEA; Mon, 6 Apr 2015 06:56:29 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 029B3C3E; Mon, 6 Apr 2015 06:56:29 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Yf0xH-000BxD-Nl; Mon, 06 Apr 2015 09:56:19 +0300 Date: Mon, 6 Apr 2015 09:56:19 +0300 From: Slawa Olhovchenkov To: Dmitry Marakasov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406065619.GH74532@zxy.spb.ru> References: <201504060132.t361WRVe090234@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504060132.t361WRVe090234@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 06:56:29 -0000 On Mon, Apr 06, 2015 at 01:32:27AM +0000, Dmitry Marakasov wrote: > Author: amdmi3 (ports committer) > Date: Mon Apr 6 01:32:26 2015 > New Revision: 281129 > URL: https://svnweb.freebsd.org/changeset/base/281129 > > Log: > Switch russian login class to UTF-8 As discursed before this is may cause data lost. > Reviewed by: glebius > Approved by: glebius > Differential Revision: D2129 > > Modified: > head/etc/login.conf > > Modified: head/etc/login.conf > ============================================================================== > --- head/etc/login.conf Mon Apr 6 01:12:53 2015 (r281128) > +++ head/etc/login.conf Mon Apr 6 01:32:26 2015 (r281129) > @@ -81,8 +81,8 @@ root:\ > # Russian Users Accounts. Setup proper environment variables. > # > russian|Russian Users Accounts:\ > - :charset=KOI8-R:\ > - :lang=ru_RU.KOI8-R:\ > + :charset=UTF-8:\ > + :lang=ru_RU.UTF-8:\ > :tc=default: > > > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 07:10:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9773FA16; Mon, 6 Apr 2015 07:10:48 +0000 (UTC) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60120E18; Mon, 6 Apr 2015 07:10:48 +0000 (UTC) Received: by pacyx8 with SMTP id yx8so35958892pac.1; Mon, 06 Apr 2015 00:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=nQqztErMx9TL41TXZ3Nqq18LjseHb3sQZglE9bqO+m0=; b=PSrnJbBcdROwu2iRcbCqF/2as28reuIbd1P+07ff2D9nMuFJTT+vOReOqeDOFHtaao q9YhD07pB/B/wVIQQusTLtxy0YZdvqP6xd4JLzax9oANH+nkzP97hBMyhx/N0COEhVXn PB5GS4av8LDBKgP2KOguFbIjbby0UQ+BHL+2CZr2JjqtTJO33H3ryYgIXf9Fl+mnfHiZ GPytplJAefGF336fgB2JxShR09PMOXueKEs4gLArDGsfZ88EObrJCx14IfWMHeHHJa2w 1gAlBNourMwAv6sNaLDDCKpE7hj3obnccd8sbClyW8nCv/GkYJ+YfHuyS1GheW/Fqa+c vADA== X-Received: by 10.66.102.4 with SMTP id fk4mr24778522pab.111.1428304247846; Mon, 06 Apr 2015 00:10:47 -0700 (PDT) Received: from [10.155.189.138] ([166.170.40.227]) by mx.google.com with ESMTPSA id dc8sm946493pdb.23.2015.04.06.00.10.46 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 06 Apr 2015 00:10:47 -0700 (PDT) References: <201504060132.t361WRVe090234@svn.freebsd.org> <20150406065619.GH74532@zxy.spb.ru> Mime-Version: 1.0 (1.0) In-Reply-To: <20150406065619.GH74532@zxy.spb.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> X-Mailer: iPhone Mail (12D508) From: Garrett Cooper Subject: Re: svn commit: r281129 - head/etc Date: Mon, 6 Apr 2015 00:10:40 -0700 To: Slawa Olhovchenkov Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Dmitry Marakasov X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 07:10:48 -0000 > On Apr 5, 2015, at 23:56, Slawa Olhovchenkov wrote: >=20 >> On Mon, Apr 06, 2015 at 01:32:27AM +0000, Dmitry Marakasov wrote: >>=20 >> Author: amdmi3 (ports committer) >> Date: Mon Apr 6 01:32:26 2015 >> New Revision: 281129 >> URL: https://svnweb.freebsd.org/changeset/base/281129 >>=20 >> Log: >> Switch russian login class to UTF-8 >=20 > As discursed before this is may cause data lost. Why? >> Reviewed by: glebius >> Approved by: glebius >> Differential Revision: D2129 >>=20 >> Modified: >> head/etc/login.conf >>=20 >> Modified: head/etc/login.conf >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >> --- head/etc/login.conf Mon Apr 6 01:12:53 2015 (r281128) >> +++ head/etc/login.conf Mon Apr 6 01:32:26 2015 (r281129) >> @@ -81,8 +81,8 @@ root:\ >> # Russian Users Accounts. Setup proper environment variables. >> # >> russian|Russian Users Accounts:\ >> - :charset=3DKOI8-R:\ >> - :lang=3Dru_RU.KOI8-R:\ >> + :charset=3DUTF-8:\ >> + :lang=3Dru_RU.UTF-8:\ >> :tc=3Ddefault: >>=20 >>=20 >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" >=20 From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 07:16:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CDABB9C; Mon, 6 Apr 2015 07:16:42 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42991E47; Mon, 6 Apr 2015 07:16:42 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Yf1Gy-000CGN-9Q; Mon, 06 Apr 2015 10:16:40 +0300 Date: Mon, 6 Apr 2015 10:16:40 +0300 From: Slawa Olhovchenkov To: Garrett Cooper Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406071640.GJ23643@zxy.spb.ru> References: <201504060132.t361WRVe090234@svn.freebsd.org> <20150406065619.GH74532@zxy.spb.ru> <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Dmitry Marakasov X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 07:16:42 -0000 On Mon, Apr 06, 2015 at 12:10:40AM -0700, Garrett Cooper wrote: > > > On Apr 5, 2015, at 23:56, Slawa Olhovchenkov wrote: > > > >> On Mon, Apr 06, 2015 at 01:32:27AM +0000, Dmitry Marakasov wrote: > >> > >> Author: amdmi3 (ports committer) > >> Date: Mon Apr 6 01:32:26 2015 > >> New Revision: 281129 > >> URL: https://svnweb.freebsd.org/changeset/base/281129 > >> > >> Log: > >> Switch russian login class to UTF-8 > > > > As discursed before this is may cause data lost. > > Why? Create file in koi8 locale with russian charaters. Update OS. Now you have utf-8 locale. Open file in vi. Save file. Done. Some data lost. vi and some other programs (tr and may by other) handle not-utf8 byte secquence in non-safe way. > >> Reviewed by: glebius > >> Approved by: glebius > >> Differential Revision: D2129 > >> > >> Modified: > >> head/etc/login.conf > >> > >> Modified: head/etc/login.conf > >> ============================================================================== > >> --- head/etc/login.conf Mon Apr 6 01:12:53 2015 (r281128) > >> +++ head/etc/login.conf Mon Apr 6 01:32:26 2015 (r281129) > >> @@ -81,8 +81,8 @@ root:\ > >> # Russian Users Accounts. Setup proper environment variables. > >> # > >> russian|Russian Users Accounts:\ > >> - :charset=KOI8-R:\ > >> - :lang=ru_RU.KOI8-R:\ > >> + :charset=UTF-8:\ > >> + :lang=ru_RU.UTF-8:\ > >> :tc=default: > >> > >> > >> _______________________________________________ > >> svn-src-all@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/svn-src-all > >> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 08:25:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE3C8803; Mon, 6 Apr 2015 08:25:57 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FA676E8; Mon, 6 Apr 2015 08:25:56 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t368PrkH089988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 6 Apr 2015 11:25:53 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t368Prag089987; Mon, 6 Apr 2015 11:25:53 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 6 Apr 2015 11:25:53 +0300 From: Gleb Smirnoff To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406082553.GW64665@FreeBSD.org> References: <201504060132.t361WRVe090234@svn.freebsd.org> <20150406065619.GH74532@zxy.spb.ru> <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150406071640.GJ23643@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Dmitry Marakasov , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 08:25:57 -0000 On Mon, Apr 06, 2015 at 10:16:40AM +0300, Slawa Olhovchenkov wrote: S> On Mon, Apr 06, 2015 at 12:10:40AM -0700, Garrett Cooper wrote: S> S> > S> > > On Apr 5, 2015, at 23:56, Slawa Olhovchenkov wrote: S> > > S> > >> On Mon, Apr 06, 2015 at 01:32:27AM +0000, Dmitry Marakasov wrote: S> > >> S> > >> Author: amdmi3 (ports committer) S> > >> Date: Mon Apr 6 01:32:26 2015 S> > >> New Revision: 281129 S> > >> URL: https://svnweb.freebsd.org/changeset/base/281129 S> > >> S> > >> Log: S> > >> Switch russian login class to UTF-8 S> > > S> > > As discursed before this is may cause data lost. S> > S> > Why? S> S> Create file in koi8 locale with russian charaters. S> Update OS. Now you have utf-8 locale. S> Open file in vi. S> Save file. S> Done. Some data lost. S> vi and some other programs (tr and may by other) handle not-utf8 byte secquence in non-safe way. Don't save file. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 08:37:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9611EAF8; Mon, 6 Apr 2015 08:37:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 815BD84B; Mon, 6 Apr 2015 08:37:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t368bfEx088140; Mon, 6 Apr 2015 08:37:41 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t368bfOF088139; Mon, 6 Apr 2015 08:37:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504060837.t368bfOF088139@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Apr 2015 08:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281141 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 08:37:41 -0000 Author: andrew Date: Mon Apr 6 08:37:40 2015 New Revision: 281141 URL: https://svnweb.freebsd.org/changeset/base/281141 Log: Respect DESTDIR when creating the directory structure when NO_ROOT is set. Reviewed by: bapt MFC after: 1 Week Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Mon Apr 6 08:23:06 2015 (r281140) +++ head/etc/Makefile Mon Apr 6 08:37:40 2015 (r281141) @@ -379,7 +379,7 @@ distrib-dirs: ${MTREES:N/*} test "$$d" == "/" && d=""; \ d=${DISTBASE}$$d; \ shift; \ - test -d $$d || mkdir -p $$d; \ + test -d ${DESTDIR}/$$d || mkdir -p ${DESTDIR}/$$d; \ ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K uname,gname | " \ "sed s#^\.#.$$d# | ${METALOG.add}" ; \ ${MTREE_CMD:N-W} -C -f $$m -K uname,gname | sed s#^\.#.$$d# | \ From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 08:41:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD56AC62; Mon, 6 Apr 2015 08:41:43 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 913F28F8; Mon, 6 Apr 2015 08:41:43 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Yf2bF-000Dl8-Jv; Mon, 06 Apr 2015 11:41:41 +0300 Date: Mon, 6 Apr 2015 11:41:41 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406084141.GK23643@zxy.spb.ru> References: <201504060132.t361WRVe090234@svn.freebsd.org> <20150406065619.GH74532@zxy.spb.ru> <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150406082553.GW64665@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Dmitry Marakasov , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 08:41:44 -0000 On Mon, Apr 06, 2015 at 11:25:53AM +0300, Gleb Smirnoff wrote: > On Mon, Apr 06, 2015 at 10:16:40AM +0300, Slawa Olhovchenkov wrote: > S> On Mon, Apr 06, 2015 at 12:10:40AM -0700, Garrett Cooper wrote: > S> > S> > > S> > > On Apr 5, 2015, at 23:56, Slawa Olhovchenkov wrote: > S> > > > S> > >> On Mon, Apr 06, 2015 at 01:32:27AM +0000, Dmitry Marakasov wrote: > S> > >> > S> > >> Author: amdmi3 (ports committer) > S> > >> Date: Mon Apr 6 01:32:26 2015 > S> > >> New Revision: 281129 > S> > >> URL: https://svnweb.freebsd.org/changeset/base/281129 > S> > >> > S> > >> Log: > S> > >> Switch russian login class to UTF-8 > S> > > > S> > > As discursed before this is may cause data lost. > S> > > S> > Why? > S> > S> Create file in koi8 locale with russian charaters. > S> Update OS. Now you have utf-8 locale. > S> Open file in vi. > S> Save file. > S> Done. Some data lost. > S> vi and some other programs (tr and may by other) handle not-utf8 byte secquence in non-safe way. > > Don't save file. You kidding. vi may inform you about data lost only postfactum (in case no lines with koi8 characters currently on screen). From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 08:49:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DC9BE2F; Mon, 6 Apr 2015 08:49:40 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 11985913; Mon, 6 Apr 2015 08:49:39 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t368nbWm090098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 6 Apr 2015 11:49:37 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t368nbh6090097; Mon, 6 Apr 2015 11:49:37 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 6 Apr 2015 11:49:37 +0300 From: Gleb Smirnoff To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406084937.GX64665@FreeBSD.org> References: <201504060132.t361WRVe090234@svn.freebsd.org> <20150406065619.GH74532@zxy.spb.ru> <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150406084141.GK23643@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Dmitry Marakasov , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 08:49:40 -0000 On Mon, Apr 06, 2015 at 11:41:41AM +0300, Slawa Olhovchenkov wrote: S> > S> > >> On Mon, Apr 06, 2015 at 01:32:27AM +0000, Dmitry Marakasov wrote: S> > S> > >> S> > S> > >> Author: amdmi3 (ports committer) S> > S> > >> Date: Mon Apr 6 01:32:26 2015 S> > S> > >> New Revision: 281129 S> > S> > >> URL: https://svnweb.freebsd.org/changeset/base/281129 S> > S> > >> S> > S> > >> Log: S> > S> > >> Switch russian login class to UTF-8 S> > S> > > S> > S> > > As discursed before this is may cause data lost. S> > S> > S> > S> > Why? S> > S> S> > S> Create file in koi8 locale with russian charaters. S> > S> Update OS. Now you have utf-8 locale. S> > S> Open file in vi. S> > S> Save file. S> > S> Done. Some data lost. S> > S> vi and some other programs (tr and may by other) handle not-utf8 byte secquence in non-safe way. S> > S> > Don't save file. S> S> You kidding. S> vi may inform you about data lost only postfactum (in case no lines S> with koi8 characters currently on screen). No, I'm not. You open an application, the application does something weird. Do you usually select "Save" after that? For example, you open Microsoft Word file in OpenOffice, and you see that file is definitely mangled. Do you select "Save"? If you do, you are the one to blame. Don't blame application developers. The application didn't do implicit save. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 08:53:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 599B2FDB; Mon, 6 Apr 2015 08:53:26 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CEE69BF; Mon, 6 Apr 2015 08:53:26 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Yf2ma-000Dxc-2e; Mon, 06 Apr 2015 11:53:24 +0300 Date: Mon, 6 Apr 2015 11:53:24 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406085323.GL23643@zxy.spb.ru> References: <201504060132.t361WRVe090234@svn.freebsd.org> <20150406065619.GH74532@zxy.spb.ru> <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150406084937.GX64665@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Dmitry Marakasov , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 08:53:26 -0000 On Mon, Apr 06, 2015 at 11:49:37AM +0300, Gleb Smirnoff wrote: > On Mon, Apr 06, 2015 at 11:41:41AM +0300, Slawa Olhovchenkov wrote: > S> > S> > >> On Mon, Apr 06, 2015 at 01:32:27AM +0000, Dmitry Marakasov wrote: > S> > S> > >> > S> > S> > >> Author: amdmi3 (ports committer) > S> > S> > >> Date: Mon Apr 6 01:32:26 2015 > S> > S> > >> New Revision: 281129 > S> > S> > >> URL: https://svnweb.freebsd.org/changeset/base/281129 > S> > S> > >> > S> > S> > >> Log: > S> > S> > >> Switch russian login class to UTF-8 > S> > S> > > > S> > S> > > As discursed before this is may cause data lost. > S> > S> > > S> > S> > Why? > S> > S> > S> > S> Create file in koi8 locale with russian charaters. > S> > S> Update OS. Now you have utf-8 locale. > S> > S> Open file in vi. > S> > S> Save file. > S> > S> Done. Some data lost. > S> > S> vi and some other programs (tr and may by other) handle not-utf8 byte secquence in non-safe way. > S> > > S> > Don't save file. > S> > S> You kidding. > S> vi may inform you about data lost only postfactum (in case no lines > S> with koi8 characters currently on screen). > > No, I'm not. > > You open an application, the application does something weird. Do you usually > select "Save" after that? For example, you open Microsoft Word file in OpenOffice, > and you see that file is definitely mangled. Do you select "Save"? > > If you do, you are the one to blame. Don't blame application developers. The > application didn't do implicit save. I am open in vi config file with koi8 comment. First screen don't have lines with koi8 characters. vi silent. I am edit somewehere. vi silent. I am try save. vi: "Conversion error on line 160; Error: t.koi: Illegal byte sequence; t.koi: WARNING: FILE TRUNCATED." At this point data already lost. From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 08:55:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC9751A8; Mon, 6 Apr 2015 08:55:07 +0000 (UTC) Received: from mail-vn0-x236.google.com (mail-vn0-x236.google.com [IPv6:2607:f8b0:400c:c0f::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65D709C5; Mon, 6 Apr 2015 08:55:07 +0000 (UTC) Received: by vnbf62 with SMTP id f62so3591822vnb.13; Mon, 06 Apr 2015 01:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=O07bNa5dw45krDTwy741pRvcgowaissuSh5IV/o3Q5w=; b=YnIwXrHqn8J+HVDi/FLuaSMCo6G8KcQsXUm9evUVlTJSPPw4PFAcwk6XnlpbxIJFf6 +mTVdJ5YDK/P3aIfKdX32kQ5jngHsiQPXWsdgggVqp+idCA8JQvIYI40Hw6HcbVWTXRA h/EOBKBVE/jO55Wg1yJyRUgq00KoY8Q4NaZ1Pj4FYzZfUooIpHdoPq95nf/zw37WQrPM VPEmE4EIswumnN3OXw9ohrdejaa3POBPOnwwGgxp2qCSjrXYFSc1184szO90WvXrXm+N Sd+h4RqZClM3f0Oxi2As0cZVq/ce8BQLdTFoY88AVCQrB2SR5Vj6bp+1liIj0mH2GNTo sWbw== X-Received: by 10.52.32.34 with SMTP id f2mr9249069vdi.11.1428310506278; Mon, 06 Apr 2015 01:55:06 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id hq1sm281247vdb.24.2015.04.06.01.55.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Apr 2015 01:55:04 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 6 Apr 2015 10:55:00 +0200 From: Baptiste Daroussin To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406085500.GA56860@ivaldir.etoilebsd.net> References: <201504060132.t361WRVe090234@svn.freebsd.org> <20150406065619.GH74532@zxy.spb.ru> <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <20150406084937.GX64665@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 08:55:08 -0000 --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 06, 2015 at 11:49:37AM +0300, Gleb Smirnoff wrote: > On Mon, Apr 06, 2015 at 11:41:41AM +0300, Slawa Olhovchenkov wrote: > S> > S> > >> On Mon, Apr 06, 2015 at 01:32:27AM +0000, Dmitry Marakasov w= rote: > S> > S> > >>=20 > S> > S> > >> Author: amdmi3 (ports committer) > S> > S> > >> Date: Mon Apr 6 01:32:26 2015 > S> > S> > >> New Revision: 281129 > S> > S> > >> URL: https://svnweb.freebsd.org/changeset/base/281129 > S> > S> > >>=20 > S> > S> > >> Log: > S> > S> > >> Switch russian login class to UTF-8 > S> > S> > >=20 > S> > S> > > As discursed before this is may cause data lost. > S> > S> >=20 > S> > S> > Why? > S> > S>=20 > S> > S> Create file in koi8 locale with russian charaters. > S> > S> Update OS. Now you have utf-8 locale. > S> > S> Open file in vi. > S> > S> Save file. > S> > S> Done. Some data lost. > S> > S> vi and some other programs (tr and may by other) handle not-utf8 = byte secquence in non-safe way. > S> >=20 > S> > Don't save file. > S>=20 > S> You kidding. > S> vi may inform you about data lost only postfactum (in case no lines > S> with koi8 characters currently on screen). >=20 > No, I'm not. >=20 > You open an application, the application does something weird. Do you usu= ally > select "Save" after that? For example, you open Microsoft Word file in Op= enOffice, > and you see that file is definitely mangled. Do you select "Save"? >=20 > If you do, you are the one to blame. Don't blame application developers. = The > application didn't do implicit save. >=20 He is pointing at a vi bug: See https://lists.freebsd.org/pipermail/freebsd-arch/2015-January/016702.ht= ml Noone seems to have worked on it since :( Best regards, Bapt --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlUiSeQACgkQ8kTtMUmk6EzC/QCghIEPjaRil0MW3CYLsVqgGq1S 3FQAn0H8+e5swlONb9rWlcSn4GL/XNST =TbS9 -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1-- From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 09:15:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D60F66DA; Mon, 6 Apr 2015 09:15:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1D93C14; Mon, 6 Apr 2015 09:15:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t369FJ7m006985; Mon, 6 Apr 2015 09:15:19 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t369FJma006984; Mon, 6 Apr 2015 09:15:19 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504060915.t369FJma006984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 6 Apr 2015 09:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281142 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 09:15:19 -0000 Author: glebius Date: Mon Apr 6 09:15:18 2015 New Revision: 281142 URL: https://svnweb.freebsd.org/changeset/base/281142 Log: Convert printfs in m_ext allocator to KASSERTs. Discussed with: rwatson Sponsored by: Nginx, Inc. Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Mon Apr 6 08:37:40 2015 (r281141) +++ head/sys/sys/mbuf.h Mon Apr 6 09:15:18 2015 (r281142) @@ -686,8 +686,8 @@ static __inline int m_clget(struct mbuf *m, int how) { - if (m->m_flags & M_EXT) - printf("%s: %p mbuf already has external storage\n", __func__, m); + KASSERT((m->m_flags & M_EXT) == 0, ("%s: mbuf %p has M_EXT", + __func__, m)); m->m_ext.ext_buf = (char *)NULL; uma_zalloc_arg(zone_clust, m, how); /* @@ -713,10 +713,11 @@ m_cljget(struct mbuf *m, int how, int si { uma_zone_t zone; - if (m && m->m_flags & M_EXT) - printf("%s: %p mbuf already has external storage\n", __func__, m); - if (m != NULL) + if (m != NULL) { + KASSERT((m->m_flags & M_EXT) == 0, ("%s: mbuf %p has M_EXT", + __func__, m)); m->m_ext.ext_buf = NULL; + } zone = m_getzone(size); return (uma_zalloc_arg(zone, m, how)); From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 09:42:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 665C4CCB; Mon, 6 Apr 2015 09:42:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DE9BE86; Mon, 6 Apr 2015 09:42:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t369gh0m021185; Mon, 6 Apr 2015 09:42:43 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t369gOM5021093; Mon, 6 Apr 2015 09:42:24 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504060942.t369gOM5021093@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 6 Apr 2015 09:42:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281143 - in head: contrib/ipfilter/ipsend contrib/ipfilter/lib contrib/ipfilter/tools lib/libc/net sbin/ifconfig tools/tools/ath/athratestats tools/tools/cxgbtool tools/tools/iwn/iwnst... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 09:42:44 -0000 Author: glebius Date: Mon Apr 6 09:42:23 2015 New Revision: 281143 URL: https://svnweb.freebsd.org/changeset/base/281143 Log: Stop including if_var.h from userland. Sponsored by: Nginx, Inc. Modified: head/contrib/ipfilter/ipsend/44arp.c head/contrib/ipfilter/ipsend/ip.c head/contrib/ipfilter/ipsend/resend.c head/contrib/ipfilter/lib/kmem.c head/contrib/ipfilter/tools/ipfs.c head/contrib/ipfilter/tools/ipnat.c head/contrib/ipfilter/tools/ipnat_y.y head/contrib/ipfilter/tools/ippool.c head/contrib/ipfilter/tools/ippool_y.y head/lib/libc/net/getaddrinfo.c head/lib/libc/net/name6.c head/sbin/ifconfig/af_inet.c head/sbin/ifconfig/af_inet6.c head/sbin/ifconfig/af_nd6.c head/sbin/ifconfig/carp.c head/sbin/ifconfig/ifconfig.c head/sbin/ifconfig/ifvlan.c head/sbin/ifconfig/ifvxlan.c head/tools/tools/ath/athratestats/main.c head/tools/tools/cxgbtool/cxgbtool.c head/tools/tools/iwn/iwnstats/iwn_ioctl.c head/usr.bin/bluetooth/btsockstat/btsockstat.c head/usr.bin/kdump/mkioctls head/usr.bin/netstat/bpf.c head/usr.bin/netstat/if.c head/usr.bin/netstat/inet6.c head/usr.sbin/amd/include/config.h head/usr.sbin/ancontrol/ancontrol.c head/usr.sbin/ifmcstat/ifmcstat.c head/usr.sbin/ip6addrctl/ip6addrctl.c head/usr.sbin/mld6query/mld6.c head/usr.sbin/ndp/ndp.c head/usr.sbin/ntp/config.h head/usr.sbin/ppp/iface.c head/usr.sbin/rip6query/rip6query.c head/usr.sbin/route6d/route6d.c head/usr.sbin/rrenumd/lexer.l head/usr.sbin/rrenumd/parser.y head/usr.sbin/rtadvctl/rtadvctl.c head/usr.sbin/rtadvd/config.c head/usr.sbin/rtadvd/if.c head/usr.sbin/rtadvd/rrenum.c head/usr.sbin/rtadvd/rtadvd.c head/usr.sbin/rtsold/if.c head/usr.sbin/rtsold/probe.c head/usr.sbin/rtsold/rtsold.c head/usr.sbin/uhsoctl/uhsoctl.c head/usr.sbin/wpa/ndis_events/ndis_events.c head/usr.sbin/wpa/wpa_supplicant/Packet32.c Modified: head/contrib/ipfilter/ipsend/44arp.c ============================================================================== --- head/contrib/ipfilter/ipsend/44arp.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/contrib/ipfilter/ipsend/44arp.c Mon Apr 6 09:42:23 2015 (r281143) @@ -8,9 +8,6 @@ #include #include #include -#if __FreeBSD_version >= 300000 -# include -#endif #include #include #ifndef __osf__ Modified: head/contrib/ipfilter/ipsend/ip.c ============================================================================== --- head/contrib/ipfilter/ipsend/ip.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/contrib/ipfilter/ipsend/ip.c Mon Apr 6 09:42:23 2015 (r281143) @@ -21,9 +21,6 @@ static const char rcsid[] = "@(#)$Id$"; # include # include # include -# if __FreeBSD_version >= 300000 -# include -# endif #endif #include #include Modified: head/contrib/ipfilter/ipsend/resend.c ============================================================================== --- head/contrib/ipfilter/ipsend/resend.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/contrib/ipfilter/ipsend/resend.c Mon Apr 6 09:42:23 2015 (r281143) @@ -22,9 +22,6 @@ static const char rcsid[] = "@(#)$Id$"; #ifndef linux # include # include -# if __FreeBSD_version >= 300000 -# include -# endif #endif #include #include Modified: head/contrib/ipfilter/lib/kmem.c ============================================================================== --- head/contrib/ipfilter/lib/kmem.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/contrib/ipfilter/lib/kmem.c Mon Apr 6 09:42:23 2015 (r281143) @@ -29,9 +29,6 @@ #include #include #include -#if __FreeBSD_version >= 300000 -# include -#endif #if defined(linux) || defined(__osf__) || defined(__sgi) || defined(__hpux) # include #endif Modified: head/contrib/ipfilter/tools/ipfs.c ============================================================================== --- head/contrib/ipfilter/tools/ipfs.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/contrib/ipfilter/tools/ipfs.c Mon Apr 6 09:42:23 2015 (r281143) @@ -33,9 +33,6 @@ #include #include #include -#if __FreeBSD_version >= 300000 -# include -#endif #include #include #include Modified: head/contrib/ipfilter/tools/ipnat.c ============================================================================== --- head/contrib/ipfilter/tools/ipnat.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/contrib/ipfilter/tools/ipnat.c Mon Apr 6 09:42:23 2015 (r281143) @@ -37,9 +37,6 @@ #include #include #include -#if __FreeBSD_version >= 300000 -# include -#endif #include #include #include Modified: head/contrib/ipfilter/tools/ipnat_y.y ============================================================================== --- head/contrib/ipfilter/tools/ipnat_y.y Mon Apr 6 09:15:18 2015 (r281142) +++ head/contrib/ipfilter/tools/ipnat_y.y Mon Apr 6 09:42:23 2015 (r281143) @@ -35,9 +35,6 @@ #include #include #include -#if __FreeBSD_version >= 300000 -# include -#endif #include #include #include Modified: head/contrib/ipfilter/tools/ippool.c ============================================================================== --- head/contrib/ipfilter/tools/ippool.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/contrib/ipfilter/tools/ippool.c Mon Apr 6 09:42:23 2015 (r281143) @@ -15,9 +15,6 @@ #include #include -#if __FreeBSD_version >= 300000 -# include -#endif #include #include Modified: head/contrib/ipfilter/tools/ippool_y.y ============================================================================== --- head/contrib/ipfilter/tools/ippool_y.y Mon Apr 6 09:15:18 2015 (r281142) +++ head/contrib/ipfilter/tools/ippool_y.y Mon Apr 6 09:42:23 2015 (r281143) @@ -16,9 +16,6 @@ #include #include -#if __FreeBSD_version >= 300000 -# include -#endif #include #include Modified: head/lib/libc/net/getaddrinfo.c ============================================================================== --- head/lib/libc/net/getaddrinfo.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/lib/libc/net/getaddrinfo.c Mon Apr 6 09:42:23 2015 (r281143) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #include #include #ifdef INET6 -#include #include #include #include Modified: head/lib/libc/net/name6.c ============================================================================== --- head/lib/libc/net/name6.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/lib/libc/net/name6.c Mon Apr 6 09:42:23 2015 (r281143) @@ -94,7 +94,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef INET6 #include -#include #include #include #include /* XXX */ Modified: head/sbin/ifconfig/af_inet.c ============================================================================== --- head/sbin/ifconfig/af_inet.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/sbin/ifconfig/af_inet.c Mon Apr 6 09:42:23 2015 (r281143) @@ -46,7 +46,6 @@ static const char rcsid[] = #include #include -#include /* for struct ifaddr */ #include #include #include Modified: head/sbin/ifconfig/af_inet6.c ============================================================================== --- head/sbin/ifconfig/af_inet6.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/sbin/ifconfig/af_inet6.c Mon Apr 6 09:42:23 2015 (r281143) @@ -48,7 +48,6 @@ static const char rcsid[] = #include #include -#include /* for struct ifaddr */ #include #include #include Modified: head/sbin/ifconfig/af_nd6.c ============================================================================== --- head/sbin/ifconfig/af_nd6.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/sbin/ifconfig/af_nd6.c Mon Apr 6 09:42:23 2015 (r281143) @@ -46,7 +46,6 @@ static const char rcsid[] = #include #include -#include #include #include #include Modified: head/sbin/ifconfig/carp.c ============================================================================== --- head/sbin/ifconfig/carp.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/sbin/ifconfig/carp.c Mon Apr 6 09:42:23 2015 (r281143) @@ -36,7 +36,6 @@ #include #include -#include #include #include #include Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/sbin/ifconfig/ifconfig.c Mon Apr 6 09:42:23 2015 (r281143) @@ -51,7 +51,6 @@ static const char rcsid[] = #include #include -#include #include #include #include Modified: head/sbin/ifconfig/ifvlan.c ============================================================================== --- head/sbin/ifconfig/ifvlan.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/sbin/ifconfig/ifvlan.c Mon Apr 6 09:42:23 2015 (r281143) @@ -40,7 +40,6 @@ #include #include -#include #include #include Modified: head/sbin/ifconfig/ifvxlan.c ============================================================================== --- head/sbin/ifconfig/ifvxlan.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/sbin/ifconfig/ifvxlan.c Mon Apr 6 09:42:23 2015 (r281143) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/tools/tools/ath/athratestats/main.c ============================================================================== --- head/tools/tools/ath/athratestats/main.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/tools/tools/ath/athratestats/main.c Mon Apr 6 09:42:23 2015 (r281143) @@ -38,7 +38,6 @@ #include #include #include -#include #include #include Modified: head/tools/tools/cxgbtool/cxgbtool.c ============================================================================== --- head/tools/tools/cxgbtool/cxgbtool.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/tools/tools/cxgbtool/cxgbtool.c Mon Apr 6 09:42:23 2015 (r281143) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/tools/tools/iwn/iwnstats/iwn_ioctl.c ============================================================================== --- head/tools/tools/iwn/iwnstats/iwn_ioctl.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/tools/tools/iwn/iwnstats/iwn_ioctl.c Mon Apr 6 09:42:23 2015 (r281143) @@ -38,7 +38,6 @@ #include #include #include -#include #include #include Modified: head/usr.bin/bluetooth/btsockstat/btsockstat.c ============================================================================== --- head/usr.bin/bluetooth/btsockstat/btsockstat.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.bin/bluetooth/btsockstat/btsockstat.c Mon Apr 6 09:42:23 2015 (r281143) @@ -38,7 +38,6 @@ #include #include -#include #include #include Modified: head/usr.bin/kdump/mkioctls ============================================================================== --- head/usr.bin/kdump/mkioctls Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.bin/kdump/mkioctls Mon Apr 6 09:42:23 2015 (r281143) @@ -54,7 +54,6 @@ BEGIN { print "#include " print "#include " print "#include " - print "#include " print "#ifdef PF" print "#include " print "#include " Modified: head/usr.bin/netstat/bpf.c ============================================================================== --- head/usr.bin/netstat/bpf.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.bin/netstat/bpf.c Mon Apr 6 09:42:23 2015 (r281143) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/usr.bin/netstat/if.c ============================================================================== --- head/usr.bin/netstat/if.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.bin/netstat/if.c Mon Apr 6 09:42:23 2015 (r281143) @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/usr.bin/netstat/inet6.c ============================================================================== --- head/usr.bin/netstat/inet6.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.bin/netstat/inet6.c Mon Apr 6 09:42:23 2015 (r281143) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/usr.sbin/amd/include/config.h ============================================================================== --- head/usr.sbin/amd/include/config.h Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/amd/include/config.h Mon Apr 6 09:42:23 2015 (r281143) @@ -668,9 +668,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_NET_IF_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_VAR_H 1 - /* Define to 1 if you have the header file. */ #define HAVE_NET_ROUTE_H 1 Modified: head/usr.sbin/ancontrol/ancontrol.c ============================================================================== --- head/usr.sbin/ancontrol/ancontrol.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/ancontrol/ancontrol.c Mon Apr 6 09:42:23 2015 (r281143) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/usr.sbin/ifmcstat/ifmcstat.c ============================================================================== --- head/usr.sbin/ifmcstat/ifmcstat.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/ifmcstat/ifmcstat.c Mon Apr 6 09:42:23 2015 (r281143) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/usr.sbin/ip6addrctl/ip6addrctl.c ============================================================================== --- head/usr.sbin/ip6addrctl/ip6addrctl.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/ip6addrctl/ip6addrctl.c Mon Apr 6 09:42:23 2015 (r281143) @@ -39,7 +39,6 @@ #include #include -#include #include #include Modified: head/usr.sbin/mld6query/mld6.c ============================================================================== --- head/usr.sbin/mld6query/mld6.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/mld6query/mld6.c Mon Apr 6 09:42:23 2015 (r281143) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/usr.sbin/ndp/ndp.c ============================================================================== --- head/usr.sbin/ndp/ndp.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/ndp/ndp.c Mon Apr 6 09:42:23 2015 (r281143) @@ -83,7 +83,6 @@ #include #include -#include #include #include #include Modified: head/usr.sbin/ntp/config.h ============================================================================== --- head/usr.sbin/ntp/config.h Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/ntp/config.h Mon Apr 6 09:42:23 2015 (r281143) @@ -613,9 +613,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_NET_IF_H 1 -/* Define to 1 if you have the header file. */ -#define HAVE_NET_IF_VAR_H 1 - /* Define to 1 if you have the header file. */ #define HAVE_NET_ROUTE_H 1 Modified: head/usr.sbin/ppp/iface.c ============================================================================== --- head/usr.sbin/ppp/iface.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/ppp/iface.c Mon Apr 6 09:42:23 2015 (r281143) @@ -31,9 +31,6 @@ #include #include #include -#ifdef __FreeBSD__ -#include -#endif #include #include #include Modified: head/usr.sbin/rip6query/rip6query.c ============================================================================== --- head/usr.sbin/rip6query/rip6query.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/rip6query/rip6query.c Mon Apr 6 09:42:23 2015 (r281143) @@ -46,9 +46,6 @@ #include #include -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 -#include -#endif /* __FreeBSD__ >= 3 */ #include #include #include Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/route6d/route6d.c Mon Apr 6 09:42:23 2015 (r281143) @@ -63,7 +63,6 @@ static const char _rcsid[] = "$KAME: rou #include #include #include -#include #include #include #include Modified: head/usr.sbin/rrenumd/lexer.l ============================================================================== --- head/usr.sbin/rrenumd/lexer.l Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/rrenumd/lexer.l Mon Apr 6 09:42:23 2015 (r281143) @@ -40,10 +40,6 @@ #include #include -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 -#include -#endif /* __FreeBSD__ >= 3 */ - #include #include #include Modified: head/usr.sbin/rrenumd/parser.y ============================================================================== --- head/usr.sbin/rrenumd/parser.y Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/rrenumd/parser.y Mon Apr 6 09:42:23 2015 (r281143) @@ -39,9 +39,6 @@ #include #include -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 -#include -#endif /* __FreeBSD__ >= 3 */ #include #include Modified: head/usr.sbin/rtadvctl/rtadvctl.c ============================================================================== --- head/usr.sbin/rtadvctl/rtadvctl.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/rtadvctl/rtadvctl.c Mon Apr 6 09:42:23 2015 (r281143) @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include Modified: head/usr.sbin/rtadvd/config.c ============================================================================== --- head/usr.sbin/rtadvd/config.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/rtadvd/config.c Mon Apr 6 09:42:23 2015 (r281143) @@ -36,7 +36,6 @@ #include #include -#include #include #include Modified: head/usr.sbin/rtadvd/if.c ============================================================================== --- head/usr.sbin/rtadvd/if.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/rtadvd/if.c Mon Apr 6 09:42:23 2015 (r281143) @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include Modified: head/usr.sbin/rtadvd/rrenum.c ============================================================================== --- head/usr.sbin/rtadvd/rrenum.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/rtadvd/rrenum.c Mon Apr 6 09:42:23 2015 (r281143) @@ -37,7 +37,6 @@ #include #include -#include #include #include #include Modified: head/usr.sbin/rtadvd/rtadvd.c ============================================================================== --- head/usr.sbin/rtadvd/rtadvd.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/rtadvd/rtadvd.c Mon Apr 6 09:42:23 2015 (r281143) @@ -51,7 +51,6 @@ #include -#include #include #include Modified: head/usr.sbin/rtsold/if.c ============================================================================== --- head/usr.sbin/rtsold/if.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/rtsold/if.c Mon Apr 6 09:42:23 2015 (r281143) @@ -38,7 +38,6 @@ #include #include -#include #include #include #include Modified: head/usr.sbin/rtsold/probe.c ============================================================================== --- head/usr.sbin/rtsold/probe.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/rtsold/probe.c Mon Apr 6 09:42:23 2015 (r281143) @@ -40,7 +40,6 @@ #include #include -#include #include #include Modified: head/usr.sbin/rtsold/rtsold.c ============================================================================== --- head/usr.sbin/rtsold/rtsold.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/rtsold/rtsold.c Mon Apr 6 09:42:23 2015 (r281143) @@ -38,7 +38,6 @@ #include #include -#include #include #include Modified: head/usr.sbin/uhsoctl/uhsoctl.c ============================================================================== --- head/usr.sbin/uhsoctl/uhsoctl.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/uhsoctl/uhsoctl.c Mon Apr 6 09:42:23 2015 (r281143) @@ -37,7 +37,6 @@ #include #include -#include #include #include #include Modified: head/usr.sbin/wpa/ndis_events/ndis_events.c ============================================================================== --- head/usr.sbin/wpa/ndis_events/ndis_events.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/wpa/ndis_events/ndis_events.c Mon Apr 6 09:42:23 2015 (r281143) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/usr.sbin/wpa/wpa_supplicant/Packet32.c ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/Packet32.c Mon Apr 6 09:15:18 2015 (r281142) +++ head/usr.sbin/wpa/wpa_supplicant/Packet32.c Mon Apr 6 09:42:23 2015 (r281143) @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 12:22:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EAD483B; Mon, 6 Apr 2015 12:22:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 397C0FBB; Mon, 6 Apr 2015 12:22:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36CMfqk000146; Mon, 6 Apr 2015 12:22:41 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36CMff7000145; Mon, 6 Apr 2015 12:22:41 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201504061222.t36CMff7000145@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Mon, 6 Apr 2015 12:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281145 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 12:22:42 -0000 Author: tychon Date: Mon Apr 6 12:22:41 2015 New Revision: 281145 URL: https://svnweb.freebsd.org/changeset/base/281145 Log: Enhance the support for Group 1 Extended opcodes: * Implemement the 0x81 and 0x83 CMP instructions. * Implemement the 0x83 AND instruction. * Implemement the 0x81 OR instruction. Reviewed by: neel Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Mon Apr 6 09:52:16 2015 (r281144) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Mon Apr 6 12:22:41 2015 (r281145) @@ -71,6 +71,7 @@ enum { VIE_OP_TYPE_CMP, VIE_OP_TYPE_POP, VIE_OP_TYPE_MOVS, + VIE_OP_TYPE_GROUP1, VIE_OP_TYPE_LAST }; @@ -161,15 +162,15 @@ static const struct vie_op one_byte_opco .op_type = VIE_OP_TYPE_AND, }, [0x81] = { - /* XXX Group 1 extended opcode - not just AND */ + /* XXX Group 1 extended opcode */ .op_byte = 0x81, - .op_type = VIE_OP_TYPE_AND, + .op_type = VIE_OP_TYPE_GROUP1, .op_flags = VIE_OP_F_IMM, }, [0x83] = { - /* XXX Group 1 extended opcode - not just OR */ + /* XXX Group 1 extended opcode */ .op_byte = 0x83, - .op_type = VIE_OP_TYPE_OR, + .op_type = VIE_OP_TYPE_GROUP1, .op_flags = VIE_OP_F_IMM8, }, [0x8F] = { @@ -839,16 +840,18 @@ emulate_and(void *vm, int vcpuid, uint64 error = vie_update_register(vm, vcpuid, reg, result, size); break; case 0x81: + case 0x83: /* - * AND/OR mem (ModRM:r/m) with immediate and store the + * AND mem (ModRM:r/m) with immediate and store the * result in mem. * - * AND: i = 4 - * OR: i = 1 - * 81 /i op r/m16, imm16 - * 81 /i op r/m32, imm32 - * REX.W + 81 /i op r/m64, imm32 sign-extended to 64 + * 81 /4 and r/m16, imm16 + * 81 /4 and r/m32, imm32 + * REX.W + 81 /4 and r/m64, imm32 sign-extended to 64 * + * 83 /4 and r/m16, imm8 sign-extended to 16 + * 83 /4 and r/m32, imm8 sign-extended to 32 + * REX.W + 83/4 and r/m64, imm8 sign-extended to 64 */ /* get the first operand */ @@ -857,26 +860,11 @@ emulate_and(void *vm, int vcpuid, uint64 break; /* - * perform the operation with the pre-fetched immediate - * operand and write the result - */ - switch (vie->reg & 7) { - case 0x4: - /* modrm:reg == b100, AND */ - result = val1 & vie->immediate; - break; - case 0x1: - /* modrm:reg == b001, OR */ - result = val1 | vie->immediate; - break; - default: - error = EINVAL; - break; - } - if (error) - break; - - error = memwrite(vm, vcpuid, gpa, result, size, arg); + * perform the operation with the pre-fetched immediate + * operand and write the result + */ + result = val1 & vie->immediate; + error = memwrite(vm, vcpuid, gpa, result, size, arg); break; default: break; @@ -913,20 +901,20 @@ emulate_or(void *vm, int vcpuid, uint64_ error = EINVAL; switch (vie->op.op_byte) { + case 0x81: case 0x83: /* * OR mem (ModRM:r/m) with immediate and store the * result in mem. * - * 83 /1 OR r/m16, imm8 sign-extended to 16 - * 83 /1 OR r/m32, imm8 sign-extended to 32 - * REX.W + 83/1 OR r/m64, imm8 sign-extended to 64 + * 81 /1 or r/m16, imm16 + * 81 /1 or r/m32, imm32 + * REX.W + 81 /1 or r/m64, imm32 sign-extended to 64 * - * Currently, only the OR operation of the 0x83 opcode - * is implemented (ModRM:reg = b001). + * 83 /1 or r/m16, imm8 sign-extended to 16 + * 83 /1 or r/m32, imm8 sign-extended to 32 + * REX.W + 83/1 or r/m64, imm8 sign-extended to 64 */ - if ((vie->reg & 7) != 1) - break; /* get the first operand */ error = memread(vm, vcpuid, gpa, &val1, size, arg); @@ -997,11 +985,37 @@ emulate_cmp(void *vm, int vcpuid, uint64 if (error) return (error); + rflags2 = getcc(size, op1, op2); + break; + case 0x81: + case 0x83: + /* + * 81 /7 cmp r/m16, imm16 + * 81 /7 cmp r/m32, imm32 + * REX.W + 81 /7 cmp r/m64, imm32 sign-extended to 64 + * + * 83 /7 cmp r/m16, imm8 sign-extended to 16 + * 83 /7 cmp r/m32, imm8 sign-extended to 32 + * REX.W + 83 /7 cmp r/m64, imm8 sign-extended to 64 + * + * Compare mem (ModRM:r/m) with immediate and set + * status flags according to the results. The + * comparison is performed by subtracting the + * immediate from the first operand and then setting + * the status flags. + * + */ + + /* get the first operand */ + error = memread(vm, vcpuid, gpa, &op1, size, arg); + if (error) + return (error); + + rflags2 = getcc(size, op1, vie->immediate); break; default: return (EINVAL); } - rflags2 = getcc(size, op1, op2); error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RFLAGS, &rflags); if (error) return (error); @@ -1220,6 +1234,34 @@ emulate_pop(void *vm, int vcpuid, uint64 return (error); } +static int +emulate_group1(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, + struct vm_guest_paging *paging, mem_region_read_t memread, + mem_region_write_t memwrite, void *memarg) +{ + int error; + + switch (vie->reg & 7) { + case 0x1: /* OR */ + error = emulate_or(vm, vcpuid, gpa, vie, + memread, memwrite, memarg); + break; + case 0x4: /* AND */ + error = emulate_and(vm, vcpuid, gpa, vie, + memread, memwrite, memarg); + break; + case 0x7: /* CMP */ + error = emulate_cmp(vm, vcpuid, gpa, vie, + memread, memwrite, memarg); + break; + default: + error = EINVAL; + break; + } + + return (error); +} + int vmm_emulate_instruction(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, struct vm_guest_paging *paging, mem_region_read_t memread, @@ -1231,6 +1273,10 @@ vmm_emulate_instruction(void *vm, int vc return (EINVAL); switch (vie->op.op_type) { + case VIE_OP_TYPE_GROUP1: + error = emulate_group1(vm, vcpuid, gpa, vie, paging, memread, + memwrite, memarg); + break; case VIE_OP_TYPE_POP: error = emulate_pop(vm, vcpuid, gpa, vie, paging, memread, memwrite, memarg); From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 12:36:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEAABAC6; Mon, 6 Apr 2015 12:36:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA569124; Mon, 6 Apr 2015 12:36:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36CaPTW005356; Mon, 6 Apr 2015 12:36:25 GMT (envelope-from rakuco@FreeBSD.org) Received: (from rakuco@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36CaPOC005355; Mon, 6 Apr 2015 12:36:25 GMT (envelope-from rakuco@FreeBSD.org) Message-Id: <201504061236.t36CaPOC005355@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rakuco set sender to rakuco@FreeBSD.org using -f From: Raphael Kubo da Costa Date: Mon, 6 Apr 2015 12:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281146 - head/usr.sbin/bluetooth/bthidd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 12:36:26 -0000 Author: rakuco (ports committer) Date: Mon Apr 6 12:36:24 2015 New Revision: 281146 URL: https://svnweb.freebsd.org/changeset/base/281146 Log: bthidd: Remove unused macros from hid.c. ASIZE() was never used, and min() stopped being used in r207812. Differential Revision: https://reviews.freebsd.org/D2230 Reviewed by: emax Approved by: emax MFC after: 1 week Modified: head/usr.sbin/bluetooth/bthidd/hid.c Modified: head/usr.sbin/bluetooth/bthidd/hid.c ============================================================================== --- head/usr.sbin/bluetooth/bthidd/hid.c Mon Apr 6 12:22:41 2015 (r281145) +++ head/usr.sbin/bluetooth/bthidd/hid.c Mon Apr 6 12:36:24 2015 (r281146) @@ -48,12 +48,6 @@ #include "bthidd.h" #include "kbd.h" -#undef min -#define min(x, y) (((x) < (y))? (x) : (y)) - -#undef ASIZE -#define ASIZE(a) (sizeof(a)/sizeof(a[0])) - /* * Process data from control channel */ From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 13:55:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB56CEB2; Mon, 6 Apr 2015 13:55:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A63E6BCA; Mon, 6 Apr 2015 13:55:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36DtYO0043561; Mon, 6 Apr 2015 13:55:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36DtYxB043560; Mon, 6 Apr 2015 13:55:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504061355.t36DtYxB043560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 6 Apr 2015 13:55:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281147 - head/lib/libelftc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 13:55:34 -0000 Author: emaste Date: Mon Apr 6 13:55:33 2015 New Revision: 281147 URL: https://svnweb.freebsd.org/changeset/base/281147 Log: Update reported elftoolchain version to 3179 Missed in r280932 Modified: head/lib/libelftc/elftc_version.c Modified: head/lib/libelftc/elftc_version.c ============================================================================== --- head/lib/libelftc/elftc_version.c Mon Apr 6 12:36:24 2015 (r281146) +++ head/lib/libelftc/elftc_version.c Mon Apr 6 13:55:33 2015 (r281147) @@ -6,5 +6,5 @@ const char * elftc_version(void) { - return "elftoolchain r3163M"; + return "elftoolchain r3179M"; } From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 15:31:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52046AFF; Mon, 6 Apr 2015 15:31:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22ED4836; Mon, 6 Apr 2015 15:31:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36FVKTf098044; Mon, 6 Apr 2015 15:31:20 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36FVJwL098042; Mon, 6 Apr 2015 15:31:20 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504061531.t36FVJwL098042@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 6 Apr 2015 15:31:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281152 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 15:31:20 -0000 Author: glebius Date: Mon Apr 6 15:31:19 2015 New Revision: 281152 URL: https://svnweb.freebsd.org/changeset/base/281152 Log: Add sleepable lock to protect at least against two parallel SIOCSVHs. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Mon Apr 6 15:22:32 2015 (r281151) +++ head/sys/netinet/ip_carp.c Mon Apr 6 15:31:19 2015 (r281152) @@ -180,9 +180,6 @@ static int proto_reg[] = {-1, -1}; * * Known issues with locking: * - * - There is no protection for races between two ioctl() requests, - * neither SIOCSVH, nor SIOCAIFADDR & SIOCAIFADDR_IN6. I think that all - * interface ioctl()s should be serialized right in net/if.c. * - Sending ad, we put the pointer to the softc in an mtag, and no reference * counting is done on the softc. * - On module unload we may race (?) with packet processing thread @@ -321,6 +318,7 @@ static void carp_demote_adj(int, char *) static LIST_HEAD(, carp_softc) carp_list; static struct mtx carp_mtx; +static struct sx carp_sx; static struct task carp_sendall_task = TASK_INITIALIZER(0, carp_send_ad_all, NULL); @@ -1650,6 +1648,7 @@ carp_ioctl(struct ifreq *ifr, u_long cmd goto out; } + sx_xlock(&carp_sx); switch (cmd) { case SIOCSVH: if ((error = priv_check(td, PRIV_NETINET_CARP))) @@ -1780,6 +1779,7 @@ carp_ioctl(struct ifreq *ifr, u_long cmd default: error = EINVAL; } + sx_xunlock(&carp_sx); out: if (locked) @@ -2099,6 +2099,7 @@ carp_mod_cleanup(void) mtx_unlock(&carp_mtx); taskqueue_drain(taskqueue_swi, &carp_sendall_task); mtx_destroy(&carp_mtx); + sx_destroy(&carp_sx); } static int @@ -2107,6 +2108,7 @@ carp_mod_load(void) int err; mtx_init(&carp_mtx, "carp_mtx", NULL, MTX_DEF); + sx_init(&carp_sx, "carp_sx"); LIST_INIT(&carp_list); carp_get_vhid_p = carp_get_vhid; carp_forus_p = carp_forus; From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 15:50:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCFAB4D5; Mon, 6 Apr 2015 15:50:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4970A32; Mon, 6 Apr 2015 15:50:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36FoQlZ005845; Mon, 6 Apr 2015 15:50:26 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36FoLN1005813; Mon, 6 Apr 2015 15:50:21 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504061550.t36FoLN1005813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Apr 2015 15:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281156 - in head/sys: arm/include boot/efi boot/efi/boot1 boot/efi/include/arm boot/efi/loader boot/efi/loader/arch/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 15:50:27 -0000 Author: andrew Date: Mon Apr 6 15:50:20 2015 New Revision: 281156 URL: https://svnweb.freebsd.org/changeset/base/281156 Log: Add support to the efi boot1 and loader for 32-bit ARM. This will be used by the future qemu virt support. Differential Revision: https://reviews.freebsd.org/D2238 Reviewed by: emaste Added: head/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu - copied, changed from r281154, head/sys/boot/efi/boot1/fat.tmpl.bz2.uu head/sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu (contents, props changed) head/sys/boot/efi/include/arm/ head/sys/boot/efi/include/arm/efibind.h (contents, props changed) head/sys/boot/efi/loader/arch/arm/ head/sys/boot/efi/loader/arch/arm/Makefile.inc (contents, props changed) head/sys/boot/efi/loader/arch/arm/exec.c (contents, props changed) head/sys/boot/efi/loader/arch/arm/ldscript.arm (contents, props changed) head/sys/boot/efi/loader/arch/arm/reloc.c (contents, props changed) head/sys/boot/efi/loader/arch/arm/start.S (contents, props changed) Deleted: head/sys/boot/efi/boot1/fat.tmpl.bz2.uu Modified: head/sys/arm/include/metadata.h head/sys/boot/efi/Makefile head/sys/boot/efi/boot1/Makefile head/sys/boot/efi/boot1/generate-fat.sh head/sys/boot/efi/loader/Makefile head/sys/boot/efi/loader/bootinfo.c head/sys/boot/efi/loader/copy.c Modified: head/sys/arm/include/metadata.h ============================================================================== --- head/sys/arm/include/metadata.h Mon Apr 6 15:45:45 2015 (r281155) +++ head/sys/arm/include/metadata.h Mon Apr 6 15:50:20 2015 (r281156) @@ -31,5 +31,12 @@ #define MODINFOMD_BOOTINFO 0x1001 #define MODINFOMD_DTBP 0x1002 +#define MODINFOMD_EFI_MAP 0x1003 + +struct efi_map_header { + uint64_t memory_size; + uint64_t descriptor_size; + uint32_t descriptor_version; +}; #endif /* !_MACHINE_METADATA_H_ */ Modified: head/sys/boot/efi/Makefile ============================================================================== --- head/sys/boot/efi/Makefile Mon Apr 6 15:45:45 2015 (r281155) +++ head/sys/boot/efi/Makefile Mon Apr 6 15:50:20 2015 (r281156) @@ -10,7 +10,7 @@ SUBDIR+= fdt .endif .endif -.if ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "arm" SUBDIR+= loader boot1 .endif Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Mon Apr 6 15:45:45 2015 (r281155) +++ head/sys/boot/efi/boot1/Makefile Mon Apr 6 15:50:20 2015 (r281156) @@ -36,6 +36,14 @@ LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymboli LDFLAGS+= -Wl,-znocombreloc .endif +.if ${MACHINE_CPUARCH} == "arm" +# +# Add libstand for the __aeabi_* functions used by the compiler +# +DPADD+= ${LIBSTAND} +LDADD+= -lstand +.endif + ${PROG}: ${LDSCRIPT} OBJCOPY?= objcopy @@ -45,6 +53,8 @@ OBJDUMP?= objdump EFI_TARGET= efi-app-x86_64 .elif ${MACHINE_CPUARCH} == "i386" EFI_TARGET= efi-app-ia32 +.else +EFI_TARGET= binary .endif boot1.efi: loader.sym @@ -52,7 +62,7 @@ boot1.efi: loader.sym ${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \ exit 1; \ fi - ${OBJCOPY} -j .text -j .sdata -j .data \ + ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \ -j .dynamic -j .dynsym -j .rel.dyn \ -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} @@ -66,8 +76,8 @@ boot1.o: ${.CURDIR}/../../common/ufsread boot1.efifat: boot1.efi echo ${.OBJDIR} - uudecode ${.CURDIR}/fat.tmpl.bz2.uu - mv fat.tmpl.bz2 ${.TARGET}.bz2 + uudecode ${.CURDIR}/fat-${MACHINE_CPUARCH}.tmpl.bz2.uu + mv fat-${MACHINE_CPUARCH}.tmpl.bz2 ${.TARGET}.bz2 bzip2 -f -d ${.TARGET}.bz2 dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc Copied and modified: head/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu (from r281154, head/sys/boot/efi/boot1/fat.tmpl.bz2.uu) ============================================================================== --- head/sys/boot/efi/boot1/fat.tmpl.bz2.uu Mon Apr 6 15:44:09 2015 (r281154, copy source) +++ head/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu Mon Apr 6 15:50:20 2015 (r281156) @@ -1,7 +1,7 @@ FAT template boot filesystem created by generate-fat.sh DO NOT EDIT $FreeBSD$ -begin 644 fat.tmpl.bz2 +begin 644 fat-amd64.tmpl.bz2 M0EIH.3%!629362AK*D(`&I+____[ZZKJZ_^N_ZO^Z_Z_OJ[L`4`!7I0$#&$" M0$!$3&(I-DTU,)ZAZ0VA-!M0T'J`>H#"9 Added: head/sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu Mon Apr 6 15:50:20 2015 (r281156) @@ -0,0 +1,26 @@ +FAT template boot filesystem created by generate-fat.sh +DO NOT EDIT +$FreeBSD$ +begin 644 fat-arm.tmpl.bz2 +M0EIH.3%!629365NH-?4`&T!_____ZZ[J[_ZN_ZO^J_Z[OJ_^J^J[^KZNKNNJ +MZNKNZOJ^P`+\#$``0`&AD:,@TTTT-&C30#$R&FF1H:!B&)D&F@```-&AB::# +M1HP0-,AD`T8F(TTP2JII&?^I5/]4`@TTT-&(T8FAB:&@T:8F(Q!@!`9,1DR9 +M`-,$:,FC)B&FC"8"#3"#(-,0`&AD:,@TTTT-&C30#$R&FF1H:!B&)D&F@``` +M-&AB::#1HP0-,AD`T8F(TTP*HI)D\DFDVC0AIIH]3(:-``80>HTTR!IH::#$ +M-`Q`:`/2:::&)IDP"/0$T:>IFD]$R8---3HUK2*K9].C:!IWS-2UK9M.3@8,&#!@P8(0A"$(0@0A"$(0[;_L-&C1HT:-&B+YP +M,&#!@P8,$"$(0A"-?NW$*YY:V9IQ,:B93+AX^A7B),5HN_4JV=2\Y,:-+W'Q +MKQKVU7KA+YR'.:*V#48N-"7<`%:TT4D`/;N;SZM9X,V(@!D'=P==+O)9*\H8 +MI8WIM*Q<2E)KFG;%M&U;INV]<)Q%^P'*<]T6R; +M^7`P.+I+N(HA%=#(^Q0WVV0]=$2=5)>-XWKW7!95E7$<5QW) +#else +// +// Assume standard IA-32 alignment. +// BugBug: Need to check portability of long long +// +typedef unsigned long long uint64_t; +typedef long long int64_t; +typedef unsigned int uint32_t; +typedef int int32_t; +typedef unsigned short uint16_t; +typedef short int16_t; +typedef unsigned char uint8_t; +typedef signed char int8_t; +#endif + +typedef uint64_t UINT64; +typedef int64_t INT64; +typedef uint32_t UINT32; +typedef int32_t INT32; +typedef uint16_t UINT16; +typedef int16_t INT16; +typedef uint8_t UINT8; +typedef int8_t INT8; + +#undef VOID +#define VOID void + +// +// Native integer size in stdint.h +// +typedef uint32_t UINTN; +typedef int32_t INTN; + +#define EFIERR(a) (0x80000000 | a) +#define EFI_ERROR_MASK 0x80000000 +#define EFIERR_OEM(a) (0xc0000000 | a) + +// +// Processor specific defines +// +#define EFI_MAX_BIT 0x80000000 +#define MAX_2_BITS 0xC0000000 + +// +// Maximum legal IA-32 address +// +#define EFI_MAX_ADDRESS 0xFFFFFFFF + +// +// Bad pointer value to use in check builds. +// if you see this value you are using uninitialized or free'ed data +// +#define EFI_BAD_POINTER 0xAFAFAFAF +#define EFI_BAD_POINTER_AS_BYTE 0xAF + +#define EFI_DEADLOOP() { volatile UINTN __iii; __iii = 1; while (__iii); } + +// +// Inject a break point in the code to assist debugging for NT Emulation Environment +// For real hardware, just put in a halt loop. Don't do a while(1) because the +// compiler will optimize away the rest of the function following, so that you run out in +// the weeds if you skip over it with a debugger. +// +#define EFI_BREAKPOINT EFI_DEADLOOP() + + +// +// Memory Fence forces serialization, and is needed to support out of order +// memory transactions. The Memory Fence is mainly used to make sure IO +// transactions complete in a deterministic sequence, and to syncronize locks +// an other MP code. Currently no memory fencing is required. +// +#define MEMORY_FENCE() + +// +// Some compilers don't support the forward reference construct: +// typedef struct XXXXX. The forward reference is required for +// ANSI compatibility. +// +// The following macro provide a workaround for such cases. +// + + +#ifdef EFI_NO_INTERFACE_DECL + #define EFI_FORWARD_DECLARATION(x) +#else + #define EFI_FORWARD_DECLARATION(x) typedef struct _##x x +#endif + + +// +// Some C compilers optimize the calling conventions to increase performance. +// EFIAPI is used to make all public APIs follow the standard C calling +// convention. +// +#define EFIAPI + + + +// +// For symbol name in GNU assembly code, an extra "_" is necessary +// +#if defined(__GNUC__) + /// + /// Private worker functions for ASM_PFX() + /// + #define _CONCATENATE(a, b) __CONCATENATE(a, b) + #define __CONCATENATE(a, b) a ## b + + /// + /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix + /// on symbols in assembly language. + /// + #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name) + +#endif + +#define INTERFACE_DECL(x) struct x + +#endif Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Mon Apr 6 15:45:45 2015 (r281155) +++ head/sys/boot/efi/loader/Makefile Mon Apr 6 15:50:20 2015 (r281156) @@ -87,6 +87,8 @@ OBJDUMP?= objdump EFI_TARGET= efi-app-x86_64 .elif ${MACHINE_CPUARCH} == "i386" EFI_TARGET= efi-app-ia32 +.else +EFI_TARGET= binary .endif loader.efi: loader.sym @@ -94,7 +96,7 @@ loader.efi: loader.sym ${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \ exit 1; \ fi - ${OBJCOPY} -j .text -j .sdata -j .data \ + ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \ -j .dynamic -j .dynsym -j .rel.dyn \ -j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \ --output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET} Added: head/sys/boot/efi/loader/arch/arm/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/arm/Makefile.inc Mon Apr 6 15:50:20 2015 (r281156) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +SRCS+= exec.c \ + start.S \ + reloc.c Added: head/sys/boot/efi/loader/arch/arm/exec.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/arm/exec.c Mon Apr 6 15:50:20 2015 (r281156) @@ -0,0 +1,107 @@ +/*- + * Copyright (c) 2001 Benno Rice + * Copyright (c) 2007 Semihalf, Rafal Jaworowski + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include "bootstrap.h" +#include "loader_efi.h" + +extern vm_offset_t md_load(char *, vm_offset_t *); + +int +__elfN(arm_load)(char *filename, u_int64_t dest, + struct preloaded_file **result) +{ + int r; + + r = __elfN(loadfile)(filename, dest, result); + if (r != 0) + return (r); + + return (0); +} + +int +__elfN(arm_exec)(struct preloaded_file *fp) +{ + struct file_metadata *fmp; + vm_offset_t modulep, kernend; + Elf_Ehdr *e; + int error; + void (*entry)(void *); + EFI_STATUS status; + + if ((fmp = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) + return (EFTYPE); + + e = (Elf_Ehdr *)&fmp->md_data; + + if ((error = bi_load(fp->f_args, &modulep, &kernend)) != 0) + return (error); + + entry = efi_translate(e->e_entry); + printf("Kernel entry at 0x%x...\n", (unsigned)entry); + printf("Kernel args: %s\n", fp->f_args); + printf("modulep: %#x\n", modulep); + printf("relocation_offset %llx\n", __elfN(relocation_offset)); + + status = BS->ExitBootServices(IH, efi_mapkey); + if (EFI_ERROR(status)) { + printf("%s: ExitBootServices() returned 0x%lx\n", __func__, + (long)status); + return (EINVAL); + } + + dev_cleanup(); + + (*entry)((void *)modulep); + panic("exec returned"); +} + +static struct file_format arm_elf = { + __elfN(arm_load), + __elfN(arm_exec) +}; + +struct file_format *file_formats[] = { + &arm_elf, + NULL +}; + Added: head/sys/boot/efi/loader/arch/arm/ldscript.arm ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/arm/ldscript.arm Mon Apr 6 15:50:20 2015 (r281156) @@ -0,0 +1,86 @@ +/* $FreeBSD$ */ +OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", + "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +SECTIONS +{ + /* Read-only sections, merged into text segment: */ + . = 0; + ImageBase = .; + .peheader : { + *(.peheader) + } + .text : { + *(.text .stub .text.* .gnu.linkonce.t.*) + /* .gnu.warning sections are handled specially by elf32.em. */ + *(.gnu.warning) + *(.gnu.linkonce.t*) + } =0 + _etext = .; + PROVIDE (etext = .); + . = ALIGN(4096); + .data : + { + *(.data) + *(.gnu.linkonce.d*) + *(.rodata) + *(.rodata.*) + CONSTRUCTORS + } + .data1 : { *(.data1) } + .got1 : { *(.got1) } + .dynamic : { *(.dynamic) } + /* Put .ctors and .dtors next to the .got2 section, so that the pointers + get relocated with -mrelocatable. Also put in the .fixup pointers. + The current compiler no longer needs this, but keep it around for 2.7.2 */ + PROVIDE (_GOT2_START_ = .); + .got2 : { *(.got2) } + PROVIDE (__CTOR_LIST__ = .); + .ctors : { *(.ctors) } + PROVIDE (__CTOR_END__ = .); + PROVIDE (__DTOR_LIST__ = .); + .dtors : { *(.dtors) } + PROVIDE (__DTOR_END__ = .); + PROVIDE (_FIXUP_START_ = .); + .fixup : { *(.fixup) } + PROVIDE (_FIXUP_END_ = .); + PROVIDE (_GOT2_END_ = .); + PROVIDE (_GOT_START_ = .); + .got : { *(.got) } + .got.plt : { *(.got.plt) } + PROVIDE (_GOT_END_ = .); + /* We want the small data sections together, so single-instruction offsets + can access them all, and initialized data all before uninitialized, so + we can shorten the on-disk segment size. */ + .sdata : { *(.sdata) } + _edata = .; + PROVIDE (edata = .); + set_Xcommand_set : { + __start_set_Xcommand_set = .; + *(set_Xcommand_set) + __stop_set_Xcommand_set = .; + } + __gp = .; + PROVIDE (__bss_start = .); + .sbss : + { + *(.sbss) + *(.scommon) + *(.dynsbss) + } + .bss : + { + *(.dynbss) + *(.bss) + *(COMMON) + } + PROVIDE (__bss_end = .); + .plt : { *(.plt) } + .dynamic : { *(.dynamic) } + .reloc : { *(.reloc) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + _edata = .; +} Added: head/sys/boot/efi/loader/arch/arm/reloc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/arm/reloc.c Mon Apr 6 15:50:20 2015 (r281156) @@ -0,0 +1,83 @@ +/*- + * Copyright (c) 2008-2010 Rui Paulo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +/* + * A simple relocator for ARM binaries. + */ +void +_reloc(unsigned long ImageBase, Elf32_Dyn *dynamic) +{ + unsigned long relsz, relent; + unsigned long *newaddr; + Elf32_Rel *rel; + Elf32_Dyn *dynp; + + /* + * Find the relocation address, its size and the relocation entry. + */ + relsz = 0; + relent = 0; + for (dynp = dynamic; dynp->d_tag != DT_NULL; dynp++) { + switch (dynp->d_tag) { + case DT_REL: + rel = (Elf32_Rel *) ((unsigned long) dynp->d_un.d_ptr + + ImageBase); + break; + case DT_RELSZ: + relsz = dynp->d_un.d_val; + break; + case DT_RELENT: + relent = dynp->d_un.d_val; + break; + default: + break; + } + } + + /* + * Perform the actual relocation. + */ + for (; relsz > 0; relsz -= relent) { + switch (ELF32_R_TYPE(rel->r_info)) { + case R_ARM_RELATIVE: + /* Address relative to the base address. */ + newaddr = (unsigned long *)(ImageBase + rel->r_offset); + *newaddr += ImageBase; + break; + default: + /* XXX: do we need other relocations ? */ + break; + } + rel = (Elf32_Rel *) ((caddr_t) rel + relent); + } +} Added: head/sys/boot/efi/loader/arch/arm/start.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/arm/start.S Mon Apr 6 15:50:20 2015 (r281156) @@ -0,0 +1,190 @@ +/*- + * Copyright (c) 2014, 2015 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include + +/* + * We need to be a PE32 file for EFI. On some architectures we can use + * objcopy to create the correct file, however on arm we need to do + * it ourselves. + */ + +#define IMAGE_FILE_MACHINE_ARM 0x01c2 + +#define IMAGE_SCN_CNT_CODE 0x00000020 +#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 +#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 +#define IMAGE_SCN_MEM_EXECUTE 0x20000000 +#define IMAGE_SCN_MEM_READ 0x40000000 + + .section .peheader +efi_start: + /* The MS-DOS Stub, only used to get the offset of the COFF header */ + .ascii "MZ" + .short 0 + .space 0x38 + .long pe_sig - efi_start + + /* The PE32 Signature. Needs to be 8-byte aligned */ + .align 3 +pe_sig: + .ascii "PE" + .short 0 +coff_head: + .short IMAGE_FILE_MACHINE_ARM /* ARM file */ + .short 2 /* 2 Sections */ + .long 0 /* Timestamp */ + .long 0 /* No symbol table */ + .long 0 /* No symbols */ + .short section_table - optional_header /* Optional header size */ + .short 0 /* Characteristics TODO: Fill in */ + +optional_header: + .short 0x010b /* PE32 (32-bit addressing) */ + .byte 0 /* Major linker version */ + .byte 0 /* Minor linker version */ + .long _edata - _end_header /* Code size */ + .long 0 /* No initialized data */ + .long 0 /* No uninitialized data */ + .long _start - efi_start /* Entry point */ + .long _end_header - efi_start /* Start of code */ + .long 0 /* Start of data */ + +optional_windows_header: + .long 0 /* Image base */ + .long 32 /* Section Alignment */ + .long 8 /* File alignment */ + .short 0 /* Major OS version */ + .short 0 /* Minor OS version */ + .short 0 /* Major image version */ + .short 0 /* Minor image version */ + .short 0 /* Major subsystem version */ + .short 0 /* Minor subsystem version */ + .long 0 /* Win32 version */ + .long _edata - efi_start /* Image size */ + .long _end_header - efi_start /* Header size */ + .long 0 /* Checksum */ + .short 0xa /* Subsystem (EFI app) */ + .short 0 /* DLL Characteristics */ + .long 0 /* Stack reserve */ + .long 0 /* Stack commit */ + .long 0 /* Heap reserve */ + .long 0 /* Heap commit */ + .long 0 /* Loader flags */ + .long 6 /* Number of RVAs */ + + /* RVAs: */ + .quad 0 + .quad 0 + .quad 0 + .quad 0 + .quad 0 + .quad 0 + +section_table: + /* We need a .reloc section for EFI */ + .ascii ".reloc" + .byte 0 + .byte 0 /* Pad to 8 bytes */ + .long 0 /* Virtual size */ + .long 0 /* Virtual address */ + .long 0 /* Size of raw data */ + .long 0 /* Pointer to raw data */ + .long 0 /* Pointer to relocations */ + .long 0 /* Pointer to line numbers */ + .short 0 /* Number of relocations */ + .short 0 /* Number of line numbers */ + .long (IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | \ + IMAGE_SCN_MEM_DISCARDABLE) /* Characteristics */ + + /* The contents of the loader */ + .ascii ".text" + .byte 0 + .byte 0 + .byte 0 /* Pad to 8 bytes */ + .long _edata - _end_header /* Virtual size */ + .long _end_header - efi_start /* Virtual address */ + .long _edata - _end_header /* Size of raw data */ + .long _end_header - efi_start /* Pointer to raw data */ + .long 0 /* Pointer to relocations */ + .long 0 /* Pointer to line numbers */ + .short 0 /* Number of relocations */ + .short 0 /* Number of line numbers */ + .long (IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE | \ + IMAGE_SCN_MEM_READ) /* Characteristics */ +_end_header: + + .text +_start: + /* Save the boot params to the stack */ + push {r0, r1} + + adr r0, .Lbase + ldr r1, [r0] + sub r5, r0, r1 + + ldr r0, .Limagebase + add r0, r0, r5 + ldr r1, .Ldynamic + add r1, r1, r5 + + bl _C_LABEL(_reloc) + + /* Zero the BSS, _reloc fixed the values for us */ + ldr r0, .Lbss + ldr r1, .Lbssend + mov r2, #0 + +1: cmp r0, r1 + bgt 2f + str r2, [r0], #4 + b 1b +2: + + pop {r0, r1} + bl _C_LABEL(efi_main) + +1: WFI + b 1b + +.Lbase: + .word . +.Limagebase: + .word ImageBase +.Ldynamic: + .word _DYNAMIC +.Lbss: + .word __bss_start +.Lbssend: + .word __bss_end + +.align 3 +stack: + .space 512 +stack_end: + Modified: head/sys/boot/efi/loader/bootinfo.c ============================================================================== --- head/sys/boot/efi/loader/bootinfo.c Mon Apr 6 15:45:45 2015 (r281155) +++ head/sys/boot/efi/loader/bootinfo.c Mon Apr 6 15:50:20 2015 (r281156) @@ -219,6 +219,9 @@ bi_copymodules(vm_offset_t addr) if (fp->f_args) MOD_ARGS(addr, fp->f_args, c); v = fp->f_addr; +#if defined(__arm__) + v -= __elfN(relocation_offset); +#endif MOD_ADDR(addr, v, c); v = fp->f_size; MOD_SIZE(addr, v, c); @@ -332,6 +335,21 @@ bi_load(char *args, vm_offset_t *modulep vm_offset_t dtbp; int dtb_size; #endif +#if defined(__arm__) + vm_offset_t vaddr; + int i; + /* + * These metadata addreses must be converted for kernel after + * relocation. + */ + uint32_t mdt[] = { + MODINFOMD_SSYM, MODINFOMD_ESYM, MODINFOMD_KERNEND, + MODINFOMD_ENVP, +#if defined(LOADER_FDT_SUPPORT) + MODINFOMD_DTBP +#endif + }; +#endif howto = bi_getboothowto(args); @@ -405,6 +423,22 @@ bi_load(char *args, vm_offset_t *modulep md = file_findmetadata(kfp, MODINFOMD_KERNEND); bcopy(&kernend, md->md_data, sizeof kernend); +#if defined(__arm__) + *modulep -= __elfN(relocation_offset); + + /* Do relocation fixup on metadata of each module. */ + for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { + for (i = 0; i < sizeof mdt / sizeof mdt[0]; i++) { + md = file_findmetadata(xp, mdt[i]); + if (md) { + bcopy(md->md_data, &vaddr, sizeof vaddr); + vaddr -= __elfN(relocation_offset); + bcopy(&vaddr, md->md_data, sizeof vaddr); + } + } + } +#endif + /* Copy module list and metadata. */ (void)bi_copymodules(addr); Modified: head/sys/boot/efi/loader/copy.c ============================================================================== --- head/sys/boot/efi/loader/copy.c Mon Apr 6 15:45:45 2015 (r281155) +++ head/sys/boot/efi/loader/copy.c Mon Apr 6 15:50:20 2015 (r281156) @@ -61,9 +61,21 @@ efi_copy_init(void) } staging_end = staging + STAGE_PAGES * 4096; +#ifdef __arm__ + /* Round the kernel load address to a 2MiB value */ + staging = roundup2(staging, 2 * 1024 * 1024); +#endif + return (0); } +void * +efi_translate(vm_offset_t ptr) +{ + + return ((void *)(ptr + stage_offset)); +} + ssize_t efi_copyin(const void *src, vm_offset_t dest, const size_t len) { From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 16:27:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6D53DF2; Mon, 6 Apr 2015 16:27:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C77F4E80; Mon, 6 Apr 2015 16:27:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36GRNPl025870; Mon, 6 Apr 2015 16:27:23 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36GRNPI025869; Mon, 6 Apr 2015 16:27:23 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504061627.t36GRNPI025869@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Apr 2015 16:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281157 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 16:27:24 -0000 Author: andrew Date: Mon Apr 6 16:27:22 2015 New Revision: 281157 URL: https://svnweb.freebsd.org/changeset/base/281157 Log: Split out the _acq and _rel functions. These were the same, but there is no need for them to be this strong, we only need to provide one or the other. While here replace atomic_load_acq_* and atomic_store_rel_* with a single instruction version, and fix the definition of atomic_clear_* to point to the correct functions. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/include/atomic.h Modified: head/sys/arm64/include/atomic.h ============================================================================== --- head/sys/arm64/include/atomic.h Mon Apr 6 15:50:20 2015 (r281156) +++ head/sys/arm64/include/atomic.h Mon Apr 6 16:27:22 2015 (r281157) @@ -160,7 +160,6 @@ atomic_subtract_32(volatile uint32_t *p, #define atomic_set_int atomic_set_32 #define atomic_subtract_int atomic_subtract_32 - static __inline void atomic_add_acq_32(volatile uint32_t *p, uint32_t val) { @@ -170,7 +169,7 @@ atomic_add_acq_32(volatile uint32_t *p, __asm __volatile( "1: ldaxr %w0, [%2] \n" " add %w0, %w0, %w3 \n" - " stlxr %w1, %w0, [%2] \n" + " stxr %w1, %w0, [%2] \n" " cbnz %w1, 1b \n" "2:" : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" @@ -186,7 +185,7 @@ atomic_clear_acq_32(volatile uint32_t *p __asm __volatile( "1: ldaxr %w0, [%2] \n" " bic %w0, %w0, %w3 \n" - " stlxr %w1, %w0, [%2] \n" + " stxr %w1, %w0, [%2] \n" " cbnz %w1, 1b \n" : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" ); @@ -203,7 +202,7 @@ atomic_cmpset_acq_32(volatile uint32_t * " ldaxr %w0, [%2] \n" " cmp %w0, %w3 \n" " b.ne 2f \n" - " stlxr %w1, %w4, [%2] \n" + " stxr %w1, %w4, [%2] \n" " cbnz %w1, 1b \n" "2:" : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (cmpval), "+r" (newval) @@ -218,8 +217,9 @@ atomic_load_acq_32(volatile uint32_t *p) { uint32_t ret; - ret = *p; - dmb(); + __asm __volatile( + "ldar %w0, [%1] \n" + : "=&r" (ret) : "r" (p) : "memory"); return (ret); } @@ -233,7 +233,7 @@ atomic_set_acq_32(volatile uint32_t *p, __asm __volatile( "1: ldaxr %w0, [%2] \n" " orr %w0, %w0, %w3 \n" - " stlxr %w1, %w0, [%2] \n" + " stxr %w1, %w0, [%2] \n" " cbnz %w1, 1b \n" : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" ); @@ -248,6 +248,82 @@ atomic_subtract_acq_32(volatile uint32_t __asm __volatile( "1: ldaxr %w0, [%2] \n" " sub %w0, %w0, %w3 \n" + " stxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + ); +} + +#define atomic_add_acq_int atomic_add_acq_32 +#define atomic_clear_acq_int atomic_clear_acq_32 +#define atomic_cmpset_acq_int atomic_cmpset_acq_32 +#define atomic_load_acq_int atomic_load_acq_32 +#define atomic_set_acq_int atomic_set_acq_32 +#define atomic_subtract_acq_int atomic_subtract_acq_32 + +/* The atomic functions currently are both acq and rel, we should fix this. */ + +static __inline void +atomic_add_rel_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: ldxr %w0, [%2] \n" + " add %w0, %w0, %w3 \n" + " stlxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + "2:" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + ); +} + +static __inline void +atomic_clear_rel_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: ldxr %w0, [%2] \n" + " bic %w0, %w0, %w3 \n" + " stlxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + ); +} + +static __inline int +atomic_cmpset_rel_32(volatile uint32_t *p, uint32_t cmpval, uint32_t newval) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: mov %w1, #1 \n" + " ldxr %w0, [%2] \n" + " cmp %w0, %w3 \n" + " b.ne 2f \n" + " stlxr %w1, %w4, [%2] \n" + " cbnz %w1, 1b \n" + "2:" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (cmpval), "+r" (newval) + : : "cc", "memory" + ); + + return (!res); +} + +static __inline void +atomic_set_rel_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: ldxr %w0, [%2] \n" + " orr %w0, %w0, %w3 \n" " stlxr %w1, %w0, [%2] \n" " cbnz %w1, 1b \n" : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" @@ -258,23 +334,25 @@ static __inline void atomic_store_rel_32(volatile uint32_t *p, uint32_t val) { - dmb(); - *p = val; + __asm __volatile( + "stlr %w0, [%1] \n" + : : "r" (val), "r" (p) : "memory"); } -#define atomic_add_acq_int atomic_add_acq_32 -#define atomic_clear_acq_int atomic_add_acq_32 -#define atomic_cmpset_acq_int atomic_cmpset_acq_32 -#define atomic_load_acq_int atomic_load_acq_32 -#define atomic_set_acq_int atomic_set_acq_32 -#define atomic_subtract_acq_int atomic_subtract_acq_32 +static __inline void +atomic_subtract_rel_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp; + int res; -/* The atomic functions currently are both acq and rel, we should fix this. */ -#define atomic_add_rel_32 atomic_add_acq_32 -#define atomic_clear_rel_32 atomic_add_acq_32 -#define atomic_cmpset_rel_32 atomic_cmpset_acq_32 -#define atomic_set_rel_32 atomic_set_acq_32 -#define atomic_subtract_rel_32 atomic_subtract_acq_32 + __asm __volatile( + "1: ldxr %w0, [%2] \n" + " sub %w0, %w0, %w3 \n" + " stlxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + ); +} #define atomic_add_rel_int atomic_add_rel_32 #define atomic_clear_rel_int atomic_add_rel_32 @@ -440,7 +518,7 @@ atomic_add_acq_64(volatile uint64_t *p, __asm __volatile( "1: ldaxr %0, [%2] \n" " add %0, %0, %3 \n" - " stlxr %w1, %0, [%2] \n" + " stxr %w1, %0, [%2] \n" " cbnz %w1, 1b \n" "2:" : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" @@ -456,7 +534,7 @@ atomic_clear_acq_64(volatile uint64_t *p __asm __volatile( "1: ldaxr %0, [%2] \n" " bic %0, %0, %3 \n" - " stlxr %w1, %0, [%2] \n" + " stxr %w1, %0, [%2] \n" " cbnz %w1, 1b \n" : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" ); @@ -473,7 +551,7 @@ atomic_cmpset_acq_64(volatile uint64_t * " ldaxr %0, [%2] \n" " cmp %0, %3 \n" " b.ne 2f \n" - " stlxr %w1, %4, [%2] \n" + " stxr %w1, %4, [%2] \n" " cbnz %w1, 1b \n" "2:" : "=&r" (tmp), "=&r" (res), "+r" (p), "+r" (cmpval), "+r" (newval) @@ -488,8 +566,9 @@ atomic_load_acq_64(volatile uint64_t *p) { uint64_t ret; - ret = *p; - dmb(); + __asm __volatile( + "ldar %0, [%1] \n" + : "=&r" (ret) : "r" (p) : "memory"); return (ret); } @@ -503,7 +582,7 @@ atomic_set_acq_64(volatile uint64_t *p, __asm __volatile( "1: ldaxr %0, [%2] \n" " orr %0, %0, %3 \n" - " stlxr %w1, %0, [%2] \n" + " stxr %w1, %0, [%2] \n" " cbnz %w1, 1b \n" : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" ); @@ -518,20 +597,12 @@ atomic_subtract_acq_64(volatile uint64_t __asm __volatile( "1: ldaxr %0, [%2] \n" " sub %0, %0, %3 \n" - " stlxr %w1, %0, [%2] \n" + " stxr %w1, %0, [%2] \n" " cbnz %w1, 1b \n" : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" ); } -static __inline void -atomic_store_rel_64(volatile uint64_t *p, uint64_t val) -{ - - dmb(); - *p = val; -} - #define atomic_add_acq_long atomic_add_acq_64 #define atomic_clear_acq_long atomic_add_acq_64 #define atomic_cmpset_acq_long atomic_cmpset_acq_64 @@ -550,21 +621,106 @@ atomic_store_rel_64(volatile uint64_t *p * TODO: The atomic functions currently are both acq and rel, we should fix * this. */ -#define atomic_add_rel_64 atomic_add_acq_64 -#define atomic_clear_rel_64 atomic_add_acq_64 -#define atomic_cmpset_rel_64 atomic_cmpset_acq_64 -#define atomic_set_rel_64 atomic_set_acq_64 -#define atomic_subtract_rel_64 atomic_subtract_acq_64 +static __inline void +atomic_add_rel_64(volatile uint64_t *p, uint64_t val) +{ + uint64_t tmp; + int res; + + __asm __volatile( + "1: ldxr %0, [%2] \n" + " add %0, %0, %3 \n" + " stlxr %w1, %0, [%2] \n" + " cbnz %w1, 1b \n" + "2:" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + ); +} + +static __inline void +atomic_clear_rel_64(volatile uint64_t *p, uint64_t val) +{ + uint64_t tmp; + int res; + + __asm __volatile( + "1: ldxr %0, [%2] \n" + " bic %0, %0, %3 \n" + " stlxr %w1, %0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + ); +} + +static __inline int +atomic_cmpset_rel_64(volatile uint64_t *p, uint64_t cmpval, uint64_t newval) +{ + uint64_t tmp; + int res; + + __asm __volatile( + "1: mov %w1, #1 \n" + " ldxr %0, [%2] \n" + " cmp %0, %3 \n" + " b.ne 2f \n" + " stlxr %w1, %4, [%2] \n" + " cbnz %w1, 1b \n" + "2:" + : "=&r" (tmp), "=&r" (res), "+r" (p), "+r" (cmpval), "+r" (newval) + : : "cc", "memory" + ); + + return (!res); +} + +static __inline void +atomic_set_rel_64(volatile uint64_t *p, uint64_t val) +{ + uint64_t tmp; + int res; + + __asm __volatile( + "1: ldxr %0, [%2] \n" + " orr %0, %0, %3 \n" + " stlxr %w1, %0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + ); +} + +static __inline void +atomic_store_rel_64(volatile uint64_t *p, uint64_t val) +{ + + __asm __volatile( + "stlr %0, [%1] \n" + : : "r" (val), "r" (p) : "memory"); +} + +static __inline void +atomic_subtract_rel_64(volatile uint64_t *p, uint64_t val) +{ + uint64_t tmp; + int res; + + __asm __volatile( + "1: ldxr %0, [%2] \n" + " sub %0, %0, %3 \n" + " stlxr %w1, %0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + ); +} #define atomic_add_rel_long atomic_add_rel_64 -#define atomic_clear_rel_long atomic_add_rel_64 +#define atomic_clear_rel_long atomic_clear_rel_64 #define atomic_cmpset_rel_long atomic_cmpset_rel_64 #define atomic_set_rel_long atomic_set_rel_64 #define atomic_subtract_rel_long atomic_subtract_rel_64 #define atomic_store_rel_long atomic_store_rel_64 #define atomic_add_rel_ptr atomic_add_rel_64 -#define atomic_clear_rel_ptr atomic_add_rel_64 +#define atomic_clear_rel_ptr atomic_clear_rel_64 #define atomic_cmpset_rel_ptr atomic_cmpset_rel_64 #define atomic_set_rel_ptr atomic_set_rel_64 #define atomic_subtract_rel_ptr atomic_subtract_rel_64 From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 16:29:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C321FF71; Mon, 6 Apr 2015 16:29:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE186E9B; Mon, 6 Apr 2015 16:29:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36GTkJ1026206; Mon, 6 Apr 2015 16:29:46 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36GTkqQ026205; Mon, 6 Apr 2015 16:29:46 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504061629.t36GTkqQ026205@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 6 Apr 2015 16:29:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281158 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 16:29:46 -0000 Author: jhibbits Date: Mon Apr 6 16:29:45 2015 New Revision: 281158 URL: https://svnweb.freebsd.org/changeset/base/281158 Log: Fix the index for FAULTBUF_R13, missed during merge/cleanup. Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Mon Apr 6 16:27:22 2015 (r281157) +++ head/sys/powerpc/powerpc/trap.c Mon Apr 6 16:29:45 2015 (r281158) @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); #define FAULTBUF_R1 1 #define FAULTBUF_R2 2 #define FAULTBUF_CR 3 -#define FAULTBUF_R13 6 +#define FAULTBUF_R13 4 static void trap_fatal(struct trapframe *frame); static void printtrap(u_int vector, struct trapframe *frame, int isfatal, From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 17:24:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB62245D; Mon, 6 Apr 2015 17:24:24 +0000 (UTC) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DDD17E1; Mon, 6 Apr 2015 17:24:24 +0000 (UTC) Received: by iggg4 with SMTP id g4so6991268igg.0; Mon, 06 Apr 2015 10:24:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=0iDgSKn2ibDY7ea3dxLajdsEMIHUIOswgvZXpOJ7h3k=; b=RMa6GsuiDk6y1JCzKK7D++COMeMuv0Df2tNie/hhkzrufyTTDP5yspb6XLwBqbByli 3qRUZ/pF0zq0qov1zhdo+a4aTRdKF7gp8z80F94OkACFf47znNOoCVWBmHOKv0MVnsHo uEQrxHRx4PD9czZx/OOlS6RRzQgQP/s+SzUfQTmD2X2s6Q9iJwl6+pmTWV+nS6ZygF0U +wA9rrSzCzxxP5mbsfc0VXvGABBetTM/lOLEtmujmy/lgSMB/QX16IF7sRzq0je2wPts +nKN2bAxfeGUtMHCq6wFCanMxpO7iVtgvepWkrqVI0rPxxIj3J/wdDhk7tXdazeRbUKi 84KA== MIME-Version: 1.0 X-Received: by 10.50.143.42 with SMTP id sb10mr48230378igb.49.1428341064047; Mon, 06 Apr 2015 10:24:24 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Mon, 6 Apr 2015 10:24:23 -0700 (PDT) In-Reply-To: <20150406152653.K1066@besplex.bde.org> References: <201504050518.t355IFVJ001786@svn.freebsd.org> <20150405163305.A2515@besplex.bde.org> <20150406152653.K1066@besplex.bde.org> Date: Mon, 6 Apr 2015 10:24:23 -0700 X-Google-Sender-Auth: V2Q1hyhzm9TY8f2w9y53AyThXHI Message-ID: Subject: Re: svn commit: r281103 - head/sys/amd64/amd64 From: Adrian Chadd To: Bruce Evans Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Eitan Adler , Kurt Lidl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 17:24:24 -0000 Hi Bruce, There's been a bunch of research into that field lately. Eg: http://daim.idi.ntnu.no/masteroppgaver/009/9231/masteroppgave.pdf The best part (imho)- the length of your USER environment string influencing code runtime costs. :) -a From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 17:39:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B57CF956; Mon, 6 Apr 2015 17:39:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1361937; Mon, 6 Apr 2015 17:39:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36HdbmQ060123; Mon, 6 Apr 2015 17:39:37 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36Hdbhc060122; Mon, 6 Apr 2015 17:39:37 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504061739.t36Hdbhc060122@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 6 Apr 2015 17:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281159 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 17:39:37 -0000 Author: jhb Date: Mon Apr 6 17:39:36 2015 New Revision: 281159 URL: https://svnweb.freebsd.org/changeset/base/281159 Log: Move the message complaining about failed system resource allocations under bootverbose. Every example I've seen to date has been due to an ACPI system resource device reserving a range that overlaps with system memory (which ram0 attempts to reserve) or a local or I/O APIC (which apic0 attempts to reserve). These are always harmless but look scary to users. MFC after: 1 week Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Mon Apr 6 16:29:45 2015 (r281158) +++ head/sys/dev/acpica/acpi.c Mon Apr 6 17:39:36 2015 (r281159) @@ -1151,7 +1151,7 @@ acpi_sysres_alloc(device_t dev) if (res != NULL) { rman_manage_region(rm, rman_get_start(res), rman_get_end(res)); rle->res = res; - } else + } else if (bootverbose) device_printf(dev, "reservation of %lx, %lx (%d) failed\n", rle->start, rle->count, rle->type); } From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 17:58:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5FBF82B; Mon, 6 Apr 2015 17:58:48 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 938A8BE4; Mon, 6 Apr 2015 17:58:48 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id C3F1C3C1CD4; Tue, 7 Apr 2015 03:58:24 +1000 (AEST) Date: Tue, 7 Apr 2015 03:58:24 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Adrian Chadd Subject: Re: svn commit: r281103 - head/sys/amd64/amd64 In-Reply-To: Message-ID: <20150407034210.W13160@besplex.bde.org> References: <201504050518.t355IFVJ001786@svn.freebsd.org> <20150405163305.A2515@besplex.bde.org> <20150406152653.K1066@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=LZT3cjOAAAAA:8 a=xi4jD1bJun78kkbclQ8A:9 a=xK-qvNO6ba16nrPl:21 a=YYC0QsJ_9vQjtY_J:21 a=CjuIK1q_8ugA:10 Cc: "src-committers@freebsd.org" , Eitan Adler , "svn-src-all@freebsd.org" , Kurt Lidl , Bruce Evans , "svn-src-head@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 17:58:49 -0000 On Mon, 6 Apr 2015, Adrian Chadd wrote: > Hi Bruce, > > There's been a bunch of research into that field lately. > > Eg: http://daim.idi.ntnu.no/masteroppgaver/009/9231/masteroppgave.pdf > > The best part (imho)- the length of your USER environment string > influencing code runtime costs. :) I fix the latter in an FP benchmark by aligning the stack to a page boundary, and further adjusting it by a magic amount of a few hundred. This only works for microbenchmarks, since in general the stack pointer is too variable for a single adjustment to keep it from hitting things. Bruce From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 18:03:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60275B7E; Mon, 6 Apr 2015 18:03:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BA08CC4; Mon, 6 Apr 2015 18:03:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36I3aOJ074789; Mon, 6 Apr 2015 18:03:36 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36I3ap7074788; Mon, 6 Apr 2015 18:03:36 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504061803.t36I3ap7074788@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 6 Apr 2015 18:03:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281160 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 18:03:36 -0000 Author: dteske Date: Mon Apr 6 18:03:35 2015 New Revision: 281160 URL: https://svnweb.freebsd.org/changeset/base/281160 Log: Fix permissions on ZFS root encryption key (644 -> 600). MFC after: 3 days X-MFC-to: stable/10 stable/9 Security: CVE-2015-1415 Reported by: Pierre Kim Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Mon Apr 6 17:39:36 2015 (r281159) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Mon Apr 6 18:03:35 2015 (r281160) @@ -1128,6 +1128,9 @@ zfs_create_boot() f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ /dev/random "$bootpool/$zroot_key" \ "bs=4096 count=1" || return $FAILURE + f_eval_catch $funcname "$CHMOD_MODE" \ + go-wrx "$bootpool/$zroot_key" || + return $FAILURE else # Clean up f_eval_catch $funcname zfs "$ZFS_UNMOUNT" \ From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 18:45:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B180AE26; Mon, 6 Apr 2015 18:45:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D301184; Mon, 6 Apr 2015 18:45:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36IjglE094301; Mon, 6 Apr 2015 18:45:42 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36Ijggp094300; Mon, 6 Apr 2015 18:45:42 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201504061845.t36Ijggp094300@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Mon, 6 Apr 2015 18:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281162 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 18:45:42 -0000 Author: dchagin Date: Mon Apr 6 18:45:41 2015 New Revision: 281162 URL: https://svnweb.freebsd.org/changeset/base/281162 Log: Properly calculate "UMA Zones" per cpu cache size. Avoid allocating an extra struct uma_cache since the struct uma_zone already has one. PR: 199169 Submitted by: luke.tw gmail com MFC after: 1 week Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Mon Apr 6 18:40:50 2015 (r281161) +++ head/sys/vm/uma_core.c Mon Apr 6 18:45:41 2015 (r281162) @@ -1822,7 +1822,7 @@ uma_startup(void *bootmem, int boot_page #endif args.name = "UMA Zones"; args.size = sizeof(struct uma_zone) + - (sizeof(struct uma_cache) * (mp_maxid + 1)); + (sizeof(struct uma_cache) * (mp_maxid)); args.ctor = zone_ctor; args.dtor = zone_dtor; args.uminit = zero_init; From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 18:56:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BEBC0CBD; Mon, 6 Apr 2015 18:56:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA4FE31B; Mon, 6 Apr 2015 18:56:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36Iu3F4000191; Mon, 6 Apr 2015 18:56:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36Iu343000190; Mon, 6 Apr 2015 18:56:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504061856.t36Iu343000190@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Apr 2015 18:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281163 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 18:56:03 -0000 Author: mav Date: Mon Apr 6 18:56:02 2015 New Revision: 281163 URL: https://svnweb.freebsd.org/changeset/base/281163 Log: Make ctld to not exit on ECONNABORTED on accept(). That is not really an error for the main process. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Mon Apr 6 18:45:41 2015 (r281162) +++ head/usr.sbin/ctld/ctld.c Mon Apr 6 18:56:02 2015 (r281163) @@ -2399,8 +2399,11 @@ found: client_fd = accept(portal->p_socket, (struct sockaddr *)&client_sa, &client_salen); - if (client_fd < 0) + if (client_fd < 0) { + if (errno == ECONNABORTED) + continue; log_err(1, "accept"); + } assert(client_salen >= client_sa.ss_len); handle_connection(portal, client_fd, From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 19:05:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B82C8658; Mon, 6 Apr 2015 19:05:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A0B665A; Mon, 6 Apr 2015 19:05:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36J51B1005486; Mon, 6 Apr 2015 19:05:01 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36J51EX005483; Mon, 6 Apr 2015 19:05:01 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201504061905.t36J51EX005483@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Mon, 6 Apr 2015 19:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281164 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 19:05:01 -0000 Author: kp Date: Mon Apr 6 19:05:00 2015 New Revision: 281164 URL: https://svnweb.freebsd.org/changeset/base/281164 Log: pf: Skip firewall for refragmented ip6 packets In cases where we scrub (fragment reassemble) on both input and output we risk ending up in infinite loops when forwarding packets. Fragmented packets come in and get collected until we can defragment. At that point the defragmented packet is handed back to the ip stack (at the pfil point in ip6_input(). Normal processing continues. Eventually we figure out that the packet has to be forwarded and we end up at the pfil hook in ip6_forward(). After doing the inspection on the defragmented packet we see that the packet has been defragmented and because we're forwarding we have to refragment it. In pf_refragment6() we split the packet up again and then ip6_forward() the individual fragments. Those fragments hit the pfil hook on the way out, so they're collected until we can reconstruct the full packet, at which point we're right back where we left off and things continue until we run out of stack. Break that loop by marking the fragments generated by pf_refragment6() as M_SKIP_FIREWALL. There's no point in processing those packets in the firewall anyway. We've already filtered on the full packet. Differential Revision: https://reviews.freebsd.org/D2197 Reviewed by: glebius, gnn Approved by: gnn (mentor) Modified: head/sys/netpfil/pf/pf_norm.c Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Mon Apr 6 18:56:02 2015 (r281163) +++ head/sys/netpfil/pf/pf_norm.c Mon Apr 6 19:05:00 2015 (r281164) @@ -1152,6 +1152,7 @@ pf_refragment6(struct ifnet *ifp, struct for (t = m; m; m = t) { t = m->m_nextpkt; m->m_nextpkt = NULL; + m->m_flags |= M_SKIP_FIREWALL; memset(&pd, 0, sizeof(pd)); pd.pf_mtag = pf_find_mtag(m); if (error == 0) From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 19:08:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD1207F1; Mon, 6 Apr 2015 19:08:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C87FB686; Mon, 6 Apr 2015 19:08:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36J8jpT006000; Mon, 6 Apr 2015 19:08:45 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36J8j9c005999; Mon, 6 Apr 2015 19:08:45 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201504061908.t36J8j9c005999@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Mon, 6 Apr 2015 19:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281165 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 19:08:46 -0000 Author: kp Date: Mon Apr 6 19:08:44 2015 New Revision: 281165 URL: https://svnweb.freebsd.org/changeset/base/281165 Log: Remove duplicate code We'll just fall into the same local delivery block under the 'if (m->m_flags & M_FASTFWD_OURS)'. Suggested by: ae Differential Revision: https://reviews.freebsd.org/D2225 Approved by: gnn (mentor) Modified: head/sys/netinet6/ip6_forward.c Modified: head/sys/netinet6/ip6_forward.c ============================================================================== --- head/sys/netinet6/ip6_forward.c Mon Apr 6 19:05:00 2015 (r281164) +++ head/sys/netinet6/ip6_forward.c Mon Apr 6 19:08:44 2015 (r281165) @@ -537,22 +537,9 @@ again2: if (!IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst)) { m->m_flags |= M_SKIP_FIREWALL; /* If destination is now ourself drop to ip6_input(). */ - if (in6_localip(&ip6->ip6_dst)) { + if (in6_localip(&ip6->ip6_dst)) m->m_flags |= M_FASTFWD_OURS; - if (m->m_pkthdr.rcvif == NULL) - m->m_pkthdr.rcvif = V_loif; - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - m->m_pkthdr.csum_flags |= - CSUM_DATA_VALID_IPV6 | CSUM_PSEUDO_HDR; - m->m_pkthdr.csum_data = 0xffff; - } -#ifdef SCTP - if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) - m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; -#endif - error = netisr_queue(NETISR_IPV6, m); - goto out; - } else + else goto again; /* Redo the routing table lookup. */ } From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 19:23:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33FE7CD9; Mon, 6 Apr 2015 19:23:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D68E8B6; Mon, 6 Apr 2015 19:23:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36JNjq8014808; Mon, 6 Apr 2015 19:23:45 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36JNja5014807; Mon, 6 Apr 2015 19:23:45 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201504061923.t36JNja5014807@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Mon, 6 Apr 2015 19:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281166 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 19:23:46 -0000 Author: jpaetzel Date: Mon Apr 6 19:23:45 2015 New Revision: 281166 URL: https://svnweb.freebsd.org/changeset/base/281166 Log: Typo fix in comment MFC after: 3 days Modified: head/etc/rc.d/pflog Modified: head/etc/rc.d/pflog ============================================================================== --- head/etc/rc.d/pflog Mon Apr 6 19:08:44 2015 (r281165) +++ head/etc/rc.d/pflog Mon Apr 6 19:23:45 2015 (r281166) @@ -38,7 +38,7 @@ pflog_prestart() return 1 fi - # -p flag requires striping pidfile's leading /var/run and trailing .pid + # -p flag requires stripping pidfile's leading /var/run and trailing .pid pidfile=$(echo $pidfile | sed -e 's|/var/run/||' -e 's|.pid$||') # prepare the command line for pflogd From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 19:26:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3677CE54; Mon, 6 Apr 2015 19:26:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21D1C8CD; Mon, 6 Apr 2015 19:26:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36JQjY2015243; Mon, 6 Apr 2015 19:26:45 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36JQjuk015241; Mon, 6 Apr 2015 19:26:45 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504061926.t36JQjuk015241@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 6 Apr 2015 19:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281167 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 19:26:46 -0000 Author: dteske Date: Mon Apr 6 19:26:45 2015 New Revision: 281167 URL: https://svnweb.freebsd.org/changeset/base/281167 Log: Unbreak ZFS+GELI install option. Reported by: delphij Submitted by: delphij Pointy hat to: dteske (me) MFC after: 3 days X-MFC-to: stable/10 stable/9 X-MFC-with: r281160 Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Mon Apr 6 19:23:45 2015 (r281166) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Mon Apr 6 19:26:45 2015 (r281167) @@ -1128,7 +1128,7 @@ zfs_create_boot() f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ /dev/random "$bootpool/$zroot_key" \ "bs=4096 count=1" || return $FAILURE - f_eval_catch $funcname "$CHMOD_MODE" \ + f_eval_catch $funcname chmod "$CHMOD_MODE" \ go-wrx "$bootpool/$zroot_key" || return $FAILURE else From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 19:58:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D3A3539; Mon, 6 Apr 2015 19:58:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 887ADBCB; Mon, 6 Apr 2015 19:58:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36JwTQj029679; Mon, 6 Apr 2015 19:58:29 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36JwTnW029678; Mon, 6 Apr 2015 19:58:29 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504061958.t36JwTnW029678@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 6 Apr 2015 19:58:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281169 - head/sys/boot/efi/boot1 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 19:58:29 -0000 Author: andrew Date: Mon Apr 6 19:58:28 2015 New Revision: 281169 URL: https://svnweb.freebsd.org/changeset/base/281169 Log: Make global variabled only used in this file static. Modified: head/sys/boot/efi/boot1/boot1.c Modified: head/sys/boot/efi/boot1/boot1.c ============================================================================== --- head/sys/boot/efi/boot1/boot1.c Mon Apr 6 19:56:27 2015 (r281168) +++ head/sys/boot/efi/boot1/boot1.c Mon Apr 6 19:58:28 2015 (r281169) @@ -59,8 +59,8 @@ static char *__ultoa(char *buf, u_long v static int domount(EFI_DEVICE_PATH *device, EFI_BLOCK_IO *blkio, int quiet); static void load(const char *fname); -EFI_SYSTEM_TABLE *systab; -EFI_HANDLE *image; +static EFI_SYSTEM_TABLE *systab; +static EFI_HANDLE *image; static void bcopy(const void *src, void *dst, size_t len) From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 20:40:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FA0CA74; Mon, 6 Apr 2015 20:40:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B123141; Mon, 6 Apr 2015 20:40:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36Ke1Gg049677; Mon, 6 Apr 2015 20:40:01 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36Ke19k049676; Mon, 6 Apr 2015 20:40:01 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504062040.t36Ke19k049676@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 6 Apr 2015 20:40:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281170 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 20:40:02 -0000 Author: jhb Date: Mon Apr 6 20:40:01 2015 New Revision: 281170 URL: https://svnweb.freebsd.org/changeset/base/281170 Log: vfork() first appeared in 3BSD which pre-dates 2.9BSD. Verified via the copy of 3BSD on disc 1 of "The CSRG Archives". PR: 198612 MFC after: 1 week Modified: head/lib/libc/sys/vfork.2 Modified: head/lib/libc/sys/vfork.2 ============================================================================== --- head/lib/libc/sys/vfork.2 Mon Apr 6 19:58:28 2015 (r281169) +++ head/lib/libc/sys/vfork.2 Mon Apr 6 20:40:01 2015 (r281170) @@ -28,7 +28,7 @@ .\" @(#)vfork.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd November 13, 2009 +.Dd April 6, 2015 .Dt VFORK 2 .Os .Sh NAME @@ -111,7 +111,7 @@ Same as for The .Fn vfork system call appeared in -.Bx 2.9 . +.Bx 3 . .Sh BUGS To avoid a possible deadlock situation, processes that are children in the middle From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 20:58:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4561F6A; Mon, 6 Apr 2015 20:58:18 +0000 (UTC) Received: from mx0.thekeelecentre.com (mx0.thekeelecentre.com [88.98.64.52]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 825F036D; Mon, 6 Apr 2015 20:58:18 +0000 (UTC) Received: from filter.mx0.thekeelecentre.com (unknown [88.98.64.55]) by mx0.thekeelecentre.com (Postfix) with ESMTP id C529C22C1F; Mon, 6 Apr 2015 21:50:26 +0100 (BST) X-Virus-Scanned: amavisd-new at thekeelecentre.com Received: from mx0.thekeelecentre.com ([88.98.64.52]) by filter.mx0.thekeelecentre.com (filter.mx0.thekeelecentre.com [88.98.64.55]) (amavisd-new, port 10024) with ESMTP id C3APwxB2UESn; Mon, 6 Apr 2015 20:50:26 +0000 (UTC) Received: from [10.0.2.11] (nat-gw.hl.tector.org.uk [88.96.67.61]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx0.thekeelecentre.com (Postfix) with ESMTPSA id 38B8022C15; Mon, 6 Apr 2015 21:50:26 +0100 (BST) Message-ID: <5522F192.7010205@thekeelecentre.com> Date: Mon, 06 Apr 2015 21:50:26 +0100 From: Richard Tector User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Kristof Provost , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281164 - head/sys/netpfil/pf References: <201504061905.t36J51EX005483@svn.freebsd.org> In-Reply-To: <201504061905.t36J51EX005483@svn.freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 20:58:18 -0000 On 06/04/2015 20:05, Kristof Provost wrote: > Author: kp > Date: Mon Apr 6 19:05:00 2015 > New Revision: 281164 > URL: https://svnweb.freebsd.org/changeset/base/281164 > > Log: > pf: Skip firewall for refragmented ip6 packets > > In cases where we scrub (fragment reassemble) on both input and output > we risk ending up in infinite loops when forwarding packets. > > Fragmented packets come in and get collected until we can defragment. At > that point the defragmented packet is handed back to the ip stack (at > the pfil point in ip6_input(). Normal processing continues. > > Eventually we figure out that the packet has to be forwarded and we end > up at the pfil hook in ip6_forward(). After doing the inspection on the > defragmented packet we see that the packet has been defragmented and > because we're forwarding we have to refragment it. > > In pf_refragment6() we split the packet up again and then ip6_forward() > the individual fragments. Those fragments hit the pfil hook on the way > out, so they're collected until we can reconstruct the full packet, at > which point we're right back where we left off and things continue until > we run out of stack. > > Break that loop by marking the fragments generated by pf_refragment6() > as M_SKIP_FIREWALL. There's no point in processing those packets in the > firewall anyway. We've already filtered on the full packet. > Kristof, Firstly, many thanks for working on this. I was just wondering how this affects the case where we might have if-bound rules? Really basic example: pass quick on $outside_if inet6 proto udp from any to $myhost block drop quick on $inside_if inet6 proto udp from any to $myhost port $secret_svc pass quick on $inside_if inet6 proto udp from any to $myhost If the fragments generated after processing occurs on the inbound interface are then marked to be skipped then will they therefore not be matched by the drop rule in the example above? Regards, Richard From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 21:17:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A0DA986; Mon, 6 Apr 2015 21:17:01 +0000 (UTC) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 056A07F5; Mon, 6 Apr 2015 21:17:01 +0000 (UTC) Received: from air.jupiter.sigsegv.be (94-225-210-220.access.telenet.be [94.225.210.220]) by venus.codepro.be (Postfix) with ESMTPSA id 83BE116EE5; Mon, 6 Apr 2015 23:16:57 +0200 (CEST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2097\)) Subject: Re: svn commit: r281164 - head/sys/netpfil/pf From: Kristof Provost In-Reply-To: <5522F192.7010205@thekeelecentre.com> Date: Mon, 6 Apr 2015 23:16:56 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <58A9FC24-0D85-482F-8903-86FC646CB45A@FreeBSD.org> References: <201504061905.t36J51EX005483@svn.freebsd.org> <5522F192.7010205@thekeelecentre.com> To: Richard Tector X-Mailer: Apple Mail (2.2097) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 21:17:01 -0000 > On 06 Apr 2015, at 22:50, Richard Tector = wrote: >=20 > I was just wondering how this affects the case where we might have = if-bound rules? >=20 > Really basic example: >=20 > pass quick on $outside_if inet6 proto udp from any to $myhost > block drop quick on $inside_if inet6 proto udp from any to $myhost = port $secret_svc > pass quick on $inside_if inet6 proto udp from any to $myhost >=20 > If the fragments generated after processing occurs on the inbound = interface are then marked to be skipped then will they therefore not be = matched by the drop rule in the example above? >=20 It should be fine. The refragmentation isn=92t done until after all of = the processing in pf_test6() is done. Any transformations or filtering pf has to apply is already done then. In essence all this patch does is make sure we don=92t take a second = pass through pf with the refragmented packets. Regards, Kristof From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 21:51:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DADC9115; Mon, 6 Apr 2015 21:51:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6BD9BF4; Mon, 6 Apr 2015 21:51:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36LptQA086330; Mon, 6 Apr 2015 21:51:55 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36LptON086329; Mon, 6 Apr 2015 21:51:55 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504062151.t36LptON086329@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Mon, 6 Apr 2015 21:51:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281171 - head/usr.sbin/acpi/acpiconf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 21:51:56 -0000 Author: jkim Date: Mon Apr 6 21:51:55 2015 New Revision: 281171 URL: https://svnweb.freebsd.org/changeset/base/281171 Log: Tidy up battery status information. Remove a trailing white space. PR: 193671 Modified: head/usr.sbin/acpi/acpiconf/acpiconf.c Modified: head/usr.sbin/acpi/acpiconf/acpiconf.c ============================================================================== --- head/usr.sbin/acpi/acpiconf/acpiconf.c Mon Apr 6 20:40:01 2015 (r281170) +++ head/usr.sbin/acpi/acpiconf/acpiconf.c Mon Apr 6 21:51:55 2015 (r281171) @@ -136,16 +136,30 @@ acpi_battinfo(int num) if (ioctl(acpifd, ACPIIO_BATT_GET_BATTINFO, &battio) == -1) err(EX_IOERR, "get battery user info (%d) failed", num); if (battio.battinfo.state != ACPI_BATT_STAT_NOT_PRESENT) { - printf("State:\t\t\t"); - if (battio.battinfo.state == 0) - printf("high "); - if (battio.battinfo.state & ACPI_BATT_STAT_CRITICAL) - printf("critical "); - if (battio.battinfo.state & ACPI_BATT_STAT_DISCHARG) - printf("discharging "); - if (battio.battinfo.state & ACPI_BATT_STAT_CHARGING) - printf("charging "); - printf("\n"); + const char *state; + switch (battio.battinfo.state & ACPI_BATT_STAT_BST_MASK) { + case 0: + state = "high"; + break; + case ACPI_BATT_STAT_DISCHARG: + state = "discharging"; + break; + case ACPI_BATT_STAT_CHARGING: + state = "charging"; + break; + case ACPI_BATT_STAT_CRITICAL: + state = "critical"; + break; + case ACPI_BATT_STAT_DISCHARG | ACPI_BATT_STAT_CRITICAL: + state = "critical discharging"; + break; + case ACPI_BATT_STAT_CHARGING | ACPI_BATT_STAT_CRITICAL: + state = "critical charging"; + break; + default: + state = "invalid"; + } + printf("State:\t\t\t%s\n", state); if (battio.battinfo.cap == -1) printf("Remaining capacity:\tunknown\n"); else From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 22:12:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FC3E6A7; Mon, 6 Apr 2015 22:12:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A0A1E06; Mon, 6 Apr 2015 22:12:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36MCLer095881; Mon, 6 Apr 2015 22:12:21 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36MCJ34095873; Mon, 6 Apr 2015 22:12:19 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504062212.t36MCJ34095873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 6 Apr 2015 22:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281172 - in head: sys/netinet6 sys/sys usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 22:12:21 -0000 Author: glebius Date: Mon Apr 6 22:12:18 2015 New Revision: 281172 URL: https://svnweb.freebsd.org/changeset/base/281172 Log: o Make net.inet6.ip6.mif6table return special API structure, that doesn't contain kernel pointers, and instead has interface index. Bump __FreeBSD_version for that change. o Now, netstat/mroute6.c no longer needs to kvm_read(3) struct ifnet, and no longer needs to include if_var.h Note that this change is far from being a complete move of IPv6 multicast routing to a proper API. Other structures are still dumped into their sysctls as is, requiring userland application to #define _KERNEL when including ip6_mroute.h and then call kvm_read(3) to gather all bits and pieces. But fixing this is out of scope of the opaque ifnet project. Sponsored by: Nginx, Inc. Sponsored by: Netflix Modified: head/sys/netinet6/ip6_mroute.c head/sys/netinet6/ip6_mroute.h head/sys/sys/param.h head/usr.bin/netstat/mroute6.c head/usr.bin/netstat/netstat.1 Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Mon Apr 6 21:51:55 2015 (r281171) +++ head/sys/netinet6/ip6_mroute.c Mon Apr 6 22:12:18 2015 (r281172) @@ -196,9 +196,34 @@ static struct mtx mfc6_mtx; static u_char n6expire[MF6CTBLSIZ]; static struct mif6 mif6table[MAXMIFS]; -SYSCTL_OPAQUE(_net_inet6_ip6, OID_AUTO, mif6table, CTLFLAG_RD, - &mif6table, sizeof(mif6table), "S,mif6[MAXMIFS]", - "IPv6 Multicast Interfaces (struct mif6[MAXMIFS], netinet6/ip6_mroute.h)"); +static int +sysctl_mif6table(SYSCTL_HANDLER_ARGS) +{ + struct mif6_sctl *out; + int error; + + out = malloc(sizeof(struct mif6_sctl) * MAXMIFS, M_TEMP, M_WAITOK); + for (int i = 0; i < MAXMIFS; i++) { + out[i].m6_flags = mif6table[i].m6_flags; + out[i].m6_rate_limit = mif6table[i].m6_rate_limit; + out[i].m6_lcl_addr = mif6table[i].m6_lcl_addr; + if (mif6table[i].m6_ifp != NULL) + out[i].m6_ifp = mif6table[i].m6_ifp->if_index; + else + out[i].m6_ifp = 0; + out[i].m6_pkt_in = mif6table[i].m6_pkt_in; + out[i].m6_pkt_out = mif6table[i].m6_pkt_out; + out[i].m6_bytes_in = mif6table[i].m6_bytes_in; + out[i].m6_bytes_out = mif6table[i].m6_bytes_out; + } + error = SYSCTL_OUT(req, out, sizeof(struct mif6_sctl) * MAXMIFS); + free(out, M_TEMP); + return (error); +} +SYSCTL_PROC(_net_inet6_ip6, OID_AUTO, mif6table, CTLTYPE_OPAQUE | CTLFLAG_RD, + NULL, 0, sysctl_mif6table, "S,mif6_sctl[MAXMIFS]", + "IPv6 Multicast Interfaces (struct mif6_sctl[MAXMIFS], " + "netinet6/ip6_mroute.h)"); static struct mtx mif6_mtx; #define MIF6_LOCK() mtx_lock(&mif6_mtx) Modified: head/sys/netinet6/ip6_mroute.h ============================================================================== --- head/sys/netinet6/ip6_mroute.h Mon Apr 6 21:51:55 2015 (r281171) +++ head/sys/netinet6/ip6_mroute.h Mon Apr 6 22:12:18 2015 (r281172) @@ -194,6 +194,20 @@ struct sioc_mif_req6 { u_quad_t obytes; /* Output byte count on mif */ }; +/* + * Structure to export 'struct mif6' to userland via sysctl. + */ +struct mif6_sctl { + u_char m6_flags; /* MIFF_ flags defined above */ + u_int m6_rate_limit; /* max rate */ + struct in6_addr m6_lcl_addr; /* local interface address */ + uint32_t m6_ifp; /* interface index */ + u_quad_t m6_pkt_in; /* # pkts in on interface */ + u_quad_t m6_pkt_out; /* # pkts out on interface */ + u_quad_t m6_bytes_in; /* # bytes in on interface */ + u_quad_t m6_bytes_out; /* # bytes out on interface */ +}; + #if defined(_KERNEL) || defined(KERNEL) /* * The kernel's multicast-interface structure. Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Apr 6 21:51:55 2015 (r281171) +++ head/sys/sys/param.h Mon Apr 6 22:12:18 2015 (r281172) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100067 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100068 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/usr.bin/netstat/mroute6.c ============================================================================== --- head/usr.bin/netstat/mroute6.c Mon Apr 6 21:51:55 2015 (r281171) +++ head/usr.bin/netstat/mroute6.c Mon Apr 6 22:12:18 2015 (r281172) @@ -79,13 +79,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include -#include #include #include #include @@ -98,20 +96,6 @@ __FBSDID("$FreeBSD$"); #include "netstat.h" -/* - * kvm(3) bindings for every needed symbol - */ -static struct nlist mrl[] = { -#define N_MF6CTABLE 0 - { .n_name = "_mf6ctable" }, -#define N_MIF6TABLE 1 - { .n_name = "_mif6table" }, -#define N_MRT6STAT 2 - { .n_name = "_mrt6stat" }, - { .n_name = NULL }, -}; - - #define WID_ORG (Wflag ? 39 : (numeric_addr ? 29 : 18)) /* width of origin column */ #define WID_GRP (Wflag ? 18 : (numeric_addr ? 16 : 18)) /* width of group column */ @@ -119,11 +103,10 @@ void mroute6pr() { struct mf6c *mf6ctable[MF6CTBLSIZ], *mfcp; - struct mif6 mif6table[MAXMIFS]; + struct mif6_sctl mif6table[MAXMIFS]; struct mf6c mfc; struct rtdetq rte, *rtep; - struct mif6 *mifp; - u_long mfcaddr, mifaddr; + struct mif6_sctl *mifp; mifi_t mifi; int i; int banner_printed; @@ -132,39 +115,26 @@ mroute6pr() long int waitings; size_t len; - kresolve_list(mrl); - mfcaddr = mrl[N_MF6CTABLE].n_value; - mifaddr = mrl[N_MIF6TABLE].n_value; - - if (mfcaddr == 0 || mifaddr == 0) { - fprintf(stderr, "No IPv6 MROUTING kernel support.\n"); + if (live == 0) return; - } len = sizeof(mif6table); - if (live) { - if (sysctlbyname("net.inet6.ip6.mif6table", mif6table, &len, - NULL, 0) < 0) { - xo_warn("sysctl: net.inet6.ip6.mif6table"); - return; - } - } else - kread(mifaddr, (char *)mif6table, sizeof(mif6table)); + if (sysctlbyname("net.inet6.ip6.mif6table", mif6table, &len, NULL, 0) < + 0) { + xo_warn("sysctl: net.inet6.ip6.mif6table"); + return; + } saved_numeric_addr = numeric_addr; numeric_addr = 1; banner_printed = 0; for (mifi = 0, mifp = mif6table; mifi < MAXMIFS; ++mifi, ++mifp) { - struct ifnet ifnet; char ifname[IFNAMSIZ]; - if (mifp->m6_ifp == NULL) + if (mifp->m6_ifp == 0) continue; - /* XXX KVM */ - kread((u_long)mifp->m6_ifp, (char *)&ifnet, sizeof(ifnet)); - maxmif = mifi; if (!banner_printed) { xo_open_list("multicast-interface"); @@ -177,7 +147,7 @@ mroute6pr() xo_emit(" {:mif/%2u} {:rate-limit/%4d}", mifi, mifp->m6_rate_limit); xo_emit(" {:ifname/%5s}", (mifp->m6_flags & MIFF_REGISTER) ? - "reg0" : if_indextoname(ifnet.if_index, ifname)); + "reg0" : if_indextoname(mifp->m6_ifp, ifname)); xo_emit(" {:received-packets/%9ju} {:sent-packets/%9ju}\n", (uintmax_t)mifp->m6_pkt_in, @@ -190,14 +160,11 @@ mroute6pr() xo_emit("\n{T:IPv6 Multicast Interface Table is empty}\n"); len = sizeof(mf6ctable); - if (live) { - if (sysctlbyname("net.inet6.ip6.mf6ctable", mf6ctable, &len, - NULL, 0) < 0) { - xo_warn("sysctl: net.inet6.ip6.mf6ctable"); - return; - } - } else - kread(mfcaddr, (char *)mf6ctable, sizeof(mf6ctable)); + if (sysctlbyname("net.inet6.ip6.mf6ctable", mf6ctable, &len, NULL, 0) < + 0) { + xo_warn("sysctl: net.inet6.ip6.mf6ctable"); + return; + } banner_printed = 0; @@ -262,26 +229,14 @@ void mrt6_stats() { struct mrt6stat mrtstat; - u_long mstaddr; size_t len = sizeof mrtstat; - kresolve_list(mrl); - mstaddr = mrl[N_MRT6STAT].n_value; - - if (mstaddr == 0) { - fprintf(stderr, "No IPv6 MROUTING kernel support.\n"); + if (sysctlbyname("net.inet6.ip6.mrt6stat", &mrtstat, &len, NULL, 0) < + 0) { + xo_warn("sysctl: net.inet6.ip6.mrt6stat"); return; } - if (live) { - if (sysctlbyname("net.inet6.ip6.mrt6stat", &mrtstat, &len, - NULL, 0) < 0) { - xo_warn("sysctl: net.inet6.ip6.mrt6stat"); - return; - } - } else - kread(mstaddr, (char *)&mrtstat, sizeof(mrtstat)); - xo_open_container("multicast-statistics"); xo_emit("{T:IPv6 multicast forwarding}:\n"); Modified: head/usr.bin/netstat/netstat.1 ============================================================================== --- head/usr.bin/netstat/netstat.1 Mon Apr 6 21:51:55 2015 (r281171) +++ head/usr.bin/netstat/netstat.1 Mon Apr 6 22:12:18 2015 (r281172) @@ -28,7 +28,7 @@ .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd February 21, 2015 +.Dd April 7, 2015 .Dt NETSTAT 1 .Os .Sh NAME @@ -92,8 +92,6 @@ .Op Fl -libxo .Op Fl 46W .Op Fl f Ar address_family -.Op Fl M Ar core -.Op Fl N Ar system .It Nm Fl gs .Op Fl -libxo .Op Fl 46s From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 22:53:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0919BA; Mon, 6 Apr 2015 22:53:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC54722B; Mon, 6 Apr 2015 22:53:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36MrOSn015187; Mon, 6 Apr 2015 22:53:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36MrOGf015186; Mon, 6 Apr 2015 22:53:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504062253.t36MrOGf015186@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 6 Apr 2015 22:53:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281175 - head/usr.bin/lockf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 22:53:25 -0000 Author: markj Date: Mon Apr 6 22:53:23 2015 New Revision: 281175 URL: https://svnweb.freebsd.org/changeset/base/281175 Log: lockf(1): add a reference to lockf(3). Submitted by: Conrad Meyer MFC after: 1 week Modified: head/usr.bin/lockf/lockf.1 Modified: head/usr.bin/lockf/lockf.1 ============================================================================== --- head/usr.bin/lockf/lockf.1 Mon Apr 6 22:41:13 2015 (r281174) +++ head/usr.bin/lockf/lockf.1 Mon Apr 6 22:53:23 2015 (r281175) @@ -162,6 +162,7 @@ but may have been signaled or stopped. .El .Sh SEE ALSO .Xr flock 2 , +.Xr lockf 3 , .Xr sysexits 3 .Sh HISTORY A From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 23:10:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7F184CF; Mon, 6 Apr 2015 23:10:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3BD0398; Mon, 6 Apr 2015 23:10:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36NAmUG022893; Mon, 6 Apr 2015 23:10:48 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36NAmW7022892; Mon, 6 Apr 2015 23:10:48 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504062310.t36NAmW7022892@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 6 Apr 2015 23:10:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281176 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 23:10:49 -0000 Author: dteske Date: Mon Apr 6 23:10:47 2015 New Revision: 281176 URL: https://svnweb.freebsd.org/changeset/base/281176 Log: Partially revert r280925: Back to previous mode-endings based on feedback MFC after: 3 days X-MFC-with: r280925 Reported by: lattera Modified: head/sys/boot/forth/loader.4th Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Mon Apr 6 22:53:23 2015 (r281175) +++ head/sys/boot/forth/loader.4th Mon Apr 6 23:10:47 2015 (r281176) @@ -53,7 +53,7 @@ only forth definitions loader_color? dup ( -- bool bool ) if 7 fg 4 bg then ." Booting..." - if me then + if escc ." 0m" then cr ; From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 23:13:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52998727; Mon, 6 Apr 2015 23:13:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3ECE1642; Mon, 6 Apr 2015 23:13:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36NDIT7025760; Mon, 6 Apr 2015 23:13:18 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36NDHuA025758; Mon, 6 Apr 2015 23:13:17 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504062313.t36NDHuA025758@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 6 Apr 2015 23:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281177 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 23:13:18 -0000 Author: dteske Date: Mon Apr 6 23:13:16 2015 New Revision: 281177 URL: https://svnweb.freebsd.org/changeset/base/281177 Log: Partially revert r280974: Back to previous mode-endings based on feedback MFC after: 3 days X-MFC-to: stable/10 X-MFC-with: r290974 Reported by: lattera Modified: head/sys/boot/forth/menu.4th head/sys/boot/forth/version.4th Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Mon Apr 6 23:10:47 2015 (r281176) +++ head/sys/boot/forth/menu.4th Mon Apr 6 23:13:16 2015 (r281177) @@ -219,7 +219,7 @@ also menu-infrastructure definitions loader_color? dup ( -- bool bool ) if b then menuidx @ . - if me then + if 7 fg then \ Move the cursor forward 1 column dup menuX @ 1+ swap at-xy Modified: head/sys/boot/forth/version.4th ============================================================================== --- head/sys/boot/forth/version.4th Mon Apr 6 23:10:47 2015 (r281176) +++ head/sys/boot/forth/version.4th Mon Apr 6 23:13:16 2015 (r281177) @@ -88,7 +88,7 @@ only forth definitions also version-proc loader_color? dup ( -- bool bool ) if 6 fg then type - if me then + if 7 fg then ; only forth definitions From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 23:16:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 407F08AD; Mon, 6 Apr 2015 23:16:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14182662; Mon, 6 Apr 2015 23:16:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36NG4uW026342; Mon, 6 Apr 2015 23:16:04 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36NG4IG026340; Mon, 6 Apr 2015 23:16:04 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504062316.t36NG4IG026340@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 6 Apr 2015 23:16:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281178 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 23:16:05 -0000 Author: dteske Date: Mon Apr 6 23:16:03 2015 New Revision: 281178 URL: https://svnweb.freebsd.org/changeset/base/281178 Log: Partially revert r280975: Back to previous mode-endings based on feedback Reported by: lattera MFC after: 3 days X-MFC-to: stable/10 X-MFC-with: r280975 Modified: head/sys/boot/forth/logo-beastie.4th head/sys/boot/forth/logo-orb.4th Modified: head/sys/boot/forth/logo-beastie.4th ============================================================================== --- head/sys/boot/forth/logo-beastie.4th Mon Apr 6 23:13:16 2015 (r281177) +++ head/sys/boot/forth/logo-beastie.4th Mon Apr 6 23:16:03 2015 (r281178) @@ -40,11 +40,11 @@ s" @[31m, ," logo+ s" /( )`" logo+ s" \ \___ / |" logo+ - s" /- @[m_@[31m `-/ '" logo+ - s" (@[m/\/ \@[31m \ /\" logo+ - s" @[m/ / |@[31m ` \" logo+ - s" @[34mO O @[m) @[31m/ |" logo+ - s" @[m`-^--'@[31m`< '" logo+ + s" /- @[37m_@[31m `-/ '" logo+ + s" (@[37m/\/ \@[31m \ /\" logo+ + s" @[37m/ / |@[31m ` \" logo+ + s" @[34mO O @[37m) @[31m/ |" logo+ + s" @[37m`-^--'@[31m`< '" logo+ s" (_.) _ ) /" logo+ s" `.___/` /" logo+ s" `-----' /" logo+ @@ -55,7 +55,7 @@ s" \ / /\" logo+ s" @[36m______@[31m( (_ / \______/" logo+ s" @[36m,' ,-----' |" logo+ - s" `--{__________)@[m" logo+ + s" `--{__________)@[37m" logo+ 2drop ; Modified: head/sys/boot/forth/logo-orb.4th ============================================================================== --- head/sys/boot/forth/logo-orb.4th Mon Apr 6 23:13:16 2015 (r281177) +++ head/sys/boot/forth/logo-orb.4th Mon Apr 6 23:16:03 2015 (r281178) @@ -49,7 +49,7 @@ s" -- @[31;1m-.@[31m" logo+ s" `:` @[31;1m`:`" logo+ s" @[31;1m.-- `--." logo+ - s" .---.....----.@[m" logo+ + s" .---.....----.@[37m" logo+ 2drop ; From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 23:22:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04F54B2A; Mon, 6 Apr 2015 23:22:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA8A3790; Mon, 6 Apr 2015 23:22:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36NMtR9031046; Mon, 6 Apr 2015 23:22:55 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36NMtfo031045; Mon, 6 Apr 2015 23:22:55 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504062322.t36NMtfo031045@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 6 Apr 2015 23:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281179 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 23:22:56 -0000 Author: dteske Date: Mon Apr 6 23:22:54 2015 New Revision: 281179 URL: https://svnweb.freebsd.org/changeset/base/281179 Log: Partially revert r280976: Back to previous mode-endings based on feedback Reported by: lattera MFC after: 3 days X-MFC-to: stable/10 X-MFC-with: r280976 Modified: head/sys/boot/forth/menu.rc Modified: head/sys/boot/forth/menu.rc ============================================================================== --- head/sys/boot/forth/menu.rc Mon Apr 6 23:16:03 2015 (r281178) +++ head/sys/boot/forth/menu.rc Mon Apr 6 23:22:54 2015 (r281179) @@ -28,22 +28,22 @@ set mainmenu_init[1]="init_boot" set mainmenu_caption[1]="Boot Multi User [Enter]" set maintoggled_text[1]="Boot [S]ingle User [Enter]" set mainmenu_command[1]="boot" -set mainansi_caption[1]="Boot Multi User [Enter]" -set maintoggled_ansi[1]="Boot Single User [Enter]" +set mainansi_caption[1]="Boot Multi User [Enter]" +set maintoggled_ansi[1]="Boot Single User [Enter]" \ keycode set by init_boot set mainmenu_init[2]="init_altboot" set mainmenu_caption[2]="Boot [S]ingle User" set maintoggled_text[2]="Boot [M]ulti User" set mainmenu_command[2]="altboot" -set mainansi_caption[2]="Boot Single User" -set maintoggled_ansi[2]="Boot Multi User" +set mainansi_caption[2]="Boot Single User" +set maintoggled_ansi[2]="Boot Multi User" \ keycode set by init_altboot set mainmenu_caption[3]="[Esc]ape to loader prompt" set mainmenu_command[3]="goto_prompt" set mainmenu_keycode[3]=27 -set mainansi_caption[3]="Escape to loader prompt" +set mainansi_caption[3]="Escape to loader prompt" \ Enable built-in "Reboot" trailing menuitem \ NOTE: appears before menu_options if configured @@ -62,7 +62,7 @@ set mainmenu_keycode[5]=107 set mainmenu_caption[6]="Configure Boot [O]ptions..." set mainmenu_command[6]="2 goto_menu" set mainmenu_keycode[6]=111 -set mainansi_caption[6]="Configure Boot Options..." +set mainansi_caption[6]="Configure Boot Options..." \ \ BOOT OPTIONS MENU @@ -73,12 +73,12 @@ set menuset_name2="options" set optionsmenu_caption[1]="Back to Main Menu [Backspace]" set optionsmenu_command[1]="1 goto_menu" set optionsmenu_keycode[1]=8 -set optionsansi_caption[1]="Back to Main Menu [Backspace]" +set optionsansi_caption[1]="Back to Main Menu [Backspace]" set optionsmenu_caption[2]="Load System [D]efaults" set optionsmenu_command[2]="set_default_boot_options" set optionsmenu_keycode[2]=100 -set optionsansi_caption[2]="Load System Defaults" +set optionsansi_caption[2]="Load System Defaults" set optionsmenu_options=3 set optionsmenu_optionstext="Boot Options:" @@ -88,32 +88,32 @@ set optionsmenu_caption[3]="[A]CPI Suppo set optionstoggled_text[3]="[A]CPI Support On" set optionsmenu_command[3]="toggle_acpi" set optionsmenu_keycode[3]=97 -set optionsansi_caption[3]="ACPI Support Off" -set optionstoggled_ansi[3]="ACPI Support On" +set optionsansi_caption[3]="ACPI Support Off" +set optionstoggled_ansi[3]="ACPI Support On" set optionsmenu_init[4]="init_safemode" set optionsmenu_caption[4]="Safe [M]ode... off" set optionstoggled_text[4]="Safe [M]ode... On" set optionsmenu_command[4]="toggle_safemode" set optionsmenu_keycode[4]=109 -set optionsansi_caption[4]="Safe Mode... Off" -set optionstoggled_ansi[4]="Safe Mode... On" +set optionsansi_caption[4]="Safe Mode... Off" +set optionstoggled_ansi[4]="Safe Mode... On" set optionsmenu_init[5]="init_singleuser" set optionsmenu_caption[5]="[S]ingle User. off" set optionstoggled_text[5]="[S]ingle User. On" set optionsmenu_command[5]="toggle_singleuser" set optionsmenu_keycode[5]=115 -set optionsansi_caption[5]="Single User. Off" -set optionstoggled_ansi[5]="Single User. On" +set optionsansi_caption[5]="Single User. Off" +set optionstoggled_ansi[5]="Single User. On" set optionsmenu_init[6]="init_verbose" set optionsmenu_caption[6]="[V]erbose..... off" set optionstoggled_text[6]="[V]erbose..... On" set optionsmenu_command[6]="toggle_verbose" set optionsmenu_keycode[6]=118 -set optionsansi_caption[6]="Verbose..... Off" -set optionstoggled_ansi[6]="Verbose..... On" +set optionsansi_caption[6]="Verbose..... Off" +set optionstoggled_ansi[6]="Verbose..... On" \ Enable automatic booting (add ``autoboot_delay=N'' to loader.conf(5) to \ customize the timeout; default is 10-seconds) From owner-svn-src-head@FreeBSD.ORG Mon Apr 6 23:37:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 556F4D95; Mon, 6 Apr 2015 23:37:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3742F89B; Mon, 6 Apr 2015 23:37:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t36Nb6Ka036280; Mon, 6 Apr 2015 23:37:06 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36Nb5wJ036278; Mon, 6 Apr 2015 23:37:05 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504062337.t36Nb5wJ036278@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 6 Apr 2015 23:37:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281180 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 23:37:06 -0000 Author: dteske Date: Mon Apr 6 23:37:04 2015 New Revision: 281180 URL: https://svnweb.freebsd.org/changeset/base/281180 Log: Eliminate literal escape sequences from *.rc Suggested by: alfred MFC after: 3 days X-MFC-to: stable/10 X-MFC-with: r280976, r281179 Modified: head/sys/boot/forth/menu.4th head/sys/boot/forth/menu.rc Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Mon Apr 6 23:22:54 2015 (r281179) +++ head/sys/boot/forth/menu.4th Mon Apr 6 23:37:04 2015 (r281180) @@ -206,6 +206,8 @@ also menu-infrastructure definitions \ : printmenuitem ( menu_item_str -- ascii_keycode ) + loader_color? if [char] ^ escc! then + menurow dup @ 1+ swap ! ( increment menurow ) menuidx dup @ 1+ swap ! ( increment menuidx ) Modified: head/sys/boot/forth/menu.rc ============================================================================== --- head/sys/boot/forth/menu.rc Mon Apr 6 23:22:54 2015 (r281179) +++ head/sys/boot/forth/menu.rc Mon Apr 6 23:37:04 2015 (r281180) @@ -17,6 +17,7 @@ menu-init \ initialize the menu area \ Initialize main menu constructs (see `menu.4th') \ NOTE: To use `non-ansi' variants, add `loader_color=0' to loader.conf(5) +\ NOTE: ANSI variants can use `^' in place of literal `Esc' (ASCII 27) \ \ MAIN MENU @@ -28,22 +29,22 @@ set mainmenu_init[1]="init_boot" set mainmenu_caption[1]="Boot Multi User [Enter]" set maintoggled_text[1]="Boot [S]ingle User [Enter]" set mainmenu_command[1]="boot" -set mainansi_caption[1]="Boot Multi User [Enter]" -set maintoggled_ansi[1]="Boot Single User [Enter]" +set mainansi_caption[1]="^[1mB^[37moot Multi User ^[1m[Enter]^[37m" +set maintoggled_ansi[1]="Boot ^[1mS^[37mingle User ^[1m[Enter]^[37m" \ keycode set by init_boot set mainmenu_init[2]="init_altboot" set mainmenu_caption[2]="Boot [S]ingle User" set maintoggled_text[2]="Boot [M]ulti User" set mainmenu_command[2]="altboot" -set mainansi_caption[2]="Boot Single User" -set maintoggled_ansi[2]="Boot Multi User" +set mainansi_caption[2]="Boot ^[1mS^[37mingle User" +set maintoggled_ansi[2]="Boot ^[1mM^[37multi User" \ keycode set by init_altboot set mainmenu_caption[3]="[Esc]ape to loader prompt" set mainmenu_command[3]="goto_prompt" set mainmenu_keycode[3]=27 -set mainansi_caption[3]="Escape to loader prompt" +set mainansi_caption[3]="^[1mEsc^[37mape to loader prompt" \ Enable built-in "Reboot" trailing menuitem \ NOTE: appears before menu_options if configured @@ -62,7 +63,7 @@ set mainmenu_keycode[5]=107 set mainmenu_caption[6]="Configure Boot [O]ptions..." set mainmenu_command[6]="2 goto_menu" set mainmenu_keycode[6]=111 -set mainansi_caption[6]="Configure Boot Options..." +set mainansi_caption[6]="Configure Boot ^[1mO^[37mptions..." \ \ BOOT OPTIONS MENU @@ -73,12 +74,12 @@ set menuset_name2="options" set optionsmenu_caption[1]="Back to Main Menu [Backspace]" set optionsmenu_command[1]="1 goto_menu" set optionsmenu_keycode[1]=8 -set optionsansi_caption[1]="Back to Main Menu [Backspace]" +set optionsansi_caption[1]="Back to Main Menu ^[1m[Backspace]^[37m" set optionsmenu_caption[2]="Load System [D]efaults" set optionsmenu_command[2]="set_default_boot_options" set optionsmenu_keycode[2]=100 -set optionsansi_caption[2]="Load System Defaults" +set optionsansi_caption[2]="Load System ^[1mD^[37mefaults" set optionsmenu_options=3 set optionsmenu_optionstext="Boot Options:" @@ -88,32 +89,32 @@ set optionsmenu_caption[3]="[A]CPI Suppo set optionstoggled_text[3]="[A]CPI Support On" set optionsmenu_command[3]="toggle_acpi" set optionsmenu_keycode[3]=97 -set optionsansi_caption[3]="ACPI Support Off" -set optionstoggled_ansi[3]="ACPI Support On" +set optionsansi_caption[3]="^[1mA^[37mCPI Support ^[34;1mOff^[37m" +set optionstoggled_ansi[3]="^[1mA^[37mCPI Support ^[32;7mOn^[0;37m" set optionsmenu_init[4]="init_safemode" set optionsmenu_caption[4]="Safe [M]ode... off" set optionstoggled_text[4]="Safe [M]ode... On" set optionsmenu_command[4]="toggle_safemode" set optionsmenu_keycode[4]=109 -set optionsansi_caption[4]="Safe Mode... Off" -set optionstoggled_ansi[4]="Safe Mode... On" +set optionsansi_caption[4]="Safe ^[1mM^[37mode... ^[34;1mOff^[37m" +set optionstoggled_ansi[4]="Safe ^[1mM^[37mode... ^[32;7mOn^[0;37m" set optionsmenu_init[5]="init_singleuser" set optionsmenu_caption[5]="[S]ingle User. off" set optionstoggled_text[5]="[S]ingle User. On" set optionsmenu_command[5]="toggle_singleuser" set optionsmenu_keycode[5]=115 -set optionsansi_caption[5]="Single User. Off" -set optionstoggled_ansi[5]="Single User. On" +set optionsansi_caption[5]="^[1mS^[37mingle User. ^[34;1mOff^[37m" +set optionstoggled_ansi[5]="^[1mS^[37mingle User. ^[32;7mOn^[0;37m" set optionsmenu_init[6]="init_verbose" set optionsmenu_caption[6]="[V]erbose..... off" set optionstoggled_text[6]="[V]erbose..... On" set optionsmenu_command[6]="toggle_verbose" set optionsmenu_keycode[6]=118 -set optionsansi_caption[6]="Verbose..... Off" -set optionstoggled_ansi[6]="Verbose..... On" +set optionsansi_caption[6]="^[1mV^[37merbose..... ^[34;1mOff^[37m" +set optionstoggled_ansi[6]="^[1mV^[37merbose..... ^[32;7mOn^[0;37m" \ Enable automatic booting (add ``autoboot_delay=N'' to loader.conf(5) to \ customize the timeout; default is 10-seconds) From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 01:17:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D6D3E12; Tue, 7 Apr 2015 01:17:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 207C5223; Tue, 7 Apr 2015 01:17:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t371HTAS083982; Tue, 7 Apr 2015 01:17:29 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t371HTlS083981; Tue, 7 Apr 2015 01:17:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504070117.t371HTlS083981@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 7 Apr 2015 01:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281181 - head/usr.bin/sort X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 01:17:30 -0000 Author: pfg Date: Tue Apr 7 01:17:29 2015 New Revision: 281181 URL: https://svnweb.freebsd.org/changeset/base/281181 Log: sort(1): Cleanups and a small memory leak. Remove useless check for leading blanks in the month name. The code didn't adjust len after stripping blanks so even if a month *did* start with a blank we'd end up copying garbage at the end. Also convert a malloc + memcpy to strdup and fix a memory leak in the wide char version if mbstowcs() fails. Originally from Andre Smagin. Obtained from: OpenBSD (CVS rev. 1.2, 1.3) MFC after: 1 week Modified: head/usr.bin/sort/bwstring.c Modified: head/usr.bin/sort/bwstring.c ============================================================================== --- head/usr.bin/sort/bwstring.c Mon Apr 6 23:37:04 2015 (r281180) +++ head/usr.bin/sort/bwstring.c Tue Apr 7 01:17:29 2015 (r281181) @@ -65,18 +65,12 @@ initialise_months(void) for (int i = 0; i < 12; i++) { cmonths[i] = NULL; tmp = (unsigned char *) nl_langinfo(item[i]); - if (tmp == NULL) - continue; if (debug_sort) printf("month[%d]=%s\n", i, tmp); - len = strlen((char*)tmp); - if (len < 1) + if (*tmp == '\0') continue; - while (isblank(*tmp)) - ++tmp; - m = sort_malloc(len + 1); - memcpy(m, tmp, len + 1); - m[len] = '\0'; + m = sort_strdup(tmp); + len = strlen(tmp); for (unsigned int j = 0; j < len; j++) m[j] = toupper(m[j]); cmonths[i] = m; @@ -91,18 +85,17 @@ initialise_months(void) for (int i = 0; i < 12; i++) { wmonths[i] = NULL; tmp = (unsigned char *) nl_langinfo(item[i]); - if (tmp == NULL) - continue; if (debug_sort) printf("month[%d]=%s\n", i, tmp); - len = strlen((char*)tmp); - if (len < 1) + if (*tmp == '\0') continue; - while (isblank(*tmp)) - ++tmp; + len = strlen(tmp); m = sort_malloc(SIZEOF_WCHAR_STRING(len + 1)); - if (mbstowcs(m, (char*)tmp, len) == ((size_t) -1)) + if (mbstowcs(m, (char*)tmp, len) == + ((size_t) - 1)) { + sort_free(m); continue; + } m[len] = L'\0'; for (unsigned int j = 0; j < len; j++) m[j] = towupper(m[j]); From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 01:17:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B318F56; Tue, 7 Apr 2015 01:17:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8436A22A; Tue, 7 Apr 2015 01:17:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t371HpAW084058; Tue, 7 Apr 2015 01:17:51 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t371Ho1L084054; Tue, 7 Apr 2015 01:17:50 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504070117.t371Ho1L084054@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 7 Apr 2015 01:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281182 - head/usr.bin/sort X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 01:17:51 -0000 Author: pfg Date: Tue Apr 7 01:17:49 2015 New Revision: 281182 URL: https://svnweb.freebsd.org/changeset/base/281182 Log: Remove custom getdelim(3) and fix a small memory leak. Originally from Andre Smagin. Obtained from: OpenBSD MFC after: 1 week Modified: head/usr.bin/sort/file.c head/usr.bin/sort/file.h head/usr.bin/sort/sort.c Modified: head/usr.bin/sort/file.c ============================================================================== --- head/usr.bin/sort/file.c Tue Apr 7 01:17:29 2015 (r281181) +++ head/usr.bin/sort/file.c Tue Apr 7 01:17:49 2015 (r281182) @@ -188,42 +188,6 @@ file_is_tmp(const char* fn) } /* - * Read zero-terminated line from a file - */ -char * -read_file0_line(struct file0_reader *f0r) -{ - size_t pos = 0; - int c; - - if ((f0r->f == NULL) || feof(f0r->f)) - return (NULL); - - if (f0r->current_line && f0r->current_sz > 0) - f0r->current_line[0] = 0; - - while (!feof(f0r->f)) { - c = fgetc(f0r->f); - if (feof(f0r->f) || (c == -1)) - break; - if ((pos + 1) >= f0r->current_sz) { - size_t newsz = (f0r->current_sz + 2) * 2; - f0r->current_line = sort_realloc(f0r->current_line, - newsz); - f0r->current_sz = newsz; - } - f0r->current_line[pos] = (char)c; - if (c == 0) - break; - else - f0r->current_line[pos + 1] = 0; - ++pos; - } - - return f0r->current_line; -} - -/* * Generate new temporary file name */ char * Modified: head/usr.bin/sort/file.h ============================================================================== --- head/usr.bin/sort/file.h Tue Apr 7 01:17:29 2015 (r281181) +++ head/usr.bin/sort/file.h Tue Apr 7 01:17:49 2015 (r281182) @@ -70,16 +70,6 @@ struct file_list bool tmp; }; -/* - * Structure for zero-separated file reading (for input files list) - */ -struct file0_reader -{ - char *current_line; - FILE *f; - size_t current_sz; -}; - /* memory */ /**/ @@ -110,8 +100,6 @@ struct file_reader *file_reader_init(con struct bwstring *file_reader_readline(struct file_reader *fr); void file_reader_free(struct file_reader *fr); -char *read_file0_line(struct file0_reader *f0r); - void init_tmp_files(void); void clear_tmp_files(void); char *new_tmp_file_name(void); Modified: head/usr.bin/sort/sort.c ============================================================================== --- head/usr.bin/sort/sort.c Tue Apr 7 01:17:29 2015 (r281181) +++ head/usr.bin/sort/sort.c Tue Apr 7 01:17:49 2015 (r281182) @@ -229,34 +229,38 @@ usage(bool opt_err) static void read_fns_from_file0(const char *fn) { - if (fn) { - struct file0_reader f0r; - FILE *f; + FILE *f; + char *line = NULL; + size_t linesize = 0; + ssize_t linelen; - f = fopen(fn, "r"); - if (f == NULL) - err(2, NULL); - - memset(&f0r, 0, sizeof(f0r)); - f0r.f = f; - - while (!feof(f)) { - char *line = read_file0_line(&f0r); + if (fn == NULL) + return; - if (line && *line) { - if (argc_from_file0 == (size_t)-1) - argc_from_file0 = 0; - ++argc_from_file0; - argv_from_file0 = sort_realloc(argv_from_file0, - argc_from_file0 * sizeof(char *)); - if (argv_from_file0 == NULL) - err(2, NULL); - argv_from_file0[argc_from_file0 - 1] = - sort_strdup(line); - } + f = fopen(fn, "r"); + if (f == NULL) + err(2, "%s", fn); + + while ((linelen = getdelim(&line, &linesize, '\0', f)) != -1) { + if (*line != '\0') { + if (argc_from_file0 == (size_t) - 1) + argc_from_file0 = 0; + ++argc_from_file0; + argv_from_file0 = sort_realloc(argv_from_file0, + argc_from_file0 * sizeof(char *)); + if (argv_from_file0 == NULL) + err(2, NULL); + argv_from_file0[argc_from_file0 - 1] = line; + } else { + free(line); } - closefile(f, fn); + line = NULL; + linesize = 0; } + if (ferror(f)) + err(2, "%s: getdelim", fn); + + closefile(f, fn); } /* From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 01:34:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 284A14C4; Tue, 7 Apr 2015 01:34:28 +0000 (UTC) Date: Tue, 7 Apr 2015 01:34:28 +0000 From: Alexey Dokuchaev To: Devin Teske Subject: Re: svn commit: r281178 - head/sys/boot/forth Message-ID: <20150407013428.GB22994@FreeBSD.org> References: <201504062316.t36NG4IG026340@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504062316.t36NG4IG026340@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 01:34:28 -0000 On Mon, Apr 06, 2015 at 11:16:04PM +0000, Devin Teske wrote: > New Revision: 281178 > URL: https://svnweb.freebsd.org/changeset/base/281178 > > Log: > Partially revert r280975: Back to previous mode-endings based on feedback > > Reported by: lattera $ finger lattera@freebsd.org [freebsd.org] Trying 8.8.178.110... finger: lattera: no such user ./danfe From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 01:42:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B04878C8; Tue, 7 Apr 2015 01:42:33 +0000 (UTC) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99C986DB; Tue, 7 Apr 2015 01:42:33 +0000 (UTC) Received: from 50-196-156-133-static.hfc.comcastbusiness.net ([50.196.156.133]:54315 helo=tinkerbell.pixel8networks.com) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1YfBID-00088J-AK; Mon, 06 Apr 2015 10:58:37 -0700 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: svn commit: r281178 - head/sys/boot/forth From: Devin Teske In-Reply-To: <20150407013428.GB22994@FreeBSD.org> Date: Mon, 6 Apr 2015 18:42:31 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201504062316.t36NG4IG026340@svn.freebsd.org> <20150407013428.GB22994@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1990.1) Sender: devin@shxd.cx Cc: svn-src-head@freebsd.org, Devin Teske , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 01:42:33 -0000 > On Apr 6, 2015, at 6:34 PM, Alexey Dokuchaev = wrote: >=20 > On Mon, Apr 06, 2015 at 11:16:04PM +0000, Devin Teske wrote: >> New Revision: 281178 >> URL: https://svnweb.freebsd.org/changeset/base/281178 >>=20 >> Log: >> Partially revert r280975: Back to previous mode-endings based on = feedback >>=20 >> Reported by: lattera >=20 > $ finger lattera@freebsd.org > [freebsd.org] > Trying 8.8.178.110... > finger: lattera: no such user >=20 > ./danfe >=20 Yeah, realized the person was in #bsdcode (vs other) after commit. =E2=80=94=20 Devin= From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 01:47:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A238AA4; Tue, 7 Apr 2015 01:47:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75BD9755; Tue, 7 Apr 2015 01:47:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t371lbEd098288; Tue, 7 Apr 2015 01:47:37 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t371laH1098281; Tue, 7 Apr 2015 01:47:36 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201504070147.t371laH1098281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 7 Apr 2015 01:47:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281183 - in head/sys/dev/usb: . net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 01:47:37 -0000 Author: kevlo Date: Tue Apr 7 01:47:36 2015 New Revision: 281183 URL: https://svnweb.freebsd.org/changeset/base/281183 Log: Add Lenovo ThinkPad OneLink GigaLAN. PR: 199184 Submitted by: Robin Karlsson Modified: head/sys/dev/usb/net/if_axge.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/net/if_axge.c ============================================================================== --- head/sys/dev/usb/net/if_axge.c Tue Apr 7 01:17:49 2015 (r281182) +++ head/sys/dev/usb/net/if_axge.c Tue Apr 7 01:47:36 2015 (r281183) @@ -67,6 +67,7 @@ static const STRUCT_USB_HOST_ID axge_dev AXGE_DEV(ASIX, AX88178A), AXGE_DEV(ASIX, AX88179), AXGE_DEV(DLINK, DUB1312), + AXGE_DEV(LENOVO, GIGALAN), AXGE_DEV(SITECOMEU, LN032), #undef AXGE_DEV }; Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Apr 7 01:17:49 2015 (r281182) +++ head/sys/dev/usb/usbdevs Tue Apr 7 01:47:36 2015 (r281183) @@ -2627,6 +2627,7 @@ product LARSENBRUSGAARD ALTITRACK 0x0001 product LEADTEK 9531 0x2101 9531 GPS /* Lenovo products */ +product LENOVO GIGALAN 0x304b USB 3.0 Ethernet product LENOVO ETHERNET 0x7203 USB 2.0 Ethernet /* Lexar products */ From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 02:18:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1D5B95; Tue, 7 Apr 2015 02:18:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCF849F7; Tue, 7 Apr 2015 02:18:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t372Irh2012686; Tue, 7 Apr 2015 02:18:53 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t372Ir9J012685; Tue, 7 Apr 2015 02:18:53 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201504070218.t372Ir9J012685@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Tue, 7 Apr 2015 02:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281184 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 02:18:54 -0000 Author: jeff Date: Tue Apr 7 02:18:52 2015 New Revision: 281184 URL: https://svnweb.freebsd.org/changeset/base/281184 Log: - Simplify vm_pageout_scan() by introducing a new vm_pageout_clean() function that does the locking and validation associated with cleaning a page. This moves 150 lines of code into its own function. - Rename vm_pageout_clean() to vm_pageout_cluster() to define what it really does; clustering nearby pages for pageout optimization. Reviewd by: alc, kib, kmacy Tested by: pho (earlier version) Sponsored by: EMC / Isilon Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Tue Apr 7 01:47:36 2015 (r281183) +++ head/sys/vm/vm_pageout.c Tue Apr 7 02:18:52 2015 (r281184) @@ -118,7 +118,8 @@ __FBSDID("$FreeBSD$"); /* the kernel process "vm_pageout"*/ static void vm_pageout(void); static void vm_pageout_init(void); -static int vm_pageout_clean(vm_page_t); +static int vm_pageout_clean(vm_page_t m); +static int vm_pageout_cluster(vm_page_t m); static void vm_pageout_scan(struct vm_domain *vmd, int pass); static void vm_pageout_mightbe_oom(struct vm_domain *vmd, int pass); @@ -347,7 +348,7 @@ vm_pageout_page_lock(vm_page_t m, vm_pag * late and we cannot do anything that will mess with the page. */ static int -vm_pageout_clean(vm_page_t m) +vm_pageout_cluster(vm_page_t m) { vm_object_t object; vm_page_t mc[2*vm_pageout_page_count], pb, ps; @@ -906,6 +907,115 @@ vm_pageout_map_deactivate_pages(map, des #endif /* !defined(NO_SWAPPING) */ /* + * Attempt to acquire all of the necessary locks to launder a page and + * then call through the clustering layer to PUTPAGES. Wait a short + * time for a vnode lock. + * + * Requires the page and object lock on entry, releases both before return. + * Returns 0 on success and an errno otherwise. + */ +static int +vm_pageout_clean(vm_page_t m) +{ + struct vnode *vp; + struct mount *mp; + vm_object_t object; + vm_pindex_t pindex; + int error, lockmode; + + vm_page_assert_locked(m); + object = m->object; + VM_OBJECT_ASSERT_WLOCKED(object); + error = 0; + vp = NULL; + mp = NULL; + + /* + * The object is already known NOT to be dead. It + * is possible for the vget() to block the whole + * pageout daemon, but the new low-memory handling + * code should prevent it. + * + * We can't wait forever for the vnode lock, we might + * deadlock due to a vn_read() getting stuck in + * vm_wait while holding this vnode. We skip the + * vnode if we can't get it in a reasonable amount + * of time. + */ + if (object->type == OBJT_VNODE) { + vm_page_unlock(m); + vp = object->handle; + if (vp->v_type == VREG && + vn_start_write(vp, &mp, V_NOWAIT) != 0) { + mp = NULL; + error = EDEADLK; + goto unlock_all; + } + KASSERT(mp != NULL, + ("vp %p with NULL v_mount", vp)); + vm_object_reference_locked(object); + pindex = m->pindex; + VM_OBJECT_WUNLOCK(object); + lockmode = MNT_SHARED_WRITES(vp->v_mount) ? + LK_SHARED : LK_EXCLUSIVE; + if (vget(vp, lockmode | LK_TIMELOCK, curthread)) { + vp = NULL; + error = EDEADLK; + goto unlock_mp; + } + VM_OBJECT_WLOCK(object); + vm_page_lock(m); + /* + * While the object and page were unlocked, the page + * may have been: + * (1) moved to a different queue, + * (2) reallocated to a different object, + * (3) reallocated to a different offset, or + * (4) cleaned. + */ + if (m->queue != PQ_INACTIVE || m->object != object || + m->pindex != pindex || m->dirty == 0) { + vm_page_unlock(m); + error = ENXIO; + goto unlock_all; + } + + /* + * The page may have been busied or held while the object + * and page locks were released. + */ + if (vm_page_busied(m) || m->hold_count != 0) { + vm_page_unlock(m); + error = EBUSY; + goto unlock_all; + } + } + + /* + * If a page is dirty, then it is either being washed + * (but not yet cleaned) or it is still in the + * laundry. If it is still in the laundry, then we + * start the cleaning operation. + */ + if (vm_pageout_cluster(m) == 0) + error = EIO; + +unlock_all: + VM_OBJECT_WUNLOCK(object); + +unlock_mp: + vm_page_lock_assert(m, MA_NOTOWNED); + if (mp != NULL) { + if (vp != NULL) + vput(vp); + vm_object_deallocate(object); + vn_finished_write(mp); + } + + return (error); +} + +/* * vm_pageout_scan does the dirty work for the pageout daemon. * * pass 0 - Update active LRU/deactivate pages @@ -921,7 +1031,6 @@ vm_pageout_scan(struct vm_domain *vmd, i int act_delta, addl_page_shortage, deficit, maxscan, page_shortage; int vnodes_skipped = 0; int maxlaunder; - int lockmode; boolean_t queues_locked; /* @@ -1155,9 +1264,7 @@ vm_pageout_scan(struct vm_domain *vmd, i * on the inactive queue, we may have to go all out. */ int swap_pageouts_ok; - struct vnode *vp = NULL; - struct mount *mp = NULL; - vm_pindex_t pindex; + int error; if ((object->type != OBJT_SWAP) && (object->type != OBJT_DEFAULT)) { swap_pageouts_ok = 1; @@ -1180,124 +1287,20 @@ vm_pageout_scan(struct vm_domain *vmd, i vm_page_requeue_locked(m); goto relock_queues; } - + error = vm_pageout_clean(m); /* - * The object is already known NOT to be dead. It - * is possible for the vget() to block the whole - * pageout daemon, but the new low-memory handling - * code should prevent it. - * - * The previous code skipped locked vnodes and, worse, - * reordered pages in the queue. This results in - * completely non-deterministic operation and, on a - * busy system, can lead to extremely non-optimal - * pageouts. For example, it can cause clean pages - * to be freed and dirty pages to be moved to the end - * of the queue. Since dirty pages are also moved to - * the end of the queue once-cleaned, this gives - * way too large a weighting to deferring the freeing - * of dirty pages. - * - * We can't wait forever for the vnode lock, we might - * deadlock due to a vn_read() getting stuck in - * vm_wait while holding this vnode. We skip the - * vnode if we can't get it in a reasonable amount - * of time. - */ - if (object->type == OBJT_VNODE) { - vm_page_unlock(m); - vp = object->handle; - if (vp->v_type == VREG && - vn_start_write(vp, &mp, V_NOWAIT) != 0) { - mp = NULL; - ++pageout_lock_miss; - if (object->flags & OBJ_MIGHTBEDIRTY) - vnodes_skipped++; - goto unlock_and_continue; - } - KASSERT(mp != NULL, - ("vp %p with NULL v_mount", vp)); - vm_object_reference_locked(object); - pindex = m->pindex; - VM_OBJECT_WUNLOCK(object); - lockmode = MNT_SHARED_WRITES(vp->v_mount) ? - LK_SHARED : LK_EXCLUSIVE; - if (vget(vp, lockmode | LK_TIMELOCK, - curthread)) { - VM_OBJECT_WLOCK(object); - ++pageout_lock_miss; - if (object->flags & OBJ_MIGHTBEDIRTY) - vnodes_skipped++; - vp = NULL; - goto unlock_and_continue; - } - VM_OBJECT_WLOCK(object); - vm_page_lock(m); - /* - * While the object and page were unlocked, - * the page may have been - * (1) moved to a different queue, - * (2) reallocated to a different object, - * (3) reallocated to a different offset, or - * (4) cleaned. - */ - if (m->queue != PQ_INACTIVE || - m->object != object || - m->pindex != pindex || - m->dirty == 0) { - vm_page_unlock(m); - if (object->flags & OBJ_MIGHTBEDIRTY) - vnodes_skipped++; - goto unlock_and_continue; - } - - /* - * The page may have been busied during the - * blocking in vget(). We don't move the - * page back onto the end of the queue so that - * statistics are more correct if we don't. - */ - if (vm_page_busied(m)) { - vm_page_unlock(m); - addl_page_shortage++; - goto unlock_and_continue; - } - - /* - * If the page has become held it might - * be undergoing I/O, so skip it - */ - if (m->hold_count != 0) { - vm_page_unlock(m); - addl_page_shortage++; - if (object->flags & OBJ_MIGHTBEDIRTY) - vnodes_skipped++; - goto unlock_and_continue; - } - } - - /* - * If a page is dirty, then it is either being washed - * (but not yet cleaned) or it is still in the - * laundry. If it is still in the laundry, then we - * start the cleaning operation. - * - * decrement page_shortage on success to account for + * Decrement page_shortage on success to account for * the (future) cleaned page. Otherwise we could wind * up laundering or cleaning too many pages. */ - if (vm_pageout_clean(m) != 0) { - --page_shortage; - --maxlaunder; - } -unlock_and_continue: - vm_page_lock_assert(m, MA_NOTOWNED); - VM_OBJECT_WUNLOCK(object); - if (mp != NULL) { - if (vp != NULL) - vput(vp); - vm_object_deallocate(object); - vn_finished_write(mp); + if (error == 0) { + page_shortage--; + maxlaunder--; + } else if (error == EDEADLK) { + pageout_lock_miss++; + vnodes_skipped++; + } else if (error == EBUSY) { + addl_page_shortage++; } vm_page_lock_assert(m, MA_NOTOWNED); goto relock_queues; From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 04:27:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62B8F8BA for ; Tue, 7 Apr 2015 04:27:04 +0000 (UTC) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E26A09DE for ; Tue, 7 Apr 2015 04:27:03 +0000 (UTC) Received: by wgin8 with SMTP id n8so43556037wgi.0 for ; Mon, 06 Apr 2015 21:27:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=3rWSVlrh6VgRjZtWv2JPixyGRTL65mYECVqYIqezU+I=; b=mLnMHtIa2OKB9YqhYMEuqCBeYnFYS6z1D7H8MQSBtMTPObeN0nLJeSzhG4jaDKzOPV AMU1wV4aTGp0UaiBW3N3yFCW36bfoXym8hCh4a9FiLGdkl/bjvnrzkt7zxvZUlpWIZFJ FYHGENmlC8ykZbG++ub5OioE7mMsluk9lBQx8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=3rWSVlrh6VgRjZtWv2JPixyGRTL65mYECVqYIqezU+I=; b=Nfg6HTJ3qEfWlPVuFeEKRCnLKRZn//60B0+dH/u8KbDB6L1R+sINBd0A8iM6fKYOXU XRukTOXCaJUFwzGWYci9uODM46NqF1SpIC9OsGCqXaI4sLSijQq4W5dXeNoEYIfQIsVV jYbyY2k/YP+YsLjU+iAUuCQgPF5NhHV1Hg08/jNpViLfChCtVYEIoBYXHEuMdTu0Pzkx hMwDT7aL8uDVoGAUVIjlRHP3GssV7+fWpIc0FRJm7dBb6hYPI5kwEmwMKqUT3u25dbaf D9JmnDbqF7c8aVzEbTct99qOmkIbA3gtneo+U21d03B24/rCMaF02p5psLRswSord64K 8LOg== X-Gm-Message-State: ALoCoQlIGOgGECABsTZDE6RSPp4c8IH8nXuswan9RE58obprwFI3BFBb7YEWlaR3NY2IGTnlYryK X-Received: by 10.180.98.98 with SMTP id eh2mr876062wib.31.1428380822071; Mon, 06 Apr 2015 21:27:02 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.211.135 with HTTP; Mon, 6 Apr 2015 21:26:31 -0700 (PDT) In-Reply-To: <201504070117.t371HTlS083981@svn.freebsd.org> References: <201504070117.t371HTlS083981@svn.freebsd.org> From: Eitan Adler Date: Tue, 7 Apr 2015 00:26:31 -0400 X-Google-Sender-Auth: SYgcWaK25KIJ2RNCC429FbFTDAM Message-ID: Subject: Re: svn commit: r281181 - head/usr.bin/sort To: "Pedro F. Giffuni" Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 04:27:04 -0000 On 6 April 2015 at 21:17, Pedro F. Giffuni wrote: > Author: pfg > Date: Tue Apr 7 01:17:29 2015 > New Revision: 281181 > URL: https://svnweb.freebsd.org/changeset/base/281181 > > Log: > sort(1): Cleanups and a small memory leak. > > Remove useless check for leading blanks in the month name. The > code didn't adjust len after stripping blanks so even if a month > *did* start with a blank we'd end up copying garbage at the end. > Also convert a malloc + memcpy to strdup and fix a memory leak in > the wide char version if mbstowcs() fails. > Originally from Andre Smagin. > > Obtained from: OpenBSD (CVS rev. 1.2, 1.3) > MFC after: 1 week Thanks for porting all these cleanups! -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 05:37:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAB3E3ED; Tue, 7 Apr 2015 05:37:33 +0000 (UTC) Received: from mail.embedded-brains.de (host-82-135-62-35.customer.m-online.net [82.135.62.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5099A9E; Tue, 7 Apr 2015 05:37:32 +0000 (UTC) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 6C3EF2A1938; Tue, 7 Apr 2015 07:38:05 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id hT0MSmp04s-f; Tue, 7 Apr 2015 07:38:04 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id E02432A193A; Tue, 7 Apr 2015 07:38:04 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 5BdGGZcckl6Y; Tue, 7 Apr 2015 07:38:04 +0200 (CEST) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id B72502A1938; Tue, 7 Apr 2015 07:38:04 +0200 (CEST) Message-ID: <55236D13.8010309@embedded-brains.de> Date: Tue, 07 Apr 2015 07:37:23 +0200 From: Sebastian Huber User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Gleb Smirnoff , Ruslan Bukin Subject: Re: svn commit: r281019 - head/sys/dev/dwc References: <201504031137.t33BbOFY007346@svn.freebsd.org> <20150403121907.GU64665@FreeBSD.org> In-Reply-To: <20150403121907.GU64665@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 05:37:33 -0000 Hello Gleb, it is quite hard for me to work on this since I don't use FreeBSD=20 directly. I work with a port of the FreeBSD 9.3 network stack to RTEMS=20 real-time operating system: https://git.rtems.org/rtems-libbsd On 03/04/15 14:19, Gleb Smirnoff wrote: > Ruslan and Sebastian, > > On Fri, Apr 03, 2015 at 11:37:24AM +0000, Ruslan Bukin wrote: > R> Author: br > R> Date: Fri Apr 3 11:37:23 2015 > R> New Revision: 281019 > R> URL: https://svnweb.freebsd.org/changeset/base/281019 > R> > R> Log: > R> o Remove superfluous includes > R> o Avoid NULL pointer access > R> o Fix 'set but not used' warning > R> > R> Submitted by: Sebastian Huber > R> > R> Modified: > R> head/sys/dev/dwc/if_dwc.c > > Since you are hacking the interface driver, can you also pay attention > to this project? > > https://wiki.freebsd.org/projects/ifnet > > Any input is welcome. Help with converting if_dwc would be very much > appreciated. > --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=E4ftliche Mitteilung im Sinne des EHUG. From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 05:50:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A035E9CA; Tue, 7 Apr 2015 05:50:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A1671F0; Tue, 7 Apr 2015 05:50:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t375okO2014317; Tue, 7 Apr 2015 05:50:46 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t375oklh014315; Tue, 7 Apr 2015 05:50:46 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504070550.t375oklh014315@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 7 Apr 2015 05:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281188 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 05:50:47 -0000 Author: glebius Date: Tue Apr 7 05:50:45 2015 New Revision: 281188 URL: https://svnweb.freebsd.org/changeset/base/281188 Log: Like it was already done for 'netstat -i', drop the kvm(3) support in 'netstat -r'. The netstat/route.c was the last abuser of struct ifnet and struct rtentry in the tree. With this change if_var.h can become kernel only include, _WANT_RTENTRY can go away and projects/ifnet and projects/routing can go forward. Differential Revision: https://reviews.freebsd.org/D2242 Reviewed by: melifaro, gnn Sponsored by: Nginx, Inc. Sponsored by: Netflix Modified: head/usr.bin/netstat/netstat.1 head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/netstat.1 ============================================================================== --- head/usr.bin/netstat/netstat.1 Tue Apr 7 04:21:36 2015 (r281187) +++ head/usr.bin/netstat/netstat.1 Tue Apr 7 05:50:45 2015 (r281188) @@ -78,11 +78,9 @@ .Op Fl I Ar interface .It Nm Fl r .Op Fl -libxo -.Op Fl 46AnW +.Op Fl 46nW .Op Fl F Ar fibnum .Op Fl f Ar address_family -.Op Fl M Ar core -.Op Fl N Ar system .It Nm Fl rs .Op Fl -libxo .Op Fl s @@ -581,9 +579,6 @@ See Show IPv6 only. See .Sx GENERAL OPTIONS . -.It Fl A -Show the contents of the internal Patricia tree -structures; used for debugging. .It Fl n Do not resolve numeric addresses and port numbers to names. See Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Tue Apr 7 04:21:36 2015 (r281187) +++ head/usr.bin/netstat/route.c Tue Apr 7 05:50:45 2015 (r281188) @@ -40,22 +40,18 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include -#include #include #include -#include -#define _WANT_RTENTRY #include #include #include -#include - #include #include #include @@ -72,8 +68,6 @@ __FBSDID("$FreeBSD$"); #include #include "netstat.h" -#define kget(p, d) (kread((u_long)(p), (char *)&(d), sizeof (d))) - /* * Definitions for showing gateway flags. */ @@ -108,9 +102,7 @@ struct bits { static struct nlist rl[] = { #define N_RTSTAT 0 { .n_name = "_rtstat" }, -#define N_RTREE 1 - { .n_name = "_rt_tables"}, -#define N_RTTRASH 2 +#define N_RTTRASH 1 { .n_name = "_rttrash" }, { .n_name = NULL }, }; @@ -121,33 +113,14 @@ typedef union { u_short u_data[128]; } sa_u; -static sa_u pt_u; - struct ifmap_entry { char ifname[IFNAMSIZ]; }; - static struct ifmap_entry *ifmap; static int ifmap_size; - -int do_rtent = 0; -struct rtentry rtentry; -struct radix_node rnode; -struct radix_mask rmask; - -int NewTree = 1; - struct timespec uptime; -static struct sockaddr *kgetsa(struct sockaddr *); -static void size_cols(int ef, struct radix_node *rn); -static void size_cols_tree(struct radix_node *rn); -static void size_cols_rtentry(struct rtentry *rt); -static void p_rtnode_kvm(void); static void p_rtable_sysctl(int, int); -static void p_rtable_kvm(int, int ); -static void p_rtree_kvm(const char *name, struct radix_node *); -static void p_rtentry_kvm(const char *name, struct rtentry *); static void p_rtentry_sysctl(const char *name, struct rt_msghdr *); static void p_sockaddr(const char *name, struct sockaddr *, struct sockaddr *, int, int); @@ -166,6 +139,9 @@ routepr(int fibnum, int af) size_t intsize; int numfibs; + if (live == 0) + return; + intsize = sizeof(int); if (fibnum == -1 && sysctlbyname("net.my_fibnum", &fibnum, &intsize, NULL, 0) == -1) @@ -187,11 +163,7 @@ routepr(int fibnum, int af) if (fibnum) xo_emit(" ({L:fib}: {:fib/%d})", fibnum); xo_emit("\n"); - - if (Aflag == 0 && live != 0 && NewTree) - p_rtable_sysctl(fibnum, af); - else - p_rtable_kvm(fibnum, af); + p_rtable_sysctl(fibnum, af); xo_close_container("route-information"); } @@ -253,100 +225,6 @@ static int wid_mtu; static int wid_if; static int wid_expire; -static void -size_cols(int ef, struct radix_node *rn) -{ - wid_dst = WID_DST_DEFAULT(ef); - wid_gw = WID_GW_DEFAULT(ef); - wid_flags = 6; - wid_pksent = 8; - wid_mtu = 6; - wid_if = WID_IF_DEFAULT(ef); - wid_expire = 6; - - if (Wflag && rn != NULL) - size_cols_tree(rn); -} - -static void -size_cols_tree(struct radix_node *rn) -{ -again: - if (kget(rn, rnode) != 0) - return; - if (!(rnode.rn_flags & RNF_ACTIVE)) - return; - if (rnode.rn_bit < 0) { - if ((rnode.rn_flags & RNF_ROOT) == 0) { - if (kget(rn, rtentry) != 0) - return; - size_cols_rtentry(&rtentry); - } - if ((rn = rnode.rn_dupedkey)) - goto again; - } else { - rn = rnode.rn_right; - size_cols_tree(rnode.rn_left); - size_cols_tree(rn); - } -} - -static void -size_cols_rtentry(struct rtentry *rt) -{ - static struct ifnet ifnet, *lastif; - static char buffer[100]; - const char *bp; - struct sockaddr *sa; - sa_u addr, mask; - int len; - - bzero(&addr, sizeof(addr)); - if ((sa = kgetsa(rt_key(rt)))) - bcopy(sa, &addr, sa->sa_len); - bzero(&mask, sizeof(mask)); - if (rt_mask(rt) && (sa = kgetsa(rt_mask(rt)))) - bcopy(sa, &mask, sa->sa_len); - bp = fmt_sockaddr(&addr.u_sa, &mask.u_sa, rt->rt_flags); - len = strlen(bp); - wid_dst = MAX(len, wid_dst); - - bp = fmt_sockaddr(kgetsa(rt->rt_gateway), NULL, RTF_HOST); - len = strlen(bp); - wid_gw = MAX(len, wid_gw); - - bp = fmt_flags(rt->rt_flags); - len = strlen(bp); - wid_flags = MAX(len, wid_flags); - - if (Wflag) { - len = snprintf(buffer, sizeof(buffer), "%ju", - (uintmax_t )kread_counter((u_long )rt->rt_pksent)); - wid_pksent = MAX(len, wid_pksent); - } - if (rt->rt_ifp) { - if (rt->rt_ifp != lastif) { - if (kget(rt->rt_ifp, ifnet) == 0) - len = strlen(ifnet.if_xname); - else - len = strlen("---"); - lastif = rt->rt_ifp; - wid_if = MAX(len, wid_if); - } - if (rt->rt_expire) { - time_t expire_time; - - if ((expire_time = - rt->rt_expire - uptime.tv_sec) > 0) { - len = snprintf(buffer, sizeof(buffer), "%d", - (int)expire_time); - wid_expire = MAX(len, wid_expire); - } - } - } -} - - /* * Print header for routing table columns. */ @@ -377,210 +255,6 @@ pr_rthdr(int af1) } } -static struct sockaddr * -kgetsa(struct sockaddr *dst) -{ - - if (kget(dst, pt_u.u_sa) != 0) - return (NULL); - if (pt_u.u_sa.sa_len > sizeof (pt_u.u_sa)) - kread((u_long)dst, (char *)pt_u.u_data, pt_u.u_sa.sa_len); - return (&pt_u.u_sa); -} - -/* - * Print kernel routing tables for given fib - * using debugging kvm(3) interface. - */ -static void -p_rtable_kvm(int fibnum, int af) -{ - struct radix_node_head **rnhp, *rnh, head; - struct radix_node_head **rt_tables; - u_long rtree; - int fam, af_size; - bool did_rt_family = false; - - kresolve_list(rl); - if ((rtree = rl[N_RTREE].n_value) == 0) { - xo_emit("rt_tables: symbol not in namelist\n"); - return; - } - - af_size = (AF_MAX + 1) * sizeof(struct radix_node_head *); - rt_tables = calloc(1, af_size); - if (rt_tables == NULL) - err(EX_OSERR, "memory allocation failed"); - - if (kread((u_long)(rtree), (char *)(rt_tables) + fibnum * af_size, - af_size) != 0) - err(EX_OSERR, "error retrieving radix pointers"); - xo_open_container("route-table"); - for (fam = 0; fam <= AF_MAX; fam++) { - int tmpfib; - - switch (fam) { - case AF_INET6: - case AF_INET: - tmpfib = fibnum; - break; - default: - tmpfib = 0; - } - rnhp = (struct radix_node_head **)*rt_tables; - /* Calculate the in-kernel address. */ - rnhp += tmpfib * (AF_MAX + 1) + fam; - /* Read the in kernel rhn pointer. */ - if (kget(rnhp, rnh) != 0) - continue; - if (rnh == NULL) - continue; - /* Read the rnh data. */ - if (kget(rnh, head) != 0) - continue; - if (fam == AF_UNSPEC) { - if (Aflag && af == 0) { - xo_emit("{T:Netmasks}:\n"); - xo_open_list("netmasks"); - p_rtree_kvm("netmasks", head.rnh_treetop); - xo_close_list("netmasks"); - } - } else if (af == AF_UNSPEC || af == fam) { - if (!did_rt_family) { - xo_open_list("rt-family"); - did_rt_family = true; - } - size_cols(fam, head.rnh_treetop); - xo_open_instance("rt-family"); - pr_family(fam); - do_rtent = 1; - xo_open_list("rt-entry"); - pr_rthdr(fam); - p_rtree_kvm("rt-entry", head.rnh_treetop); - xo_close_list("rt-entry"); - xo_close_instance("rt-family"); - } - } - if (did_rt_family) - xo_close_list("rt-family"); - xo_close_container("route-table"); - - free(rt_tables); -} - -/* - * Print given kernel radix tree using - * debugging kvm(3) interface. - */ -static void -p_rtree_kvm(const char *name, struct radix_node *rn) -{ - bool opened; - - opened = false; - -#define DOOPEN() do { \ - if (!opened) { xo_open_instance(name); opened = true; } \ - } while (0) -#define DOCLOSE() do { \ - if (opened) { opened = false; xo_close_instance(name); } \ - } while(0) - -again: - if (kget(rn, rnode) != 0) - return; - if (!(rnode.rn_flags & RNF_ACTIVE)) - return; - if (rnode.rn_bit < 0) { - if (Aflag) { - DOOPEN(); - xo_emit("{q:radix-node/%-8.8lx} ", (u_long)rn); - } - if (rnode.rn_flags & RNF_ROOT) { - if (Aflag) { - DOOPEN(); - xo_emit("({:root/root} node){L:/%s}", - rnode.rn_dupedkey ? " =>\n" : "\n"); - } - } else if (do_rtent) { - if (kget(rn, rtentry) == 0) { - DOOPEN(); - p_rtentry_kvm(name, &rtentry); - if (Aflag) { - DOOPEN(); - p_rtnode_kvm(); - DOCLOSE(); - } - } - } else { - DOOPEN(); - p_sockaddr("address", - kgetsa((struct sockaddr *)rnode.rn_key), - NULL, 0, 44); - xo_emit("\n"); - } - DOCLOSE(); - if ((rn = rnode.rn_dupedkey)) - goto again; - } else { - if (Aflag && do_rtent) { - DOOPEN(); - xo_emit("{q:radix-node/%-8.8lx} ", (u_long)rn); - p_rtnode_kvm(); - DOCLOSE(); - } - rn = rnode.rn_right; - p_rtree_kvm(name, rnode.rn_left); - p_rtree_kvm(name, rn); - } -} - -char nbuf[20]; - -static void -p_rtnode_kvm(void) -{ - struct radix_mask *rm = rnode.rn_mklist; - - if (rnode.rn_bit < 0) { - if (rnode.rn_mask) { - xo_emit("\t {L:mask} "); - p_sockaddr("netmask", - kgetsa((struct sockaddr *)rnode.rn_mask), - NULL, 0, -1); - } else if (rm == 0) - return; - } else { - xo_emit("{[:6}{:bit/(%d)}{]:} {q:left-node/%8.8lx} " - ": {q:right-node/%8.8lx}", rnode.rn_bit, - (u_long)rnode.rn_left, (u_long)rnode.rn_right); - } - while (rm) { - if (kget(rm, rmask) != 0) - break; - sprintf(nbuf, " %d refs, ", rmask.rm_refs); - xo_emit(" mk = {q:node/%8.8lx} \\{({:bit/%d}),{nbufs/%s}", - (u_long)rm, -1 - rmask.rm_bit, rmask.rm_refs ? nbuf : " "); - if (rmask.rm_flags & RNF_NORMAL) { - struct radix_node rnode_aux; - xo_emit(" <{:mode/normal}>, "); - if (kget(rmask.rm_leaf, rnode_aux) == 0) - p_sockaddr("netmask", - kgetsa(/*XXX*/(void *)rnode_aux.rn_mask), - NULL, 0, -1); - else - p_sockaddr(NULL, NULL, NULL, 0, -1); - } else - p_sockaddr("netmask", - kgetsa((struct sockaddr *)rmask.rm_mask), - NULL, 0, -1); - xo_emit("\\}"); - if ((rm = rmask.rm_mklist)) - xo_emit(" {D:->}"); - } - xo_emit("\n"); -} - static void p_rtable_sysctl(int fibnum, int af) { @@ -664,7 +338,13 @@ p_rtable_sysctl(int fibnum, int af) need_table_close = true; fam = sa->sa_family; - size_cols(fam, NULL); + wid_dst = WID_DST_DEFAULT(fam); + wid_gw = WID_GW_DEFAULT(fam); + wid_flags = 6; + wid_pksent = 8; + wid_mtu = 6; + wid_if = WID_IF_DEFAULT(fam); + wid_expire = 6; xo_open_instance("rt-family"); pr_family(fam); xo_open_list("rt-entry"); @@ -905,61 +585,6 @@ fmt_flags(int f) return (name); } -static void -p_rtentry_kvm(const char *name, struct rtentry *rt) -{ - static struct ifnet ifnet, *lastif; - static char buffer[128]; - static char prettyname[128]; - struct sockaddr *sa; - sa_u addr, mask; - - bzero(&addr, sizeof(addr)); - if ((sa = kgetsa(rt_key(rt)))) - bcopy(sa, &addr, sa->sa_len); - bzero(&mask, sizeof(mask)); - if (rt_mask(rt) && (sa = kgetsa(rt_mask(rt)))) - bcopy(sa, &mask, sa->sa_len); - - p_sockaddr("destination", &addr.u_sa, &mask.u_sa, rt->rt_flags, - wid_dst); - p_sockaddr("gateway", kgetsa(rt->rt_gateway), NULL, RTF_HOST, wid_gw); - snprintf(buffer, sizeof(buffer), "{[:-%d}{:flags/%%s}{]:}", - wid_flags); - p_flags(rt->rt_flags, buffer); - if (Wflag) { - xo_emit("{[:%d}{t:use/%ju}{]:} ", -wid_pksent, - (uintmax_t )kread_counter((u_long )rt->rt_pksent)); - - if (rt->rt_mtu != 0) - xo_emit("{t:mtu/%*lu} ", wid_mtu, rt->rt_mtu); - else - xo_emit("{P:/%*s} ", wid_mtu, ""); - } - if (rt->rt_ifp) { - if (rt->rt_ifp != lastif) { - if (kget(rt->rt_ifp, ifnet) == 0) - strlcpy(prettyname, ifnet.if_xname, - sizeof(prettyname)); - else - strlcpy(prettyname, "---", sizeof(prettyname)); - lastif = rt->rt_ifp; - } - xo_emit("{t:interface-name/%*.*s}", wid_if, wid_if, prettyname); - if (rt->rt_expire) { - time_t expire_time; - - if ((expire_time = - rt->rt_expire - uptime.tv_sec) > 0) - xo_emit(" {:expire-time/%*d}", - wid_expire, (int)expire_time); - } - if (rt->rt_nodes[0].rn_dupedkey) - xo_emit(" =>"); - } - xo_emit("\n"); -} - char * routename(in_addr_t in) { From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 06:22:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 407EA358; Tue, 7 Apr 2015 06:22:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10F5C7D4; Tue, 7 Apr 2015 06:22:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t376MMSv029199; Tue, 7 Apr 2015 06:22:22 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t376MMBJ029198; Tue, 7 Apr 2015 06:22:22 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504070622.t376MMBJ029198@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 7 Apr 2015 06:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281192 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 06:22:23 -0000 Author: glebius Date: Tue Apr 7 06:22:22 2015 New Revision: 281192 URL: https://svnweb.freebsd.org/changeset/base/281192 Log: In ipfilter(4) there is the ipftest(1) program, that compiles half of the ipfilter code as userland application. To reduce kernel structure knowledge include if_var.h only if a file is compiled with _KERNEL defined. In !_KERNEL case, provide our own definition of struct ifnet, that will satisfy ipftest(1). This was already done earlier to struct ifaddr in r279029. Protect the definition with _NET_IF_VAR_H_, since kernel part of ipfilter may include if_var.h and ip_compat.h. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Tue Apr 7 06:17:34 2015 (r281191) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Tue Apr 7 06:22:22 2015 (r281192) @@ -153,7 +153,8 @@ struct ether_addr { # include # define KMUTEX_T struct mtx # define KRWLOCK_T struct rwlock -# ifdef _KERNEL + +#ifdef _KERNEL # define READ_ENTER(x) rw_rlock(&(x)->ipf_lk) # define WRITE_ENTER(x) rw_wlock(&(x)->ipf_lk) # define MUTEX_DOWNGRADE(x) rw_downgrade(&(x)->ipf_lk) @@ -165,16 +166,7 @@ struct ether_addr { else \ rw_runlock(&(x)->ipf_lk); \ } while (0) -# endif - # include -# define IFNAME(x) ((struct ifnet *)x)->if_xname -# define COPYIFNAME(v, x, b) \ - (void) strncpy(b, \ - ((struct ifnet *)x)->if_xname, \ - LIFNAMSIZ) - -# ifdef _KERNEL # define GETKTIME(x) microtime((struct timeval *)x) # include @@ -216,8 +208,28 @@ struct ether_addr { # define M_DUP(m) m_dup(m, M_NOWAIT) # define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } typedef struct mbuf mb_t; -# endif /* _KERNEL */ +#else /* !_KERNEL */ +#ifndef _NET_IF_VAR_H_ +/* + * Userland emulation of struct ifnet. + */ +struct route; +struct mbuf; +struct ifnet { + char if_xname[IFNAMSIZ]; + TAILQ_HEAD(, ifaddr) if_addrlist; + int (*if_output)(struct ifnet *, struct mbuf *, + const struct sockaddr *, struct route *); +}; +#endif /* _NET_IF_VAR_H_ */ +#endif /* _KERNEL */ + +# define IFNAME(x) ((struct ifnet *)x)->if_xname +# define COPYIFNAME(v, x, b) \ + (void) strncpy(b, \ + ((struct ifnet *)x)->if_xname, \ + LIFNAMSIZ) typedef u_long ioctlcmd_t; typedef struct uio uio_t; From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 06:33:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D590873C; Tue, 7 Apr 2015 06:33:21 +0000 (UTC) Received: from testsoekris.hotsoft.nl (unknown [IPv6:2001:888:1227:0:200:24ff:fec9:5934]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88E4E8C4; Tue, 7 Apr 2015 06:33:21 +0000 (UTC) Received: from beastie.hotsoft.nl (beastie.hotsoft.nl [IPv6:2001:888:1227:0:219:d1ff:fee8:91eb]) by testsoekris.hotsoft.nl (8.14.7/8.14.7) with ESMTP id t376XHFE047586; Tue, 7 Apr 2015 08:33:17 +0200 (CEST) (envelope-from hans@beastielabs.net) Message-ID: <55237A2D.2000602@beastielabs.net> Date: Tue, 07 Apr 2015 08:33:17 +0200 From: Hans Ottevanger User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Kristof Provost , svn-src-head@freebsd.org Subject: Re: svn commit: r281164 - head/sys/netpfil/pf References: <201504061905.t36J51EX005483@svn.freebsd.org> In-Reply-To: <201504061905.t36J51EX005483@svn.freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 06:33:22 -0000 On 04/06/15 21:05, Kristof Provost wrote: > Author: kp > Date: Mon Apr 6 19:05:00 2015 > New Revision: 281164 > URL: https://svnweb.freebsd.org/changeset/base/281164 > > Log: > pf: Skip firewall for refragmented ip6 packets > > In cases where we scrub (fragment reassemble) on both input and output > we risk ending up in infinite loops when forwarding packets. > > Fragmented packets come in and get collected until we can defragment. At > that point the defragmented packet is handed back to the ip stack (at > the pfil point in ip6_input(). Normal processing continues. > > Eventually we figure out that the packet has to be forwarded and we end > up at the pfil hook in ip6_forward(). After doing the inspection on the > defragmented packet we see that the packet has been defragmented and > because we're forwarding we have to refragment it. > > In pf_refragment6() we split the packet up again and then ip6_forward() > the individual fragments. Those fragments hit the pfil hook on the way > out, so they're collected until we can reconstruct the full packet, at > which point we're right back where we left off and things continue until > we run out of stack. > > Break that loop by marking the fragments generated by pf_refragment6() > as M_SKIP_FIREWALL. There's no point in processing those packets in the > firewall anyway. We've already filtered on the full packet. > > Differential Revision: https://reviews.freebsd.org/D2197 > Reviewed by: glebius, gnn > Approved by: gnn (mentor) > > Modified: > head/sys/netpfil/pf/pf_norm.c > > Modified: head/sys/netpfil/pf/pf_norm.c > ============================================================================== > --- head/sys/netpfil/pf/pf_norm.c Mon Apr 6 18:56:02 2015 (r281163) > +++ head/sys/netpfil/pf/pf_norm.c Mon Apr 6 19:05:00 2015 (r281164) > @@ -1152,6 +1152,7 @@ pf_refragment6(struct ifnet *ifp, struct > for (t = m; m; m = t) { > t = m->m_nextpkt; > m->m_nextpkt = NULL; > + m->m_flags |= M_SKIP_FIREWALL; > memset(&pd, 0, sizeof(pd)); > pd.pf_mtag = pf_find_mtag(m); > if (error == 0) > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > Hi, Is there any chance that this commit and your previous pf and inet6 related changes will get MFC'd to 10.1-STABLE. Is it safe or even possible to incorporate these changes myself? Kind regards, Hans From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 08:12:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73CAD176; Tue, 7 Apr 2015 08:12:11 +0000 (UTC) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3166C672; Tue, 7 Apr 2015 08:12:10 +0000 (UTC) Received: from vega.codepro.be (unknown [172.16.1.3]) by venus.codepro.be (Postfix) with ESMTP id D2CEB1649A; Tue, 7 Apr 2015 10:12:07 +0200 (CEST) Received: by vega.codepro.be (Postfix, from userid 1001) id CD25ABD9E; Tue, 7 Apr 2015 10:12:07 +0200 (CEST) Date: Tue, 7 Apr 2015 10:12:07 +0200 From: Kristof Provost To: Hans Ottevanger Subject: Re: svn commit: r281164 - head/sys/netpfil/pf Message-ID: <20150407081207.GP73237@vega.codepro.be> References: <201504061905.t36J51EX005483@svn.freebsd.org> <55237A2D.2000602@beastielabs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <55237A2D.2000602@beastielabs.net> X-Checked-By-NSA: Probably User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 08:12:11 -0000 On 2015-04-07 08:33:17 (+0200), Hans Ottevanger wrote: > On 04/06/15 21:05, Kristof Provost wrote: > > Author: kp > > Date: Mon Apr 6 19:05:00 2015 > > New Revision: 281164 > > URL: https://svnweb.freebsd.org/changeset/base/281164 > > > > Log: > > pf: Skip firewall for refragmented ip6 packets > > Is there any chance that this commit and your previous pf and inet6 > related changes will get MFC'd to 10.1-STABLE. Is it safe or even > possible to incorporate these changes myself? > I have no immediate plans to MFC this. There's still a bit of work to be done and a little more testing as well before I'd be comfortable merging this back. For example, I still need to commit https://reviews.freebsd.org/D1815 (although that'll happen soon). I also think there's at least one other bug, but I'll need some more time to investigate that. That said, it is fairly straightforwards to merge these patches back to 10.1. I'm running two stable/10 systems with these patches and I've not seen any issues yet. Regards, Kristof From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 09:00:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AA42DB2; Tue, 7 Apr 2015 09:00:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76B21BFC; Tue, 7 Apr 2015 09:00:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t379047R099319; Tue, 7 Apr 2015 09:00:04 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37904bS099318; Tue, 7 Apr 2015 09:00:04 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201504070900.t37904bS099318@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Tue, 7 Apr 2015 09:00:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281196 - head/sys/opencrypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 09:00:04 -0000 Author: jmg Date: Tue Apr 7 09:00:03 2015 New Revision: 281196 URL: https://svnweb.freebsd.org/changeset/base/281196 Log: add the define to properly guard this header.. Sponsored by: Netflix, Inc. Modified: head/sys/opencrypto/gmac.h Modified: head/sys/opencrypto/gmac.h ============================================================================== --- head/sys/opencrypto/gmac.h Tue Apr 7 07:10:44 2015 (r281195) +++ head/sys/opencrypto/gmac.h Tue Apr 7 09:00:03 2015 (r281196) @@ -31,6 +31,7 @@ */ #ifndef _GMAC_H_ +#define _GMAC_H_ #include "gfmult.h" #include From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 09:52:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D92DD13; Tue, 7 Apr 2015 09:52:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 060F73DA; Tue, 7 Apr 2015 09:52:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t379qMcW026969; Tue, 7 Apr 2015 09:52:22 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t379qFVU026940; Tue, 7 Apr 2015 09:52:15 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504070952.t379qFVU026940@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 7 Apr 2015 09:52:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281197 - in head: lib/libc lib/libc/aarch64 lib/libc/aarch64/gen lib/libc/aarch64/sys lib/libc/gen lib/libc/xdr lib/libstand share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 09:52:23 -0000 Author: andrew Date: Tue Apr 7 09:52:14 2015 New Revision: 281197 URL: https://svnweb.freebsd.org/changeset/base/281197 Log: Add the start of libc and libstand for arm64. Not all of the machine dependent functions have been implemented, but this is enough for world. Differential Revision: https://reviews.freebsd.org/D2132 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Added: head/lib/libc/aarch64/SYS.h (contents, props changed) head/lib/libc/aarch64/Symbol.map (contents, props changed) head/lib/libc/aarch64/_fpmath.h (contents, props changed) head/lib/libc/aarch64/arith.h (contents, props changed) head/lib/libc/aarch64/gd_qnan.h (contents, props changed) head/lib/libc/aarch64/gen/ head/lib/libc/aarch64/gen/Makefile.inc (contents, props changed) head/lib/libc/aarch64/gen/_set_tp.c (contents, props changed) head/lib/libc/aarch64/gen/_setjmp.S (contents, props changed) head/lib/libc/aarch64/gen/flt_rounds.c (contents, props changed) head/lib/libc/aarch64/gen/setjmp.S (contents, props changed) head/lib/libc/aarch64/gen/sigsetjmp.S (contents, props changed) head/lib/libc/aarch64/sys/ head/lib/libc/aarch64/sys/Makefile.inc (contents, props changed) head/lib/libc/aarch64/sys/brk.S (contents, props changed) head/lib/libc/aarch64/sys/cerror.S (contents, props changed) head/lib/libc/aarch64/sys/pipe.S (contents, props changed) head/lib/libc/aarch64/sys/sbrk.S (contents, props changed) head/lib/libc/aarch64/sys/shmat.S (contents, props changed) head/lib/libc/aarch64/sys/sigreturn.S (contents, props changed) head/lib/libc/aarch64/sys/syscall.S (contents, props changed) head/lib/libc/aarch64/sys/vfork.S (contents, props changed) Modified: head/lib/libc/Makefile head/lib/libc/aarch64/Makefile.inc head/lib/libc/gen/tls.c head/lib/libc/xdr/xdr_float.c head/lib/libstand/Makefile head/share/mk/src.opts.mk Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Tue Apr 7 09:00:03 2015 (r281196) +++ head/lib/libc/Makefile Tue Apr 7 09:52:14 2015 (r281197) @@ -79,7 +79,8 @@ NOASM= .include "${LIBC_SRCTOP}/net/Makefile.inc" .include "${LIBC_SRCTOP}/nls/Makefile.inc" .include "${LIBC_SRCTOP}/posix1e/Makefile.inc" -.if ${LIBC_ARCH} != "amd64" && \ +.if ${LIBC_ARCH} != "aarch64" && \ + ${LIBC_ARCH} != "amd64" && \ ${LIBC_ARCH} != "powerpc64" && \ ${LIBC_ARCH} != "sparc64" && \ ${MACHINE_ARCH:Mmipsn32*} == "" && \ Modified: head/lib/libc/aarch64/Makefile.inc ============================================================================== --- head/lib/libc/aarch64/Makefile.inc Tue Apr 7 09:00:03 2015 (r281196) +++ head/lib/libc/aarch64/Makefile.inc Tue Apr 7 09:52:14 2015 (r281197) @@ -3,3 +3,7 @@ # Machine dependent definitions for the arm 64-bit architecture. # +# Long double is quad precision +GDTOASRCS+=strtorQ.c +MDSRCS+=machdep_ldisQ.c +SYM_MAPS+=${LIBC_SRCTOP}/aarch64/Symbol.map Added: head/lib/libc/aarch64/SYS.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/SYS.h Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2014 Andrew Turner + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include + +#define _SYSCALL(name) \ + mov x8, SYS_ ## name; \ + svc 0 + +#define SYSCALL(name) \ +ENTRY(__sys_##name); \ + WEAK_REFERENCE(__sys_##name, name); \ + WEAK_REFERENCE(__sys_##name, _##name); \ + _SYSCALL(name); \ + ret; \ +END(__sys_##name) + +#define PSEUDO(name) \ +ENTRY(__sys_##name); \ + WEAK_REFERENCE(__sys_##name, _##name); \ + _SYSCALL(name); \ + b.cs cerror; \ + ret; \ +END(__sys_##name) + +#define RSYSCALL(name) \ +ENTRY(__sys_##name); \ + WEAK_REFERENCE(__sys_##name, name); \ + WEAK_REFERENCE(__sys_##name, _##name); \ + _SYSCALL(name); \ + b.cs cerror; \ + ret; \ +END(__sys_##name) Added: head/lib/libc/aarch64/Symbol.map ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/Symbol.map Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,29 @@ +/* + * $FreeBSD$ + */ + +/* + * This only needs to contain symbols that are not listed in + * symbol maps from other parts of libc (i.e., not found in + * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...). + */ +FBSD_1.0 { + /* PSEUDO syscalls */ + _exit; + + _setjmp; + _longjmp; + setjmp; + longjmp; + sigsetjmp; + siglongjmp; + vfork; + brk; + sbrk; +}; + +FBSDprivate_1.0 { + _set_tp; + curbrk; + minbrk; +}; Added: head/lib/libc/aarch64/_fpmath.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/_fpmath.h Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2002, 2003 David Schultz + * Copyright (2) 2014 The FreeBSD Foundation + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +union IEEEl2bits { + long double e; + struct { + unsigned long manl :64; + unsigned long manh :48; + unsigned int exp :15; + unsigned int sign :1; + } bits; + /* TODO andrew: Check the packing here */ + struct { + unsigned long manl :64; + unsigned long manh :48; + unsigned int expsign :16; + } xbits; +}; + +#define LDBL_NBIT 0 +#define LDBL_IMPLICIT_NBIT +#define mask_nbit_l(u) ((void)0) + +#define LDBL_MANH_SIZE 48 +#define LDBL_MANL_SIZE 64 + +#define LDBL_TO_ARRAY32(u, a) do { \ + (a)[0] = (uint32_t)(u).bits.manl; \ + (a)[1] = (uint32_t)((u).bits.manl >> 32); \ + (a)[2] = (uint32_t)(u).bits.manh; \ + (a)[3] = (uint32_t)((u).bits.manh >> 32); \ +} while(0) Added: head/lib/libc/aarch64/arith.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/arith.h Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,19 @@ +/* + * MD header for contrib/gdtoa + * + * $FreeBSD$ + */ + +/* + * NOTE: The definitions in this file must be correct or strtod(3) and + * floating point formats in printf(3) will break! The file can be + * generated by running contrib/gdtoa/arithchk.c on the target + * architecture. See contrib/gdtoa/gdtoaimp.h for details. + */ + +#define IEEE_8087 +#define Arith_Kind_ASL 1 +#define Long int +#define Intcast (int)(long) +#define Double_Align +#define X64_bit_pointers Added: head/lib/libc/aarch64/gd_qnan.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/gd_qnan.h Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,21 @@ +/* + * MD header for contrib/gdtoa + * + * This file can be generated by compiling and running contrib/gdtoa/qnan.c + * on the target architecture after arith.h has been generated. + * + * $FreeBSD$ + */ + +#define f_QNAN 0x7fc00000 +#define d_QNAN0 0x0 +#define d_QNAN1 0x7ff80000 +#define ld_QNAN0 0x0 +#define ld_QNAN1 0x0 +#define ld_QNAN2 0x0 +#define ld_QNAN3 0x7fff8000 +#define ldus_QNAN0 0x0 +#define ldus_QNAN1 0x0 +#define ldus_QNAN2 0x0 +#define ldus_QNAN3 0x0 +#define ldus_QNAN4 0x0 Added: head/lib/libc/aarch64/gen/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/gen/Makefile.inc Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +SRCS+= flt_rounds.c \ + ldexp.c \ + _setjmp.S \ + _set_tp.c \ + setjmp.S \ + sigsetjmp.S \ + trivial-getcontextx.c Added: head/lib/libc/aarch64/gen/_set_tp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/gen/_set_tp.c Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2014 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include + +#include + +void +_set_tp(void *tp) +{ + + asm volatile("msr tpidr_el0, %0" : : "r"(tp)); +} Added: head/lib/libc/aarch64/gen/_setjmp.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/gen/_setjmp.S Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2014 Andrew Turner + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by Andrew Turner + * under sponsorship from the FreeBSD Foundation + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +ENTRY(_setjmp) + /* Store the magic value and stack pointer */ + ldr x8, .Lmagic + mov x9, sp + stp x8, x9, [x0], #16 + + /* Store the general purpose registers and lr */ + stp x19, x20, [x0], #16 + stp x21, x22, [x0], #16 + stp x23, x24, [x0], #16 + stp x25, x26, [x0], #16 + stp x27, x28, [x0], #16 + stp x29, lr, [x0], #16 + +#ifndef _STANDALONE + /* Store the vfp registers */ + stp d8, d9, [x0], #16 + stp d10, d11, [x0], #16 + stp d12, d13, [x0], #16 + stp d14, d15, [x0] +#endif + + /* Return value */ + mov x0, #0 + ret +.Lmagic: + .align 3 + .quad _JB_MAGIC__SETJMP +END(_setjmp) + +ENTRY(_longjmp) + /* Check the magic value */ + ldr x8, [x0], #8 + ldr x9, .Lmagic + cmp x8, x9 + b.ne botch + + /* Restore the stack pointer */ + ldr x8, [x0], #8 + mov sp, x8 + + /* Restore the general purpose registers and lr */ + ldp x19, x20, [x0], #16 + ldp x21, x22, [x0], #16 + ldp x23, x24, [x0], #16 + ldp x25, x26, [x0], #16 + ldp x27, x28, [x0], #16 + ldp x29, lr, [x0], #16 + +#ifndef _STANDALONE + /* Restore the vfp registers */ + ldp d8, d9, [x0], #16 + ldp d10, d11, [x0], #16 + ldp d12, d13, [x0], #16 + ldp d14, d15, [x0] +#endif + + /* Load the return value */ + mov x0, x1 + ret + +botch: +#ifdef _STANDALONE + b botch +#else + bl _C_LABEL(longjmperror) + bl _C_LABEL(abort) +#endif +END(_longjmp) Added: head/lib/libc/aarch64/gen/flt_rounds.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/gen/flt_rounds.c Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,49 @@ +/*- + * Copyright (c) 2012 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include + +static int map[] = { + 1, /* round to nearest */ + 2, /* round to positive infinity */ + 3, /* round to negative infinity */ + 0 /* round to zero */ +}; + +int +__flt_rounds(void) +{ + uint64_t fpcr; + + asm volatile("mrs %0, fpcr" : "=r" (fpcr)); + return map[(fpcr >> 22) & 3]; +} Added: head/lib/libc/aarch64/gen/setjmp.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/gen/setjmp.S Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,123 @@ +/*- + * Copyright (c) 2014 Andrew Turner + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by Andrew Turner + * under sponsorship from the FreeBSD Foundation + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +ENTRY(setjmp) + sub sp, sp, #16 + stp x0, lr, [sp] + + /* Store the signal mask */ + add x2, x0, #(_JB_SIGMASK * 8) /* oset */ + mov x1, #0 /* set */ + mov x0, #1 /* SIG_BLOCK */ + bl sigprocmask + + ldp x0, lr, [sp] + add sp, sp, #16 + + /* Store the magic value and stack pointer */ + ldr x8, .Lmagic + mov x9, sp + stp x8, x9, [x0], #16 + + /* Store the general purpose registers and lr */ + stp x19, x20, [x0], #16 + stp x21, x22, [x0], #16 + stp x23, x24, [x0], #16 + stp x25, x26, [x0], #16 + stp x27, x28, [x0], #16 + stp x29, lr, [x0], #16 + + /* Store the vfp registers */ + stp d8, d9, [x0], #16 + stp d10, d11, [x0], #16 + stp d12, d13, [x0], #16 + stp d14, d15, [x0] + + /* Return value */ + mov x0, #0 + ret +.Lmagic: + .align 3 + .quad _JB_MAGIC_SETJMP +END(setjmp) + +ENTRY(longjmp) + sub sp, sp, #32 + stp x0, lr, [sp] + str x1, [sp, #16] + + /* Restore the signal mask */ + mov x1, #0 /* oset */ + add x1, x0, #(_JB_SIGMASK * 8) /* set */ + mov x0, #3 /* SIG_BLOCK */ + bl sigprocmask + + ldr x1, [sp, #16] + ldp x0, lr, [sp] + add sp, sp, #32 + + /* Check the magic value */ + ldr x8, [x0], #8 + ldr x9, .Lmagic + cmp x8, x9 + b.ne botch + + /* Restore the stack pointer */ + ldr x8, [x0], #8 + mov sp, x8 + + /* Restore the general purpose registers and lr */ + ldp x19, x20, [x0], #16 + ldp x21, x22, [x0], #16 + ldp x23, x24, [x0], #16 + ldp x25, x26, [x0], #16 + ldp x27, x28, [x0], #16 + ldp x29, lr, [x0], #16 + + /* Restore the vfp registers */ + ldp d8, d9, [x0], #16 + ldp d10, d11, [x0], #16 + ldp d12, d13, [x0], #16 + ldp d14, d15, [x0] + + /* Load the return value */ + mov x0, x1 + ret + +botch: + bl _C_LABEL(longjmperror) + bl _C_LABEL(abort) +END(longjmp) Added: head/lib/libc/aarch64/gen/sigsetjmp.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/gen/sigsetjmp.S Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +ENTRY(sigsetjmp) + cmp x1, #0 + b.eq _C_LABEL(_setjmp) + b _C_LABEL(setjmp) +END(sigsetjmp) + +ENTRY(siglongjmp) + /* Load the _setjmp magic */ + ldr x2, .Lmagic + ldr x3, [x0] + + /* Check the magic */ + cmp x2, x3 + b.eq _C_LABEL(_longjmp) + b _C_LABEL(longjmp) +.Lmagic: + .align 3 + .quad _JB_MAGIC__SETJMP +END(siglongjmp) Added: head/lib/libc/aarch64/sys/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/sys/Makefile.inc Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,25 @@ +# $FreeBSD$ + +SRCS+= trivial-vdso_tc.c + +#MDASM= ptrace.S +MDASM= brk.S \ + cerror.S \ + pipe.S \ + sbrk.S \ + shmat.S \ + sigreturn.S \ + syscall.S \ + vfork.S + +# Don't generate default code for these syscalls: +NOASM= break.o \ + exit.o \ + getlogin.o \ + openbsd_poll.o \ + sstk.o \ + vfork.o \ + yield.o + +PSEUDO= _exit.o \ + _getlogin.o Added: head/lib/libc/aarch64/sys/brk.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/sys/brk.S Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,93 @@ +/*- + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "SYS.h" + + .data + .align 3 + .globl _C_LABEL(minbrk) + .type _C_LABEL(minbrk),#object +_C_LABEL(minbrk): + .quad _C_LABEL(_end) + + .text +/* + * int brk(const void *addr); + */ +ENTRY(_brk) + WEAK_REFERENCE(_brk, brk) + + /* Load the address of minbrk */ +#ifdef __PIC__ + adrp x2, :got:minbrk + ldr x3, [x2, #:got_lo12:minbrk] +#else + ldr x3, .Lminbrk +#endif + + /* Get the minimum allowable brk address */ + ldr x2, [x3] + + /* Validate the address */ + cmp x0, x2 + b.ge 1f + /* Invalid, set it to the minimum */ + mov x0, x2 + + /* Backup the new address */ +1: mov x4, x0 + + /* Update for this value, will overwrite x0 and x1 */ + _SYSCALL(break) + b.cs cerror + +#ifdef __PIC__ + adrp x2, :got:curbrk + ldr x3, [x2, #:got_lo12:curbrk] +#else + ldr x3, .Lcurbrk +#endif + + /* Store the new curbrk value */ + str x4, [x3] + + /* Return success */ + mov x0, #0 + ret + +#ifndef __PIC__ +.Lcurbrk: + .quad _C_LABEL(curbrk) +.Lminbrk: + .quad _C_LABEL(minbrk) +#endif +END(_brk) Added: head/lib/libc/aarch64/sys/cerror.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/sys/cerror.S Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2014 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +ENTRY(cerror) + sub sp, sp, #16 + stp x0, lr, [sp] + bl _C_LABEL(__error) + ldp x1, lr, [sp] + str x1, [x0] + movn x0, #0 + movn x1, #0 + add sp, sp, #16 + ret +END(cerror) Added: head/lib/libc/aarch64/sys/pipe.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/sys/pipe.S Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "SYS.h" + +ENTRY(__sys_pipe) + WEAK_REFERENCE(__sys_pipe, pipe) + + /* Backup the pointer passed to us */ + mov x2, x0 + + /* Make the syscall */ + _SYSCALL(pipe) + b.cs cerror + + /* Store the result */ + str w0, [x2, #0] + str w1, [x2, #4] + + /* Return */ + mov x0, #0 + ret +END(__sys_pipe) Added: head/lib/libc/aarch64/sys/sbrk.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/sys/sbrk.S Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,79 @@ +/*- + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "SYS.h" + + .data + .align 3 + .global _C_LABEL(curbrk) + .type _C_LABEL(curbrk),#object +_C_LABEL(curbrk): + .quad _C_LABEL(_end) + + .text +/* + * void *sbrk(intptr_t incr); + */ +ENTRY(_sbrk) + WEAK_REFERENCE(_sbrk, sbrk) + + /* Load the address of curbrk */ +#ifdef __PIC__ + adrp x2, :got:curbrk + ldr x3, [x2, #:got_lo12:curbrk] +#else + ldr x3, .Lcurbrk +#endif + + /* Get the current brk address */ + ldr x2, [x3] + + /* Calculate the new value */ + add x0, x2, x0 + mov x4, x0 + + /* Update for this value, will overwrite x0 and x1 */ + _SYSCALL(break) + b.cs cerror + + /* Load the old value to return */ + ldr x0, [x3] + + /* Store the new curbrk value */ + str x4, [x3] + + ret +#ifndef __PIC__ +.Lcurbrk: + .quad _C_LABEL(curbrk) +#endif +END(_sbrk) Added: head/lib/libc/aarch64/sys/shmat.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/sys/shmat.S Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "SYS.h" + +RSYSCALL(shmat) Added: head/lib/libc/aarch64/sys/sigreturn.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/aarch64/sys/sigreturn.S Tue Apr 7 09:52:14 2015 (r281197) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 10:23:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E9B44D7; Tue, 7 Apr 2015 10:23:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68B95943; Tue, 7 Apr 2015 10:23:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37AN1HM041519; Tue, 7 Apr 2015 10:23:01 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37AMvts041485; Tue, 7 Apr 2015 10:22:57 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <201504071022.t37AMvts041485@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Tue, 7 Apr 2015 10:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281198 - in head/sys/netgraph/bluetooth: hci include l2cap socket X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 10:23:01 -0000 Author: takawata Date: Tue Apr 7 10:22:56 2015 New Revision: 281198 URL: https://svnweb.freebsd.org/changeset/base/281198 Log: Initial Bluetooth LE support. Note that sockaddr_l2cap structure is changed , check socket address to initialize new structure member and define L2CAP_SOCKET_CHECKED before including ng_btsocket.h Differential Revision: https://reviews.freebsd.org/D2021 Reviewed by:emax Modified: head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c head/sys/netgraph/bluetooth/hci/ng_hci_main.c head/sys/netgraph/bluetooth/hci/ng_hci_misc.c head/sys/netgraph/bluetooth/hci/ng_hci_misc.h head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c head/sys/netgraph/bluetooth/hci/ng_hci_var.h head/sys/netgraph/bluetooth/include/ng_btsocket.h head/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h head/sys/netgraph/bluetooth/include/ng_hci.h head/sys/netgraph/bluetooth/include/ng_l2cap.h head/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c head/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h head/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h head/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c head/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.h head/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c head/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c Modified: head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c Tue Apr 7 09:52:14 2015 (r281197) +++ head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c Tue Apr 7 10:22:56 2015 (r281198) @@ -71,11 +71,15 @@ static int process_status_params (ng_hci_unit_p, u_int16_t, struct mbuf *, struct mbuf *); static int process_testing_params (ng_hci_unit_p, u_int16_t, struct mbuf *, struct mbuf *); +static int process_le_params + (ng_hci_unit_p, u_int16_t, struct mbuf *, struct mbuf *); static int process_link_control_status (ng_hci_unit_p, ng_hci_command_status_ep *, struct mbuf *); static int process_link_policy_status (ng_hci_unit_p, ng_hci_command_status_ep *, struct mbuf *); +static int process_le_status + (ng_hci_unit_p, ng_hci_command_status_ep *, struct mbuf *); /* * Send HCI command to the driver. @@ -222,7 +226,10 @@ ng_hci_process_command_complete(ng_hci_u error = process_testing_params(unit, NG_HCI_OCF(ep->opcode), cp, e); break; - + case NG_HCI_OGF_LE: + error = process_le_params(unit, + NG_HCI_OCF(ep->opcode), cp, e); + break; case NG_HCI_OGF_BT_LOGO: case NG_HCI_OGF_VENDOR: NG_FREE_M(cp); @@ -294,7 +301,9 @@ ng_hci_process_command_status(ng_hci_uni case NG_HCI_OGF_LINK_POLICY: error = process_link_policy_status(unit, ep, cp); break; - + case NG_HCI_OGF_LE: + error = process_le_status(unit, ep, cp); + break; case NG_HCI_OGF_BT_LOGO: case NG_HCI_OGF_VENDOR: NG_FREE_M(cp); @@ -604,6 +613,8 @@ process_hc_baseband_params(ng_hci_unit_p case NG_HCI_OCF_READ_LOCAL_NAME: case NG_HCI_OCF_READ_UNIT_CLASS: case NG_HCI_OCF_WRITE_UNIT_CLASS: + case NG_HCI_OCF_READ_LE_HOST_SUPPORTED: + case NG_HCI_OCF_WRITE_LE_HOST_SUPPORTED: /* These do not need post processing */ break; @@ -796,6 +807,132 @@ process_testing_params(ng_hci_unit_p uni return (error); } /* process_testing_params */ +/* + * Process LE command return parameters + */ + +static int +process_le_params(ng_hci_unit_p unit, u_int16_t ocf, + struct mbuf *mcp, struct mbuf *mrp) +{ + int error = 0; + + switch (ocf){ + case NG_HCI_OCF_LE_SET_EVENT_MASK: + case NG_HCI_OCF_LE_READ_BUFFER_SIZE: + case NG_HCI_OCF_LE_READ_LOCAL_SUPPORTED_FEATURES: + case NG_HCI_OCF_LE_SET_RANDOM_ADDRESS: + case NG_HCI_OCF_LE_SET_ADVERTISING_PARAMETERS: + case NG_HCI_OCF_LE_READ_ADVERTISING_CHANNEL_TX_POWER: + case NG_HCI_OCF_LE_SET_ADVERTISING_DATA: + case NG_HCI_OCF_LE_SET_SCAN_RESPONSE_DATA: + case NG_HCI_OCF_LE_SET_ADVERTISE_ENABLE: + case NG_HCI_OCF_LE_SET_SCAN_PARAMETERS: + case NG_HCI_OCF_LE_SET_SCAN_ENABLE: + case NG_HCI_OCF_LE_CREATE_CONNECTION_CANCEL: + case NG_HCI_OCF_LE_CLEAR_WHITE_LIST: + case NG_HCI_OCF_LE_READ_WHITE_LIST_SIZE: + case NG_HCI_OCF_LE_ADD_DEVICE_TO_WHITE_LIST: + case NG_HCI_OCF_LE_REMOVE_DEVICE_FROM_WHITE_LIST: + case NG_HCI_OCF_LE_SET_HOST_CHANNEL_CLASSIFICATION: + case NG_HCI_OCF_LE_READ_CHANNEL_MAP: + case NG_HCI_OCF_LE_ENCRYPT: + case NG_HCI_OCF_LE_RAND: + case NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_REPLY: + case NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY: + case NG_HCI_OCF_LE_READ_SUPPORTED_STATUS: + case NG_HCI_OCF_LE_RECEIVER_TEST: + case NG_HCI_OCF_LE_TRANSMITTER_TEST: + case NG_HCI_OCF_LE_TEST_END: + + /* These do not need post processing */ + break; + case NG_HCI_OCF_LE_CREATE_CONNECTION: + case NG_HCI_OCF_LE_CONNECTION_UPDATE: + case NG_HCI_OCF_LE_READ_REMOTE_USED_FEATURES: + case NG_HCI_OCF_LE_START_ENCRYPTION: + + + default: + /* + * None of these command was supposed to generate + * Command_Complete event. Instead Command_Status event + * should have been generated and then appropriate event + * should have been sent to indicate the final result. + */ + + error = EINVAL; + break; + } + + NG_FREE_M(mcp); + NG_FREE_M(mrp); + + return (error); + +} + + + +static int +process_le_status(ng_hci_unit_p unit,ng_hci_command_status_ep *ep, + struct mbuf *mcp) +{ + int error = 0; + + switch (NG_HCI_OCF(ep->opcode)){ + case NG_HCI_OCF_LE_CREATE_CONNECTION: + case NG_HCI_OCF_LE_CONNECTION_UPDATE: + case NG_HCI_OCF_LE_READ_REMOTE_USED_FEATURES: + case NG_HCI_OCF_LE_START_ENCRYPTION: + + /* These do not need post processing */ + break; + + case NG_HCI_OCF_LE_SET_EVENT_MASK: + case NG_HCI_OCF_LE_READ_BUFFER_SIZE: + case NG_HCI_OCF_LE_READ_LOCAL_SUPPORTED_FEATURES: + case NG_HCI_OCF_LE_SET_RANDOM_ADDRESS: + case NG_HCI_OCF_LE_SET_ADVERTISING_PARAMETERS: + case NG_HCI_OCF_LE_READ_ADVERTISING_CHANNEL_TX_POWER: + case NG_HCI_OCF_LE_SET_ADVERTISING_DATA: + case NG_HCI_OCF_LE_SET_SCAN_RESPONSE_DATA: + case NG_HCI_OCF_LE_SET_ADVERTISE_ENABLE: + case NG_HCI_OCF_LE_SET_SCAN_PARAMETERS: + case NG_HCI_OCF_LE_SET_SCAN_ENABLE: + case NG_HCI_OCF_LE_CREATE_CONNECTION_CANCEL: + case NG_HCI_OCF_LE_CLEAR_WHITE_LIST: + case NG_HCI_OCF_LE_READ_WHITE_LIST_SIZE: + case NG_HCI_OCF_LE_ADD_DEVICE_TO_WHITE_LIST: + case NG_HCI_OCF_LE_REMOVE_DEVICE_FROM_WHITE_LIST: + case NG_HCI_OCF_LE_SET_HOST_CHANNEL_CLASSIFICATION: + case NG_HCI_OCF_LE_READ_CHANNEL_MAP: + case NG_HCI_OCF_LE_ENCRYPT: + case NG_HCI_OCF_LE_RAND: + case NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_REPLY: + case NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY: + case NG_HCI_OCF_LE_READ_SUPPORTED_STATUS: + case NG_HCI_OCF_LE_RECEIVER_TEST: + case NG_HCI_OCF_LE_TRANSMITTER_TEST: + case NG_HCI_OCF_LE_TEST_END: + + + default: + /* + * None of these command was supposed to generate + * Command_Stutus event. Command Complete instead. + */ + + error = EINVAL; + break; + } + + NG_FREE_M(mcp); + + return (error); + +} + /* * Process link control command status */ Modified: head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c Tue Apr 7 09:52:14 2015 (r281197) +++ head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c Tue Apr 7 10:22:56 2015 (r281198) @@ -76,6 +76,7 @@ static int page_scan_mode_change (n static int page_scan_rep_mode_change (ng_hci_unit_p, struct mbuf *); static int sync_con_queue (ng_hci_unit_p, ng_hci_unit_con_p, int); static int send_data_packets (ng_hci_unit_p, int, int); +static int le_event (ng_hci_unit_p, struct mbuf *); /* * Process HCI event packet @@ -121,6 +122,9 @@ ng_hci_process_event(ng_hci_unit_p unit, /* These do not need post processing */ NG_FREE_M(event); break; + case NG_HCI_EVENT_LE: + error = le_event(unit, event); + break; case NG_HCI_EVENT_INQUIRY_RESULT: error = inquiry_result(unit, event); @@ -247,6 +251,7 @@ static int send_data_packets(ng_hci_unit_p unit, int link_type, int limit) { ng_hci_unit_con_p con = NULL, winner = NULL; + int reallink_type; item_p item = NULL; int min_pending, total_sent, sent, error, v; @@ -260,8 +265,11 @@ send_data_packets(ng_hci_unit_p unit, in */ LIST_FOREACH(con, &unit->con_list, next) { - if (con->link_type != link_type) + reallink_type = (con->link_type == NG_HCI_LINK_SCO)? + NG_HCI_LINK_SCO: NG_HCI_LINK_ACL; + if (reallink_type != link_type){ continue; + } if (NG_BT_ITEMQ_LEN(&con->conq) == 0) continue; @@ -327,7 +335,6 @@ send_data_packets(ng_hci_unit_p unit, in /* * Sync connection queue for the winner */ - sync_con_queue(unit, winner, sent); } @@ -346,7 +353,7 @@ sync_con_queue(ng_hci_unit_p unit, ng_hc ng_hci_sync_con_queue_ep *state = NULL; int error; - hook = (con->link_type == NG_HCI_LINK_ACL)? unit->acl : unit->sco; + hook = (con->link_type != NG_HCI_LINK_SCO)? unit->acl : unit->sco; if (hook == NULL || NG_HOOK_NOT_VALID(hook)) return (ENOTCONN); @@ -363,6 +370,223 @@ sync_con_queue(ng_hci_unit_p unit, ng_hc return (error); } /* sync_con_queue */ +/* le meta event */ +/* Inquiry result event */ +static int +le_advertizing_report(ng_hci_unit_p unit, struct mbuf *event) +{ + ng_hci_le_advertising_report_ep *ep = NULL; + ng_hci_neighbor_p n = NULL; + bdaddr_t bdaddr; + int error = 0; + u_int8_t event_type; + u_int8_t addr_type; + + NG_HCI_M_PULLUP(event, sizeof(*ep)); + if (event == NULL) + return (ENOBUFS); + + ep = mtod(event, ng_hci_le_advertising_report_ep *); + m_adj(event, sizeof(*ep)); + + for (; ep->num_reports > 0; ep->num_reports --) { + /* Get remote unit address */ + NG_HCI_M_PULLUP(event, sizeof(u_int8_t)); + event_type = *mtod(event, u_int8_t *); + m_adj(event, sizeof(u_int8_t)); + NG_HCI_M_PULLUP(event, sizeof(u_int8_t)); + addr_type = *mtod(event, u_int8_t *); + m_adj(event, sizeof(u_int8_t)); + + m_copydata(event, 0, sizeof(bdaddr), (caddr_t) &bdaddr); + m_adj(event, sizeof(bdaddr)); + + /* Lookup entry in the cache */ + n = ng_hci_get_neighbor(unit, &bdaddr, (addr_type) ? NG_HCI_LINK_LE_RANDOM:NG_HCI_LINK_LE_PUBLIC); + if (n == NULL) { + /* Create new entry */ + n = ng_hci_new_neighbor(unit); + if (n == NULL) { + error = ENOMEM; + break; + } + bcopy(&bdaddr, &n->bdaddr, sizeof(n->bdaddr)); + n->addrtype = (addr_type)? NG_HCI_LINK_LE_RANDOM : + NG_HCI_LINK_LE_PUBLIC; + + } else + getmicrotime(&n->updated); + +#if 0 + { + /* + * TODO: Make these information + * Available from userland. + */ + u_int8_t length_data; + + char *rssi; + + NG_HCI_M_PULLUP(event, sizeof(u_int8_t)); + length_data = *mtod(event, u_int8_t *); + m_adj(event, sizeof(u_int8_t)); + /*Advertizement data*/ + NG_HCI_M_PULLUP(event, length_data); + m_adj(event, length_data); + NG_HCI_M_PULLUP(event, sizeof(char )); + /*Get RSSI*/ + rssi = mtod(event, char *); + m_adj(event, sizeof(u_int8_t)); + } +#endif + } + NG_FREE_M(event); + + return (error); +} /* inquiry_result */ + +static int le_connection_complete(ng_hci_unit_p unit, struct mbuf *event) +{ + int error = 0; + + ng_hci_le_connection_complete_ep *ep = NULL; + ng_hci_unit_con_p con = NULL; + int link_type; + uint8_t uclass[3] = {0,0,0};//dummy uclass + + NG_HCI_M_PULLUP(event, sizeof(*ep)); + if (event == NULL) + return (ENOBUFS); + + ep = mtod(event, ng_hci_le_connection_complete_ep *); + link_type = (ep->address_type)? NG_HCI_LINK_LE_RANDOM : + NG_HCI_LINK_LE_PUBLIC; + /* + * Find the first connection descriptor that matches the following: + * + * 1) con->link_type == link_type + * 2) con->state == NG_HCI_CON_W4_CONN_COMPLETE + * 3) con->bdaddr == ep->address + */ + LIST_FOREACH(con, &unit->con_list, next) + if (con->link_type == link_type && + con->state == NG_HCI_CON_W4_CONN_COMPLETE && + bcmp(&con->bdaddr, &ep->address, sizeof(bdaddr_t)) == 0) + break; + + /* + * Two possible cases: + * + * 1) We have found connection descriptor. That means upper layer has + * requested this connection via LP_CON_REQ message. In this case + * connection must have timeout set. If ng_hci_con_untimeout() fails + * then timeout message already went into node's queue. In this case + * ignore Connection_Complete event and let timeout deal with it. + * + * 2) We do not have connection descriptor. That means upper layer + * nas not requested this connection , (less likely) we gave up + * on this connection (timeout) or as node act as slave role. + * The most likely scenario is that + * we have received LE_Create_Connection command + * from the RAW hook + */ + + if (con == NULL) { + if (ep->status != 0) + goto out; + + con = ng_hci_new_con(unit, link_type); + if (con == NULL) { + error = ENOMEM; + goto out; + } + + con->state = NG_HCI_CON_W4_LP_CON_RSP; + ng_hci_con_timeout(con); + + bcopy(&ep->address, &con->bdaddr, sizeof(con->bdaddr)); + error = ng_hci_lp_con_ind(con, uclass); + if (error != 0) { + ng_hci_con_untimeout(con); + ng_hci_free_con(con); + } + + } else if ((error = ng_hci_con_untimeout(con)) != 0) + goto out; + + /* + * Update connection descriptor and send notification + * to the upper layers. + */ + + con->con_handle = NG_HCI_CON_HANDLE(le16toh(ep->handle)); + con->encryption_mode = NG_HCI_ENCRYPTION_MODE_NONE; + + ng_hci_lp_con_cfm(con, ep->status); + + /* Adjust connection state */ + if (ep->status != 0) + ng_hci_free_con(con); + else { + con->state = NG_HCI_CON_OPEN; + + /* + * Change link policy for the ACL connections. Enable all + * supported link modes. Enable Role switch as well if + * device supports it. + */ + + } + +out: + NG_FREE_M(event); + + return (error); + +} + +static int le_connection_update(ng_hci_unit_p unit, struct mbuf *event) +{ + int error = 0; + /*TBD*/ + + NG_FREE_M(event); + return error; + +} +static int +le_event(ng_hci_unit_p unit, struct mbuf *event) +{ + int error = 0; + ng_hci_le_ep *lep; + + NG_HCI_M_PULLUP(event, sizeof(*lep)); + if(event ==NULL){ + return ENOBUFS; + } + lep = mtod(event, ng_hci_le_ep *); + m_adj(event, sizeof(*lep)); + switch(lep->subevent_code){ + case NG_HCI_LEEV_CON_COMPL: + le_connection_complete(unit, event); + break; + case NG_HCI_LEEV_ADVREP: + le_advertizing_report(unit, event); + break; + case NG_HCI_LEEV_CON_UPDATE_COMPL: + le_connection_update(unit, event); + break; + case NG_HCI_LEEV_READ_REMOTE_FEATURES_COMPL: + //TBD + /*FALLTHROUGH*/ + case NG_HCI_LEEV_LONG_TERM_KEY_REQUEST: + //TBD + /*FALLTHROUGH*/ + default: + NG_FREE_M(event); + } + return error; +} /* Inquiry result event */ static int @@ -386,7 +610,7 @@ inquiry_result(ng_hci_unit_p unit, struc m_adj(event, sizeof(bdaddr)); /* Lookup entry in the cache */ - n = ng_hci_get_neighbor(unit, &bdaddr); + n = ng_hci_get_neighbor(unit, &bdaddr, NG_HCI_LINK_ACL); if (n == NULL) { /* Create new entry */ n = ng_hci_new_neighbor(unit); @@ -398,6 +622,7 @@ inquiry_result(ng_hci_unit_p unit, struc getmicrotime(&n->updated); bcopy(&bdaddr, &n->bdaddr, sizeof(n->bdaddr)); + n->addrtype = NG_HCI_LINK_ACL; /* XXX call m_pullup here? */ @@ -754,7 +979,7 @@ read_remote_features_compl(ng_hci_unit_p } /* Update cache entry */ - n = ng_hci_get_neighbor(unit, &con->bdaddr); + n = ng_hci_get_neighbor(unit, &con->bdaddr, NG_HCI_LINK_ACL); if (n == NULL) { n = ng_hci_new_neighbor(unit); if (n == NULL) { @@ -763,6 +988,7 @@ read_remote_features_compl(ng_hci_unit_p } bcopy(&con->bdaddr, &n->bdaddr, sizeof(n->bdaddr)); + n->addrtype = NG_HCI_LINK_ACL; } else getmicrotime(&n->updated); @@ -909,7 +1135,7 @@ num_compl_pkts(ng_hci_unit_p unit, struc } /* Update buffer descriptor */ - if (con->link_type == NG_HCI_LINK_ACL) + if (con->link_type != NG_HCI_LINK_SCO) NG_HCI_BUFF_ACL_FREE(unit->buffer, p); else NG_HCI_BUFF_SCO_FREE(unit->buffer, p); @@ -1010,7 +1236,7 @@ read_clock_offset_compl(ng_hci_unit_p un } /* Update cache entry */ - n = ng_hci_get_neighbor(unit, &con->bdaddr); + n = ng_hci_get_neighbor(unit, &con->bdaddr, NG_HCI_LINK_ACL); if (n == NULL) { n = ng_hci_new_neighbor(unit); if (n == NULL) { @@ -1019,6 +1245,7 @@ read_clock_offset_compl(ng_hci_unit_p un } bcopy(&con->bdaddr, &n->bdaddr, sizeof(n->bdaddr)); + n->addrtype = NG_HCI_LINK_ACL; } else getmicrotime(&n->updated); @@ -1089,7 +1316,7 @@ page_scan_mode_change(ng_hci_unit_p unit ep = mtod(event, ng_hci_page_scan_mode_change_ep *); /* Update cache entry */ - n = ng_hci_get_neighbor(unit, &ep->bdaddr); + n = ng_hci_get_neighbor(unit, &ep->bdaddr, NG_HCI_LINK_ACL); if (n == NULL) { n = ng_hci_new_neighbor(unit); if (n == NULL) { @@ -1098,6 +1325,7 @@ page_scan_mode_change(ng_hci_unit_p unit } bcopy(&ep->bdaddr, &n->bdaddr, sizeof(n->bdaddr)); + n->addrtype = NG_HCI_LINK_ACL; } else getmicrotime(&n->updated); @@ -1123,7 +1351,7 @@ page_scan_rep_mode_change(ng_hci_unit_p ep = mtod(event, ng_hci_page_scan_rep_mode_change_ep *); /* Update cache entry */ - n = ng_hci_get_neighbor(unit, &ep->bdaddr); + n = ng_hci_get_neighbor(unit, &ep->bdaddr, NG_HCI_LINK_ACL); if (n == NULL) { n = ng_hci_new_neighbor(unit); if (n == NULL) { @@ -1132,6 +1360,7 @@ page_scan_rep_mode_change(ng_hci_unit_p } bcopy(&ep->bdaddr, &n->bdaddr, sizeof(n->bdaddr)); + n->addrtype = NG_HCI_LINK_ACL; } else getmicrotime(&n->updated); Modified: head/sys/netgraph/bluetooth/hci/ng_hci_main.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_main.c Tue Apr 7 09:52:14 2015 (r281197) +++ head/sys/netgraph/bluetooth/hci/ng_hci_main.c Tue Apr 7 10:22:56 2015 (r281198) @@ -775,7 +775,6 @@ ng_hci_acl_rcvdata(hook_p hook, item_p i int size, error = 0; NG_HCI_BUFF_ACL_SIZE(unit->buffer, size); - /* Check packet */ NGI_GET_M(item, m); @@ -788,7 +787,6 @@ ng_hci_acl_rcvdata(hook_p hook, item_p i error = EINVAL; goto drop; } - if (m->m_pkthdr.len < sizeof(ng_hci_acldata_pkt_t) || m->m_pkthdr.len > sizeof(ng_hci_acldata_pkt_t) + size) { NG_HCI_ALERT( @@ -831,7 +829,7 @@ ng_hci_acl_rcvdata(hook_p hook, item_p i goto drop; } - if (con->link_type != NG_HCI_LINK_ACL) { + if (con->link_type == NG_HCI_LINK_SCO) { NG_HCI_ERR( "%s: %s - unexpected HCI ACL data packet. Not ACL link, con_handle=%d, " \ "link_type=%d\n", __func__, NG_NODE_NAME(unit->node), Modified: head/sys/netgraph/bluetooth/hci/ng_hci_misc.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_misc.c Tue Apr 7 09:52:14 2015 (r281197) +++ head/sys/netgraph/bluetooth/hci/ng_hci_misc.c Tue Apr 7 10:22:56 2015 (r281198) @@ -214,7 +214,7 @@ ng_hci_flush_neighbor_cache(ng_hci_unit_ */ ng_hci_neighbor_p -ng_hci_get_neighbor(ng_hci_unit_p unit, bdaddr_p bdaddr) +ng_hci_get_neighbor(ng_hci_unit_p unit, bdaddr_p bdaddr,int link_type) { ng_hci_neighbor_p n = NULL; @@ -222,7 +222,8 @@ ng_hci_get_neighbor(ng_hci_unit_p unit, ng_hci_neighbor_p nn = LIST_NEXT(n, next); if (!ng_hci_neighbor_stale(n)) { - if (bcmp(&n->bdaddr, bdaddr, sizeof(*bdaddr)) == 0) + if (n->addrtype == link_type && + bcmp(&n->bdaddr, bdaddr, sizeof(*bdaddr)) == 0) break; } else ng_hci_free_neighbor(n); /* remove old entry */ @@ -284,7 +285,7 @@ ng_hci_new_con(ng_hci_unit_p unit, int l con->link_type = link_type; - if (con->link_type == NG_HCI_LINK_ACL) + if (con->link_type != NG_HCI_LINK_SCO) NG_HCI_BUFF_ACL_TOTAL(unit->buffer, num_pkts); else NG_HCI_BUFF_SCO_TOTAL(unit->buffer, num_pkts); @@ -313,7 +314,7 @@ ng_hci_free_con(ng_hci_unit_con_p con) * flushed these packets and we can free them too */ - if (con->link_type == NG_HCI_LINK_ACL) + if (con->link_type != NG_HCI_LINK_SCO) NG_HCI_BUFF_ACL_FREE(con->unit->buffer, con->pending); else NG_HCI_BUFF_SCO_FREE(con->unit->buffer, con->pending); Modified: head/sys/netgraph/bluetooth/hci/ng_hci_misc.h ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_misc.h Tue Apr 7 09:52:14 2015 (r281197) +++ head/sys/netgraph/bluetooth/hci/ng_hci_misc.h Tue Apr 7 10:22:56 2015 (r281198) @@ -41,7 +41,7 @@ void ng_hci_unit_clean ng_hci_neighbor_p ng_hci_new_neighbor (ng_hci_unit_p); void ng_hci_free_neighbor (ng_hci_neighbor_p); void ng_hci_flush_neighbor_cache (ng_hci_unit_p); -ng_hci_neighbor_p ng_hci_get_neighbor (ng_hci_unit_p, bdaddr_p); +ng_hci_neighbor_p ng_hci_get_neighbor (ng_hci_unit_p, bdaddr_p, int); int ng_hci_neighbor_stale (ng_hci_neighbor_p); ng_hci_unit_con_p ng_hci_new_con (ng_hci_unit_p, int); Modified: head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c Tue Apr 7 09:52:14 2015 (r281197) +++ head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c Tue Apr 7 10:22:56 2015 (r281198) @@ -56,6 +56,7 @@ static int ng_hci_lp_acl_con_req (ng_hci_unit_p, item_p, hook_p); static int ng_hci_lp_sco_con_req (ng_hci_unit_p, item_p, hook_p); +static int ng_hci_lp_le_con_req (ng_hci_unit_p, item_p, hook_p, int); /* * Process LP_ConnectReq event from the upper layer protocol @@ -64,6 +65,8 @@ static int ng_hci_lp_sco_con_req (ng_hci int ng_hci_lp_con_req(ng_hci_unit_p unit, item_p item, hook_p hook) { + int link_type; + if ((unit->state & NG_HCI_UNIT_READY) != NG_HCI_UNIT_READY) { NG_HCI_WARN( "%s: %s - unit is not ready, state=%#x\n", @@ -84,21 +87,30 @@ ng_hci_lp_con_req(ng_hci_unit_p unit, it return (EMSGSIZE); } - - if (((ng_hci_lp_con_req_ep *)(NGI_MSG(item)->data))->link_type == NG_HCI_LINK_ACL) + link_type = ((ng_hci_lp_con_req_ep *)(NGI_MSG(item)->data))->link_type; + switch(link_type){ + case NG_HCI_LINK_ACL: return (ng_hci_lp_acl_con_req(unit, item, hook)); - - if (hook != unit->sco) { - NG_HCI_WARN( -"%s: %s - LP_ConnectReq for SCO connection came from wrong hook=%p\n", - __func__, NG_NODE_NAME(unit->node), hook); - - NG_FREE_ITEM(item); - - return (EINVAL); + case NG_HCI_LINK_SCO: + if (hook != unit->sco ) { + NG_HCI_WARN( + "%s: %s - LP_ConnectReq for SCO connection came from wrong hook=%p\n", + __func__, NG_NODE_NAME(unit->node), hook); + + NG_FREE_ITEM(item); + + return (EINVAL); + } + + return (ng_hci_lp_sco_con_req(unit, item, hook)); + case NG_HCI_LINK_LE_PUBLIC: + case NG_HCI_LINK_LE_RANDOM: + return (ng_hci_lp_le_con_req(unit, item, hook, link_type)); + default: + panic("%s: link_type invalid.", __func__); } - - return (ng_hci_lp_sco_con_req(unit, item, hook)); + + return (EINVAL); } /* ng_hci_lp_con_req */ /* @@ -264,7 +276,7 @@ ng_hci_lp_acl_con_req(ng_hci_unit_p unit * So check the neighbor cache. */ - n = ng_hci_get_neighbor(unit, &ep->bdaddr); + n = ng_hci_get_neighbor(unit, &ep->bdaddr, NG_HCI_LINK_ACL); if (n == NULL) { req->cp.page_scan_rep_mode = 0; req->cp.page_scan_mode = 0; @@ -469,6 +481,180 @@ out: return (error); } /* ng_hci_lp_sco_con_req */ +static int +ng_hci_lp_le_con_req(ng_hci_unit_p unit, item_p item, hook_p hook, int link_type) +{ + struct acl_con_req { + ng_hci_cmd_pkt_t hdr; + ng_hci_le_create_connection_cp cp; + } __attribute__ ((packed)) *req = NULL; + ng_hci_lp_con_req_ep *ep = NULL; + ng_hci_unit_con_p con = NULL; + struct mbuf *m = NULL; + int error = 0; + + ep = (ng_hci_lp_con_req_ep *)(NGI_MSG(item)->data); + if((link_type != NG_HCI_LINK_LE_PUBLIC)&& + (link_type != NG_HCI_LINK_LE_RANDOM)){ + printf("%s: Link type %d Cannot be here \n", __func__, + link_type); + } + /* + * Only one ACL connection can exist between each pair of units. + * So try to find ACL connection descriptor (in any state) that + * has requested remote BD_ADDR. + * + * Two cases: + * + * 1) We do not have connection to the remote unit. This is simple. + * Just create new connection descriptor and send HCI command to + * create new connection. + * + * 2) We do have connection descriptor. We need to check connection + * state: + * + * 2.1) NG_HCI_CON_W4_LP_CON_RSP means that we are in the middle of + * accepting connection from the remote unit. This is a race + * condition. We will ignore this message. + * + * 2.2) NG_HCI_CON_W4_CONN_COMPLETE means that upper layer already + * requested connection or we just accepted it. In any case + * all we need to do here is set appropriate notification bit + * and wait. + * + * 2.3) NG_HCI_CON_OPEN means connection is open. Just reply back + * and let upper layer know that we have connection already. + */ + + con = ng_hci_con_by_bdaddr(unit, &ep->bdaddr, link_type); + if (con != NULL) { + switch (con->state) { + case NG_HCI_CON_W4_LP_CON_RSP: /* XXX */ + error = EALREADY; + break; + + case NG_HCI_CON_W4_CONN_COMPLETE: + if (hook != unit->sco) + con->flags |= NG_HCI_CON_NOTIFY_ACL; + else + con->flags |= NG_HCI_CON_NOTIFY_SCO; + break; + + case NG_HCI_CON_OPEN: { + struct ng_mesg *msg = NULL; + ng_hci_lp_con_cfm_ep *cfm = NULL; + + if (hook != NULL && NG_HOOK_IS_VALID(hook)) { + NGI_GET_MSG(item, msg); + NG_FREE_MSG(msg); + + NG_MKMESSAGE(msg, NGM_HCI_COOKIE, + NGM_HCI_LP_CON_CFM, sizeof(*cfm), + M_NOWAIT); + if (msg != NULL) { + cfm = (ng_hci_lp_con_cfm_ep *)msg->data; + cfm->status = 0; + cfm->link_type = con->link_type; + cfm->con_handle = con->con_handle; + bcopy(&con->bdaddr, &cfm->bdaddr, + sizeof(cfm->bdaddr)); + + /* + * This will forward item back to + * sender and set item to NULL + */ + + _NGI_MSG(item) = msg; + NG_FWD_ITEM_HOOK(error, item, hook); + } else + error = ENOMEM; + } else + NG_HCI_INFO( +"%s: %s - Source hook is not valid, hook=%p\n", + __func__, NG_NODE_NAME(unit->node), + hook); + } break; + + default: + panic( +"%s: %s - Invalid connection state=%d\n", + __func__, NG_NODE_NAME(unit->node), con->state); + break; + } + + goto out; + } + + /* + * If we got here then we need to create new ACL connection descriptor + * and submit HCI command. First create new connection desriptor, set + * bdaddr and notification flags. + */ + + con = ng_hci_new_con(unit, link_type); + if (con == NULL) { + error = ENOMEM; + goto out; + } + + bcopy(&ep->bdaddr, &con->bdaddr, sizeof(con->bdaddr)); + + /* + * Create HCI command + */ + + MGETHDR(m, M_NOWAIT, MT_DATA); + if (m == NULL) { + ng_hci_free_con(con); + error = ENOBUFS; + goto out; + } + + m->m_pkthdr.len = m->m_len = sizeof(*req); + req = mtod(m, struct acl_con_req *); + req->hdr.type = NG_HCI_CMD_PKT; + req->hdr.length = sizeof(req->cp); + req->hdr.opcode = htole16(NG_HCI_OPCODE(NG_HCI_OGF_LE, + NG_HCI_OCF_LE_CREATE_CONNECTION)); + + bcopy(&ep->bdaddr, &req->cp.peer_addr, sizeof(req->cp.peer_addr)); + req->cp.own_address_type = 0; + req->cp.peer_addr_type = (link_type == NG_HCI_LINK_LE_RANDOM)? 1:0; + req->cp.scan_interval = htole16(4); + req->cp.scan_window = htole16(4); + req->cp.filter_policy = 0; + req->cp.conn_interval_min = htole16(0xf); + req->cp.conn_interval_max = htole16(0xf); + req->cp.conn_latency = htole16(0); + req->cp.supervision_timeout = htole16(0xc80); + req->cp.min_ce_length = htole16(1); + req->cp.max_ce_length = htole16(1); + /* + * Adust connection state + */ + + if (hook != unit->sco) + con->flags |= NG_HCI_CON_NOTIFY_ACL; + else + con->flags |= NG_HCI_CON_NOTIFY_SCO; + + con->state = NG_HCI_CON_W4_CONN_COMPLETE; + ng_hci_con_timeout(con); + + /* + * Queue and send HCI command + */ + + NG_BT_MBUFQ_ENQUEUE(&unit->cmdq, m); + if (!(unit->state & NG_HCI_UNIT_COMMAND_PENDING)) + error = ng_hci_send_command(unit); +out: + if (item != NULL) + NG_FREE_ITEM(item); + + return (error); +} /* ng_hci_lp_acl_con_req */ + /* * Process LP_DisconnectReq event from the upper layer protocol */ @@ -578,7 +764,7 @@ ng_hci_lp_con_cfm(ng_hci_unit_con_p con, * only SCO upstream hook will receive notification */ - if (con->link_type == NG_HCI_LINK_ACL && + if (con->link_type != NG_HCI_LINK_SCO && con->flags & NG_HCI_CON_NOTIFY_ACL) { if (unit->acl != NULL && NG_HOOK_IS_VALID(unit->acl)) { NG_MKMESSAGE(msg, NGM_HCI_COOKIE, NGM_HCI_LP_CON_CFM, @@ -646,7 +832,7 @@ ng_hci_lp_con_ind(ng_hci_unit_con_p con, * Use link_type to select upstream hook. */ - if (con->link_type == NG_HCI_LINK_ACL) + if (con->link_type != NG_HCI_LINK_SCO) hook = unit->acl; else hook = unit->sco; @@ -887,7 +1073,7 @@ ng_hci_lp_discon_ind(ng_hci_unit_con_p c * only SCO upstream hook will receive notification. */ - if (con->link_type == NG_HCI_LINK_ACL) { + if (con->link_type != NG_HCI_LINK_SCO) { if (unit->acl != NULL && NG_HOOK_IS_VALID(unit->acl)) { NG_MKMESSAGE(msg, NGM_HCI_COOKIE, NGM_HCI_LP_DISCON_IND, sizeof(*ep), M_NOWAIT); Modified: head/sys/netgraph/bluetooth/hci/ng_hci_var.h ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_var.h Tue Apr 7 09:52:14 2015 (r281197) +++ head/sys/netgraph/bluetooth/hci/ng_hci_var.h Tue Apr 7 10:22:56 2015 (r281198) @@ -205,6 +205,7 @@ typedef struct ng_hci_neighbor { bdaddr_t bdaddr; /* address */ u_int8_t features[NG_HCI_FEATURES_SIZE]; /* LMP features */ + u_int8_t addrtype; /*Address Type*/ u_int8_t page_scan_rep_mode; /* PS rep. mode */ u_int8_t page_scan_mode; /* page scan mode */ Modified: head/sys/netgraph/bluetooth/include/ng_btsocket.h ============================================================================== --- head/sys/netgraph/bluetooth/include/ng_btsocket.h Tue Apr 7 09:52:14 2015 (r281197) +++ head/sys/netgraph/bluetooth/include/ng_btsocket.h Tue Apr 7 10:22:56 2015 (r281198) @@ -221,13 +221,32 @@ struct sockaddr_sco { * Bluetooth version of struct sockaddr for L2CAP sockets (RAW and SEQPACKET) */ +struct sockaddr_l2cap_compat { + u_char l2cap_len; /* total length */ + u_char l2cap_family; /* address family */ + u_int16_t l2cap_psm; /* PSM (Protocol/Service Multiplexor) */ + bdaddr_t l2cap_bdaddr; /* address */ +}; + +#define BDADDR_BREDR 0 +#define BDADDR_LE_PUBLIC 1 +#define BDADDR_LE_RANDOM 2 + struct sockaddr_l2cap { u_char l2cap_len; /* total length */ u_char l2cap_family; /* address family */ u_int16_t l2cap_psm; /* PSM (Protocol/Service Multiplexor) */ bdaddr_t l2cap_bdaddr; /* address */ + u_int16_t l2cap_cid; /*cid*/ + u_int8_t l2cap_bdaddr_type; /*address type*/ }; + +#if !defined(L2CAP_SOCKET_CHECKED) && !defined(_KERNEL) +#warning "Make sure new member of socket address initialized" +#endif + + /* L2CAP socket options */ #define SOL_L2CAP 0x1609 /* socket option level */ Modified: head/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h ============================================================================== --- head/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h Tue Apr 7 09:52:14 2015 (r281197) +++ head/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h Tue Apr 7 10:22:56 2015 (r281198) @@ -70,6 +70,8 @@ struct ng_btsocket_l2cap_raw_pcb { bdaddr_t src; /* source address */ bdaddr_t dst; /* dest address */ + uint8_t srctype;/*source addr type*/ + uint8_t dsttype;/*source addr type*/ ng_btsocket_l2cap_rtentry_p rt; /* routing info */ u_int32_t token; /* message token */ @@ -129,6 +131,8 @@ struct ng_btsocket_l2cap_pcb { bdaddr_t src; /* Source address */ bdaddr_t dst; /* Destination address */ + uint8_t srctype; /*source addr type*/ + uint8_t dsttype; /*source addr type*/ u_int16_t psm; /* PSM */ u_int16_t cid; /* Local channel ID */ Modified: head/sys/netgraph/bluetooth/include/ng_hci.h ============================================================================== --- head/sys/netgraph/bluetooth/include/ng_hci.h Tue Apr 7 09:52:14 2015 (r281197) +++ head/sys/netgraph/bluetooth/include/ng_hci.h Tue Apr 7 10:22:56 2015 (r281198) @@ -75,10 +75,11 @@ #define NG_HCI_KEY_SIZE 16 /* link key */ #define NG_HCI_PIN_SIZE 16 /* link PIN */ #define NG_HCI_EVENT_MASK_SIZE 8 /* event mask */ +#define NG_HCI_LE_EVENT_MASK_SIZE 8 /* event mask */ #define NG_HCI_CLASS_SIZE 3 /* unit class */ #define NG_HCI_FEATURES_SIZE 8 /* LMP features */ #define NG_HCI_UNIT_NAME_SIZE 248 /* unit name size */ - +#define NG_HCI_COMMANDS_SIZE 64 /*Command list BMP size*/ /* HCI specification */ #define NG_HCI_SPEC_V10 0x00 /* v1.0 */ #define NG_HCI_SPEC_V11 0x01 /* v1.1 */ @@ -115,6 +116,8 @@ /* Link types */ #define NG_HCI_LINK_SCO 0x00 /* Voice */ #define NG_HCI_LINK_ACL 0x01 /* Data */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 10:25:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47D6B64F; Tue, 7 Apr 2015 10:25:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 197F995F; Tue, 7 Apr 2015 10:25:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37APSYu041893; Tue, 7 Apr 2015 10:25:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37APSFO041886; Tue, 7 Apr 2015 10:25:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504071025.t37APSFO041886@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 7 Apr 2015 10:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281199 - in head: sys/rpc usr.sbin/nfsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 10:25:29 -0000 Author: mav Date: Tue Apr 7 10:25:27 2015 New Revision: 281199 URL: https://svnweb.freebsd.org/changeset/base/281199 Log: Remove hard limits on number of accepting NFS connections. Limits of 5 connections set long ago creates problems for SPEC benchmark. Make the NFS follow system-wide maximum. MFC after: 1 week Modified: head/sys/rpc/svc_generic.c head/sys/rpc/svc_vc.c head/usr.sbin/nfsd/nfsd.c Modified: head/sys/rpc/svc_generic.c ============================================================================== --- head/sys/rpc/svc_generic.c Tue Apr 7 10:22:56 2015 (r281198) +++ head/sys/rpc/svc_generic.c Tue Apr 7 10:25:27 2015 (r281199) @@ -168,7 +168,7 @@ svc_tp_create( taddr = uaddr2taddr(nconf, uaddr); bind.addr = *taddr; free(taddr, M_RPC); - bind.qlen = SOMAXCONN; + bind.qlen = -1; xprt = svc_tli_create(pool, NULL, nconf, &bind, 0, 0); free(bind.addr.buf, M_RPC); } else { @@ -256,7 +256,7 @@ svc_tli_create( goto freedata; } } - solisten(so, SOMAXCONN, curthread); + solisten(so, -1, curthread); } else { if (bindresvport(so, (struct sockaddr *)bindaddr->addr.buf)) { Modified: head/sys/rpc/svc_vc.c ============================================================================== --- head/sys/rpc/svc_vc.c Tue Apr 7 10:22:56 2015 (r281198) +++ head/sys/rpc/svc_vc.c Tue Apr 7 10:25:27 2015 (r281199) @@ -177,7 +177,7 @@ svc_vc_create(SVCPOOL *pool, struct sock xprt_register(xprt); - solisten(so, SOMAXCONN, curthread); + solisten(so, -1, curthread); SOCKBUF_LOCK(&so->so_rcv); xprt->xp_upcallset = 1; Modified: head/usr.sbin/nfsd/nfsd.c ============================================================================== --- head/usr.sbin/nfsd/nfsd.c Tue Apr 7 10:22:56 2015 (r281198) +++ head/usr.sbin/nfsd/nfsd.c Tue Apr 7 10:25:27 2015 (r281199) @@ -626,7 +626,7 @@ main(int argc, char **argv) bindhost[i]); nfsd_exit(1); } - if (listen(tcpsock, 5) < 0) { + if (listen(tcpsock, -1) < 0) { syslog(LOG_ERR, "listen failed"); nfsd_exit(1); } @@ -701,7 +701,7 @@ main(int argc, char **argv) bindhost[i]); nfsd_exit(1); } - if (listen(tcp6sock, 5) < 0) { + if (listen(tcp6sock, -1) < 0) { syslog(LOG_ERR, "listen failed"); nfsd_exit(1); } From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 11:37:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AC4A453; Tue, 7 Apr 2015 11:37:10 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0626BC6; Tue, 7 Apr 2015 11:37:09 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 9B4A825D3A05; Tue, 7 Apr 2015 11:36:59 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D43DEC76FD2; Tue, 7 Apr 2015 11:36:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 18LWRX7W74Rr; Tue, 7 Apr 2015 11:36:56 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:1ded:e7d8:fccb:f553] (unknown [IPv6:fde9:577b:c1a9:4410:1ded:e7d8:fccb:f553]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 0E453C76FCF; Tue, 7 Apr 2015 11:36:54 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281198 - in head/sys/netgraph/bluetooth: hci include l2cap socket From: "Bjoern A. Zeeb" In-Reply-To: <201504071022.t37AMvts041485@svn.freebsd.org> Date: Tue, 7 Apr 2015 11:36:22 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201504071022.t37AMvts041485@svn.freebsd.org> To: Takanori Watanabe X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 11:37:10 -0000 > On 07 Apr 2015, at 10:22 , Takanori Watanabe = wrote: >=20 > Author: takawata > Date: Tue Apr 7 10:22:56 2015 > New Revision: 281198 > URL: https://svnweb.freebsd.org/changeset/base/281198 >=20 > Log: > Initial Bluetooth LE support. >=20 > Note that sockaddr_l2cap structure is changed , check socket address > to initialize new structure member and define L2CAP_SOCKET_CHECKED > before including ng_btsocket.h >=20 > Differential Revision: https://reviews.freebsd.org/D2021 > Reviewed by:emax >=20 I see a lot of: = /scratch/tmp/bz/head.svn/lib/libbluetooth/../../sys/netgraph/bluetooth/inc= lude/ng_btsocket.h:246:2: error: #warning "Make sure new member of = socket address initialized" when trying to build kernels. Is this expected? > Modified: > head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c > head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c > head/sys/netgraph/bluetooth/hci/ng_hci_main.c > head/sys/netgraph/bluetooth/hci/ng_hci_misc.c > head/sys/netgraph/bluetooth/hci/ng_hci_misc.h > head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c > head/sys/netgraph/bluetooth/hci/ng_hci_var.h > head/sys/netgraph/bluetooth/include/ng_btsocket.h > head/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h > head/sys/netgraph/bluetooth/include/ng_hci.h > head/sys/netgraph/bluetooth/include/ng_l2cap.h > head/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c > head/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h > head/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c > head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c > head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h > head/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c > head/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.h > head/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c > head/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h > head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c > head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c > head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 12:42:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EB34C88; Tue, 7 Apr 2015 12:42:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE5CCB69; Tue, 7 Apr 2015 12:42:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37Cg7M3010975; Tue, 7 Apr 2015 12:42:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37Cg7UU010974; Tue, 7 Apr 2015 12:42:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504071242.t37Cg7UU010974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 7 Apr 2015 12:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281200 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 12:42:08 -0000 Author: andrew Date: Tue Apr 7 12:42:06 2015 New Revision: 281200 URL: https://svnweb.freebsd.org/changeset/base/281200 Log: Fix uart_fdt_get_clock. It should have beed using the cell variable passed in, not value on the stack. Modified: head/sys/dev/uart/uart_bus_fdt.c Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Tue Apr 7 10:25:27 2015 (r281199) +++ head/sys/dev/uart/uart_bus_fdt.c Tue Apr 7 12:42:06 2015 (r281200) @@ -66,19 +66,16 @@ static driver_t uart_fdt_driver = { int uart_fdt_get_clock(phandle_t node, pcell_t *cell) { - pcell_t clock; /* clock-frequency is a FreeBSD-only extention. */ - if ((OF_getencprop(node, "clock-frequency", &clock, - sizeof(clock))) <= 0) - clock = 0; - - if (clock == 0) + if ((OF_getencprop(node, "clock-frequency", cell, + sizeof(*cell))) <= 0) { /* Try to retrieve parent 'bus-frequency' */ /* XXX this should go to simple-bus fixup or so */ - if ((OF_getencprop(OF_parent(node), "bus-frequency", &clock, - sizeof(clock))) <= 0) - clock = 0; + if ((OF_getencprop(OF_parent(node), "bus-frequency", cell, + sizeof(*cell))) <= 0) + *cell = 0; + } return (0); } From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 13:17:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42619787; Tue, 7 Apr 2015 13:17:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D7BCF9A; Tue, 7 Apr 2015 13:17:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37DHSFM025906; Tue, 7 Apr 2015 13:17:28 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37DHSWq025905; Tue, 7 Apr 2015 13:17:28 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504071317.t37DHSWq025905@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 7 Apr 2015 13:17:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281201 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 13:17:29 -0000 Author: andrew Date: Tue Apr 7 13:17:28 2015 New Revision: 281201 URL: https://svnweb.freebsd.org/changeset/base/281201 Log: We will have fueword on arm64, mark as such in machine/param.h. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/include/param.h Modified: head/sys/arm64/include/param.h ============================================================================== --- head/sys/arm64/include/param.h Tue Apr 7 12:42:06 2015 (r281200) +++ head/sys/arm64/include/param.h Tue Apr 7 13:17:28 2015 (r281201) @@ -118,8 +118,4 @@ #define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024)) -#ifdef _KERNEL -#define NO_FUEWORD 1 -#endif - #endif /* !_MACHINE_PARAM_H_ */ From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 13:53:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2D494F6 for ; Tue, 7 Apr 2015 13:53:56 +0000 (UTC) Received: from mail-qk0-f181.google.com (mail-qk0-f181.google.com [209.85.220.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8940C6DD for ; Tue, 7 Apr 2015 13:53:56 +0000 (UTC) Received: by qku63 with SMTP id 63so51374957qku.3 for ; Tue, 07 Apr 2015 06:53:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:organization:content-type:mime-version; bh=ofUX01dsYoCMTYXEe4cJtRt4c20xiuKQvcs0j05J63o=; b=DX7qt3VMO06uLg7YDUt80WwOPuZKZ1BN5n66FSpp2XYDdDQACHYxooFqEUTj4b9Qvo hVwaKCxgNjlqTpe1HDPaTzE92Kc9QcLUj5nTMw55txp7+jNXAg0RvL0pzoUUPw1Oi7sl fLVvRMALWw3ryYOMCUGGqczLfm++d9XDvoGXfRTBlL+2/8MiNEpEltUQhgvcWbTDWNYb R1iVFm1t4Md26hEgA5yFC+vVqxij0NmMd3f3WSKMg7jBr2GQof1bNFPcasDz4iGbDYqK A4vyPqv7ak6ZZHOE1fuUjKMMnREZAG7T/U7gZ76Ge83kF5U2RKVSsuN5BeG5aUmQCEly gvSQ== X-Gm-Message-State: ALoCoQkTRrB7g5wibdCXdStTLSnvowh7WN6GaEGgVNcva584ND/+906OPIh9JVYqrfCwGDpQMKtY X-Received: by 10.55.21.17 with SMTP id f17mr38360382qkh.41.1428414835259; Tue, 07 Apr 2015 06:53:55 -0700 (PDT) Received: from [10.3.0.21] ([63.88.83.66]) by mx.google.com with ESMTPSA id d69sm5396872qhc.3.2015.04.07.06.53.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Apr 2015 06:53:54 -0700 (PDT) Message-ID: <1428414835.21255.0.camel@hardenedbsd.org> Subject: Re: svn commit: r281178 - head/sys/boot/forth From: Shawn Webb To: Devin Teske Date: Tue, 07 Apr 2015 09:53:55 -0400 In-Reply-To: References: <201504062316.t36NG4IG026340@svn.freebsd.org> <20150407013428.GB22994@FreeBSD.org> Organization: HardenedBSD Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-KJ2+lBbDQL7CdFAaGnoS" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Cc: svn-src-head@freebsd.org, Alexey Dokuchaev , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 13:53:57 -0000 --=-KJ2+lBbDQL7CdFAaGnoS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2015-04-06 at 18:42 -0700, Devin Teske wrote: > > On Apr 6, 2015, at 6:34 PM, Alexey Dokuchaev wrote: > >=20 > > On Mon, Apr 06, 2015 at 11:16:04PM +0000, Devin Teske wrote: > >> New Revision: 281178 > >> URL: https://svnweb.freebsd.org/changeset/base/281178 > >>=20 > >> Log: > >> Partially revert r280975: Back to previous mode-endings based on feed= back > >>=20 > >> Reported by: lattera > >=20 > > $ finger lattera@freebsd.org > > [freebsd.org] > > Trying 8.8.178.110... > > finger: lattera: no such user > >=20 > > ./danfe > >=20 >=20 > Yeah, realized the person was in #bsdcode (vs other) after commit. > =E2=80=94=20 > Devin lattera =3D Shawn Webb from HardenedBSD =3D me ;) Thanks, Shawn --=-KJ2+lBbDQL7CdFAaGnoS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCgAGBQJVI+FzAAoJEGqEZY9SRW7uTjQQAMOf3hf4SCVphiLmSYjAk641 8O8XQvjTlpqJv0/IpNhq7yJhvkqjkug6bqyn5bEr/hb2O1L0NqVaXg5SmWDEHeJg JIzn2xKFnmhX7tmVm2njCDdPcF15qIRJJbefflDt+HHFdxSqBrc15wY4evHnqIIk b/nFOPLTURh+Cv3McPrn/jtFm5AM8X4UqJEr8UjjXKBMqpkMuaurwqggOJwEjWJ1 CQ0vEvIFY/i2yqOiS8Ab0x8SerNkQakUDE/FRpCqPP2ztiHNFP4kqHBY0gw1tvl3 D7uq1m/cXaO7345UCFOwILthmNH7TtT3EiHq3XKw+zkWcCG6+lEHq9XUJ6DHQmHl D36s4CRfyZiRTvCWjcT3A0zl3Y6xGGWTVDQ8ELAr9RDKs5d8dLCXuycagYlL0lyf DcdfooxMAjRALhqIIzcR2rsJnyKPT78Qye7HbOCb5rSVDJ+GffhYLlzNR3vPOYk7 Hk6XbSnV0Xg9nohVNYsUWY8Wit32WsX1XivSfl4DYA8BG+4goBQ6ywjKFTdlz6JW VOH4ixxQTmX9yMvuhoBCORtXKIeVPMvQL3MVoWZwXOUYIh2p6Wp50CVkPatOC2Sc NlftLvaXyLlAzolmjS1fPIQCsVkEG68Oe53SwgfoAxBFmyWQbhR3cw2Ck9UjqW16 Mu4JsfR7qhbNR7sOJMQq =NYCM -----END PGP SIGNATURE----- --=-KJ2+lBbDQL7CdFAaGnoS-- From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 14:24:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1057B54 for ; Tue, 7 Apr 2015 14:24:32 +0000 (UTC) Received: from nm15.bullet.mail.bf1.yahoo.com (nm15.bullet.mail.bf1.yahoo.com [98.139.212.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 783D1AA2 for ; Tue, 7 Apr 2015 14:24:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1428416340; bh=+1+7gvxfmODc9UFlt3AtEkjxWrDkOShuRVwl8N68bdc=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=eoX99GUwPHMfMDJD9Z8NWttO6m7gtPxG7sf8156N07VMde4P0s4cXt5H/JJmOkKepgmCSc+8pVfoQyCn9Cpu+G4QNWavX28ues9K7ldDmw1Jhw3JnNF+HjRZ195+kLgnQLdzd405pZHLqmhFygw0QwZL0Ub1NJlDceNuMmNaO7IXfvLwZURV4hanZ/Z5/0GVcIUE1BgR+yCDFm1nLu1lP6fC77OIeAIC0zlPv1dkeYpXSBcDYU+/GsJZCad5Ap/bWcfC1wB9vDtwAo0UP9RohUTBP/YQVKMEwRlEcmtSpfe1iGnwA8hhCVQEcBI1n6u51TJxrcmBWn4eY83yJvhNgw== Received: from [66.196.81.170] by nm15.bullet.mail.bf1.yahoo.com with NNFMP; 07 Apr 2015 14:19:00 -0000 Received: from [98.139.213.15] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 07 Apr 2015 14:19:00 -0000 Received: from [127.0.0.1] by smtp115.mail.bf1.yahoo.com with NNFMP; 07 Apr 2015 14:19:00 -0000 X-Yahoo-Newman-Id: 501990.549.bm@smtp115.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: h2ow45oVM1nVNY7rciXob4yCiKTk_Qn2FF0SEakdnS3zF69 L1yX4C6yL0TxNRBhzAViBuKEb1llM6qvIH4tDTkHYIDgTs5t7YUnegjUIRLL v9mLahmrrUUgHFNngnKByTAPuP6LyfxUz7V3hmpvcy2VrGApdVk5_7QePmYX vDmPCjkJpKY3KPTXokQ9hNRXOgS5Mof5DWKxQdih77IBhlF1rThboaryBdOF D2Ak3DB9v6IpljxTLTJRsLHM.aY7sodHMh1JWmNmesNSWMh75p6yi2hVVHLi TglE88eoH56F7QSr2xty1n54ntudPPnGplfaWawHZD7JZw9u75C4L1OXkmRj mFH4cgQmXkrlvHQfTXpQYTZGujl3QULKOuNjeZJG1sILfTuG_6xYiKpWJxay lPEbcvKJvwiQyao7JCqzsFTgET_cgFaG1wIkFgBwEUGNWJY1LMHs3JMYOm61 2EFKTuv1SvgiYSbY1H7al5D4duG3vQmrgloJVRIYRKWzQ.PaKrH7hXmktLW8 5JwCBOuQyTxzfBKpTXYLG9U0k7TPOoavZ X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <5523E766.8010904@FreeBSD.org> Date: Tue, 07 Apr 2015 09:19:18 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Eitan Adler Subject: Re: svn commit: r281181 - head/usr.bin/sort References: <201504070117.t371HTlS083981@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 14:24:32 -0000 On 04/06/15 23:26, Eitan Adler wrote: > On 6 April 2015 at 21:17, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Tue Apr 7 01:17:29 2015 >> New Revision: 281181 >> URL: https://svnweb.freebsd.org/changeset/base/281181 >> >> Log: >> sort(1): Cleanups and a small memory leak. >> >> Remove useless check for leading blanks in the month name. The >> code didn't adjust len after stripping blanks so even if a month >> *did* start with a blank we'd end up copying garbage at the end. >> Also convert a malloc + memcpy to strdup and fix a memory leak in >> the wide char version if mbstowcs() fails. >> Originally from Andre Smagin. >> >> Obtained from: OpenBSD (CVS rev. 1.2, 1.3) >> MFC after: 1 week > Thanks for porting all these cleanups! > I am not over, but they have started doing many unnecessary changes that I have no interest in. I am also wondering if we should give up the GNU behavior our sort(1) adopted. Pedro. From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 14:33:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D32B7EC8; Tue, 7 Apr 2015 14:33:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEC37C3A; Tue, 7 Apr 2015 14:33:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37EX4JL062912; Tue, 7 Apr 2015 14:33:04 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37EX4Ll062911; Tue, 7 Apr 2015 14:33:04 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201504071433.t37EX4Ll062911@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 7 Apr 2015 14:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281202 - head/usr.bin/sockstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 14:33:04 -0000 Author: tuexen Date: Tue Apr 7 14:33:03 2015 New Revision: 281202 URL: https://svnweb.freebsd.org/changeset/base/281202 Log: The code says "or", not "either or". So fix the documentation. MFC after: 1 week Modified: head/usr.bin/sockstat/sockstat.1 Modified: head/usr.bin/sockstat/sockstat.1 ============================================================================== --- head/usr.bin/sockstat/sockstat.1 Tue Apr 7 13:17:28 2015 (r281201) +++ head/usr.bin/sockstat/sockstat.1 Tue Apr 7 14:33:03 2015 (r281202) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2012 +.Dd April 7, 2015 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -69,7 +69,7 @@ or do not contain the IPv6 loopback addr .It Fl l Show listening sockets. .It Fl p Ar ports -Only show Internet sockets if either the local or foreign port number +Only show Internet sockets if the local or foreign port number is on the specified list. The .Ar ports From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 14:47:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E7E456D; Tue, 7 Apr 2015 14:47:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50801DC5; Tue, 7 Apr 2015 14:47:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37ElShj068454; Tue, 7 Apr 2015 14:47:28 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37ElRIK068453; Tue, 7 Apr 2015 14:47:28 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504071447.t37ElRIK068453@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 7 Apr 2015 14:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281203 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 14:47:28 -0000 Author: pfg Date: Tue Apr 7 14:47:27 2015 New Revision: 281203 URL: https://svnweb.freebsd.org/changeset/base/281203 Log: Make use of allocation attributes in system headers. Start using 'alloc_size' attribute in the allocator functions. This is useful as it helps the compiler generate warnings on suspicious code and can also enable some small optimizations. This is based on r281130, which brought similar enhnacements to the standard libc headers. Modified: head/sys/sys/malloc.h Modified: head/sys/sys/malloc.h ============================================================================== --- head/sys/sys/malloc.h Tue Apr 7 14:33:03 2015 (r281202) +++ head/sys/sys/malloc.h Tue Apr 7 14:47:27 2015 (r281203) @@ -173,9 +173,11 @@ typedef void malloc_type_list_func_t(str void contigfree(void *addr, unsigned long size, struct malloc_type *type); void *contigmalloc(unsigned long size, struct malloc_type *type, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, - vm_paddr_t boundary) __malloc_like; + vm_paddr_t boundary) __malloc_like __result_use_check + __alloc_size(1); void free(void *addr, struct malloc_type *type); -void *malloc(unsigned long size, struct malloc_type *type, int flags) __malloc_like; +void *malloc(unsigned long size, struct malloc_type *type, int flags) + __malloc_like __result_use_check __alloc_size(1); void malloc_init(void *); int malloc_last_fail(void); void malloc_type_allocated(struct malloc_type *type, unsigned long size); @@ -183,9 +185,9 @@ void malloc_type_freed(struct malloc_typ void malloc_type_list(malloc_type_list_func_t *, void *); void malloc_uninit(void *); void *realloc(void *addr, unsigned long size, struct malloc_type *type, - int flags); + int flags) __result_use_check __alloc_size(2); void *reallocf(void *addr, unsigned long size, struct malloc_type *type, - int flags); + int flags) __alloc_size(2); struct malloc_type *malloc_desc2type(const char *desc); #endif /* _KERNEL */ From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 15:12:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8899DD8; Tue, 7 Apr 2015 15:12:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D430A198; Tue, 7 Apr 2015 15:12:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37FC4si081872; Tue, 7 Apr 2015 15:12:04 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37FC4Hc081868; Tue, 7 Apr 2015 15:12:04 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504071512.t37FC4Hc081868@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 7 Apr 2015 15:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281204 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 15:12:05 -0000 Author: andrew Date: Tue Apr 7 15:12:03 2015 New Revision: 281204 URL: https://svnweb.freebsd.org/changeset/base/281204 Log: Get the fdt uart driver working on arm64, there is no machine/fdt.h, and the default shift should be 2 for the SoCs we support. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/uart/uart_bus_fdt.c head/sys/dev/uart/uart_cpu_fdt.c Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Tue Apr 7 14:47:27 2015 (r281203) +++ head/sys/dev/uart/uart_bus_fdt.c Tue Apr 7 15:12:03 2015 (r281204) @@ -83,10 +83,16 @@ uart_fdt_get_clock(phandle_t node, pcell int uart_fdt_get_shift(phandle_t node, pcell_t *cell) { +#ifdef __aarch64__ +#define DEFAULT_SHIFT 2 +#else +#define DEFAULT_SHIFT 0 +#endif if ((OF_getencprop(node, "reg-shift", cell, sizeof(*cell))) <= 0) - *cell = 0; + *cell = DEFAULT_SHIFT; return (0); +#undef DEFAULT_SHIFT } static uintptr_t Modified: head/sys/dev/uart/uart_cpu_fdt.c ============================================================================== --- head/sys/dev/uart/uart_cpu_fdt.c Tue Apr 7 14:47:27 2015 (r281203) +++ head/sys/dev/uart/uart_cpu_fdt.c Tue Apr 7 15:12:03 2015 (r281204) @@ -42,7 +42,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef __aarch64__ #include +#endif #include #include @@ -52,6 +54,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef __aarch64__ +extern bus_space_tag_t fdtbus_bs_tag; +#endif + /* * UART console routines. */ From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 15:16:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1452BFD9; Tue, 7 Apr 2015 15:16:11 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail-n.franken.de", Issuer "Thawte DV SSL CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 97FD81F5; Tue, 7 Apr 2015 15:16:10 +0000 (UTC) Received: from [192.168.1.200] (p508F1706.dip0.t-ipconnect.de [80.143.23.6]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id A36EA1C1622D4; Tue, 7 Apr 2015 17:16:06 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281198 - in head/sys/netgraph/bluetooth: hci include l2cap socket From: Michael Tuexen In-Reply-To: Date: Tue, 7 Apr 2015 17:16:04 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201504071022.t37AMvts041485@svn.freebsd.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, Takanori Watanabe , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 15:16:11 -0000 > On 07 Apr 2015, at 13:36, Bjoern A. Zeeb wrote: >=20 >=20 >> On 07 Apr 2015, at 10:22 , Takanori Watanabe = wrote: >>=20 >> Author: takawata >> Date: Tue Apr 7 10:22:56 2015 >> New Revision: 281198 >> URL: https://svnweb.freebsd.org/changeset/base/281198 >>=20 >> Log: >> Initial Bluetooth LE support. >>=20 >> Note that sockaddr_l2cap structure is changed , check socket address >> to initialize new structure member and define L2CAP_SOCKET_CHECKED >> before including ng_btsocket.h >>=20 >> Differential Revision: https://reviews.freebsd.org/D2021 >> Reviewed by:emax >>=20 >=20 >=20 > I see a lot of: >=20 > = /scratch/tmp/bz/head.svn/lib/libbluetooth/../../sys/netgraph/bluetooth/inc= lude/ng_btsocket.h:246:2: error: #warning "Make sure new member of = socket address initialized" I also do see at least two instances of it breaking the compilation: --- all_subdir_libbluetooth --- --- bluetooth.So --- In file included from = /usr/home/tuexen/head/lib/libbluetooth/bluetooth.c:34: In file included from = /usr/home/tuexen/head/lib/libbluetooth/bluetooth.h:49: = /usr/home/tuexen/head/lib/libbluetooth/../../sys/netgraph/bluetooth/includ= e/ng_btsocket.h:246:2: error: "Make sure new member of socket address = initialized" [-Werror,-W#warnings] #warning "Make sure new member of socket address initialized" ^ 1 error generated. --- dev.So --- In file included from /usr/home/tuexen/head/lib/libbluetooth/dev.c:33: In file included from = /usr/home/tuexen/head/lib/libbluetooth/bluetooth.h:49: = /usr/home/tuexen/head/lib/libbluetooth/../../sys/netgraph/bluetooth/includ= e/ng_btsocket.h:246:2: error: "Make sure new member of socket address = initialized" [-Werror,-W#warnings] #warning "Make sure new member of socket address initialized" ^ 1 error generated. --- bluetooth.So --- *** [bluetooth.So] Error code 1 make[5]: stopped in /usr/home/tuexen/head/lib/libbluetooth Best regards Michael >=20 > when trying to build kernels. Is this expected? >=20 >=20 >> Modified: >> head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c >> head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c >> head/sys/netgraph/bluetooth/hci/ng_hci_main.c >> head/sys/netgraph/bluetooth/hci/ng_hci_misc.c >> head/sys/netgraph/bluetooth/hci/ng_hci_misc.h >> head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c >> head/sys/netgraph/bluetooth/hci/ng_hci_var.h >> head/sys/netgraph/bluetooth/include/ng_btsocket.h >> head/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h >> head/sys/netgraph/bluetooth/include/ng_hci.h >> head/sys/netgraph/bluetooth/include/ng_l2cap.h >> head/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c >> head/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h >> head/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c >> head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c >> head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h >> head/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c >> head/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.h >> head/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c >> head/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h >> head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c >> head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c >> head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c >=20 > =E2=80=94=20 > Bjoern A. Zeeb Charles Haddon = Spurgeon: > "Friendship is one of the sweetest joys of life. Many might have = failed > beneath the bitterness of their trial had they not found a friend." >=20 >=20 >=20 From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 15:32:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0064B878; Tue, 7 Apr 2015 15:32:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF9AF6E9; Tue, 7 Apr 2015 15:32:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37FWPwU091354; Tue, 7 Apr 2015 15:32:25 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37FWPGD091353; Tue, 7 Apr 2015 15:32:25 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201504071532.t37FWPGD091353@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Tue, 7 Apr 2015 15:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281206 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 15:32:26 -0000 Author: brueffer Date: Tue Apr 7 15:32:25 2015 New Revision: 281206 URL: https://svnweb.freebsd.org/changeset/base/281206 Log: Add a missing comma. Submitted by: danfe Modified: head/share/man/man4/amdtemp.4 Modified: head/share/man/man4/amdtemp.4 ============================================================================== --- head/share/man/man4/amdtemp.4 Tue Apr 7 15:24:37 2015 (r281205) +++ head/share/man/man4/amdtemp.4 Tue Apr 7 15:32:25 2015 (r281206) @@ -64,7 +64,7 @@ The driver also creates in the corresponding CPU device's sysctl tree, displaying the maximum temperature of the two sensors located in each CPU core. .Pp -For Family 10h, 11h, 12h, 14h, 15h and 16h processors, the driver reports each +For Family 10h, 11h, 12h, 14h, 15h, and 16h processors, the driver reports each package's temperature through a sysctl node, named .Va dev.amdtemp.%d.core0.sensor0 . The driver also creates From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 15:56:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 336FE128; Tue, 7 Apr 2015 15:56:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0420E9FA; Tue, 7 Apr 2015 15:56:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37Fu9uI001467; Tue, 7 Apr 2015 15:56:09 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37Fu9rk001464; Tue, 7 Apr 2015 15:56:09 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201504071556.t37Fu9rk001464@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 7 Apr 2015 15:56:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281209 - in head/usr.bin: jot lam rs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 15:56:10 -0000 Author: allanjude (doc committer) Date: Tue Apr 7 15:56:08 2015 New Revision: 281209 URL: https://svnweb.freebsd.org/changeset/base/281209 Log: Fix missing AUTHOR section for jot(1), rs(1), and lam(1) PR: 196786 Differential Revision: https://reviews.freebsd.org/D2115 Submitted by: John A. Kunze (Author) Approved by: wblock (mentor) MFC after: 1 week Sponsored by: ScaleEngine Inc. Modified: head/usr.bin/jot/jot.1 head/usr.bin/lam/lam.1 head/usr.bin/rs/rs.1 Modified: head/usr.bin/jot/jot.1 ============================================================================== --- head/usr.bin/jot/jot.1 Tue Apr 7 15:34:34 2015 (r281208) +++ head/usr.bin/jot/jot.1 Tue Apr 7 15:56:08 2015 (r281209) @@ -28,7 +28,7 @@ .\" @(#)jot.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 2, 2010 +.Dd April 7, 2015 .Dt JOT 1 .Os .Sh NAME @@ -324,3 +324,5 @@ The .Nm utility first appeared in .Bx 4.2 . +.Sh AUTHORS +.An John A. Kunze Modified: head/usr.bin/lam/lam.1 ============================================================================== --- head/usr.bin/lam/lam.1 Tue Apr 7 15:34:34 2015 (r281208) +++ head/usr.bin/lam/lam.1 Tue Apr 7 15:56:08 2015 (r281209) @@ -28,7 +28,7 @@ .\" @(#)lam.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd August 12, 2004 +.Dd April 7, 2015 .Dt LAM 1 .Os .Sh NAME @@ -136,6 +136,8 @@ The .Nm utility first appeared in .Bx 4.2 . +.Sh AUTHORS +.An John A. Kunze .Sh BUGS The .Nm Modified: head/usr.bin/rs/rs.1 ============================================================================== --- head/usr.bin/rs/rs.1 Tue Apr 7 15:34:34 2015 (r281208) +++ head/usr.bin/rs/rs.1 Tue Apr 7 15:56:08 2015 (r281209) @@ -28,7 +28,7 @@ .\" @(#)rs.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd February 25, 2011 +.Dd April 7, 2015 .Dt RS 1 .Os .Sh NAME @@ -222,6 +222,8 @@ The .Nm utility first appeared in .Bx 4.2 . +.Sh AUTHORS +.An John A. Kunze .Sh BUGS .Bl -item .It From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 16:42:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A01FF50; Tue, 7 Apr 2015 16:42:29 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F087A; Tue, 7 Apr 2015 16:42:27 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t37GgOLX099385 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 7 Apr 2015 19:42:24 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t37GgOml099384; Tue, 7 Apr 2015 19:42:24 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 7 Apr 2015 19:42:24 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r281024 - head/share/man/man4 Message-ID: <20150407164223.GI64665@FreeBSD.org> References: <201504031400.t33E094r076234@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504031400.t33E094r076234@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 16:42:29 -0000 Hans, 4 days ago I asked you to back this out, and my request was ignored. Can you please back this out now? Yes, it is an interesting stuff, but doesn't belong to the documentation. If you strongly disagree with me, I'd suggest to advocate Mike Silbersack, who is author of the code. If he agrees that additional information on covert channels is important, the text can be put back. On Fri, Apr 03, 2015 at 02:00:09PM +0000, Hans Petter Selasky wrote: H> Author: hselasky H> Date: Fri Apr 3 14:00:08 2015 H> New Revision: 281024 H> URL: https://svnweb.freebsd.org/changeset/base/281024 H> H> Log: H> Add more documentation about the "net.inet.ip.random_id" sysctl knob H> and how it can affect information flow between observers. H> H> MFC after: 1 week H> H> Modified: H> head/share/man/man4/inet.4 H> H> Modified: head/share/man/man4/inet.4 H> ============================================================================== H> --- head/share/man/man4/inet.4 Fri Apr 3 13:57:14 2015 (r281023) H> +++ head/share/man/man4/inet.4 Fri Apr 3 14:00:08 2015 (r281024) H> @@ -28,7 +28,7 @@ H> .\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93 H> .\" $FreeBSD$ H> .\" H> -.Dd April 2, 2015 H> +.Dd April 3, 2015 H> .Dt INET 4 H> .Os H> .Sh NAME H> @@ -244,10 +244,22 @@ IP datagrams (or all IP datagrams, if H> .Va ip.rfc6864 H> is disabled) to be randomized instead of incremented by 1 with each packet H> generated. H> -This closes a minor information leak which allows remote observers to H> +This prevents information exchange between any combination of two or H> +more inside and/or outside observers using packet frequency H> +modulation, PFM. H> +An outside observer can ping the outside facing port at a fixed rate H> +sampling the returned counter. H> +An inside observer can ping the inside facing port sampling the same H> +counter. H> +Even though packets don't flow directly between any of the observers H> +any single observer can influence the data rate the other observer(s) H> +is or are sampling. H> +This is done by sending more or less ping packets towards the gateway H> +per measured interval. H> +Setting this sysctl also prevents the remote and internal observers to H> determine the rate of packet generation on the machine by watching the H> counter. H> -In the same time, on high-speed links, it can decrease the ID reuse H> +At the same time, on high-speed links, it can decrease the ID reuse H> cycle greatly. H> Default is 0 (sequential IP IDs). H> IPv6 flow IDs and fragment IDs are always random. H> -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 16:48:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38A5818B; Tue, 7 Apr 2015 16:48:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F46E9C; Tue, 7 Apr 2015 16:48:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37GmoF3026050; Tue, 7 Apr 2015 16:48:50 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37GmO2B025925; Tue, 7 Apr 2015 16:48:24 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <201504071648.t37GmO2B025925@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Tue, 7 Apr 2015 16:48:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281210 - in head: lib/libbluetooth lib/libsdp usr.bin/bluetooth/bthost usr.bin/bluetooth/btsockstat usr.bin/bluetooth/rfcomm_sppd usr.sbin/bluetooth/bthidcontrol usr.sbin/bluetooth/bth... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 16:48:51 -0000 Author: takawata Date: Tue Apr 7 16:48:23 2015 New Revision: 281210 URL: https://svnweb.freebsd.org/changeset/base/281210 Log: Check l2cap socket initialisation and define L2CAP_SOCKET_CHECKED This will fix build. Modified: head/lib/libbluetooth/bluetooth.c head/lib/libbluetooth/dev.c head/lib/libbluetooth/hci.c head/lib/libsdp/search.c head/lib/libsdp/service.c head/lib/libsdp/session.c head/lib/libsdp/util.c head/usr.bin/bluetooth/bthost/bthost.c head/usr.bin/bluetooth/btsockstat/btsockstat.c head/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sdp.c head/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c head/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c head/usr.sbin/bluetooth/bthidcontrol/hid.c head/usr.sbin/bluetooth/bthidcontrol/sdp.c head/usr.sbin/bluetooth/bthidd/bthidd.c head/usr.sbin/bluetooth/bthidd/client.c head/usr.sbin/bluetooth/bthidd/hid.c head/usr.sbin/bluetooth/bthidd/kbd.c head/usr.sbin/bluetooth/bthidd/lexer.l head/usr.sbin/bluetooth/bthidd/parser.y head/usr.sbin/bluetooth/bthidd/server.c head/usr.sbin/bluetooth/bthidd/session.c head/usr.sbin/bluetooth/btpand/bnep.c head/usr.sbin/bluetooth/btpand/btpand.c head/usr.sbin/bluetooth/btpand/channel.c head/usr.sbin/bluetooth/btpand/client.c head/usr.sbin/bluetooth/btpand/event.c head/usr.sbin/bluetooth/btpand/packet.c head/usr.sbin/bluetooth/btpand/sdp.c head/usr.sbin/bluetooth/btpand/server.c head/usr.sbin/bluetooth/btpand/tap.c head/usr.sbin/bluetooth/hccontrol/hccontrol.c head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c head/usr.sbin/bluetooth/hccontrol/info.c head/usr.sbin/bluetooth/hccontrol/link_control.c head/usr.sbin/bluetooth/hccontrol/link_policy.c head/usr.sbin/bluetooth/hccontrol/node.c head/usr.sbin/bluetooth/hccontrol/util.c head/usr.sbin/bluetooth/hcsecd/hcsecd.c head/usr.sbin/bluetooth/hcsecd/parser.y head/usr.sbin/bluetooth/l2control/l2cap.c head/usr.sbin/bluetooth/l2control/l2control.c head/usr.sbin/bluetooth/l2ping/l2ping.c head/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c head/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.c head/usr.sbin/bluetooth/sdpcontrol/search.c head/usr.sbin/bluetooth/sdpd/bgd.c head/usr.sbin/bluetooth/sdpd/dun.c head/usr.sbin/bluetooth/sdpd/ftrn.c head/usr.sbin/bluetooth/sdpd/gn.c head/usr.sbin/bluetooth/sdpd/irmc.c head/usr.sbin/bluetooth/sdpd/irmc_command.c head/usr.sbin/bluetooth/sdpd/lan.c head/usr.sbin/bluetooth/sdpd/main.c head/usr.sbin/bluetooth/sdpd/nap.c head/usr.sbin/bluetooth/sdpd/opush.c head/usr.sbin/bluetooth/sdpd/panu.c head/usr.sbin/bluetooth/sdpd/profile.c head/usr.sbin/bluetooth/sdpd/provider.c head/usr.sbin/bluetooth/sdpd/sar.c head/usr.sbin/bluetooth/sdpd/scr.c head/usr.sbin/bluetooth/sdpd/sd.c head/usr.sbin/bluetooth/sdpd/server.c head/usr.sbin/bluetooth/sdpd/sp.c head/usr.sbin/bluetooth/sdpd/srr.c head/usr.sbin/bluetooth/sdpd/ssar.c head/usr.sbin/bluetooth/sdpd/ssr.c head/usr.sbin/bluetooth/sdpd/sur.c head/usr.sbin/bluetooth/sdpd/uuid.c Modified: head/lib/libbluetooth/bluetooth.c ============================================================================== --- head/lib/libbluetooth/bluetooth.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/lib/libbluetooth/bluetooth.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,7 +30,7 @@ * $Id: bluetooth.c,v 1.3 2003/05/20 23:04:30 max Exp $ * $FreeBSD$ */ - +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/lib/libbluetooth/dev.c ============================================================================== --- head/lib/libbluetooth/dev.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/lib/libbluetooth/dev.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ * $FreeBSD$ */ +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/lib/libbluetooth/hci.c ============================================================================== --- head/lib/libbluetooth/hci.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/lib/libbluetooth/hci.c Tue Apr 7 16:48:23 2015 (r281210) @@ -31,6 +31,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/lib/libsdp/search.c ============================================================================== --- head/lib/libsdp/search.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/lib/libsdp/search.c Tue Apr 7 16:48:23 2015 (r281210) @@ -32,6 +32,7 @@ #include #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/lib/libsdp/service.c ============================================================================== --- head/lib/libsdp/service.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/lib/libsdp/service.c Tue Apr 7 16:48:23 2015 (r281210) @@ -32,6 +32,7 @@ #include #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/lib/libsdp/session.c ============================================================================== --- head/lib/libsdp/session.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/lib/libsdp/session.c Tue Apr 7 16:48:23 2015 (r281210) @@ -28,7 +28,7 @@ * $Id: session.c,v 1.2 2003/09/04 22:12:13 max Exp $ * $FreeBSD$ */ - +#define L2CAP_SOCKET_CHECKED #include #include #include @@ -62,6 +62,9 @@ sdp_open(bdaddr_t const *l, bdaddr_t con sa.l2cap_len = sizeof(sa); sa.l2cap_family = AF_BLUETOOTH; sa.l2cap_psm = 0; + sa.l2cap_cid = 0; + sa.l2cap_bdaddr_type = BDADDR_BREDR; + memcpy(&sa.l2cap_bdaddr, l, sizeof(sa.l2cap_bdaddr)); if (bind(ss->s, (struct sockaddr *) &sa, sizeof(sa)) < 0) { ss->error = errno; Modified: head/lib/libsdp/util.c ============================================================================== --- head/lib/libsdp/util.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/lib/libsdp/util.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.bin/bluetooth/bthost/bthost.c ============================================================================== --- head/usr.bin/bluetooth/bthost/bthost.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.bin/bluetooth/bthost/bthost.c Tue Apr 7 16:48:23 2015 (r281210) @@ -29,6 +29,7 @@ * $FreeBSD$ */ +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.bin/bluetooth/btsockstat/btsockstat.c ============================================================================== --- head/usr.bin/bluetooth/btsockstat/btsockstat.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.bin/bluetooth/btsockstat/btsockstat.c Tue Apr 7 16:48:23 2015 (r281210) @@ -39,6 +39,7 @@ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sdp.c ============================================================================== --- head/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sdp.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sdp.c Tue Apr 7 16:48:23 2015 (r281210) @@ -28,7 +28,7 @@ * $Id: rfcomm_sdp.c,v 1.1 2003/09/07 18:15:55 max Exp $ * $FreeBSD$ */ - +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c ============================================================================== --- head/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c Tue Apr 7 16:48:23 2015 (r281210) @@ -33,6 +33,7 @@ #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c ============================================================================== --- head/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c Tue Apr 7 16:48:23 2015 (r281210) @@ -31,6 +31,7 @@ #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/bthidcontrol/hid.c ============================================================================== --- head/usr.sbin/bluetooth/bthidcontrol/hid.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/bthidcontrol/hid.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/bthidcontrol/sdp.c ============================================================================== --- head/usr.sbin/bluetooth/bthidcontrol/sdp.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/bthidcontrol/sdp.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/bthidd/bthidd.c ============================================================================== --- head/usr.sbin/bluetooth/bthidd/bthidd.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/bthidd/bthidd.c Tue Apr 7 16:48:23 2015 (r281210) @@ -34,6 +34,7 @@ #include #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/bthidd/client.c ============================================================================== --- head/usr.sbin/bluetooth/bthidd/client.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/bthidd/client.c Tue Apr 7 16:48:23 2015 (r281210) @@ -33,6 +33,7 @@ #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include @@ -236,7 +237,9 @@ client_socket(bdaddr_p bdaddr, uint16_t l2addr.l2cap_family = AF_BLUETOOTH; memset(&l2addr.l2cap_bdaddr, 0, sizeof(l2addr.l2cap_bdaddr)); l2addr.l2cap_psm = 0; - + l2addr.l2cap_bdaddr_type = BDADDR_BREDR; + l2addr.l2cap_cid = 0; + if (bind(s, (struct sockaddr *) &l2addr, sizeof(l2addr)) < 0) { close(s); return (-1); Modified: head/usr.sbin/bluetooth/bthidd/hid.c ============================================================================== --- head/usr.sbin/bluetooth/bthidd/hid.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/bthidd/hid.c Tue Apr 7 16:48:23 2015 (r281210) @@ -35,6 +35,7 @@ #include #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/bthidd/kbd.c ============================================================================== --- head/usr.sbin/bluetooth/bthidd/kbd.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/bthidd/kbd.c Tue Apr 7 16:48:23 2015 (r281210) @@ -37,6 +37,7 @@ #include #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/bthidd/lexer.l ============================================================================== --- head/usr.sbin/bluetooth/bthidd/lexer.l Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/bthidd/lexer.l Tue Apr 7 16:48:23 2015 (r281210) @@ -31,7 +31,7 @@ * $Id: lexer.l,v 1.3 2006/09/07 21:06:53 max Exp $ * $FreeBSD$ */ - +#define L2CAP_SOCKET_CHECKED #include #include #include "parser.h" Modified: head/usr.sbin/bluetooth/bthidd/parser.y ============================================================================== --- head/usr.sbin/bluetooth/bthidd/parser.y Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/bthidd/parser.y Tue Apr 7 16:48:23 2015 (r281210) @@ -33,6 +33,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/bthidd/server.c ============================================================================== --- head/usr.sbin/bluetooth/bthidd/server.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/bthidd/server.c Tue Apr 7 16:48:23 2015 (r281210) @@ -33,6 +33,7 @@ #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include @@ -90,7 +91,9 @@ server_init(bthid_server_p srv) l2addr.l2cap_family = AF_BLUETOOTH; memcpy(&l2addr.l2cap_bdaddr, &srv->bdaddr, sizeof(l2addr.l2cap_bdaddr)); l2addr.l2cap_psm = htole16(0x11); - + l2addr.l2cap_bdaddr_type = BDADDR_BREDR; + l2addr.l2cap_cid = 0; + if (bind(srv->ctrl, (struct sockaddr *) &l2addr, sizeof(l2addr)) < 0) { syslog(LOG_ERR, "Could not bind control L2CAP socket. " \ "%s (%d)", strerror(errno), errno); Modified: head/usr.sbin/bluetooth/bthidd/session.c ============================================================================== --- head/usr.sbin/bluetooth/bthidd/session.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/bthidd/session.c Tue Apr 7 16:48:23 2015 (r281210) @@ -33,6 +33,7 @@ #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/btpand/bnep.c ============================================================================== --- head/usr.sbin/bluetooth/btpand/bnep.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/btpand/bnep.c Tue Apr 7 16:48:23 2015 (r281210) @@ -31,6 +31,7 @@ __RCSID("$NetBSD: bnep.c,v 1.1 2008/08/17 13:20:57 plunky Exp $"); #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/btpand/btpand.c ============================================================================== --- head/usr.sbin/bluetooth/btpand/btpand.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/btpand/btpand.c Tue Apr 7 16:48:23 2015 (r281210) @@ -33,6 +33,7 @@ __RCSID("$NetBSD: btpand.c,v 1.1 2008/08 #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/btpand/channel.c ============================================================================== --- head/usr.sbin/bluetooth/btpand/channel.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/btpand/channel.c Tue Apr 7 16:48:23 2015 (r281210) @@ -35,7 +35,7 @@ __RCSID("$NetBSD: channel.c,v 1.1 2008/0 #include #include - +#define L2CAP_SOCKET_CHECKED #include "btpand.h" static struct chlist channel_list; Modified: head/usr.sbin/bluetooth/btpand/client.c ============================================================================== --- head/usr.sbin/bluetooth/btpand/client.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/btpand/client.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ #include __RCSID("$NetBSD: client.c,v 1.2 2008/12/06 20:01:14 plunky Exp $"); +#define L2CAP_SOCKET_CHECKED #include #include #include @@ -65,6 +66,9 @@ client_init(void) memset(&sa, 0, sizeof(sa)); sa.l2cap_family = AF_BLUETOOTH; sa.l2cap_len = sizeof(sa); + sa.l2cap_bdaddr_type = BDADDR_BREDR; + sa.l2cap_cid = 0; + bdaddr_copy(&sa.l2cap_bdaddr, &local_bdaddr); if (bind(fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) { log_err("Could not bind client socket: %m"); Modified: head/usr.sbin/bluetooth/btpand/event.c ============================================================================== --- head/usr.sbin/bluetooth/btpand/event.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/btpand/event.c Tue Apr 7 16:48:23 2015 (r281210) @@ -45,6 +45,7 @@ #include #include "event.h" +#define L2CAP_SOCKET_CHECKED #include "btpand.h" #define __event_link(ev) \ Modified: head/usr.sbin/bluetooth/btpand/packet.c ============================================================================== --- head/usr.sbin/bluetooth/btpand/packet.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/btpand/packet.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ #include __RCSID("$NetBSD: packet.c,v 1.1 2008/08/17 13:20:57 plunky Exp $"); +#define L2CAP_SOCKET_CHECKED #include "btpand.h" packet_t * Modified: head/usr.sbin/bluetooth/btpand/sdp.c ============================================================================== --- head/usr.sbin/bluetooth/btpand/sdp.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/btpand/sdp.c Tue Apr 7 16:48:23 2015 (r281210) @@ -32,6 +32,7 @@ __RCSID("$NetBSD: sdp.c,v 1.2 2008/12/06 #include +#define L2CAP_SOCKET_CHECKED #include "sdp.h" /* Modified: head/usr.sbin/bluetooth/btpand/server.c ============================================================================== --- head/usr.sbin/bluetooth/btpand/server.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/btpand/server.c Tue Apr 7 16:48:23 2015 (r281210) @@ -32,6 +32,7 @@ __RCSID("$NetBSD: server.c,v 1.2 2009/01 #include +#define L2CAP_SOCKET_CHECKED #include #include #include @@ -103,6 +104,9 @@ server_open(void) sa.l2cap_family = AF_BLUETOOTH; sa.l2cap_len = sizeof(sa); sa.l2cap_psm = htole16(l2cap_psm); + sa.l2cap_bdaddr_type = BDADDR_BREDR; + sa.l2cap_cid = 0; + bdaddr_copy(&sa.l2cap_bdaddr, &local_bdaddr); if (bind(server_fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) { log_err("Could not bind server socket: %m"); Modified: head/usr.sbin/bluetooth/btpand/tap.c ============================================================================== --- head/usr.sbin/bluetooth/btpand/tap.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/btpand/tap.c Tue Apr 7 16:48:23 2015 (r281210) @@ -43,6 +43,7 @@ __RCSID("$NetBSD: tap.c,v 1.1 2008/08/17 #include #include +#define L2CAP_SOCKET_CHECKED #include "btpand.h" static bool tap_send(channel_t *, packet_t *); Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/hccontrol.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/hccontrol/hccontrol.c Tue Apr 7 16:48:23 2015 (r281210) @@ -29,6 +29,7 @@ * $FreeBSD$ */ +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c Tue Apr 7 16:48:23 2015 (r281210) @@ -29,6 +29,7 @@ * $FreeBSD$ */ +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/hccontrol/info.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/info.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/hccontrol/info.c Tue Apr 7 16:48:23 2015 (r281210) @@ -29,6 +29,7 @@ * $FreeBSD$ */ +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/hccontrol/link_control.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/link_control.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/hccontrol/link_control.c Tue Apr 7 16:48:23 2015 (r281210) @@ -29,6 +29,7 @@ * $FreeBSD$ */ +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/hccontrol/link_policy.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/link_policy.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/hccontrol/link_policy.c Tue Apr 7 16:48:23 2015 (r281210) @@ -29,6 +29,7 @@ * $FreeBSD$ */ +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/hccontrol/node.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/node.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/hccontrol/node.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/hccontrol/util.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/util.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/hccontrol/util.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/hcsecd/hcsecd.c ============================================================================== --- head/usr.sbin/bluetooth/hcsecd/hcsecd.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/hcsecd/hcsecd.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/hcsecd/parser.y ============================================================================== --- head/usr.sbin/bluetooth/hcsecd/parser.y Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/hcsecd/parser.y Tue Apr 7 16:48:23 2015 (r281210) @@ -32,6 +32,7 @@ #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/l2control/l2cap.c ============================================================================== --- head/usr.sbin/bluetooth/l2control/l2cap.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/l2control/l2cap.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/l2control/l2control.c ============================================================================== --- head/usr.sbin/bluetooth/l2control/l2control.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/l2control/l2control.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/l2ping/l2ping.c ============================================================================== --- head/usr.sbin/bluetooth/l2ping/l2ping.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/l2ping/l2ping.c Tue Apr 7 16:48:23 2015 (r281210) @@ -34,6 +34,7 @@ #include #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c ============================================================================== --- head/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,7 +30,7 @@ * $Id: rfcomm_pppd.c,v 1.5 2003/09/07 18:32:11 max Exp $ * $FreeBSD$ */ - +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.c ============================================================================== --- head/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpcontrol/search.c ============================================================================== --- head/usr.sbin/bluetooth/sdpcontrol/search.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpcontrol/search.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/bgd.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/bgd.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/bgd.c Tue Apr 7 16:48:23 2015 (r281210) @@ -28,7 +28,7 @@ * $Id: bgd.c,v 1.4 2004/01/13 01:54:39 max Exp $ * $FreeBSD$ */ - +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/dun.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/dun.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/dun.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/ftrn.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/ftrn.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/ftrn.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/gn.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/gn.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/gn.c Tue Apr 7 16:48:23 2015 (r281210) @@ -32,6 +32,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/irmc.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/irmc.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/irmc.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/irmc_command.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/irmc_command.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/irmc_command.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/lan.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/lan.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/lan.c Tue Apr 7 16:48:23 2015 (r281210) @@ -31,6 +31,7 @@ #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/main.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/main.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/main.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/nap.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/nap.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/nap.c Tue Apr 7 16:48:23 2015 (r281210) @@ -32,6 +32,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/opush.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/opush.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/opush.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/panu.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/panu.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/panu.c Tue Apr 7 16:48:23 2015 (r281210) @@ -32,6 +32,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/profile.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/profile.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/profile.c Tue Apr 7 16:48:23 2015 (r281210) @@ -32,6 +32,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/provider.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/provider.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/provider.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/sar.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/sar.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/sar.c Tue Apr 7 16:48:23 2015 (r281210) @@ -34,6 +34,7 @@ #include #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/scr.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/scr.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/scr.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/sd.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/sd.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/sd.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/server.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/server.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/server.c Tue Apr 7 16:48:23 2015 (r281210) @@ -38,6 +38,7 @@ #include #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/sp.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/sp.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/sp.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/srr.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/srr.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/srr.c Tue Apr 7 16:48:23 2015 (r281210) @@ -34,6 +34,7 @@ #include #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/ssar.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/ssar.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/ssar.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/ssr.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/ssr.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/ssr.c Tue Apr 7 16:48:23 2015 (r281210) @@ -34,6 +34,7 @@ #include #include #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/sur.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/sur.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/sur.c Tue Apr 7 16:48:23 2015 (r281210) @@ -30,6 +30,7 @@ */ #include +#define L2CAP_SOCKET_CHECKED #include #include #include Modified: head/usr.sbin/bluetooth/sdpd/uuid.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/uuid.c Tue Apr 7 15:56:08 2015 (r281209) +++ head/usr.sbin/bluetooth/sdpd/uuid.c Tue Apr 7 16:48:23 2015 (r281210) @@ -28,7 +28,7 @@ * $Id: uuid.c,v 1.1 2004/12/09 18:20:26 max Exp $ * $FreeBSD$ */ - +#define L2CAP_SOCKET_CHECKED #include #include #include From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 18:06:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D3B5FD; Tue, 7 Apr 2015 18:06:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 586D2C44; Tue, 7 Apr 2015 18:06:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37I6lxb065013; Tue, 7 Apr 2015 18:06:47 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37I6lxo065011; Tue, 7 Apr 2015 18:06:47 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504071806.t37I6lxo065011@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 7 Apr 2015 18:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281216 - head/usr.bin/patch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 18:06:47 -0000 Author: pfg Date: Tue Apr 7 18:06:46 2015 New Revision: 281216 URL: https://svnweb.freebsd.org/changeset/base/281216 Log: patch: Bring small updates from OpenBSD Prevent null pointer dereference on empty input files when diff requires a specific version. Fix division by zero for files with long lines (> 1024) in Plan B mode by supporting arbitrarily long lines. Obtained from: OpenBSD (CVS Rev 1.41, 1.42) MFC after: 1 week Modified: head/usr.bin/patch/inp.c Modified: head/usr.bin/patch/inp.c ============================================================================== --- head/usr.bin/patch/inp.c Tue Apr 7 18:04:18 2015 (r281215) +++ head/usr.bin/patch/inp.c Tue Apr 7 18:06:46 2015 (r281216) @@ -57,8 +57,9 @@ static char empty_line[] = { '\0' }; static int tifd = -1; /* plan b virtual string array */ static char *tibuf[2]; /* plan b buffers */ static LINENUM tiline[2] = {-1, -1}; /* 1st line in each buffer */ -static LINENUM lines_per_buf; /* how many lines per buffer */ -static int tireclen; /* length of records in tmp file */ +static size_t lines_per_buf; /* how many lines per buffer */ +static size_t tibuflen; /* plan b buffer length */ +static size_t tireclen; /* length of records in tmp file */ static bool rev_in_string(const char *); static bool reallocate_lines(size_t *); @@ -319,7 +320,7 @@ plan_a(const char *filename) /* now check for revision, if any */ if (revision != NULL) { - if (!rev_in_string(i_womp)) { + if (i_womp == NULL || !rev_in_string(i_womp)) { if (force) { if (verbose) say("Warning: this file doesn't appear " @@ -349,8 +350,8 @@ static void plan_b(const char *filename) { FILE *ifp; - size_t i = 0, j, maxlen = 1; - char *p; + size_t i = 0, j, len, maxlen = 1; + char *lbuf = NULL, *p; bool found_revision = (revision == NULL); using_plan_a = false; @@ -359,15 +360,28 @@ plan_b(const char *filename) unlink(TMPINNAME); if ((tifd = open(TMPINNAME, O_EXCL | O_CREAT | O_WRONLY, 0666)) < 0) pfatal("can't open file %s", TMPINNAME); - while (fgets(buf, buf_size, ifp) != NULL) { - if (revision != NULL && !found_revision && rev_in_string(buf)) + while ((p = fgetln(ifp, &len)) != NULL) { + if (p[len - 1] == '\n') + p[len - 1] = '\0'; + else { + /* EOF without EOL, copy and add the NUL */ + if ((lbuf = malloc(len + 1)) == NULL) + fatal("out of memory\n"); + memcpy(lbuf, p, len); + lbuf[len] = '\0'; + p = lbuf; + + last_line_missing_eol = true; + len++; + } + if (revision != NULL && !found_revision && rev_in_string(p)) found_revision = true; - if ((i = strlen(buf)) > maxlen) - maxlen = i; /* find longest line */ + if (len > maxlen) + maxlen = len; /* find longest line */ } - last_line_missing_eol = i > 0 && buf[i - 1] != '\n'; - if (last_line_missing_eol && maxlen == i) - maxlen++; + free(lbuf); + if (ferror(ifp)) + pfatal("can't read file %s", filename); if (revision != NULL) { if (!found_revision) { @@ -392,23 +406,26 @@ plan_b(const char *filename) revision); } fseek(ifp, 0L, SEEK_SET); /* rewind file */ - lines_per_buf = BUFFERSIZE / maxlen; tireclen = maxlen; - tibuf[0] = malloc(BUFFERSIZE + 1); + tibuflen = maxlen > BUFFERSIZE ? maxlen : BUFFERSIZE; + lines_per_buf = tibuflen / maxlen; + tibuf[0] = malloc(tibuflen + 1); if (tibuf[0] == NULL) fatal("out of memory\n"); - tibuf[1] = malloc(BUFFERSIZE + 1); + tibuf[1] = malloc(tibuflen + 1); if (tibuf[1] == NULL) fatal("out of memory\n"); for (i = 1;; i++) { p = tibuf[0] + maxlen * (i % lines_per_buf); if (i % lines_per_buf == 0) /* new block */ - if (write(tifd, tibuf[0], BUFFERSIZE) < BUFFERSIZE) + if (write(tifd, tibuf[0], tibuflen) != + (ssize_t) tibuflen) pfatal("can't write temp file"); if (fgets(p, maxlen + 1, ifp) == NULL) { input_lines = i - 1; if (i % lines_per_buf != 0) - if (write(tifd, tibuf[0], BUFFERSIZE) < BUFFERSIZE) + if (write(tifd, tibuf[0], tibuflen) != + (ssize_t) tibuflen) pfatal("can't write temp file"); break; } @@ -450,10 +467,11 @@ ifetch(LINENUM line, int whichbuf) tiline[whichbuf] = baseline; if (lseek(tifd, (off_t) (baseline / lines_per_buf * - BUFFERSIZE), SEEK_SET) < 0) + tibuflen), SEEK_SET) < 0) pfatal("cannot seek in the temporary input file"); - if (read(tifd, tibuf[whichbuf], BUFFERSIZE) < 0) + if (read(tifd, tibuf[whichbuf], tibuflen) != + (ssize_t) tibuflen) pfatal("error reading tmp file %s", TMPINNAME); } return tibuf[whichbuf] + (tireclen * offline); From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 18:40:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B971CA6; Tue, 7 Apr 2015 18:40:28 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39811F85; Tue, 7 Apr 2015 18:40:27 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 8D38B1FE022; Tue, 7 Apr 2015 20:40:24 +0200 (CEST) Message-ID: <552424C6.3040005@selasky.org> Date: Tue, 07 Apr 2015 20:41:10 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r281024 - head/share/man/man4 References: <201504031400.t33E094r076234@svn.freebsd.org> <20150407164223.GI64665@FreeBSD.org> In-Reply-To: <20150407164223.GI64665@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 18:40:28 -0000 On 04/07/15 18:42, Gleb Smirnoff wrote: > Hans, > > 4 days ago I asked you to back this out, and my request was > ignored. Can you please back this out now? > > Yes, it is an interesting stuff, but doesn't belong to the > documentation. If you strongly disagree with me, I'd suggest > to advocate Mike Silbersack, who is author of the code. If he > agrees that additional information on covert channels is > important, the text can be put back. > Hi Gleb, I was busy with other stuff. Sorry for not responding. Yes, I agree that the text does not have to be that lengthy. I'll cut it down. --HPS From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 18:52:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3138C159; Tue, 7 Apr 2015 18:52:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0294319C; Tue, 7 Apr 2015 18:52:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37Iq0jf088610; Tue, 7 Apr 2015 18:52:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37Iq0Ek088609; Tue, 7 Apr 2015 18:52:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201504071852.t37Iq0Ek088609@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 7 Apr 2015 18:52:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281220 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 18:52:01 -0000 Author: hselasky Date: Tue Apr 7 18:52:00 2015 New Revision: 281220 URL: https://svnweb.freebsd.org/changeset/base/281220 Log: Just briefly mention about the dangers of non-random IP IDs. A full in depth explanation belongs somewhere else. Suggested by: gleb @ MFC after: 1 week Modified: head/share/man/man4/inet.4 Modified: head/share/man/man4/inet.4 ============================================================================== --- head/share/man/man4/inet.4 Tue Apr 7 18:14:01 2015 (r281219) +++ head/share/man/man4/inet.4 Tue Apr 7 18:52:00 2015 (r281220) @@ -28,7 +28,7 @@ .\" From: @(#)inet.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd April 3, 2015 +.Dd April 7, 2015 .Dt INET 4 .Os .Sh NAME @@ -244,21 +244,9 @@ IP datagrams (or all IP datagrams, if .Va ip.rfc6864 is disabled) to be randomized instead of incremented by 1 with each packet generated. -This prevents information exchange between any combination of two or -more inside and/or outside observers using packet frequency -modulation, PFM. -An outside observer can ping the outside facing port at a fixed rate -sampling the returned counter. -An inside observer can ping the inside facing port sampling the same -counter. -Even though packets don't flow directly between any of the observers -any single observer can influence the data rate the other observer(s) -is or are sampling. -This is done by sending more or less ping packets towards the gateway -per measured interval. -Setting this sysctl also prevents the remote and internal observers to -determine the rate of packet generation on the machine by watching the -counter. +This prevents IP IDs being abused as a covert channel and also closes +a minor information leak which allows remote observers to determine +the rate of packet generation on the machine by watching the counter. At the same time, on high-speed links, it can decrease the ID reuse cycle greatly. Default is 0 (sequential IP IDs). From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 18:56:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AF033E3; Tue, 7 Apr 2015 18:56:37 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BCD71C8; Tue, 7 Apr 2015 18:56:36 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t37IuYCg000239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 7 Apr 2015 21:56:34 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t37IuYuK000238; Tue, 7 Apr 2015 21:56:34 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 7 Apr 2015 21:56:34 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r281220 - head/share/man/man4 Message-ID: <20150407185634.GK64665@FreeBSD.org> References: <201504071852.t37Iq0Ek088609@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504071852.t37Iq0Ek088609@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 18:56:37 -0000 On Tue, Apr 07, 2015 at 06:52:00PM +0000, Hans Petter Selasky wrote: H> Author: hselasky H> Date: Tue Apr 7 18:52:00 2015 H> New Revision: 281220 H> URL: https://svnweb.freebsd.org/changeset/base/281220 H> H> Log: H> Just briefly mention about the dangers of non-random IP IDs. H> A full in depth explanation belongs somewhere else. H> H> Suggested by: gleb @ H> MFC after: 1 week Can you please just bring the page to the state before r281024? If you want any changes to the text, get them reviewed first. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 19:28:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31E40D04; Tue, 7 Apr 2015 19:28:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B54B7CA; Tue, 7 Apr 2015 19:28:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37JSsuP004121; Tue, 7 Apr 2015 19:28:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37JSsrq004119; Tue, 7 Apr 2015 19:28:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504071928.t37JSsrq004119@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 7 Apr 2015 19:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281221 - in head: contrib/compiler-rt/lib/builtins lib/libcompiler_rt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 19:28:55 -0000 Author: emaste Date: Tue Apr 7 19:28:53 2015 New Revision: 281221 URL: https://svnweb.freebsd.org/changeset/base/281221 Log: compiler-rt: Implement multc3 - quad-precision complex multiplication This may be reworked based on upstream discussion. This version is here to support arm64 world builds. Reviewed by: ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2173 Added: head/contrib/compiler-rt/lib/builtins/multc3.c (contents, props changed) Modified: head/lib/libcompiler_rt/Makefile Added: head/contrib/compiler-rt/lib/builtins/multc3.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/lib/builtins/multc3.c Tue Apr 7 19:28:53 2015 (r281221) @@ -0,0 +1,73 @@ +/* ===-- multc3.c - Implement __multc3 -------------------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + * + * This file implements __multc3 for the compiler_rt library. + * + * ===----------------------------------------------------------------------=== + */ + +#include "int_lib.h" +#include "int_math.h" + +/* Returns: the product of a + ib and c + id */ + +COMPILER_RT_ABI long double _Complex +__multc3(long double __a, long double __b, long double __c, long double __d) +{ + long double __ac = __a * __c; + long double __bd = __b * __d; + long double __ad = __a * __d; + long double __bc = __b * __c; + long double _Complex z; + __real__ z = __ac - __bd; + __imag__ z = __ad + __bc; + if (crt_isnan(__real__ z) && crt_isnan(__imag__ z)) + { + int __recalc = 0; + if (crt_isinf(__a) || crt_isinf(__b)) + { + __a = crt_copysignl(crt_isinf(__a) ? 1 : 0, __a); + __b = crt_copysignl(crt_isinf(__b) ? 1 : 0, __b); + if (crt_isnan(__c)) + __c = crt_copysignl(0, __c); + if (crt_isnan(__d)) + __d = crt_copysignl(0, __d); + __recalc = 1; + } + if (crt_isinf(__c) || crt_isinf(__d)) + { + __c = crt_copysignl(crt_isinf(__c) ? 1 : 0, __c); + __d = crt_copysignl(crt_isinf(__d) ? 1 : 0, __d); + if (crt_isnan(__a)) + __a = crt_copysignl(0, __a); + if (crt_isnan(__b)) + __b = crt_copysignl(0, __b); + __recalc = 1; + } + if (!__recalc && (crt_isinf(__ac) || crt_isinf(__bd) || + crt_isinf(__ad) || crt_isinf(__bc))) + { + if (crt_isnan(__a)) + __a = crt_copysignl(0, __a); + if (crt_isnan(__b)) + __b = crt_copysignl(0, __b); + if (crt_isnan(__c)) + __c = crt_copysignl(0, __c); + if (crt_isnan(__d)) + __d = crt_copysignl(0, __d); + __recalc = 1; + } + if (__recalc) + { + __real__ z = CRT_INFINITY * (__a * __c - __b * __d); + __imag__ z = CRT_INFINITY * (__a * __d + __b * __c); + } + } + return z; +} Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Tue Apr 7 18:52:00 2015 (r281220) +++ head/lib/libcompiler_rt/Makefile Tue Apr 7 19:28:53 2015 (r281221) @@ -108,6 +108,7 @@ SRCF= absvdi2 \ mulvdi3 \ mulvsi3 \ mulvti3 \ + multc3 \ mulxc3 \ negdf2 \ negdi2 \ From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 19:31:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5F83F6A; Tue, 7 Apr 2015 19:31:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86B3C889; Tue, 7 Apr 2015 19:31:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37JVVxN007582; Tue, 7 Apr 2015 19:31:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37JVUiY007580; Tue, 7 Apr 2015 19:31:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504071931.t37JVUiY007580@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 7 Apr 2015 19:31:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281223 - in head: contrib/compiler-rt/lib/builtins lib/libcompiler_rt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 19:31:31 -0000 Author: emaste Date: Tue Apr 7 19:31:29 2015 New Revision: 281223 URL: https://svnweb.freebsd.org/changeset/base/281223 Log: compiler-rt: add floatditf and floatunditf These are long integer (di_int/du_int) to quad precision floating point conversions. They may be reworked based on upstream discussion. These versions are here to support arm64 world builds. Reviewed by: ed Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2174 Added: head/contrib/compiler-rt/lib/builtins/floatditf.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/floatunditf.c (contents, props changed) Modified: head/lib/libcompiler_rt/Makefile Added: head/contrib/compiler-rt/lib/builtins/floatditf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/lib/builtins/floatditf.c Tue Apr 7 19:31:29 2015 (r281223) @@ -0,0 +1,52 @@ +//===-- lib/floatditf.c - integer -> quad-precision conversion ----*- C -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements di_int to quad-precision conversion for the +// compiler-rt library in the IEEE-754 default round-to-nearest, ties-to-even +// mode. +// +//===----------------------------------------------------------------------===// + +#define QUAD_PRECISION +#include "fp_lib.h" + +#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT) +COMPILER_RT_ABI fp_t __floatditf(di_int a) { + + const int aWidth = sizeof a * CHAR_BIT; + + // Handle zero as a special case to protect clz + if (a == 0) + return fromRep(0); + + // All other cases begin by extracting the sign and absolute value of a + rep_t sign = 0; + unsigned aAbs = (unsigned)a; + if (a < 0) { + sign = signBit; + aAbs += 0x80000000; + } + + // Exponent of (fp_t)a is the width of abs(a). + const int exponent = (aWidth - 1) - __builtin_clz(a); + rep_t result; + + // Shift a into the significand field and clear the implicit bit. Extra + // cast to unsigned int is necessary to get the correct behavior for + // the input INT_MIN. + const int shift = significandBits - exponent; + result = (rep_t)aAbs << shift ^ implicitBit; + + // Insert the exponent + result += (rep_t)(exponent + exponentBias) << significandBits; + // Insert the sign bit and return + return fromRep(result | sign); +} + +#endif Added: head/contrib/compiler-rt/lib/builtins/floatunditf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/lib/builtins/floatunditf.c Tue Apr 7 19:31:29 2015 (r281223) @@ -0,0 +1,40 @@ +//===-- lib/floatunditf.c - uint -> quad-precision conversion -----*- C -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements du_int to quad-precision conversion for the +// compiler-rt library in the IEEE-754 default round-to-nearest, ties-to-even +// mode. +// +//===----------------------------------------------------------------------===// + +#define QUAD_PRECISION +#include "fp_lib.h" + +#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT) +COMPILER_RT_ABI fp_t __floatunditf(du_int a) { + + const int aWidth = sizeof a * CHAR_BIT; + + // Handle zero as a special case to protect clz + if (a == 0) return fromRep(0); + + // Exponent of (fp_t)a is the width of abs(a). + const int exponent = (aWidth - 1) - __builtin_clz(a); + rep_t result; + + // Shift a into the significand field and clear the implicit bit. + const int shift = significandBits - exponent; + result = (rep_t)a << shift ^ implicitBit; + + // Insert the exponent + result += (rep_t)(exponent + exponentBias) << significandBits; + return fromRep(result); +} + +#endif Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Tue Apr 7 19:30:54 2015 (r281222) +++ head/lib/libcompiler_rt/Makefile Tue Apr 7 19:31:29 2015 (r281223) @@ -78,6 +78,7 @@ SRCF= absvdi2 \ fixxfti \ floatdidf \ floatdisf \ + floatditf \ floatdixf \ floatsitf \ floattidf \ @@ -85,6 +86,7 @@ SRCF= absvdi2 \ floattixf \ floatundidf \ floatundisf \ + floatunditf \ floatundixf \ floatunsidf \ floatunsisf \ From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 19:37:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CE662A3; Tue, 7 Apr 2015 19:37:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC06B8C0; Tue, 7 Apr 2015 19:37:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37JbnCZ008936; Tue, 7 Apr 2015 19:37:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37JbnAu008935; Tue, 7 Apr 2015 19:37:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504071937.t37JbnAu008935@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 7 Apr 2015 19:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281225 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 19:37:50 -0000 Author: markj Date: Tue Apr 7 19:37:49 2015 New Revision: 281225 URL: https://svnweb.freebsd.org/changeset/base/281225 Log: Add B_KVAALLOC and B_UNMAPPED to the buf flag name list. Differential Revision: https://reviews.freebsd.org/D1895 Submitted by: Conrad Meyer MFC after: 1 week Modified: head/sys/sys/buf.h Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Tue Apr 7 19:33:07 2015 (r281224) +++ head/sys/sys/buf.h Tue Apr 7 19:37:49 2015 (r281225) @@ -231,8 +231,8 @@ struct buf { #define PRINT_BUF_FLAGS "\20\40remfree\37cluster\36vmio\35ram\34managed" \ "\33paging\32infreecnt\31nocopy\30b23\27relbuf\26dirty\25b20" \ "\24b19\23b18\22clusterok\21malloc\20nocache\17b14\16inval" \ - "\15b12\14b11\13eintr\12done\11persist\10delwri\7validsuspwrt" \ - "\6cache\5deferred\4direct\3async\2needcommit\1age" + "\15kvaalloc\14unmapped\13eintr\12done\11persist\10delwri" \ + "\7validsuspwrt\6cache\5deferred\4direct\3async\2needcommit\1age" /* * These flags are kept in b_xflags. From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 19:39:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52A6F4DD; Tue, 7 Apr 2015 19:39:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DB6F8D2; Tue, 7 Apr 2015 19:39:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37JdNgj009388; Tue, 7 Apr 2015 19:39:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37JdNbr009387; Tue, 7 Apr 2015 19:39:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201504071939.t37JdNbr009387@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 7 Apr 2015 19:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281226 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 19:39:24 -0000 Author: hselasky Date: Tue Apr 7 19:39:23 2015 New Revision: 281226 URL: https://svnweb.freebsd.org/changeset/base/281226 Log: Revert r281220 and r281024, so that the new content added and its wording can be more properly discussed. Spelling fix made is kept. Suggested by: gleb @ MFC after: 1 week Modified: head/share/man/man4/inet.4 Modified: head/share/man/man4/inet.4 ============================================================================== --- head/share/man/man4/inet.4 Tue Apr 7 19:37:49 2015 (r281225) +++ head/share/man/man4/inet.4 Tue Apr 7 19:39:23 2015 (r281226) @@ -244,9 +244,9 @@ IP datagrams (or all IP datagrams, if .Va ip.rfc6864 is disabled) to be randomized instead of incremented by 1 with each packet generated. -This prevents IP IDs being abused as a covert channel and also closes -a minor information leak which allows remote observers to determine -the rate of packet generation on the machine by watching the counter. +This closes a minor information leak which allows remote observers to +determine the rate of packet generation on the machine by watching the +counter. At the same time, on high-speed links, it can decrease the ID reuse cycle greatly. Default is 0 (sequential IP IDs). From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 20:20:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D04DAFC7; Tue, 7 Apr 2015 20:20:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB9E6DED; Tue, 7 Apr 2015 20:20:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37KK4jL028954; Tue, 7 Apr 2015 20:20:04 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37KK4ca028953; Tue, 7 Apr 2015 20:20:04 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504072020.t37KK4ca028953@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 7 Apr 2015 20:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281228 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 20:20:04 -0000 Author: delphij Date: Tue Apr 7 20:20:03 2015 New Revision: 281228 URL: https://svnweb.freebsd.org/changeset/base/281228 Log: Improve patch for SA-15:04.igmp to solve a potential buffer overflow. Reported by: bde Submitted by: oshogbo Modified: head/sys/netinet/igmp.c Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Tue Apr 7 19:46:18 2015 (r281227) +++ head/sys/netinet/igmp.c Tue Apr 7 20:20:03 2015 (r281228) @@ -1540,7 +1540,6 @@ igmp_input(struct mbuf **mp, int *offp, struct igmpv3 *igmpv3; uint16_t igmpv3len; uint16_t nsrc; - int srclen; IGMPSTAT_INC(igps_rcv_v3_queries); igmpv3 = (struct igmpv3 *)igmp; @@ -1548,8 +1547,8 @@ igmp_input(struct mbuf **mp, int *offp, * Validate length based on source count. */ nsrc = ntohs(igmpv3->igmp_numsrc); - srclen = sizeof(struct in_addr) * nsrc; - if (nsrc * sizeof(in_addr_t) > srclen) { + if (nsrc * sizeof(in_addr_t) > + UINT16_MAX - iphlen - IGMP_V3_QUERY_MINLEN) { IGMPSTAT_INC(igps_rcv_tooshort); return (IPPROTO_DONE); } @@ -1558,7 +1557,7 @@ igmp_input(struct mbuf **mp, int *offp, * this scope. */ igmpv3len = iphlen + IGMP_V3_QUERY_MINLEN + - srclen; + sizeof(struct in_addr) * nsrc; if ((!M_WRITABLE(m) || m->m_len < igmpv3len) && (m = m_pullup(m, igmpv3len)) == NULL) { From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 20:20:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D30E145; Tue, 7 Apr 2015 20:20:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88B86DEF; Tue, 7 Apr 2015 20:20:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37KKAf8029014; Tue, 7 Apr 2015 20:20:10 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37KKAaN029013; Tue, 7 Apr 2015 20:20:10 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504072020.t37KKAaN029013@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 7 Apr 2015 20:20:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281229 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 20:20:10 -0000 Author: delphij Date: Tue Apr 7 20:20:09 2015 New Revision: 281229 URL: https://svnweb.freebsd.org/changeset/base/281229 Log: Mitigate Local Denial of Service with IPv6 Router Advertisements and log attack attempts. Submitted by: hrs Security: FreeBSD-SA-15:09.nd6 Security: CVE-2015-2923 Modified: head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:03 2015 (r281228) +++ head/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:09 2015 (r281229) @@ -297,8 +297,16 @@ nd6_ra_input(struct mbuf *m, int off, in } if (nd_ra->nd_ra_retransmit) ndi->retrans = ntohl(nd_ra->nd_ra_retransmit); - if (nd_ra->nd_ra_curhoplimit) - ndi->chlim = nd_ra->nd_ra_curhoplimit; + if (nd_ra->nd_ra_curhoplimit) { + if (ndi->chlim < nd_ra->nd_ra_curhoplimit) + ndi->chlim = nd_ra->nd_ra_curhoplimit; + else if (ndi->chlim != nd_ra->nd_ra_curhoplimit) { + log(LOG_ERR, "RA with a lower CurHopLimit sent from " + "%s on %s (current = %d, received = %d). " + "Ignored.\n", ip6_sprintf(ip6bufs, &ip6->ip6_src), + if_name(ifp), ndi->chlim, nd_ra->nd_ra_curhoplimit); + } + } dr = defrtrlist_update(&dr0); } From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 20:29:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E63AC40; Tue, 7 Apr 2015 20:29:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F4A1F2B; Tue, 7 Apr 2015 20:29:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37KT4jc033955; Tue, 7 Apr 2015 20:29:04 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37KT4Ju033954; Tue, 7 Apr 2015 20:29:04 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201504072029.t37KT4Ju033954@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Tue, 7 Apr 2015 20:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281234 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 20:29:04 -0000 Author: kp Date: Tue Apr 7 20:29:03 2015 New Revision: 281234 URL: https://svnweb.freebsd.org/changeset/base/281234 Log: Evaluate packet size after the firewall had its chance Defer the packet size check until after the firewall has had a look at it. This means that the firewall now has the opportunity to (re-)fragment an oversized packet. Differential Revision: https://reviews.freebsd.org/D1815 Reviewed by: ae Approved by: gnn (mentor) Modified: head/sys/netinet6/ip6_forward.c Modified: head/sys/netinet6/ip6_forward.c ============================================================================== --- head/sys/netinet6/ip6_forward.c Tue Apr 7 20:21:23 2015 (r281233) +++ head/sys/netinet6/ip6_forward.c Tue Apr 7 20:29:03 2015 (r281234) @@ -413,39 +413,6 @@ again2: goto bad; } - if (m->m_pkthdr.len > IN6_LINKMTU(rt->rt_ifp)) { - in6_ifstat_inc(rt->rt_ifp, ifs6_in_toobig); - if (mcopy) { - u_long mtu; -#ifdef IPSEC - size_t ipsechdrsiz; -#endif /* IPSEC */ - - mtu = IN6_LINKMTU(rt->rt_ifp); -#ifdef IPSEC - /* - * When we do IPsec tunnel ingress, we need to play - * with the link value (decrement IPsec header size - * from mtu value). The code is much simpler than v4 - * case, as we have the outgoing interface for - * encapsulated packet as "rt->rt_ifp". - */ - ipsechdrsiz = ipsec_hdrsiz(mcopy, IPSEC_DIR_OUTBOUND, - NULL); - if (ipsechdrsiz < mtu) - mtu -= ipsechdrsiz; - /* - * if mtu becomes less than minimum MTU, - * tell minimum MTU (and I'll need to fragment it). - */ - if (mtu < IPV6_MMTU) - mtu = IPV6_MMTU; -#endif /* IPSEC */ - icmp6_error(mcopy, ICMP6_PACKET_TOO_BIG, 0, mtu); - } - goto bad; - } - if (rt->rt_flags & RTF_GATEWAY) dst = (struct sockaddr_in6 *)rt->rt_gateway; @@ -571,6 +538,40 @@ again2: } pass: + /* See if the size was changed by the packet filter. */ + if (m->m_pkthdr.len > IN6_LINKMTU(rt->rt_ifp)) { + in6_ifstat_inc(rt->rt_ifp, ifs6_in_toobig); + if (mcopy) { + u_long mtu; +#ifdef IPSEC + size_t ipsechdrsiz; +#endif /* IPSEC */ + + mtu = IN6_LINKMTU(rt->rt_ifp); +#ifdef IPSEC + /* + * When we do IPsec tunnel ingress, we need to play + * with the link value (decrement IPsec header size + * from mtu value). The code is much simpler than v4 + * case, as we have the outgoing interface for + * encapsulated packet as "rt->rt_ifp". + */ + ipsechdrsiz = ipsec_hdrsiz(mcopy, IPSEC_DIR_OUTBOUND, + NULL); + if (ipsechdrsiz < mtu) + mtu -= ipsechdrsiz; + /* + * if mtu becomes less than minimum MTU, + * tell minimum MTU (and I'll need to fragment it). + */ + if (mtu < IPV6_MMTU) + mtu = IPV6_MMTU; +#endif /* IPSEC */ + icmp6_error(mcopy, ICMP6_PACKET_TOO_BIG, 0, mtu); + } + goto bad; + } + error = nd6_output(rt->rt_ifp, origifp, m, dst, rt); if (error) { in6_ifstat_inc(rt->rt_ifp, ifs6_out_discard); From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 21:31:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAE4B7F3; Tue, 7 Apr 2015 21:31:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5A44DAB; Tue, 7 Apr 2015 21:31:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37LVK3G066545; Tue, 7 Apr 2015 21:31:20 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37LVIxm066538; Tue, 7 Apr 2015 21:31:18 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201504072131.t37LVIxm066538@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Tue, 7 Apr 2015 21:31:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281236 - in head: sbin/ifconfig sys/net sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 21:31:20 -0000 Author: erj Date: Tue Apr 7 21:31:17 2015 New Revision: 281236 URL: https://svnweb.freebsd.org/changeset/base/281236 Log: ifmedia changes: - Extend the number of available subtypes for Ethernet media by using some of the ifmedia word's option bits to help denote subtypes. As a result, the number of possible Ethernet subtype values increases from 31 to 511. - Use some of those new values to define new media types. - lacp_compose_key() recgonizes the new Ethernet media types added. (Change made as required by a comment in if_media.h) - New ioctl, SIOGIFXMEDIA, to handle getting the new extended media types. SIOCGIFMEDIA is retained for backwards compatibility. - Changes to ifconfig to allow it to handle the new extended media types. Submitted by: mike@karels.net (original), hselasky Reviewed by: jfvogel, gnn, hselasky Approved by: jfvogel (mentor), gnn (mentor) Differential Revision: http://reviews.freebsd.org/D1965 Modified: head/sbin/ifconfig/ifmedia.c head/sys/net/ieee8023ad_lacp.c head/sys/net/if.c head/sys/net/if_media.c head/sys/net/if_media.h head/sys/sys/sockio.h Modified: head/sbin/ifconfig/ifmedia.c ============================================================================== --- head/sbin/ifconfig/ifmedia.c Tue Apr 7 21:05:52 2015 (r281235) +++ head/sbin/ifconfig/ifmedia.c Tue Apr 7 21:31:17 2015 (r281236) @@ -109,11 +109,17 @@ media_status(int s) { struct ifmediareq ifmr; int *media_list, i; + int xmedia = 1; (void) memset(&ifmr, 0, sizeof(ifmr)); (void) strncpy(ifmr.ifm_name, name, sizeof(ifmr.ifm_name)); - if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) { + /* + * Check if interface supports extended media types. + */ + if (ioctl(s, SIOCGIFXMEDIA, (caddr_t)&ifmr) < 0) + xmedia = 0; + if (xmedia == 0 && ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) { /* * Interface doesn't support SIOC{G,S}IFMEDIA. */ @@ -130,8 +136,13 @@ media_status(int s) err(1, "malloc"); ifmr.ifm_ulist = media_list; - if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) - err(1, "SIOCGIFMEDIA"); + if (xmedia) { + if (ioctl(s, SIOCGIFXMEDIA, (caddr_t)&ifmr) < 0) + err(1, "SIOCGIFXMEDIA"); + } else { + if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) + err(1, "SIOCGIFMEDIA"); + } printf("\tmedia: "); print_media_word(ifmr.ifm_current, 1); @@ -194,6 +205,7 @@ ifmedia_getstate(int s) { static struct ifmediareq *ifmr = NULL; int *mwords; + int xmedia = 1; if (ifmr == NULL) { ifmr = (struct ifmediareq *)malloc(sizeof(struct ifmediareq)); @@ -213,7 +225,10 @@ ifmedia_getstate(int s) * the current media type and the top-level type. */ - if (ioctl(s, SIOCGIFMEDIA, (caddr_t)ifmr) < 0) { + if (ioctl(s, SIOCGIFXMEDIA, (caddr_t)ifmr) < 0) { + xmedia = 0; + } + if (xmedia == 0 && ioctl(s, SIOCGIFMEDIA, (caddr_t)ifmr) < 0) { err(1, "SIOCGIFMEDIA"); } @@ -225,8 +240,13 @@ ifmedia_getstate(int s) err(1, "malloc"); ifmr->ifm_ulist = mwords; - if (ioctl(s, SIOCGIFMEDIA, (caddr_t)ifmr) < 0) - err(1, "SIOCGIFMEDIA"); + if (xmedia) { + if (ioctl(s, SIOCGIFXMEDIA, (caddr_t)ifmr) < 0) + err(1, "SIOCGIFXMEDIA"); + } else { + if (ioctl(s, SIOCGIFMEDIA, (caddr_t)ifmr) < 0) + err(1, "SIOCGIFMEDIA"); + } } return ifmr; Modified: head/sys/net/ieee8023ad_lacp.c ============================================================================== --- head/sys/net/ieee8023ad_lacp.c Tue Apr 7 21:05:52 2015 (r281235) +++ head/sys/net/ieee8023ad_lacp.c Tue Apr 7 21:31:17 2015 (r281236) @@ -1066,12 +1066,16 @@ lacp_compose_key(struct lacp_port *lp) case IFM_100_T4: case IFM_100_VG: case IFM_100_T2: + case IFM_100_T: key = IFM_100_TX; break; case IFM_1000_SX: case IFM_1000_LX: case IFM_1000_CX: case IFM_1000_T: + case IFM_1000_KX: + case IFM_1000_SGMII: + case IFM_1000_CX_SGMII: key = IFM_1000_SX; break; case IFM_10G_LR: @@ -1081,15 +1085,53 @@ lacp_compose_key(struct lacp_port *lp) case IFM_10G_TWINAX_LONG: case IFM_10G_LRM: case IFM_10G_T: + case IFM_10G_KX4: + case IFM_10G_KR: + case IFM_10G_CR1: + case IFM_10G_ER: + case IFM_10G_SFI: key = IFM_10G_LR; break; + case IFM_20G_KR2: + key = IFM_20G_KR2; + break; + case IFM_2500_KX: + case IFM_2500_T: + key = IFM_2500_KX; + break; + case IFM_5000_T: + key = IFM_5000_T; + break; + case IFM_50G_PCIE: + case IFM_50G_CR2: + case IFM_50G_KR2: + key = IFM_50G_PCIE; + break; + case IFM_56G_R4: + key = IFM_56G_R4; + break; + case IFM_25G_PCIE: + case IFM_25G_CR: + case IFM_25G_KR: + case IFM_25G_SR: + key = IFM_25G_PCIE; + break; case IFM_40G_CR4: case IFM_40G_SR4: case IFM_40G_LR4: + case IFM_40G_XLPPI: + case IFM_40G_KR4: key = IFM_40G_CR4; break; + case IFM_100G_CR4: + case IFM_100G_SR4: + case IFM_100G_KR4: + case IFM_100G_LR4: + key = IFM_100G_CR4; + break; default: key = subtype; + break; } /* bit 5..14: (some bits of) if_index of lagg device */ key |= 0x7fe0 & ((sc->sc_ifp->if_index) << 5); Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Apr 7 21:05:52 2015 (r281235) +++ head/sys/net/if.c Tue Apr 7 21:31:17 2015 (r281236) @@ -2582,6 +2582,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, case SIOCGIFPSRCADDR: case SIOCGIFPDSTADDR: case SIOCGIFMEDIA: + case SIOCGIFXMEDIA: case SIOCGIFGENERIC: if (ifp->if_ioctl == NULL) return (EOPNOTSUPP); Modified: head/sys/net/if_media.c ============================================================================== --- head/sys/net/if_media.c Tue Apr 7 21:05:52 2015 (r281235) +++ head/sys/net/if_media.c Tue Apr 7 21:31:17 2015 (r281236) @@ -68,6 +68,7 @@ static struct ifmedia_entry *ifmedia_mat int flags, int mask); #ifdef IFMEDIA_DEBUG +#include int ifmedia_debug = 0; SYSCTL_INT(_debug, OID_AUTO, ifmedia, CTLFLAG_RW, &ifmedia_debug, 0, "if_media debugging msgs"); @@ -193,6 +194,21 @@ ifmedia_set(ifm, target) } /* + * Given a media word, return one suitable for an application + * using the original encoding. + */ +static int +compat_media(int media) +{ + + if (IFM_TYPE(media) == IFM_ETHER && IFM_SUBTYPE(media) > IFM_OTHER) { + media &= ~(IFM_ETH_XTYPE|IFM_TMASK); + media |= IFM_OTHER; + } + return (media); +} + +/* * Device-independent media ioctl support function. */ int @@ -271,6 +287,7 @@ ifmedia_ioctl(ifp, ifr, ifm, cmd) * Get list of available media and current media on interface. */ case SIOCGIFMEDIA: + case SIOCGIFXMEDIA: { struct ifmedia_entry *ep; int i; @@ -278,8 +295,13 @@ ifmedia_ioctl(ifp, ifr, ifm, cmd) if (ifmr->ifm_count < 0) return (EINVAL); - ifmr->ifm_active = ifmr->ifm_current = ifm->ifm_cur ? - ifm->ifm_cur->ifm_media : IFM_NONE; + if (cmd == SIOCGIFMEDIA) { + ifmr->ifm_active = ifmr->ifm_current = ifm->ifm_cur ? + compat_media(ifm->ifm_cur->ifm_media) : IFM_NONE; + } else { + ifmr->ifm_active = ifmr->ifm_current = ifm->ifm_cur ? + ifm->ifm_cur->ifm_media : IFM_NONE; + } ifmr->ifm_mask = ifm->ifm_mask; ifmr->ifm_status = 0; (*ifm->ifm_status)(ifp, ifmr); @@ -354,8 +376,7 @@ ifmedia_baudrate(int mword) int i; for (i = 0; ifmedia_baudrate_descriptions[i].ifmb_word != 0; i++) { - if ((mword & (IFM_NMASK|IFM_TMASK)) == - ifmedia_baudrate_descriptions[i].ifmb_word) + if (IFM_TYPE_MATCH(mword, ifmedia_baudrate_descriptions[i].ifmb_word)) return (ifmedia_baudrate_descriptions[i].ifmb_baudrate); } @@ -461,7 +482,7 @@ ifmedia_printword(ifmw) printf("\n"); return; } - printf(desc->ifmt_string); + printf("%s", desc->ifmt_string); /* Any mode. */ for (desc = ttos->modes; desc && desc->ifmt_string != NULL; desc++) Modified: head/sys/net/if_media.h ============================================================================== --- head/sys/net/if_media.h Tue Apr 7 21:05:52 2015 (r281235) +++ head/sys/net/if_media.h Tue Apr 7 21:31:17 2015 (r281236) @@ -118,7 +118,7 @@ uint64_t ifmedia_baudrate(int); * ---- ------- * 0-4 Media variant * 5-7 Media type - * 8-15 Type specific options + * 8-15 Type specific options (includes added variant bits on Ethernet) * 16-18 Mode (for multi-mode devices) * 19 RFU * 20-27 Shared (global) options @@ -127,8 +127,18 @@ uint64_t ifmedia_baudrate(int); /* * Ethernet + * In order to use more than 31 subtypes, Ethernet uses some of the option + * bits as part of the subtype field. See the options section below for + * relevant definitions */ #define IFM_ETHER 0x00000020 +#define IFM_ETHER_SUBTYPE(x) (((x) & IFM_TMASK) | \ + (((x) & (IFM_ETH_XTYPE >> IFM_ETH_XSHIFT)) << IFM_ETH_XSHIFT)) +#define IFM_X(x) IFM_ETHER_SUBTYPE(x) /* internal shorthand */ +#define IFM_ETHER_SUBTYPE_SET(x) (IFM_ETHER_SUBTYPE(x) | IFM_ETHER) +#define IFM_ETHER_SUBTYPE_GET(x) ((x) & (IFM_TMASK|IFM_ETH_XTYPE)) +#define IFM_ETHER_IS_EXTENDED(x) ((x) & IFM_ETH_XTYPE) + #define IFM_10_T 3 /* 10BaseT - RJ45 */ #define IFM_10_2 4 /* 10Base2 - Thinnet */ #define IFM_10_5 5 /* 10Base5 - AUI */ @@ -156,15 +166,49 @@ uint64_t ifmedia_baudrate(int); #define IFM_40G_CR4 27 /* 40GBase-CR4 */ #define IFM_40G_SR4 28 /* 40GBase-SR4 */ #define IFM_40G_LR4 29 /* 40GBase-LR4 */ +#define IFM_1000_KX 30 /* 1000Base-KX backplane */ +#define IFM_OTHER 31 /* Other: one of the following */ + +/* following types are not visible to old binaries using only IFM_TMASK */ +#define IFM_10G_KX4 IFM_X(32) /* 10GBase-KX4 backplane */ +#define IFM_10G_KR IFM_X(33) /* 10GBase-KR backplane */ +#define IFM_10G_CR1 IFM_X(34) /* 10GBase-CR1 Twinax splitter */ +#define IFM_20G_KR2 IFM_X(35) /* 20GBase-KR2 backplane */ +#define IFM_2500_KX IFM_X(36) /* 2500Base-KX backplane */ +#define IFM_2500_T IFM_X(37) /* 2500Base-T - RJ45 (NBaseT) */ +#define IFM_5000_T IFM_X(38) /* 5000Base-T - RJ45 (NBaseT) */ +#define IFM_50G_PCIE IFM_X(39) /* 50G Ethernet over PCIE */ +#define IFM_25G_PCIE IFM_X(40) /* 25G Ethernet over PCIE */ +#define IFM_1000_SGMII IFM_X(41) /* 1G media interface */ +#define IFM_10G_SFI IFM_X(42) /* 10G media interface */ +#define IFM_40G_XLPPI IFM_X(43) /* 40G media interface */ +#define IFM_1000_CX_SGMII IFM_X(44) /* 1000Base-CX-SGMII */ +#define IFM_40G_KR4 IFM_X(45) /* 40GBase-KR4 */ +#define IFM_10G_ER IFM_X(46) /* 10GBase-ER */ +#define IFM_100G_CR4 IFM_X(47) /* 100GBase-CR4 */ +#define IFM_100G_SR4 IFM_X(48) /* 100GBase-SR4 */ +#define IFM_100G_KR4 IFM_X(49) /* 100GBase-KR4 */ +#define IFM_100G_LR4 IFM_X(50) /* 100GBase-LR4 */ +#define IFM_56G_R4 IFM_X(51) /* 56GBase-R4 */ +#define IFM_100_T IFM_X(52) /* 100BaseT - RJ45 */ +#define IFM_25G_CR IFM_X(53) /* 25GBase-CR */ +#define IFM_25G_KR IFM_X(54) /* 25GBase-KR */ +#define IFM_25G_SR IFM_X(55) /* 25GBase-SR */ +#define IFM_50G_CR2 IFM_X(56) /* 50GBase-CR2 */ +#define IFM_50G_KR2 IFM_X(57) /* 50GBase-KR2 */ + /* * Please update ieee8023ad_lacp.c:lacp_compose_key() * after adding new Ethernet media types. */ -/* note 31 is the max! */ +/* Note IFM_X(511) is the max! */ +/* Ethernet option values; includes bits used for extended variant field */ #define IFM_ETH_MASTER 0x00000100 /* master mode (1000baseT) */ #define IFM_ETH_RXPAUSE 0x00000200 /* receive PAUSE frames */ #define IFM_ETH_TXPAUSE 0x00000400 /* transmit PAUSE frames */ +#define IFM_ETH_XTYPE 0x00007800 /* extended media variants */ +#define IFM_ETH_XSHIFT 6 /* shift XTYPE next to TMASK */ /* * Token ring @@ -307,7 +351,10 @@ uint64_t ifmedia_baudrate(int); * Macros to extract various bits of information from the media word. */ #define IFM_TYPE(x) ((x) & IFM_NMASK) -#define IFM_SUBTYPE(x) ((x) & IFM_TMASK) +#define IFM_SUBTYPE(x) \ + (IFM_TYPE(x) == IFM_ETHER ? IFM_ETHER_SUBTYPE_GET(x) : ((x) & IFM_TMASK)) +#define IFM_TYPE_MATCH(x,y) \ + (IFM_TYPE(x) == IFM_TYPE(y) && IFM_SUBTYPE(x) == IFM_SUBTYPE(y)) #define IFM_TYPE_OPTIONS(x) ((x) & IFM_OMASK) #define IFM_INST(x) (((x) & IFM_IMASK) >> IFM_ISHIFT) #define IFM_OPTIONS(x) ((x) & (IFM_OMASK | IFM_GMASK)) @@ -372,6 +419,34 @@ struct ifmedia_description { { IFM_40G_CR4, "40Gbase-CR4" }, \ { IFM_40G_SR4, "40Gbase-SR4" }, \ { IFM_40G_LR4, "40Gbase-LR4" }, \ + { IFM_1000_KX, "1000Base-KX" }, \ + { IFM_OTHER, "Other" }, \ + { IFM_10G_KX4, "10GBase-KX4" }, \ + { IFM_10G_KR, "10GBase-KR" }, \ + { IFM_10G_CR1, "10GBase-CR1" }, \ + { IFM_20G_KR2, "20GBase-KR2" }, \ + { IFM_2500_KX, "2500Base-KX" }, \ + { IFM_2500_T, "2500Base-T" }, \ + { IFM_5000_T, "5000Base-T" }, \ + { IFM_50G_PCIE, "PCIExpress-50G" }, \ + { IFM_25G_PCIE, "PCIExpress-25G" }, \ + { IFM_1000_SGMII, "1000Base-SGMII" }, \ + { IFM_10G_SFI, "10GBase-SFI" }, \ + { IFM_40G_XLPPI, "40GBase-XLPPI" }, \ + { IFM_1000_CX_SGMII, "1000Base-CX-SGMII" }, \ + { IFM_40G_KR4, "40GBase-KR4" }, \ + { IFM_10G_ER, "10GBase-ER" }, \ + { IFM_100G_CR4, "100GBase-CR4" }, \ + { IFM_100G_SR4, "100GBase-SR4" }, \ + { IFM_100G_KR4, "100GBase-KR4" }, \ + { IFM_100G_LR4, "100GBase-LR4" }, \ + { IFM_56G_R4, "56GBase-R4" }, \ + { IFM_100_T, "100BaseT" }, \ + { IFM_25G_CR, "25GBase-CR" }, \ + { IFM_25G_KR, "25GBase-KR" }, \ + { IFM_25G_SR, "25GBase-SR" }, \ + { IFM_50G_CR2, "50GBase-CR2" }, \ + { IFM_50G_KR2, "50GBase-KR2" }, \ { 0, NULL }, \ } @@ -673,6 +748,33 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_40G_CR4, IF_Gbps(40ULL) }, \ { IFM_ETHER | IFM_40G_SR4, IF_Gbps(40ULL) }, \ { IFM_ETHER | IFM_40G_LR4, IF_Gbps(40ULL) }, \ + { IFM_ETHER | IFM_1000_KX, IF_Mbps(1000) }, \ + { IFM_ETHER | IFM_10G_KX4, IF_Gbps(10ULL) }, \ + { IFM_ETHER | IFM_10G_KR, IF_Gbps(10ULL) }, \ + { IFM_ETHER | IFM_10G_CR1, IF_Gbps(10ULL) }, \ + { IFM_ETHER | IFM_20G_KR2, IF_Gbps(20ULL) }, \ + { IFM_ETHER | IFM_2500_KX, IF_Mbps(2500) }, \ + { IFM_ETHER | IFM_2500_T, IF_Mbps(2500) }, \ + { IFM_ETHER | IFM_5000_T, IF_Mbps(5000) }, \ + { IFM_ETHER | IFM_50G_PCIE, IF_Gbps(50ULL) }, \ + { IFM_ETHER | IFM_25G_PCIE, IF_Gbps(25ULL) }, \ + { IFM_ETHER | IFM_1000_SGMII, IF_Mbps(1000) }, \ + { IFM_ETHER | IFM_10G_SFI, IF_Gbps(10ULL) }, \ + { IFM_ETHER | IFM_40G_XLPPI, IF_Gbps(40ULL) }, \ + { IFM_ETHER | IFM_1000_CX_SGMII, IF_Mbps(1000) }, \ + { IFM_ETHER | IFM_40G_KR4, IF_Gbps(40ULL) }, \ + { IFM_ETHER | IFM_10G_ER, IF_Gbps(10ULL) }, \ + { IFM_ETHER | IFM_100G_CR4, IF_Gbps(100ULL) }, \ + { IFM_ETHER | IFM_100G_SR4, IF_Gbps(100ULL) }, \ + { IFM_ETHER | IFM_100G_KR4, IF_Gbps(100ULL) }, \ + { IFM_ETHER | IFM_100G_LR4, IF_Gbps(100ULL) }, \ + { IFM_ETHER | IFM_56G_R4, IF_Gbps(56ULL) }, \ + { IFM_ETHER | IFM_100_T, IF_Mbps(100ULL) }, \ + { IFM_ETHER | IFM_25G_CR, IF_Gbps(25ULL) }, \ + { IFM_ETHER | IFM_25G_KR, IF_Gbps(25ULL) }, \ + { IFM_ETHER | IFM_25G_SR, IF_Gbps(25ULL) }, \ + { IFM_ETHER | IFM_50G_CR2, IF_Gbps(50ULL) }, \ + { IFM_ETHER | IFM_50G_KR2, IF_Gbps(50ULL) }, \ \ { IFM_TOKEN | IFM_TOK_STP4, IF_Mbps(4) }, \ { IFM_TOKEN | IFM_TOK_STP16, IF_Mbps(16) }, \ Modified: head/sys/sys/sockio.h ============================================================================== --- head/sys/sys/sockio.h Tue Apr 7 21:05:52 2015 (r281235) +++ head/sys/sys/sockio.h Tue Apr 7 21:31:17 2015 (r281236) @@ -128,5 +128,6 @@ #define SIOCGIFGROUP _IOWR('i', 136, struct ifgroupreq) /* get ifgroups */ #define SIOCDIFGROUP _IOW('i', 137, struct ifgroupreq) /* delete ifgroup */ #define SIOCGIFGMEMB _IOWR('i', 138, struct ifgroupreq) /* get members */ +#define SIOCGIFXMEDIA _IOWR('i', 139, struct ifmediareq) /* get net xmedia */ #endif /* !_SYS_SOCKIO_H_ */ From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 21:34:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81EC1973; Tue, 7 Apr 2015 21:34:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C2D5E5C; Tue, 7 Apr 2015 21:34:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37LYoIR067506; Tue, 7 Apr 2015 21:34:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37LYnKM067504; Tue, 7 Apr 2015 21:34:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504072134.t37LYnKM067504@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 7 Apr 2015 21:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281237 - in head/sys/boot/efi: boot1 loader loader/arch/amd64 loader/arch/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 21:34:50 -0000 Author: emaste Date: Tue Apr 7 21:34:49 2015 New Revision: 281237 URL: https://svnweb.freebsd.org/changeset/base/281237 Log: EFI: use common reloc.c for all architectures Much of this file is common to the architectures we support, so share an implementation by adding a little #ifdef-ery. Differential Revision: https://reviews.freebsd.org/D2241 Reviewed by: imp Sponsored by: The FreeBSD Foundation Added: head/sys/boot/efi/loader/reloc.c - copied, changed from r281235, head/sys/boot/efi/loader/arch/amd64/reloc.c Deleted: head/sys/boot/efi/loader/arch/amd64/reloc.c head/sys/boot/efi/loader/arch/arm/reloc.c Modified: head/sys/boot/efi/boot1/Makefile Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Tue Apr 7 21:31:17 2015 (r281236) +++ head/sys/boot/efi/boot1/Makefile Tue Apr 7 21:34:49 2015 (r281237) @@ -23,7 +23,9 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/d CFLAGS+= -I${.CURDIR}/../../.. # Always add MI sources and REGULAR efi loader bits -.PATH: ${.CURDIR}/../loader/arch/${MACHINE_CPUARCH} ${.CURDIR}/../../common +.PATH: ${.CURDIR}/../loader/arch/${MACHINE_CPUARCH} +.PATH: ${.CURDIR}/../loader +.PATH: ${.CURDIR}/../../common CFLAGS+= -I${.CURDIR}/../../common FILES= boot1.efi boot1.efifat Copied and modified: head/sys/boot/efi/loader/reloc.c (from r281235, head/sys/boot/efi/loader/arch/amd64/reloc.c) ============================================================================== --- head/sys/boot/efi/loader/arch/amd64/reloc.c Tue Apr 7 21:05:52 2015 (r281235, copy source) +++ head/sys/boot/efi/loader/reloc.c Tue Apr 7 21:34:49 2015 (r281237) @@ -32,18 +32,30 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef __i386__ +#if defined(__arm__) || defined(__i386__) #define ElfW_Rel Elf32_Rel #define ElfW_Dyn Elf32_Dyn #define ELFW_R_TYPE ELF32_R_TYPE -#elif __amd64__ +#elif defined(__amd64__) #define ElfW_Rel Elf64_Rel #define ElfW_Dyn Elf64_Dyn #define ELFW_R_TYPE ELF64_R_TYPE +#else +#error architecture not supported +#endif +#if defined(__amd64__) +#define RELOC_TYPE_NONE R_X86_64_NONE +#define RELOC_TYPE_RELATIVE R_X86_64_RELATIVE +#elif defined(__arm__) +#define RELOC_TYPE_NONE R_ARM_NONE +#define RELOC_TYPE_RELATIVE R_ARM_RELATIVE +#elif defined(__i386__) +#define RELOC_TYPE_NONE R_386_NONE +#define RELOC_TYPE_RELATIVE R_386_RELATIVE #endif /* - * A simple relocator for IA32/AMD64 EFI binaries. + * A simple relocator for EFI binaries. */ EFI_STATUS _reloc(unsigned long ImageBase, ElfW_Dyn *dynamic, EFI_HANDLE image_handle, @@ -81,17 +93,14 @@ _reloc(unsigned long ImageBase, ElfW_Dyn /* * Perform the actual relocation. - * XXX: We are reusing code for the amd64 version of this, but - * we must make sure the relocation types are the same. */ - CTASSERT(R_386_NONE == R_X86_64_NONE); - CTASSERT(R_386_RELATIVE == R_X86_64_RELATIVE); for (; relsz > 0; relsz -= relent) { switch (ELFW_R_TYPE(rel->r_info)) { - case R_386_NONE: + case RELOC_TYPE_NONE: /* No relocation needs be performed. */ break; - case R_386_RELATIVE: + + case RELOC_TYPE_RELATIVE: /* Address relative to the base address. */ newaddr = (unsigned long *)(ImageBase + rel->r_offset); *newaddr += ImageBase; From owner-svn-src-head@FreeBSD.ORG Tue Apr 7 21:41:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68D9EC2D; Tue, 7 Apr 2015 21:41:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49AE6F4F; Tue, 7 Apr 2015 21:41:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37LfS9h071291; Tue, 7 Apr 2015 21:41:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37LfRLI071287; Tue, 7 Apr 2015 21:41:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504072141.t37LfRLI071287@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 7 Apr 2015 21:41:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281238 - head/sys/boot/efi/boot1 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 21:41:28 -0000 Author: emaste Date: Tue Apr 7 21:41:26 2015 New Revision: 281238 URL: https://svnweb.freebsd.org/changeset/base/281238 Log: Add EFI boot1 for i386 loader.efi still needs work, but boot1.efi now builds. Differential Revision: https://reviews.freebsd.org/D2244 Reviewed by: rpaulo Sponsored by: The FreeBSD Foundation Added: head/sys/boot/efi/boot1/fat-i386.tmpl.bz2.uu (contents, props changed) Modified: head/sys/boot/efi/boot1/Makefile head/sys/boot/efi/boot1/generate-fat.sh Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Tue Apr 7 21:34:49 2015 (r281237) +++ head/sys/boot/efi/boot1/Makefile Tue Apr 7 21:41:26 2015 (r281238) @@ -38,9 +38,10 @@ LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymboli LDFLAGS+= -Wl,-znocombreloc .endif -.if ${MACHINE_CPUARCH} == "arm" +.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386" # -# Add libstand for the __aeabi_* functions used by the compiler +# Add libstand for the runtime functions used by the compiler - for example +# __aeabi_* (arm) or __divdi3 (i386). # DPADD+= ${LIBSTAND} LDADD+= -lstand Added: head/sys/boot/efi/boot1/fat-i386.tmpl.bz2.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/boot1/fat-i386.tmpl.bz2.uu Tue Apr 7 21:41:26 2015 (r281238) @@ -0,0 +1,26 @@ +FAT template boot filesystem created by generate-fat.sh +DO NOT EDIT +$FreeBSD$ +begin 644 fat-i386.tmpl.bz2 +M0EIH.3%!629368LPC"P`&T#_____[ZKJ[_ZN_ZO^J_Z[OJ_OJ^JK_KZNKNNJ +MZNKNZOJ^P`+\``4`15/%`]3U!H:-`:,C0```&@:9!H`T`!D````&@&@:9HF1 +MA``R:``:"``T,C1D&FFFAHT::`8F0TTR-#0,0Q,@TT```!HT,330:-&"!ID, +M@&C$Q&FF(`#0R-&0::::&C1IH!B9#33(T-`Q#$R#30```&C0Q--!HT8(&F0R +M`:,3$::8%4DDT_(HDQDFC$TR8F31H#0R,@T-!IH`#0R-`:9`TT--&C0-,C(R +M--/0C"---/28$P:::G.M7$NU9*YMC#26[FI",))$0BU((B(@Y=99)$((0LB) +M<:0@0AFL6JA=Y+)+JX9A-W:UXB7H/&:9\#3OG;)]#;MZOE^X3DL>PXZ:3Z7)W*[T]0YDF(D\UI%&H:I\KI&Q?FW+,N`_U_S`9%EL9H,?D +M+[=S7F7N=K>6VVB(EK"J(J71=U(].36-&M9]E)+CJ[>NMXBU.`OW%#X"4"I`L0*`H@*982S&"L)%`M'-HP#B!/4PH$;I)EK" +M?`??(&!3=]_K])6G70T%+BT8F221>O8;!LVT?HV[=-ZWZ_<-QW, Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD490144; Tue, 7 Apr 2015 23:09:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE622B53; Tue, 7 Apr 2015 23:09:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t37N9ZJq011384; Tue, 7 Apr 2015 23:09:35 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37N9Zwf011383; Tue, 7 Apr 2015 23:09:35 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504072309.t37N9Zwf011383@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 7 Apr 2015 23:09:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281239 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 23:09:36 -0000 Author: adrian Date: Tue Apr 7 23:09:34 2015 New Revision: 281239 URL: https://svnweb.freebsd.org/changeset/base/281239 Log: Move the IPv4 reassembly queue locking from a single lock to be per-bucket (global). This significantly improves performance on multi-core servers where there is any kind of IPv4 reassembly going on. glebius@ would like to see the locking moved to be attached to the reassembly bucket, which would make it per-bucket + per-VNET, instead of being global. I decided to keep it global for now as it's the minimal useful change; if people agree / wish to migrate it to be per-bucket / per-VNET then please do feel free to do so. I won't complain. Thanks to Norse Corp for giving me access to much larger servers to test this at across the 4 core boxes I have at home. Differential Revision: https://reviews.freebsd.org/D2095 Reviewed by: glebius (initial comments incorporated into this patch) MFC after: 2 weeks Sponsored by: Norse Corp, Inc (hardware) Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Tue Apr 7 21:41:26 2015 (r281238) +++ head/sys/netinet/ip_input.c Tue Apr 7 23:09:34 2015 (r281239) @@ -166,15 +166,18 @@ VNET_DEFINE(u_long, in_ifaddrhmask); /* static VNET_DEFINE(uma_zone_t, ipq_zone); static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); -static struct mtx ipqlock; +static struct mtx_padalign ipqlock[IPREASS_NHASH]; #define V_ipq_zone VNET(ipq_zone) #define V_ipq VNET(ipq) -#define IPQ_LOCK() mtx_lock(&ipqlock) -#define IPQ_UNLOCK() mtx_unlock(&ipqlock) -#define IPQ_LOCK_INIT() mtx_init(&ipqlock, "ipqlock", NULL, MTX_DEF) -#define IPQ_LOCK_ASSERT() mtx_assert(&ipqlock, MA_OWNED) +/* + * The ipqlock array is global, /not/ per-VNET. + */ +#define IPQ_LOCK(i) mtx_lock(&ipqlock[(i)]) +#define IPQ_UNLOCK(i) mtx_unlock(&ipqlock[(i)]) +#define IPQ_LOCK_INIT(i) mtx_init(&ipqlock[(i)], "ipqlock", NULL, MTX_DEF) +#define IPQ_LOCK_ASSERT(i) mtx_assert(&ipqlock[(i)], MA_OWNED) static void maxnipq_update(void); static void ipq_zone_change(void *); @@ -206,7 +209,7 @@ SYSCTL_INT(_net_inet_ip, OID_AUTO, steal "IP stealth mode, no TTL decrementation on forwarding"); #endif -static void ip_freef(struct ipqhead *, struct ipq *); +static void ip_freef(struct ipqhead *, int, struct ipq *); /* * IP statistics are stored in the "array" of counter(9)s. @@ -373,7 +376,8 @@ ip_init(void) NULL, EVENTHANDLER_PRI_ANY); /* Initialize various other remaining things. */ - IPQ_LOCK_INIT(); + for (i = 0; i < IPREASS_NHASH; i++) + IPQ_LOCK_INIT(i); netisr_register(&ip_nh); #ifdef RSS netisr_register(&ip_direct_nh); @@ -393,9 +397,7 @@ ip_destroy(void) /* Cleanup in_ifaddr hash table; should be empty. */ hashdestroy(V_in_ifaddrhashtbl, M_IFADDR, V_in_ifaddrhmask); - IPQ_LOCK(); ip_drain_locked(); - IPQ_UNLOCK(); uma_zdestroy(V_ipq_zone); } @@ -856,6 +858,41 @@ SYSCTL_PROC(_net_inet_ip, OID_AUTO, maxf #define M_IP_FRAG M_PROTO9 /* + * Attempt to purge something from the reassembly queue to make + * room. + * + * Must be called without any IPQ locks held, as it will attempt + * to lock each in turn. + * + * 'skip_bucket' is the bucket with which to skip over, or -1 to + * not skip over anything. + * + * Returns the bucket being freed, or -1 for no action. + */ +static int +ip_reass_purge_element(int skip_bucket) +{ + int i; + struct ipq *r; + + for (i = 0; i < IPREASS_NHASH; i++) { + if (skip_bucket > -1 && i == skip_bucket) + continue; + IPQ_LOCK(i); + r = TAILQ_LAST(&V_ipq[i], ipqhead); + if (r) { + IPSTAT_ADD(ips_fragtimeout, + r->ipq_nfrags); + ip_freef(&V_ipq[i], i, r); + IPQ_UNLOCK(i); + return (i); + } + IPQ_UNLOCK(i); + } + return (-1); +} + +/* * Take incoming datagram fragment and try to reassemble it into * whole datagram. If the argument is the first fragment or one * in between the function will return NULL and store the mbuf @@ -878,6 +915,7 @@ ip_reass(struct mbuf *m) #ifdef RSS uint32_t rss_hash, rss_type; #endif + int do_purge = 0; /* If maxnipq or maxfragsperpacket are 0, never accept fragments. */ if (V_maxnipq == 0 || V_maxfragsperpacket == 0) { @@ -892,7 +930,7 @@ ip_reass(struct mbuf *m) hash = IPREASS_HASH(ip->ip_src.s_addr, ip->ip_id); head = &V_ipq[hash]; - IPQ_LOCK(); + IPQ_LOCK(hash); /* * Look for queue of fragments @@ -921,18 +959,14 @@ ip_reass(struct mbuf *m) */ struct ipq *q = TAILQ_LAST(head, ipqhead); if (q == NULL) { /* gak */ - for (i = 0; i < IPREASS_NHASH; i++) { - struct ipq *r = TAILQ_LAST(&V_ipq[i], ipqhead); - if (r) { - IPSTAT_ADD(ips_fragtimeout, - r->ipq_nfrags); - ip_freef(&V_ipq[i], r); - break; - } - } + /* + * Defer doing this until later; when the + * lock is no longer held. + */ + do_purge = 1; } else { IPSTAT_ADD(ips_fragtimeout, q->ipq_nfrags); - ip_freef(head, q); + ip_freef(head, hash, q); } } @@ -1093,7 +1127,7 @@ found: if (ntohs(GETIP(q)->ip_off) != next) { if (fp->ipq_nfrags > V_maxfragsperpacket) { IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); - ip_freef(head, fp); + ip_freef(head, hash, fp); } goto done; } @@ -1103,7 +1137,7 @@ found: if (p->m_flags & M_IP_FRAG) { if (fp->ipq_nfrags > V_maxfragsperpacket) { IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); - ip_freef(head, fp); + ip_freef(head, hash, fp); } goto done; } @@ -1116,7 +1150,7 @@ found: if (next + (ip->ip_hl << 2) > IP_MAXPACKET) { IPSTAT_INC(ips_toolong); IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); - ip_freef(head, fp); + ip_freef(head, hash, fp); goto done; } @@ -1166,7 +1200,20 @@ found: if (m->m_flags & M_PKTHDR) /* XXX this should be done elsewhere */ m_fixhdr(m); IPSTAT_INC(ips_reassembled); - IPQ_UNLOCK(); + IPQ_UNLOCK(hash); + + /* + * Do the delayed purge to keep fragment counts under + * the configured maximum. + * + * This is delayed so that it's not done with another IPQ bucket + * lock held. + * + * Note that we pass in the bucket to /skip/ over, not + * the bucket to /purge/. + */ + if (do_purge) + ip_reass_purge_element(hash); #ifdef RSS /* @@ -1208,7 +1255,7 @@ dropfrag: fp->ipq_nfrags--; m_freem(m); done: - IPQ_UNLOCK(); + IPQ_UNLOCK(hash); return (NULL); #undef GETIP @@ -1219,11 +1266,11 @@ done: * associated datagrams. */ static void -ip_freef(struct ipqhead *fhp, struct ipq *fp) +ip_freef(struct ipqhead *fhp, int i, struct ipq *fp) { struct mbuf *q; - IPQ_LOCK_ASSERT(); + IPQ_LOCK_ASSERT(i); while (fp->ipq_frags) { q = fp->ipq_frags; @@ -1248,10 +1295,10 @@ ip_slowtimo(void) int i; VNET_LIST_RLOCK_NOSLEEP(); - IPQ_LOCK(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); for (i = 0; i < IPREASS_NHASH; i++) { + IPQ_LOCK(i); for(fp = TAILQ_FIRST(&V_ipq[i]); fp;) { struct ipq *fpp; @@ -1260,9 +1307,10 @@ ip_slowtimo(void) if(--fpp->ipq_ttl == 0) { IPSTAT_ADD(ips_fragtimeout, fpp->ipq_nfrags); - ip_freef(&V_ipq[i], fpp); + ip_freef(&V_ipq[i], i, fpp); } } + IPQ_UNLOCK(i); } /* * If we are over the maximum number of fragments @@ -1271,37 +1319,41 @@ ip_slowtimo(void) */ if (V_maxnipq >= 0 && V_nipq > V_maxnipq) { for (i = 0; i < IPREASS_NHASH; i++) { + IPQ_LOCK(i); while (V_nipq > V_maxnipq && !TAILQ_EMPTY(&V_ipq[i])) { IPSTAT_ADD(ips_fragdropped, TAILQ_FIRST(&V_ipq[i])->ipq_nfrags); ip_freef(&V_ipq[i], + i, TAILQ_FIRST(&V_ipq[i])); } + IPQ_UNLOCK(i); } } CURVNET_RESTORE(); } - IPQ_UNLOCK(); VNET_LIST_RUNLOCK_NOSLEEP(); } /* * Drain off all datagram fragments. + * + * Call without any IPQ locks held. */ static void ip_drain_locked(void) { int i; - IPQ_LOCK_ASSERT(); - for (i = 0; i < IPREASS_NHASH; i++) { + IPQ_LOCK(i); while(!TAILQ_EMPTY(&V_ipq[i])) { IPSTAT_ADD(ips_fragdropped, TAILQ_FIRST(&V_ipq[i])->ipq_nfrags); - ip_freef(&V_ipq[i], TAILQ_FIRST(&V_ipq[i])); + ip_freef(&V_ipq[i], i, TAILQ_FIRST(&V_ipq[i])); } + IPQ_UNLOCK(i); } } @@ -1311,13 +1363,11 @@ ip_drain(void) VNET_ITERATOR_DECL(vnet_iter); VNET_LIST_RLOCK_NOSLEEP(); - IPQ_LOCK(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); ip_drain_locked(); CURVNET_RESTORE(); } - IPQ_UNLOCK(); VNET_LIST_RUNLOCK_NOSLEEP(); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 00:31:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4E4F3BE; Wed, 8 Apr 2015 00:31:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FD746A6; Wed, 8 Apr 2015 00:31:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t380VYOp054262; Wed, 8 Apr 2015 00:31:34 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t380VYJE054261; Wed, 8 Apr 2015 00:31:34 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504080031.t380VYJE054261@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 8 Apr 2015 00:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281242 - head/sys/powerpc/booke X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 00:31:34 -0000 Author: jhibbits Date: Wed Apr 8 00:31:33 2015 New Revision: 281242 URL: https://svnweb.freebsd.org/changeset/base/281242 Log: Unbreak book-e, broken by the trap.c merge (missed this file). Modified: head/sys/powerpc/booke/locore.S Modified: head/sys/powerpc/booke/locore.S ============================================================================== --- head/sys/powerpc/booke/locore.S Wed Apr 8 00:13:17 2015 (r281241) +++ head/sys/powerpc/booke/locore.S Wed Apr 8 00:31:33 2015 (r281242) @@ -722,12 +722,10 @@ setfault: lwz %r4, TD_PCB(%r2) stw %r3, PCB_ONFAULT(%r4) mfcr %r10 - mfctr %r11 - mfxer %r12 stw %r0, 0(%r3) stw %r1, 4(%r3) stw %r2, 8(%r3) - stmw %r10, 12(%r3) /* store CR, CTR, XER, [r13 .. r31] */ + stmw %r13, 12(%r3) /* store CR, CTR, XER, [r13 .. r31] */ li %r3, 0 /* return FALSE */ blr From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 00:32:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C018A520; Wed, 8 Apr 2015 00:32:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAA766BA; Wed, 8 Apr 2015 00:32:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t380Wed4054479; Wed, 8 Apr 2015 00:32:40 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t380WdLq054472; Wed, 8 Apr 2015 00:32:39 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504080032.t380WdLq054472@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 8 Apr 2015 00:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281243 - head/lib/libc/powerpc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 00:32:40 -0000 Author: jhibbits Date: Wed Apr 8 00:32:39 2015 New Revision: 281243 URL: https://svnweb.freebsd.org/changeset/base/281243 Log: Fix powerpc setjmp FPR saving/restoring. X-MFC-With: r279784 Modified: head/lib/libc/powerpc/gen/_setjmp.S head/lib/libc/powerpc/gen/setjmp.S head/lib/libc/powerpc/gen/sigsetjmp.S Modified: head/lib/libc/powerpc/gen/_setjmp.S ============================================================================== --- head/lib/libc/powerpc/gen/_setjmp.S Wed Apr 8 00:31:33 2015 (r281242) +++ head/lib/libc/powerpc/gen/_setjmp.S Wed Apr 8 00:32:39 2015 (r281243) @@ -58,24 +58,24 @@ ENTRY(_setjmp) stmw %r9,20(%r3) /* FPRs */ - stfd %f14,92+0*8(%r3) - stfd %f15,92+1*8(%r3) - stfd %f16,92+2*8(%r3) - stfd %f17,92+3*8(%r3) - stfd %f18,92+4*8(%r3) - stfd %f19,92+5*8(%r3) - stfd %f20,92+6*8(%r3) - stfd %f21,92+7*8(%r3) - stfd %f22,92+8*8(%r3) - stfd %f23,92+9*8(%r3) - stfd %f24,92+10*8(%r3) - stfd %f25,92+11*8(%r3) - stfd %f26,92+12*8(%r3) - stfd %f27,92+13*8(%r3) - stfd %f28,93+13*8(%r3) - stfd %f29,93+14*8(%r3) - stfd %f30,93+15*8(%r3) - stfd %f31,93+16*8(%r3) + stfd %f14,112+0*8(%r3) + stfd %f15,112+1*8(%r3) + stfd %f16,112+2*8(%r3) + stfd %f17,112+3*8(%r3) + stfd %f18,112+4*8(%r3) + stfd %f19,112+5*8(%r3) + stfd %f20,112+6*8(%r3) + stfd %f21,112+7*8(%r3) + stfd %f22,112+8*8(%r3) + stfd %f23,112+9*8(%r3) + stfd %f24,112+10*8(%r3) + stfd %f25,112+11*8(%r3) + stfd %f26,112+12*8(%r3) + stfd %f27,112+13*8(%r3) + stfd %f28,112+14*8(%r3) + stfd %f29,112+15*8(%r3) + stfd %f30,112+16*8(%r3) + stfd %f31,112+17*8(%r3) li %r3,0 blr @@ -85,24 +85,24 @@ ENTRY(_longjmp) lmw %r9,20(%r3) /* FPRs */ - lfd %f14,92+0*8(%r3) - lfd %f15,92+1*8(%r3) - lfd %f16,92+2*8(%r3) - lfd %f17,92+3*8(%r3) - lfd %f18,92+4*8(%r3) - lfd %f19,92+5*8(%r3) - lfd %f20,92+6*8(%r3) - lfd %f21,92+7*8(%r3) - lfd %f22,92+8*8(%r3) - lfd %f23,92+9*8(%r3) - lfd %f24,92+10*8(%r3) - lfd %f25,92+11*8(%r3) - lfd %f26,92+12*8(%r3) - lfd %f27,92+13*8(%r3) - lfd %f28,93+13*8(%r3) - lfd %f29,93+14*8(%r3) - lfd %f30,93+15*8(%r3) - lfd %f31,93+16*8(%r3) + lfd %f14,112+0*8(%r3) + lfd %f15,112+1*8(%r3) + lfd %f16,112+2*8(%r3) + lfd %f17,112+3*8(%r3) + lfd %f18,112+4*8(%r3) + lfd %f19,112+5*8(%r3) + lfd %f20,112+6*8(%r3) + lfd %f21,112+7*8(%r3) + lfd %f22,112+8*8(%r3) + lfd %f23,112+9*8(%r3) + lfd %f24,112+10*8(%r3) + lfd %f25,112+11*8(%r3) + lfd %f26,112+12*8(%r3) + lfd %f27,112+13*8(%r3) + lfd %f28,112+14*8(%r3) + lfd %f29,112+15*8(%r3) + lfd %f30,112+16*8(%r3) + lfd %f31,112+17*8(%r3) mtlr %r11 mtcr %r12 Modified: head/lib/libc/powerpc/gen/setjmp.S ============================================================================== --- head/lib/libc/powerpc/gen/setjmp.S Wed Apr 8 00:31:33 2015 (r281242) +++ head/lib/libc/powerpc/gen/setjmp.S Wed Apr 8 00:32:39 2015 (r281243) @@ -68,24 +68,24 @@ ENTRY(setjmp) stmw %r9,20(%r6) /* FPRs */ - stfd %f14,92+0*8(%r6) - stfd %f15,92+1*8(%r6) - stfd %f16,92+2*8(%r6) - stfd %f17,92+3*8(%r6) - stfd %f18,92+4*8(%r6) - stfd %f19,92+5*8(%r6) - stfd %f20,92+6*8(%r6) - stfd %f21,92+7*8(%r6) - stfd %f22,92+8*8(%r6) - stfd %f23,92+9*8(%r6) - stfd %f24,92+10*8(%r6) - stfd %f25,92+11*8(%r6) - stfd %f26,92+12*8(%r6) - stfd %f27,92+13*8(%r6) - stfd %f28,93+13*8(%r6) - stfd %f29,93+14*8(%r6) - stfd %f30,93+15*8(%r6) - stfd %f31,93+16*8(%r6) + stfd %f14,112+0*8(%r6) + stfd %f15,112+1*8(%r6) + stfd %f16,112+2*8(%r6) + stfd %f17,112+3*8(%r6) + stfd %f18,112+4*8(%r6) + stfd %f19,112+5*8(%r6) + stfd %f20,112+6*8(%r6) + stfd %f21,112+7*8(%r6) + stfd %f22,112+8*8(%r6) + stfd %f23,112+9*8(%r6) + stfd %f24,112+10*8(%r6) + stfd %f25,112+11*8(%r6) + stfd %f26,112+12*8(%r6) + stfd %f27,112+13*8(%r6) + stfd %f28,112+14*8(%r6) + stfd %f29,112+15*8(%r6) + stfd %f30,112+16*8(%r6) + stfd %f31,112+17*8(%r6) li %r3,0 /* return (0) */ blr @@ -96,24 +96,24 @@ ENTRY(__longjmp) lmw %r9,20(%r3) /* restore regs */ /* FPRs */ - lfd %f14,92+0*8(%r3) - lfd %f15,92+1*8(%r3) - lfd %f16,92+2*8(%r3) - lfd %f17,92+3*8(%r3) - lfd %f18,92+4*8(%r3) - lfd %f19,92+5*8(%r3) - lfd %f20,92+6*8(%r3) - lfd %f21,92+7*8(%r3) - lfd %f22,92+8*8(%r3) - lfd %f23,92+9*8(%r3) - lfd %f24,92+10*8(%r3) - lfd %f25,92+11*8(%r3) - lfd %f26,92+12*8(%r3) - lfd %f27,92+13*8(%r3) - lfd %f28,93+13*8(%r3) - lfd %f29,93+14*8(%r3) - lfd %f30,93+15*8(%r3) - lfd %f31,93+16*8(%r3) + lfd %f14,112+0*8(%r3) + lfd %f15,112+1*8(%r3) + lfd %f16,112+2*8(%r3) + lfd %f17,112+3*8(%r3) + lfd %f18,112+4*8(%r3) + lfd %f19,112+5*8(%r3) + lfd %f20,112+6*8(%r3) + lfd %f21,112+7*8(%r3) + lfd %f22,112+8*8(%r3) + lfd %f23,112+9*8(%r3) + lfd %f24,112+10*8(%r3) + lfd %f25,112+11*8(%r3) + lfd %f26,112+12*8(%r3) + lfd %f27,112+13*8(%r3) + lfd %f28,112+14*8(%r3) + lfd %f29,112+15*8(%r3) + lfd %f30,112+16*8(%r3) + lfd %f31,112+17*8(%r3) mr %r6,%r4 /* save val param */ mtlr %r11 /* r11 -> link reg */ Modified: head/lib/libc/powerpc/gen/sigsetjmp.S ============================================================================== --- head/lib/libc/powerpc/gen/sigsetjmp.S Wed Apr 8 00:31:33 2015 (r281242) +++ head/lib/libc/powerpc/gen/sigsetjmp.S Wed Apr 8 00:32:39 2015 (r281243) @@ -73,24 +73,24 @@ ENTRY(sigsetjmp) stmw %r9,20(%r6) /* FPRs */ - stfd %f14,92+0*8(%r6) - stfd %f15,92+1*8(%r6) - stfd %f16,92+2*8(%r6) - stfd %f17,92+3*8(%r6) - stfd %f18,92+4*8(%r6) - stfd %f19,92+5*8(%r6) - stfd %f20,92+6*8(%r6) - stfd %f21,92+7*8(%r6) - stfd %f22,92+8*8(%r6) - stfd %f23,92+9*8(%r6) - stfd %f24,92+10*8(%r6) - stfd %f25,92+11*8(%r6) - stfd %f26,92+12*8(%r6) - stfd %f27,92+13*8(%r6) - stfd %f28,93+13*8(%r6) - stfd %f29,93+14*8(%r6) - stfd %f30,93+15*8(%r6) - stfd %f31,93+16*8(%r6) + stfd %f14,112+0*8(%r6) + stfd %f15,112+1*8(%r6) + stfd %f16,112+2*8(%r6) + stfd %f17,112+3*8(%r6) + stfd %f18,112+4*8(%r6) + stfd %f19,112+5*8(%r6) + stfd %f20,112+6*8(%r6) + stfd %f21,112+7*8(%r6) + stfd %f22,112+8*8(%r6) + stfd %f23,112+9*8(%r6) + stfd %f24,112+10*8(%r6) + stfd %f25,112+11*8(%r6) + stfd %f26,112+12*8(%r6) + stfd %f27,112+13*8(%r6) + stfd %f28,112+14*8(%r6) + stfd %f29,112+15*8(%r6) + stfd %f30,112+16*8(%r6) + stfd %f31,112+17*8(%r6) li %r3,0 blr @@ -100,24 +100,24 @@ ENTRY(siglongjmp) lmw %r9,20(%r3) /* FPRs */ - lfd %f14,92+0*8(%r3) - lfd %f15,92+1*8(%r3) - lfd %f16,92+2*8(%r3) - lfd %f17,92+3*8(%r3) - lfd %f18,92+4*8(%r3) - lfd %f19,92+5*8(%r3) - lfd %f20,92+6*8(%r3) - lfd %f21,92+7*8(%r3) - lfd %f22,92+8*8(%r3) - lfd %f23,92+9*8(%r3) - lfd %f24,92+10*8(%r3) - lfd %f25,92+11*8(%r3) - lfd %f26,92+12*8(%r3) - lfd %f27,92+13*8(%r3) - lfd %f28,93+13*8(%r3) - lfd %f29,93+14*8(%r3) - lfd %f30,93+15*8(%r3) - lfd %f31,93+16*8(%r3) + lfd %f14,112+0*8(%r3) + lfd %f15,112+1*8(%r3) + lfd %f16,112+2*8(%r3) + lfd %f17,112+3*8(%r3) + lfd %f18,112+4*8(%r3) + lfd %f19,112+5*8(%r3) + lfd %f20,112+6*8(%r3) + lfd %f21,112+7*8(%r3) + lfd %f22,112+8*8(%r3) + lfd %f23,112+9*8(%r3) + lfd %f24,112+10*8(%r3) + lfd %f25,112+11*8(%r3) + lfd %f26,112+12*8(%r3) + lfd %f27,112+13*8(%r3) + lfd %f28,112+14*8(%r3) + lfd %f29,112+15*8(%r3) + lfd %f30,112+16*8(%r3) + lfd %f31,112+17*8(%r3) lwz %r7,0(%r3) mr %r6,%r4 From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 01:55:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62E0B10F; Wed, 8 Apr 2015 01:55:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43882AD; Wed, 8 Apr 2015 01:55:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t381tOu8092920; Wed, 8 Apr 2015 01:55:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t381tNJg092915; Wed, 8 Apr 2015 01:55:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504080155.t381tNJg092915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 8 Apr 2015 01:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281254 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:55:24 -0000 Author: kib Date: Wed Apr 8 01:55:22 2015 New Revision: 281254 URL: https://svnweb.freebsd.org/changeset/base/281254 Log: Account for the offset of the page run when allocating the dmar_map_entry. Non-zero offset both increases the required mapping size, which is handled in dmar_bus_dmamap_load_something1(), and makes it possible that allocated range crosses boundary, which needs a check in dmar_gas_match_one(). Reported and tested by: jimharris Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/busdma_dmar.c head/sys/x86/iommu/intel_dmar.h head/sys/x86/iommu/intel_gas.c Modified: head/sys/x86/iommu/busdma_dmar.c ============================================================================== --- head/sys/x86/iommu/busdma_dmar.c Wed Apr 8 01:43:29 2015 (r281253) +++ head/sys/x86/iommu/busdma_dmar.c Wed Apr 8 01:55:22 2015 (r281254) @@ -462,6 +462,7 @@ dmar_bus_dmamap_load_something1(struct b bus_size_t buflen1; int error, idx, gas_flags, seg; + KASSERT(offset < DMAR_PAGE_SIZE, ("offset %d", offset)); if (segs == NULL) segs = tag->segments; ctx = tag->ctx; @@ -476,7 +477,6 @@ dmar_bus_dmamap_load_something1(struct b } buflen1 = buflen > tag->common.maxsegsz ? tag->common.maxsegsz : buflen; - buflen -= buflen1; size = round_page(offset + buflen1); /* @@ -487,7 +487,7 @@ dmar_bus_dmamap_load_something1(struct b if (seg + 1 < tag->common.nsegments) gas_flags |= DMAR_GM_CANSPLIT; - error = dmar_gas_map(ctx, &tag->common, size, + error = dmar_gas_map(ctx, &tag->common, size, offset, DMAR_MAP_ENTRY_READ | DMAR_MAP_ENTRY_WRITE, gas_flags, ma + idx, &entry); if (error != 0) @@ -506,6 +506,10 @@ dmar_bus_dmamap_load_something1(struct b (uintmax_t)size, (uintmax_t)entry->start, (uintmax_t)entry->end)); } + if (offset + buflen1 > size) + buflen1 = size - offset; + if (buflen1 > tag->common.maxsegsz) + buflen1 = tag->common.maxsegsz; KASSERT(((entry->start + offset) & (tag->common.alignment - 1)) == 0, @@ -519,15 +523,16 @@ dmar_bus_dmamap_load_something1(struct b (uintmax_t)entry->start, (uintmax_t)entry->end, (uintmax_t)tag->common.lowaddr, (uintmax_t)tag->common.highaddr)); - KASSERT(dmar_test_boundary(entry->start, entry->end - - entry->start, tag->common.boundary), + KASSERT(dmar_test_boundary(entry->start + offset, buflen1, + tag->common.boundary), ("boundary failed: ctx %p start 0x%jx end 0x%jx " "boundary 0x%jx", ctx, (uintmax_t)entry->start, (uintmax_t)entry->end, (uintmax_t)tag->common.boundary)); KASSERT(buflen1 <= tag->common.maxsegsz, ("segment too large: ctx %p start 0x%jx end 0x%jx " - "maxsegsz 0x%jx", ctx, (uintmax_t)entry->start, - (uintmax_t)entry->end, (uintmax_t)tag->common.maxsegsz)); + "buflen1 0x%jx maxsegsz 0x%jx", ctx, + (uintmax_t)entry->start, (uintmax_t)entry->end, + (uintmax_t)buflen1, (uintmax_t)tag->common.maxsegsz)); DMAR_CTX_LOCK(ctx); TAILQ_INSERT_TAIL(&map->map_entries, entry, dmamap_link); @@ -541,6 +546,7 @@ dmar_bus_dmamap_load_something1(struct b idx += OFF_TO_IDX(trunc_page(offset + buflen1)); offset += buflen1; offset &= DMAR_PAGE_MASK; + buflen -= buflen1; } if (error == 0) *segp = seg; Modified: head/sys/x86/iommu/intel_dmar.h ============================================================================== --- head/sys/x86/iommu/intel_dmar.h Wed Apr 8 01:43:29 2015 (r281253) +++ head/sys/x86/iommu/intel_dmar.h Wed Apr 8 01:55:22 2015 (r281254) @@ -308,7 +308,7 @@ struct dmar_map_entry *dmar_gas_alloc_en void dmar_gas_free_entry(struct dmar_ctx *ctx, struct dmar_map_entry *entry); void dmar_gas_free_space(struct dmar_ctx *ctx, struct dmar_map_entry *entry); int dmar_gas_map(struct dmar_ctx *ctx, const struct bus_dma_tag_common *common, - dmar_gaddr_t size, u_int eflags, u_int flags, vm_page_t *ma, + dmar_gaddr_t size, int offset, u_int eflags, u_int flags, vm_page_t *ma, struct dmar_map_entry **res); void dmar_gas_free_region(struct dmar_ctx *ctx, struct dmar_map_entry *entry); int dmar_gas_map_region(struct dmar_ctx *ctx, struct dmar_map_entry *entry, Modified: head/sys/x86/iommu/intel_gas.c ============================================================================== --- head/sys/x86/iommu/intel_gas.c Wed Apr 8 01:43:29 2015 (r281253) +++ head/sys/x86/iommu/intel_gas.c Wed Apr 8 01:55:22 2015 (r281254) @@ -294,6 +294,7 @@ dmar_gas_fini_ctx(struct dmar_ctx *ctx) struct dmar_gas_match_args { struct dmar_ctx *ctx; dmar_gaddr_t size; + int offset; const struct bus_dma_tag_common *common; u_int gas_flags; struct dmar_map_entry *entry; @@ -310,25 +311,28 @@ dmar_gas_match_one(struct dmar_gas_match /* DMAR_PAGE_SIZE to create gap after new entry. */ if (a->entry->start < prev->end + DMAR_PAGE_SIZE || - a->entry->start + a->size + DMAR_PAGE_SIZE > prev->end + - prev->free_after) + a->entry->start + a->size + a->offset + DMAR_PAGE_SIZE > + prev->end + prev->free_after) return (false); /* No boundary crossing. */ - if (dmar_test_boundary(a->entry->start, a->size, a->common->boundary)) + if (dmar_test_boundary(a->entry->start + a->offset, a->size, + a->common->boundary)) return (true); /* - * The start to start + size region crosses the boundary. - * Check if there is enough space after the next boundary - * after the prev->end. + * The start + offset to start + offset + size region crosses + * the boundary. Check if there is enough space after the + * next boundary after the prev->end. */ - bs = (a->entry->start + a->common->boundary) & ~(a->common->boundary - - 1); + bs = (a->entry->start + a->offset + a->common->boundary) & + ~(a->common->boundary - 1); start = roundup2(bs, a->common->alignment); /* DMAR_PAGE_SIZE to create gap after new entry. */ - if (start + a->size + DMAR_PAGE_SIZE <= prev->end + prev->free_after && - start + a->size <= end && dmar_test_boundary(start, a->size, + if (start + a->offset + a->size + DMAR_PAGE_SIZE <= + prev->end + prev->free_after && + start + a->offset + a->size <= end && + dmar_test_boundary(start + a->offset, a->size, a->common->boundary)) { a->entry->start = start; return (true); @@ -410,7 +414,7 @@ dmar_gas_lowermatch(struct dmar_gas_matc return (0); } } - if (prev->free_down < a->size + DMAR_PAGE_SIZE) + if (prev->free_down < a->size + a->offset + DMAR_PAGE_SIZE) return (ENOMEM); l = RB_LEFT(prev, rb_entry); if (l != NULL) { @@ -466,7 +470,7 @@ dmar_gas_uppermatch(struct dmar_gas_matc static int dmar_gas_find_space(struct dmar_ctx *ctx, const struct bus_dma_tag_common *common, dmar_gaddr_t size, - u_int flags, struct dmar_map_entry *entry) + int offset, u_int flags, struct dmar_map_entry *entry) { struct dmar_gas_match_args a; int error; @@ -477,6 +481,7 @@ dmar_gas_find_space(struct dmar_ctx *ctx a.ctx = ctx; a.size = size; + a.offset = offset; a.common = common; a.gas_flags = flags; a.entry = entry; @@ -618,7 +623,7 @@ dmar_gas_free_region(struct dmar_ctx *ct int dmar_gas_map(struct dmar_ctx *ctx, const struct bus_dma_tag_common *common, - dmar_gaddr_t size, u_int eflags, u_int flags, vm_page_t *ma, + dmar_gaddr_t size, int offset, u_int eflags, u_int flags, vm_page_t *ma, struct dmar_map_entry **res) { struct dmar_map_entry *entry; @@ -632,7 +637,7 @@ dmar_gas_map(struct dmar_ctx *ctx, const if (entry == NULL) return (ENOMEM); DMAR_CTX_LOCK(ctx); - error = dmar_gas_find_space(ctx, common, size, flags, entry); + error = dmar_gas_find_space(ctx, common, size, offset, flags, entry); if (error == ENOMEM) { DMAR_CTX_UNLOCK(ctx); dmar_gas_free_entry(ctx, entry); From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 02:36:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6FB5D91; Wed, 8 Apr 2015 02:36:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E3516ED; Wed, 8 Apr 2015 02:36:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t382aeLr012115; Wed, 8 Apr 2015 02:36:40 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t382acCL012107; Wed, 8 Apr 2015 02:36:38 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504080236.t382acCL012107@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 8 Apr 2015 02:36:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281257 - in head: cddl/contrib/opensolaris/lib/libdtrace/common cddl/lib/libdtrace sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/contrib/opensolaris/uts/common/sys sys/cddl/d... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 02:36:40 -0000 Author: markj Date: Wed Apr 8 02:36:37 2015 New Revision: 281257 URL: https://svnweb.freebsd.org/changeset/base/281257 Log: libdtrace: add support for lazyload mode. Passing "-x lazyload" to dtrace -G during compilation causes dtrace(1) to not link drti.o into the output object file, so the USDT probes are not created during process startup. Instead, dtrace(1) will automatically discover and create probes on the process' behalf when attaching. Differential Revision: https://reviews.freebsd.org/D2203 Reviewed by: rpaulo MFC after: 1 month Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c head/cddl/lib/libdtrace/libproc_compat.h head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h head/sys/cddl/dev/dtrace/dtrace_ioctl.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Wed Apr 8 02:21:44 2015 (r281256) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Wed Apr 8 02:36:37 2015 (r281257) @@ -147,6 +147,9 @@ dtrace_dof_init(void) dh.dofhp_dof = (uintptr_t)dof; dh.dofhp_addr = elf->e_type == ET_DYN ? (uintptr_t) lmp->l_addr : 0; +#ifdef __FreeBSD__ + dh.dofhp_pid = getpid(); +#endif if (lmid == 0) { (void) snprintf(dh.dofhp_mod, sizeof (dh.dofhp_mod), @@ -184,7 +187,7 @@ dtrace_dof_init(void) else { dprintf(1, "DTrace ioctl succeeded for DOF at %p\n", dof); #ifdef __FreeBSD__ - gen = dh.gen; + gen = dh.dofhp_gen; #endif } Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Wed Apr 8 02:21:44 2015 (r281256) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Wed Apr 8 02:36:37 2015 (r281257) @@ -1785,11 +1785,17 @@ dtrace_program_link(dtrace_hdl_t *dtp, d "failed to open %s: %s", file, strerror(errno))); } #else - snprintf(tfile, sizeof(tfile), "%s.XXXXXX", file); - if ((fd = mkstemp(tfile)) == -1) - return (dt_link_error(dtp, NULL, -1, NULL, - "failed to create temporary file %s: %s", - tfile, strerror(errno))); + if (dtp->dt_lazyload) { + if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC, 0666)) < 0) + return (dt_link_error(dtp, NULL, -1, NULL, + "failed to open %s: %s", file, strerror(errno))); + } else { + snprintf(tfile, sizeof(tfile), "%s.XXXXXX", file); + if ((fd = mkstemp(tfile)) == -1) + return (dt_link_error(dtp, NULL, -1, NULL, + "failed to create temporary file %s: %s", + tfile, strerror(errno))); + } #endif /* Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c Wed Apr 8 02:21:44 2015 (r281256) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c Wed Apr 8 02:36:37 2015 (r281257) @@ -44,10 +44,15 @@ #include #include #include +#include + #ifndef illumos +#include +#include #include +#include +#include #endif -#include typedef struct dt_pid_probe { dtrace_hdl_t *dpp_dtp; @@ -566,6 +571,12 @@ dt_pid_usdt_mapping(void *data, const pr prsyminfo_t sip; dof_helper_t dh; GElf_Half e_type; +#ifdef __FreeBSD__ + dof_hdr_t hdr; + size_t sz; + uint64_t dofmax; + void *dof; +#endif const char *mname; const char *syms[] = { "___SUNW_dof", "__SUNW_dof" }; int i, fd = -1; @@ -595,17 +606,61 @@ dt_pid_usdt_mapping(void *data, const pr continue; } - dh.dofhp_dof = sym.st_value; +#ifdef __FreeBSD__ dh.dofhp_addr = (e_type == ET_EXEC) ? 0 : pmp->pr_vaddr; + if (Pread(P, &hdr, sizeof (hdr), sym.st_value) != + sizeof (hdr)) { + dt_dprintf("read of DOF header failed\n"); + continue; + } + + sz = sizeof(dofmax); + if (sysctlbyname("kern.dtrace.dof_maxsize", &dofmax, &sz, + NULL, 0) != 0) { + dt_dprintf("failed to read dof_maxsize: %s\n", + strerror(errno)); + continue; + } + if (dofmax < hdr.dofh_loadsz) { + dt_dprintf("DOF load size exceeds maximum\n"); + continue; + } + + if ((dof = malloc(hdr.dofh_loadsz)) == NULL) + return (-1); + + if (Pread(P, dof, hdr.dofh_loadsz, sym.st_value) != + hdr.dofh_loadsz) { + free(dof); + dt_dprintf("read of DOF section failed\n"); + continue; + } + + dh.dofhp_dof = (uintptr_t)dof; + dh.dofhp_pid = proc_getpid(P); dt_pid_objname(dh.dofhp_mod, sizeof (dh.dofhp_mod), -#ifdef illumos sip.prs_lmid, mname); + + if (fd == -1 && + (fd = open("/dev/dtrace/helper", O_RDWR, 0)) < 0) { + dt_dprintf("open of helper device failed: %s\n", + strerror(errno)); + free(dof); + return (-1); /* errno is set for us */ + } + + if (ioctl(fd, DTRACEHIOC_ADDDOF, &dh, sizeof (dh)) < 0) + dt_dprintf("DOF was rejected for %s\n", dh.dofhp_mod); + + free(dof); #else - 0, mname); -#endif + dh.dofhp_dof = sym.st_value; + dh.dofhp_addr = (e_type == ET_EXEC) ? 0 : pmp->pr_vaddr; + + dt_pid_objname(dh.dofhp_mod, sizeof (dh.dofhp_mod), + sip.prs_lmid, mname); -#ifdef illumos if (fd == -1 && (fd = pr_open(P, "/dev/dtrace/helper", O_RDWR, 0)) < 0) { dt_dprintf("pr_open of helper device failed: %s\n", @@ -618,8 +673,10 @@ dt_pid_usdt_mapping(void *data, const pr #endif } -#ifdef illumos if (fd != -1) +#ifdef __FreeBSD__ + (void) close(fd); +#else (void) pr_close(P, fd); #endif @@ -634,7 +691,6 @@ dt_pid_create_usdt_probes(dtrace_probede int ret = 0; assert(DT_MUTEX_HELD(&dpr->dpr_lock)); -#ifdef illumos (void) Pupdate_maps(P); if (Pobject_iter(P, dt_pid_usdt_mapping, P) != 0) { ret = -1; @@ -646,9 +702,6 @@ dt_pid_create_usdt_probes(dtrace_probede (int)proc_getpid(P), strerror(errno)); #endif } -#else - ret = 0; -#endif /* * Put the module name in its canonical form. Modified: head/cddl/lib/libdtrace/libproc_compat.h ============================================================================== --- head/cddl/lib/libdtrace/libproc_compat.h Wed Apr 8 02:21:44 2015 (r281256) +++ head/cddl/lib/libdtrace/libproc_compat.h Wed Apr 8 02:36:37 2015 (r281257) @@ -59,6 +59,6 @@ #define Pstate proc_state #define Psymbol_iter_by_addr proc_iter_symbyaddr #define Punsetflags proc_clearflags -#define Pupdate_maps(p) do { } while (0) +#define Pupdate_maps proc_rdagent #define Pupdate_syms proc_updatesyms #define Pxecbkpt proc_bkptexec Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed Apr 8 02:21:44 2015 (r281256) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed Apr 8 02:36:37 2015 (r281257) @@ -15374,13 +15374,15 @@ dtrace_helper_action_destroy(dtrace_help } static int -dtrace_helper_destroygen(int gen) +dtrace_helper_destroygen(dtrace_helpers_t *help, int gen) { proc_t *p = curproc; - dtrace_helpers_t *help = p->p_dtrace_helpers; dtrace_vstate_t *vstate; int i; + if (help == NULL) + help = p->p_dtrace_helpers; + ASSERT(MUTEX_HELD(&dtrace_lock)); if (help == NULL || gen > help->dthps_generation) @@ -15478,9 +15480,9 @@ dtrace_helper_validate(dtrace_helper_act } static int -dtrace_helper_action_add(int which, dtrace_ecbdesc_t *ep) +dtrace_helper_action_add(int which, dtrace_ecbdesc_t *ep, + dtrace_helpers_t *help) { - dtrace_helpers_t *help; dtrace_helper_action_t *helper, *last; dtrace_actdesc_t *act; dtrace_vstate_t *vstate; @@ -15490,7 +15492,6 @@ dtrace_helper_action_add(int which, dtra if (which < 0 || which >= DTRACE_NHELPER_ACTIONS) return (EINVAL); - help = curproc->p_dtrace_helpers; last = help->dthps_actions[which]; vstate = &help->dthps_vstate; @@ -15614,15 +15615,12 @@ dtrace_helper_provider_register(proc_t * } static int -dtrace_helper_provider_add(dof_helper_t *dofhp, int gen) +dtrace_helper_provider_add(dof_helper_t *dofhp, dtrace_helpers_t *help, int gen) { - dtrace_helpers_t *help; dtrace_helper_provider_t *hprov, **tmp_provs; uint_t tmp_maxprovs, i; ASSERT(MUTEX_HELD(&dtrace_lock)); - - help = curproc->p_dtrace_helpers; ASSERT(help != NULL); /* @@ -15914,13 +15912,28 @@ dtrace_helper_slurp(dof_hdr_t *dof, dof_ dtrace_helpers_t *help; dtrace_vstate_t *vstate; dtrace_enabling_t *enab = NULL; + proc_t *p = curproc; int i, gen, rv, nhelpers = 0, nprovs = 0, destroy = 1; uintptr_t daddr = (uintptr_t)dof; ASSERT(MUTEX_HELD(&dtrace_lock)); - if ((help = curproc->p_dtrace_helpers) == NULL) - help = dtrace_helpers_create(curproc); +#ifdef __FreeBSD__ + if (dhp->dofhp_pid != p->p_pid) { + if ((p = pfind(dhp->dofhp_pid)) == NULL) + return (-1); + if (!P_SHOULDSTOP(p) || + (p->p_flag & P_TRACED) == 0 || + p->p_pptr->p_pid != curproc->p_pid) { + PROC_UNLOCK(p); + return (-1); + } + PROC_UNLOCK(p); + } +#endif + + if ((help = p->p_dtrace_helpers) == NULL) + help = dtrace_helpers_create(p); vstate = &help->dthps_vstate; @@ -15968,12 +15981,13 @@ dtrace_helper_slurp(dof_hdr_t *dof, dof_ continue; if ((rv = dtrace_helper_action_add(DTRACE_HELPER_ACTION_USTACK, - ep)) != 0) { + ep, help)) != 0) { /* * Adding this helper action failed -- we are now going * to rip out the entire generation and return failure. */ - (void) dtrace_helper_destroygen(help->dthps_generation); + (void) dtrace_helper_destroygen(help, + help->dthps_generation); dtrace_enabling_destroy(enab); dtrace_dof_destroy(dof); return (-1); @@ -15990,9 +16004,9 @@ dtrace_helper_slurp(dof_hdr_t *dof, dof_ if (dhp != NULL && nprovs > 0) { dhp->dofhp_dof = (uint64_t)(uintptr_t)dof; - if (dtrace_helper_provider_add(dhp, gen) == 0) { + if (dtrace_helper_provider_add(dhp, help, gen) == 0) { mutex_exit(&dtrace_lock); - dtrace_helper_provider_register(curproc, help, dhp); + dtrace_helper_provider_register(p, help, dhp); mutex_enter(&dtrace_lock); destroy = 0; @@ -16956,7 +16970,7 @@ dtrace_ioctl_helper(int cmd, intptr_t ar case DTRACEHIOC_REMOVE: { mutex_enter(&dtrace_lock); - rval = dtrace_helper_destroygen(arg); + rval = dtrace_helper_destroygen(NULL, arg); mutex_exit(&dtrace_lock); return (rval); Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Wed Apr 8 02:21:44 2015 (r281256) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Wed Apr 8 02:36:37 2015 (r281257) @@ -1423,8 +1423,9 @@ typedef struct dof_helper { char dofhp_mod[DTRACE_MODNAMELEN]; /* executable or library name */ uint64_t dofhp_addr; /* base address of object */ uint64_t dofhp_dof; /* address of helper DOF */ -#ifndef illumos - int gen; +#ifdef __FreeBSD__ + pid_t dofhp_pid; /* target process ID */ + int dofhp_gen; #endif } dof_helper_t; Modified: head/sys/cddl/dev/dtrace/dtrace_ioctl.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_ioctl.c Wed Apr 8 02:21:44 2015 (r281256) +++ head/sys/cddl/dev/dtrace/dtrace_ioctl.c Wed Apr 8 02:36:37 2015 (r281257) @@ -32,9 +32,9 @@ static int dtrace_ioctl_helper(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { - int rval; dof_helper_t *dhp = NULL; dof_hdr_t *dof = NULL; + int rval; switch (cmd) { case DTRACEHIOC_ADDDOF: @@ -51,7 +51,7 @@ dtrace_ioctl_helper(struct cdev *dev, u_ mutex_enter(&dtrace_lock); if ((rval = dtrace_helper_slurp((dof_hdr_t *)dof, dhp)) != -1) { if (dhp) { - dhp->gen = rval; + dhp->dofhp_gen = rval; copyout(dhp, addr, sizeof(*dhp)); } rval = 0; @@ -59,10 +59,11 @@ dtrace_ioctl_helper(struct cdev *dev, u_ rval = EINVAL; } mutex_exit(&dtrace_lock); + return (rval); case DTRACEHIOC_REMOVE: mutex_enter(&dtrace_lock); - rval = dtrace_helper_destroygen((int)*addr); + rval = dtrace_helper_destroygen(NULL, (int)*addr); mutex_exit(&dtrace_lock); return (rval); From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 02:43:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E83B1143; Wed, 8 Apr 2015 02:43:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B921081B; Wed, 8 Apr 2015 02:43:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t382h6YR016251; Wed, 8 Apr 2015 02:43:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t382h697016245; Wed, 8 Apr 2015 02:43:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201504080243.t382h697016245@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 8 Apr 2015 02:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281258 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 02:43:07 -0000 Author: markj Date: Wed Apr 8 02:43:05 2015 New Revision: 281258 URL: https://svnweb.freebsd.org/changeset/base/281258 Log: Add a DTRACEFLAGS variable, which can be used to pass additional variables to dtrace(1) invocations during a build. This change includes -C in the default flags, which has dtrace(1) run input scripts through the preprocessor. While here, sort the definitions of CP and CPP in sys.mk. Differential Revision: https://reviews.freebsd.org/D2204 Reviewed by: imp, rpaulo (previous revision) Modified: head/share/mk/bsd.dep.mk head/share/mk/sys.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Wed Apr 8 02:36:37 2015 (r281257) +++ head/share/mk/bsd.dep.mk Wed Apr 8 02:43:05 2015 (r281258) @@ -128,18 +128,18 @@ CFLAGS+= -I${.OBJDIR} .for _D in ${_DSRC:R} DHDRS+= ${_D}.h ${_D}.h: ${_DSRC} - ${DTRACE} -xnolibs -h -s ${.ALLSRC} + ${DTRACE} ${DTRACEFLAGS} -h -s ${.ALLSRC} SRCS:= ${SRCS:S/^${_DSRC}$//} OBJS+= ${_D}.o CLEANFILES+= ${_D}.h ${_D}.o ${_D}.o: ${_DSRC} ${OBJS:S/^${_D}.o$//} - ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.ALLSRC} + ${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC} .if defined(LIB) CLEANFILES+= ${_D}.So ${_D}.po ${_D}.So: ${_DSRC} ${SOBJS:S/^${_D}.So$//} - ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.ALLSRC} + ${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC} ${_D}.po: ${_DSRC} ${POBJS:S/^${_D}.po$//} - ${DTRACE} -xnolibs -G -o ${.TARGET} -s ${.ALLSRC} + ${DTRACE} ${DTRACEFLAGS} -G -o ${.TARGET} -s ${.ALLSRC} .endif .endfor .endfor Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Wed Apr 8 02:36:37 2015 (r281257) +++ head/share/mk/sys.mk Wed Apr 8 02:43:05 2015 (r281258) @@ -62,17 +62,18 @@ CFLAGS += -fno-strict-aliasing .endif PO_CFLAGS ?= ${CFLAGS} +# cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle +# read-only files as non-root by passing -f. +CP ?= cp -f + +CPP ?= cpp + # C Type Format data is required for DTrace CTFFLAGS ?= -L VERSION CTFCONVERT ?= ctfconvert CTFMERGE ?= ctfmerge -# cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle -# read-only files as non-root by passing -f. -CP ?= cp -f - -DTRACE ?= dtrace .if defined(CFLAGS) && (${CFLAGS:M-g} != "") CTFFLAGS += -g .endif @@ -81,7 +82,8 @@ CXX ?= c++ CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign:N-Wold-style-definition} PO_CXXFLAGS ?= ${CXXFLAGS} -CPP ?= cpp +DTRACE ?= dtrace +DTRACEFLAGS ?= -C -x nolibs .if empty(.MAKEFLAGS:M-s) ECHO ?= echo From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 04:01:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B3D8F53; Wed, 8 Apr 2015 04:01:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76F17FEA; Wed, 8 Apr 2015 04:01:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3841373053402; Wed, 8 Apr 2015 04:01:03 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38413Ki053378; Wed, 8 Apr 2015 04:01:03 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504080401.t38413Ki053378@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 8 Apr 2015 04:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281260 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 04:01:03 -0000 Author: eadler Date: Wed Apr 8 04:01:02 2015 New Revision: 281260 URL: https://svnweb.freebsd.org/changeset/base/281260 Log: newvers.sh: remove 'X' hack from shell script Reviewed by: allanjude, Daniel O'Connor Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Wed Apr 8 03:55:02 2015 (r281259) +++ head/sys/conf/newvers.sh Wed Apr 8 04:01:02 2015 (r281260) @@ -33,17 +33,17 @@ TYPE="FreeBSD" REVISION="11.0" BRANCH="CURRENT" -if [ "X${BRANCH_OVERRIDE}" != "X" ]; then +if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi RELEASE="${REVISION}-${BRANCH}" VERSION="${TYPE} ${RELEASE}" -if [ "X${SYSDIR}" = "X" ]; then +if [ -z "${SYSDIR}" ]; then SYSDIR=$(dirname $0)/.. fi -if [ "X${PARAMFILE}" != "X" ]; then +if [ -n "${PARAMFILE}" ]; then RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ ${PARAMFILE}) else @@ -72,7 +72,7 @@ do done # no copyright found, use a dummy -if [ X"$COPYRIGHT" = X ]; then +if [ -z "$COPYRIGHT" ]; then COPYRIGHT="/*- * Copyright (c) 1992-$year The FreeBSD Project. * All rights reserved. From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 04:35:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FA98457; Wed, 8 Apr 2015 04:35:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B6DC39C; Wed, 8 Apr 2015 04:35:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t384ZRt7069006; Wed, 8 Apr 2015 04:35:27 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t384ZRUA069005; Wed, 8 Apr 2015 04:35:27 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504080435.t384ZRUA069005@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 8 Apr 2015 04:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281261 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 04:35:28 -0000 Author: jhibbits Date: Wed Apr 8 04:35:26 2015 New Revision: 281261 URL: https://svnweb.freebsd.org/changeset/base/281261 Log: Add DTrace support for Book-E PowerPC. Book-E got DTrace support for free with r281096&related. This adds the bits to the db_trap_glue() to support FBT. Relnotes: Yes Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Wed Apr 8 04:01:02 2015 (r281260) +++ head/sys/powerpc/powerpc/trap.c Wed Apr 8 04:35:26 2015 (r281261) @@ -796,8 +796,12 @@ db_trap_glue(struct trapframe *frame) { if (!(frame->srr1 & PSL_PR) && (frame->exc == EXC_TRC || frame->exc == EXC_RUNMODETRC +#ifdef AIM || (frame->exc == EXC_PGM && (frame->srr1 & 0x20000)) +#else + || (frame->exc == EXC_DEBUG) +#endif || frame->exc == EXC_BPT || frame->exc == EXC_DSI)) { int type = frame->exc; @@ -805,7 +809,11 @@ db_trap_glue(struct trapframe *frame) /* Ignore DTrace traps. */ if (*(uint32_t *)frame->srr0 == EXC_DTRACE) return (0); +#ifdef AIM if (type == EXC_PGM && (frame->srr1 & 0x20000)) { +#else + if (frame->cpu.booke.esr & ESR_PTR) { +#endif type = T_BREAKPOINT; } return (kdb_trap(type, 0, frame)); From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 04:37:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF4115B3; Wed, 8 Apr 2015 04:37:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AE503CD; Wed, 8 Apr 2015 04:37:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t384bCfC069318; Wed, 8 Apr 2015 04:37:12 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t384bCTB069317; Wed, 8 Apr 2015 04:37:12 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504080437.t384bCTB069317@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 8 Apr 2015 04:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281262 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 04:37:12 -0000 Author: jhibbits Date: Wed Apr 8 04:37:11 2015 New Revision: 281262 URL: https://svnweb.freebsd.org/changeset/base/281262 Log: Clean up printtrap a little. * Sort exceptions * Add printing of ESR on book-e, and only print DSISR on AIM Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Wed Apr 8 04:35:26 2015 (r281261) +++ head/sys/powerpc/powerpc/trap.c Wed Apr 8 04:37:11 2015 (r281262) @@ -407,19 +407,25 @@ printtrap(u_int vector, struct trapframe printf("\n"); printf(" exception = 0x%x (%s)\n", vector, trapname(vector)); switch (vector) { - case EXC_DTMISS: case EXC_DSE: case EXC_DSI: + case EXC_DTMISS: printf(" virtual address = 0x%" PRIxPTR "\n", frame->dar); +#ifdef AIM printf(" dsisr = 0x%" PRIxPTR "\n", frame->cpu.aim.dsisr); +#endif break; - case EXC_ITMISS: case EXC_ISE: case EXC_ISI: + case EXC_ITMISS: printf(" virtual address = 0x%" PRIxPTR "\n", frame->srr0); break; } +#ifdef BOOKE + printf(" esr = 0x%" PRIxPTR "\n", + frame->cpu.booke.esr); +#endif printf(" srr0 = 0x%" PRIxPTR "\n", frame->srr0); printf(" srr1 = 0x%" PRIxPTR "\n", frame->srr1); printf(" lr = 0x%" PRIxPTR "\n", frame->lr); From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 08:48:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55358376; Wed, 8 Apr 2015 08:48:42 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D342522B; Wed, 8 Apr 2015 08:48:41 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t388mdOc096352 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 8 Apr 2015 11:48:39 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t388mdwr096351; Wed, 8 Apr 2015 11:48:39 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 8 Apr 2015 11:48:39 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r281239 - head/sys/netinet Message-ID: <20150408084839.GO64665@FreeBSD.org> References: <201504072309.t37N9Zwf011383@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504072309.t37N9Zwf011383@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 08:48:42 -0000 On Tue, Apr 07, 2015 at 11:09:35PM +0000, Adrian Chadd wrote: A> Author: adrian A> Date: Tue Apr 7 23:09:34 2015 A> New Revision: 281239 A> URL: https://svnweb.freebsd.org/changeset/base/281239 A> A> Log: A> Move the IPv4 reassembly queue locking from a single lock to be per-bucket (global). A> A> This significantly improves performance on multi-core servers where there A> is any kind of IPv4 reassembly going on. A> A> glebius@ would like to see the locking moved to be attached to the reassembly A> bucket, which would make it per-bucket + per-VNET, instead of being global. A> I decided to keep it global for now as it's the minimal useful change; A> if people agree / wish to migrate it to be per-bucket / per-VNET then please A> do feel free to do so. I won't complain. A> A> Thanks to Norse Corp for giving me access to much larger servers A> to test this at across the 4 core boxes I have at home. A> A> Differential Revision: https://reviews.freebsd.org/D2095 A> Reviewed by: glebius (initial comments incorporated into this patch) No, they are not. Also, I just noticed another issue with the patch. You initialize the mutexes, which are global, in the ip_init() which is called for every VNET. That would lead to panic of initializing already initialized mutex. If you followed my advice, that would not happen. Now VIMAGE+INVARIANTS is broken instantly, and w/o INVARIANTS may panic if VIMAGE created under IP traffic. My comment that purging from a bucket that is determined by source IP has security implications was also ignored. I will fix this all myself. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 10:28:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3262189F; Wed, 8 Apr 2015 10:28:47 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AC3DCED5; Wed, 8 Apr 2015 10:28:45 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t38ASg4x087285 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 8 Apr 2015 13:28:42 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t38ASgVE087284; Wed, 8 Apr 2015 13:28:42 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 8 Apr 2015 13:28:42 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r281239 - head/sys/netinet Message-ID: <20150408102842.GQ64665@FreeBSD.org> References: <201504072309.t37N9Zwf011383@svn.freebsd.org> <20150408084839.GO64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150408084839.GO64665@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 10:28:47 -0000 On Wed, Apr 08, 2015 at 11:48:39AM +0300, Gleb Smirnoff wrote: T> On Tue, Apr 07, 2015 at 11:09:35PM +0000, Adrian Chadd wrote: T> A> Author: adrian T> A> Date: Tue Apr 7 23:09:34 2015 T> A> New Revision: 281239 T> A> URL: https://svnweb.freebsd.org/changeset/base/281239 T> A> T> A> Log: T> A> Move the IPv4 reassembly queue locking from a single lock to be per-bucket (global). T> A> T> A> This significantly improves performance on multi-core servers where there T> A> is any kind of IPv4 reassembly going on. T> A> T> A> glebius@ would like to see the locking moved to be attached to the reassembly T> A> bucket, which would make it per-bucket + per-VNET, instead of being global. T> A> I decided to keep it global for now as it's the minimal useful change; T> A> if people agree / wish to migrate it to be per-bucket / per-VNET then please T> A> do feel free to do so. I won't complain. T> A> T> A> Thanks to Norse Corp for giving me access to much larger servers T> A> to test this at across the 4 core boxes I have at home. T> A> T> A> Differential Revision: https://reviews.freebsd.org/D2095 T> A> Reviewed by: glebius (initial comments incorporated into this patch) T> T> No, they are not. T> T> Also, I just noticed another issue with the patch. You initialize the mutexes, T> which are global, in the ip_init() which is called for every VNET. That would T> lead to panic of initializing already initialized mutex. If you followed my advice, T> that would not happen. Now VIMAGE+INVARIANTS is broken instantly, and w/o T> INVARIANTS may panic if VIMAGE created under IP traffic. T> T> My comment that purging from a bucket that is determined by source IP has T> security implications was also ignored. T> T> I will fix this all myself. Another issue is that now V_nipq is not protected by a global lock and its value would leak. I'm working on a patch. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 11:59:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 049AAB80; Wed, 8 Apr 2015 11:59:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1D59AD8; Wed, 8 Apr 2015 11:59:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t38Bx1fs074403; Wed, 8 Apr 2015 11:59:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38Bx1px074402; Wed, 8 Apr 2015 11:59:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504081159.t38Bx1px074402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 8 Apr 2015 11:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281265 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 11:59:02 -0000 Author: trasz Date: Wed Apr 8 11:59:00 2015 New Revision: 281265 URL: https://svnweb.freebsd.org/changeset/base/281265 Log: Add a hint that "device ctl" kind of depends on "device iscsi". It actually doesn't - "device ctl" automatically pulls in ICL, which would normally be a part of iscsi.ko. However, doing it that way makes iscsi.ko unloadable, and building ctl.ko without iscsi.ko (using MODULES_OVERRIDE) results in ctl.ko that is unloadable, due to missing symbols that would be resolved to iscsi.ko. And since the symbols are named "icl_whatever", it's not obvious that it's iscsi.ko that's required. If there is a better way - let me know. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/ctl.4 Modified: head/share/man/man4/ctl.4 ============================================================================== --- head/share/man/man4/ctl.4 Wed Apr 8 05:02:21 2015 (r281264) +++ head/share/man/man4/ctl.4 Wed Apr 8 11:59:00 2015 (r281265) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd October 23, 2014 +.Dd April 8, 2015 .Dt CTL 4 .Os .Sh NAME @@ -34,6 +34,7 @@ To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device iscsi" .Cd "device ctl" .Ed .Pp From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 16:26:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E605790; Wed, 8 Apr 2015 16:26:30 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDD8018A; Wed, 8 Apr 2015 16:26:30 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 83F46B924; Wed, 8 Apr 2015 12:26:29 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r281188 - head/usr.bin/netstat Date: Wed, 08 Apr 2015 12:24:48 -0400 Message-ID: <6969546.Tk7XnsGrVd@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201504070550.t375oklh014315@svn.freebsd.org> References: <201504070550.t375oklh014315@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 08 Apr 2015 12:26:29 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 16:26:31 -0000 On Tuesday, April 07, 2015 05:50:46 AM Gleb Smirnoff wrote: > Author: glebius > Date: Tue Apr 7 05:50:45 2015 > New Revision: 281188 > URL: https://svnweb.freebsd.org/changeset/base/281188 > > Log: > Like it was already done for 'netstat -i', drop the kvm(3) support > in 'netstat -r'. > > The netstat/route.c was the last abuser of struct ifnet and struct > rtentry in the tree. With this change if_var.h can become kernel > only include, _WANT_RTENTRY can go away and projects/ifnet and > projects/routing can go forward. > > Differential Revision: https://reviews.freebsd.org/D2242 > Reviewed by: melifaro, gnn > Sponsored by: Nginx, Inc. > Sponsored by: Netflix This breaks netstat -r on a crashdump. Just because you don't find this information useful during post-mortem debugging doesn't mean that other folks do not. The easiest solution is to update crashinfo to remove the netstat commands it runs. However, I don't understand the fear that system binaries can peek inside the kernel for debugging info. It's ok for it to be a fragile ABI that isn't exposed to normal applications and to require people to keep a matching netstat with their kernel (along with the other tools crashinfo calls). Just update the code in netstat to cope with the new data structures. That should be much easier to test than having to convert N device drivers. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 16:30:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E952F299; Wed, 8 Apr 2015 16:30:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9E9C27D; Wed, 8 Apr 2015 16:30:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t38GUmkg003519; Wed, 8 Apr 2015 16:30:48 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38GUk8a003504; Wed, 8 Apr 2015 16:30:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504081630.t38GUk8a003504@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 8 Apr 2015 16:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281266 - in head: sys/compat/freebsd32 sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include usr.bin/gcore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 16:30:49 -0000 Author: jhb Date: Wed Apr 8 16:30:45 2015 New Revision: 281266 URL: https://svnweb.freebsd.org/changeset/base/281266 Log: Move the 32-bit compatible procfs types from freebsd32.h to and export them to userland. - Define __HAVE_REG32 on platforms that define a reg32 structure and check for this in to control when to export prstatus32, etc. - Add prstatus32_t and prpsinfo32_t typedefs for the 32-bit structures. libbfd looks for these types, and having them fixes 'gcore' in gdb of a 32-bit process on a 64-bit platform. - Use the structure definitions from in gcore's elf32 core dump code instead of duplicating the definitions. Differential Revision: https://reviews.freebsd.org/D2142 Reviewed by: kib, nathanw (powerpc bits) MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32.h head/sys/mips/include/reg.h head/sys/powerpc/include/reg.h head/sys/sparc64/include/reg.h head/sys/sys/procfs.h head/sys/x86/include/reg.h head/usr.bin/gcore/elf32core.c Modified: head/sys/compat/freebsd32/freebsd32.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32.h Wed Apr 8 11:59:00 2015 (r281265) +++ head/sys/compat/freebsd32/freebsd32.h Wed Apr 8 16:30:45 2015 (r281266) @@ -243,32 +243,6 @@ struct i386_ldt_args32 { uint32_t num; }; -/* - * Alternative layouts for - */ -struct prstatus32 { - int pr_version; - u_int pr_statussz; - u_int pr_gregsetsz; - u_int pr_fpregsetsz; - int pr_osreldate; - int pr_cursig; - pid_t pr_pid; - struct reg32 pr_reg; -}; - -struct prpsinfo32 { - int pr_version; - u_int pr_psinfosz; - char pr_fname[PRFNAMESZ+1]; - char pr_psargs[PRARGSZ+1]; -}; - -struct thrmisc32 { - char pr_tname[MAXCOMLEN+1]; - u_int _pad; -}; - struct mq_attr32 { int mq_flags; int mq_maxmsg; Modified: head/sys/mips/include/reg.h ============================================================================== --- head/sys/mips/include/reg.h Wed Apr 8 11:59:00 2015 (r281265) +++ head/sys/mips/include/reg.h Wed Apr 8 16:30:45 2015 (r281266) @@ -70,7 +70,7 @@ struct dbreg { unsigned long junk; }; -#ifdef COMPAT_FREEBSD32 +#ifdef __LP64__ /* Must match struct trapframe */ struct reg32 { uint32_t r_regs[NUMSAVEREGS]; @@ -83,6 +83,8 @@ struct fpreg32 { struct dbreg32 { uint32_t junk; }; + +#define __HAVE_REG32 #endif #ifdef _KERNEL Modified: head/sys/powerpc/include/reg.h ============================================================================== --- head/sys/powerpc/include/reg.h Wed Apr 8 11:59:00 2015 (r281265) +++ head/sys/powerpc/include/reg.h Wed Apr 8 16:30:45 2015 (r281266) @@ -39,7 +39,7 @@ struct dbreg { unsigned int junk; }; -#ifdef COMPAT_FREEBSD32 +#ifdef __LP64__ /* Must match struct trapframe */ struct reg32 { int32_t fixreg[32]; @@ -61,6 +61,8 @@ struct vmxreg32 { struct dbreg32 { struct dbreg data; }; + +#define __HAVE_REG32 #endif #ifdef _KERNEL Modified: head/sys/sparc64/include/reg.h ============================================================================== --- head/sys/sparc64/include/reg.h Wed Apr 8 11:59:00 2015 (r281265) +++ head/sys/sparc64/include/reg.h Wed Apr 8 16:30:45 2015 (r281266) @@ -98,6 +98,12 @@ struct dbreg { int dummy; }; +/* + * NB: sparcv8 binaries are not supported even though this header + * defines the relevant structures. + */ +#define __HAVE_REG32 + #ifdef _KERNEL /* * XXX these interfaces are MI, so they should be declared in a MI place. Modified: head/sys/sys/procfs.h ============================================================================== --- head/sys/sys/procfs.h Wed Apr 8 11:59:00 2015 (r281265) +++ head/sys/sys/procfs.h Wed Apr 8 16:30:45 2015 (r281266) @@ -89,4 +89,29 @@ typedef struct thrmisc { typedef uint64_t psaddr_t; /* An address in the target process. */ +#ifdef __HAVE_REG32 +typedef struct prstatus32 { + int32_t pr_version; + uint32_t pr_statussz; + uint32_t pr_gregsetsz; + uint32_t pr_fpregsetsz; + int32_t pr_osreldate; + int32_t pr_cursig; + int32_t pr_pid; + struct reg32 pr_reg; +} prstatus32_t; + +typedef struct prpsinfo32 { + int32_t pr_version; + uint32_t pr_psinfosz; + char pr_fname[PRFNAMESZ+1]; + char pr_psargs[PRARGSZ+1]; +} prpsinfo32_t; + +struct thrmisc32 { + char pr_tname[MAXCOMLEN+1]; + uint32_t _pad; +}; +#endif /* __HAVE_REG32 */ + #endif /* _SYS_PROCFS_H_ */ Modified: head/sys/x86/include/reg.h ============================================================================== --- head/sys/x86/include/reg.h Wed Apr 8 11:59:00 2015 (r281265) +++ head/sys/x86/include/reg.h Wed Apr 8 16:30:45 2015 (r281266) @@ -91,6 +91,7 @@ #define __fpreg64 fpreg #define __dbreg32 dbreg32 #define __dbreg64 dbreg +#define __HAVE_REG32 #endif /* Modified: head/usr.bin/gcore/elf32core.c ============================================================================== --- head/usr.bin/gcore/elf32core.c Wed Apr 8 11:59:00 2015 (r281265) +++ head/usr.bin/gcore/elf32core.c Wed Apr 8 16:30:45 2015 (r281266) @@ -8,24 +8,6 @@ #include -struct prpsinfo32 { - int pr_version; - u_int pr_psinfosz; - char pr_fname[PRFNAMESZ+1]; - char pr_psargs[PRARGSZ+1]; -}; - -struct prstatus32 { - int pr_version; - u_int pr_statussz; - u_int pr_gregsetsz; - u_int pr_fpregsetsz; - int pr_osreldate; - int pr_cursig; - pid_t pr_pid; - struct reg32 pr_reg; -}; - #define ELFCORE_COMPAT_32 1 #include "elfcore.c" From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 17:36:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 709FC80E; Wed, 8 Apr 2015 17:36:19 +0000 (UTC) Received: from mail-ie0-x230.google.com (mail-ie0-x230.google.com [IPv6:2607:f8b0:4001:c03::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 346AAD1C; Wed, 8 Apr 2015 17:36:19 +0000 (UTC) Received: by iebrs15 with SMTP id rs15so80602729ieb.3; Wed, 08 Apr 2015 10:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=BvPO2tuJR2totEpiMLZM3+o9wDlfs19sDUJTN0lGGuY=; b=d84/LK6cdFKxMhGg3/FwgJ/f+EkPxIbtbKfL3LsWcOPs1CiG/hVBUFIqof9Hrviy2v b18BvpmsoBcpi5qkRB9Dzyay7NGoEZN54GN7S1wjKcEIBgH6pPksZOkprBBt96jlFzRO 57MVyrHQv9RgpP+VPkHFEChPAQzK0J34yXdpJMSMOInaFLZSc9BZZ2g0jctGeBCyC2W7 aXh0/sY2h9KmKu2x3t3ER/aQDkPEfTPTux4E/KMuDVRHBXAFBl1W/C3wAHXHrOGMvhlX z9PiytxyFNFD0VkzkywjR+9Nd9ijc6RcwpazrYveTntmF/Ad0HGZgUsuQtZ5k12syj0r Ugjg== MIME-Version: 1.0 X-Received: by 10.50.143.42 with SMTP id sb10mr13628580igb.49.1428514578654; Wed, 08 Apr 2015 10:36:18 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Wed, 8 Apr 2015 10:36:18 -0700 (PDT) In-Reply-To: <20150408084839.GO64665@FreeBSD.org> References: <201504072309.t37N9Zwf011383@svn.freebsd.org> <20150408084839.GO64665@FreeBSD.org> Date: Wed, 8 Apr 2015 10:36:18 -0700 X-Google-Sender-Auth: yMLH311VNDmqiYV4LX6oJHTtWrk Message-ID: Subject: Re: svn commit: r281239 - head/sys/netinet From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 17:36:19 -0000 hi gleb, /* Skip initialization of globals for non-default instances. */ if (!IS_DEFAULT_VNET(curvnet)) return; .. ie, no. It doesn't double-init the mutexes. And the purging from bucket behaviour should have been precisely what the previous behaviour was. /* * drop something from the tail of the current queue * before proceeding further */ .. if you'd like to fix that then cool, but it's orthogonal to what I was trying to do. I didn't want to go and do multiple things in one patch set - this was /just/ to unroll the per-bucket locking. If you'd like to fix the existing potentially risky bucket purging code in the ip reassembly code then cool, let's do it - but in a separate patchset. V_nipq leaking is something we both missed during that review cycle. I'm glad you caught it now. -adrian On 8 April 2015 at 01:48, Gleb Smirnoff wrote: > On Tue, Apr 07, 2015 at 11:09:35PM +0000, Adrian Chadd wrote: > A> Author: adrian > A> Date: Tue Apr 7 23:09:34 2015 > A> New Revision: 281239 > A> URL: https://svnweb.freebsd.org/changeset/base/281239 > A> > A> Log: > A> Move the IPv4 reassembly queue locking from a single lock to be per-bucket (global). > A> > A> This significantly improves performance on multi-core servers where there > A> is any kind of IPv4 reassembly going on. > A> > A> glebius@ would like to see the locking moved to be attached to the reassembly > A> bucket, which would make it per-bucket + per-VNET, instead of being global. > A> I decided to keep it global for now as it's the minimal useful change; > A> if people agree / wish to migrate it to be per-bucket / per-VNET then please > A> do feel free to do so. I won't complain. > A> > A> Thanks to Norse Corp for giving me access to much larger servers > A> to test this at across the 4 core boxes I have at home. > A> > A> Differential Revision: https://reviews.freebsd.org/D2095 > A> Reviewed by: glebius (initial comments incorporated into this patch) > > No, they are not. > > Also, I just noticed another issue with the patch. You initialize the mutexes, > which are global, in the ip_init() which is called for every VNET. That would > lead to panic of initializing already initialized mutex. If you followed my advice, > that would not happen. Now VIMAGE+INVARIANTS is broken instantly, and w/o > INVARIANTS may panic if VIMAGE created under IP traffic. > > My comment that purging from a bucket that is determined by source IP has > security implications was also ignored. > > I will fix this all myself. > > -- > Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 18:24:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CB6719E; Wed, 8 Apr 2015 18:24:32 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 83C37337; Wed, 8 Apr 2015 18:24:30 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t38IOQjE019673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 8 Apr 2015 21:24:26 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t38IOQGS019672; Wed, 8 Apr 2015 21:24:26 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 8 Apr 2015 21:24:26 +0300 From: Gleb Smirnoff To: John Baldwin Subject: Re: svn commit: r281188 - head/usr.bin/netstat Message-ID: <20150408182426.GT64665@FreeBSD.org> References: <201504070550.t375oklh014315@svn.freebsd.org> <6969546.Tk7XnsGrVd@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6969546.Tk7XnsGrVd@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 18:24:32 -0000 John, On Wed, Apr 08, 2015 at 12:24:48PM -0400, John Baldwin wrote: J> On Tuesday, April 07, 2015 05:50:46 AM Gleb Smirnoff wrote: J> > Author: glebius J> > Date: Tue Apr 7 05:50:45 2015 J> > New Revision: 281188 J> > URL: https://svnweb.freebsd.org/changeset/base/281188 J> > J> > Log: J> > Like it was already done for 'netstat -i', drop the kvm(3) support J> > in 'netstat -r'. J> > J> > The netstat/route.c was the last abuser of struct ifnet and struct J> > rtentry in the tree. With this change if_var.h can become kernel J> > only include, _WANT_RTENTRY can go away and projects/ifnet and J> > projects/routing can go forward. J> > J> > Differential Revision: https://reviews.freebsd.org/D2242 J> > Reviewed by: melifaro, gnn J> > Sponsored by: Nginx, Inc. J> > Sponsored by: Netflix J> J> This breaks netstat -r on a crashdump. Just because you don't find this J> information useful during post-mortem debugging doesn't mean that other folks J> do not. The easiest solution is to update crashinfo to remove the netstat J> commands it runs. I do analyze cores often, and always find gdb the only useful tool. My opinion is seconded by melifaro@, who was quite a lot into the routing debugging for the last years. I will update crashinfo. J> However, I don't understand the fear that system binaries can peek inside J> the kernel for debugging info. It's ok for it to be a fragile ABI that J> isn't exposed to normal applications and to require people to keep a matching J> netstat with their kernel (along with the other tools crashinfo calls). Just J> update the code in netstat to cope with the new data structures. That should J> be much easier to test than having to convert N device drivers. You mentioned only the smallest problem - the need to routinely update the netstat, as the fragile ABI changes. But there are two more problems: 1) If userland application knows kernel structures, then we can not merge to stable/X changes that change these structures. For example, since netstat in stable/10 still uses kvm(3), we can't merge r256525 and r262763, which improve performance and make counters precise. Yes, exactly the counters that netstat is meant to report. We can't fix the netstat output due to netstat! 2) If we expose kernel structures to userland, people would write code that use them. And the code won't go into src/tools only, it will also go into ports. Albeit we have a stable API to read interface addresses and counters, in the ports there were 15 applications, that were based on copy-paste from netstat/if.c, using kvm(3) instead of API. And I had to fix them all. Finally, when we start to expose kernel structures to userland this leads to endless header dependencies, and may yield in expose all policy, but usually yields in dirty hacks like hiding second half of a structure under #ifdef _KERNEL. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 18:46:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DFF3713; Wed, 8 Apr 2015 18:46:35 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE5817BE; Wed, 8 Apr 2015 18:46:34 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 07539B93B; Wed, 8 Apr 2015 14:46:34 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r281188 - head/usr.bin/netstat Date: Wed, 08 Apr 2015 14:46:29 -0400 Message-ID: <4894607.y8WAnnWEI6@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150408182426.GT64665@FreeBSD.org> References: <201504070550.t375oklh014315@svn.freebsd.org> <6969546.Tk7XnsGrVd@ralph.baldwin.cx> <20150408182426.GT64665@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 08 Apr 2015 14:46:34 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 18:46:35 -0000 On Wednesday, April 08, 2015 09:24:26 PM Gleb Smirnoff wrote: > John, > > On Wed, Apr 08, 2015 at 12:24:48PM -0400, John Baldwin wrote: > J> On Tuesday, April 07, 2015 05:50:46 AM Gleb Smirnoff wrote: > J> > Author: glebius > J> > Date: Tue Apr 7 05:50:45 2015 > J> > New Revision: 281188 > J> > URL: https://svnweb.freebsd.org/changeset/base/281188 > J> > > J> > Log: > J> > Like it was already done for 'netstat -i', drop the kvm(3) support > J> > in 'netstat -r'. > J> > > J> > The netstat/route.c was the last abuser of struct ifnet and struct > J> > rtentry in the tree. With this change if_var.h can become kernel > J> > only include, _WANT_RTENTRY can go away and projects/ifnet and > J> > projects/routing can go forward. > J> > > J> > Differential Revision: https://reviews.freebsd.org/D2242 > J> > Reviewed by: melifaro, gnn > J> > Sponsored by: Nginx, Inc. > J> > Sponsored by: Netflix > J> > J> This breaks netstat -r on a crashdump. Just because you don't find this > J> information useful during post-mortem debugging doesn't mean that other folks > J> do not. The easiest solution is to update crashinfo to remove the netstat > J> commands it runs. > > I do analyze cores often, and always find gdb the only useful tool. My opinion > is seconded by melifaro@, who was quite a lot into the routing debugging for > the last years. It can be useful to look at this information when debugging non-routing problems as well. Please understand that having more information available to debug kernel panics (which are sometimes triggered by specific behavior of user applications) is a feature, not a bug. I didn't really appreciate this until I worked in an environment with thousands of machines where there were on the order of 100's of panics per day that could only be debugged via post-mortem. Just because you haven't needed some bit of info in the past doesn't mean that someone else hasn't (or won't in the future). > J> However, I don't understand the fear that system binaries can peek inside > J> the kernel for debugging info. It's ok for it to be a fragile ABI that > J> isn't exposed to normal applications and to require people to keep a matching > J> netstat with their kernel (along with the other tools crashinfo calls). Just > J> update the code in netstat to cope with the new data structures. That should > J> be much easier to test than having to convert N device drivers. > > You mentioned only the smallest problem - the need to routinely update > the netstat, as the fragile ABI changes. > > But there are two more problems: > > 1) If userland application knows kernel structures, then we can not merge > to stable/X changes that change these structures. For example, since > netstat in stable/10 still uses kvm(3), we can't merge r256525 and r262763, > which improve performance and make counters precise. Yes, exactly the counters > that netstat is meant to report. We can't fix the netstat output due to netstat! No. This is what I meant about it being a fragile ABI. I mean specifically that we do not support this as a public ABI and that users have to have a matching netstat binary to examine crash dumps in this manner. That requirement isn't very hard to achieve in practice. We already have this in spades inside of libkvm and kgdb: structures that they know about that aren't part of the supported ABI for non-system tools. > 2) If we expose kernel structures to userland, people would write code that > use them. And the code won't go into src/tools only, it will also go into > ports. Albeit we have a stable API to read interface addresses and counters, > in the ports there were 15 applications, that were based on copy-paste from > netstat/if.c, using kvm(3) instead of API. And I had to fix them all. No, you are assuming that just because we expose it under __WANT_FOO means we support it as a public ABI. I'm saying we do not. I think the copy and paste doesn't quite work as an argument either. In the olden days, kvm was the only way to get this data, so that was the only thing to copy and paste. Several tools that have old origins copied that. Just as we have fixed netstat to not use kvm aside from crash dumps, those tools also have to be fixed. However, new tools aren't going to copy crash dump code. They are going to copy what netstat does now for new kernels. Thus, I don't think we will have future kvm(3) copy/paste problems, only existing ones to deal with. > Finally, when we start to expose kernel structures to userland this leads > to endless header dependencies, and may yield in expose all policy, but > usually yields in dirty hacks like hiding second half of a structure > under #ifdef _KERNEL. We've managed to expose bits to tools like netstat for 20 years. History does not support your argument of this being impossible. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 19:07:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43420A34; Wed, 8 Apr 2015 19:07:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1500D9B8; Wed, 8 Apr 2015 19:07:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t38J764D081068; Wed, 8 Apr 2015 19:07:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38J76M1081067; Wed, 8 Apr 2015 19:07:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504081907.t38J76M1081067@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 8 Apr 2015 19:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281270 - head/lib/libcompiler_rt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 19:07:07 -0000 Author: emaste Date: Wed Apr 8 19:07:06 2015 New Revision: 281270 URL: https://svnweb.freebsd.org/changeset/base/281270 Log: compiler-rt: include 128-bit quad precision fp support only on arm64 Other architectures do not use quad precision long double and don't need these runtime support routines. Differential Revision: https://reviews.freebsd.org/D2252 Reviewed by: dim Sponsored by: The FreeBSD Foundation Modified: head/lib/libcompiler_rt/Makefile Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Wed Apr 8 17:54:20 2015 (r281269) +++ head/lib/libcompiler_rt/Makefile Wed Apr 8 19:07:06 2015 (r281270) @@ -22,7 +22,6 @@ CRTSRC=${.CURDIR}/../../contrib/compiler SRCF= absvdi2 \ absvsi2 \ absvti2 \ - addtf3 \ addvdi3 \ addvsi3 \ addvti3 \ @@ -37,7 +36,6 @@ SRCF= absvdi2 \ clzti2 \ cmpdi2 \ cmpti2 \ - comparetf2 \ ctzdi2 \ ctzsi2 \ ctzti2 \ @@ -46,31 +44,22 @@ SRCF= absvdi2 \ divmoddi4 \ divmodsi4 \ divsc3 \ - divtf3 \ divti3 \ divxc3 \ enable_execute_stack \ eprintf \ - extenddftf2 \ - extendsftf2 \ ffsdi2 \ ffsti2 \ fixdfdi \ fixdfti \ fixsfdi \ fixsfti \ - fixtfdi \ - fixtfsi \ - fixtfti \ fixunsdfdi \ fixunsdfsi \ fixunsdfti \ fixunssfdi \ fixunssfsi \ fixunssfti \ - fixunstfdi \ - fixunstfsi \ - fixunstfti \ fixunsxfdi \ fixunsxfsi \ fixunsxfti \ @@ -105,7 +94,6 @@ SRCF= absvdi2 \ mulosi4 \ muloti4 \ mulsc3 \ - multf3 \ multi3 \ mulvdi3 \ mulvsi3 \ @@ -129,13 +117,10 @@ SRCF= absvdi2 \ powisf2 \ powitf2 \ powixf2 \ - subtf3 \ subvdi3 \ subvsi3 \ subvti3 \ trampoline_setup \ - trunctfdf2 \ - trunctfsf2 \ ucmpdi2 \ ucmpti2 \ udivdi3 \ @@ -146,6 +131,25 @@ SRCF= absvdi2 \ umoddi3 \ umodti3 +# 128-bit quad precision long double support, only used on arm64 +.if ${MACHINE_CPUARCH} == "aarch64" +SRCF+= addtf3 \ + comparetf2 \ + divtf3 \ + extenddftf2 \ + extendsftf2 \ + fixtfdi \ + fixtfsi \ + fixtfti \ + fixunstfdi \ + fixunstfsi \ + fixunstfti \ + multf3 \ + subtf3 \ + trunctfdf2 \ + trunctfsf2 +.endif + # These are already shipped by libc.a on arm and mips .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" SRCF+= adddf3 \ From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 19:12:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76EB1D88; Wed, 8 Apr 2015 19:12:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61E0EACA; Wed, 8 Apr 2015 19:12:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t38JCdo9085462; Wed, 8 Apr 2015 19:12:39 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38JCdN3085460; Wed, 8 Apr 2015 19:12:39 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504081912.t38JCdN3085460@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 8 Apr 2015 19:12:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281271 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 19:12:39 -0000 Author: dteske Date: Wed Apr 8 19:12:38 2015 New Revision: 281271 URL: https://svnweb.freebsd.org/changeset/base/281271 Log: Fix a bootlock condition if/when loader_logo is set in loader.conf(5) NB: This deeply effected HardenedBSD which had a default value set. Embarassingly, I allowed the `type' primitive to be passed -1/-1 for c-addr/u stack input (the effect of which is to pull INT_MAX bytes from character address negative one in which hilarity ensues over a black screen in full-on bootlock). Much thanks to Shawn Webb [lattera] for helping me diagnose. NB: The mode-ending revisions were initially suspected (and reverted) but proved to be a red-herring. Proper mode endings will be returning. Thanks to: lattera (@HardenedBSD []) Reported by: lattera MFC after: 3 days X-MFC-to: stable/10 Modified: head/sys/boot/forth/version.4th Modified: head/sys/boot/forth/version.4th ============================================================================== --- head/sys/boot/forth/version.4th Wed Apr 8 19:07:06 2015 (r281270) +++ head/sys/boot/forth/version.4th Wed Apr 8 19:12:38 2015 (r281271) @@ -85,10 +85,12 @@ only forth definitions also version-proc dup versionX @ swap - versionY @ at-xy \ Print the version (optionally in cyan) - loader_color? dup ( -- bool bool ) + loader_color? dup ( c-addr/u -- c-addr/u bool bool ) if 6 fg then - type + -rot type if 7 fg then + + 0 25 at-xy ; only forth definitions From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 19:46:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21D58A75; Wed, 8 Apr 2015 19:46:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CFE0E81; Wed, 8 Apr 2015 19:46:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t38JkDw8000595; Wed, 8 Apr 2015 19:46:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38JkD8f000594; Wed, 8 Apr 2015 19:46:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504081946.t38JkD8f000594@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 8 Apr 2015 19:46:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281272 - head/sys/i386/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 19:46:14 -0000 Author: kib Date: Wed Apr 8 19:46:13 2015 New Revision: 281272 URL: https://svnweb.freebsd.org/changeset/base/281272 Log: Explain that vm_page_array is mapped to describe the memory, not the memory itself. Provide the formula to calculate the number of required page tables. Correct the size of the struct vm_page for non-PAE case. Reviewed by: alc, jhb (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/include/pmap.h Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Wed Apr 8 19:12:38 2015 (r281271) +++ head/sys/i386/include/pmap.h Wed Apr 8 19:46:13 2015 (r281272) @@ -122,13 +122,18 @@ */ #define VADDR(pdi, pti) ((vm_offset_t)(((pdi)< Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C483DED8; Wed, 8 Apr 2015 19:55:24 +0000 (UTC) Received: from mail-wg0-x235.google.com (mail-wg0-x235.google.com [IPv6:2a00:1450:400c:c00::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 550C5F8E; Wed, 8 Apr 2015 19:55:24 +0000 (UTC) Received: by wgin8 with SMTP id n8so99399769wgi.0; Wed, 08 Apr 2015 12:55:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=YTqg1s2NMDZCjFNSdU4eEfnuoTZNK0vAHeJ1JD9ad0k=; b=kd1J5BT53oSZc5WU+6Wn8QBvBJhUmm1V4i84hNxe3CMO6gG2bnA0jLxiu/o9WLv3dE jfGlzknJBmBHX+QlMkBplzHajTU/k598H+kgHZrmA/pIfqOaqfgrAaKW9nVvjbqNFyRx 5Mht0REPy7smmEGE0idPtYeJIVxJNmOVmm9Gzu2FEjtNq/IL/BJvm025FuHMAGv+GQ+A HeLs5mkimFDrgh8iPEFZaZ79USijeqqLDDm2yZQVdjU+hEi3dikx7CHyZZjTwPYA6UQD C0LtoeG9LsSSGwxd9QHyH+ze7GLWDQxSveEeHzNxJi2g950+JOObQBp7/YOhRukapIYg 5UqA== X-Received: by 10.194.200.194 with SMTP id ju2mr45286965wjc.61.1428522922368; Wed, 08 Apr 2015 12:55:22 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id ev7sm16987236wjb.47.2015.04.08.12.55.20 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 08 Apr 2015 12:55:21 -0700 (PDT) Date: Wed, 8 Apr 2015 21:55:18 +0200 From: Mateusz Guzik To: Chagin Dmitry Subject: Re: svn commit: r281113 - head/sys/vm Message-ID: <20150408195518.GA6086@dft-labs.eu> References: <201504051825.t35IPO7t078390@svn.freebsd.org> <20150405183947.GA24293@dft-labs.eu> <20150405185419.GA46092@dchagin.static.corbina.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150405185419.GA46092@dchagin.static.corbina.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 19:55:25 -0000 On Sun, Apr 05, 2015 at 09:54:19PM +0300, Chagin Dmitry wrote: > On Sun, Apr 05, 2015 at 08:39:47PM +0200, Mateusz Guzik wrote: > > On Sun, Apr 05, 2015 at 06:25:24PM +0000, Dmitry Chagin wrote: > > > Author: dchagin > > > Date: Sun Apr 5 18:25:23 2015 > > > New Revision: 281113 > > > URL: https://svnweb.freebsd.org/changeset/base/281113 > > > > > > Log: > > > Fix wrong kassert msg in uma. > > > > > > PR: 199172 > > > Submitted by: luke.tw gmail com > > > MFC after: 1 week > > > > > > Modified: > > > head/sys/vm/uma_core.c > > > > > > Modified: head/sys/vm/uma_core.c > > > ============================================================================== > > > --- head/sys/vm/uma_core.c Sun Apr 5 17:09:58 2015 (r281112) > > > +++ head/sys/vm/uma_core.c Sun Apr 5 18:25:23 2015 (r281113) > > > @@ -3060,7 +3060,7 @@ uma_zone_set_fini(uma_zone_t zone, uma_f > > > uma_keg_t keg; > > > > > > keg = zone_first_keg(zone); > > > - KASSERT(keg != NULL, ("uma_zone_set_init: Invalid zone type")); > > > + KASSERT(keg != NULL, ("uma_zone_set_fini: Invalid zone type")); > > > KEG_LOCK(keg); > > > KASSERT(keg->uk_pages == 0, > > > ("uma_zone_set_fini on non-empty keg")); > > > @@ -3100,7 +3100,7 @@ uma_zone_set_freef(uma_zone_t zone, uma_ > > > uma_keg_t keg; > > > > > > keg = zone_first_keg(zone); > > > - KASSERT(keg != NULL, ("uma_zone_set_init: Invalid zone type")); > > > + KASSERT(keg != NULL, ("uma_zone_set_freef: Invalid zone type")); > > > KEG_LOCK(keg); > > > keg->uk_freef = freef; > > > KEG_UNLOCK(keg); > > > > > > > This seems to be a recurring problem (go figure). > > > > Was __func__ usage flamed over? > > > > I really think that linux's oops-like dump would be of great help here. > > It includes file + line info along with register dump which alone can > > give sufficient hints in several cases. > > > finally, kassert prints backtrace. also feel free to set > debug.kassert.do_kdb. The point is to have initial user reports more useful. As it is, with mere panic message there is not much to work with. -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 20:01:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2725922A; Wed, 8 Apr 2015 20:01:07 +0000 (UTC) Received: from relay.mailchannels.net (si-002-i39.relay.mailchannels.net [184.154.112.204]) by mx1.freebsd.org (Postfix) with ESMTP id B3A94CD; Wed, 8 Apr 2015 20:01:05 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp2.ore.mailhop.org (ip-10-220-9-73.us-west-2.compute.internal [10.220.9.73]) by relay.mailchannels.net (Postfix) with ESMTPA id 789634DD2; Wed, 8 Apr 2015 20:00:57 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp2.ore.mailhop.org (smtp2.ore.mailhop.org [10.83.15.107]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Wed, 08 Apr 2015 20:00:57 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1428523257648:2249775700 X-MC-Ingress-Time: 1428523257648 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp2.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1Yfw9c-0003xA-C9; Wed, 08 Apr 2015 20:00:53 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t38K0Ywr004108; Wed, 8 Apr 2015 14:00:34 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1+bqIj45nPXU7htzkapSAIG Message-ID: <1428523234.82583.205.camel@freebsd.org> Subject: Re: svn commit: r281113 - head/sys/vm From: Ian Lepore To: Mateusz Guzik Date: Wed, 08 Apr 2015 14:00:34 -0600 In-Reply-To: <20150408195518.GA6086@dft-labs.eu> References: <201504051825.t35IPO7t078390@svn.freebsd.org> <20150405183947.GA24293@dft-labs.eu> <20150405185419.GA46092@dchagin.static.corbina.net> <20150408195518.GA6086@dft-labs.eu> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Chagin Dmitry X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 20:01:07 -0000 On Wed, 2015-04-08 at 21:55 +0200, Mateusz Guzik wrote: > On Sun, Apr 05, 2015 at 09:54:19PM +0300, Chagin Dmitry wrote: > > On Sun, Apr 05, 2015 at 08:39:47PM +0200, Mateusz Guzik wrote: > > > On Sun, Apr 05, 2015 at 06:25:24PM +0000, Dmitry Chagin wrote: > > > > Author: dchagin > > > > Date: Sun Apr 5 18:25:23 2015 > > > > New Revision: 281113 > > > > URL: https://svnweb.freebsd.org/changeset/base/281113 > > > > > > > > Log: > > > > Fix wrong kassert msg in uma. > > > > > > > > PR: 199172 > > > > Submitted by: luke.tw gmail com > > > > MFC after: 1 week > > > > > > > > Modified: > > > > head/sys/vm/uma_core.c > > > > > > > > Modified: head/sys/vm/uma_core.c > > > > ============================================================================== > > > > --- head/sys/vm/uma_core.c Sun Apr 5 17:09:58 2015 (r281112) > > > > +++ head/sys/vm/uma_core.c Sun Apr 5 18:25:23 2015 (r281113) > > > > @@ -3060,7 +3060,7 @@ uma_zone_set_fini(uma_zone_t zone, uma_f > > > > uma_keg_t keg; > > > > > > > > keg = zone_first_keg(zone); > > > > - KASSERT(keg != NULL, ("uma_zone_set_init: Invalid zone type")); > > > > + KASSERT(keg != NULL, ("uma_zone_set_fini: Invalid zone type")); > > > > KEG_LOCK(keg); > > > > KASSERT(keg->uk_pages == 0, > > > > ("uma_zone_set_fini on non-empty keg")); > > > > @@ -3100,7 +3100,7 @@ uma_zone_set_freef(uma_zone_t zone, uma_ > > > > uma_keg_t keg; > > > > > > > > keg = zone_first_keg(zone); > > > > - KASSERT(keg != NULL, ("uma_zone_set_init: Invalid zone type")); > > > > + KASSERT(keg != NULL, ("uma_zone_set_freef: Invalid zone type")); > > > > KEG_LOCK(keg); > > > > keg->uk_freef = freef; > > > > KEG_UNLOCK(keg); > > > > > > > > > > This seems to be a recurring problem (go figure). > > > > > > Was __func__ usage flamed over? > > > > > > I really think that linux's oops-like dump would be of great help here. > > > It includes file + line info along with register dump which alone can > > > give sufficient hints in several cases. > > > > > finally, kassert prints backtrace. also feel free to set > > debug.kassert.do_kdb. > > The point is to have initial user reports more useful. As it is, with > mere panic message there is not much to work with. > Have you had a problem simply grepping for the panic message string? I never have. I've used __func__ a few times to disambiguate a message where the same message string appears multiple times, but it's the rare case. -- Ian From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 20:10:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5FA263B; Wed, 8 Apr 2015 20:10:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B69DA1FF; Wed, 8 Apr 2015 20:10:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t38KAjkm011646; Wed, 8 Apr 2015 20:10:45 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38KAhTQ011637; Wed, 8 Apr 2015 20:10:43 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201504082010.t38KAhTQ011637@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 8 Apr 2015 20:10:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281275 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 20:10:45 -0000 Author: dteske Date: Wed Apr 8 20:10:42 2015 New Revision: 281275 URL: https://svnweb.freebsd.org/changeset/base/281275 Log: Re-do proper mode-endings. Antithesis of r281176-281179 which reverted earlier migration away from sloppy mode-endings (r280925,280974-280976) due to a red-herring in diagnosing HardenedBSD boot lockup. Thanks to: lattera (shawn.webb@hardenedbsdorg) MFC after: 3 days X-MFC-to: stable/10 X-MFC-with: r280925,280974-280976,281176-281179 Modified: head/sys/boot/forth/loader.4th head/sys/boot/forth/logo-beastie.4th head/sys/boot/forth/logo-orb.4th head/sys/boot/forth/menu.4th head/sys/boot/forth/menu.rc head/sys/boot/forth/version.4th Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Wed Apr 8 19:50:17 2015 (r281274) +++ head/sys/boot/forth/loader.4th Wed Apr 8 20:10:42 2015 (r281275) @@ -53,7 +53,7 @@ only forth definitions loader_color? dup ( -- bool bool ) if 7 fg 4 bg then ." Booting..." - if escc ." 0m" then + if me then cr ; Modified: head/sys/boot/forth/logo-beastie.4th ============================================================================== --- head/sys/boot/forth/logo-beastie.4th Wed Apr 8 19:50:17 2015 (r281274) +++ head/sys/boot/forth/logo-beastie.4th Wed Apr 8 20:10:42 2015 (r281275) @@ -40,11 +40,11 @@ s" @[31m, ," logo+ s" /( )`" logo+ s" \ \___ / |" logo+ - s" /- @[37m_@[31m `-/ '" logo+ - s" (@[37m/\/ \@[31m \ /\" logo+ - s" @[37m/ / |@[31m ` \" logo+ - s" @[34mO O @[37m) @[31m/ |" logo+ - s" @[37m`-^--'@[31m`< '" logo+ + s" /- @[m_@[31m `-/ '" logo+ + s" (@[m/\/ \@[31m \ /\" logo+ + s" @[m/ / |@[31m ` \" logo+ + s" @[34mO O @[m) @[31m/ |" logo+ + s" @[m`-^--'@[31m`< '" logo+ s" (_.) _ ) /" logo+ s" `.___/` /" logo+ s" `-----' /" logo+ @@ -55,7 +55,7 @@ s" \ / /\" logo+ s" @[36m______@[31m( (_ / \______/" logo+ s" @[36m,' ,-----' |" logo+ - s" `--{__________)@[37m" logo+ + s" `--{__________)@[m" logo+ 2drop ; Modified: head/sys/boot/forth/logo-orb.4th ============================================================================== --- head/sys/boot/forth/logo-orb.4th Wed Apr 8 19:50:17 2015 (r281274) +++ head/sys/boot/forth/logo-orb.4th Wed Apr 8 20:10:42 2015 (r281275) @@ -49,7 +49,7 @@ s" -- @[31;1m-.@[31m" logo+ s" `:` @[31;1m`:`" logo+ s" @[31;1m.-- `--." logo+ - s" .---.....----.@[37m" logo+ + s" .---.....----.@[m" logo+ 2drop ; Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Wed Apr 8 19:50:17 2015 (r281274) +++ head/sys/boot/forth/menu.4th Wed Apr 8 20:10:42 2015 (r281275) @@ -221,7 +221,7 @@ also menu-infrastructure definitions loader_color? dup ( -- bool bool ) if b then menuidx @ . - if 7 fg then + if me then \ Move the cursor forward 1 column dup menuX @ 1+ swap at-xy Modified: head/sys/boot/forth/menu.rc ============================================================================== --- head/sys/boot/forth/menu.rc Wed Apr 8 19:50:17 2015 (r281274) +++ head/sys/boot/forth/menu.rc Wed Apr 8 20:10:42 2015 (r281275) @@ -29,22 +29,22 @@ set mainmenu_init[1]="init_boot" set mainmenu_caption[1]="Boot Multi User [Enter]" set maintoggled_text[1]="Boot [S]ingle User [Enter]" set mainmenu_command[1]="boot" -set mainansi_caption[1]="^[1mB^[37moot Multi User ^[1m[Enter]^[37m" -set maintoggled_ansi[1]="Boot ^[1mS^[37mingle User ^[1m[Enter]^[37m" +set mainansi_caption[1]="^[1mB^[moot Multi User ^[1m[Enter]^[m" +set maintoggled_ansi[1]="Boot ^[1mS^[mingle User ^[1m[Enter]^[m" \ keycode set by init_boot set mainmenu_init[2]="init_altboot" set mainmenu_caption[2]="Boot [S]ingle User" set maintoggled_text[2]="Boot [M]ulti User" set mainmenu_command[2]="altboot" -set mainansi_caption[2]="Boot ^[1mS^[37mingle User" -set maintoggled_ansi[2]="Boot ^[1mM^[37multi User" +set mainansi_caption[2]="Boot ^[1mS^[mingle User" +set maintoggled_ansi[2]="Boot ^[1mM^[multi User" \ keycode set by init_altboot set mainmenu_caption[3]="[Esc]ape to loader prompt" set mainmenu_command[3]="goto_prompt" set mainmenu_keycode[3]=27 -set mainansi_caption[3]="^[1mEsc^[37mape to loader prompt" +set mainansi_caption[3]="^[1mEsc^[mape to loader prompt" \ Enable built-in "Reboot" trailing menuitem \ NOTE: appears before menu_options if configured @@ -63,7 +63,7 @@ set mainmenu_keycode[5]=107 set mainmenu_caption[6]="Configure Boot [O]ptions..." set mainmenu_command[6]="2 goto_menu" set mainmenu_keycode[6]=111 -set mainansi_caption[6]="Configure Boot ^[1mO^[37mptions..." +set mainansi_caption[6]="Configure Boot ^[1mO^[mptions..." \ \ BOOT OPTIONS MENU @@ -74,12 +74,12 @@ set menuset_name2="options" set optionsmenu_caption[1]="Back to Main Menu [Backspace]" set optionsmenu_command[1]="1 goto_menu" set optionsmenu_keycode[1]=8 -set optionsansi_caption[1]="Back to Main Menu ^[1m[Backspace]^[37m" +set optionsansi_caption[1]="Back to Main Menu ^[1m[Backspace]^[m" set optionsmenu_caption[2]="Load System [D]efaults" set optionsmenu_command[2]="set_default_boot_options" set optionsmenu_keycode[2]=100 -set optionsansi_caption[2]="Load System ^[1mD^[37mefaults" +set optionsansi_caption[2]="Load System ^[1mD^[mefaults" set optionsmenu_options=3 set optionsmenu_optionstext="Boot Options:" @@ -89,32 +89,32 @@ set optionsmenu_caption[3]="[A]CPI Suppo set optionstoggled_text[3]="[A]CPI Support On" set optionsmenu_command[3]="toggle_acpi" set optionsmenu_keycode[3]=97 -set optionsansi_caption[3]="^[1mA^[37mCPI Support ^[34;1mOff^[37m" -set optionstoggled_ansi[3]="^[1mA^[37mCPI Support ^[32;7mOn^[0;37m" +set optionsansi_caption[3]="^[1mA^[mCPI Support ^[34;1mOff^[m" +set optionstoggled_ansi[3]="^[1mA^[mCPI Support ^[32;7mOn^[m" set optionsmenu_init[4]="init_safemode" set optionsmenu_caption[4]="Safe [M]ode... off" set optionstoggled_text[4]="Safe [M]ode... On" set optionsmenu_command[4]="toggle_safemode" set optionsmenu_keycode[4]=109 -set optionsansi_caption[4]="Safe ^[1mM^[37mode... ^[34;1mOff^[37m" -set optionstoggled_ansi[4]="Safe ^[1mM^[37mode... ^[32;7mOn^[0;37m" +set optionsansi_caption[4]="Safe ^[1mM^[mode... ^[34;1mOff^[m" +set optionstoggled_ansi[4]="Safe ^[1mM^[mode... ^[32;7mOn^[m" set optionsmenu_init[5]="init_singleuser" set optionsmenu_caption[5]="[S]ingle User. off" set optionstoggled_text[5]="[S]ingle User. On" set optionsmenu_command[5]="toggle_singleuser" set optionsmenu_keycode[5]=115 -set optionsansi_caption[5]="^[1mS^[37mingle User. ^[34;1mOff^[37m" -set optionstoggled_ansi[5]="^[1mS^[37mingle User. ^[32;7mOn^[0;37m" +set optionsansi_caption[5]="^[1mS^[mingle User. ^[34;1mOff^[m" +set optionstoggled_ansi[5]="^[1mS^[mingle User. ^[32;7mOn^[m" set optionsmenu_init[6]="init_verbose" set optionsmenu_caption[6]="[V]erbose..... off" set optionstoggled_text[6]="[V]erbose..... On" set optionsmenu_command[6]="toggle_verbose" set optionsmenu_keycode[6]=118 -set optionsansi_caption[6]="^[1mV^[37merbose..... ^[34;1mOff^[37m" -set optionstoggled_ansi[6]="^[1mV^[37merbose..... ^[32;7mOn^[0;37m" +set optionsansi_caption[6]="^[1mV^[merbose..... ^[34;1mOff^[m" +set optionstoggled_ansi[6]="^[1mV^[merbose..... ^[32;7mOn^[m" \ Enable automatic booting (add ``autoboot_delay=N'' to loader.conf(5) to \ customize the timeout; default is 10-seconds) Modified: head/sys/boot/forth/version.4th ============================================================================== --- head/sys/boot/forth/version.4th Wed Apr 8 19:50:17 2015 (r281274) +++ head/sys/boot/forth/version.4th Wed Apr 8 20:10:42 2015 (r281275) @@ -88,7 +88,7 @@ only forth definitions also version-proc loader_color? dup ( c-addr/u -- c-addr/u bool bool ) if 6 fg then -rot type - if 7 fg then + if me then 0 25 at-xy ; From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 20:25:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E6B38AA; Wed, 8 Apr 2015 20:25:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F1C5350; Wed, 8 Apr 2015 20:25:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t38KPq0B019879; Wed, 8 Apr 2015 20:25:52 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38KPqU0019878; Wed, 8 Apr 2015 20:25:52 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201504082025.t38KPqU0019878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 8 Apr 2015 20:25:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281276 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 20:25:52 -0000 Author: gnn Date: Wed Apr 8 20:25:51 2015 New Revision: 281276 URL: https://svnweb.freebsd.org/changeset/base/281276 Log: Add support for a netisr polling tunable, which allows run time switching of device polling rather than having it only be controlled by the compile time option. Summary: Rubicon Communications (Netgate) Reviewers: #network, hiren Reviewed By: #network, hiren Subscribers: hiren Differential Revision: https://reviews.freebsd.org/D2258 Modified: head/sys/net/netisr.c Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Wed Apr 8 20:10:42 2015 (r281275) +++ head/sys/net/netisr.c Wed Apr 8 20:25:51 2015 (r281276) @@ -126,6 +126,13 @@ static struct rmlock netisr_rmlock; static SYSCTL_NODE(_net, OID_AUTO, isr, CTLFLAG_RW, 0, "netisr"); +#ifdef DEVICE_POLLING +static int netisr_polling = 0; /* Enable Polling. */ +TUNABLE_INT("net.isr.polling_enable", &netisr_polling); +SYSCTL_INT(_net_isr, OID_AUTO, polling_enable, CTLFLAG_RW, + &netisr_polling, 0, "Enable polling"); +#endif + /*- * Three global direct dispatch policies are supported: * @@ -789,9 +796,11 @@ swi_net(void *arg) nwsp = arg; #ifdef DEVICE_POLLING - KASSERT(nws_count == 1, - ("%s: device_polling but nws_count != 1", __func__)); - netisr_poll(); + if (netisr_polling) { + KASSERT(nws_count == 1, + ("%s: device_polling but nws_count != 1", __func__)); + netisr_poll(); + } #endif #ifdef NETISR_LOCKING NETISR_RLOCK(&tracker); @@ -816,7 +825,8 @@ out: NETISR_RUNLOCK(&tracker); #endif #ifdef DEVICE_POLLING - netisr_pollmore(); + if (netisr_polling) + netisr_pollmore(); #endif } @@ -1071,6 +1081,9 @@ netisr_sched_poll(void) { struct netisr_workstream *nwsp; + if (!netisr_polling) + return; + nwsp = DPCPU_ID_PTR(nws_array[0], nws); NWS_SIGNAL(nwsp); } @@ -1138,7 +1151,7 @@ netisr_init(void *arg) * multiple netisr threads, so for the time being compiling in device * polling disables parallel netisr workers. */ - if (netisr_maxthreads != 1 || netisr_bindthreads != 0) { + if (netisr_polling && (netisr_maxthreads != 1 || netisr_bindthreads != 0)) { printf("netisr_init: forcing maxthreads to 1 and " "bindthreads to 0 for device polling\n"); netisr_maxthreads = 1; From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 20:55:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE84A26E; Wed, 8 Apr 2015 20:55:06 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1CF9C8B3; Wed, 8 Apr 2015 20:55:05 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t38Kt18u015959 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 8 Apr 2015 23:55:01 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t38Kt1Bi015958; Wed, 8 Apr 2015 23:55:01 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 8 Apr 2015 23:55:01 +0300 From: Gleb Smirnoff To: "George V. Neville-Neil" Subject: Re: svn commit: r281276 - head/sys/net Message-ID: <20150408205501.GW64665@FreeBSD.org> References: <201504082025.t38KPqU0019878@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504082025.t38KPqU0019878@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 20:55:06 -0000 On Wed, Apr 08, 2015 at 08:25:51PM +0000, George V. Neville-Neil wrote: G> Author: gnn G> Date: Wed Apr 8 20:25:51 2015 G> New Revision: 281276 G> URL: https://svnweb.freebsd.org/changeset/base/281276 G> G> Log: G> Add support for a netisr polling tunable, which allows run time switching of G> device polling rather than having it only be controlled by the compile G> time option. G> G> Summary: Rubicon Communications (Netgate) G> Reviewers: #network, hiren G> Reviewed By: #network, hiren G> Subscribers: hiren G> Differential Revision: https://reviews.freebsd.org/D2258 You gave very short time to review it :( First, the sysctl namespace for device polling is kern.polling. The polling(4) has two additional (to hardclock) modes of polling: netisr polling and idle polling. The idle polling was always contolled by sysctl in kern.polling namespace. Thus, the new sysctl should reside in this namespace. The second important thing is whether sysctl isn't needed at all? What does Rubicon Communications (Netgate) need to achieve? My guess is that they got DEVICE_POLLING in the kernel, but zero interfaces with the IFCAP_POLLING bit set. And they don't want the poll_mtx to be locked routinely. If my guess is true, then the patch should be simple reverted, and in the kern/kern_poll.c, in the netisr_poll() and netisr_pollmore() there should be put: if (poll_handlers == 0) return; And that's all. Note that this is already done for hardclock polling. Accessing this value without poll_mtx held is entirely okay, since we don't care about a race on enabling/disabling polling for NIC. If my guess is wrong, and Rubicon Communications (Netgate) want to run hardclock polling, but have netisr polling disabled, then again the patch should be reverted, and then re-applied to kern_poll.c, moving the netisr_polling variable there and the checks as well, and fixing sysctl namespace. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 21:10:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D8823850; Wed, 8 Apr 2015 21:10:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA8209E7; Wed, 8 Apr 2015 21:10:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t38LADGZ039687; Wed, 8 Apr 2015 21:10:13 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38LADm0039686; Wed, 8 Apr 2015 21:10:13 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504082110.t38LADm0039686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 8 Apr 2015 21:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281279 - head/contrib/xz X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 21:10:14 -0000 Author: delphij Date: Wed Apr 8 21:10:13 2015 New Revision: 281279 URL: https://svnweb.freebsd.org/changeset/base/281279 Log: Fix mergeinfo. Modified: Directory Properties: head/contrib/xz/ (props changed) From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 21:46:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC4C3102; Wed, 8 Apr 2015 21:46:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8521DDC; Wed, 8 Apr 2015 21:46:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t38LkJWh058301; Wed, 8 Apr 2015 21:46:19 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38LkJ9s058300; Wed, 8 Apr 2015 21:46:19 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201504082146.t38LkJ9s058300@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Wed, 8 Apr 2015 21:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281280 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 21:46:19 -0000 Author: jimharris Date: Wed Apr 8 21:46:18 2015 New Revision: 281280 URL: https://svnweb.freebsd.org/changeset/base/281280 Log: nvme: fall back to a smaller MSI-X vector allocation if necessary Previously, if per-CPU MSI-X vectors could not be allocated, nvme(4) would fall back to INTx with a single I/O queue pair. This change will still fall back to a single I/O queue pair, but allocate MSI-X vectors instead of reverting to INTx. MFC after: 1 week Sponsored by: Intel Modified: head/sys/dev/nvme/nvme_ctrlr.c Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Wed Apr 8 21:10:13 2015 (r281279) +++ head/sys/dev/nvme/nvme_ctrlr.c Wed Apr 8 21:46:18 2015 (r281280) @@ -1144,9 +1144,17 @@ nvme_ctrlr_construct(struct nvme_control /* One vector per IO queue, plus one vector for admin queue. */ num_vectors = ctrlr->num_io_queues + 1; - if (pci_msix_count(dev) < num_vectors) { + /* + * If we cannot even allocate 2 vectors (one for admin, one for + * I/O), then revert to INTx. + */ + if (pci_msix_count(dev) < 2) { ctrlr->msix_enabled = 0; goto intx; + } else if (pci_msix_count(dev) < num_vectors) { + ctrlr->per_cpu_io_queues = FALSE; + ctrlr->num_io_queues = 1; + num_vectors = 2; /* one for admin, one for I/O */ } if (pci_alloc_msix(dev, &num_vectors) != 0) { From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 21:49:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E412374; Wed, 8 Apr 2015 21:49:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F6E3DFA; Wed, 8 Apr 2015 21:49:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t38LnkPt058859; Wed, 8 Apr 2015 21:49:46 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38LnjBZ058856; Wed, 8 Apr 2015 21:49:45 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201504082149.t38LnjBZ058856@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Wed, 8 Apr 2015 21:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281281 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 21:49:46 -0000 Author: jimharris Date: Wed Apr 8 21:49:45 2015 New Revision: 281281 URL: https://svnweb.freebsd.org/changeset/base/281281 Log: nvme: create separate DMA tag for non-payload DMA buffers Submission and completion queue memory need to use a separate DMA tag for mappings than payload buffers, to ensure mappings remain contiguous even with DMAR enabled. Submitted by: kib MFC after: 1 week Sponsored by: Intel Modified: head/sys/dev/nvme/nvme_private.h head/sys/dev/nvme/nvme_qpair.c Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Wed Apr 8 21:46:18 2015 (r281280) +++ head/sys/dev/nvme/nvme_private.h Wed Apr 8 21:49:45 2015 (r281281) @@ -211,6 +211,7 @@ struct nvme_qpair { struct nvme_completion *cpl; bus_dma_tag_t dma_tag; + bus_dma_tag_t dma_tag_payload; bus_dmamap_t cmd_dma_map; uint64_t cmd_bus_addr; @@ -491,6 +492,8 @@ nvme_single_map(void *arg, bus_dma_segme { uint64_t *bus_addr = (uint64_t *)arg; + if (error != 0) + printf("nvme_single_map err %d\n", error); *bus_addr = seg[0].ds_addr; } Modified: head/sys/dev/nvme/nvme_qpair.c ============================================================================== --- head/sys/dev/nvme/nvme_qpair.c Wed Apr 8 21:46:18 2015 (r281280) +++ head/sys/dev/nvme/nvme_qpair.c Wed Apr 8 21:49:45 2015 (r281281) @@ -294,7 +294,7 @@ nvme_qpair_construct_tracker(struct nvme uint16_t cid) { - bus_dmamap_create(qpair->dma_tag, 0, &tr->payload_dma_map); + bus_dmamap_create(qpair->dma_tag_payload, 0, &tr->payload_dma_map); bus_dmamap_create(qpair->dma_tag, 0, &tr->prp_dma_map); bus_dmamap_load(qpair->dma_tag, tr->prp_dma_map, tr->prp, @@ -337,7 +337,7 @@ nvme_qpair_complete_tracker(struct nvme_ nvme_qpair_submit_tracker(qpair, tr); } else { if (req->type != NVME_REQUEST_NULL) - bus_dmamap_unload(qpair->dma_tag, + bus_dmamap_unload(qpair->dma_tag_payload, tr->payload_dma_map); nvme_free_request(req); @@ -464,6 +464,7 @@ nvme_qpair_construct(struct nvme_qpair * { struct nvme_tracker *tr; uint32_t i; + int err; qpair->id = id; qpair->vector = vector; @@ -497,11 +498,20 @@ nvme_qpair_construct(struct nvme_qpair * mtx_init(&qpair->lock, "nvme qpair lock", NULL, MTX_DEF); /* Note: NVMe PRP format is restricted to 4-byte alignment. */ - bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), + err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), 4, PAGE_SIZE, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, NVME_MAX_XFER_SIZE, (NVME_MAX_XFER_SIZE/PAGE_SIZE)+1, PAGE_SIZE, 0, + NULL, NULL, &qpair->dma_tag_payload); + if (err != 0) + nvme_printf(ctrlr, "payload tag create failed %d\n", err); + + err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), + 4, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXADDR, 1, BUS_SPACE_MAXSIZE, 0, NULL, NULL, &qpair->dma_tag); + if (err != 0) + nvme_printf(ctrlr, "tag create failed %d\n", err); qpair->num_cmds = 0; qpair->num_intr_handler_calls = 0; @@ -513,8 +523,13 @@ nvme_qpair_construct(struct nvme_qpair * sizeof(struct nvme_completion), M_NVME, M_ZERO, 0, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); - bus_dmamap_create(qpair->dma_tag, 0, &qpair->cmd_dma_map); - bus_dmamap_create(qpair->dma_tag, 0, &qpair->cpl_dma_map); + err = bus_dmamap_create(qpair->dma_tag, 0, &qpair->cmd_dma_map); + if (err != 0) + nvme_printf(ctrlr, "cmd_dma_map create failed %d\n", err); + + err = bus_dmamap_create(qpair->dma_tag, 0, &qpair->cpl_dma_map); + if (err != 0) + nvme_printf(ctrlr, "cpl_dma_map create failed %d\n", err); bus_dmamap_load(qpair->dma_tag, qpair->cmd_dma_map, qpair->cmd, qpair->num_entries * sizeof(struct nvme_command), @@ -570,6 +585,9 @@ nvme_qpair_destroy(struct nvme_qpair *qp if (qpair->dma_tag) bus_dma_tag_destroy(qpair->dma_tag); + if (qpair->dma_tag_payload) + bus_dma_tag_destroy(qpair->dma_tag_payload); + if (qpair->act_tr) free(qpair->act_tr, M_NVME); @@ -707,8 +725,11 @@ nvme_payload_map(void *arg, bus_dma_segm * is responsible for detecting the error status and failing the * tracker manually. */ - if (error != 0) + if (error != 0) { + nvme_printf(tr->qpair->ctrlr, + "nvme_payload_map err %d\n", error); return; + } /* * Note that we specified PAGE_SIZE for alignment and max @@ -728,6 +749,13 @@ nvme_payload_map(void *arg, bus_dma_segm (uint64_t)seg[cur_nseg].ds_addr; cur_nseg++; } + } else { + /* + * prp2 should not be used by the controller + * since there is only one segment, but set + * to 0 just to be safe. + */ + tr->req->cmd.prp2 = 0; } nvme_qpair_submit_tracker(tr->qpair, tr); @@ -780,8 +808,9 @@ _nvme_qpair_submit_request(struct nvme_q KASSERT(req->payload_size <= qpair->ctrlr->max_xfer_size, ("payload_size (%d) exceeds max_xfer_size (%d)\n", req->payload_size, qpair->ctrlr->max_xfer_size)); - err = bus_dmamap_load(tr->qpair->dma_tag, tr->payload_dma_map, - req->u.payload, req->payload_size, nvme_payload_map, tr, 0); + err = bus_dmamap_load(tr->qpair->dma_tag_payload, + tr->payload_dma_map, req->u.payload, req->payload_size, + nvme_payload_map, tr, 0); if (err != 0) nvme_printf(qpair->ctrlr, "bus_dmamap_load returned 0x%x!\n", err); @@ -795,7 +824,7 @@ _nvme_qpair_submit_request(struct nvme_q ("bio->bio_bcount (%jd) exceeds max_xfer_size (%d)\n", (intmax_t)req->u.bio->bio_bcount, qpair->ctrlr->max_xfer_size)); - err = bus_dmamap_load_bio(tr->qpair->dma_tag, + err = bus_dmamap_load_bio(tr->qpair->dma_tag_payload, tr->payload_dma_map, req->u.bio, nvme_payload_map, tr, 0); if (err != 0) nvme_printf(qpair->ctrlr, From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 21:50:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8822E4B6; Wed, 8 Apr 2015 21:50:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59C5EE97; Wed, 8 Apr 2015 21:50:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t38LokID059706; Wed, 8 Apr 2015 21:50:46 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38LokL0059705; Wed, 8 Apr 2015 21:50:46 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201504082150.t38LokL0059705@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Wed, 8 Apr 2015 21:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281282 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 21:50:46 -0000 Author: jimharris Date: Wed Apr 8 21:50:45 2015 New Revision: 281282 URL: https://svnweb.freebsd.org/changeset/base/281282 Log: nvme: add device strings for Intel DC series NVMe SSDs MFC after: 1 week Sponsored by: Intel Modified: head/sys/dev/nvme/nvme.c Modified: head/sys/dev/nvme/nvme.c ============================================================================== --- head/sys/dev/nvme/nvme.c Wed Apr 8 21:49:45 2015 (r281281) +++ head/sys/dev/nvme/nvme.c Wed Apr 8 21:50:45 2015 (r281282) @@ -81,27 +81,55 @@ MODULE_VERSION(nvme, 1); static struct _pcsid { - u_int32_t type; - const char *desc; + uint32_t devid; + int match_subdevice; + uint16_t subdevice; + const char *desc; } pci_ids[] = { - { 0x01118086, "NVMe Controller" }, - { CHATHAM_PCI_ID, "Chatham Prototype NVMe Controller" }, - { IDT32_PCI_ID, "IDT NVMe Controller (32 channel)" }, - { IDT8_PCI_ID, "IDT NVMe Controller (8 channel)" }, - { 0x00000000, NULL } + { 0x01118086, 0, 0, "NVMe Controller" }, + { CHATHAM_PCI_ID, 0, 0, "Chatham Prototype NVMe Controller" }, + { IDT32_PCI_ID, 0, 0, "IDT NVMe Controller (32 channel)" }, + { IDT8_PCI_ID, 0, 0, "IDT NVMe Controller (8 channel)" }, + { 0x09538086, 1, 0x3702, "DC P3700 SSD" }, + { 0x09538086, 1, 0x3703, "DC P3700 SSD [2.5\" SFF]" }, + { 0x09538086, 1, 0x3704, "DC P3500 SSD [Add-in Card]" }, + { 0x09538086, 1, 0x3705, "DC P3500 SSD [2.5\" SFF]" }, + { 0x09538086, 1, 0x3709, "DC P3600 SSD [Add-in Card]" }, + { 0x09538086, 1, 0x370a, "DC P3600 SSD [2.5\" SFF]" }, + { 0x00000000, 0, 0, NULL } }; static int +nvme_match(uint32_t devid, uint16_t subdevice, struct _pcsid *ep) +{ + if (devid != ep->devid) + return 0; + + if (!ep->match_subdevice) + return 1; + + if (subdevice == ep->subdevice) + return 1; + else + return 0; +} + +static int nvme_probe (device_t device) { struct _pcsid *ep; - u_int32_t type; + uint32_t devid; + uint16_t subdevice; - type = pci_get_devid(device); + devid = pci_get_devid(device); + subdevice = pci_get_subdevice(device); ep = pci_ids; - while (ep->type && ep->type != type) + while (ep->devid) { + if (nvme_match(devid, subdevice, ep)) + break; ++ep; + } if (ep->desc) { device_set_desc(device, ep->desc); From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 21:52:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFF9B746; Wed, 8 Apr 2015 21:52:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7B6DEC0; Wed, 8 Apr 2015 21:52:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t38Lq8oR062867; Wed, 8 Apr 2015 21:52:08 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38Lq7jj062862; Wed, 8 Apr 2015 21:52:07 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201504082152.t38Lq7jj062862@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Wed, 8 Apr 2015 21:52:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281283 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 21:52:08 -0000 Author: jimharris Date: Wed Apr 8 21:52:06 2015 New Revision: 281283 URL: https://svnweb.freebsd.org/changeset/base/281283 Log: nvme: remove CHATHAM related code Chatham was an internal NVMe prototype board used for early driver development. MFC after: 1 week Sponsored by: Intel Modified: head/sys/dev/nvme/nvme.c head/sys/dev/nvme/nvme_ctrlr.c head/sys/dev/nvme/nvme_ns.c head/sys/dev/nvme/nvme_private.h head/sys/dev/nvme/nvme_qpair.c Modified: head/sys/dev/nvme/nvme.c ============================================================================== --- head/sys/dev/nvme/nvme.c Wed Apr 8 21:50:45 2015 (r281282) +++ head/sys/dev/nvme/nvme.c Wed Apr 8 21:52:06 2015 (r281283) @@ -87,7 +87,6 @@ static struct _pcsid const char *desc; } pci_ids[] = { { 0x01118086, 0, 0, "NVMe Controller" }, - { CHATHAM_PCI_ID, 0, 0, "Chatham Prototype NVMe Controller" }, { IDT32_PCI_ID, 0, 0, "IDT NVMe Controller (32 channel)" }, { IDT8_PCI_ID, 0, 0, "IDT NVMe Controller (8 channel)" }, { 0x09538086, 1, 0x3702, "DC P3700 SSD" }, Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Wed Apr 8 21:50:45 2015 (r281282) +++ head/sys/dev/nvme/nvme_ctrlr.c Wed Apr 8 21:52:06 2015 (r281283) @@ -49,11 +49,7 @@ static int nvme_ctrlr_allocate_bar(struct nvme_controller *ctrlr) { - /* Chatham puts the NVMe MMRs behind BAR 2/3, not BAR 0/1. */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - ctrlr->resource_id = PCIR_BAR(2); - else - ctrlr->resource_id = PCIR_BAR(0); + ctrlr->resource_id = PCIR_BAR(0); ctrlr->resource = bus_alloc_resource(ctrlr->dev, SYS_RES_MEMORY, &ctrlr->resource_id, 0, ~0, 1, RF_ACTIVE); @@ -81,117 +77,6 @@ nvme_ctrlr_allocate_bar(struct nvme_cont return (0); } -#ifdef CHATHAM2 -static int -nvme_ctrlr_allocate_chatham_bar(struct nvme_controller *ctrlr) -{ - - ctrlr->chatham_resource_id = PCIR_BAR(CHATHAM_CONTROL_BAR); - ctrlr->chatham_resource = bus_alloc_resource(ctrlr->dev, - SYS_RES_MEMORY, &ctrlr->chatham_resource_id, 0, ~0, 1, - RF_ACTIVE); - - if(ctrlr->chatham_resource == NULL) { - nvme_printf(ctrlr, "unable to alloc pci resource\n"); - return (ENOMEM); - } - - ctrlr->chatham_bus_tag = rman_get_bustag(ctrlr->chatham_resource); - ctrlr->chatham_bus_handle = - rman_get_bushandle(ctrlr->chatham_resource); - - return (0); -} - -static void -nvme_ctrlr_setup_chatham(struct nvme_controller *ctrlr) -{ - uint64_t reg1, reg2, reg3; - uint64_t temp1, temp2; - uint32_t temp3; - uint32_t use_flash_timings = 0; - - DELAY(10000); - - temp3 = chatham_read_4(ctrlr, 0x8080); - - device_printf(ctrlr->dev, "Chatham version: 0x%x\n", temp3); - - ctrlr->chatham_lbas = chatham_read_4(ctrlr, 0x8068) - 0x110; - ctrlr->chatham_size = ctrlr->chatham_lbas * 512; - - device_printf(ctrlr->dev, "Chatham size: %jd\n", - (intmax_t)ctrlr->chatham_size); - - reg1 = reg2 = reg3 = ctrlr->chatham_size - 1; - - TUNABLE_INT_FETCH("hw.nvme.use_flash_timings", &use_flash_timings); - if (use_flash_timings) { - device_printf(ctrlr->dev, "Chatham: using flash timings\n"); - temp1 = 0x00001b58000007d0LL; - temp2 = 0x000000cb00000131LL; - } else { - device_printf(ctrlr->dev, "Chatham: using DDR timings\n"); - temp1 = temp2 = 0x0LL; - } - - chatham_write_8(ctrlr, 0x8000, reg1); - chatham_write_8(ctrlr, 0x8008, reg2); - chatham_write_8(ctrlr, 0x8010, reg3); - - chatham_write_8(ctrlr, 0x8020, temp1); - temp3 = chatham_read_4(ctrlr, 0x8020); - - chatham_write_8(ctrlr, 0x8028, temp2); - temp3 = chatham_read_4(ctrlr, 0x8028); - - chatham_write_8(ctrlr, 0x8030, temp1); - chatham_write_8(ctrlr, 0x8038, temp2); - chatham_write_8(ctrlr, 0x8040, temp1); - chatham_write_8(ctrlr, 0x8048, temp2); - chatham_write_8(ctrlr, 0x8050, temp1); - chatham_write_8(ctrlr, 0x8058, temp2); - - DELAY(10000); -} - -static void -nvme_chatham_populate_cdata(struct nvme_controller *ctrlr) -{ - struct nvme_controller_data *cdata; - - cdata = &ctrlr->cdata; - - cdata->vid = 0x8086; - cdata->ssvid = 0x2011; - - /* - * Chatham2 puts garbage data in these fields when we - * invoke IDENTIFY_CONTROLLER, so we need to re-zero - * the fields before calling bcopy(). - */ - memset(cdata->sn, 0, sizeof(cdata->sn)); - memcpy(cdata->sn, "2012", strlen("2012")); - memset(cdata->mn, 0, sizeof(cdata->mn)); - memcpy(cdata->mn, "CHATHAM2", strlen("CHATHAM2")); - memset(cdata->fr, 0, sizeof(cdata->fr)); - memcpy(cdata->fr, "0", strlen("0")); - cdata->rab = 8; - cdata->aerl = 3; - cdata->lpa.ns_smart = 1; - cdata->sqes.min = 6; - cdata->sqes.max = 6; - cdata->cqes.min = 4; - cdata->cqes.max = 4; - cdata->nn = 1; - - /* Chatham2 doesn't support DSM command */ - cdata->oncs.dsm = 0; - - cdata->vwc.present = 1; -} -#endif /* CHATHAM2 */ - static void nvme_ctrlr_construct_admin_qpair(struct nvme_controller *ctrlr) { @@ -461,11 +346,6 @@ nvme_ctrlr_identify(struct nvme_controll return (ENXIO); } -#ifdef CHATHAM2 - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - nvme_chatham_populate_cdata(ctrlr); -#endif - /* * Use MDTS to ensure our default max_xfer_size doesn't exceed what the * controller supports. @@ -779,10 +659,6 @@ nvme_ctrlr_configure_aer(struct nvme_con /* aerl is a zero-based value, so we need to add 1 here. */ ctrlr->num_aers = min(NVME_MAX_ASYNC_EVENTS, (ctrlr->cdata.aerl+1)); - /* Chatham doesn't support AERs. */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - ctrlr->num_aers = 0; - for (i = 0; i < ctrlr->num_aers; i++) { aer = &ctrlr->aer[i]; nvme_ctrlr_construct_and_submit_aer(ctrlr, aer); @@ -1034,27 +910,6 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_lo break; case NVME_PASSTHROUGH_CMD: pt = (struct nvme_pt_command *)arg; -#ifdef CHATHAM2 - /* - * Chatham IDENTIFY data is spoofed, so copy the spoofed data - * rather than issuing the command to the Chatham controller. - */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID && - pt->cmd.opc == NVME_OPC_IDENTIFY) { - if (pt->cmd.cdw10 == 1) { - if (pt->len != sizeof(ctrlr->cdata)) - return (EINVAL); - return (copyout(&ctrlr->cdata, pt->buf, - pt->len)); - } else { - if (pt->len != sizeof(ctrlr->ns[0].data) || - pt->cmd.nsid != 1) - return (EINVAL); - return (copyout(&ctrlr->ns[0].data, pt->buf, - pt->len)); - } - } -#endif return (nvme_ctrlr_passthrough_cmd(ctrlr, pt, pt->cmd.nsid, 1 /* is_user_buffer */, 1 /* is_admin_cmd */)); default: @@ -1087,15 +942,6 @@ nvme_ctrlr_construct(struct nvme_control if (status != 0) return (status); -#ifdef CHATHAM2 - if (pci_get_devid(dev) == CHATHAM_PCI_ID) { - status = nvme_ctrlr_allocate_chatham_bar(ctrlr); - if (status != 0) - return (status); - nvme_ctrlr_setup_chatham(ctrlr); - } -#endif - /* * Software emulators may set the doorbell stride to something * other than zero, but this driver is not set up to handle that. @@ -1244,14 +1090,8 @@ nvme_ctrlr_destruct(struct nvme_controll * during shutdown). This ensures the controller receives a * shutdown notification in case the system is shutdown before * reloading the driver. - * - * Chatham does not let you re-enable the controller after shutdown - * notification has been received, so do not send it in this case. - * This is OK because Chatham does not depend on the shutdown - * notification anyways. */ - if (pci_get_devid(ctrlr->dev) != CHATHAM_PCI_ID) - nvme_ctrlr_shutdown(ctrlr); + nvme_ctrlr_shutdown(ctrlr); nvme_ctrlr_disable(ctrlr); taskqueue_free(ctrlr->taskqueue); @@ -1280,13 +1120,6 @@ nvme_ctrlr_destruct(struct nvme_controll ctrlr->bar4_resource_id, ctrlr->bar4_resource); } -#ifdef CHATHAM2 - if (ctrlr->chatham_resource != NULL) { - bus_release_resource(dev, SYS_RES_MEMORY, - ctrlr->chatham_resource_id, ctrlr->chatham_resource); - } -#endif - if (ctrlr->tag) bus_teardown_intr(ctrlr->dev, ctrlr->res, ctrlr->tag); Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Wed Apr 8 21:50:45 2015 (r281282) +++ head/sys/dev/nvme/nvme_ns.c Wed Apr 8 21:52:06 2015 (r281283) @@ -465,28 +465,6 @@ nvme_ns_bio_process(struct nvme_namespac return (err); } -#ifdef CHATHAM2 -static void -nvme_ns_populate_chatham_data(struct nvme_namespace *ns) -{ - struct nvme_controller *ctrlr; - struct nvme_namespace_data *nsdata; - - ctrlr = ns->ctrlr; - nsdata = &ns->data; - - nsdata->nsze = ctrlr->chatham_lbas; - nsdata->ncap = ctrlr->chatham_lbas; - nsdata->nuse = ctrlr->chatham_lbas; - - /* Chatham2 doesn't support thin provisioning. */ - nsdata->nsfeat.thin_prov = 0; - - /* Set LBA size to 512 bytes. */ - nsdata->lbaf[0].lbads = 9; -} -#endif /* CHATHAM2 */ - int nvme_ns_construct(struct nvme_namespace *ns, uint16_t id, struct nvme_controller *ctrlr) @@ -513,23 +491,15 @@ nvme_ns_construct(struct nvme_namespace if (!mtx_initialized(&ns->lock)) mtx_init(&ns->lock, "nvme ns lock", NULL, MTX_DEF); -#ifdef CHATHAM2 - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - nvme_ns_populate_chatham_data(ns); - else { -#endif - status.done = FALSE; - nvme_ctrlr_cmd_identify_namespace(ctrlr, id, &ns->data, - nvme_completion_poll_cb, &status); - while (status.done == FALSE) - DELAY(5); - if (nvme_completion_is_error(&status.cpl)) { - nvme_printf(ctrlr, "nvme_identify_namespace failed\n"); - return (ENXIO); - } -#ifdef CHATHAM2 + status.done = FALSE; + nvme_ctrlr_cmd_identify_namespace(ctrlr, id, &ns->data, + nvme_completion_poll_cb, &status); + while (status.done == FALSE) + DELAY(5); + if (nvme_completion_is_error(&status.cpl)) { + nvme_printf(ctrlr, "nvme_identify_namespace failed\n"); + return (ENXIO); } -#endif /* * Note: format is a 0-based value, so > is appropriate here, Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Wed Apr 8 21:50:45 2015 (r281282) +++ head/sys/dev/nvme/nvme_private.h Wed Apr 8 21:52:06 2015 (r281283) @@ -50,13 +50,6 @@ MALLOC_DECLARE(M_NVME); -#define CHATHAM2 - -#ifdef CHATHAM2 -#define CHATHAM_PCI_ID 0x20118086 -#define CHATHAM_CONTROL_BAR 0 -#endif - #define IDT32_PCI_ID 0x80d0111d /* 32 channel board */ #define IDT8_PCI_ID 0x80d2111d /* 8 channel board */ @@ -267,13 +260,6 @@ struct nvme_controller { int bar4_resource_id; struct resource *bar4_resource; -#ifdef CHATHAM2 - bus_space_tag_t chatham_bus_tag; - bus_space_handle_t chatham_bus_handle; - int chatham_resource_id; - struct resource *chatham_resource; -#endif - uint32_t msix_enabled; uint32_t force_intx; uint32_t enable_aborts; @@ -339,11 +325,6 @@ struct nvme_controller { boolean_t is_failed; STAILQ_HEAD(, nvme_request) fail_req; - -#ifdef CHATHAM2 - uint64_t chatham_size; - uint64_t chatham_lbas; -#endif }; #define nvme_mmio_offsetof(reg) \ @@ -366,22 +347,6 @@ struct nvme_controller { (val & 0xFFFFFFFF00000000UL) >> 32); \ } while (0); -#ifdef CHATHAM2 -#define chatham_read_4(softc, reg) \ - bus_space_read_4((softc)->chatham_bus_tag, \ - (softc)->chatham_bus_handle, reg) - -#define chatham_write_8(sc, reg, val) \ - do { \ - bus_space_write_4((sc)->chatham_bus_tag, \ - (sc)->chatham_bus_handle, reg, val & 0xffffffff); \ - bus_space_write_4((sc)->chatham_bus_tag, \ - (sc)->chatham_bus_handle, reg+4, \ - (val & 0xFFFFFFFF00000000UL) >> 32); \ - } while (0); - -#endif /* CHATHAM2 */ - #if __FreeBSD_version < 800054 #define wmb() __asm volatile("sfence" ::: "memory") #define mb() __asm volatile("mfence" ::: "memory") Modified: head/sys/dev/nvme/nvme_qpair.c ============================================================================== --- head/sys/dev/nvme/nvme_qpair.c Wed Apr 8 21:50:45 2015 (r281282) +++ head/sys/dev/nvme/nvme_qpair.c Wed Apr 8 21:52:06 2015 (r281283) @@ -469,15 +469,6 @@ nvme_qpair_construct(struct nvme_qpair * qpair->id = id; qpair->vector = vector; qpair->num_entries = num_entries; -#ifdef CHATHAM2 - /* - * Chatham prototype board starts having issues at higher queue - * depths. So use a conservative estimate here of no more than 64 - * outstanding I/O per queue at any one point. - */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - num_trackers = min(num_trackers, 64); -#endif qpair->num_trackers = num_trackers; qpair->ctrlr = ctrlr; From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 22:21:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A595E236; Wed, 8 Apr 2015 22:21:58 +0000 (UTC) Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com [IPv6:2607:f8b0:400d:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5883720B; Wed, 8 Apr 2015 22:21:58 +0000 (UTC) Received: by qku63 with SMTP id 63so98860549qku.3; Wed, 08 Apr 2015 15:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=KQq8bzcdSQFjgQ2O/duOkMbNOynfkhOJyxHvBRrnaOU=; b=n9w+JQrwDdl+oSLLAcaTczK1g4InX98qFbNm/BZg94qWQuypgOtbqQ89XYEDk1OmX5 GVnGb+GqHPFyaabyOmty9r0ToB30J4QQj6IodzRu4tgi4whC+9tIPGV0M/uRA9TiWY50 elkOHGjGfwLCtR/JkCdBnyxVgw0F2PiyJAn2TUS1y3Xc9pnLAwUxX4xNw5TU3Y7F7HPX vREFygKi2p4O+mjFOHRcAluunohG8LMZPZzBv8KTHKiW4kUlWJ7ExJ+HoVPffn9zhhKa orxK0Qa7X0sbTYKm9eE9rrjWDlLOEMxWW8E6XnrTo+y3tzq8EC8twUYomlhldr4MlNOs Yzpw== X-Received: by 10.140.104.142 with SMTP id a14mr32747457qgf.89.1428531717458; Wed, 08 Apr 2015 15:21:57 -0700 (PDT) Received: from kan ([2601:6:6780:7e0:226:18ff:fe00:232e]) by mx.google.com with ESMTPSA id n52sm8462229qge.39.2015.04.08.15.21.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Apr 2015 15:21:56 -0700 (PDT) Date: Wed, 8 Apr 2015 18:21:50 -0400 From: Alexander Kabaev To: Jim Harris Subject: Re: svn commit: r281280 - head/sys/dev/nvme Message-ID: <20150408182150.03c2b832@kan> In-Reply-To: <201504082146.t38LkJ9s058300@svn.freebsd.org> References: <201504082146.t38LkJ9s058300@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/gKo_Qk1+A/SoeC74iMfp4ua"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 22:21:58 -0000 --Sig_/gKo_Qk1+A/SoeC74iMfp4ua Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 8 Apr 2015 21:46:19 +0000 (UTC) Jim Harris wrote: > Author: jimharris > Date: Wed Apr 8 21:46:18 2015 > New Revision: 281280 > URL: https://svnweb.freebsd.org/changeset/base/281280 >=20 > Log: > nvme: fall back to a smaller MSI-X vector allocation if necessary > =20 > Previously, if per-CPU MSI-X vectors could not be allocated, > nvme(4) would fall back to INTx with a single I/O queue pair. > This change will still fall back to a single I/O queue pair, but > allocate MSI-X vectors instead of reverting to INTx. > =20 > MFC after: 1 week > Sponsored by: Intel >=20 > Modified: > head/sys/dev/nvme/nvme_ctrlr.c >=20 > Modified: head/sys/dev/nvme/nvme_ctrlr.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/nvme/nvme_ctrlr.c Wed Apr 8 21:10:13 > 2015 (r281279) +++ head/sys/dev/nvme/nvme_ctrlr.c Wed > Apr 8 21:46:18 2015 (r281280) @@ -1144,9 +1144,17 @@ > nvme_ctrlr_construct(struct nvme_control /* One vector per IO queue, > plus one vector for admin queue. */ num_vectors =3D > ctrlr->num_io_queues + 1;=20 > - if (pci_msix_count(dev) < num_vectors) { > + /* > + * If we cannot even allocate 2 vectors (one for admin, one > for > + * I/O), then revert to INTx. > + */ > + if (pci_msix_count(dev) < 2) { > ctrlr->msix_enabled =3D 0; > goto intx; > + } else if (pci_msix_count(dev) < num_vectors) { > + ctrlr->per_cpu_io_queues =3D FALSE; > + ctrlr->num_io_queues =3D 1; > + num_vectors =3D 2; /* one for admin, one for I/O */ > } > =20 > if (pci_alloc_msix(dev, &num_vectors) !=3D 0) { Huh, Linux just falls back to as many vectors as it can and just allocates them between per-cpu queues in a round-robin manner. I think is is a better approach than what we have here, would you consider it? --=20 Alexander Kabaev --Sig_/gKo_Qk1+A/SoeC74iMfp4ua Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlUlqf8ACgkQQ6z1jMm+XZbkrACgkCASyf6ZLPccX3kZ9hqpHSa4 6ZEAmQGvCWmkCdtEV94sU6F5MMttgkoz =C4p0 -----END PGP SIGNATURE----- --Sig_/gKo_Qk1+A/SoeC74iMfp4ua-- From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 22:51:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAB13912; Wed, 8 Apr 2015 22:51:38 +0000 (UTC) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 80A5276D; Wed, 8 Apr 2015 22:51:38 +0000 (UTC) Received: by qkx62 with SMTP id 62so99835330qkx.0; Wed, 08 Apr 2015 15:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mjdXcRVH6bwfV7VHoGokH4n3osMDyOS9VcHM0v2R5cI=; b=E7CEj7NGUn4y99OTDpY+IWhyvruESgkBCMIEfhhRqvJa282b3cbsBg58L6H3E3sygb sLmNLUVEXKK6BlXRrq5RwajHc68g2h69pJZZWIa3S4DFSFcAL+/Rpi4g5gndxs1wQXYF OoiBNfAlaT3nLBs27oPtKm0su+0uErJWkZP04dRDiTTsNsxmlpYfyCGvE0jYXkO8ZPGl 0DqmmZ+pR9xcAJD8X6ye6YUi7NPzlrpru83KGnLIFiHbEhhikksEMXbvjZTwFCXg1Hc7 304FwPhmAT2Hsokkj3Cj7A7r2sKcHu3pUeR5em0jVZ1lb0iiVlbca7RzihQwBkrhK1iB e1gg== MIME-Version: 1.0 X-Received: by 10.55.50.201 with SMTP id y192mr36535125qky.10.1428533497595; Wed, 08 Apr 2015 15:51:37 -0700 (PDT) Received: by 10.140.38.73 with HTTP; Wed, 8 Apr 2015 15:51:37 -0700 (PDT) In-Reply-To: <20150408182150.03c2b832@kan> References: <201504082146.t38LkJ9s058300@svn.freebsd.org> <20150408182150.03c2b832@kan> Date: Wed, 8 Apr 2015 15:51:37 -0700 Message-ID: Subject: Re: svn commit: r281280 - head/sys/dev/nvme From: Jim Harris To: Alexander Kabaev Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 22:51:38 -0000 On Wed, Apr 8, 2015 at 3:21 PM, Alexander Kabaev wrote: > On Wed, 8 Apr 2015 21:46:19 +0000 (UTC) > Jim Harris wrote: > > > Author: jimharris > > Date: Wed Apr 8 21:46:18 2015 > > New Revision: 281280 > > URL: https://svnweb.freebsd.org/changeset/base/281280 > > > > Log: > > nvme: fall back to a smaller MSI-X vector allocation if necessary > > > > Previously, if per-CPU MSI-X vectors could not be allocated, > > nvme(4) would fall back to INTx with a single I/O queue pair. > > This change will still fall back to a single I/O queue pair, but > > allocate MSI-X vectors instead of reverting to INTx. > > > > MFC after: 1 week > > Sponsored by: Intel > > > > Modified: > > head/sys/dev/nvme/nvme_ctrlr.c > > > > Modified: head/sys/dev/nvme/nvme_ctrlr.c > > > ============================================================================== > > --- head/sys/dev/nvme/nvme_ctrlr.c Wed Apr 8 21:10:13 > > 2015 (r281279) +++ head/sys/dev/nvme/nvme_ctrlr.c Wed > > Apr 8 21:46:18 2015 (r281280) @@ -1144,9 +1144,17 @@ > > nvme_ctrlr_construct(struct nvme_control /* One vector per IO queue, > > plus one vector for admin queue. */ num_vectors = > > ctrlr->num_io_queues + 1; > > - if (pci_msix_count(dev) < num_vectors) { > > + /* > > + * If we cannot even allocate 2 vectors (one for admin, one > > for > > + * I/O), then revert to INTx. > > + */ > > + if (pci_msix_count(dev) < 2) { > > ctrlr->msix_enabled = 0; > > goto intx; > > + } else if (pci_msix_count(dev) < num_vectors) { > > + ctrlr->per_cpu_io_queues = FALSE; > > + ctrlr->num_io_queues = 1; > > + num_vectors = 2; /* one for admin, one for I/O */ > > } > > > > if (pci_alloc_msix(dev, &num_vectors) != 0) { > > Huh, Linux just falls back to as many vectors as it can and just > allocates them between per-cpu queues in a round-robin manner. I think > is is a better approach than what we have here, would you consider it? > This has been on my todo list for a while but have not had time to tackle it. I'm hoping to spend some time on it in the next couple of weeks though. I would prefer it to be smarter than just round-robin. For example, if multiple cores are sharing a queue pair, we probably want those cores to be on the same CPU socket. Or if hyper-threading is enabled, we likely want to assign those logical cores to the same queue pair. But short-term, yes - simple round-robin would be better than the current fallback scheme. -Jim > -- > Alexander Kabaev > From owner-svn-src-head@FreeBSD.ORG Wed Apr 8 23:15:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49E6FE32; Wed, 8 Apr 2015 23:15:37 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A5E27972; Wed, 8 Apr 2015 23:15:33 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 2EC8D25D3A7B; Wed, 8 Apr 2015 23:15:30 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 3F27CC7701E; Wed, 8 Apr 2015 23:15:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id tL2fw2oFsliW; Wed, 8 Apr 2015 23:15:26 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f069:8e65:2b43:cd64] (unknown [IPv6:fde9:577b:c1a9:4410:f069:8e65:2b43:cd64]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 65E56C7701A; Wed, 8 Apr 2015 23:15:25 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281281 - head/sys/dev/nvme From: "Bjoern A. Zeeb" In-Reply-To: <201504082149.t38LnjBZ058856@svn.freebsd.org> Date: Wed, 8 Apr 2015 23:14:52 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <6E785386-3746-48A7-87B5-D33CDD999767@FreeBSD.org> References: <201504082149.t38LnjBZ058856@svn.freebsd.org> To: Jim Harris X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 23:15:37 -0000 > On 08 Apr 2015, at 21:49 , Jim Harris wrote: >=20 > Author: jimharris > Date: Wed Apr 8 21:49:45 2015 > New Revision: 281281 > URL: https://svnweb.freebsd.org/changeset/base/281281 >=20 > Log: > nvme: create separate DMA tag for non-payload DMA buffers >=20 > Submission and completion queue memory need to use a > separate DMA tag for mappings than payload buffers, > to ensure mappings remain contiguous even with DMAR > enabled. >=20 > Submitted by: kib > MFC after: 1 week > Sponsored by: Intel >=20 > Modified: > head/sys/dev/nvme/nvme_private.h > head/sys/dev/nvme/nvme_qpair.c I think this one break i386 PAE and XEN kernels at least: = /scratch/tmp/bz/head.svn/sys/modules/nvme/../../dev/nvme/nvme_qpair.c:502:= 6: error: implicit conversion from 'unsigned long long' to 'bus_size_t' = (aka 'unsigned int') changes value from 18446744073709551615 to = 4294967295 [-Werr or,-Wconstant-conversion] BUS_SPACE_MAXADDR, 1, BUS_SPACE_MAXSIZE, 0, ^~~~~~~~~~~~~~~~~ ./x86/bus.h:121:27: note: expanded from macro 'BUS_SPACE_MAXADDR' #define BUS_SPACE_MAXADDR 0xFFFFFFFFFFFFFFFFULL ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. --- nvme_qpair.o --- *** [nvme_qpair.o] Error code 1 = /scratch/tmp/bz/head.svn/sys/modules/nvme/../../dev/nvme/nvme_qpair.c:502:= 6: error: implicit conversion from 'unsigned long long' to 'bus_size_t' = (aka 'unsigned int') changes value from 18446744073709551615 to = 4294967295 [-Werr or,-Wconstant-conversion] BUS_SPACE_MAXADDR, 1, BUS_SPACE_MAXSIZE, 0, ^~~~~~~~~~~~~~~~~ ./x86/bus.h:121:27: note: expanded from macro 'BUS_SPACE_MAXADDR' #define BUS_SPACE_MAXADDR 0xFFFFFFFFFFFFFFFFULL ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. --- nvme_qpair.o --- >=20 > Modified: head/sys/dev/nvme/nvme_private.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/nvme/nvme_private.h Wed Apr 8 21:46:18 2015 = (r281280) > +++ head/sys/dev/nvme/nvme_private.h Wed Apr 8 21:49:45 2015 = (r281281) > @@ -211,6 +211,7 @@ struct nvme_qpair { > struct nvme_completion *cpl; >=20 > bus_dma_tag_t dma_tag; > + bus_dma_tag_t dma_tag_payload; >=20 > bus_dmamap_t cmd_dma_map; > uint64_t cmd_bus_addr; > @@ -491,6 +492,8 @@ nvme_single_map(void *arg, bus_dma_segme > { > uint64_t *bus_addr =3D (uint64_t *)arg; >=20 > + if (error !=3D 0) > + printf("nvme_single_map err %d\n", error); > *bus_addr =3D seg[0].ds_addr; > } >=20 >=20 > Modified: head/sys/dev/nvme/nvme_qpair.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/nvme/nvme_qpair.c Wed Apr 8 21:46:18 2015 = (r281280) > +++ head/sys/dev/nvme/nvme_qpair.c Wed Apr 8 21:49:45 2015 = (r281281) > @@ -294,7 +294,7 @@ nvme_qpair_construct_tracker(struct nvme > uint16_t cid) > { >=20 > - bus_dmamap_create(qpair->dma_tag, 0, &tr->payload_dma_map); > + bus_dmamap_create(qpair->dma_tag_payload, 0, = &tr->payload_dma_map); > bus_dmamap_create(qpair->dma_tag, 0, &tr->prp_dma_map); >=20 > bus_dmamap_load(qpair->dma_tag, tr->prp_dma_map, tr->prp, > @@ -337,7 +337,7 @@ nvme_qpair_complete_tracker(struct nvme_ > nvme_qpair_submit_tracker(qpair, tr); > } else { > if (req->type !=3D NVME_REQUEST_NULL) > - bus_dmamap_unload(qpair->dma_tag, > + bus_dmamap_unload(qpair->dma_tag_payload, > tr->payload_dma_map); >=20 > nvme_free_request(req); > @@ -464,6 +464,7 @@ nvme_qpair_construct(struct nvme_qpair * > { > struct nvme_tracker *tr; > uint32_t i; > + int err; >=20 > qpair->id =3D id; > qpair->vector =3D vector; > @@ -497,11 +498,20 @@ nvme_qpair_construct(struct nvme_qpair * > mtx_init(&qpair->lock, "nvme qpair lock", NULL, MTX_DEF); >=20 > /* Note: NVMe PRP format is restricted to 4-byte alignment. */ > - bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), > + err =3D bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), > 4, PAGE_SIZE, BUS_SPACE_MAXADDR, > BUS_SPACE_MAXADDR, NULL, NULL, NVME_MAX_XFER_SIZE, > (NVME_MAX_XFER_SIZE/PAGE_SIZE)+1, PAGE_SIZE, 0, > + NULL, NULL, &qpair->dma_tag_payload); > + if (err !=3D 0) > + nvme_printf(ctrlr, "payload tag create failed %d\n", = err); > + > + err =3D bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), > + 4, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, > + BUS_SPACE_MAXADDR, 1, BUS_SPACE_MAXSIZE, 0, > NULL, NULL, &qpair->dma_tag); > + if (err !=3D 0) > + nvme_printf(ctrlr, "tag create failed %d\n", err); >=20 > qpair->num_cmds =3D 0; > qpair->num_intr_handler_calls =3D 0; > @@ -513,8 +523,13 @@ nvme_qpair_construct(struct nvme_qpair * > sizeof(struct nvme_completion), M_NVME, M_ZERO, > 0, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); >=20 > - bus_dmamap_create(qpair->dma_tag, 0, &qpair->cmd_dma_map); > - bus_dmamap_create(qpair->dma_tag, 0, &qpair->cpl_dma_map); > + err =3D bus_dmamap_create(qpair->dma_tag, 0, = &qpair->cmd_dma_map); > + if (err !=3D 0) > + nvme_printf(ctrlr, "cmd_dma_map create failed %d\n", = err); > + > + err =3D bus_dmamap_create(qpair->dma_tag, 0, = &qpair->cpl_dma_map); > + if (err !=3D 0) > + nvme_printf(ctrlr, "cpl_dma_map create failed %d\n", = err); >=20 > bus_dmamap_load(qpair->dma_tag, qpair->cmd_dma_map, > qpair->cmd, qpair->num_entries * sizeof(struct = nvme_command), > @@ -570,6 +585,9 @@ nvme_qpair_destroy(struct nvme_qpair *qp > if (qpair->dma_tag) > bus_dma_tag_destroy(qpair->dma_tag); >=20 > + if (qpair->dma_tag_payload) > + bus_dma_tag_destroy(qpair->dma_tag_payload); > + > if (qpair->act_tr) > free(qpair->act_tr, M_NVME); >=20 > @@ -707,8 +725,11 @@ nvme_payload_map(void *arg, bus_dma_segm > * is responsible for detecting the error status and failing = the > * tracker manually. > */ > - if (error !=3D 0) > + if (error !=3D 0) { > + nvme_printf(tr->qpair->ctrlr, > + "nvme_payload_map err %d\n", error); > return; > + } >=20 > /* > * Note that we specified PAGE_SIZE for alignment and max > @@ -728,6 +749,13 @@ nvme_payload_map(void *arg, bus_dma_segm > (uint64_t)seg[cur_nseg].ds_addr; > cur_nseg++; > } > + } else { > + /* > + * prp2 should not be used by the controller > + * since there is only one segment, but set > + * to 0 just to be safe. > + */ > + tr->req->cmd.prp2 =3D 0; > } >=20 > nvme_qpair_submit_tracker(tr->qpair, tr); > @@ -780,8 +808,9 @@ _nvme_qpair_submit_request(struct nvme_q > KASSERT(req->payload_size <=3D = qpair->ctrlr->max_xfer_size, > ("payload_size (%d) exceeds max_xfer_size (%d)\n", > req->payload_size, qpair->ctrlr->max_xfer_size)); > - err =3D bus_dmamap_load(tr->qpair->dma_tag, = tr->payload_dma_map, > - req->u.payload, req->payload_size, nvme_payload_map, = tr, 0); > + err =3D bus_dmamap_load(tr->qpair->dma_tag_payload, > + tr->payload_dma_map, req->u.payload, = req->payload_size, > + nvme_payload_map, tr, 0); > if (err !=3D 0) > nvme_printf(qpair->ctrlr, > "bus_dmamap_load returned 0x%x!\n", err); > @@ -795,7 +824,7 @@ _nvme_qpair_submit_request(struct nvme_q > ("bio->bio_bcount (%jd) exceeds max_xfer_size = (%d)\n", > (intmax_t)req->u.bio->bio_bcount, > qpair->ctrlr->max_xfer_size)); > - err =3D bus_dmamap_load_bio(tr->qpair->dma_tag, > + err =3D bus_dmamap_load_bio(tr->qpair->dma_tag_payload, > tr->payload_dma_map, req->u.bio, nvme_payload_map, = tr, 0); > if (err !=3D 0) > nvme_printf(qpair->ctrlr, >=20 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 00:37:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02125A2F; Thu, 9 Apr 2015 00:37:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E13A3156; Thu, 9 Apr 2015 00:37:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t390bu6R040088; Thu, 9 Apr 2015 00:37:56 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t390buIM040087; Thu, 9 Apr 2015 00:37:56 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201504090037.t390buIM040087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Thu, 9 Apr 2015 00:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281285 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 00:37:57 -0000 Author: jimharris Date: Thu Apr 9 00:37:55 2015 New Revision: 281285 URL: https://svnweb.freebsd.org/changeset/base/281285 Log: nvme: use BUS_SPACE_MAXSIZE for bus_dma_tag_create maxsize parameter This fixes i386 PAE build fallout from r281281. Reported by: bz MFC after: 1 week Modified: head/sys/dev/nvme/nvme_qpair.c Modified: head/sys/dev/nvme/nvme_qpair.c ============================================================================== --- head/sys/dev/nvme/nvme_qpair.c Wed Apr 8 22:02:15 2015 (r281284) +++ head/sys/dev/nvme/nvme_qpair.c Thu Apr 9 00:37:55 2015 (r281285) @@ -499,7 +499,7 @@ nvme_qpair_construct(struct nvme_qpair * err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), 4, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, - BUS_SPACE_MAXADDR, 1, BUS_SPACE_MAXSIZE, 0, + BUS_SPACE_MAXSIZE, 1, BUS_SPACE_MAXSIZE, 0, NULL, NULL, &qpair->dma_tag); if (err != 0) nvme_printf(ctrlr, "tag create failed %d\n", err); From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 04:49:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACF8D1EF; Thu, 9 Apr 2015 04:49:01 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 5548DB7; Thu, 9 Apr 2015 04:49:00 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id E6031D67379; Thu, 9 Apr 2015 14:48:49 +1000 (AEST) Date: Thu, 9 Apr 2015 14:48:49 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Bjoern A. Zeeb" Subject: Re: svn commit: r281281 - head/sys/dev/nvme In-Reply-To: <6E785386-3746-48A7-87B5-D33CDD999767@FreeBSD.org> Message-ID: <20150409134744.L1040@besplex.bde.org> References: <201504082149.t38LnjBZ058856@svn.freebsd.org> <6E785386-3746-48A7-87B5-D33CDD999767@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=bASMpu6ZMMMBHnxTApYA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, Jim Harris , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 04:49:01 -0000 On Wed, 8 Apr 2015, Bjoern A. Zeeb wrote: Please trim quotes. >> On 08 Apr 2015, at 21:49 , Jim Harris wrote: [... quotes trimmed] >> Log: >> nvme: create separate DMA tag for non-payload DMA buffers > > I think this one break i386 PAE and XEN kernels at least: > > /scratch/tmp/bz/head.svn/sys/modules/nvme/../../dev/nvme/nvme_qpair.c:502:6: error: implicit conversion from 'unsigned long long' to 'bus_size_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Werr > or,-Wconstant-conversion] > BUS_SPACE_MAXADDR, 1, BUS_SPACE_MAXSIZE, 0, > ^~~~~~~~~~~~~~~~~ > ./x86/bus.h:121:27: note: expanded from macro 'BUS_SPACE_MAXADDR' > #define BUS_SPACE_MAXADDR 0xFFFFFFFFFFFFFFFFULL > ^~~~~~~~~~~~~~~~~~~~~ Also, the use of the long long abomination is a type error on amd64. The same definition is used for both i386 PAE and amd64, but on amd64 bus_addr_t is uint64_t which is u_long. Also, the macro name doesn't match the type name. Only the macro name has '_SPACE' or '_space' in it. Other type names do have '_space' in them, so the shorter spelling of bus_addr_t is apparently intentional. I don't know if it is because bus_addr_t applies to more than bus spaces or just to not be so verbose. Even on i386 PAE, the abomination doesn't need to be spelled explicitly with 'ULL'. That was only needed for C90 compilers that warned about constant literals too large for u_long. In C99, 0xFFFFFFFFFFFFFFFF is just a constant. x86 bus.h is otherwise bad. It still has half-baked support for K&R -- it has mounds of code to declare prototypes for static inline functions. But K&R doesn't support inline, and without -funit-at-a-time inline functions have to be defined before they are used or they don't work, so there was never any need for prototypes. The abomination is also used for BUS_SPACE_MAXADDR on mips64 and powerpc64. This gives the same type error as on amd64, without the excuse of the PAE complication. mips seems to have another bug from another complication. Both mips64 and mips with CPU_CNMIPS have a 64-bit bus_addr_t, but only mips64 has a 64-bit BUS_SPACE_MAXADDR. BUS_SPACE_UNRESTRICTED has a type error/fragility on all arches. It is (~0). It is spelled that way to reduce ifdefs. It gives a signed type that promotes to an unsigned type with the correct number of bits when used in combination with bus_addr_t and other unsigned types. The others might not have 64 bits even on 64-bit arches, so the ifdefs would be even messier than for BUS_SPACE_MAXADDR. But this is fragile. Perhaps the spelling should be BUS_ADDR_UNRESTRICTED = BUS_ADDR_MAX where the latter is a correctly- spelled BUS_SPACE_MAXADDR. Some drivers still use the worse spelling of ~0ul. This tends to work for the same reason that ~0 works. But ~0u wouldn't work. BUS_SPACE_UNRESTRICTED is rarely used in device drivers. BUS_SPACE_MAXADDR is used a lot. > --- nvme_qpair.o --- > *** [nvme_qpair.o] Error code 1 > > /scratch/tmp/bz/head.svn/sys/modules/nvme/../../dev/nvme/nvme_qpair.c:502:6: error: implicit conversion from 'unsigned long long' to 'bus_size_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Werr > or,-Wconstant-conversion] > BUS_SPACE_MAXADDR, 1, BUS_SPACE_MAXSIZE, 0, > ^~~~~~~~~~~~~~~~~ > ./x86/bus.h:121:27: note: expanded from macro 'BUS_SPACE_MAXADDR' > #define BUS_SPACE_MAXADDR 0xFFFFFFFFFFFFFFFFULL > ^~~~~~~~~~~~~~~~~~~~~ > 1 error generated. > --- nvme_qpair.o --- This has further type errors which are detected accidentally by PAE. Apparently, 2 of the BUS_SPACE args are sizes, but one of these is spelled BUS_SPACE_MAXADDR. This is detected because BUS_SPACE_MAXADDR is too large for a size on PAE. The compiler misspells 0xFFFFFFFFFFFFFFFFULL as 18446744073709551615 in the error message. LINT should have an option or default to use type much weirder than PAE so as to detect more of these type mismatches non-accidentally. Unfortuntunately, this seems to require large ifdefs for the sizes too. You would make bus_addr_t uint8_t with and BUS_ADDR_MAX = 0xFF or weirder. Then the error of spelling BUS_ADDR_MAX as ~0u would be detected. OTOH, the spelling of BUS_SPACE_UNRESTRICTED as ~0 would probably not be detected. ~0 is -1 on 2's complement systems, and compilers don't warn about converting small negative values to an unsigned type since the conversion is reversible. Lower limits tend to be spelled as 0. That works without much fragility. It only needs prototypes in scope. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 04:51:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D70DD34F; Thu, 9 Apr 2015 04:51:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2C5D16B; Thu, 9 Apr 2015 04:51:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t394peef060535; Thu, 9 Apr 2015 04:51:40 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t394peAu060534; Thu, 9 Apr 2015 04:51:40 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504090451.t394peAu060534@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 9 Apr 2015 04:51:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281287 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 04:51:41 -0000 Author: adrian Date: Thu Apr 9 04:51:39 2015 New Revision: 281287 URL: https://svnweb.freebsd.org/changeset/base/281287 Log: Fix buffer overflow introduced in previous commits (unbreaks 802.11a capable NICs). Tested: * PCIe Intel 3945ABG NIC PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Thu Apr 9 03:30:05 2015 (r281286) +++ head/sys/dev/wpi/if_wpi.c Thu Apr 9 04:51:39 2015 (r281287) @@ -218,7 +218,7 @@ static int wpi_set_timing(struct wpi_sof static void wpi_power_calibration(struct wpi_softc *); static int wpi_set_txpower(struct wpi_softc *, int); static int wpi_get_power_index(struct wpi_softc *, - struct wpi_power_group *, struct ieee80211_channel *, int); + struct wpi_power_group *, uint8_t, int, int); static int wpi_set_pslevel(struct wpi_softc *, uint8_t, int, int); static int wpi_send_btcoex(struct wpi_softc *); static int wpi_send_rxon(struct wpi_softc *, int, int); @@ -3455,19 +3455,17 @@ wpi_power_calibration(struct wpi_softc * static int wpi_set_txpower(struct wpi_softc *sc, int async) { - struct ieee80211com *ic = sc->sc_ifp->if_l2com; - struct ieee80211_channel *ch; struct wpi_power_group *group; struct wpi_cmd_txpower cmd; uint8_t chan; - int idx, i; + int idx, is_chan_5ghz, i; /* Retrieve current channel from last RXON. */ chan = sc->rxon.chan; - ch = &ic->ic_channels[chan]; + is_chan_5ghz = (sc->rxon.flags & htole32(WPI_RXON_24GHZ)) == 0; /* Find the TX power group to which this channel belongs. */ - if (IEEE80211_IS_CHAN_5GHZ(ch)) { + if (is_chan_5ghz) { for (group = &sc->groups[1]; group < &sc->groups[4]; group++) if (chan <= group->chan) break; @@ -3475,17 +3473,17 @@ wpi_set_txpower(struct wpi_softc *sc, in group = &sc->groups[0]; memset(&cmd, 0, sizeof cmd); - cmd.band = IEEE80211_IS_CHAN_5GHZ(ch) ? 0 : 1; + cmd.band = is_chan_5ghz ? WPI_BAND_5GHZ : WPI_BAND_2GHZ; cmd.chan = htole16(chan); /* Set TX power for all OFDM and CCK rates. */ for (i = 0; i <= WPI_RIDX_MAX ; i++) { /* Retrieve TX power for this channel/rate. */ - idx = wpi_get_power_index(sc, group, ch, i); + idx = wpi_get_power_index(sc, group, chan, is_chan_5ghz, i); cmd.rates[i].plcp = wpi_ridx_to_plcp[i]; - if (IEEE80211_IS_CHAN_5GHZ(ch)) { + if (is_chan_5ghz) { cmd.rates[i].rf_gain = wpi_rf_gain_5ghz[idx]; cmd.rates[i].dsp_gain = wpi_dsp_gain_5ghz[idx]; } else { @@ -3506,7 +3504,7 @@ wpi_set_txpower(struct wpi_softc *sc, in */ static int wpi_get_power_index(struct wpi_softc *sc, struct wpi_power_group *group, - struct ieee80211_channel *c, int ridx) + uint8_t chan, int is_chan_5ghz, int ridx) { /* Fixed-point arithmetic division using a n-bit fractional part. */ #define fdivround(a, b, n) \ @@ -3516,13 +3514,8 @@ wpi_get_power_index(struct wpi_softc *sc #define interpolate(x, x1, y1, x2, y2, n) \ ((y1) + fdivround(((x) - (x1)) * ((y2) - (y1)), (x2) - (x1), n)) - struct ieee80211com *ic = sc->sc_ifp->if_l2com; struct wpi_power_sample *sample; int pwr, idx; - u_int chan; - - /* Get channel number. */ - chan = ieee80211_chan2ieee(ic, c); /* Default TX power is group maximum TX power minus 3dB. */ pwr = group->maxpwr / 2; @@ -3530,13 +3523,13 @@ wpi_get_power_index(struct wpi_softc *sc /* Decrease TX power for highest OFDM rates to reduce distortion. */ switch (ridx) { case WPI_RIDX_OFDM36: - pwr -= IEEE80211_IS_CHAN_2GHZ(c) ? 0 : 5; + pwr -= is_chan_5ghz ? 5 : 0; break; case WPI_RIDX_OFDM48: - pwr -= IEEE80211_IS_CHAN_2GHZ(c) ? 7 : 10; + pwr -= is_chan_5ghz ? 10 : 7; break; case WPI_RIDX_OFDM54: - pwr -= IEEE80211_IS_CHAN_2GHZ(c) ? 9 : 12; + pwr -= is_chan_5ghz ? 12 : 9; break; } From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 04:56:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA9FF4CE; Thu, 9 Apr 2015 04:56:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C693A18C; Thu, 9 Apr 2015 04:56:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t394uPSL062319; Thu, 9 Apr 2015 04:56:25 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t394uPIC062318; Thu, 9 Apr 2015 04:56:25 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504090456.t394uPIC062318@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Thu, 9 Apr 2015 04:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281288 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 04:56:26 -0000 Author: adrian Date: Thu Apr 9 04:56:24 2015 New Revision: 281288 URL: https://svnweb.freebsd.org/changeset/base/281288 Log: Do not access peripheral before clock stabilization. Tested: * Intel 3945ABG NIC, STA mode PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Thu Apr 9 04:51:39 2015 (r281287) +++ head/sys/dev/wpi/if_wpi.c Thu Apr 9 04:56:24 2015 (r281288) @@ -4905,10 +4905,6 @@ wpi_apm_init(struct wpi_softc *sc) /* Set FH wait threshold to max (HW bug under stress workaround). */ WPI_SETBITS(sc, WPI_DBG_HPET_MEM, 0xffff0000); - /* Cleanup. */ - wpi_prph_write(sc, WPI_APMG_CLK_DIS, 0x00000400); - wpi_prph_clrbits(sc, WPI_APMG_PS, 0x00000E00); - /* Retrieve PCIe Active State Power Management (ASPM). */ reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + 0x10, 1); /* Workaround for HW instability in PCIe L0->L0s->L1 transition. */ @@ -4925,6 +4921,10 @@ wpi_apm_init(struct wpi_softc *sc) if ((error = wpi_nic_lock(sc)) != 0) return error; + /* Cleanup. */ + wpi_prph_write(sc, WPI_APMG_CLK_DIS, 0x00000400); + wpi_prph_clrbits(sc, WPI_APMG_PS, 0x00000200); + /* Enable DMA and BSM (Bootstrap State Machine). */ wpi_prph_write(sc, WPI_APMG_CLK_EN, WPI_APMG_CLK_CTRL_DMA_CLK_RQT | WPI_APMG_CLK_CTRL_BSM_CLK_RQT); From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 05:27:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46FFCAD2; Thu, 9 Apr 2015 05:27:15 +0000 (UTC) Received: from aslan.scsiguy.com (mail.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F8FB674; Thu, 9 Apr 2015 05:27:14 +0000 (UTC) Received: from [192.168.0.61] (jt-mbp.home.scsiguy.org [192.168.0.61]) (authenticated bits=0) by aslan.scsiguy.com (8.14.9/8.14.9) with ESMTP id t395RC3S089180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Apr 2015 23:27:13 -0600 (MDT) (envelope-from gibbs@scsiguy.com) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r281162 - head/sys/vm From: "Justin T. Gibbs" In-Reply-To: <201504061845.t36Ijggp094300@svn.freebsd.org> Date: Wed, 8 Apr 2015 23:27:13 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <0342E981-09D2-4DA8-B3FC-2EC528762127@scsiguy.com> References: <201504061845.t36Ijggp094300@svn.freebsd.org> To: Dmitry Chagin X-Mailer: Apple Mail (2.2098) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 05:27:15 -0000 On Apr 6, 2015, at 12:45 PM, Dmitry Chagin wrote: >=20 > Author: dchagin > Date: Mon Apr 6 18:45:41 2015 > New Revision: 281162 > URL: https://svnweb.freebsd.org/changeset/base/281162 >=20 > Log: > Properly calculate "UMA Zones" per cpu cache size. Avoid allocating > an extra struct uma_cache since the struct uma_zone already has one. Isn=E2=80=99t the better fix here to use a C99 style flexible array = member (i.e. "struct uma_cache uz_cpu[];=E2=80=9D at the end of struct = uma_zone)? =E2=80=94 Justin= From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 07:45:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA74B95F; Thu, 9 Apr 2015 07:45:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C637477A; Thu, 9 Apr 2015 07:45:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t397jVMN043922; Thu, 9 Apr 2015 07:45:31 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t397jVKp043921; Thu, 9 Apr 2015 07:45:31 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504090745.t397jVKp043921@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 9 Apr 2015 07:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281290 - head/tools/debugscripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 07:45:32 -0000 Author: glebius Date: Thu Apr 9 07:45:30 2015 New Revision: 281290 URL: https://svnweb.freebsd.org/changeset/base/281290 Log: Provide a gdb script, that prints routing tables from a live kernel or a core file, much like 'netstat -anr' does it for living kernel. Right now only AF_INET routing table is printed. AF_INET6 needs to be done. But the most difficult part of the script (recursion!) is complete. Sponsored by: Nginx, Inc. Added: head/tools/debugscripts/netstat-anr.gdb (contents, props changed) Added: head/tools/debugscripts/netstat-anr.gdb ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/debugscripts/netstat-anr.gdb Thu Apr 9 07:45:30 2015 (r281290) @@ -0,0 +1,173 @@ +# +# $FreeBSD$ +# + +document netstat-anr +Print routing tables as 'netstat -anr' does. +end + +set $debug = 0 + +set $AF_INET = 2 +set $AF_LINK = 18 + +set $RNF_ROOT = 2 +set $RNF_ACTIVE = 4 + +set $RTF_UP = 0x1 +set $RTF_GATEWAY = 0x2 +set $RTF_HOST = 0x4 +set $RTF_STATIC = 0x800 + +# +# XXX: alas, we can't script "show endian" +# +if (machine[0] == 'a' && machine[1] == 'm' && machine[2] == 'd') || \ + (machine[0] == 'i' && machine[1] == '3' && machine[2] == '8') + set $byteswap = 1 +else + set $byteswap = 0 +end + +define routename + if ($byteswap) + printf "%u.%u.%u.%u", \ + $arg0 & 0xff, ($arg0 >> 8) & 0xff, \ + ($arg0 >> 16) & 0xff, ($arg0 >> 24) & 0xff + else + printf "%u.%u.%u.%u", \ + ($arg0 >> 24) & 0xff, ($arg0 >> 16) & 0xff, \ + ($arg0 >> 8) & 0xff, $arg0 & 0xff + end +end + +define domask + set $i = 0 + set $b = 0 + while $b < 32 + if ($arg0 & (1 << $b)) + set $i = $i + 1 + end + set $b = $b + 1 + end + printf "/%d", $i +end + +define p_flags + if ($arg0 & $RTF_UP) + printf "U" + end + if ($arg0 & $RTF_GATEWAY) + printf "G" + end + if ($arg0 & $RTF_HOST) + printf "H" + end + if ($arg0 & $RTF_STATIC) + printf "S" + end +end + +define p_sockaddr + set $sa = (struct sockaddr *)$arg0 + set $flags = $arg2 + if ($sa->sa_family == $AF_INET) + set $sin = (struct sockaddr_in *)$arg0 + set $mask = (struct sockaddr_in *)$arg1 + if ($flags & $RTF_HOST) + routename $sin->sin_addr.s_addr + else + routename $sin->sin_addr.s_addr + if ($mask != 0) + domask $mask->sin_addr.s_addr + else + domask 0 + end + end + end + if ($sa->sa_family == $AF_LINK) + set $sdl = (struct sockaddr_dl *)$arg0 + if ($sdl->sdl_nlen == 0 && $sdl->sdl_alen == 0 && \ + $sdl->sdl_slen == 0) + printf "link#%d", $sdl->sdl_index + end + end +end + +define p_rtentry + set $rte = (struct rtentry *)$arg0 + set $rn = (struct radix_node *)$arg0 + set $sa = ((struct sockaddr **)($rn->rn_u.rn_leaf.rn_Key)) + set $sam = ((struct sockaddr **)($rn->rn_u.rn_leaf.rn_Mask)) + set $gw = $rte->rt_gateway + + p_sockaddr $sa $sam $rte->rt_flags + printf "\t" + p_sockaddr $gw 0 $RTF_HOST + printf "\t" + p_flags $rte->rt_flags + printf "\t" + if ($rte->rt_ifp != 0) + printf "%s", $rte->rt_ifp->if_xname + end + printf "\n" +end + +define p_rtree + set $rn_$arg0 = (struct radix_node *)$arg1 + set $left_$arg0 = $arg0 + 1 + set $right_$arg0 = $arg0 + 2 + set $duped_$arg0 = $arg0 + 3 + + if ($rn_$arg0->rn_bit < 0 || ($rn_$arg0->rn_flags & $RNF_ACTIVE) == 0) + if ($debug == 1) + printf "print " + p $rn_$arg0 + end + if (($rn_$arg0->rn_flags & ($RNF_ACTIVE | $RNF_ROOT)) == \ + $RNF_ACTIVE) + p_rtentry $rn_$arg0 + end + if (($rn_$arg0->rn_flags & $RNF_ACTIVE) != 0 && \ + $rn_$arg0->rn_u.rn_leaf.rn_Dupedkey != 0) + if ($debug == 1) + printf "duped " + p $rn_$arg0 + end + p_rtree $duped_$arg0 $rn_$arg0->rn_u.rn_leaf.rn_Dupedkey + end + else + if ($rn_$arg0->rn_u.rn_node.rn_R != 0) + if ($debug == 1) + printf "right " + p $rn_$arg0 + end + p_rtree $right_$arg0 $rn_$arg0->rn_u.rn_node.rn_R + end + if ($rn_$arg0->rn_u.rn_node.rn_L != 0) + if ($debug == 1) + printf "left " + p $rn_$arg0 + end + p_rtree $left_$arg0 $rn_$arg0->rn_u.rn_node.rn_L + end + end +end + +define test + set $rn_$arg0 = $arg0 + set $next$arg0 = $arg0 + 1 + printf "%d\n", $rn_$arg0 + if $rn_$arg0 > 10 + return + end + test $next$arg0 +end + +define netstat-anr + printf "Routing tables\n\nInternet:\n" + set $af = $AF_INET + set $rt = (struct radix_node_head **)rt_tables + $af + printf "Destination\tGateway\tFlags\tNetif\n" + p_rtree 0 $rt->rnh_treetop +end From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 07:49:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA772BCE; Thu, 9 Apr 2015 07:49:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 966637B7; Thu, 9 Apr 2015 07:49:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t397nhMo044547; Thu, 9 Apr 2015 07:49:43 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t397nhKp044546; Thu, 9 Apr 2015 07:49:43 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504090749.t397nhKp044546@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 9 Apr 2015 07:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281291 - head/usr.sbin/crashinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 07:49:43 -0000 Author: glebius Date: Thu Apr 9 07:49:42 2015 New Revision: 281291 URL: https://svnweb.freebsd.org/changeset/base/281291 Log: Remove 'netstat -anr' from crashinfo. Modified: head/usr.sbin/crashinfo/crashinfo.sh Modified: head/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- head/usr.sbin/crashinfo/crashinfo.sh Thu Apr 9 07:45:30 2015 (r281290) +++ head/usr.sbin/crashinfo/crashinfo.sh Thu Apr 9 07:49:42 2015 (r281291) @@ -268,12 +268,6 @@ netstat -M $VMCORE -N $KERNEL -m echo echo "------------------------------------------------------------------------" -echo "netstat -anr" -echo -netstat -M $VMCORE -N $KERNEL -anr -echo - -echo "------------------------------------------------------------------------" echo "netstat -anA" echo netstat -M $VMCORE -N $KERNEL -anA From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 07:52:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA3AEE19; Thu, 9 Apr 2015 07:52:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A607E87D; Thu, 9 Apr 2015 07:52:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t397q4Jn048451; Thu, 9 Apr 2015 07:52:04 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t397q437048450; Thu, 9 Apr 2015 07:52:04 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504090752.t397q437048450@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 9 Apr 2015 07:52:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281292 - head/tools/debugscripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 07:52:04 -0000 Author: glebius Date: Thu Apr 9 07:52:03 2015 New Revision: 281292 URL: https://svnweb.freebsd.org/changeset/base/281292 Log: Remove debugging code that sneaked in. Modified: head/tools/debugscripts/netstat-anr.gdb Modified: head/tools/debugscripts/netstat-anr.gdb ============================================================================== --- head/tools/debugscripts/netstat-anr.gdb Thu Apr 9 07:49:42 2015 (r281291) +++ head/tools/debugscripts/netstat-anr.gdb Thu Apr 9 07:52:03 2015 (r281292) @@ -154,16 +154,6 @@ define p_rtree end end -define test - set $rn_$arg0 = $arg0 - set $next$arg0 = $arg0 + 1 - printf "%d\n", $rn_$arg0 - if $rn_$arg0 > 10 - return - end - test $next$arg0 -end - define netstat-anr printf "Routing tables\n\nInternet:\n" set $af = $AF_INET From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 07:53:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06D20F6C; Thu, 9 Apr 2015 07:53:27 +0000 (UTC) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE63B88C; Thu, 9 Apr 2015 07:53:26 +0000 (UTC) Received: by igblo3 with SMTP id lo3so58461295igb.0; Thu, 09 Apr 2015 00:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=e4tEPb8z2EPUYRhtqnniuVpl+LlvZidA7nSsZTC4B08=; b=taJqZWXKLITItMOBqE3nhPAVbjSemjTid1XEGDHUs1ri4+93ANU3axMgeMtm0d5jQ9 yTQsfOin6+KcaQ3JUjVK5JVbuDUlFqOGlS//yiBNpC4nB2SbBKboUhEz2KDuzGZH2jrW RpX/fqmsrGbWrndz4IRHs0BgbNTTnbbCFW0jZRkVYTCxtoZICP/jDAqijxCaTMJTUIqT wm3OpT0tuo2fDZ/oPM4D3jCe3J5SdWXKBATOE6befpcdKCAZoQ+MlX4PapabEQ5U0kdO 29FY0sz1W7dShml3kagcfB72fSaoKHHXE11U+nIitZCBlW3uNo/TY+1+zGMWZBErVzdV 5HvQ== X-Received: by 10.107.129.22 with SMTP id c22mr35593872iod.81.1428566006235; Thu, 09 Apr 2015 00:53:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.158.149 with HTTP; Thu, 9 Apr 2015 00:52:56 -0700 (PDT) In-Reply-To: <0342E981-09D2-4DA8-B3FC-2EC528762127@scsiguy.com> References: <201504061845.t36Ijggp094300@svn.freebsd.org> <0342E981-09D2-4DA8-B3FC-2EC528762127@scsiguy.com> From: luke Date: Thu, 9 Apr 2015 15:52:56 +0800 Message-ID: Subject: Re: svn commit: r281162 - head/sys/vm To: "Justin T. Gibbs" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Chagin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 07:53:27 -0000 On Thu, Apr 9, 2015 at 1:27 PM, Justin T. Gibbs wrote: > On Apr 6, 2015, at 12:45 PM, Dmitry Chagin wrote: > > > > Author: dchagin > > Date: Mon Apr 6 18:45:41 2015 > > New Revision: 281162 > > URL: https://svnweb.freebsd.org/changeset/base/281162 > > > > Log: > > Properly calculate "UMA Zones" per cpu cache size. Avoid allocating > > an extra struct uma_cache since the struct uma_zone already has one. > > Isn=E2=80=99t the better fix here to use a C99 style flexible array membe= r (i.e. > "struct uma_cache uz_cpu[];=E2=80=9D at the end of struct uma_zone)? > > Agree. It will save one struct uma_cache space for 5 UMA_internal zones. -- luke From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 08:37:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D493ED0; Thu, 9 Apr 2015 08:37:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 287A3DD4; Thu, 9 Apr 2015 08:37:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t398bGOx067817; Thu, 9 Apr 2015 08:37:16 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t398bGHY067816; Thu, 9 Apr 2015 08:37:16 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504090837.t398bGHY067816@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 9 Apr 2015 08:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281293 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 08:37:17 -0000 Author: glebius Date: Thu Apr 9 08:37:16 2015 New Revision: 281293 URL: https://svnweb.freebsd.org/changeset/base/281293 Log: Rename ip_drain_locked() to ip_drain_vnet(), since the function differs from ip_drain() not in locking, but in the scope of its work. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Apr 9 07:52:03 2015 (r281292) +++ head/sys/netinet/ip_input.c Thu Apr 9 08:37:16 2015 (r281293) @@ -181,7 +181,7 @@ static struct mtx_padalign ipqlock[IPREA static void maxnipq_update(void); static void ipq_zone_change(void *); -static void ip_drain_locked(void); +static void ip_drain_vnet(void); static VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ static VNET_DEFINE(int, nipq); /* Total # of reass queues */ @@ -397,7 +397,7 @@ ip_destroy(void) /* Cleanup in_ifaddr hash table; should be empty. */ hashdestroy(V_in_ifaddrhashtbl, M_IFADDR, V_in_ifaddrhmask); - ip_drain_locked(); + ip_drain_vnet(); uma_zdestroy(V_ipq_zone); } @@ -1338,11 +1338,9 @@ ip_slowtimo(void) /* * Drain off all datagram fragments. - * - * Call without any IPQ locks held. */ static void -ip_drain_locked(void) +ip_drain_vnet(void) { int i; @@ -1365,7 +1363,7 @@ ip_drain(void) VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - ip_drain_locked(); + ip_drain_vnet(); CURVNET_RESTORE(); } VNET_LIST_RUNLOCK_NOSLEEP(); From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 08:52:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92998513; Thu, 9 Apr 2015 08:52:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73D3CFCB; Thu, 9 Apr 2015 08:52:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t398q34r076501; Thu, 9 Apr 2015 08:52:03 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t398q3dB076500; Thu, 9 Apr 2015 08:52:03 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504090852.t398q3dB076500@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 9 Apr 2015 08:52:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281294 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 08:52:03 -0000 Author: glebius Date: Thu Apr 9 08:52:02 2015 New Revision: 281294 URL: https://svnweb.freebsd.org/changeset/base/281294 Log: o Since we always update either fragdrop or fragtimeout stat counter when we free a fragment, provide two inline functions that do that for us: ipq_drop() and ipq_timeout(). o Rename ip_free_f() to ipq_free() to match the name scheme of IP reassembly. o Remove assertion from ipq_free(), since it requires extra argument to be passed, but locking scheme is simple enough and function is static. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Apr 9 08:37:16 2015 (r281293) +++ head/sys/netinet/ip_input.c Thu Apr 9 08:52:02 2015 (r281294) @@ -177,11 +177,27 @@ static struct mtx_padalign ipqlock[IPREA #define IPQ_LOCK(i) mtx_lock(&ipqlock[(i)]) #define IPQ_UNLOCK(i) mtx_unlock(&ipqlock[(i)]) #define IPQ_LOCK_INIT(i) mtx_init(&ipqlock[(i)], "ipqlock", NULL, MTX_DEF) -#define IPQ_LOCK_ASSERT(i) mtx_assert(&ipqlock[(i)], MA_OWNED) static void maxnipq_update(void); static void ipq_zone_change(void *); static void ip_drain_vnet(void); +static void ipq_free(struct ipqhead *, struct ipq *); + +static inline void +ipq_timeout(struct ipqhead *head, struct ipq *fp) +{ + + IPSTAT_ADD(ips_fragtimeout, fp->ipq_nfrags); + ipq_free(head, fp); +} + +static inline void +ipq_drop(struct ipqhead *head, struct ipq *fp) +{ + + IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); + ipq_free(head, fp); +} static VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ static VNET_DEFINE(int, nipq); /* Total # of reass queues */ @@ -209,8 +225,6 @@ SYSCTL_INT(_net_inet_ip, OID_AUTO, steal "IP stealth mode, no TTL decrementation on forwarding"); #endif -static void ip_freef(struct ipqhead *, int, struct ipq *); - /* * IP statistics are stored in the "array" of counter(9)s. */ @@ -881,9 +895,7 @@ ip_reass_purge_element(int skip_bucket) IPQ_LOCK(i); r = TAILQ_LAST(&V_ipq[i], ipqhead); if (r) { - IPSTAT_ADD(ips_fragtimeout, - r->ipq_nfrags); - ip_freef(&V_ipq[i], i, r); + ipq_timeout(&V_ipq[i], r); IPQ_UNLOCK(i); return (i); } @@ -964,10 +976,8 @@ ip_reass(struct mbuf *m) * lock is no longer held. */ do_purge = 1; - } else { - IPSTAT_ADD(ips_fragtimeout, q->ipq_nfrags); - ip_freef(head, hash, q); - } + } else + ipq_timeout(head, q); } found: @@ -1125,20 +1135,16 @@ found: next = 0; for (p = NULL, q = fp->ipq_frags; q; p = q, q = q->m_nextpkt) { if (ntohs(GETIP(q)->ip_off) != next) { - if (fp->ipq_nfrags > V_maxfragsperpacket) { - IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); - ip_freef(head, hash, fp); - } + if (fp->ipq_nfrags > V_maxfragsperpacket) + ipq_drop(head, fp); goto done; } next += ntohs(GETIP(q)->ip_len); } /* Make sure the last packet didn't have the IP_MF flag */ if (p->m_flags & M_IP_FRAG) { - if (fp->ipq_nfrags > V_maxfragsperpacket) { - IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); - ip_freef(head, hash, fp); - } + if (fp->ipq_nfrags > V_maxfragsperpacket) + ipq_drop(head, fp); goto done; } @@ -1149,8 +1155,7 @@ found: ip = GETIP(q); if (next + (ip->ip_hl << 2) > IP_MAXPACKET) { IPSTAT_INC(ips_toolong); - IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); - ip_freef(head, hash, fp); + ipq_drop(head, fp); goto done; } @@ -1266,12 +1271,10 @@ done: * associated datagrams. */ static void -ip_freef(struct ipqhead *fhp, int i, struct ipq *fp) +ipq_free(struct ipqhead *fhp, struct ipq *fp) { struct mbuf *q; - IPQ_LOCK_ASSERT(i); - while (fp->ipq_frags) { q = fp->ipq_frags; fp->ipq_frags = q->m_nextpkt; @@ -1304,11 +1307,8 @@ ip_slowtimo(void) fpp = fp; fp = TAILQ_NEXT(fp, ipq_list); - if(--fpp->ipq_ttl == 0) { - IPSTAT_ADD(ips_fragtimeout, - fpp->ipq_nfrags); - ip_freef(&V_ipq[i], i, fpp); - } + if(--fpp->ipq_ttl == 0) + ipq_timeout(&V_ipq[i], fpp); } IPQ_UNLOCK(i); } @@ -1321,13 +1321,9 @@ ip_slowtimo(void) for (i = 0; i < IPREASS_NHASH; i++) { IPQ_LOCK(i); while (V_nipq > V_maxnipq && - !TAILQ_EMPTY(&V_ipq[i])) { - IPSTAT_ADD(ips_fragdropped, - TAILQ_FIRST(&V_ipq[i])->ipq_nfrags); - ip_freef(&V_ipq[i], - i, + !TAILQ_EMPTY(&V_ipq[i])) + ipq_drop(&V_ipq[i], TAILQ_FIRST(&V_ipq[i])); - } IPQ_UNLOCK(i); } } @@ -1346,11 +1342,8 @@ ip_drain_vnet(void) for (i = 0; i < IPREASS_NHASH; i++) { IPQ_LOCK(i); - while(!TAILQ_EMPTY(&V_ipq[i])) { - IPSTAT_ADD(ips_fragdropped, - TAILQ_FIRST(&V_ipq[i])->ipq_nfrags); - ip_freef(&V_ipq[i], i, TAILQ_FIRST(&V_ipq[i])); - } + while(!TAILQ_EMPTY(&V_ipq[i])) + ipq_drop(&V_ipq[i], TAILQ_FIRST(&V_ipq[i])); IPQ_UNLOCK(i); } } From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 08:56:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D09E79EC; Thu, 9 Apr 2015 08:56:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBC50B3; Thu, 9 Apr 2015 08:56:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t398uOBK077263; Thu, 9 Apr 2015 08:56:24 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t398uOAk077262; Thu, 9 Apr 2015 08:56:24 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504090856.t398uOAk077262@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 9 Apr 2015 08:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281295 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 08:56:24 -0000 Author: glebius Date: Thu Apr 9 08:56:23 2015 New Revision: 281295 URL: https://svnweb.freebsd.org/changeset/base/281295 Log: If V_maxnipq is set to zero, drain the queue here and now, instead of relying on timeouts. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Apr 9 08:52:02 2015 (r281294) +++ head/sys/netinet/ip_input.c Thu Apr 9 08:56:23 2015 (r281295) @@ -826,12 +826,12 @@ maxnipq_update(void) if (V_maxnipq > 0) uma_zone_set_max(V_ipq_zone, V_maxnipq); /* - * Zero specifies no further fragment queue allocation -- set the - * bound very low, but rely on implementation elsewhere to actually - * prevent allocation and reclaim current queues. + * Zero specifies no further fragment queue allocation. */ - if (V_maxnipq == 0) + if (V_maxnipq == 0) { uma_zone_set_max(V_ipq_zone, 1); + ip_drain_vnet(); + } } static void From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 09:00:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA336C97; Thu, 9 Apr 2015 09:00:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9527A10E; Thu, 9 Apr 2015 09:00:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3990XBr079796; Thu, 9 Apr 2015 09:00:33 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3990XFf079795; Thu, 9 Apr 2015 09:00:33 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504090900.t3990XFf079795@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 9 Apr 2015 09:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281296 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 09:00:33 -0000 Author: glebius Date: Thu Apr 9 09:00:32 2015 New Revision: 281296 URL: https://svnweb.freebsd.org/changeset/base/281296 Log: Use TAILQ_FOREACH_SAFE() instead of implementing it ourselves. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Apr 9 08:56:23 2015 (r281295) +++ head/sys/netinet/ip_input.c Thu Apr 9 09:00:32 2015 (r281296) @@ -1294,7 +1294,7 @@ void ip_slowtimo(void) { VNET_ITERATOR_DECL(vnet_iter); - struct ipq *fp; + struct ipq *fp, *tmp; int i; VNET_LIST_RLOCK_NOSLEEP(); @@ -1302,14 +1302,9 @@ ip_slowtimo(void) CURVNET_SET(vnet_iter); for (i = 0; i < IPREASS_NHASH; i++) { IPQ_LOCK(i); - for(fp = TAILQ_FIRST(&V_ipq[i]); fp;) { - struct ipq *fpp; - - fpp = fp; - fp = TAILQ_NEXT(fp, ipq_list); - if(--fpp->ipq_ttl == 0) - ipq_timeout(&V_ipq[i], fpp); - } + TAILQ_FOREACH_SAFE(fp, &V_ipq[i], ipq_list, tmp) + if (--fp->ipq_ttl == 0) + ipq_timeout(&V_ipq[i], fp); IPQ_UNLOCK(i); } /* From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 10:00:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF420CF2; Thu, 9 Apr 2015 10:00:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9835ADC; Thu, 9 Apr 2015 10:00:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39A0Rqf006571; Thu, 9 Apr 2015 10:00:27 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39A0RQo006569; Thu, 9 Apr 2015 10:00:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504091000.t39A0RQo006569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Apr 2015 10:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281297 - head/sys/boot/ficl/aarch64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:00:27 -0000 Author: andrew Date: Thu Apr 9 10:00:26 2015 New Revision: 281297 URL: https://svnweb.freebsd.org/changeset/base/281297 Log: Add the arm64 machine dependent parts of ficl. This is not machine dependent, as most copies of these files are identical, but unfortunately this is still needed. Sponsored by: The FreeBSD Foundation Added: head/sys/boot/ficl/aarch64/ head/sys/boot/ficl/aarch64/sysdep.c (contents, props changed) head/sys/boot/ficl/aarch64/sysdep.h (contents, props changed) Added: head/sys/boot/ficl/aarch64/sysdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/ficl/aarch64/sysdep.c Thu Apr 9 10:00:26 2015 (r281297) @@ -0,0 +1,99 @@ +/******************************************************************* +** s y s d e p . c +** Forth Inspired Command Language +** Author: John Sadler (john_sadler@alum.mit.edu) +** Created: 16 Oct 1997 +** Implementations of FICL external interface functions... +** +*******************************************************************/ + +/* $FreeBSD$ */ + +#ifdef TESTMAIN +#include +#include +#else +#include +#endif +#include "ficl.h" + +/* +******************* FreeBSD P O R T B E G I N S H E R E ******************** Michael Smith +*/ + +#if PORTABLE_LONGMULDIV == 0 +DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) +{ + DPUNS q; + u_int64_t qx; + + qx = (u_int64_t)x * (u_int64_t) y; + + q.hi = (u_int32_t)( qx >> 32 ); + q.lo = (u_int32_t)( qx & 0xFFFFFFFFL); + + return q; +} + +UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) +{ + UNSQR result; + u_int64_t qx, qh; + + qh = q.hi; + qx = (qh << 32) | q.lo; + + result.quot = qx / y; + result.rem = qx % y; + + return result; +} +#endif + +void ficlTextOut(FICL_VM *pVM, char *msg, int fNewline) +{ + IGNORE(pVM); + + while(*msg != 0) + putchar(*(msg++)); + if (fNewline) + putchar('\n'); + + return; +} + +void *ficlMalloc (size_t size) +{ + return malloc(size); +} + +void *ficlRealloc (void *p, size_t size) +{ + return realloc(p, size); +} + +void ficlFree (void *p) +{ + free(p); +} + + +/* +** Stub function for dictionary access control - does nothing +** by default, user can redefine to guarantee exclusive dict +** access to a single thread for updates. All dict update code +** is guaranteed to be bracketed as follows: +** ficlLockDictionary(TRUE); +** +** ficlLockDictionary(FALSE); +** +** Returns zero if successful, nonzero if unable to acquire lock +** befor timeout (optional - could also block forever) +*/ +#if FICL_MULTITHREAD +int ficlLockDictionary(short fLock) +{ + IGNORE(fLock); + return 0; +} +#endif /* FICL_MULTITHREAD */ Added: head/sys/boot/ficl/aarch64/sysdep.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/ficl/aarch64/sysdep.h Thu Apr 9 10:00:26 2015 (r281297) @@ -0,0 +1,411 @@ +/******************************************************************* + s y s d e p . h +** Forth Inspired Command Language +** Author: John Sadler (john_sadler@alum.mit.edu) +** Created: 16 Oct 1997 +** Ficl system dependent types and prototypes... +** +** Note: Ficl also depends on the use of "assert" when +** FICL_ROBUST is enabled. This may require some consideration +** in firmware systems since assert often +** assumes stderr/stdout. +** $Id: sysdep.h,v 1.6 2001-04-26 21:41:55-07 jsadler Exp jsadler $ +*******************************************************************/ +/* +** Copyright (c) 1997-2001 John Sadler (john_sadler@alum.mit.edu) +** All rights reserved. +** +** Get the latest Ficl release at http://ficl.sourceforge.net +** +** L I C E N S E and D I S C L A I M E R +** +** Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions +** are met: +** 1. Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in the +** documentation and/or other materials provided with the distribution. +** +** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +** SUCH DAMAGE. +** +** I am interested in hearing from anyone who uses ficl. If you have +** a problem, a success story, a defect, an enhancement request, or +** if you would like to contribute to the ficl release, please send +** contact me by email at the address above. +** +** $Id: sysdep.h,v 1.6 2001-04-26 21:41:55-07 jsadler Exp jsadler $ +** $FreeBSD$ +*/ + +#if !defined (__SYSDEP_H__) +#define __SYSDEP_H__ + +#include + +#include /* size_t, NULL */ +#include +#include + +#if !defined IGNORE /* Macro to silence unused param warnings */ +#define IGNORE(x) (void)(x) +#endif + +/* +** TRUE and FALSE for C boolean operations, and +** portable 32 bit types for CELLs +** +*/ +#if !defined TRUE +#define TRUE 1 +#endif +#if !defined FALSE +#define FALSE 0 +#endif + + +/* +** System dependent data type declarations... +*/ +#if !defined INT32 +#define INT32 int +#endif + +#if !defined UNS32 +#define UNS32 unsigned int +#endif + +#if !defined UNS16 +#define UNS16 unsigned short +#endif + +#if !defined UNS8 +#define UNS8 unsigned char +#endif + +#if !defined NULL +#define NULL ((void *)0) +#endif + +/* +** FICL_UNS and FICL_INT must have the same size as a void* on +** the target system. A CELL is a union of void*, FICL_UNS, and +** FICL_INT. +** (11/2000: same for FICL_FLOAT) +*/ +#if !defined FICL_INT +#define FICL_INT long +#endif + +#if !defined FICL_UNS +#define FICL_UNS unsigned long +#endif + +#if !defined FICL_FLOAT +#define FICL_FLOAT float +#endif + +/* +** Ficl presently supports values of 32 and 64 for BITS_PER_CELL +*/ +#if !defined BITS_PER_CELL +#define BITS_PER_CELL 64 +#endif + +#if ((BITS_PER_CELL != 32) && (BITS_PER_CELL != 64)) + Error! +#endif + +typedef struct +{ + FICL_UNS hi; + FICL_UNS lo; +} DPUNS; + +typedef struct +{ + FICL_UNS quot; + FICL_UNS rem; +} UNSQR; + +typedef struct +{ + FICL_INT hi; + FICL_INT lo; +} DPINT; + +typedef struct +{ + FICL_INT quot; + FICL_INT rem; +} INTQR; + + +/* +** B U I L D C O N T R O L S +*/ + +#if !defined (FICL_MINIMAL) +#define FICL_MINIMAL 0 +#endif +#if (FICL_MINIMAL) +#define FICL_WANT_SOFTWORDS 0 +#define FICL_WANT_FLOAT 0 +#define FICL_WANT_USER 0 +#define FICL_WANT_LOCALS 0 +#define FICL_WANT_DEBUGGER 0 +#define FICL_WANT_OOP 0 +#define FICL_PLATFORM_EXTEND 0 +#define FICL_MULTITHREAD 0 +#define FICL_ROBUST 0 +#define FICL_EXTENDED_PREFIX 0 +#endif + +/* +** FICL_PLATFORM_EXTEND +** Includes words defined in ficlCompilePlatform +*/ +#if !defined (FICL_PLATFORM_EXTEND) +#define FICL_PLATFORM_EXTEND 1 +#endif + +/* +** FICL_WANT_FLOAT +** Includes a floating point stack for the VM, and words to do float operations. +** Contributed by Guy Carver +*/ +#if !defined (FICL_WANT_FLOAT) +#define FICL_WANT_FLOAT 0 +#endif + +/* +** FICL_WANT_DEBUGGER +** Inludes a simple source level debugger +*/ +#if !defined (FICL_WANT_DEBUGGER) +#define FICL_WANT_DEBUGGER 1 +#endif + +/* +** User variables: per-instance variables bound to the VM. +** Kinda like thread-local storage. Could be implemented in a +** VM private dictionary, but I've chosen the lower overhead +** approach of an array of CELLs instead. +*/ +#if !defined FICL_WANT_USER +#define FICL_WANT_USER 1 +#endif + +#if !defined FICL_USER_CELLS +#define FICL_USER_CELLS 16 +#endif + +/* +** FICL_WANT_LOCALS controls the creation of the LOCALS wordset and +** a private dictionary for local variable compilation. +*/ +#if !defined FICL_WANT_LOCALS +#define FICL_WANT_LOCALS 1 +#endif + +/* Max number of local variables per definition */ +#if !defined FICL_MAX_LOCALS +#define FICL_MAX_LOCALS 16 +#endif + +/* +** FICL_WANT_OOP +** Inludes object oriented programming support (in softwords) +** OOP support requires locals and user variables! +*/ +#if !(FICL_WANT_LOCALS) || !(FICL_WANT_USER) +#if !defined (FICL_WANT_OOP) +#define FICL_WANT_OOP 0 +#endif +#endif + +#if !defined (FICL_WANT_OOP) +#define FICL_WANT_OOP 1 +#endif + +/* +** FICL_WANT_SOFTWORDS +** Controls inclusion of all softwords in softcore.c +*/ +#if !defined (FICL_WANT_SOFTWORDS) +#define FICL_WANT_SOFTWORDS 1 +#endif + +/* +** FICL_MULTITHREAD enables dictionary mutual exclusion +** wia the ficlLockDictionary system dependent function. +** Note: this implementation is experimental and poorly +** tested. Further, it's unnecessary unless you really +** intend to have multiple SESSIONS (poor choice of name +** on my part) - that is, threads that modify the dictionary +** at the same time. +*/ +#if !defined FICL_MULTITHREAD +#define FICL_MULTITHREAD 0 +#endif + +/* +** PORTABLE_LONGMULDIV causes ficlLongMul and ficlLongDiv to be +** defined in C in sysdep.c. Use this if you cannot easily +** generate an inline asm definition +*/ +#if !defined (PORTABLE_LONGMULDIV) +#define PORTABLE_LONGMULDIV 0 +#endif + +/* +** INLINE_INNER_LOOP causes the inner interpreter to be inline code +** instead of a function call. This is mainly because MS VC++ 5 +** chokes with an internal compiler error on the function version. +** in release mode. Sheesh. +*/ +#if !defined INLINE_INNER_LOOP +#if defined _DEBUG +#define INLINE_INNER_LOOP 0 +#else +#define INLINE_INNER_LOOP 1 +#endif +#endif + +/* +** FICL_ROBUST enables bounds checking of stacks and the dictionary. +** This will detect stack over and underflows and dictionary overflows. +** Any exceptional condition will result in an assertion failure. +** (As generated by the ANSI assert macro) +** FICL_ROBUST == 1 --> stack checking in the outer interpreter +** FICL_ROBUST == 2 also enables checking in many primitives +*/ + +#if !defined FICL_ROBUST +#define FICL_ROBUST 2 +#endif + +/* +** FICL_DEFAULT_STACK Specifies the default size (in CELLs) of +** a new virtual machine's stacks, unless overridden at +** create time. +*/ +#if !defined FICL_DEFAULT_STACK +#define FICL_DEFAULT_STACK 128 +#endif + +/* +** FICL_DEFAULT_DICT specifies the number of CELLs to allocate +** for the system dictionary by default. The value +** can be overridden at startup time as well. +** FICL_DEFAULT_ENV specifies the number of cells to allot +** for the environment-query dictionary. +*/ +#if !defined FICL_DEFAULT_DICT +#define FICL_DEFAULT_DICT 12288 +#endif + +#if !defined FICL_DEFAULT_ENV +#define FICL_DEFAULT_ENV 260 +#endif + +/* +** FICL_DEFAULT_VOCS specifies the maximum number of wordlists in +** the dictionary search order. See Forth DPANS sec 16.3.3 +** (file://dpans16.htm#16.3.3) +*/ +#if !defined FICL_DEFAULT_VOCS +#define FICL_DEFAULT_VOCS 16 +#endif + +/* +** FICL_MAX_PARSE_STEPS controls the size of an array in the FICL_SYSTEM structure +** that stores pointers to parser extension functions. I would never expect to have +** more than 8 of these, so that's the default limit. Too many of these functions +** will probably exact a nasty performance penalty. +*/ +#if !defined FICL_MAX_PARSE_STEPS +#define FICL_MAX_PARSE_STEPS 8 +#endif + +/* +** FICL_EXTENDED_PREFIX enables a bunch of extra prefixes in prefix.c and prefix.fr (if +** included as part of softcore.c) +*/ +#if !defined FICL_EXTENDED_PREFIX +#define FICL_EXTENDED_PREFIX 0 +#endif + +/* +** FICL_ALIGN is the power of two to which the dictionary +** pointer address must be aligned. This value is usually +** either 1 or 2, depending on the memory architecture +** of the target system; 2 is safe on any 16 or 32 bit +** machine. 3 would be appropriate for a 64 bit machine. +*/ +#if !defined FICL_ALIGN +#define FICL_ALIGN 3 +#define FICL_ALIGN_ADD ((1 << FICL_ALIGN) - 1) +#endif + +/* +** System dependent routines -- +** edit the implementations in sysdep.c to be compatible +** with your runtime environment... +** ficlTextOut sends a NULL terminated string to the +** default output device - used for system error messages +** ficlMalloc and ficlFree have the same semantics as malloc and free +** in standard C +** ficlLongMul multiplies two UNS32s and returns a 64 bit unsigned +** product +** ficlLongDiv divides an UNS64 by an UNS32 and returns UNS32 quotient +** and remainder +*/ +struct vm; +void ficlTextOut(struct vm *pVM, char *msg, int fNewline); +void *ficlMalloc (size_t size); +void ficlFree (void *p); +void *ficlRealloc(void *p, size_t size); +/* +** Stub function for dictionary access control - does nothing +** by default, user can redefine to guarantee exclusive dict +** access to a single thread for updates. All dict update code +** must be bracketed as follows: +** ficlLockDictionary(TRUE); +** +** ficlLockDictionary(FALSE); +** +** Returns zero if successful, nonzero if unable to acquire lock +** before timeout (optional - could also block forever) +** +** NOTE: this function must be implemented with lock counting +** semantics: nested calls must behave properly. +*/ +#if FICL_MULTITHREAD +int ficlLockDictionary(short fLock); +#else +#define ficlLockDictionary(x) 0 /* ignore */ +#endif + +/* +** 64 bit integer math support routines: multiply two UNS32s +** to get a 64 bit product, & divide the product by an UNS32 +** to get an UNS32 quotient and remainder. Much easier in asm +** on a 32 bit CPU than in C, which usually doesn't support +** the double length result (but it should). +*/ +DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y); +UNSQR ficlLongDiv(DPUNS q, FICL_UNS y); + +#endif /*__SYSDEP_H__*/ From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 10:08:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B1D965E; Thu, 9 Apr 2015 10:08:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85B3AC82; Thu, 9 Apr 2015 10:08:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39A8BLr011277; Thu, 9 Apr 2015 10:08:11 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39A8Bs3011276; Thu, 9 Apr 2015 10:08:11 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504091008.t39A8Bs3011276@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Apr 2015 10:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281300 - head/sys/boot/efi/boot1 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:08:11 -0000 Author: andrew Date: Thu Apr 9 10:08:10 2015 New Revision: 281300 URL: https://svnweb.freebsd.org/changeset/base/281300 Log: Only use -fPIC when building boot1.efi for x86. Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/efi/boot1/Makefile Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Thu Apr 9 10:07:06 2015 (r281299) +++ head/sys/boot/efi/boot1/Makefile Thu Apr 9 10:08:10 2015 (r281300) @@ -15,7 +15,6 @@ INTERNALPROG= # architecture-specific loader code SRCS= boot1.c reloc.c start.S -CFLAGS+= -fPIC CFLAGS+= -I. CFLAGS+= -I${.CURDIR}/../include CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH} @@ -35,6 +34,7 @@ LDSCRIPT= ${.CURDIR}/../loader/arch/${MA LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +CFLAGS+= -fPIC LDFLAGS+= -Wl,-znocombreloc .endif From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 10:15:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0750236C; Thu, 9 Apr 2015 10:15:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6DB1DBF; Thu, 9 Apr 2015 10:15:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39AFlsP016217; Thu, 9 Apr 2015 10:15:47 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39AFlkh016216; Thu, 9 Apr 2015 10:15:47 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504091015.t39AFlkh016216@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Apr 2015 10:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281307 - head/sys/boot/efi/boot1 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:15:48 -0000 Author: andrew Date: Thu Apr 9 10:15:47 2015 New Revision: 281307 URL: https://svnweb.freebsd.org/changeset/base/281307 Log: Print error values with hex to make it easier to find the EFI error type. Modified: head/sys/boot/efi/boot1/boot1.c Modified: head/sys/boot/efi/boot1/boot1.c ============================================================================== --- head/sys/boot/efi/boot1/boot1.c Thu Apr 9 10:12:58 2015 (r281306) +++ head/sys/boot/efi/boot1/boot1.c Thu Apr 9 10:15:47 2015 (r281307) @@ -330,18 +330,18 @@ load(const char *fname) status = systab->BootServices->LoadImage(TRUE, image, bootdevpath, buffer, bufsize, &loaderhandle); if (EFI_ERROR(status)) - printf("LoadImage failed with error %d\n", status); + printf("LoadImage failed with error %lx\n", status); status = systab->BootServices->HandleProtocol(loaderhandle, &LoadedImageGUID, (VOID**)&loaded_image); if (EFI_ERROR(status)) - printf("HandleProtocol failed with error %d\n", status); + printf("HandleProtocol failed with error %lx\n", status); loaded_image->DeviceHandle = bootdevhandle; status = systab->BootServices->StartImage(loaderhandle, NULL, NULL); if (EFI_ERROR(status)) - printf("StartImage failed with error %d\n", status); + printf("StartImage failed with error %lx\n", status); } static void From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 10:28:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E1E777A; Thu, 9 Apr 2015 10:28:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 596DEED0; Thu, 9 Apr 2015 10:28:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39AS5Kp021323; Thu, 9 Apr 2015 10:28:05 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39AS5V0021322; Thu, 9 Apr 2015 10:28:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504091028.t39AS5V0021322@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 9 Apr 2015 10:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281308 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:28:06 -0000 Author: andrew Date: Thu Apr 9 10:28:05 2015 New Revision: 281308 URL: https://svnweb.freebsd.org/changeset/base/281308 Log: Add R_AARCH64_NONE, the null relocation. Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Thu Apr 9 10:15:47 2015 (r281307) +++ head/sys/sys/elf_common.h Thu Apr 9 10:28:05 2015 (r281308) @@ -863,6 +863,7 @@ typedef struct { #define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */ #define R_386_IRELATIVE 42 /* PLT entry resolved indirectly at runtime */ +#define R_AARCH64_NONE 0 /* No relocation */ #define R_AARCH64_ABS64 257 /* Absolute offset */ #define R_AARCH64_ABS32 258 /* Absolute, 32-bit overflow check */ #define R_AARCH64_ABS16 259 /* Absolute, 16-bit overflow check */ From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 11:38:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 784D14D2; Thu, 9 Apr 2015 11:38:11 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3A912922; Thu, 9 Apr 2015 11:38:10 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id B15C83C3A19; Thu, 9 Apr 2015 21:38:03 +1000 (AEST) Date: Thu, 9 Apr 2015 21:38:02 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrew Turner Subject: Re: svn commit: r281307 - head/sys/boot/efi/boot1 In-Reply-To: <201504091015.t39AFlkh016216@svn.freebsd.org> Message-ID: <20150409212938.T3716@besplex.bde.org> References: <201504091015.t39AFlkh016216@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Za4kaKlA c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=q1YeAlXh32Kr5aB29l0A:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 11:38:11 -0000 On Thu, 9 Apr 2015, Andrew Turner wrote: > Log: > Print error values with hex to make it easier to find the EFI error type. > > Modified: > head/sys/boot/efi/boot1/boot1.c > > Modified: head/sys/boot/efi/boot1/boot1.c > ============================================================================== > --- head/sys/boot/efi/boot1/boot1.c Thu Apr 9 10:12:58 2015 (r281306) > +++ head/sys/boot/efi/boot1/boot1.c Thu Apr 9 10:15:47 2015 (r281307) > @@ -330,18 +330,18 @@ load(const char *fname) > status = systab->BootServices->LoadImage(TRUE, image, bootdevpath, > buffer, bufsize, &loaderhandle); > if (EFI_ERROR(status)) > - printf("LoadImage failed with error %d\n", status); > + printf("LoadImage failed with error %lx\n", status); How would anyone guess that a number like "10" is in hex? Hex numbers should usually be printed using "%#..." format. If the boot loader doesn't have that, then use an 0x prefix. This shouldn't compile. 'status' cannot have type int and type unsigned long at the same time. clang warns even without -Wformat in CFLAGS. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 12:57:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 743CBF0B; Thu, 9 Apr 2015 12:57:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45C00323; Thu, 9 Apr 2015 12:57:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39Cvx4O093169; Thu, 9 Apr 2015 12:57:59 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39CvxJf093168; Thu, 9 Apr 2015 12:57:59 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504091257.t39CvxJf093168@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 9 Apr 2015 12:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281309 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 12:57:59 -0000 Author: ae Date: Thu Apr 9 12:57:58 2015 New Revision: 281309 URL: https://svnweb.freebsd.org/changeset/base/281309 Log: Fix the check for maximum mbuf's size needed to send ND6 NA and NS. It is acceptable that the size can be equal to MCLBYTES. In the later KAME's code this check has been moved under DIAGNOSTIC ifdef, because the size of NA and NS is much smaller than MCLBYTES. So, it is safe to replace the check with KASSERT. PR: 199304 Discussed with: glebius MFC after: 1 week Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Thu Apr 9 10:28:05 2015 (r281308) +++ head/sys/netinet6/nd6_nbr.c Thu Apr 9 12:57:58 2015 (r281309) @@ -417,14 +417,9 @@ nd6_ns_output_fib(struct ifnet *ifp, con /* estimate the size of message */ maxlen = sizeof(*ip6) + sizeof(*nd_ns); maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; - if (max_linkhdr + maxlen >= MCLBYTES) { -#ifdef DIAGNOSTIC - printf("%s: max_linkhdr + maxlen >= MCLBYTES " - "(%d + %d > %d)\n", __func__, max_linkhdr, maxlen, - MCLBYTES); -#endif - return; - } + KASSERT(max_linkhdr + maxlen <= MCLBYTES, ( + "%s: max_linkhdr + maxlen > MCLBYTES (%d + %d > %d)", + __func__, max_linkhdr, maxlen, MCLBYTES)); if (max_linkhdr + maxlen > MHLEN) m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); @@ -992,13 +987,9 @@ nd6_na_output_fib(struct ifnet *ifp, con /* estimate the size of message */ maxlen = sizeof(*ip6) + sizeof(*nd_na); maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; - if (max_linkhdr + maxlen >= MCLBYTES) { -#ifdef DIAGNOSTIC - printf("nd6_na_output: max_linkhdr + maxlen >= MCLBYTES " - "(%d + %d > %d)\n", max_linkhdr, maxlen, MCLBYTES); -#endif - return; - } + KASSERT(max_linkhdr + maxlen <= MCLBYTES, ( + "%s: max_linkhdr + maxlen > MCLBYTES (%d + %d > %d)", + __func__, max_linkhdr, maxlen, MCLBYTES)); if (max_linkhdr + maxlen > MHLEN) m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 13:03:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BC14304; Thu, 9 Apr 2015 13:03:36 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 534AF603; Thu, 9 Apr 2015 13:03:36 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgC7H-000HY3-9E; Thu, 09 Apr 2015 16:03:31 +0300 Date: Thu, 9 Apr 2015 16:03:31 +0300 From: Slawa Olhovchenkov To: Kris Moore Subject: Re: svn commit: r279901 - head/usr.sbin/freebsd-update Message-ID: <20150409130331.GE1394@zxy.spb.ru> References: <201503120641.t2C6f2Gp004618@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503120641.t2C6f2Gp004618@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 13:03:36 -0000 On Thu, Mar 12, 2015 at 06:41:02AM +0000, Kris Moore wrote: > Author: kmoore (ports committer) > Date: Thu Mar 12 06:41:01 2015 > New Revision: 279901 > URL: https://svnweb.freebsd.org/changeset/base/279901 > > Log: > - Include commas in valid file-name chars freebsd-update will support > > Approved by: cperciva > > Modified: > head/usr.sbin/freebsd-update/freebsd-update.sh MFC planed? From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 13:09:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A86077B6; Thu, 9 Apr 2015 13:09:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7987766C; Thu, 9 Apr 2015 13:09:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39D97mv098301; Thu, 9 Apr 2015 13:09:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39D96RA098295; Thu, 9 Apr 2015 13:09:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091309.t39D96RA098295@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 9 Apr 2015 13:09:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281310 - in head/sys: geom geom/multipath vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 13:09:07 -0000 Author: mav Date: Thu Apr 9 13:09:05 2015 New Revision: 281310 URL: https://svnweb.freebsd.org/changeset/base/281310 Log: Remove sleeps from geom_up thread on device destruction. MFC after: 3 days. Modified: head/sys/geom/geom_dev.c head/sys/geom/multipath/g_multipath.c head/sys/vm/swap_pager.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Thu Apr 9 12:57:58 2015 (r281309) +++ head/sys/geom/geom_dev.c Thu Apr 9 13:09:05 2015 (r281310) @@ -572,7 +572,7 @@ g_dev_done(struct bio *bp2) } mtx_unlock(&sc->sc_mtx); if (destroy) - g_post_event(g_dev_destroy, cp, M_WAITOK, NULL); + g_post_event(g_dev_destroy, cp, M_NOWAIT, NULL); biodone(bp); } Modified: head/sys/geom/multipath/g_multipath.c ============================================================================== --- head/sys/geom/multipath/g_multipath.c Thu Apr 9 12:57:58 2015 (r281309) +++ head/sys/geom/multipath/g_multipath.c Thu Apr 9 13:09:05 2015 (r281310) @@ -369,9 +369,9 @@ g_multipath_done(struct bio *bp) mtx_lock(&sc->sc_mtx); (*cnt)--; if (*cnt == 0 && (cp->index & MP_LOST)) { - cp->index |= MP_POSTED; + if (g_post_event(g_mpd, cp, M_NOWAIT, NULL) == 0) + cp->index |= MP_POSTED; mtx_unlock(&sc->sc_mtx); - g_post_event(g_mpd, cp, M_WAITOK, NULL); } else mtx_unlock(&sc->sc_mtx); g_std_done(bp); Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Thu Apr 9 12:57:58 2015 (r281309) +++ head/sys/vm/swap_pager.c Thu Apr 9 13:09:05 2015 (r281310) @@ -2579,7 +2579,6 @@ swapgeom_done(struct bio *bp2) struct swdevt *sp; struct buf *bp; struct g_consumer *cp; - int destroy; bp = bp2->bio_caller2; cp = bp2->bio_from; @@ -2590,15 +2589,14 @@ swapgeom_done(struct bio *bp2) bp->b_error = bp2->bio_error; bufdone(bp); mtx_lock(&sw_dev_mtx); - destroy = ((--cp->index) == 0 && cp->private); - if (destroy) { - sp = bp2->bio_caller1; - sp->sw_id = NULL; + if ((--cp->index) == 0 && cp->private) { + if (g_post_event(swapgeom_close_ev, cp, M_NOWAIT, NULL) == 0) { + sp = bp2->bio_caller1; + sp->sw_id = NULL; + } } mtx_unlock(&sw_dev_mtx); g_destroy_bio(bp2); - if (destroy) - g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); } static void From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 13:45:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 553FD2D2; Thu, 9 Apr 2015 13:45:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40897B43; Thu, 9 Apr 2015 13:45:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39DjIgQ016703; Thu, 9 Apr 2015 13:45:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39DjIIs016702; Thu, 9 Apr 2015 13:45:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504091345.t39DjIIs016702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 9 Apr 2015 13:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281311 - head/usr.bin/ar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 13:45:18 -0000 Author: emaste Date: Thu Apr 9 13:45:17 2015 New Revision: 281311 URL: https://svnweb.freebsd.org/changeset/base/281311 Log: ar: Disallow directory traversal Set ARCHIVE_EXTRACT_SECURE_SYMLINKS and ARCHIVE_EXTRACT_SECURE_NODOTDOT as in bsdtar to prevent extraction of archive entries whose pathnames contain .. or whose target directory would be altered by a symlink. Also disallow absolute pathnames. We don't currently provide an option to disable this behaviour (as bsdtar's -P does). It is unlikely to be a problem in practice for ar(1), but the -P option is not currently used and available if we want to consider it for this purpose. Differential Revision: https://reviews.freebsd.org/D1524 Reported by: Alexander Cherepanov Approved by: delphij Obtained from: ELF tool chain ar, Ticket #474 MFC after: 1 week Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/ar/read.c Modified: head/usr.bin/ar/read.c ============================================================================== --- head/usr.bin/ar/read.c Thu Apr 9 13:09:05 2015 (r281310) +++ head/usr.bin/ar/read.c Thu Apr 9 13:45:17 2015 (r281311) @@ -187,7 +187,15 @@ read_archive(struct bsdar *bsdar, char m if (bsdar->options & AR_V) (void)fprintf(stdout, "x - %s\n", name); - flags = 0; + /* Disallow absolute paths. */ + if (name[0] == '/') { + bsdar_warnc(bsdar, 0, + "Absolute path '%s'", name); + continue; + } + /* Basic path security flags. */ + flags = ARCHIVE_EXTRACT_SECURE_SYMLINKS | \ + ARCHIVE_EXTRACT_SECURE_NODOTDOT; if (bsdar->options & AR_O) flags |= ARCHIVE_EXTRACT_TIME; From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 14:31:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 103FE192; Thu, 9 Apr 2015 14:31:43 +0000 (UTC) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9672FCF; Thu, 9 Apr 2015 14:31:42 +0000 (UTC) Received: from cpe-66-108-207-232.nyc.res.rr.com ([66.108.207.232]:50262 helo=[172.16.33.1]) by vps.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1YgDUb-0002Po-Cn; Thu, 09 Apr 2015 10:31:41 -0400 From: "George Neville-Neil" To: "Gleb Smirnoff" Subject: Re: svn commit: r281276 - head/sys/net Date: Thu, 09 Apr 2015 10:31:40 -0400 Message-ID: <1355AB02-F654-4129-BFDE-D3779664286A@freebsd.org> In-Reply-To: <20150408205501.GW64665@FreeBSD.org> References: <201504082025.t38KPqU0019878@svn.freebsd.org> <20150408205501.GW64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (1.9.1r5084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - freebsd.org X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 14:31:43 -0000 On 8 Apr 2015, at 16:55, Gleb Smirnoff wrote: > On Wed, Apr 08, 2015 at 08:25:51PM +0000, George V. Neville-Neil > wrote: > G> Author: gnn > G> Date: Wed Apr 8 20:25:51 2015 > G> New Revision: 281276 > G> URL: https://svnweb.freebsd.org/changeset/base/281276 > G> > G> Log: > G> Add support for a netisr polling tunable, which allows run time > switching of > G> device polling rather than having it only be controlled by the > compile > G> time option. > G> > G> Summary: Rubicon Communications (Netgate) > G> Reviewers: #network, hiren > G> Reviewed By: #network, hiren > G> Subscribers: hiren > G> Differential Revision: https://reviews.freebsd.org/D2258 > > You gave very short time to review it :( > > First, the sysctl namespace for device polling is kern.polling. > The polling(4) has two additional (to hardclock) modes of polling: > netisr polling and idle polling. The idle polling was always contolled > by sysctl in kern.polling namespace. Thus, the new sysctl should > reside > in this namespace. > > The second important thing is whether sysctl isn't needed at all? > What does Rubicon Communications (Netgate) need to achieve? My guess > is that they got DEVICE_POLLING in the kernel, but zero interfaces > with the IFCAP_POLLING bit set. And they don't want the poll_mtx to > be locked routinely. If my guess is true, then the patch should be > simple reverted, and in the kern/kern_poll.c, in the netisr_poll() > and netisr_pollmore() there should be put: > > if (poll_handlers == 0) > return; > > And that's all. Note that this is already done for hardclock polling. > > Accessing this value without poll_mtx held is entirely okay, since > we don't care about a race on enabling/disabling polling for NIC. > > If my guess is wrong, and Rubicon Communications (Netgate) want > to run hardclock polling, but have netisr polling disabled, then > again the patch should be reverted, and then re-applied to > kern_poll.c, > moving the netisr_polling variable there and the checks as well, > and fixing sysctl namespace. > Your guess is correct. I will revert my change and make the modification to kern_poll.c Best, George From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 14:44:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EE3F6EE; Thu, 9 Apr 2015 14:44:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31ADC20F; Thu, 9 Apr 2015 14:44:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39EiVjL045380; Thu, 9 Apr 2015 14:44:31 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39EiVFY045379; Thu, 9 Apr 2015 14:44:31 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201504091444.t39EiVFY045379@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 9 Apr 2015 14:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281312 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 14:44:31 -0000 Author: gnn Date: Thu Apr 9 14:44:30 2015 New Revision: 281312 URL: https://svnweb.freebsd.org/changeset/base/281312 Log: Revert 281276 as unnecessary. Proper change to be committed to the base polling code in a subsequent commit. Pointed out by: glebius Sponsored by: Rubicon Communications (NetGate) Modified: head/sys/net/netisr.c Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Thu Apr 9 13:45:17 2015 (r281311) +++ head/sys/net/netisr.c Thu Apr 9 14:44:30 2015 (r281312) @@ -126,13 +126,6 @@ static struct rmlock netisr_rmlock; static SYSCTL_NODE(_net, OID_AUTO, isr, CTLFLAG_RW, 0, "netisr"); -#ifdef DEVICE_POLLING -static int netisr_polling = 0; /* Enable Polling. */ -TUNABLE_INT("net.isr.polling_enable", &netisr_polling); -SYSCTL_INT(_net_isr, OID_AUTO, polling_enable, CTLFLAG_RW, - &netisr_polling, 0, "Enable polling"); -#endif - /*- * Three global direct dispatch policies are supported: * @@ -796,11 +789,9 @@ swi_net(void *arg) nwsp = arg; #ifdef DEVICE_POLLING - if (netisr_polling) { - KASSERT(nws_count == 1, - ("%s: device_polling but nws_count != 1", __func__)); - netisr_poll(); - } + KASSERT(nws_count == 1, + ("%s: device_polling but nws_count != 1", __func__)); + netisr_poll(); #endif #ifdef NETISR_LOCKING NETISR_RLOCK(&tracker); @@ -825,8 +816,7 @@ out: NETISR_RUNLOCK(&tracker); #endif #ifdef DEVICE_POLLING - if (netisr_polling) - netisr_pollmore(); + netisr_pollmore(); #endif } @@ -1081,9 +1071,6 @@ netisr_sched_poll(void) { struct netisr_workstream *nwsp; - if (!netisr_polling) - return; - nwsp = DPCPU_ID_PTR(nws_array[0], nws); NWS_SIGNAL(nwsp); } @@ -1151,7 +1138,7 @@ netisr_init(void *arg) * multiple netisr threads, so for the time being compiling in device * polling disables parallel netisr workers. */ - if (netisr_polling && (netisr_maxthreads != 1 || netisr_bindthreads != 0)) { + if (netisr_maxthreads != 1 || netisr_bindthreads != 0) { printf("netisr_init: forcing maxthreads to 1 and " "bindthreads to 0 for device polling\n"); netisr_maxthreads = 1; From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 15:08:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99E27375; Thu, 9 Apr 2015 15:08:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 852FE75E; Thu, 9 Apr 2015 15:08:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39F8e1a055579; Thu, 9 Apr 2015 15:08:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39F8eRp055578; Thu, 9 Apr 2015 15:08:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504091508.t39F8eRp055578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 9 Apr 2015 15:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281313 - head/usr.bin/ar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 15:08:40 -0000 Author: emaste Date: Thu Apr 9 15:08:39 2015 New Revision: 281313 URL: https://svnweb.freebsd.org/changeset/base/281313 Log: Avoid escaping EOL for line continuation Reported by: kib Modified: head/usr.bin/ar/read.c Modified: head/usr.bin/ar/read.c ============================================================================== --- head/usr.bin/ar/read.c Thu Apr 9 14:44:30 2015 (r281312) +++ head/usr.bin/ar/read.c Thu Apr 9 15:08:39 2015 (r281313) @@ -194,7 +194,7 @@ read_archive(struct bsdar *bsdar, char m continue; } /* Basic path security flags. */ - flags = ARCHIVE_EXTRACT_SECURE_SYMLINKS | \ + flags = ARCHIVE_EXTRACT_SECURE_SYMLINKS | ARCHIVE_EXTRACT_SECURE_NODOTDOT; if (bsdar->options & AR_O) flags |= ARCHIVE_EXTRACT_TIME; From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 18:03:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33A79AFB; Thu, 9 Apr 2015 18:03:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AFD9EC6; Thu, 9 Apr 2015 18:03:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39I3WjY042164; Thu, 9 Apr 2015 18:03:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39I3R4Y042146; Thu, 9 Apr 2015 18:03:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504091803.t39I3R4Y042146@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 9 Apr 2015 18:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281316 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/common contrib/xz/src/liblzma/lz contrib/xz/src/liblzma/lzma contrib/xz/src/xz... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 18:03:32 -0000 Author: delphij Date: Thu Apr 9 18:03:27 2015 New Revision: 281316 URL: https://svnweb.freebsd.org/changeset/base/281316 Log: MFV r281278: - Update xz to 5.2.1, where the most visible change is that it fixed a compression-ratio regression in fast mode LZMA1 and LZMA2 and used cpuset_getaffinity() for CPU cores detection. - Make liblzma use the base system SHA256 implementation instead of the bundled one. - Additional annotation in config.h for FreeBSD specific tweaks. - Refresh symbols in XZprivate_1.0 to reflect reality. Relnotes: yes MFC after: 1 month (TBD) Modified: head/contrib/xz/ChangeLog head/contrib/xz/THANKS head/contrib/xz/src/common/tuklib_cpucores.c head/contrib/xz/src/common/tuklib_integer.h head/contrib/xz/src/liblzma/api/lzma/version.h head/contrib/xz/src/liblzma/common/memcmplen.h head/contrib/xz/src/liblzma/lz/lz_encoder.c head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c head/contrib/xz/src/xz/file_io.c head/lib/liblzma/Makefile head/lib/liblzma/Symbol.map head/lib/liblzma/config.h Directory Properties: head/contrib/xz/ (props changed) Modified: head/contrib/xz/ChangeLog ============================================================================== --- head/contrib/xz/ChangeLog Thu Apr 9 17:56:25 2015 (r281315) +++ head/contrib/xz/ChangeLog Thu Apr 9 18:03:27 2015 (r281316) @@ -1,3 +1,233 @@ +commit dec11497a71518423b5ff0e759100cf8aadf6c7b +Author: Lasse Collin +Date: 2015-02-26 16:53:44 +0200 + + Bump version and soname for 5.2.1. + + src/liblzma/Makefile.am | 2 +- + src/liblzma/api/lzma/version.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 29e39c79975ab89ee5dd671e97064534a9f3a649 +Author: Lasse Collin +Date: 2015-02-26 13:01:09 +0200 + + Update NEWS for 5.2.1. + + NEWS | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd +Author: Lasse Collin +Date: 2015-02-22 19:38:48 +0200 + + xz: Use pipe2() if available. + + configure.ac | 4 ++-- + src/xz/file_io.c | 9 ++++++++- + 2 files changed, 10 insertions(+), 3 deletions(-) + +commit 117d962685c72682c63edc9bb765367189800202 +Author: Lasse Collin +Date: 2015-02-21 23:40:26 +0200 + + liblzma: Fix a compression-ratio regression in LZMA1/2 in fast mode. + + The bug was added in the commit + f48fce093b07aeda95c18850f5e086d9f2383380 and thus + affected 5.1.4beta and 5.2.0. Luckily the bug cannot + cause data corruption or other nasty things. + + src/liblzma/lzma/lzma_encoder_optimum_fast.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ae984e31c167d3bc52972ec422dd1ebd5f5d5719 +Author: Lasse Collin +Date: 2015-02-21 23:00:19 +0200 + + xz: Fix the fcntl() usage when creating a pipe for the self-pipe trick. + + Now it reads the old flags instead of blindly setting O_NONBLOCK. + The old code may have worked correctly, but this is better. + + src/xz/file_io.c | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +commit 2205bb5853098aea36a56df6f5747037175f66b4 +Author: Lasse Collin +Date: 2015-02-10 15:29:34 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit d935b0cdf3db440269b9d952b2b281b18f8c7b08 +Author: Lasse Collin +Date: 2015-02-10 15:28:30 +0200 + + tuklib_cpucores: Use cpuset_getaffinity() on FreeBSD if available. + + In FreeBSD, cpuset_getaffinity() is the preferred way to get + the number of available cores. + + Thanks to Rui Paulo for the patch. I edited it slightly, but + hopefully I didn't break anything. + + m4/tuklib_cpucores.m4 | 23 ++++++++++++++++++++++- + src/common/tuklib_cpucores.c | 18 ++++++++++++++++++ + 2 files changed, 40 insertions(+), 1 deletion(-) + +commit eb61bc58c20769cac4d05f363b9c0e8c9c71a560 +Author: Lasse Collin +Date: 2015-02-09 22:08:37 +0200 + + xzdiff: Make the mktemp usage compatible with FreeBSD's mktemp. + + Thanks to Rui Paulo for the fix. + + src/scripts/xzdiff.in | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit b9a5b6b7a29029680af733082b6a46e0fc01623a +Author: Lasse Collin +Date: 2015-02-03 21:45:53 +0200 + + Add a few casts to tuklib_integer.h to silence possible warnings. + + I heard that Visual Studio 2013 gave warnings without the casts. + + Thanks to Gabi Davar. + + src/common/tuklib_integer.h | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +commit c45757135f40e4a0de730ba5fff0100219493982 +Author: Lasse Collin +Date: 2015-01-26 21:24:39 +0200 + + liblzma: Set LZMA_MEMCMPLEN_EXTRA depending on the compare method. + + src/liblzma/common/memcmplen.h | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +commit 3c500174ed5485f550972a2a6109c361e875f069 +Author: Lasse Collin +Date: 2015-01-26 20:40:16 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit fec88d41e672d9e197c9442aecf02bd0dfa6d516 +Author: Lasse Collin +Date: 2015-01-26 20:39:28 +0200 + + liblzma: Silence harmless Valgrind errors. + + Thanks to Torsten Rupp for reporting this. I had + forgotten to run Valgrind before the 5.2.0 release. + + src/liblzma/lz/lz_encoder.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit a9b45badfec0928d20a27c7176c005fa637f7d1e +Author: Lasse Collin +Date: 2015-01-09 21:50:19 +0200 + + xz: Fix comments. + + src/xz/file_io.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +commit 541aee6dd4aa97a809aba281475a21b641bb89e2 +Author: Lasse Collin +Date: 2015-01-09 21:35:06 +0200 + + Update THANKS. + + THANKS | 1 + + 1 file changed, 1 insertion(+) + +commit 4170edc914655310d2363baccf5e615e09b04911 +Author: Lasse Collin +Date: 2015-01-09 21:34:06 +0200 + + xz: Don't fail if stdout doesn't support O_NONBLOCK. + + This is similar to the case with stdin. + + Thanks to Brad Smith for the bug report and testing + on OpenBSD. + + src/xz/file_io.c | 36 +++++++++++++++--------------------- + 1 file changed, 15 insertions(+), 21 deletions(-) + +commit 04bbc0c2843c50c8ad1cba42b937118e38b0508d +Author: Lasse Collin +Date: 2015-01-07 19:18:20 +0200 + + xz: Fix a memory leak in DOS-specific code. + + src/xz/file_io.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit f0f1f6c7235ffa901cf76fe18e33749e200b3eea +Author: Lasse Collin +Date: 2015-01-07 19:08:06 +0200 + + xz: Don't fail if stdin doesn't support O_NONBLOCK. + + It's a problem at least on OpenBSD which doesn't support + O_NONBLOCK on e.g. /dev/null. I'm not surprised if it's + a problem on other OSes too since this behavior is allowed + in POSIX-1.2008. + + The code relying on this behavior was committed in June 2013 + and included in 5.1.3alpha released on 2013-10-26. Clearly + the development releases only get limited testing. + + src/xz/file_io.c | 18 +++++++----------- + 1 file changed, 7 insertions(+), 11 deletions(-) + +commit d2d484647d9d9d679f03c75abb0404f67069271c +Author: Lasse Collin +Date: 2015-01-06 20:30:15 +0200 + + Tests: Don't hide unexpected error messages in test_files.sh. + + Hiding them makes no sense since normally there's no error + when testing the "good" files. With "bad" files errors are + expected and then it makes sense to keep the messages hidden. + + tests/test_files.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit aae6a6aeda51cf94a47e39ad624728f9bee75e30 +Author: Lasse Collin +Date: 2014-12-30 11:17:16 +0200 + + Update Solaris notes in INSTALL. + + Mention the possible "make check" failure on Solaris in the + Solaris-specific section of INSTALL. It was already in + section 4.5 but it is better mention it in the OS-specific + section too. + + INSTALL | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 7815112153178800a3521b9f31960e7cdc26cfba +Author: Lasse Collin +Date: 2014-12-26 12:00:05 +0200 + + Build: POSIX shell isn't required if scripts are disabled. + + INSTALL | 3 ++- + configure.ac | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + commit a0cd05ee71d330b79ead6eb9222e1b24e1559d3a Author: Lasse Collin Date: 2014-12-21 20:48:37 +0200 Modified: head/contrib/xz/THANKS ============================================================================== --- head/contrib/xz/THANKS Thu Apr 9 17:56:25 2015 (r281315) +++ head/contrib/xz/THANKS Thu Apr 9 18:03:27 2015 (r281316) @@ -67,6 +67,7 @@ has been important. :-) In alphabetical - Andre Noll - Peter O'Gorman - Peter Pallinger + - Rui Paulo - Igor Pavlov - Diego Elio Pettenò - Elbert Pol @@ -78,12 +79,14 @@ has been important. :-) In alphabetical - Eric S. Raymond - Cristian Rodríguez - Christian von Roques + - Torsten Rupp - Jukka Salmi - Alexandre Sauvé - Benno Schulenberg - Andreas Schwab - Dan Shechter - Stuart Shelton + - Brad Smith - Jonathan Stott - Dan Stromberg - Vincent Torri Modified: head/contrib/xz/src/common/tuklib_cpucores.c ============================================================================== --- head/contrib/xz/src/common/tuklib_cpucores.c Thu Apr 9 17:56:25 2015 (r281315) +++ head/contrib/xz/src/common/tuklib_cpucores.c Thu Apr 9 18:03:27 2015 (r281316) @@ -18,6 +18,11 @@ # endif # include +// FreeBSD +#elif defined(TUKLIB_CPUCORES_CPUSET) +# include +# include + #elif defined(TUKLIB_CPUCORES_SYSCTL) # ifdef HAVE_SYS_PARAM_H # include @@ -44,6 +49,19 @@ tuklib_cpucores(void) GetSystemInfo(&sysinfo); ret = sysinfo.dwNumberOfProcessors; +#elif defined(TUKLIB_CPUCORES_CPUSET) + cpuset_t set; + if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, + sizeof(set), &set) == 0) { +# ifdef CPU_COUNT + ret = CPU_COUNT(&set); +# else + for (unsigned i = 0; i < CPU_SETSIZE; ++i) + if (CPU_ISSET(i, &set)) + ++ret; +# endif + } + #elif defined(TUKLIB_CPUCORES_SYSCTL) int name[2] = { CTL_HW, HW_NCPU }; int cpus; Modified: head/contrib/xz/src/common/tuklib_integer.h ============================================================================== --- head/contrib/xz/src/common/tuklib_integer.h Thu Apr 9 17:56:25 2015 (r281315) +++ head/contrib/xz/src/common/tuklib_integer.h Thu Apr 9 18:03:27 2015 (r281316) @@ -321,8 +321,8 @@ unaligned_read32le(const uint8_t *buf) static inline void unaligned_write16be(uint8_t *buf, uint16_t num) { - buf[0] = num >> 8; - buf[1] = num; + buf[0] = (uint8_t)(num >> 8); + buf[1] = (uint8_t)num; return; } @@ -330,8 +330,8 @@ unaligned_write16be(uint8_t *buf, uint16 static inline void unaligned_write16le(uint8_t *buf, uint16_t num) { - buf[0] = num; - buf[1] = num >> 8; + buf[0] = (uint8_t)num; + buf[1] = (uint8_t)(num >> 8); return; } @@ -339,10 +339,10 @@ unaligned_write16le(uint8_t *buf, uint16 static inline void unaligned_write32be(uint8_t *buf, uint32_t num) { - buf[0] = num >> 24; - buf[1] = num >> 16; - buf[2] = num >> 8; - buf[3] = num; + buf[0] = (uint8_t)(num >> 24); + buf[1] = (uint8_t)(num >> 16); + buf[2] = (uint8_t)(num >> 8); + buf[3] = (uint8_t)num; return; } @@ -350,10 +350,10 @@ unaligned_write32be(uint8_t *buf, uint32 static inline void unaligned_write32le(uint8_t *buf, uint32_t num) { - buf[0] = num; - buf[1] = num >> 8; - buf[2] = num >> 16; - buf[3] = num >> 24; + buf[0] = (uint8_t)num; + buf[1] = (uint8_t)(num >> 8); + buf[2] = (uint8_t)(num >> 16); + buf[3] = (uint8_t)(num >> 24); return; } Modified: head/contrib/xz/src/liblzma/api/lzma/version.h ============================================================================== --- head/contrib/xz/src/liblzma/api/lzma/version.h Thu Apr 9 17:56:25 2015 (r281315) +++ head/contrib/xz/src/liblzma/api/lzma/version.h Thu Apr 9 18:03:27 2015 (r281316) @@ -22,7 +22,7 @@ */ #define LZMA_VERSION_MAJOR 5 #define LZMA_VERSION_MINOR 2 -#define LZMA_VERSION_PATCH 0 +#define LZMA_VERSION_PATCH 1 #define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE #ifndef LZMA_VERSION_COMMIT Modified: head/contrib/xz/src/liblzma/common/memcmplen.h ============================================================================== --- head/contrib/xz/src/liblzma/common/memcmplen.h Thu Apr 9 17:56:25 2015 (r281315) +++ head/contrib/xz/src/liblzma/common/memcmplen.h Thu Apr 9 18:03:27 2015 (r281316) @@ -19,11 +19,6 @@ # include #endif -/// How many extra bytes lzma_memcmplen() may read. This depends on -/// the method but since it is just a few bytes the biggest possible -/// value is used here. -#define LZMA_MEMCMPLEN_EXTRA 16 - /// Find out how many equal bytes the two buffers have. /// @@ -39,6 +34,11 @@ /// /// \return Number of equal bytes in the buffers is returned. /// This is always at least len and at most limit. +/// +/// \note LZMA_MEMCMPLEN_EXTRA defines how many extra bytes may be read. +/// It's rounded up to 2^n. This extra amount needs to be +/// allocated in the buffers being used. It needs to be +/// initialized too to keep Valgrind quiet. static inline uint32_t lzma_attribute((__always_inline__)) lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2, uint32_t len, uint32_t limit) @@ -59,6 +59,7 @@ lzma_memcmplen(const uint8_t *buf1, cons // to be a good method. This may be fine on other 64-bit CPUs too. // On big endian one should use xor instead of subtraction and switch // to __builtin_clzll(). +#define LZMA_MEMCMPLEN_EXTRA 8 while (len < limit) { const uint64_t x = *(const uint64_t *)(buf1 + len) - *(const uint64_t *)(buf2 + len); @@ -91,6 +92,7 @@ lzma_memcmplen(const uint8_t *buf1, cons // version is sometimes significantly faster and sometimes // slightly slower than this SSE2 version, so this SSE2 // version isn't used on x86-64. +# define LZMA_MEMCMPLEN_EXTRA 16 while (len < limit) { const uint32_t x = 0xFFFF ^ _mm_movemask_epi8(_mm_cmpeq_epi8( _mm_loadu_si128((const __m128i *)(buf1 + len)), @@ -116,6 +118,7 @@ lzma_memcmplen(const uint8_t *buf1, cons #elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) && !defined(WORDS_BIGENDIAN) // Generic 32-bit little endian method +# define LZMA_MEMCMPLEN_EXTRA 4 while (len < limit) { uint32_t x = *(const uint32_t *)(buf1 + len) - *(const uint32_t *)(buf2 + len); @@ -138,6 +141,7 @@ lzma_memcmplen(const uint8_t *buf1, cons #elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) && defined(WORDS_BIGENDIAN) // Generic 32-bit big endian method +# define LZMA_MEMCMPLEN_EXTRA 4 while (len < limit) { uint32_t x = *(const uint32_t *)(buf1 + len) ^ *(const uint32_t *)(buf2 + len); @@ -160,6 +164,7 @@ lzma_memcmplen(const uint8_t *buf1, cons #else // Simple portable version that doesn't use unaligned access. +# define LZMA_MEMCMPLEN_EXTRA 0 while (len < limit && buf1[len] == buf2[len]) ++len; Modified: head/contrib/xz/src/liblzma/lz/lz_encoder.c ============================================================================== --- head/contrib/xz/src/liblzma/lz/lz_encoder.c Thu Apr 9 17:56:25 2015 (r281315) +++ head/contrib/xz/src/liblzma/lz/lz_encoder.c Thu Apr 9 18:03:27 2015 (r281316) @@ -110,6 +110,12 @@ fill_window(lzma_coder *coder, const lzm coder->mf.write_pos = write_pos; + // Silence Valgrind. lzma_memcmplen() can read extra bytes + // and Valgrind will give warnings if those bytes are uninitialized + // because Valgrind cannot see that the values of the uninitialized + // bytes are eventually ignored. + memzero(coder->mf.buffer + write_pos, LZMA_MEMCMPLEN_EXTRA); + // If end of stream has been reached or flushing completed, we allow // the encoder to process all the input (that is, read_pos is allowed // to reach write_pos). Otherwise we keep keep_size_after bytes Modified: head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c ============================================================================== --- head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c Thu Apr 9 17:56:25 2015 (r281315) +++ head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c Thu Apr 9 18:03:27 2015 (r281316) @@ -152,7 +152,7 @@ lzma_lzma_optimum_fast(lzma_coder *restr // the old buf pointer instead of recalculating it with mf_ptr(). ++buf; - const uint32_t limit = len_main - 1; + const uint32_t limit = my_max(2, len_main - 1); for (uint32_t i = 0; i < REPS; ++i) { if (memcmp(buf, buf - coder->reps[i] - 1, limit) == 0) { Modified: head/contrib/xz/src/xz/file_io.c ============================================================================== --- head/contrib/xz/src/xz/file_io.c Thu Apr 9 17:56:25 2015 (r281315) +++ head/contrib/xz/src/xz/file_io.c Thu Apr 9 18:03:27 2015 (r281316) @@ -82,13 +82,26 @@ io_init(void) // we are root. warn_fchown = geteuid() == 0; - if (pipe(user_abort_pipe) - || fcntl(user_abort_pipe[0], F_SETFL, O_NONBLOCK) - == -1 - || fcntl(user_abort_pipe[1], F_SETFL, O_NONBLOCK) - == -1) + // Create a pipe for the self-pipe trick. If pipe2() is available, + // we can avoid the fcntl() calls. +# ifdef HAVE_PIPE2 + if (pipe2(user_abort_pipe, O_NONBLOCK)) message_fatal(_("Error creating a pipe: %s"), strerror(errno)); +# else + if (pipe(user_abort_pipe)) + message_fatal(_("Error creating a pipe: %s"), + strerror(errno)); + + // Make both ends of the pipe non-blocking. + for (unsigned i = 0; i < 2; ++i) { + int flags = fcntl(user_abort_pipe[i], F_GETFL); + if (flags == -1 || fcntl(user_abort_pipe[i], F_SETFL, + flags | O_NONBLOCK) == -1) + message_fatal(_("Error creating a pipe: %s"), + strerror(errno)); + } +# endif #endif #ifdef __DJGPP__ @@ -393,7 +406,11 @@ io_open_src_real(file_pair *pair) #ifdef TUKLIB_DOSLIKE setmode(STDIN_FILENO, O_BINARY); #else - // Enable O_NONBLOCK for stdin. + // Try to set stdin to non-blocking mode. It won't work + // e.g. on OpenBSD if stdout is e.g. /dev/null. In such + // case we proceed as if stdin were non-blocking anyway + // (in case of /dev/null it will be in practice). The + // same applies to stdout in io_open_dest_real(). stdin_flags = fcntl(STDIN_FILENO, F_GETFL); if (stdin_flags == -1) { message_error(_("Error getting the file status flags " @@ -402,17 +419,10 @@ io_open_src_real(file_pair *pair) return true; } - if ((stdin_flags & O_NONBLOCK) == 0) { - if (fcntl(STDIN_FILENO, F_SETFL, - stdin_flags | O_NONBLOCK) == -1) { - message_error(_("Error setting O_NONBLOCK " - "on standard input: %s"), - strerror(errno)); - return true; - } - + if ((stdin_flags & O_NONBLOCK) == 0 + && fcntl(STDIN_FILENO, F_SETFL, + stdin_flags | O_NONBLOCK) != -1) restore_stdin_flags = true; - } #endif #ifdef HAVE_POSIX_FADVISE // It will fail if stdin is a pipe and that's fine. @@ -705,7 +715,10 @@ io_open_dest_real(file_pair *pair) #ifdef TUKLIB_DOSLIKE setmode(STDOUT_FILENO, O_BINARY); #else - // Set O_NONBLOCK if it isn't already set. + // Try to set O_NONBLOCK if it isn't already set. + // If it fails, we assume that stdout is non-blocking + // in practice. See the comments in io_open_src_real() + // for similar situation with stdin. // // NOTE: O_APPEND may be unset later in this function // and it relies on stdout_flags being set here. @@ -717,17 +730,10 @@ io_open_dest_real(file_pair *pair) return true; } - if ((stdout_flags & O_NONBLOCK) == 0) { - if (fcntl(STDOUT_FILENO, F_SETFL, - stdout_flags | O_NONBLOCK) == -1) { - message_error(_("Error setting O_NONBLOCK " - "on standard output: %s"), - strerror(errno)); - return true; - } - - restore_stdout_flags = true; - } + if ((stdout_flags & O_NONBLOCK) == 0 + && fcntl(STDOUT_FILENO, F_SETFL, + stdout_flags | O_NONBLOCK) != -1) + restore_stdout_flags = true; #endif } else { pair->dest_name = suffix_get_dest_name(pair->src_name); @@ -742,6 +748,7 @@ io_open_dest_real(file_pair *pair) message_error("%s: Refusing to write to " "a DOS special file", pair->dest_name); + free(pair->dest_name); return true; } @@ -751,6 +758,7 @@ io_open_dest_real(file_pair *pair) message_error("%s: Output file is the same " "as the input file", pair->dest_name); + free(pair->dest_name); return true; } } @@ -829,23 +837,24 @@ io_open_dest_real(file_pair *pair) if (lseek(STDOUT_FILENO, 0, SEEK_END) == -1) return false; - // O_NONBLOCK was set earlier in this function - // so it must be kept here too. If this - // fcntl() call fails, we continue but won't + // Construct the new file status flags. + // If O_NONBLOCK was set earlier in this + // function, it must be kept here too. + int flags = stdout_flags & ~O_APPEND; + if (restore_stdout_flags) + flags |= O_NONBLOCK; + + // If this fcntl() fails, we continue but won't // try to create sparse output. The original // flags will still be restored if needed (to // unset O_NONBLOCK) when the file is finished. - if (fcntl(STDOUT_FILENO, F_SETFL, - (stdout_flags | O_NONBLOCK) - & ~O_APPEND) == -1) + if (fcntl(STDOUT_FILENO, F_SETFL, flags) == -1) return false; // Disabling O_APPEND succeeded. Mark // that the flags should be restored - // in io_close_dest(). This quite likely was - // already set when enabling O_NONBLOCK but - // just in case O_NONBLOCK was already set, - // set this again here. + // in io_close_dest(). (This may have already + // been set when enabling O_NONBLOCK.) restore_stdout_flags = true; } else if (lseek(STDOUT_FILENO, 0, SEEK_CUR) Modified: head/lib/liblzma/Makefile ============================================================================== --- head/lib/liblzma/Makefile Thu Apr 9 17:56:25 2015 (r281315) +++ head/lib/liblzma/Makefile Thu Apr 9 18:03:27 2015 (r281316) @@ -77,8 +77,7 @@ SRCS+= common.c \ .PATH: ${LZMADIR}/check SRCS+= check.c \ crc32_table.c \ - crc64_table.c \ - sha256.c + crc64_table.c .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386" SRCS+= crc32_x86.S \ crc64_x86.S @@ -146,7 +145,7 @@ CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMADIR}/simple \ -I${LZMADIR}/../common -LIBADD+= pthread +LIBADD+= md pthread VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map Modified: head/lib/liblzma/Symbol.map ============================================================================== --- head/lib/liblzma/Symbol.map Thu Apr 9 17:56:25 2015 (r281315) +++ head/lib/liblzma/Symbol.map Thu Apr 9 18:03:27 2015 (r281316) @@ -108,7 +108,9 @@ XZ_5.2 { XZprivate_1.0 { lzma_alloc; + lzma_alloc_zero; lzma_alone_decoder_init; + lzma_block_buffer_bound64; lzma_block_decoder_init; lzma_block_encoder_init; lzma_bufcpy; @@ -131,6 +133,7 @@ XZprivate_1.0 { lzma_lz_decoder_uncompressed; lzma_lz_encoder_init; lzma_lz_encoder_memusage; + lzma_lzma2_block_size; lzma_lzma2_decoder_init; lzma_lzma2_decoder_memusage; lzma_lzma2_encoder_init; @@ -163,16 +166,20 @@ XZprivate_1.0 { lzma_mf_hc3_skip; lzma_mf_hc4_find; lzma_mf_hc4_skip; + lzma_mt_block_size; lzma_next_end; lzma_next_filter_init; lzma_next_filter_update; + lzma_outq_end; + lzma_outq_get_buf; + lzma_outq_init; + lzma_outq_is_readable; + lzma_outq_memusage; + lzma_outq_read; lzma_raw_coder_init; lzma_raw_coder_memusage; lzma_raw_decoder_init; lzma_raw_encoder_init; - lzma_sha256_finish; - lzma_sha256_init; - lzma_sha256_update; lzma_simple_arm_decoder_init; lzma_simple_arm_encoder_init; lzma_simple_armthumb_decoder_init; @@ -190,7 +197,7 @@ XZprivate_1.0 { lzma_simple_x86_decoder_init; lzma_simple_x86_encoder_init; lzma_stream_decoder_init; - lzma_stream_encoder_init; lzma_strm_init; + lzma_tuklib_cpucores; lzma_tuklib_physmem; }; Modified: head/lib/liblzma/config.h ============================================================================== --- head/lib/liblzma/config.h Thu Apr 9 17:56:25 2015 (r281315) +++ head/lib/liblzma/config.h Thu Apr 9 18:03:27 2015 (r281316) @@ -1,95 +1,424 @@ /* $FreeBSD$ */ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* How many MiB of RAM to assume if the real amount cannot be determined. */ #define ASSUME_RAM 128 + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* FreeBSD - disabled intentionally */ +/* #undef ENABLE_NLS */ + +/* Define to 1 if bswap_16 is available. */ +/* #undef HAVE_BSWAP_16 */ + +/* Define to 1 if bswap_32 is available. */ +/* #undef HAVE_BSWAP_32 */ + +/* Define to 1 if bswap_64 is available. */ +/* #undef HAVE_BSWAP_64 */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if the system has the type `CC_SHA256_CTX'. */ +/* #undef HAVE_CC_SHA256_CTX */ + +/* Define to 1 if you have the `CC_SHA256_Init' function. */ +/* #undef HAVE_CC_SHA256_INIT */ + +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* Define to 1 if crc32 integrity check is enabled. */ #define HAVE_CHECK_CRC32 1 + +/* Define to 1 if crc64 integrity check is enabled. */ #define HAVE_CHECK_CRC64 1 + +/* Define to 1 if sha256 integrity check is enabled. */ #define HAVE_CHECK_SHA256 1 + +/* Define to 1 if you have the `clock_gettime' function. */ #define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_COMMONCRYPTO_COMMONDIGEST_H */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* FreeBSD - disabled intentionally */ +/* #undef HAVE_DCGETTEXT */ + +/* Define to 1 if you have the declaration of `CLOCK_MONOTONIC', and to 0 if + you don't. */ #define HAVE_DECL_CLOCK_MONOTONIC 1 + +/* Define to 1 if you have the declaration of `program_invocation_name', and + to 0 if you don't. */ #define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 + +/* Define to 1 if arm decoder is enabled. */ #define HAVE_DECODER_ARM 1 + +/* Define to 1 if armthumb decoder is enabled. */ #define HAVE_DECODER_ARMTHUMB 1 + +/* Define to 1 if delta decoder is enabled. */ #define HAVE_DECODER_DELTA 1 + +/* Define to 1 if ia64 decoder is enabled. */ #define HAVE_DECODER_IA64 1 + +/* Define to 1 if lzma1 decoder is enabled. */ #define HAVE_DECODER_LZMA1 1 + +/* Define to 1 if lzma2 decoder is enabled. */ #define HAVE_DECODER_LZMA2 1 + +/* Define to 1 if powerpc decoder is enabled. */ #define HAVE_DECODER_POWERPC 1 + +/* Define to 1 if sparc decoder is enabled. */ #define HAVE_DECODER_SPARC 1 + +/* Define to 1 if x86 decoder is enabled. */ #define HAVE_DECODER_X86 1 + +/* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 + +/* Define to 1 if arm encoder is enabled. */ #define HAVE_ENCODER_ARM 1 + +/* Define to 1 if armthumb encoder is enabled. */ #define HAVE_ENCODER_ARMTHUMB 1 + +/* Define to 1 if delta encoder is enabled. */ #define HAVE_ENCODER_DELTA 1 + +/* Define to 1 if ia64 encoder is enabled. */ #define HAVE_ENCODER_IA64 1 + +/* Define to 1 if lzma1 encoder is enabled. */ #define HAVE_ENCODER_LZMA1 1 + +/* Define to 1 if lzma2 encoder is enabled. */ #define HAVE_ENCODER_LZMA2 1 + +/* Define to 1 if powerpc encoder is enabled. */ #define HAVE_ENCODER_POWERPC 1 + +/* Define to 1 if sparc encoder is enabled. */ #define HAVE_ENCODER_SPARC 1 + +/* Define to 1 if x86 encoder is enabled. */ #define HAVE_ENCODER_X86 1 + +/* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `futimens' function. */ #define HAVE_FUTIMENS 1 -#define HAVE_FUTIMES 1 + +/* Define to 1 if you have the `futimes' function. */ +/* #undef HAVE_FUTIMES */ + +/* Define to 1 if you have the `futimesat' function. */ +/* #undef HAVE_FUTIMESAT */ + +/* Define to 1 if you have the header file. */ #define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getopt_long' function. */ #define HAVE_GETOPT_LONG 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* FreeBSD - disabled intentionally */ +/* #undef HAVE_GETTEXT */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#if defined(__FreeBSD__) && defined(__amd64__) +#define HAVE_IMMINTRIN_H 1 +#endif + +/* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 + +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ #define HAVE_MBRTOWC 1 + +/* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 + +/* Define to 1 to enable bt2 match finder. */ #define HAVE_MF_BT2 1 + +/* Define to 1 to enable bt3 match finder. */ #define HAVE_MF_BT3 1 + +/* Define to 1 to enable bt4 match finder. */ #define HAVE_MF_BT4 1 + +/* Define to 1 to enable hc3 match finder. */ #define HAVE_MF_HC3 1 + +/* Define to 1 to enable hc4 match finder. */ #define HAVE_MF_HC4 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MINIX_SHA2_H */ + +/* Define to 1 if getopt.h declares extern int optreset. */ #define HAVE_OPTRESET 1 + +/* Define to 1 if you have the `pipe2' function. */ +#define HAVE_PIPE2 1 + +/* Define to 1 if you have the `posix_fadvise' function. */ #define HAVE_POSIX_FADVISE 1 + +/* Define to 1 if you have the `pthread_condattr_setclock' function. */ #define HAVE_PTHREAD_CONDATTR_SETCLOCK 1 + +/* Have PTHREAD_PRIO_INHERIT. */ #define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if you have the `SHA256Init' function. */ +/* #undef HAVE_SHA256INIT */ + +/* Define to 1 if the system has the type `SHA256_CTX'. */ +#define HAVE_SHA256_CTX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SHA256_H 1 + +/* Define to 1 if you have the `SHA256_Init' function. */ +#define HAVE_SHA256_INIT 1 + +/* Define to 1 if the system has the type `SHA2_CTX'. */ +/* #undef HAVE_SHA2_CTX */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SHA2_H */ + +/* Define to 1 if optimizing for size. */ +/* #undef HAVE_SMALL */ + +/* Define to 1 if stdbool.h conforms to C99. */ #define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 + +/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ + +/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 + +/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ + +/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 + +/* Define to 1 if `st_uatime' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_UATIME */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BYTEORDER_H */ + +/* Define to 1 if you have the header file. */ #define HAVE_SYS_ENDIAN_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if the system has the type `uintptr_t'. */ #define HAVE_UINTPTR_T 1 + +/* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `utime' function. */ +/* #undef HAVE_UTIME */ + +/* Define to 1 if you have the `utimes' function. */ +/* #undef HAVE_UTIMES */ + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ #define HAVE_VISIBILITY 1 + +/* Define to 1 if you have the `wcwidth' function. */ #define HAVE_WCWIDTH 1 + +/* Define to 1 if the system has the type `_Bool'. */ #define HAVE__BOOL 1 + +/* Define to 1 if _mm_movemask_epi8 is available. */ #if defined(__FreeBSD__) && defined(__amd64__) #define HAVE__MM_MOVEMASK_EPI8 1 #endif + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define to 1 when using POSIX threads (pthreads). */ #define MYTHREAD_POSIX 1 + +/* Define to 1 when using Windows Vista compatible threads. This uses features + that are not available on Windows XP. */ +/* #undef MYTHREAD_VISTA */ + +/* Define to 1 when using Windows 95 (and thus XP) compatible threads. This + avoids use of features that were added in Windows Vista. */ +/* #undef MYTHREAD_WIN95 */ + +/* Define to 1 to disable debugging code. */ #define NDEBUG 1 + +/* Name of package */ #define PACKAGE "xz" + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 19:07:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2594125; Thu, 9 Apr 2015 19:07:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D7B8881; Thu, 9 Apr 2015 19:07:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39J72Db071312; Thu, 9 Apr 2015 19:07:02 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39J72SO071311; Thu, 9 Apr 2015 19:07:02 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504091907.t39J72SO071311@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 9 Apr 2015 19:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281320 - head/sbin/newfs_msdos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:07:02 -0000 Author: pfg Date: Thu Apr 9 19:07:01 2015 New Revision: 281320 URL: https://svnweb.freebsd.org/changeset/base/281320 Log: Update documented OEM string in newfs_msdos(8). This was updated in r203868 to better match the naming scheme in other OSs that use FAT. MFC after: 3 days Modified: head/sbin/newfs_msdos/newfs_msdos.8 Modified: head/sbin/newfs_msdos/newfs_msdos.8 ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.8 Thu Apr 9 19:03:11 2015 (r281319) +++ head/sbin/newfs_msdos/newfs_msdos.8 Thu Apr 9 19:07:01 2015 (r281320) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd April 9, 2015 .Dt NEWFS_MSDOS 8 .Os .Sh NAME @@ -112,7 +112,7 @@ only those characters permitted in regul .It Fl O Ar OEM OEM string (up to 8 characters). The default is -.Qq Li "BSD 4.4" . +.Qq Li "BSD4.4 " . .It Fl S Ar sector-size Number of bytes per sector. Acceptable values are powers of 2 From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 19:45:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21E2F452; Thu, 9 Apr 2015 19:45:32 +0000 (UTC) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9386DC6; Thu, 9 Apr 2015 19:45:31 +0000 (UTC) Received: by iebmp1 with SMTP id mp1so956238ieb.0; Thu, 09 Apr 2015 12:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=3+wtDipyzChTHBy4B/zIUcecxI1N8pqvj86U0/4IsuI=; b=omzz3B2t0d0iz+7WM2lU7V7gqMwa9KcQbroPFyGYKFmeOXCGyJ53jtTIEGRzEtOavZ uNOFf7Yk7WZBdYcOMogDM6KklTNg3U2gMjD1Qq88Txe4YEkFQR99+8WMUAMpb8JtO/nd UJDVjdBSailW8d2zFK3C4YRkMsVXm7VnWuEZ7irw166xgv/EkouCvzz2Mv2b9N6ABaLx mN0W4TOgACrmRMfAzS25rXRwSrFb60qe7bA4RqDq7Kl1TQFCg/vvajYEnWboi4WFMInl SyLnF2+O67lc1fRByOmcGdm+0sob36QbEhXWS3xE0rQfc3hmsQaP8l5D9iwKzcyU8a+F Pglg== MIME-Version: 1.0 X-Received: by 10.107.39.72 with SMTP id n69mr48860041ion.8.1428608731403; Thu, 09 Apr 2015 12:45:31 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Thu, 9 Apr 2015 12:45:31 -0700 (PDT) In-Reply-To: References: <201504072309.t37N9Zwf011383@svn.freebsd.org> <20150408084839.GO64665@FreeBSD.org> Date: Thu, 9 Apr 2015 12:45:31 -0700 X-Google-Sender-Auth: blQ_cQuJj-FW7OvjEs2vGWFml1o Message-ID: Subject: Re: svn commit: r281239 - head/sys/netinet From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:45:32 -0000 Hi, Are you going to take a crack at fixing V_nipq? This is something that's popped up in a few places in my recent work/not-work hacking, and I think it's about time we had something like counter, but for resource management and not per-cpu. I'd rather not leave things be racy and broken, so if you'd like to add in an atomic counter for V_nipq for now, let's do that and make it less cache line ping-pongy later. Thanks, -adrian From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 19:48:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A351623; Thu, 9 Apr 2015 19:48:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AD94E01; Thu, 9 Apr 2015 19:48:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39Jmiuc090952; Thu, 9 Apr 2015 19:48:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Jmgpg090947; Thu, 9 Apr 2015 19:48:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504091948.t39Jmgpg090947@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 9 Apr 2015 19:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281322 - head/sys/boot/efi/loader/arch/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:48:44 -0000 Author: emaste Date: Thu Apr 9 19:48:42 2015 New Revision: 281322 URL: https://svnweb.freebsd.org/changeset/base/281322 Log: Remove EOL whitespace from i386 EFI loader source Modified: head/sys/boot/efi/loader/arch/i386/bootinfo.c head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c head/sys/boot/efi/loader/arch/i386/i386_copy.c head/sys/boot/efi/loader/arch/i386/start.S Modified: head/sys/boot/efi/loader/arch/i386/bootinfo.c ============================================================================== --- head/sys/boot/efi/loader/arch/i386/bootinfo.c Thu Apr 9 19:36:06 2015 (r281321) +++ head/sys/boot/efi/loader/arch/i386/bootinfo.c Thu Apr 9 19:48:42 2015 (r281322) @@ -219,7 +219,7 @@ bi_load(struct preloaded_file *fp, uint6 bi.bi_version = 1; // bi.bi_boothowto = bi_getboothowto(fp->f_args); - /* + /* * Allow the environment variable 'rootdev' to override the supplied * device. This should perhaps go to MI code and/or have $rootdev * tested/set by MI code before launching the kernel. Modified: head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c ============================================================================== --- head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c Thu Apr 9 19:36:06 2015 (r281321) +++ head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c Thu Apr 9 19:48:42 2015 (r281322) @@ -49,8 +49,8 @@ struct file_format i386_elf = { elf32_lo struct file_format i386_elf_obj = { elf32_obj_loadfile, elf32_obj_exec }; /* - * There is an ELF kernel and one or more ELF modules loaded. - * We wish to start executing the kernel image, so make such + * There is an ELF kernel and one or more ELF modules loaded. + * We wish to start executing the kernel image, so make such * preparations as are required, and do so. */ static int Modified: head/sys/boot/efi/loader/arch/i386/i386_copy.c ============================================================================== --- head/sys/boot/efi/loader/arch/i386/i386_copy.c Thu Apr 9 19:36:06 2015 (r281321) +++ head/sys/boot/efi/loader/arch/i386/i386_copy.c Thu Apr 9 19:48:42 2015 (r281322) @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); /* - * MD primitives supporting placement of module data + * MD primitives supporting placement of module data * * XXX should check load address/size against memory top. */ Modified: head/sys/boot/efi/loader/arch/i386/start.S ============================================================================== --- head/sys/boot/efi/loader/arch/i386/start.S Thu Apr 9 19:36:06 2015 (r281321) +++ head/sys/boot/efi/loader/arch/i386/start.S Thu Apr 9 19:48:42 2015 (r281322) @@ -33,7 +33,7 @@ #define EFI_SUCCESS 0 /* - * EFI entry point. + * EFI entry point. * _start(EFI_IMAGE image_handle, EFI_SYSTEM_TABLE *system_table); * * We calculate the base address along with _DYNAMIC, relocate us and finally From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 20:35:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52DED951; Thu, 9 Apr 2015 20:35:34 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C967F766; Thu, 9 Apr 2015 20:35:32 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t39KZQaO096208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 9 Apr 2015 23:35:26 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t39KZQm7096207; Thu, 9 Apr 2015 23:35:26 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 9 Apr 2015 23:35:26 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r281239 - head/sys/netinet Message-ID: <20150409203526.GE64665@FreeBSD.org> References: <201504072309.t37N9Zwf011383@svn.freebsd.org> <20150408084839.GO64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 20:35:34 -0000 On Thu, Apr 09, 2015 at 12:45:31PM -0700, Adrian Chadd wrote: A> Hi, A> A> Are you going to take a crack at fixing V_nipq? Yes, working on it. Patch written, now being debugged. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 20:58:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EAD929B; Thu, 9 Apr 2015 20:58:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FF0A9FF; Thu, 9 Apr 2015 20:58:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39KwcnA025105; Thu, 9 Apr 2015 20:58:38 GMT (envelope-from jgh@FreeBSD.org) Received: (from jgh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39KwcxE025104; Thu, 9 Apr 2015 20:58:38 GMT (envelope-from jgh@FreeBSD.org) Message-Id: <201504092058.t39KwcxE025104@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jgh set sender to jgh@FreeBSD.org using -f From: Jason Helfman Date: Thu, 9 Apr 2015 20:58:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281324 - head/sbin/ggate/ggatel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 20:58:39 -0000 Author: jgh (doc,ports committer) Date: Thu Apr 9 20:58:38 2015 New Revision: 281324 URL: https://svnweb.freebsd.org/changeset/base/281324 Log: - ggatel.8 currently doesn't mention the 'rescue' command and documents a non-existing 'attach' command instead. - while here address a spelling error PR: 199111 Differential Revision: https://reviews.freebsd.org/D2259 Submitted by: fk@fabiankeil.de Obtained from: ElectroBSD Approved by: wblock (mentor) MFC after: 1 week Modified: head/sbin/ggate/ggatel/ggatel.8 Modified: head/sbin/ggate/ggatel/ggatel.8 ============================================================================== --- head/sbin/ggate/ggatel/ggatel.8 Thu Apr 9 19:51:55 2015 (r281323) +++ head/sbin/ggate/ggatel/ggatel.8 Thu Apr 9 20:58:38 2015 (r281324) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 2, 2011 +.Dd April 9, 2015 .Dt GGATEL 8 .Os .Sh NAME @@ -40,12 +40,6 @@ .Op Fl u Ar unit .Ar path .Nm -.Cm attach -.Op Fl v -.Op Fl o Cm ro | wo | rw -.Fl u Ar unit -.Ar path -.Nm .Cm destroy .Op Fl f .Fl u Ar unit @@ -53,6 +47,12 @@ .Cm list .Op Fl v .Op Fl u Ar unit +.Nm +.Cm rescue +.Op Fl v +.Op Fl o Cm ro | wo | rw +.Fl u Ar unit +.Ar path .Sh DESCRIPTION The .Nm @@ -70,10 +70,6 @@ Available commands: Create a .Nm ggate provider related to the given regular file or device. -.It Cm attach -Attach a worker process to an existing -.Nm ggate -provider. .It Cm destroy Destroy the given .Nm ggate @@ -82,6 +78,12 @@ provider. List .Nm ggate providers. +.It Cm rescue +Take over a previously created provider and handle pending and future +requests. This is useful if the initial +.Nm +process died. To prevent data loss, the given path must lead to the +regular file or device that was used to create the provider. .El .Pp Available options: @@ -111,7 +113,7 @@ Default is 30. .It Fl u Ar unit Unit number to use. .It Fl v -Do not fork, run in foreground and print debug informations on standard +Do not fork, run in foreground and print debug information on standard output. .It Ar path Path to a regular file or device. From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:05:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16F507A4; Thu, 9 Apr 2015 21:05:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02008B6E; Thu, 9 Apr 2015 21:05:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39L5m6o029731; Thu, 9 Apr 2015 21:05:48 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39L5mU9029730; Thu, 9 Apr 2015 21:05:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504092105.t39L5mU9029730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Apr 2015 21:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281325 - head/usr.sbin/bsnmpd/tools/bsnmptools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:05:49 -0000 Author: bapt Date: Thu Apr 9 21:05:48 2015 New Revision: 281325 URL: https://svnweb.freebsd.org/changeset/base/281325 Log: bsnmptools does not depends on libcrypto Modified: head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile Modified: head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile ============================================================================== --- head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile Thu Apr 9 20:58:38 2015 (r281324) +++ head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile Thu Apr 9 21:05:48 2015 (r281325) @@ -10,10 +10,6 @@ PROG= bsnmpget LIBADD= bsnmp bsnmptools CFLAGS+= -I${.CURDIR}/../libbsnmptools -.if ${MK_OPENSSL} != "no" -LIBADD+= crypto -.endif - LINKS= ${BINDIR}/bsnmpget ${BINDIR}/bsnmpwalk LINKS+= ${BINDIR}/bsnmpget ${BINDIR}/bsnmpset From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:08:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC7DDC55; Thu, 9 Apr 2015 21:08:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6F25B9E; Thu, 9 Apr 2015 21:08:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39L8Mc6030183; Thu, 9 Apr 2015 21:08:22 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39L8M5p030182; Thu, 9 Apr 2015 21:08:22 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504092108.t39L8M5p030182@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Apr 2015 21:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281327 - head/cddl/usr.bin/ctfmerge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:08:22 -0000 Author: bapt Date: Thu Apr 9 21:08:21 2015 New Revision: 281327 URL: https://svnweb.freebsd.org/changeset/base/281327 Log: Convert cftmerge to LIBADD and remove link on libdwarf which is not needed Modified: head/cddl/usr.bin/ctfmerge/Makefile Modified: head/cddl/usr.bin/ctfmerge/Makefile ============================================================================== --- head/cddl/usr.bin/ctfmerge/Makefile Thu Apr 9 21:06:51 2015 (r281326) +++ head/cddl/usr.bin/ctfmerge/Makefile Thu Apr 9 21:08:21 2015 (r281327) @@ -33,7 +33,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common -DPADD= ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD} -LDADD= -ldwarf -lelf -lz -lpthread +LIBADD= elf z pthread .include From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:14:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D90CFF7E; Thu, 9 Apr 2015 21:14:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4866C8A; Thu, 9 Apr 2015 21:14:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LEfxk034463; Thu, 9 Apr 2015 21:14:41 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LEfIZ034462; Thu, 9 Apr 2015 21:14:41 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504092114.t39LEfIZ034462@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Apr 2015 21:14:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281328 - head/usr.bin/iscsictl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:14:42 -0000 Author: bapt Date: Thu Apr 9 21:14:40 2015 New Revision: 281328 URL: https://svnweb.freebsd.org/changeset/base/281328 Log: iscsictl(8) does not actually needs to be linked to libcam nor libutil Modified: head/usr.bin/iscsictl/Makefile Modified: head/usr.bin/iscsictl/Makefile ============================================================================== --- head/usr.bin/iscsictl/Makefile Thu Apr 9 21:08:21 2015 (r281327) +++ head/usr.bin/iscsictl/Makefile Thu Apr 9 21:14:40 2015 (r281328) @@ -6,8 +6,6 @@ CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi MAN= iscsi.conf.5 iscsictl.8 -LIBADD= cam util - YFLAGS+= -v LFLAGS+= -i CLEANFILES= y.tab.c y.tab.h y.output From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:17:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D07FD1A9; Thu, 9 Apr 2015 21:17:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB9D2CA1; Thu, 9 Apr 2015 21:17:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LH8RY034846; Thu, 9 Apr 2015 21:17:08 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LH8TX034845; Thu, 9 Apr 2015 21:17:08 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504092117.t39LH8TX034845@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 9 Apr 2015 21:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281329 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:17:08 -0000 Author: glebius Date: Thu Apr 9 21:17:07 2015 New Revision: 281329 URL: https://svnweb.freebsd.org/changeset/base/281329 Log: Make ip reassembly queue mutexes per-vnet, putting them into the structure that they protect. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Apr 9 21:14:40 2015 (r281328) +++ head/sys/netinet/ip_input.c Thu Apr 9 21:17:07 2015 (r281329) @@ -165,18 +165,15 @@ VNET_DEFINE(struct in_ifaddrhashhead *, VNET_DEFINE(u_long, in_ifaddrhmask); /* mask for hash table */ static VNET_DEFINE(uma_zone_t, ipq_zone); -static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); -static struct mtx_padalign ipqlock[IPREASS_NHASH]; - -#define V_ipq_zone VNET(ipq_zone) -#define V_ipq VNET(ipq) - -/* - * The ipqlock array is global, /not/ per-VNET. - */ -#define IPQ_LOCK(i) mtx_lock(&ipqlock[(i)]) -#define IPQ_UNLOCK(i) mtx_unlock(&ipqlock[(i)]) -#define IPQ_LOCK_INIT(i) mtx_init(&ipqlock[(i)], "ipqlock", NULL, MTX_DEF) +#define V_ipq_zone VNET(ipq_zone) +struct ipqbucket { + TAILQ_HEAD(ipqhead, ipq) head; + struct mtx lock; +}; +static VNET_DEFINE(struct ipqbucket, ipq[IPREASS_NHASH]); +#define V_ipq VNET(ipq) +#define IPQ_LOCK(i) mtx_lock(&V_ipq[i].lock) +#define IPQ_UNLOCK(i) mtx_unlock(&V_ipq[i].lock) static void maxnipq_update(void); static void ipq_zone_change(void *); @@ -347,8 +344,10 @@ ip_init(void) V_in_ifaddrhashtbl = hashinit(INADDR_NHASH, M_IFADDR, &V_in_ifaddrhmask); /* Initialize IP reassembly queue. */ - for (i = 0; i < IPREASS_NHASH; i++) - TAILQ_INIT(&V_ipq[i]); + for (i = 0; i < IPREASS_NHASH; i++) { + TAILQ_INIT(&V_ipq[i].head); + mtx_init(&V_ipq[i].lock, "IP reassembly", NULL, MTX_DEF); + } V_maxnipq = nmbclusters / 32; V_maxfragsperpacket = 16; V_ipq_zone = uma_zcreate("ipq", sizeof(struct ipq), NULL, NULL, NULL, @@ -389,9 +388,6 @@ ip_init(void) EVENTHANDLER_REGISTER(nmbclusters_change, ipq_zone_change, NULL, EVENTHANDLER_PRI_ANY); - /* Initialize various other remaining things. */ - for (i = 0; i < IPREASS_NHASH; i++) - IPQ_LOCK_INIT(i); netisr_register(&ip_nh); #ifdef RSS netisr_register(&ip_direct_nh); @@ -411,9 +407,11 @@ ip_destroy(void) /* Cleanup in_ifaddr hash table; should be empty. */ hashdestroy(V_in_ifaddrhashtbl, M_IFADDR, V_in_ifaddrhmask); + /* Destroy IP reassembly queue. */ ip_drain_vnet(); - uma_zdestroy(V_ipq_zone); + for (i = 0; i < IPREASS_NHASH; i++) + mtx_destroy(&V_ipq[i].lock); } #endif @@ -893,9 +891,9 @@ ip_reass_purge_element(int skip_bucket) if (skip_bucket > -1 && i == skip_bucket) continue; IPQ_LOCK(i); - r = TAILQ_LAST(&V_ipq[i], ipqhead); + r = TAILQ_LAST(&V_ipq[i].head, ipqhead); if (r) { - ipq_timeout(&V_ipq[i], r); + ipq_timeout(&V_ipq[i].head, r); IPQ_UNLOCK(i); return (i); } @@ -941,7 +939,7 @@ ip_reass(struct mbuf *m) hlen = ip->ip_hl << 2; hash = IPREASS_HASH(ip->ip_src.s_addr, ip->ip_id); - head = &V_ipq[hash]; + head = &V_ipq[hash].head; IPQ_LOCK(hash); /* @@ -1302,9 +1300,9 @@ ip_slowtimo(void) CURVNET_SET(vnet_iter); for (i = 0; i < IPREASS_NHASH; i++) { IPQ_LOCK(i); - TAILQ_FOREACH_SAFE(fp, &V_ipq[i], ipq_list, tmp) + TAILQ_FOREACH_SAFE(fp, &V_ipq[i].head, ipq_list, tmp) if (--fp->ipq_ttl == 0) - ipq_timeout(&V_ipq[i], fp); + ipq_timeout(&V_ipq[i].head, fp); IPQ_UNLOCK(i); } /* @@ -1316,9 +1314,9 @@ ip_slowtimo(void) for (i = 0; i < IPREASS_NHASH; i++) { IPQ_LOCK(i); while (V_nipq > V_maxnipq && - !TAILQ_EMPTY(&V_ipq[i])) - ipq_drop(&V_ipq[i], - TAILQ_FIRST(&V_ipq[i])); + !TAILQ_EMPTY(&V_ipq[i].head)) + ipq_drop(&V_ipq[i].head, + TAILQ_FIRST(&V_ipq[i].head)); IPQ_UNLOCK(i); } } @@ -1337,8 +1335,8 @@ ip_drain_vnet(void) for (i = 0; i < IPREASS_NHASH; i++) { IPQ_LOCK(i); - while(!TAILQ_EMPTY(&V_ipq[i])) - ipq_drop(&V_ipq[i], TAILQ_FIRST(&V_ipq[i])); + while(!TAILQ_EMPTY(&V_ipq[i].head)) + ipq_drop(&V_ipq[i].head, TAILQ_FIRST(&V_ipq[i].head)); IPQ_UNLOCK(i); } } From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:20:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96017410; Thu, 9 Apr 2015 21:20:56 +0000 (UTC) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 58D16CCD; Thu, 9 Apr 2015 21:20:56 +0000 (UTC) Received: by iebrs15 with SMTP id rs15so2823356ieb.3; Thu, 09 Apr 2015 14:20:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=M+GyCiXfKgiKj5WzR3I4wOnQyf61w+c6QNAdDoTCjgU=; b=zwxnlzx5KtOQL25Q1uXvhes/nqbj3bAYRzjwVrDG9qQxzOELbFUFJ0MdK+yQEBDA/H rmaiYONmvojqDkleJs6CmWtTOdcvv/GCEq6UhMdTXmm0KaalRtIjd84BHmgNOsAZNJDB te1ANZzvjeSeH8a29bpKsOkLor+6xcX0y9JcRPhIQQKG5MAzS86UbuYTgU6P/G304n0O KAKpByRFJyiT1zcwNh2lGaPkgKczT6lCMqw/aBXxYruyEJuM/Xc3ekcTlvJ5JzTjzyfX AabC7Ts9lszJ8bOC1hJSU4zQfZv4q3j5jHALRBg4679qBH0rfYRGRnekSiE05qCLGC3c ldKA== MIME-Version: 1.0 X-Received: by 10.42.137.202 with SMTP id z10mr32880303ict.37.1428614455139; Thu, 09 Apr 2015 14:20:55 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Thu, 9 Apr 2015 14:20:55 -0700 (PDT) In-Reply-To: <20150409203526.GE64665@FreeBSD.org> References: <201504072309.t37N9Zwf011383@svn.freebsd.org> <20150408084839.GO64665@FreeBSD.org> <20150409203526.GE64665@FreeBSD.org> Date: Thu, 9 Apr 2015 14:20:55 -0700 X-Google-Sender-Auth: MP0BeqxHAdI077qSURHzuTKFJlE Message-ID: Subject: Re: svn commit: r281239 - head/sys/netinet From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:20:56 -0000 On 9 April 2015 at 13:35, Gleb Smirnoff wrote: > On Thu, Apr 09, 2015 at 12:45:31PM -0700, Adrian Chadd wrote: > A> Hi, > A> > A> Are you going to take a crack at fixing V_nipq? > > Yes, working on it. Patch written, now being debugged. Woo! -a From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:23:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C447D6AD; Thu, 9 Apr 2015 21:23:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B01AFD9B; Thu, 9 Apr 2015 21:23:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LNSo7039085; Thu, 9 Apr 2015 21:23:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LNSRj039084; Thu, 9 Apr 2015 21:23:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504092123.t39LNSRj039084@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Apr 2015 21:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281330 - head/usr.bin/mt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:23:28 -0000 Author: bapt Date: Thu Apr 9 21:23:27 2015 New Revision: 281330 URL: https://svnweb.freebsd.org/changeset/base/281330 Log: Remove uneeded sbuf header Modified: head/usr.bin/mt/mt.c Modified: head/usr.bin/mt/mt.c ============================================================================== --- head/usr.bin/mt/mt.c Thu Apr 9 21:17:07 2015 (r281329) +++ head/usr.bin/mt/mt.c Thu Apr 9 21:23:27 2015 (r281330) @@ -81,7 +81,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:26:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D78E5872; Thu, 9 Apr 2015 21:26:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A91CCDB9; Thu, 9 Apr 2015 21:26:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LQOpA039493; Thu, 9 Apr 2015 21:26:24 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LQOEt039492; Thu, 9 Apr 2015 21:26:24 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504092126.t39LQOEt039492@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 9 Apr 2015 21:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281331 - head/usr.sbin/acpi/acpidump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:26:25 -0000 Author: jkim Date: Thu Apr 9 21:26:23 2015 New Revision: 281331 URL: https://svnweb.freebsd.org/changeset/base/281331 Log: Do not crash when RSDT/XSDT contains an empty entry. Reported by: Slawa Olhovchenkov MFC after: 3 days Modified: head/usr.sbin/acpi/acpidump/acpi.c Modified: head/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- head/usr.sbin/acpi/acpidump/acpi.c Thu Apr 9 21:23:27 2015 (r281330) +++ head/usr.sbin/acpi/acpidump/acpi.c Thu Apr 9 21:26:23 2015 (r281331) @@ -1085,17 +1085,10 @@ acpi_print_rsdt(ACPI_TABLE_HEADER *rsdp) for (i = 0; i < entries; i++) { if (i > 0) printf(", "); - switch (addr_size) { - case 4: + if (addr_size == 4) addr = le32toh(rsdt->TableOffsetEntry[i]); - break; - case 8: + else addr = le64toh(xsdt->TableOffsetEntry[i]); - break; - default: - addr = 0; - } - assert(addr != 0); printf("0x%08lx", addr); } printf(" }\n"); @@ -1342,17 +1335,12 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp xsdt = (ACPI_TABLE_XSDT *)rsdp; entries = (rsdp->Length - sizeof(ACPI_TABLE_HEADER)) / addr_size; for (i = 0; i < entries; i++) { - switch (addr_size) { - case 4: + if (addr_size == 4) addr = le32toh(rsdt->TableOffsetEntry[i]); - break; - case 8: + else addr = le64toh(xsdt->TableOffsetEntry[i]); - break; - default: - assert((addr = 0)); - } - + if (addr == 0) + continue; sdp = (ACPI_TABLE_HEADER *)acpi_map_sdt(addr); if (acpi_checksum(sdp, sdp->Length)) { warnx("RSDT entry %d (sig %.4s) is corrupt", i, @@ -1547,16 +1535,12 @@ sdt_from_rsdt(ACPI_TABLE_HEADER *rsdp, c xsdt = (ACPI_TABLE_XSDT *)rsdp; entries = (rsdp->Length - sizeof(ACPI_TABLE_HEADER)) / addr_size; for (i = 0; i < entries; i++) { - switch (addr_size) { - case 4: + if (addr_size == 4) addr = le32toh(rsdt->TableOffsetEntry[i]); - break; - case 8: + else addr = le64toh(xsdt->TableOffsetEntry[i]); - break; - default: - assert((addr = 0)); - } + if (addr == 0) + continue; sdt = (ACPI_TABLE_HEADER *)acpi_map_sdt(addr); if (last != NULL) { if (sdt == last) From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:26:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16ADB9B2; Thu, 9 Apr 2015 21:26:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBE42DC0; Thu, 9 Apr 2015 21:26:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LQdO8039565; Thu, 9 Apr 2015 21:26:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LQcDh039562; Thu, 9 Apr 2015 21:26:38 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504092126.t39LQcDh039562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Apr 2015 21:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281332 - in head: lib/libmt share/mk usr.bin/mt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:26:40 -0000 Author: bapt Date: Thu Apr 9 21:26:38 2015 New Revision: 281332 URL: https://svnweb.freebsd.org/changeset/base/281332 Log: Convert mt(1) and libmt to LIBADD While here fix missing link to libbsdxml for libmt Fix overlinking in mt(1) Make add an indirect libmt dependency on bsdxml to allow static linking if needed Modified: head/lib/libmt/Makefile head/share/mk/src.libnames.mk head/usr.bin/mt/Makefile Modified: head/lib/libmt/Makefile ============================================================================== --- head/lib/libmt/Makefile Thu Apr 9 21:26:23 2015 (r281331) +++ head/lib/libmt/Makefile Thu Apr 9 21:26:38 2015 (r281332) @@ -5,8 +5,7 @@ SHLIBDIR?= /lib SRCS= mtlib.c INCS= mtlib.h -DPADD= ${LIBSBUF} -LDADD= -lsbuf +LIBADD= sbuf bsdxml MAN= mt.3 Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Thu Apr 9 21:26:23 2015 (r281331) +++ head/share/mk/src.libnames.mk Thu Apr 9 21:26:38 2015 (r281332) @@ -111,6 +111,7 @@ _LIBRARIES= \ md \ memstat \ mp \ + mt \ nandfs \ ncurses \ ncursesw \ @@ -199,6 +200,7 @@ _DP_proc+= ctf _DP_mp= crypto _DP_memstat= kvm _DP_magic= z +_DP_mt= bsdxml _DP_ldns= crypto .if ${MK_OPENSSL} != "no" _DP_fetch= ssl crypto @@ -259,6 +261,9 @@ LDADD_atf_cxx+= ${LDADD_atf_c} DPADD_ipf+= ${DPADD_kvm} LDADD_ipf+= ${LDADD_kvm} +DPADD_mt+= ${DPADD_sbuf} +LDADD_mt+= ${LDADD_sbuf} + # The following depends on libraries which are using pthread DPADD_hdb+= ${DPADD_pthread} LDADD_hdb+= ${LDADD_pthread} Modified: head/usr.bin/mt/Makefile ============================================================================== --- head/usr.bin/mt/Makefile Thu Apr 9 21:26:23 2015 (r281331) +++ head/usr.bin/mt/Makefile Thu Apr 9 21:26:38 2015 (r281332) @@ -2,7 +2,6 @@ # $FreeBSD$ PROG= mt -DPADD= ${LIBMT} ${LIBSBUF} ${LIBBSDXML} -LDADD= -lmt -lsbuf -lbsdxml +LIBADD= mt .include From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:30:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD8A8BB9; Thu, 9 Apr 2015 21:30:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B945DDE7; Thu, 9 Apr 2015 21:30:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LUB3i040582; Thu, 9 Apr 2015 21:30:11 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LUB37040581; Thu, 9 Apr 2015 21:30:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504092130.t39LUB37040581@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Apr 2015 21:30:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281333 - head/usr.bin/smbutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:30:11 -0000 Author: bapt Date: Thu Apr 9 21:30:11 2015 New Revision: 281333 URL: https://svnweb.freebsd.org/changeset/base/281333 Log: Remove uneeded link to libkiconv Modified: head/usr.bin/smbutil/Makefile Modified: head/usr.bin/smbutil/Makefile ============================================================================== --- head/usr.bin/smbutil/Makefile Thu Apr 9 21:26:38 2015 (r281332) +++ head/usr.bin/smbutil/Makefile Thu Apr 9 21:30:11 2015 (r281333) @@ -3,7 +3,7 @@ PROG= smbutil SRCS= smbutil.c dumptree.c login.c lookup.c view.c print.c -LIBADD= smb kiconv +LIBADD= smb CONTRIBDIR= ${.CURDIR}/../../contrib/smbfs CFLAGS+= -I${CONTRIBDIR}/include From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:32:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5F1FD1F; Thu, 9 Apr 2015 21:32:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78810E94; Thu, 9 Apr 2015 21:32:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LWXgG043856; Thu, 9 Apr 2015 21:32:33 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LWXmw043855; Thu, 9 Apr 2015 21:32:33 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504092132.t39LWXmw043855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 9 Apr 2015 21:32:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281334 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:32:33 -0000 Author: glebius Date: Thu Apr 9 21:32:32 2015 New Revision: 281334 URL: https://svnweb.freebsd.org/changeset/base/281334 Log: In the ip_reass() do packet examination and adjusting before acquiring locks and doing lookups. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Apr 9 21:30:11 2015 (r281333) +++ head/sys/netinet/ip_input.c Thu Apr 9 21:32:32 2015 (r281334) @@ -938,6 +938,41 @@ ip_reass(struct mbuf *m) ip = mtod(m, struct ip *); hlen = ip->ip_hl << 2; + /* + * Adjust ip_len to not reflect header, + * convert offset of this to bytes. + */ + ip->ip_len = htons(ntohs(ip->ip_len) - hlen); + if (ip->ip_off & htons(IP_MF)) { + /* + * Make sure that fragments have a data length + * that's a non-zero multiple of 8 bytes. + */ + if (ip->ip_len == htons(0) || (ntohs(ip->ip_len) & 0x7) != 0) { + IPSTAT_INC(ips_toosmall); /* XXX */ + IPSTAT_INC(ips_fragdropped); + m_freem(m); + return (NULL); + } + m->m_flags |= M_IP_FRAG; + } else + m->m_flags &= ~M_IP_FRAG; + ip->ip_off = htons(ntohs(ip->ip_off) << 3); + + /* + * Attempt reassembly; if it succeeds, proceed. + * ip_reass() will return a different mbuf. + */ + IPSTAT_INC(ips_fragments); + m->m_pkthdr.PH_loc.ptr = ip; + + /* + * Presence of header sizes in mbufs + * would confuse code below. + */ + m->m_data += hlen; + m->m_len -= hlen; + hash = IPREASS_HASH(ip->ip_src.s_addr, ip->ip_id); head = &V_ipq[hash].head; IPQ_LOCK(hash); @@ -980,40 +1015,6 @@ ip_reass(struct mbuf *m) found: /* - * Adjust ip_len to not reflect header, - * convert offset of this to bytes. - */ - ip->ip_len = htons(ntohs(ip->ip_len) - hlen); - if (ip->ip_off & htons(IP_MF)) { - /* - * Make sure that fragments have a data length - * that's a non-zero multiple of 8 bytes. - */ - if (ip->ip_len == htons(0) || (ntohs(ip->ip_len) & 0x7) != 0) { - IPSTAT_INC(ips_toosmall); /* XXX */ - goto dropfrag; - } - m->m_flags |= M_IP_FRAG; - } else - m->m_flags &= ~M_IP_FRAG; - ip->ip_off = htons(ntohs(ip->ip_off) << 3); - - /* - * Attempt reassembly; if it succeeds, proceed. - * ip_reass() will return a different mbuf. - */ - IPSTAT_INC(ips_fragments); - m->m_pkthdr.PH_loc.ptr = ip; - - /* Previous ip_reass() started here. */ - /* - * Presence of header sizes in mbufs - * would confuse code below. - */ - m->m_data += hlen; - m->m_len -= hlen; - - /* * If first fragment to arrive, create a reassembly queue. */ if (fp == NULL) { From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:32:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 511A2E5A; Thu, 9 Apr 2015 21:32:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 323C4E97; Thu, 9 Apr 2015 21:32:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LWf7A043915; Thu, 9 Apr 2015 21:32:41 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LWfmD043914; Thu, 9 Apr 2015 21:32:41 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504092132.t39LWfmD043914@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 9 Apr 2015 21:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281335 - head/usr.sbin/acpi/acpidump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:32:41 -0000 Author: jkim Date: Thu Apr 9 21:32:40 2015 New Revision: 281335 URL: https://svnweb.freebsd.org/changeset/base/281335 Log: Print 64-bit addresses cleary with leading zeros to avoid confusions. MFC after: 1 week Modified: head/usr.sbin/acpi/acpidump/acpi.c Modified: head/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- head/usr.sbin/acpi/acpidump/acpi.c Thu Apr 9 21:32:32 2015 (r281334) +++ head/usr.sbin/acpi/acpidump/acpi.c Thu Apr 9 21:32:40 2015 (r281335) @@ -168,12 +168,18 @@ acpi_print_gas(ACPI_GENERIC_ADDRESS *gas { switch(gas->SpaceId) { case ACPI_GAS_MEMORY: - printf("0x%08lx:%u[%u] (Memory)", (u_long)gas->Address, - gas->BitOffset, gas->BitWidth); + if (gas->BitWidth <= 32) + printf("0x%08x:%u[%u] (Memory)", + (u_int)gas->Address, gas->BitOffset, + gas->BitWidth); + else + printf("0x%016jx:%u[%u] (Memory)", + (uintmax_t)gas->Address, gas->BitOffset, + gas->BitWidth); break; case ACPI_GAS_IO: - printf("0x%02lx:%u[%u] (IO)", (u_long)gas->Address, - gas->BitOffset, gas->BitWidth); + printf("0x%02x:%u[%u] (IO)", (u_int)gas->Address, + gas->BitOffset, gas->BitWidth); break; case ACPI_GAS_PCI: printf("%x:%x+0x%x (PCI)", (uint16_t)(gas->Address >> 32), @@ -194,7 +200,7 @@ acpi_print_gas(ACPI_GENERIC_ADDRESS *gas case ACPI_GAS_DATATABLE: case ACPI_GAS_FIXED: default: - printf("0x%08lx (?)", (u_long)gas->Address); + printf("0x%016jx (?)", (uintmax_t)gas->Address); break; } } @@ -831,7 +837,7 @@ acpi_handle_dmar_drhd(ACPI_DMAR_HARDWARE #undef PRINTFLAG printf("\tSegment=%d\n", drhd->Segment); - printf("\tAddress=0x%0jx\n", (uintmax_t)drhd->Address); + printf("\tAddress=0x%016jx\n", (uintmax_t)drhd->Address); remaining = drhd->Header.Length - sizeof(ACPI_DMAR_HARDWARE_UNIT); if (remaining > 0) @@ -856,8 +862,8 @@ acpi_handle_dmar_rmrr(ACPI_DMAR_RESERVED printf("\tType=RMRR\n"); printf("\tLength=%d\n", rmrr->Header.Length); printf("\tSegment=%d\n", rmrr->Segment); - printf("\tBaseAddress=0x%0jx\n", (uintmax_t)rmrr->BaseAddress); - printf("\tLimitAddress=0x%0jx\n", (uintmax_t)rmrr->EndAddress); + printf("\tBaseAddress=0x%016jx\n", (uintmax_t)rmrr->BaseAddress); + printf("\tLimitAddress=0x%016jx\n", (uintmax_t)rmrr->EndAddress); remaining = rmrr->Header.Length - sizeof(ACPI_DMAR_RESERVED_MEMORY); if (remaining > 0) @@ -912,7 +918,7 @@ acpi_handle_dmar_rhsa(ACPI_DMAR_RHSA *rh printf("\n"); printf("\tType=RHSA\n"); printf("\tLength=%d\n", rhsa->Header.Length); - printf("\tBaseAddress=0x%0jx\n", (uintmax_t)rhsa->BaseAddress); + printf("\tBaseAddress=0x%016jx\n", (uintmax_t)rhsa->BaseAddress); printf("\tProximityDomain=0x%08x\n", rhsa->ProximityDomain); } @@ -1074,7 +1080,6 @@ acpi_print_rsdt(ACPI_TABLE_HEADER *rsdp) ACPI_TABLE_RSDT *rsdt; ACPI_TABLE_XSDT *xsdt; int i, entries; - u_long addr; rsdt = (ACPI_TABLE_RSDT *)rsdp; xsdt = (ACPI_TABLE_XSDT *)rsdp; @@ -1086,10 +1091,10 @@ acpi_print_rsdt(ACPI_TABLE_HEADER *rsdp) if (i > 0) printf(", "); if (addr_size == 4) - addr = le32toh(rsdt->TableOffsetEntry[i]); + printf("0x%08x", le32toh(rsdt->TableOffsetEntry[i])); else - addr = le64toh(xsdt->TableOffsetEntry[i]); - printf("0x%08lx", addr); + printf("0x%016jx", + (uintmax_t)le64toh(xsdt->TableOffsetEntry[i])); } printf(" }\n"); printf(END_COMMENT); @@ -1205,8 +1210,8 @@ acpi_print_fadt(ACPI_TABLE_HEADER *sdp) printf(", RESET_VALUE=%#x\n", fadt->ResetValue); } if (acpi_get_fadt_revision(fadt) > 1) { - printf("\tX_FACS=0x%08lx, ", (u_long)fadt->XFacs); - printf("X_DSDT=0x%08lx\n", (u_long)fadt->XDsdt); + printf("\tX_FACS=0x%016jx, ", (uintmax_t)fadt->XFacs); + printf("X_DSDT=0x%016jx\n", (uintmax_t)fadt->XDsdt); printf("\tX_PM1a_EVT_BLK="); acpi_print_gas(&fadt->XPm1aEventBlock); if (fadt->XPm1bEventBlock.Address != 0) { @@ -1261,10 +1266,9 @@ acpi_print_facs(ACPI_TABLE_FACS *facs) printf("S4BIOS"); printf("\n"); - if (facs->XFirmwareWakingVector != 0) { - printf("\tX_Firm_Wake_Vec=%08lx\n", - (u_long)facs->XFirmwareWakingVector); - } + if (facs->XFirmwareWakingVector != 0) + printf("\tX_Firm_Wake_Vec=%016jx\n", + (uintmax_t)facs->XFirmwareWakingVector); printf("\tVersion=%u\n", facs->Version); printf(END_COMMENT); @@ -1314,8 +1318,8 @@ acpi_print_rsd_ptr(ACPI_TABLE_RSDP *rp) printf("\tRSDT=0x%08x, cksum=%u\n", rp->RsdtPhysicalAddress, rp->Checksum); } else { - printf("\tXSDT=0x%08lx, length=%u, cksum=%u\n", - (u_long)rp->XsdtPhysicalAddress, rp->Length, + printf("\tXSDT=0x%016jx, length=%u, cksum=%u\n", + (uintmax_t)rp->XsdtPhysicalAddress, rp->Length, rp->ExtendedChecksum); } printf(END_COMMENT); From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:33:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 371A7FAE; Thu, 9 Apr 2015 21:33:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22BCAEA5; Thu, 9 Apr 2015 21:33:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LXwht044140; Thu, 9 Apr 2015 21:33:58 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LXvKF044139; Thu, 9 Apr 2015 21:33:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504092133.t39LXvKF044139@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Apr 2015 21:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281336 - head/usr.sbin/authpf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:33:58 -0000 Author: bapt Date: Thu Apr 9 21:33:57 2015 New Revision: 281336 URL: https://svnweb.freebsd.org/changeset/base/281336 Log: authpf does not need to link to libmd Modified: head/usr.sbin/authpf/Makefile Modified: head/usr.sbin/authpf/Makefile ============================================================================== --- head/usr.sbin/authpf/Makefile Thu Apr 9 21:32:40 2015 (r281335) +++ head/usr.sbin/authpf/Makefile Thu Apr 9 21:33:57 2015 (r281336) @@ -13,7 +13,7 @@ SRCS= authpf.c # XXX ALTQ: CFLAGS+= -DENABLE_ALTQ -LIBADD= m md util +LIBADD= m util WARNS?= 3 From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:35:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC66F335; Thu, 9 Apr 2015 21:35:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9812AEBF; Thu, 9 Apr 2015 21:35:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LZjAf044435; Thu, 9 Apr 2015 21:35:45 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LZj0r044434; Thu, 9 Apr 2015 21:35:45 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201504092135.t39LZj0r044434@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 9 Apr 2015 21:35:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281337 - head/sys/dev/re X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:35:45 -0000 Author: marius Date: Thu Apr 9 21:35:44 2015 New Revision: 281337 URL: https://svnweb.freebsd.org/changeset/base/281337 Log: Don't enable RX and TX before their initial configuration is done, i. e. after setting up interrupt moderation but before turning interrupts on. This matches what Realtek's r8168 Linux driver does as of version 8.039.00 and fixes problems with certain incarnations of certain MAC revisions like the interface requiring an extra up/down-cycle after boot to start working or DMA configuration not being adhered to. PR: 193743, 197535 MFC after: 1 week Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Thu Apr 9 21:33:57 2015 (r281336) +++ head/sys/dev/re/if_re.c Thu Apr 9 21:35:44 2015 (r281337) @@ -3196,11 +3196,6 @@ re_init_locked(struct rl_softc *sc) ~0x00080000); /* - * Enable transmit and receive. - */ - CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB|RL_CMD_RX_ENB); - - /* * Set the initial TX configuration. */ if (sc->rl_testmode) { @@ -3226,6 +3221,11 @@ re_init_locked(struct rl_softc *sc) CSR_WRITE_2(sc, RL_INTRMOD, 0x5100); } + /* + * Enable transmit and receive. + */ + CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB | RL_CMD_RX_ENB); + #ifdef DEVICE_POLLING /* * Disable interrupts if we are polling. @@ -3249,10 +3249,6 @@ re_init_locked(struct rl_softc *sc) /* Start RX/TX process. */ CSR_WRITE_4(sc, RL_MISSEDPKT, 0); -#ifdef notdef - /* Enable receiver and transmitter. */ - CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_TX_ENB|RL_CMD_RX_ENB); -#endif /* * Initialize the timer interrupt register so that From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:38:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1631873A; Thu, 9 Apr 2015 21:38:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB2EBF09; Thu, 9 Apr 2015 21:38:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39Lcg7J044839; Thu, 9 Apr 2015 21:38:42 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Lcfpb044835; Thu, 9 Apr 2015 21:38:41 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504092138.t39Lcfpb044835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Apr 2015 21:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281338 - in head: lib/libvmmapi share/mk usr.sbin/bhyve usr.sbin/bhyveload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:38:43 -0000 Author: bapt Date: Thu Apr 9 21:38:40 2015 New Revision: 281338 URL: https://svnweb.freebsd.org/changeset/base/281338 Log: Fix overlinking in bhyve: libvmmapi is actually needed to be linked to libutil, not bhyve nor bhyveload Modified: head/lib/libvmmapi/Makefile head/share/mk/src.libnames.mk head/usr.sbin/bhyve/Makefile head/usr.sbin/bhyveload/Makefile Modified: head/lib/libvmmapi/Makefile ============================================================================== --- head/lib/libvmmapi/Makefile Thu Apr 9 21:35:44 2015 (r281337) +++ head/lib/libvmmapi/Makefile Thu Apr 9 21:38:40 2015 (r281338) @@ -6,6 +6,8 @@ INCS= vmmapi.h WARNS?= 2 +LIBADD= util + CFLAGS+= -I${.CURDIR} .include Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Thu Apr 9 21:35:44 2015 (r281337) +++ head/share/mk/src.libnames.mk Thu Apr 9 21:38:40 2015 (r281338) @@ -229,6 +229,7 @@ _DP_krb5+= asn1 com_err crypt crypto hx5 _DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err _DP_lzma= pthread _DP_ucl= m +_DP_vmmapi= util # Define spacial cases LDADD_supcplusplus= -lsupc++ Modified: head/usr.sbin/bhyve/Makefile ============================================================================== --- head/usr.sbin/bhyve/Makefile Thu Apr 9 21:35:44 2015 (r281337) +++ head/usr.sbin/bhyve/Makefile Thu Apr 9 21:38:40 2015 (r281338) @@ -43,7 +43,7 @@ SRCS= \ .PATH: ${.CURDIR}/../../sys/amd64/vmm SRCS+= vmm_instruction_emul.c -LIBADD= vmmapi md util pthread +LIBADD= vmmapi md pthread WARNS?= 2 Modified: head/usr.sbin/bhyveload/Makefile ============================================================================== --- head/usr.sbin/bhyveload/Makefile Thu Apr 9 21:35:44 2015 (r281337) +++ head/usr.sbin/bhyveload/Makefile Thu Apr 9 21:38:40 2015 (r281338) @@ -4,7 +4,7 @@ PROG= bhyveload SRCS= bhyveload.c MAN= bhyveload.8 -LIBADD= vmmapi util +LIBADD= vmmapi WARNS?= 3 From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:39:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C009590E; Thu, 9 Apr 2015 21:39:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB516F23; Thu, 9 Apr 2015 21:39:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LdxoT045031; Thu, 9 Apr 2015 21:39:59 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LdxIX045030; Thu, 9 Apr 2015 21:39:59 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504092139.t39LdxIX045030@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Apr 2015 21:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281339 - head/usr.sbin/bhyvectl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:39:59 -0000 Author: bapt Date: Thu Apr 9 21:39:58 2015 New Revision: 281339 URL: https://svnweb.freebsd.org/changeset/base/281339 Log: bhyvectl does not need to link to libutil Modified: head/usr.sbin/bhyvectl/Makefile Modified: head/usr.sbin/bhyvectl/Makefile ============================================================================== --- head/usr.sbin/bhyvectl/Makefile Thu Apr 9 21:38:40 2015 (r281338) +++ head/usr.sbin/bhyvectl/Makefile Thu Apr 9 21:39:58 2015 (r281339) @@ -7,7 +7,7 @@ SRCS= bhyvectl.c MAN= -LIBADD= vmmapi util +LIBADD= vmmapi WARNS?= 3 From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:48:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AEEFC2B; Thu, 9 Apr 2015 21:48:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56C0C16; Thu, 9 Apr 2015 21:48:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LmISQ049589; Thu, 9 Apr 2015 21:48:18 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LmI4E049588; Thu, 9 Apr 2015 21:48:18 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504092148.t39LmI4E049588@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Apr 2015 21:48:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281340 - head/usr.sbin/rpc.lockd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:48:18 -0000 Author: bapt Date: Thu Apr 9 21:48:17 2015 New Revision: 281340 URL: https://svnweb.freebsd.org/changeset/base/281340 Log: rpc.locked does not need to link to libutil Modified: head/usr.sbin/rpc.lockd/Makefile Modified: head/usr.sbin/rpc.lockd/Makefile ============================================================================== --- head/usr.sbin/rpc.lockd/Makefile Thu Apr 9 21:39:58 2015 (r281339) +++ head/usr.sbin/rpc.lockd/Makefile Thu Apr 9 21:48:17 2015 (r281340) @@ -9,7 +9,7 @@ SRCS= kern.c nlm_prot_svc.c lockd.c lock CFLAGS+= -I. -I${DESTDIR}/usr/include/rpcsvc WARNS?= 3 -LIBADD= rpcsvc util +LIBADD= rpcsvc CLEANFILES= nlm_prot_svc.c nlm_prot.h test From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:52:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A834DD2; Thu, 9 Apr 2015 21:52:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 862F912C; Thu, 9 Apr 2015 21:52:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39LqFVQ053539; Thu, 9 Apr 2015 21:52:15 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39LqFrV053538; Thu, 9 Apr 2015 21:52:15 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504092152.t39LqFrV053538@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 9 Apr 2015 21:52:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281341 - head/usr.sbin/rtsold X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:52:15 -0000 Author: bapt Date: Thu Apr 9 21:52:14 2015 New Revision: 281341 URL: https://svnweb.freebsd.org/changeset/base/281341 Log: rtsold does not need to link to libkvm Modified: head/usr.sbin/rtsold/Makefile Modified: head/usr.sbin/rtsold/Makefile ============================================================================== --- head/usr.sbin/rtsold/Makefile Thu Apr 9 21:48:17 2015 (r281340) +++ head/usr.sbin/rtsold/Makefile Thu Apr 9 21:52:14 2015 (r281341) @@ -21,6 +21,5 @@ SRCS= rtsold.c rtsol.c if.c probe.c dump WARNS?= 3 CFLAGS+= -DHAVE_ARC4RANDOM -DHAVE_POLL_H -LIBADD= kvm .include From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 21:58:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 787CF119; Thu, 9 Apr 2015 21:58:17 +0000 (UTC) Received: from vps.amdmi3.ru (vps.amdmi3.ru [109.234.38.216]) by mx1.freebsd.org (Postfix) with ESMTP id 378871A7; Thu, 9 Apr 2015 21:58:16 +0000 (UTC) Received: from hive.panopticon (unknown [213.148.20.85]) by vps.amdmi3.ru (Postfix) with ESMTPS id 3F317B0623; Fri, 10 Apr 2015 00:58:08 +0300 (MSK) Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 360BC4F9; Fri, 10 Apr 2015 00:58:00 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id CB5E6758B; Fri, 10 Apr 2015 00:58:02 +0300 (MSK) Date: Fri, 10 Apr 2015 00:58:02 +0300 From: Dmitry Marakasov To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150409215802.GY21982@hades.panopticon> References: <201504060132.t361WRVe090234@svn.freebsd.org> <20150406065619.GH74532@zxy.spb.ru> <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150406085323.GL23643@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:58:17 -0000 * Slawa Olhovchenkov (slw@zxy.spb.ru) wrote: > I am open in vi config file with koi8 comment. > First screen don't have lines with koi8 characters. vi silent. > I am edit somewehere. > vi silent. > I am try save. > vi: "Conversion error on line 160; Error: t.koi: Illegal byte > sequence; t.koi: WARNING: FILE TRUNCATED." > At this point data already lost. There's ongoing effort on fixing multibyte support in nvi: https://github.com/lichray/nvi2 In either case, it's long time for us to embrace unicode support despite of current problems in its support, otherwise they will never be fixed. In practice, everybody use utf-8 locales anyway. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://amdmi3.ru From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 22:04:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3D3A3E1; Thu, 9 Apr 2015 22:04:45 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 951342B5; Thu, 9 Apr 2015 22:04:45 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgKZ0-000Dzr-Ji; Fri, 10 Apr 2015 01:04:42 +0300 Date: Fri, 10 Apr 2015 01:04:42 +0300 From: Slawa Olhovchenkov To: Dmitry Marakasov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150409220442.GQ8220@zxy.spb.ru> References: <201504060132.t361WRVe090234@svn.freebsd.org> <20150406065619.GH74532@zxy.spb.ru> <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409215802.GY21982@hades.panopticon> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 22:04:46 -0000 On Fri, Apr 10, 2015 at 12:58:02AM +0300, Dmitry Marakasov wrote: > * Slawa Olhovchenkov (slw@zxy.spb.ru) wrote: > > > I am open in vi config file with koi8 comment. > > First screen don't have lines with koi8 characters. vi silent. > > I am edit somewehere. > > vi silent. > > I am try save. > > vi: "Conversion error on line 160; Error: t.koi: Illegal byte > > sequence; t.koi: WARNING: FILE TRUNCATED." > > At this point data already lost. > > There's ongoing effort on fixing multibyte support in nvi: > > https://github.com/lichray/nvi2 > > In either case, it's long time for us to embrace unicode support > despite of current problems in its support, otherwise they will > never be fixed. In practice, everybody use utf-8 locales anyway. I am talk not about using or not using utf-8. I am talk about unconditionaly forcing switch from non-utf8 to utf-8 locale (FreeBSD-11 can be get not only be fresh install but and by freebsd-update/source update on the live systems, with bunch files witch content in koi8 and named in koi8). Also, some config files (from ports) have raw 8-bit characters inside. From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 22:13:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B73707C9; Thu, 9 Apr 2015 22:13:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9875D3E7; Thu, 9 Apr 2015 22:13:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39MDSxc063577; Thu, 9 Apr 2015 22:13:28 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39MDS2K063576; Thu, 9 Apr 2015 22:13:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504092213.t39MDS2K063576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 9 Apr 2015 22:13:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281342 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 22:13:28 -0000 Author: glebius Date: Thu Apr 9 22:13:27 2015 New Revision: 281342 URL: https://svnweb.freebsd.org/changeset/base/281342 Log: Now that IP reassembly is no longer under single lock, book-keeping amount of allocations in V_nipq is racy. To fix that, we would simply stop doing book-keeping ourselves, and rely on UMA doing that. There could be a slight overcommit due to caches, but that isn't a big deal. o V_nipq and V_maxnipq go away. o net.inet.ip.fragpackets is now just SYSCTL_UMA_CUR() o net.inet.ip.maxfragpackets could have been just SYSCTL_UMA_MAX(), but historically it has special semantics about values of 0 and -1, so provide sysctl_maxfragpackets() to handle these special cases. o If zone limit lowers either due to net.inet.ip.maxfragpackets or due to kern.ipc.nmbclusters, then new function ipq_drain_tomax() goes over buckets and frees the oldest packets until we are in the limit. The code that (incorrectly) did that in ip_slowtimo() is removed. o ip_reass() doesn't check any limits and calls uma_zalloc(M_NOWAIT). If it fails, a new function ipq_reuse() is called. This function will find the oldest packet in the currently locked bucket, and if there is none, it will search in other buckets until success. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Apr 9 21:52:14 2015 (r281341) +++ head/sys/netinet/ip_input.c Thu Apr 9 22:13:27 2015 (r281342) @@ -172,12 +172,18 @@ struct ipqbucket { }; static VNET_DEFINE(struct ipqbucket, ipq[IPREASS_NHASH]); #define V_ipq VNET(ipq) +static VNET_DEFINE(int, noreass); +#define V_noreass VNET(noreass) + #define IPQ_LOCK(i) mtx_lock(&V_ipq[i].lock) +#define IPQ_TRYLOCK(i) mtx_trylock(&V_ipq[i].lock) #define IPQ_UNLOCK(i) mtx_unlock(&V_ipq[i].lock) +#define IPQ_LOCK_ASSERT(i) mtx_assert(&V_ipq[i].lock, MA_OWNED) -static void maxnipq_update(void); +static int sysctl_maxfragpackets(SYSCTL_HANDLER_ARGS); static void ipq_zone_change(void *); static void ip_drain_vnet(void); +static void ipq_drain_tomax(void); static void ipq_free(struct ipqhead *, struct ipq *); static inline void @@ -196,12 +202,11 @@ ipq_drop(struct ipqhead *head, struct ip ipq_free(head, fp); } -static VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ -static VNET_DEFINE(int, nipq); /* Total # of reass queues */ -#define V_maxnipq VNET(maxnipq) -#define V_nipq VNET(nipq) -SYSCTL_INT(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_VNET | CTLFLAG_RD, - &VNET_NAME(nipq), 0, +SYSCTL_PROC(_net_inet_ip, OID_AUTO, maxfragpackets, CTLFLAG_VNET | + CTLTYPE_INT | CTLFLAG_RW, NULL, 0, sysctl_maxfragpackets, "I", + "Maximum number of IPv4 fragment reassembly queue entries"); +SYSCTL_UMA_CUR(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_VNET, + &VNET_NAME(ipq_zone), "Current number of IPv4 fragment reassembly queue entries"); static VNET_DEFINE(int, maxfragsperpacket); @@ -346,13 +351,13 @@ ip_init(void) /* Initialize IP reassembly queue. */ for (i = 0; i < IPREASS_NHASH; i++) { TAILQ_INIT(&V_ipq[i].head); - mtx_init(&V_ipq[i].lock, "IP reassembly", NULL, MTX_DEF); + mtx_init(&V_ipq[i].lock, "IP reassembly", NULL, + MTX_DEF | MTX_DUPOK); } - V_maxnipq = nmbclusters / 32; V_maxfragsperpacket = 16; V_ipq_zone = uma_zcreate("ipq", sizeof(struct ipq), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - maxnipq_update(); + uma_zone_set_max(V_ipq_zone, nmbclusters / 32); /* Initialize packet filter hooks. */ V_inet_pfil_hook.ph_type = PFIL_TYPE_AF; @@ -810,25 +815,27 @@ bad: * reasons. */ static void -maxnipq_update(void) +ipq_drain_tomax(void) { + int target; /* - * -1 for unlimited allocation. - */ - if (V_maxnipq < 0) - uma_zone_set_max(V_ipq_zone, 0); - /* - * Positive number for specific bound. - */ - if (V_maxnipq > 0) - uma_zone_set_max(V_ipq_zone, V_maxnipq); - /* - * Zero specifies no further fragment queue allocation. + * If we are over the maximum number of fragments, + * drain off enough to get down to the new limit, + * stripping off last elements on queues. Every + * run we strip the oldest element from each bucket. */ - if (V_maxnipq == 0) { - uma_zone_set_max(V_ipq_zone, 1); - ip_drain_vnet(); + target = uma_zone_get_max(V_ipq_zone); + while (uma_zone_get_cur(V_ipq_zone) > target) { + struct ipq *fp; + + for (int i = 0; i < IPREASS_NHASH; i++) { + IPQ_LOCK(i); + fp = TAILQ_LAST(&V_ipq[i].head, ipqhead); + if (fp != NULL) + ipq_timeout(&V_ipq[i].head, fp); + IPQ_UNLOCK(i); + } } } @@ -836,70 +843,86 @@ static void ipq_zone_change(void *tag) { - if (V_maxnipq > 0 && V_maxnipq < (nmbclusters / 32)) { - V_maxnipq = nmbclusters / 32; - maxnipq_update(); - } + uma_zone_set_max(V_ipq_zone, nmbclusters / 32); + ipq_drain_tomax(); } +/* + * Change the limit on the UMA zone, or disable the fragment allocation + * at all. Since 0 and -1 is a special values here, we need our own handler, + * instead of sysctl_handle_uma_zone_max(). + */ static int -sysctl_maxnipq(SYSCTL_HANDLER_ARGS) +sysctl_maxfragpackets(SYSCTL_HANDLER_ARGS) { - int error, i; + int error, max; - i = V_maxnipq; - error = sysctl_handle_int(oidp, &i, 0, req); + if (V_noreass == 0) { + max = uma_zone_get_max(V_ipq_zone); + if (max == 0) + max = -1; + } else + max = 0; + error = sysctl_handle_int(oidp, &max, 0, req); if (error || !req->newptr) return (error); - - /* - * XXXRW: Might be a good idea to sanity check the argument and place - * an extreme upper bound. - */ - if (i < -1) + if (max > 0) { + /* + * XXXRW: Might be a good idea to sanity check the argument + * and place an extreme upper bound. + */ + max = uma_zone_set_max(V_ipq_zone, max); + ipq_drain_tomax(); + V_noreass = 0; + } else if (max == 0) { + V_noreass = 1; + ip_drain_vnet(); + } else if (max == -1) { + V_noreass = 0; + uma_zone_set_max(V_ipq_zone, 0); + } else return (EINVAL); - V_maxnipq = i; - maxnipq_update(); return (0); } -SYSCTL_PROC(_net_inet_ip, OID_AUTO, maxfragpackets, CTLTYPE_INT|CTLFLAG_RW, - NULL, 0, sysctl_maxnipq, "I", - "Maximum number of IPv4 fragment reassembly queue entries"); - #define M_IP_FRAG M_PROTO9 /* - * Attempt to purge something from the reassembly queue to make - * room. - * - * Must be called without any IPQ locks held, as it will attempt - * to lock each in turn. - * - * 'skip_bucket' is the bucket with which to skip over, or -1 to - * not skip over anything. - * - * Returns the bucket being freed, or -1 for no action. + * Seek for old fragment queue header that can be reused. Try to + * reuse a header from currently locked hash bucket. */ -static int -ip_reass_purge_element(int skip_bucket) +static struct ipq * +ipq_reuse(int start) { + struct ipq *fp; int i; - struct ipq *r; - for (i = 0; i < IPREASS_NHASH; i++) { - if (skip_bucket > -1 && i == skip_bucket) + IPQ_LOCK_ASSERT(start); + + for (i = start;; i++) { + if (i == IPREASS_NHASH) + i = 0; + if (i != start && IPQ_TRYLOCK(i) == 0) continue; - IPQ_LOCK(i); - r = TAILQ_LAST(&V_ipq[i].head, ipqhead); - if (r) { - ipq_timeout(&V_ipq[i].head, r); - IPQ_UNLOCK(i); - return (i); + fp = TAILQ_LAST(&V_ipq[i].head, ipqhead); + if (fp) { + struct mbuf *m; + + IPSTAT_ADD(ips_fragtimeout, fp->ipq_nfrags); + while (fp->ipq_frags) { + m = fp->ipq_frags; + fp->ipq_frags = m->m_nextpkt; + m_freem(m); + } + TAILQ_REMOVE(&V_ipq[i].head, fp, ipq_list); + if (i != start) + IPQ_UNLOCK(i); + IPQ_LOCK_ASSERT(start); + return (fp); } - IPQ_UNLOCK(i); + if (i != start) + IPQ_UNLOCK(i); } - return (-1); } /* @@ -917,7 +940,7 @@ ip_reass(struct mbuf *m) { struct ip *ip; struct mbuf *p, *q, *nq, *t; - struct ipq *fp = NULL; + struct ipq *fp; struct ipqhead *head; int i, hlen, next; u_int8_t ecn, ecn0; @@ -925,10 +948,12 @@ ip_reass(struct mbuf *m) #ifdef RSS uint32_t rss_hash, rss_type; #endif - int do_purge = 0; - /* If maxnipq or maxfragsperpacket are 0, never accept fragments. */ - if (V_maxnipq == 0 || V_maxfragsperpacket == 0) { + /* + * If no reassembling or maxfragsperpacket are 0, + * never accept fragments. + */ + if (V_noreass == 1 || V_maxfragsperpacket == 0) { IPSTAT_INC(ips_fragments); IPSTAT_INC(ips_fragdropped); m_freem(m); @@ -989,38 +1014,14 @@ ip_reass(struct mbuf *m) mac_ipq_match(m, fp) && #endif ip->ip_p == fp->ipq_p) - goto found; - - fp = NULL; - - /* - * Attempt to trim the number of allocated fragment queues if it - * exceeds the administrative limit. - */ - if ((V_nipq > V_maxnipq) && (V_maxnipq > 0)) { - /* - * drop something from the tail of the current queue - * before proceeding further - */ - struct ipq *q = TAILQ_LAST(head, ipqhead); - if (q == NULL) { /* gak */ - /* - * Defer doing this until later; when the - * lock is no longer held. - */ - do_purge = 1; - } else - ipq_timeout(head, q); - } - -found: + break; /* * If first fragment to arrive, create a reassembly queue. */ if (fp == NULL) { fp = uma_zalloc(V_ipq_zone, M_NOWAIT); if (fp == NULL) - goto dropfrag; + fp = ipq_reuse(hash); #ifdef MAC if (mac_ipq_init(fp, M_NOWAIT) != 0) { uma_zfree(V_ipq_zone, fp); @@ -1030,7 +1031,6 @@ found: mac_ipq_create(m, fp); #endif TAILQ_INSERT_HEAD(head, fp, ipq_list); - V_nipq++; fp->ipq_nfrags = 1; fp->ipq_ttl = IPFRAGTTL; fp->ipq_p = ip->ip_p; @@ -1196,7 +1196,6 @@ found: ip->ip_src = fp->ipq_src; ip->ip_dst = fp->ipq_dst; TAILQ_REMOVE(head, fp, ipq_list); - V_nipq--; uma_zfree(V_ipq_zone, fp); m->m_len += (ip->ip_hl << 2); m->m_data -= (ip->ip_hl << 2); @@ -1206,19 +1205,6 @@ found: IPSTAT_INC(ips_reassembled); IPQ_UNLOCK(hash); - /* - * Do the delayed purge to keep fragment counts under - * the configured maximum. - * - * This is delayed so that it's not done with another IPQ bucket - * lock held. - * - * Note that we pass in the bucket to /skip/ over, not - * the bucket to /purge/. - */ - if (do_purge) - ip_reass_purge_element(hash); - #ifdef RSS /* * Query the RSS layer for the flowid / flowtype for the @@ -1281,7 +1267,6 @@ ipq_free(struct ipqhead *fhp, struct ipq } TAILQ_REMOVE(fhp, fp, ipq_list); uma_zfree(V_ipq_zone, fp); - V_nipq--; } /* @@ -1306,21 +1291,6 @@ ip_slowtimo(void) ipq_timeout(&V_ipq[i].head, fp); IPQ_UNLOCK(i); } - /* - * If we are over the maximum number of fragments - * (due to the limit being lowered), drain off - * enough to get down to the new limit. - */ - if (V_maxnipq >= 0 && V_nipq > V_maxnipq) { - for (i = 0; i < IPREASS_NHASH; i++) { - IPQ_LOCK(i); - while (V_nipq > V_maxnipq && - !TAILQ_EMPTY(&V_ipq[i].head)) - ipq_drop(&V_ipq[i].head, - TAILQ_FIRST(&V_ipq[i].head)); - IPQ_UNLOCK(i); - } - } CURVNET_RESTORE(); } VNET_LIST_RUNLOCK_NOSLEEP(); From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 22:16:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6289C960; Thu, 9 Apr 2015 22:16:36 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D74D25F3; Thu, 9 Apr 2015 22:16:35 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t39MGWlu096858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Apr 2015 01:16:32 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t39MGWvS096857; Fri, 10 Apr 2015 01:16:32 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Apr 2015 01:16:32 +0300 From: Gleb Smirnoff To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150409221632.GB96636@FreeBSD.org> References: <201504060132.t361WRVe090234@svn.freebsd.org> <20150406065619.GH74532@zxy.spb.ru> <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409220442.GQ8220@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 22:16:36 -0000 On Fri, Apr 10, 2015 at 01:04:42AM +0300, Slawa Olhovchenkov wrote: S> I am talk not about using or not using utf-8. S> I am talk about unconditionaly forcing switch from non-utf8 to utf-8 S> locale (FreeBSD-11 can be get not only be fresh install but and by S> freebsd-update/source update on the live systems, with bunch files S> witch content in koi8 and named in koi8). If content and names in KOI8 in existing installation block migration to UTF-8, how would you suggest to perform migration to UTF-8? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 22:16:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B05B961; Thu, 9 Apr 2015 22:16:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CF625F4; Thu, 9 Apr 2015 22:16:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t39MGarS064040; Thu, 9 Apr 2015 22:16:36 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39MGaS4064039; Thu, 9 Apr 2015 22:16:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504092216.t39MGaS4064039@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 9 Apr 2015 22:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281343 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 22:16:36 -0000 Author: bdrewery Date: Thu Apr 9 22:16:35 2015 New Revision: 281343 URL: https://svnweb.freebsd.org/changeset/base/281343 Log: - Fix support with new elftoolchain readelf(1) - Fix not finding global symbols by checking for D and R. - Follow symlinks - Show which matching symbol was used to consider the library needed. Discussed with: bapt Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Thu Apr 9 22:13:27 2015 (r281342) +++ head/tools/build/check-links.sh Thu Apr 9 22:16:35 2015 (r281343) @@ -1,7 +1,7 @@ #!/bin/sh # $FreeBSD$ -mime=$(file --mime-type $1) +mime=$(file -L --mime-type $1) case $mime in *application/x-executable);; *application/x-sharedlib);; @@ -10,16 +10,17 @@ esac # Check for useful libs list_libs="" -for lib in $(readelf -d $1 | awk '$2 == "(NEEDED)" { sub(/\[/,"",$NF); sub(/\]/,"",$NF); print $NF }'); do +for lib in $(readelf -d $1 | awk '$2 ~ /\(?NEEDED\)?/ { sub(/\[/,"",$NF); sub(/\]/,"",$NF); print $NF }'); do echo -n "checking if $lib is needed: " libpath=$(ldd $1 | awk -v lib=$lib '$1 == lib { print $3 }') list_libs="$list_libs $libpath" foundone=0 - for fct in $(nm -D $libpath | awk '$2 == "T" || $2 == "W" || $2 == "B" { print $3 }'); do + for fct in $(nm -D $libpath | awk '$2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B" { print $3 }'); do nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && foundone=1 && break done if [ $foundone -eq 1 ]; then - echo "yes" + echo -n "yes... " + nm -D $1 | awk -v s=$fct '$1 == "U" && $2 == s { print $2 ; exit }' else echo "no" fi @@ -28,10 +29,9 @@ done for sym in $(nm -D $1 | awk '$1 == "U" { print $2 }'); do found=0 for l in ${list_libs} ; do - nm -D $l | awk -v s=$sym '($2 == "T" || $2 == "W" || $2 == "B") && $3 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && found=1 && break + nm -D $l | awk -v s=$sym '($2 == "R" || $2 == "D" || $2 == "T" || $2 == "W" || $2 == "B") && $3 == s { found=1 ; exit } END { if (found != 1) { exit 1 } }' && found=1 && break done if [ $found -eq 0 ]; then echo "Unresolved symbol $sym" fi done - From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 22:25:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB97BE10; Thu, 9 Apr 2015 22:25:59 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CFA975D; Thu, 9 Apr 2015 22:25:59 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgKtZ-000EUJ-67; Fri, 10 Apr 2015 01:25:57 +0300 Date: Fri, 10 Apr 2015 01:25:57 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150409222557.GR8220@zxy.spb.ru> References: <20150406065619.GH74532@zxy.spb.ru> <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409221632.GB96636@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409221632.GB96636@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 22:26:00 -0000 On Fri, Apr 10, 2015 at 01:16:32AM +0300, Gleb Smirnoff wrote: > On Fri, Apr 10, 2015 at 01:04:42AM +0300, Slawa Olhovchenkov wrote: > S> I am talk not about using or not using utf-8. > S> I am talk about unconditionaly forcing switch from non-utf8 to utf-8 > S> locale (FreeBSD-11 can be get not only be fresh install but and by > S> freebsd-update/source update on the live systems, with bunch files > S> witch content in koi8 and named in koi8). > > If content and names in KOI8 in existing installation block migration > to UTF-8, how would you suggest to perform migration to UTF-8? Just create new login class, russian_utf8. Locale is process attribute, not system wide. When someone will be ready to migrate and converted content/names/configs -- he just change login class. If not need -- not changed. Of couse, system utiletes need to adopt. Need best utf support, need prevent data lost and etc. From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 22:28:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2ABB4F74; Thu, 9 Apr 2015 22:28:38 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9FCFE77D; Thu, 9 Apr 2015 22:28:36 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t39MSYFr096920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Apr 2015 01:28:34 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t39MSYCD096919; Fri, 10 Apr 2015 01:28:34 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Apr 2015 01:28:33 +0300 From: Gleb Smirnoff To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150409222833.GC96636@FreeBSD.org> References: <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409221632.GB96636@FreeBSD.org> <20150409222557.GR8220@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409222557.GR8220@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 22:28:38 -0000 On Fri, Apr 10, 2015 at 01:25:57AM +0300, Slawa Olhovchenkov wrote: S> On Fri, Apr 10, 2015 at 01:16:32AM +0300, Gleb Smirnoff wrote: S> S> > On Fri, Apr 10, 2015 at 01:04:42AM +0300, Slawa Olhovchenkov wrote: S> > S> I am talk not about using or not using utf-8. S> > S> I am talk about unconditionaly forcing switch from non-utf8 to utf-8 S> > S> locale (FreeBSD-11 can be get not only be fresh install but and by S> > S> freebsd-update/source update on the live systems, with bunch files S> > S> witch content in koi8 and named in koi8). S> > S> > If content and names in KOI8 in existing installation block migration S> > to UTF-8, how would you suggest to perform migration to UTF-8? S> S> Just create new login class, russian_utf8. S> Locale is process attribute, not system wide. S> When someone will be ready to migrate and converted S> content/names/configs -- he just change login class. S> If not need -- not changed. When is it going to be made default? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 22:37:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5B19238; Thu, 9 Apr 2015 22:37:07 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6787586A; Thu, 9 Apr 2015 22:37:07 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgL4J-000Ejr-Um; Fri, 10 Apr 2015 01:37:03 +0300 Date: Fri, 10 Apr 2015 01:37:03 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150409223703.GS8220@zxy.spb.ru> References: <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409221632.GB96636@FreeBSD.org> <20150409222557.GR8220@zxy.spb.ru> <20150409222833.GC96636@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409222833.GC96636@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 22:37:07 -0000 On Fri, Apr 10, 2015 at 01:28:33AM +0300, Gleb Smirnoff wrote: > On Fri, Apr 10, 2015 at 01:25:57AM +0300, Slawa Olhovchenkov wrote: > S> On Fri, Apr 10, 2015 at 01:16:32AM +0300, Gleb Smirnoff wrote: > S> > S> > On Fri, Apr 10, 2015 at 01:04:42AM +0300, Slawa Olhovchenkov wrote: > S> > S> I am talk not about using or not using utf-8. > S> > S> I am talk about unconditionaly forcing switch from non-utf8 to utf-8 > S> > S> locale (FreeBSD-11 can be get not only be fresh install but and by > S> > S> freebsd-update/source update on the live systems, with bunch files > S> > S> witch content in koi8 and named in koi8). > S> > > S> > If content and names in KOI8 in existing installation block migration > S> > to UTF-8, how would you suggest to perform migration to UTF-8? > S> > S> Just create new login class, russian_utf8. > S> Locale is process attribute, not system wide. > S> When someone will be ready to migrate and converted > S> content/names/configs -- he just change login class. > S> If not need -- not changed. > > When is it going to be made default? What about you talk? As I see current default -- no login class, locale "C". I don't see any scrip/tools (in base systems) for creating users and ack 'language/locale for user'. I don't like to remove koi8 locale from base systems (at least in 20 years) -- you can see discursion in -current about Win95 (created 20 yars ago). From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 22:47:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BC72432; Thu, 9 Apr 2015 22:47:20 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E968B940; Thu, 9 Apr 2015 22:47:19 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t39MlFLi096989 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Apr 2015 01:47:15 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t39MlFkT096988; Fri, 10 Apr 2015 01:47:15 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Apr 2015 01:47:14 +0300 From: Gleb Smirnoff To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150409224714.GD96636@FreeBSD.org> References: <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409221632.GB96636@FreeBSD.org> <20150409222557.GR8220@zxy.spb.ru> <20150409222833.GC96636@FreeBSD.org> <20150409223703.GS8220@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409223703.GS8220@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 22:47:20 -0000 On Fri, Apr 10, 2015 at 01:37:03AM +0300, Slawa Olhovchenkov wrote: S> On Fri, Apr 10, 2015 at 01:28:33AM +0300, Gleb Smirnoff wrote: S> S> > On Fri, Apr 10, 2015 at 01:25:57AM +0300, Slawa Olhovchenkov wrote: S> > S> On Fri, Apr 10, 2015 at 01:16:32AM +0300, Gleb Smirnoff wrote: S> > S> S> > S> > On Fri, Apr 10, 2015 at 01:04:42AM +0300, Slawa Olhovchenkov wrote: S> > S> > S> I am talk not about using or not using utf-8. S> > S> > S> I am talk about unconditionaly forcing switch from non-utf8 to utf-8 S> > S> > S> locale (FreeBSD-11 can be get not only be fresh install but and by S> > S> > S> freebsd-update/source update on the live systems, with bunch files S> > S> > S> witch content in koi8 and named in koi8). S> > S> > S> > S> > If content and names in KOI8 in existing installation block migration S> > S> > to UTF-8, how would you suggest to perform migration to UTF-8? S> > S> S> > S> Just create new login class, russian_utf8. S> > S> Locale is process attribute, not system wide. S> > S> When someone will be ready to migrate and converted S> > S> content/names/configs -- he just change login class. S> > S> If not need -- not changed. S> > S> > When is it going to be made default? S> S> What about you talk? About default locale for Russian users. When is going to be UTF-8 by default if you were planning the migration? S> As I see current default -- no login class, locale "C". No, the current default is UTF-8. The previous was KOI8-R. And this is the topic of our discussion, isn't it? S> I don't see any scrip/tools (in base systems) for creating users and S> ack 'language/locale for user'. I do see. adduser(8) asks explicitly, or you can specify it via -L argument. chpass(1) allows to modify it, if run as super-user. S> I don't like to remove koi8 locale from base systems (at least in 20 S> years) -- you can see discursion in -current about Win95 (created 20 S> yars ago). It isn't removed. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 23:01:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11982787; Thu, 9 Apr 2015 23:01:43 +0000 (UTC) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8468B40; Thu, 9 Apr 2015 23:01:42 +0000 (UTC) Received: by qkhg7 with SMTP id g7so3112125qkh.2; Thu, 09 Apr 2015 16:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XQ+pcWsqrcUvK+ZlQYuay64xzSBgr2GTKqaRFRQh/qA=; b=ffZ+rtE85GRRB7dLz84gT++Vn0q2qAsA3SH5GtBhq7hbDaZja3JyfTA0CZ7ZiftVgO lCeYFhPAg2LUrtBeo37p+j+UuDUJf0MJtMtBS4gsoPdr/d7aBIMBB8zT1ZC60DH65LRJ 2Mp6JgpdzK5fbbZtsNFGuA37VtrJpITeuyGR8OpnihpTJwuxlSh49RNbO/9kl9Pf+AB/ 2mYgvty9EBK9/OKhpcNBu/A1GJF73Bnu+o+HiZsg7tgACTJJ+23pqVt7s4wA5cnC9wCI w1T4qUXKeVhk0mShjTNN96LegyJBP6cFlz2Vre7+ZLeG9QMihpmZ6wGJ2nom2RTsJK7q NyYw== MIME-Version: 1.0 X-Received: by 10.140.234.2 with SMTP id f2mr3198549qhc.54.1428620501903; Thu, 09 Apr 2015 16:01:41 -0700 (PDT) Received: by 10.140.98.66 with HTTP; Thu, 9 Apr 2015 16:01:41 -0700 (PDT) In-Reply-To: <20150409224714.GD96636@FreeBSD.org> References: <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409221632.GB96636@FreeBSD.org> <20150409222557.GR8220@zxy.spb.ru> <20150409222833.GC96636@FreeBSD.org> <20150409223703.GS8220@zxy.spb.ru> <20150409224714.GD96636@FreeBSD.org> Date: Thu, 9 Apr 2015 16:01:41 -0700 Message-ID: Subject: Re: svn commit: r281129 - head/etc From: NGie Cooper To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Slawa Olhovchenkov X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 23:01:43 -0000 Seems like a couple things need to be done: 1. The change might (imply optional) need to be reverted to avoid violating POLA. 2. All of the applications with Unicode issues need bugs filed for them and need to be fixed. Documentation should be added in the Handbook or somewhere else to advise users of Unicode issues with applications. 3. If UTF-8 was turned off in 1., it should be turned back on once enough enough is fixed that basic functionality talks UTF-8 well. If nvi is a stopgap, providing an alternative might be "good enough" for folks to use UTF-8 profiles (vim for instance). From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 23:18:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 834A5DF6; Thu, 9 Apr 2015 23:18:45 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36011C8B; Thu, 9 Apr 2015 23:18:45 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgLib-000FOH-Bg; Fri, 10 Apr 2015 02:18:41 +0300 Date: Fri, 10 Apr 2015 02:18:41 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150409231841.GT8220@zxy.spb.ru> References: <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409221632.GB96636@FreeBSD.org> <20150409222557.GR8220@zxy.spb.ru> <20150409222833.GC96636@FreeBSD.org> <20150409223703.GS8220@zxy.spb.ru> <20150409224714.GD96636@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409224714.GD96636@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 23:18:45 -0000 On Fri, Apr 10, 2015 at 01:47:14AM +0300, Gleb Smirnoff wrote: > On Fri, Apr 10, 2015 at 01:37:03AM +0300, Slawa Olhovchenkov wrote: > S> On Fri, Apr 10, 2015 at 01:28:33AM +0300, Gleb Smirnoff wrote: > S> > S> > On Fri, Apr 10, 2015 at 01:25:57AM +0300, Slawa Olhovchenkov wrote: > S> > S> On Fri, Apr 10, 2015 at 01:16:32AM +0300, Gleb Smirnoff wrote: > S> > S> > S> > S> > On Fri, Apr 10, 2015 at 01:04:42AM +0300, Slawa Olhovchenkov wrote: > S> > S> > S> I am talk not about using or not using utf-8. > S> > S> > S> I am talk about unconditionaly forcing switch from non-utf8 to utf-8 > S> > S> > S> locale (FreeBSD-11 can be get not only be fresh install but and by > S> > S> > S> freebsd-update/source update on the live systems, with bunch files > S> > S> > S> witch content in koi8 and named in koi8). > S> > S> > > S> > S> > If content and names in KOI8 in existing installation block migration > S> > S> > to UTF-8, how would you suggest to perform migration to UTF-8? > S> > S> > S> > S> Just create new login class, russian_utf8. > S> > S> Locale is process attribute, not system wide. > S> > S> When someone will be ready to migrate and converted > S> > S> content/names/configs -- he just change login class. > S> > S> If not need -- not changed. > S> > > S> > When is it going to be made default? > S> > S> What about you talk? > > About default locale for Russian users. When is going to be UTF-8 > by default if you were planning the migration? Default? Where default? I don't see place in FreeBSD whith map somewere to locale. May be I miss somewere? > S> As I see current default -- no login class, locale "C". > > No, the current default is UTF-8. The previous was KOI8-R. And this > is the topic of our discussion, isn't it? No. I don't talk about defaults. If you talk about recomended (repeat, I don't see mechanism in base systems for maping country/language to login class/locale) locale (in handbook, for example) -- now, yesterday, tomorrow -- what you like. I talk about changing existing behavior. Not about default. About behavior. About backward comaptibility. For example: existing system, user witch login class 'russian'. Files named in koi8 and content in koi8. All work. Upgrade to 11.0 (source upgrade, mergemaster -I -U). Now files content inacessible (replaced russian chars by '?' or ), file names print as '??????'. I think this is not like. (I currently in migration from koi8 locale to utf8 on multiple systems. This is very complicated process. Unconditionaly forcing this -- bad idea). > S> I don't see any scrip/tools (in base systems) for creating users and > S> ack 'language/locale for user'. > > I do see. > > adduser(8) asks explicitly, or you can specify it via -L argument. > chpass(1) allows to modify it, if run as super-user. In this cases you input any arbitrary string. No defaults (other then 'default' login class), no mapinig 'somewhere' => login class. This is not changing /etc/adduser.conf or /etc/pw.conf. You can create some script, addon to bsdinstall, for example, analyse answer to keyboard mapping/screen map, ask about generate pw.conf/adduser.conf and create this files with defaultclass=russian_utf8. No protest. > S> I don't like to remove koi8 locale from base systems (at least in 20 > S> years) -- you can see discursion in -current about Win95 (created 20 > S> yars ago). > > It isn't removed. Nice. From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 23:27:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B825FD2; Thu, 9 Apr 2015 23:27:19 +0000 (UTC) Received: from vps.amdmi3.ru (vps.amdmi3.ru [109.234.38.216]) by mx1.freebsd.org (Postfix) with ESMTP id EDB52D69; Thu, 9 Apr 2015 23:27:18 +0000 (UTC) Received: from hive.panopticon (unknown [213.148.20.85]) by vps.amdmi3.ru (Postfix) with ESMTPS id 81BEDB0622; Fri, 10 Apr 2015 02:27:15 +0300 (MSK) Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 8BB56679; Fri, 10 Apr 2015 02:27:08 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 4390720CE; Fri, 10 Apr 2015 02:27:11 +0300 (MSK) Date: Fri, 10 Apr 2015 02:27:11 +0300 From: Dmitry Marakasov To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150409232711.GZ21982@hades.panopticon> References: <201504060132.t361WRVe090234@svn.freebsd.org> <20150406065619.GH74532@zxy.spb.ru> <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150409220442.GQ8220@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 23:27:19 -0000 * Slawa Olhovchenkov (slw@zxy.spb.ru) wrote: > I am talk not about using or not using utf-8. > I am talk about unconditionaly forcing switch from non-utf8 to utf-8 > locale (FreeBSD-11 can be get not only be fresh install but and by > freebsd-update/source update on the live systems, with bunch files > witch content in koi8 and named in koi8). We have to switch sometime, and I say now is a good time. There's high chance that default login class uses UTF-8 locale at some point (PC-BSD had that for couple of years already afaik), so the issue is not limited to russian or russian-utf8. System update is not a problem at all - major branch switch implies some attention, and converting file encodings or tuning default locale is just a little part of it. Since the latter is always an option, there's nothing to talk about here. I don't think the project can lag behind and stay on crippled legacy solutions forever just because someone does not want to update. > Also, some config files (from ports) have raw 8-bit characters inside. They'll have to be converted based on OSVERSION/option. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://amdmi3.ru From owner-svn-src-head@FreeBSD.ORG Thu Apr 9 23:40:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B187D21A; Thu, 9 Apr 2015 23:40:30 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 633F8E41; Thu, 9 Apr 2015 23:40:30 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgM3f-000Fja-2i; Fri, 10 Apr 2015 02:40:27 +0300 Date: Fri, 10 Apr 2015 02:40:27 +0300 From: Slawa Olhovchenkov To: Dmitry Marakasov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150409234026.GH1394@zxy.spb.ru> References: <20150406065619.GH74532@zxy.spb.ru> <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409232711.GZ21982@hades.panopticon> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 23:40:30 -0000 On Fri, Apr 10, 2015 at 02:27:11AM +0300, Dmitry Marakasov wrote: > * Slawa Olhovchenkov (slw@zxy.spb.ru) wrote: > > > I am talk not about using or not using utf-8. > > I am talk about unconditionaly forcing switch from non-utf8 to utf-8 > > locale (FreeBSD-11 can be get not only be fresh install but and by > > freebsd-update/source update on the live systems, with bunch files > > witch content in koi8 and named in koi8). > > We have to switch sometime, and I say now is a good time. There's > high chance that default login class uses UTF-8 locale at some point > (PC-BSD had that for couple of years already afaik), so the issue > is not limited to russian or russian-utf8. We don't have any default login class, other then 'dafault' and have locale 'C'. What about you talk? > System update is not a problem at all - major branch switch implies > some attention, and converting file encodings or tuning default > locale is just a little part of it. Since the latter is always an > option, there's nothing to talk about here. Do you this converting? I am do it. > I don't think the project can lag behind and stay on crippled legacy > solutions forever just because someone does not want to update. What about you talk? Just create new login class, 'russian_utf8', and have fun. This is not windows. This is Unix. Locale is not system-wide. You can have multiple locales together. What problems? > > Also, some config files (from ports) have raw 8-bit characters inside. > > They'll have to be converted based on OSVERSION/option. You don't understund me. This charters don't have any encodings/locales. This is just octets. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 00:03:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B41F4573; Fri, 10 Apr 2015 00:03:04 +0000 (UTC) Received: from vps.amdmi3.ru (vps.amdmi3.ru [109.234.38.216]) by mx1.freebsd.org (Postfix) with ESMTP id 71C73121; Fri, 10 Apr 2015 00:03:04 +0000 (UTC) Received: from hive.panopticon (unknown [213.148.20.85]) by vps.amdmi3.ru (Postfix) with ESMTPS id 867AEB0623; Fri, 10 Apr 2015 03:03:03 +0300 (MSK) Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 9AE6D6F9; Fri, 10 Apr 2015 03:02:56 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 58BC020FC; Fri, 10 Apr 2015 03:02:59 +0300 (MSK) Date: Fri, 10 Apr 2015 03:02:59 +0300 From: Dmitry Marakasov To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410000259.GA21982@hades.panopticon> References: <6A81B952-BA41-4FF2-9215-D7E69EB8C6FE@gmail.com> <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150409234026.GH1394@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 00:03:04 -0000 * Slawa Olhovchenkov (slw@zxy.spb.ru) wrote: > We don't have any default login class, other then 'dafault' and have > locale 'C'. What about you talk? I'm talking about having utf-8 locale in 'default' login class. > Do you this converting? I am do it. Didn't quite catch that. > What about you talk? > Just create new login class, 'russian_utf8', and have fun. > This is not windows. This is Unix. > Locale is not system-wide. > You can have multiple locales together. > What problems? No problems, you can still use any locale you want. You are free to stay on KOI-8 and not do any charset conversion at all. > > > Also, some config files (from ports) have raw 8-bit characters inside. > > > > They'll have to be converted based on OSVERSION/option. > > You don't understund me. > This charters don't have any encodings/locales. > This is just octets. You're talking of config files which are not utf-8. I say they will be converted to utf-8 if that's needed. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://amdmi3.ru From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 04:15:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1780128B; Fri, 10 Apr 2015 04:15:15 +0000 (UTC) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5872EFF; Fri, 10 Apr 2015 04:15:14 +0000 (UTC) Received: by paboj16 with SMTP id oj16so9374820pab.0; Thu, 09 Apr 2015 21:15:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=NjTq0qfT1WHkiyx8B4CQlRrzEkyEG2QjVeH1HimKdEQ=; b=P4cze7arKuPuv6FoDJQVZxNnl05waa573Ar1Fl5eKj2VnGZXeaQ11k4zKbGpN40o/Z aYk+Dq8nKjfPY9kp1EIJ9H2sF49vxj9GgpVhehT50Khva1uvi2CPV5Pdh85F0aTsNQsx UT9Otxey+Il3ofbDdC14JFlypz1lYS9cPtrspeGDZtf2AWiyfT0xO+Ea0fzV6a9fxXNs ztBV/AuuYaHNHrt+z5XgvJwTdKTWmqESbEUffRWba3BVnCpIUv4ejD1gaF6aNmSFe+iX gaJUkTRQdfeucQBhNdujDrOKueznH48G0Rb0ILKPrcF1Lou/RrIQR9A2/q4/Vlyu6zrx 4VhQ== X-Received: by 10.70.128.36 with SMTP id nl4mr52113750pdb.43.1428639314211; Thu, 09 Apr 2015 21:15:14 -0700 (PDT) Received: from raichu ([104.232.114.184]) by mx.google.com with ESMTPSA id z4sm584269pdo.84.2015.04.09.21.15.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Apr 2015 21:15:12 -0700 (PDT) Sender: Mark Johnston Date: Thu, 9 Apr 2015 21:15:07 -0700 From: Mark Johnston To: Randall Stewart Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys Message-ID: <20150410041507.GA12130@raichu> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503281250.t2SCoOkt020297@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 04:15:15 -0000 On Sat, Mar 28, 2015 at 12:50:24PM +0000, Randall Stewart wrote: > Author: rrs > Date: Sat Mar 28 12:50:24 2015 > New Revision: 280785 > URL: https://svnweb.freebsd.org/changeset/base/280785 > > Log: > Change the callout to supply -1 to indicate we are not changing > CPU, also add protection against invalid CPU's as well as > split c_flags and c_iflags so that if a user plays with the active > flag (the one expected to be played with by callers in MPSAFE) without > a lock, it won't adversely affect the callout system by causing a corrupt > list. This also means that all callers need to use the macros and *not* > play with the falgs directly (like netgraph used to). > > Differential Revision: htts://reviews.freebsd.org/D1894 > Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky > tested by hiren and netflix. > Sponsored by: Netflix Inc. > > Modified: > head/sys/kern/kern_timeout.c > head/sys/netgraph/atm/sscop/ng_sscop_cust.h > head/sys/netgraph/atm/uni/ng_uni_cust.h > head/sys/sys/_callout.h > head/sys/sys/callout.h > > Modified: head/sys/kern/kern_timeout.c > ============================================================================== > --- head/sys/kern/kern_timeout.c Sat Mar 28 12:23:15 2015 (r280784) > +++ head/sys/kern/kern_timeout.c Sat Mar 28 12:50:24 2015 (r280785) > [...] > /* > * This flag used to be added by callout_cc_add, but the > * first time you call this we could end up with the > * wrong direct flag if we don't do it before we add. > */ > if (flags & C_DIRECT_EXEC) { > - c->c_flags |= CALLOUT_DIRECT; > + direct = 1; > + } else { > + direct = 0; > } > [...] Hello, With this change, C_DIRECT_EXEC appears to have stopped working. In particular, I don't see any way for the CALLOUT_DIRECT flag to be set anymore. Re-adding the deleted line above with s/c_flags/c_iflags/ fixes the problem for me, but I have not tested it extensively. -Mark From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 06:02:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D81F827B; Fri, 10 Apr 2015 06:02:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C23F4BED; Fri, 10 Apr 2015 06:02:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A62dnl086015; Fri, 10 Apr 2015 06:02:39 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A62cBm086010; Fri, 10 Apr 2015 06:02:38 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504100602.t3A62cBm086010@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 10 Apr 2015 06:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281351 - in head/sys: conf netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 06:02:40 -0000 Author: glebius Date: Fri Apr 10 06:02:37 2015 New Revision: 281351 URL: https://svnweb.freebsd.org/changeset/base/281351 Log: Move all code related to IP fragment reassembly to ip_reass.c. Some function names have changed and comments are reformatted or added, but there is no functional change. Claim copyright for me and Adrian. Sponsored by: Nginx, Inc. Added: head/sys/netinet/ip_reass.c - copied, changed from r281343, head/sys/netinet/ip_input.c Modified: head/sys/conf/files head/sys/netinet/in_var.h head/sys/netinet/ip_input.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Apr 10 02:23:44 2015 (r281350) +++ head/sys/conf/files Fri Apr 10 06:02:37 2015 (r281351) @@ -3485,6 +3485,7 @@ netinet/ip_ipsec.c optional inet ipsec netinet/ip_mroute.c optional mrouting inet netinet/ip_options.c optional inet netinet/ip_output.c optional inet +netinet/ip_reass.c optional inet netinet/raw_ip.c optional inet | inet6 netinet/cc/cc.c optional inet | inet6 netinet/cc/cc_newreno.c optional inet | inet6 Modified: head/sys/netinet/in_var.h ============================================================================== --- head/sys/netinet/in_var.h Fri Apr 10 02:23:44 2015 (r281350) +++ head/sys/netinet/in_var.h Fri Apr 10 06:02:37 2015 (r281351) @@ -176,15 +176,6 @@ do { \ } while (0) /* - * IP datagram reassembly. - */ -#define IPREASS_NHASH_LOG2 6 -#define IPREASS_NHASH (1 << IPREASS_NHASH_LOG2) -#define IPREASS_HMASK (IPREASS_NHASH - 1) -#define IPREASS_HASH(x,y) \ - (((((x) & 0xF) | ((((x) >> 8) & 0xF) << 4)) ^ (y)) & IPREASS_HMASK) - -/* * Legacy IPv4 IGMP per-link structure. */ struct router_info { Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Fri Apr 10 02:23:44 2015 (r281350) +++ head/sys/netinet/ip_input.c Fri Apr 10 06:02:37 2015 (r281351) @@ -89,6 +89,14 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct ip) == 20); #endif +/* IP reassembly functions are defined in ip_reass.c. */ +extern void ipreass_init(); +extern void ipreass_drain(); +extern void ipreass_slowtimo(); +#ifdef VIMAGE +extern void ipreass_destroy(); +#endif + struct rwlock in_ifaddr_lock; RW_SYSINIT(in_ifaddr_lock, &in_ifaddr_lock, "in_ifaddr_lock"); @@ -164,57 +172,6 @@ VNET_DEFINE(struct in_ifaddrhead, in_ifa VNET_DEFINE(struct in_ifaddrhashhead *, in_ifaddrhashtbl); /* inet addr hash table */ VNET_DEFINE(u_long, in_ifaddrhmask); /* mask for hash table */ -static VNET_DEFINE(uma_zone_t, ipq_zone); -#define V_ipq_zone VNET(ipq_zone) -struct ipqbucket { - TAILQ_HEAD(ipqhead, ipq) head; - struct mtx lock; -}; -static VNET_DEFINE(struct ipqbucket, ipq[IPREASS_NHASH]); -#define V_ipq VNET(ipq) -static VNET_DEFINE(int, noreass); -#define V_noreass VNET(noreass) - -#define IPQ_LOCK(i) mtx_lock(&V_ipq[i].lock) -#define IPQ_TRYLOCK(i) mtx_trylock(&V_ipq[i].lock) -#define IPQ_UNLOCK(i) mtx_unlock(&V_ipq[i].lock) -#define IPQ_LOCK_ASSERT(i) mtx_assert(&V_ipq[i].lock, MA_OWNED) - -static int sysctl_maxfragpackets(SYSCTL_HANDLER_ARGS); -static void ipq_zone_change(void *); -static void ip_drain_vnet(void); -static void ipq_drain_tomax(void); -static void ipq_free(struct ipqhead *, struct ipq *); - -static inline void -ipq_timeout(struct ipqhead *head, struct ipq *fp) -{ - - IPSTAT_ADD(ips_fragtimeout, fp->ipq_nfrags); - ipq_free(head, fp); -} - -static inline void -ipq_drop(struct ipqhead *head, struct ipq *fp) -{ - - IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); - ipq_free(head, fp); -} - -SYSCTL_PROC(_net_inet_ip, OID_AUTO, maxfragpackets, CTLFLAG_VNET | - CTLTYPE_INT | CTLFLAG_RW, NULL, 0, sysctl_maxfragpackets, "I", - "Maximum number of IPv4 fragment reassembly queue entries"); -SYSCTL_UMA_CUR(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_VNET, - &VNET_NAME(ipq_zone), - "Current number of IPv4 fragment reassembly queue entries"); - -static VNET_DEFINE(int, maxfragsperpacket); -#define V_maxfragsperpacket VNET(maxfragsperpacket) -SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfragsperpacket, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(maxfragsperpacket), 0, - "Maximum number of IPv4 fragments allowed per packet"); - #ifdef IPCTL_DEFMTU SYSCTL_INT(_net_inet_ip, IPCTL_DEFMTU, mtu, CTLFLAG_RW, &ip_mtu, 0, "Default MTU"); @@ -349,15 +306,7 @@ ip_init(void) V_in_ifaddrhashtbl = hashinit(INADDR_NHASH, M_IFADDR, &V_in_ifaddrhmask); /* Initialize IP reassembly queue. */ - for (i = 0; i < IPREASS_NHASH; i++) { - TAILQ_INIT(&V_ipq[i].head); - mtx_init(&V_ipq[i].lock, "IP reassembly", NULL, - MTX_DEF | MTX_DUPOK); - } - V_maxfragsperpacket = 16; - V_ipq_zone = uma_zcreate("ipq", sizeof(struct ipq), NULL, NULL, NULL, - NULL, UMA_ALIGN_PTR, 0); - uma_zone_set_max(V_ipq_zone, nmbclusters / 32); + ipreass_init(); /* Initialize packet filter hooks. */ V_inet_pfil_hook.ph_type = PFIL_TYPE_AF; @@ -390,9 +339,6 @@ ip_init(void) ip_protox[pr->pr_protocol] = pr - inetsw; } - EVENTHANDLER_REGISTER(nmbclusters_change, ipq_zone_change, - NULL, EVENTHANDLER_PRI_ANY); - netisr_register(&ip_nh); #ifdef RSS netisr_register(&ip_direct_nh); @@ -413,10 +359,7 @@ ip_destroy(void) hashdestroy(V_in_ifaddrhashtbl, M_IFADDR, V_in_ifaddrhmask); /* Destroy IP reassembly queue. */ - ip_drain_vnet(); - uma_zdestroy(V_ipq_zone); - for (i = 0; i < IPREASS_NHASH; i++) - mtx_destroy(&V_ipq[i].lock); + ipreass_destroy(); } #endif @@ -810,466 +753,6 @@ bad: } /* - * After maxnipq has been updated, propagate the change to UMA. The UMA zone - * max has slightly different semantics than the sysctl, for historical - * reasons. - */ -static void -ipq_drain_tomax(void) -{ - int target; - - /* - * If we are over the maximum number of fragments, - * drain off enough to get down to the new limit, - * stripping off last elements on queues. Every - * run we strip the oldest element from each bucket. - */ - target = uma_zone_get_max(V_ipq_zone); - while (uma_zone_get_cur(V_ipq_zone) > target) { - struct ipq *fp; - - for (int i = 0; i < IPREASS_NHASH; i++) { - IPQ_LOCK(i); - fp = TAILQ_LAST(&V_ipq[i].head, ipqhead); - if (fp != NULL) - ipq_timeout(&V_ipq[i].head, fp); - IPQ_UNLOCK(i); - } - } -} - -static void -ipq_zone_change(void *tag) -{ - - uma_zone_set_max(V_ipq_zone, nmbclusters / 32); - ipq_drain_tomax(); -} - -/* - * Change the limit on the UMA zone, or disable the fragment allocation - * at all. Since 0 and -1 is a special values here, we need our own handler, - * instead of sysctl_handle_uma_zone_max(). - */ -static int -sysctl_maxfragpackets(SYSCTL_HANDLER_ARGS) -{ - int error, max; - - if (V_noreass == 0) { - max = uma_zone_get_max(V_ipq_zone); - if (max == 0) - max = -1; - } else - max = 0; - error = sysctl_handle_int(oidp, &max, 0, req); - if (error || !req->newptr) - return (error); - if (max > 0) { - /* - * XXXRW: Might be a good idea to sanity check the argument - * and place an extreme upper bound. - */ - max = uma_zone_set_max(V_ipq_zone, max); - ipq_drain_tomax(); - V_noreass = 0; - } else if (max == 0) { - V_noreass = 1; - ip_drain_vnet(); - } else if (max == -1) { - V_noreass = 0; - uma_zone_set_max(V_ipq_zone, 0); - } else - return (EINVAL); - return (0); -} - -#define M_IP_FRAG M_PROTO9 - -/* - * Seek for old fragment queue header that can be reused. Try to - * reuse a header from currently locked hash bucket. - */ -static struct ipq * -ipq_reuse(int start) -{ - struct ipq *fp; - int i; - - IPQ_LOCK_ASSERT(start); - - for (i = start;; i++) { - if (i == IPREASS_NHASH) - i = 0; - if (i != start && IPQ_TRYLOCK(i) == 0) - continue; - fp = TAILQ_LAST(&V_ipq[i].head, ipqhead); - if (fp) { - struct mbuf *m; - - IPSTAT_ADD(ips_fragtimeout, fp->ipq_nfrags); - while (fp->ipq_frags) { - m = fp->ipq_frags; - fp->ipq_frags = m->m_nextpkt; - m_freem(m); - } - TAILQ_REMOVE(&V_ipq[i].head, fp, ipq_list); - if (i != start) - IPQ_UNLOCK(i); - IPQ_LOCK_ASSERT(start); - return (fp); - } - if (i != start) - IPQ_UNLOCK(i); - } -} - -/* - * Take incoming datagram fragment and try to reassemble it into - * whole datagram. If the argument is the first fragment or one - * in between the function will return NULL and store the mbuf - * in the fragment chain. If the argument is the last fragment - * the packet will be reassembled and the pointer to the new - * mbuf returned for further processing. Only m_tags attached - * to the first packet/fragment are preserved. - * The IP header is *NOT* adjusted out of iplen. - */ -struct mbuf * -ip_reass(struct mbuf *m) -{ - struct ip *ip; - struct mbuf *p, *q, *nq, *t; - struct ipq *fp; - struct ipqhead *head; - int i, hlen, next; - u_int8_t ecn, ecn0; - u_short hash; -#ifdef RSS - uint32_t rss_hash, rss_type; -#endif - - /* - * If no reassembling or maxfragsperpacket are 0, - * never accept fragments. - */ - if (V_noreass == 1 || V_maxfragsperpacket == 0) { - IPSTAT_INC(ips_fragments); - IPSTAT_INC(ips_fragdropped); - m_freem(m); - return (NULL); - } - - ip = mtod(m, struct ip *); - hlen = ip->ip_hl << 2; - - /* - * Adjust ip_len to not reflect header, - * convert offset of this to bytes. - */ - ip->ip_len = htons(ntohs(ip->ip_len) - hlen); - if (ip->ip_off & htons(IP_MF)) { - /* - * Make sure that fragments have a data length - * that's a non-zero multiple of 8 bytes. - */ - if (ip->ip_len == htons(0) || (ntohs(ip->ip_len) & 0x7) != 0) { - IPSTAT_INC(ips_toosmall); /* XXX */ - IPSTAT_INC(ips_fragdropped); - m_freem(m); - return (NULL); - } - m->m_flags |= M_IP_FRAG; - } else - m->m_flags &= ~M_IP_FRAG; - ip->ip_off = htons(ntohs(ip->ip_off) << 3); - - /* - * Attempt reassembly; if it succeeds, proceed. - * ip_reass() will return a different mbuf. - */ - IPSTAT_INC(ips_fragments); - m->m_pkthdr.PH_loc.ptr = ip; - - /* - * Presence of header sizes in mbufs - * would confuse code below. - */ - m->m_data += hlen; - m->m_len -= hlen; - - hash = IPREASS_HASH(ip->ip_src.s_addr, ip->ip_id); - head = &V_ipq[hash].head; - IPQ_LOCK(hash); - - /* - * Look for queue of fragments - * of this datagram. - */ - TAILQ_FOREACH(fp, head, ipq_list) - if (ip->ip_id == fp->ipq_id && - ip->ip_src.s_addr == fp->ipq_src.s_addr && - ip->ip_dst.s_addr == fp->ipq_dst.s_addr && -#ifdef MAC - mac_ipq_match(m, fp) && -#endif - ip->ip_p == fp->ipq_p) - break; - /* - * If first fragment to arrive, create a reassembly queue. - */ - if (fp == NULL) { - fp = uma_zalloc(V_ipq_zone, M_NOWAIT); - if (fp == NULL) - fp = ipq_reuse(hash); -#ifdef MAC - if (mac_ipq_init(fp, M_NOWAIT) != 0) { - uma_zfree(V_ipq_zone, fp); - fp = NULL; - goto dropfrag; - } - mac_ipq_create(m, fp); -#endif - TAILQ_INSERT_HEAD(head, fp, ipq_list); - fp->ipq_nfrags = 1; - fp->ipq_ttl = IPFRAGTTL; - fp->ipq_p = ip->ip_p; - fp->ipq_id = ip->ip_id; - fp->ipq_src = ip->ip_src; - fp->ipq_dst = ip->ip_dst; - fp->ipq_frags = m; - m->m_nextpkt = NULL; - goto done; - } else { - fp->ipq_nfrags++; -#ifdef MAC - mac_ipq_update(m, fp); -#endif - } - -#define GETIP(m) ((struct ip*)((m)->m_pkthdr.PH_loc.ptr)) - - /* - * Handle ECN by comparing this segment with the first one; - * if CE is set, do not lose CE. - * drop if CE and not-ECT are mixed for the same packet. - */ - ecn = ip->ip_tos & IPTOS_ECN_MASK; - ecn0 = GETIP(fp->ipq_frags)->ip_tos & IPTOS_ECN_MASK; - if (ecn == IPTOS_ECN_CE) { - if (ecn0 == IPTOS_ECN_NOTECT) - goto dropfrag; - if (ecn0 != IPTOS_ECN_CE) - GETIP(fp->ipq_frags)->ip_tos |= IPTOS_ECN_CE; - } - if (ecn == IPTOS_ECN_NOTECT && ecn0 != IPTOS_ECN_NOTECT) - goto dropfrag; - - /* - * Find a segment which begins after this one does. - */ - for (p = NULL, q = fp->ipq_frags; q; p = q, q = q->m_nextpkt) - if (ntohs(GETIP(q)->ip_off) > ntohs(ip->ip_off)) - break; - - /* - * If there is a preceding segment, it may provide some of - * our data already. If so, drop the data from the incoming - * segment. If it provides all of our data, drop us, otherwise - * stick new segment in the proper place. - * - * If some of the data is dropped from the preceding - * segment, then it's checksum is invalidated. - */ - if (p) { - i = ntohs(GETIP(p)->ip_off) + ntohs(GETIP(p)->ip_len) - - ntohs(ip->ip_off); - if (i > 0) { - if (i >= ntohs(ip->ip_len)) - goto dropfrag; - m_adj(m, i); - m->m_pkthdr.csum_flags = 0; - ip->ip_off = htons(ntohs(ip->ip_off) + i); - ip->ip_len = htons(ntohs(ip->ip_len) - i); - } - m->m_nextpkt = p->m_nextpkt; - p->m_nextpkt = m; - } else { - m->m_nextpkt = fp->ipq_frags; - fp->ipq_frags = m; - } - - /* - * While we overlap succeeding segments trim them or, - * if they are completely covered, dequeue them. - */ - for (; q != NULL && ntohs(ip->ip_off) + ntohs(ip->ip_len) > - ntohs(GETIP(q)->ip_off); q = nq) { - i = (ntohs(ip->ip_off) + ntohs(ip->ip_len)) - - ntohs(GETIP(q)->ip_off); - if (i < ntohs(GETIP(q)->ip_len)) { - GETIP(q)->ip_len = htons(ntohs(GETIP(q)->ip_len) - i); - GETIP(q)->ip_off = htons(ntohs(GETIP(q)->ip_off) + i); - m_adj(q, i); - q->m_pkthdr.csum_flags = 0; - break; - } - nq = q->m_nextpkt; - m->m_nextpkt = nq; - IPSTAT_INC(ips_fragdropped); - fp->ipq_nfrags--; - m_freem(q); - } - - /* - * Check for complete reassembly and perform frag per packet - * limiting. - * - * Frag limiting is performed here so that the nth frag has - * a chance to complete the packet before we drop the packet. - * As a result, n+1 frags are actually allowed per packet, but - * only n will ever be stored. (n = maxfragsperpacket.) - * - */ - next = 0; - for (p = NULL, q = fp->ipq_frags; q; p = q, q = q->m_nextpkt) { - if (ntohs(GETIP(q)->ip_off) != next) { - if (fp->ipq_nfrags > V_maxfragsperpacket) - ipq_drop(head, fp); - goto done; - } - next += ntohs(GETIP(q)->ip_len); - } - /* Make sure the last packet didn't have the IP_MF flag */ - if (p->m_flags & M_IP_FRAG) { - if (fp->ipq_nfrags > V_maxfragsperpacket) - ipq_drop(head, fp); - goto done; - } - - /* - * Reassembly is complete. Make sure the packet is a sane size. - */ - q = fp->ipq_frags; - ip = GETIP(q); - if (next + (ip->ip_hl << 2) > IP_MAXPACKET) { - IPSTAT_INC(ips_toolong); - ipq_drop(head, fp); - goto done; - } - - /* - * Concatenate fragments. - */ - m = q; - t = m->m_next; - m->m_next = NULL; - m_cat(m, t); - nq = q->m_nextpkt; - q->m_nextpkt = NULL; - for (q = nq; q != NULL; q = nq) { - nq = q->m_nextpkt; - q->m_nextpkt = NULL; - m->m_pkthdr.csum_flags &= q->m_pkthdr.csum_flags; - m->m_pkthdr.csum_data += q->m_pkthdr.csum_data; - m_cat(m, q); - } - /* - * In order to do checksumming faster we do 'end-around carry' here - * (and not in for{} loop), though it implies we are not going to - * reassemble more than 64k fragments. - */ - while (m->m_pkthdr.csum_data & 0xffff0000) - m->m_pkthdr.csum_data = (m->m_pkthdr.csum_data & 0xffff) + - (m->m_pkthdr.csum_data >> 16); -#ifdef MAC - mac_ipq_reassemble(fp, m); - mac_ipq_destroy(fp); -#endif - - /* - * Create header for new ip packet by modifying header of first - * packet; dequeue and discard fragment reassembly header. - * Make header visible. - */ - ip->ip_len = htons((ip->ip_hl << 2) + next); - ip->ip_src = fp->ipq_src; - ip->ip_dst = fp->ipq_dst; - TAILQ_REMOVE(head, fp, ipq_list); - uma_zfree(V_ipq_zone, fp); - m->m_len += (ip->ip_hl << 2); - m->m_data -= (ip->ip_hl << 2); - /* some debugging cruft by sklower, below, will go away soon */ - if (m->m_flags & M_PKTHDR) /* XXX this should be done elsewhere */ - m_fixhdr(m); - IPSTAT_INC(ips_reassembled); - IPQ_UNLOCK(hash); - -#ifdef RSS - /* - * Query the RSS layer for the flowid / flowtype for the - * mbuf payload. - * - * For now, just assume we have to calculate a new one. - * Later on we should check to see if the assigned flowid matches - * what RSS wants for the given IP protocol and if so, just keep it. - * - * We then queue into the relevant netisr so it can be dispatched - * to the correct CPU. - * - * Note - this may return 1, which means the flowid in the mbuf - * is correct for the configured RSS hash types and can be used. - */ - if (rss_mbuf_software_hash_v4(m, 0, &rss_hash, &rss_type) == 0) { - m->m_pkthdr.flowid = rss_hash; - M_HASHTYPE_SET(m, rss_type); - } - - /* - * Queue/dispatch for reprocessing. - * - * Note: this is much slower than just handling the frame in the - * current receive context. It's likely worth investigating - * why this is. - */ - netisr_dispatch(NETISR_IP_DIRECT, m); - return (NULL); -#endif - - /* Handle in-line */ - return (m); - -dropfrag: - IPSTAT_INC(ips_fragdropped); - if (fp != NULL) - fp->ipq_nfrags--; - m_freem(m); -done: - IPQ_UNLOCK(hash); - return (NULL); - -#undef GETIP -} - -/* - * Free a fragment reassembly header and all - * associated datagrams. - */ -static void -ipq_free(struct ipqhead *fhp, struct ipq *fp) -{ - struct mbuf *q; - - while (fp->ipq_frags) { - q = fp->ipq_frags; - fp->ipq_frags = q->m_nextpkt; - m_freem(q); - } - TAILQ_REMOVE(fhp, fp, ipq_list); - uma_zfree(V_ipq_zone, fp); -} - -/* * IP timer processing; * if a timer expires on a reassembly * queue, discard it. @@ -1278,40 +761,16 @@ void ip_slowtimo(void) { VNET_ITERATOR_DECL(vnet_iter); - struct ipq *fp, *tmp; - int i; VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - for (i = 0; i < IPREASS_NHASH; i++) { - IPQ_LOCK(i); - TAILQ_FOREACH_SAFE(fp, &V_ipq[i].head, ipq_list, tmp) - if (--fp->ipq_ttl == 0) - ipq_timeout(&V_ipq[i].head, fp); - IPQ_UNLOCK(i); - } + ipreass_slowtimo(); CURVNET_RESTORE(); } VNET_LIST_RUNLOCK_NOSLEEP(); } -/* - * Drain off all datagram fragments. - */ -static void -ip_drain_vnet(void) -{ - int i; - - for (i = 0; i < IPREASS_NHASH; i++) { - IPQ_LOCK(i); - while(!TAILQ_EMPTY(&V_ipq[i].head)) - ipq_drop(&V_ipq[i].head, TAILQ_FIRST(&V_ipq[i].head)); - IPQ_UNLOCK(i); - } -} - void ip_drain(void) { @@ -1320,7 +779,7 @@ ip_drain(void) VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - ip_drain_vnet(); + ipreass_drain(); CURVNET_RESTORE(); } VNET_LIST_RUNLOCK_NOSLEEP(); Copied and modified: head/sys/netinet/ip_reass.c (from r281343, head/sys/netinet/ip_input.c) ============================================================================== --- head/sys/netinet/ip_input.c Thu Apr 9 22:16:35 2015 (r281343, copy source) +++ head/sys/netinet/ip_reass.c Fri Apr 10 06:02:37 2015 (r281351) @@ -1,4 +1,6 @@ /*- + * Copyright (c) 2015 Gleb Smirnoff + * Copyright (c) 2015 Adrian Chadd * Copyright (c) 1982, 1986, 1988, 1993 * The Regents of the University of California. All rights reserved. * @@ -32,159 +34,63 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_bootp.h" -#include "opt_ipfw.h" -#include "opt_ipstealth.h" -#include "opt_ipsec.h" -#include "opt_route.h" #include "opt_rss.h" #include #include +#include #include #include -#include -#include -#include -#include -#include #include -#include -#include -#include +#include #include -#include -#include -#include -#include -#include -#include -#include #include #include #include -#include -#include -#include #include -#include #include -#include -#include -#include -#include -#include -#ifdef IPSEC -#include -#endif /* IPSEC */ #include - -#include - +#ifdef MAC #include - -#ifdef CTASSERT -CTASSERT(sizeof(struct ip) == 20); #endif -struct rwlock in_ifaddr_lock; -RW_SYSINIT(in_ifaddr_lock, &in_ifaddr_lock, "in_ifaddr_lock"); - -VNET_DEFINE(int, rsvp_on); - -VNET_DEFINE(int, ipforwarding); -SYSCTL_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(ipforwarding), 0, - "Enable IP forwarding between interfaces"); - -static VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */ -#define V_ipsendredirects VNET(ipsendredirects) -SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(ipsendredirects), 0, - "Enable sending IP redirects"); - -/* - * XXX - Setting ip_checkinterface mostly implements the receive side of - * the Strong ES model described in RFC 1122, but since the routing table - * and transmit implementation do not implement the Strong ES model, - * setting this to 1 results in an odd hybrid. - * - * XXX - ip_checkinterface currently must be disabled if you use ipnat - * to translate the destination address to another local interface. - * - * XXX - ip_checkinterface must be disabled if you add IP aliases - * to the loopback interface instead of the interface where the - * packets for those addresses are received. - */ -static VNET_DEFINE(int, ip_checkinterface); -#define V_ip_checkinterface VNET(ip_checkinterface) -SYSCTL_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(ip_checkinterface), 0, - "Verify packet arrives on correct interface"); - -VNET_DEFINE(struct pfil_head, inet_pfil_hook); /* Packet filter hooks */ - -static struct netisr_handler ip_nh = { - .nh_name = "ip", - .nh_handler = ip_input, - .nh_proto = NETISR_IP, -#ifdef RSS - .nh_m2cpuid = rss_soft_m2cpuid, - .nh_policy = NETISR_POLICY_CPU, - .nh_dispatch = NETISR_DISPATCH_HYBRID, -#else - .nh_policy = NETISR_POLICY_FLOW, -#endif -}; +SYSCTL_DECL(_net_inet_ip); -#ifdef RSS /* - * Directly dispatched frames are currently assumed - * to have a flowid already calculated. - * - * It should likely have something that assert it - * actually has valid flow details. + * Reassembly headers are stored in hash buckets. */ -static struct netisr_handler ip_direct_nh = { - .nh_name = "ip_direct", - .nh_handler = ip_direct_input, - .nh_proto = NETISR_IP_DIRECT, - .nh_m2cpuid = rss_m2cpuid, - .nh_policy = NETISR_POLICY_CPU, - .nh_dispatch = NETISR_DISPATCH_HYBRID, -}; -#endif +#define IPREASS_NHASH_LOG2 6 +#define IPREASS_NHASH (1 << IPREASS_NHASH_LOG2) +#define IPREASS_HMASK (IPREASS_NHASH - 1) +#define IPREASS_HASH(x,y) \ + (((((x) & 0xF) | ((((x) >> 8) & 0xF) << 4)) ^ (y)) & IPREASS_HMASK) -extern struct domain inetdomain; -extern struct protosw inetsw[]; -u_char ip_protox[IPPROTO_MAX]; -VNET_DEFINE(struct in_ifaddrhead, in_ifaddrhead); /* first inet address */ -VNET_DEFINE(struct in_ifaddrhashhead *, in_ifaddrhashtbl); /* inet addr hash table */ -VNET_DEFINE(u_long, in_ifaddrhmask); /* mask for hash table */ - -static VNET_DEFINE(uma_zone_t, ipq_zone); -#define V_ipq_zone VNET(ipq_zone) struct ipqbucket { TAILQ_HEAD(ipqhead, ipq) head; struct mtx lock; }; + static VNET_DEFINE(struct ipqbucket, ipq[IPREASS_NHASH]); #define V_ipq VNET(ipq) -static VNET_DEFINE(int, noreass); -#define V_noreass VNET(noreass) #define IPQ_LOCK(i) mtx_lock(&V_ipq[i].lock) #define IPQ_TRYLOCK(i) mtx_trylock(&V_ipq[i].lock) #define IPQ_UNLOCK(i) mtx_unlock(&V_ipq[i].lock) #define IPQ_LOCK_ASSERT(i) mtx_assert(&V_ipq[i].lock, MA_OWNED) +void ipreass_init(void); +void ipreass_drain(void); +void ipreass_slowtimo(void); +#ifdef VIMAGE +void ipreass_destroy(void); +#endif static int sysctl_maxfragpackets(SYSCTL_HANDLER_ARGS); -static void ipq_zone_change(void *); -static void ip_drain_vnet(void); -static void ipq_drain_tomax(void); +static void ipreass_zone_change(void *); +static void ipreass_drain_tomax(void); static void ipq_free(struct ipqhead *, struct ipq *); +static struct ipq * ipq_reuse(int); static inline void ipq_timeout(struct ipqhead *head, struct ipq *fp) @@ -194,737 +100,32 @@ ipq_timeout(struct ipqhead *head, struct ipq_free(head, fp); } -static inline void -ipq_drop(struct ipqhead *head, struct ipq *fp) -{ - - IPSTAT_ADD(ips_fragdropped, fp->ipq_nfrags); - ipq_free(head, fp); -} - -SYSCTL_PROC(_net_inet_ip, OID_AUTO, maxfragpackets, CTLFLAG_VNET | - CTLTYPE_INT | CTLFLAG_RW, NULL, 0, sysctl_maxfragpackets, "I", - "Maximum number of IPv4 fragment reassembly queue entries"); -SYSCTL_UMA_CUR(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_VNET, - &VNET_NAME(ipq_zone), - "Current number of IPv4 fragment reassembly queue entries"); - -static VNET_DEFINE(int, maxfragsperpacket); -#define V_maxfragsperpacket VNET(maxfragsperpacket) -SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfragsperpacket, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(maxfragsperpacket), 0, - "Maximum number of IPv4 fragments allowed per packet"); - -#ifdef IPCTL_DEFMTU -SYSCTL_INT(_net_inet_ip, IPCTL_DEFMTU, mtu, CTLFLAG_RW, - &ip_mtu, 0, "Default MTU"); -#endif - -#ifdef IPSTEALTH -VNET_DEFINE(int, ipstealth); -SYSCTL_INT(_net_inet_ip, OID_AUTO, stealth, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(ipstealth), 0, - "IP stealth mode, no TTL decrementation on forwarding"); -#endif - -/* - * IP statistics are stored in the "array" of counter(9)s. - */ -VNET_PCPUSTAT_DEFINE(struct ipstat, ipstat); -VNET_PCPUSTAT_SYSINIT(ipstat); -SYSCTL_VNET_PCPUSTAT(_net_inet_ip, IPCTL_STATS, stats, struct ipstat, ipstat, - "IP statistics (struct ipstat, netinet/ip_var.h)"); - -#ifdef VIMAGE -VNET_PCPUSTAT_SYSUNINIT(ipstat); -#endif /* VIMAGE */ - -/* - * Kernel module interface for updating ipstat. The argument is an index - * into ipstat treated as an array. - */ -void -kmod_ipstat_inc(int statnum) -{ - - counter_u64_add(VNET(ipstat)[statnum], 1); -} - -void -kmod_ipstat_dec(int statnum) -{ - - counter_u64_add(VNET(ipstat)[statnum], -1); -} - -static int -sysctl_netinet_intr_queue_maxlen(SYSCTL_HANDLER_ARGS) -{ - int error, qlimit; - - netisr_getqlimit(&ip_nh, &qlimit); - error = sysctl_handle_int(oidp, &qlimit, 0, req); - if (error || !req->newptr) - return (error); - if (qlimit < 1) - return (EINVAL); - return (netisr_setqlimit(&ip_nh, qlimit)); -} -SYSCTL_PROC(_net_inet_ip, IPCTL_INTRQMAXLEN, intr_queue_maxlen, - CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_netinet_intr_queue_maxlen, "I", - "Maximum size of the IP input queue"); - -static int -sysctl_netinet_intr_queue_drops(SYSCTL_HANDLER_ARGS) -{ - u_int64_t qdrops_long; - int error, qdrops; - - netisr_getqdrops(&ip_nh, &qdrops_long); - qdrops = qdrops_long; - error = sysctl_handle_int(oidp, &qdrops, 0, req); - if (error || !req->newptr) - return (error); - if (qdrops != 0) - return (EINVAL); - netisr_clearqdrops(&ip_nh); - return (0); -} - -SYSCTL_PROC(_net_inet_ip, IPCTL_INTRQDROPS, intr_queue_drops, - CTLTYPE_INT|CTLFLAG_RD, 0, 0, sysctl_netinet_intr_queue_drops, "I", - "Number of packets dropped from the IP input queue"); - -#ifdef RSS -static int -sysctl_netinet_intr_direct_queue_maxlen(SYSCTL_HANDLER_ARGS) -{ - int error, qlimit; - - netisr_getqlimit(&ip_direct_nh, &qlimit); - error = sysctl_handle_int(oidp, &qlimit, 0, req); - if (error || !req->newptr) - return (error); - if (qlimit < 1) - return (EINVAL); - return (netisr_setqlimit(&ip_direct_nh, qlimit)); -} -SYSCTL_PROC(_net_inet_ip, IPCTL_INTRQMAXLEN, intr_direct_queue_maxlen, - CTLTYPE_INT|CTLFLAG_RW, 0, 0, sysctl_netinet_intr_direct_queue_maxlen, "I", - "Maximum size of the IP direct input queue"); - -static int -sysctl_netinet_intr_direct_queue_drops(SYSCTL_HANDLER_ARGS) -{ - u_int64_t qdrops_long; - int error, qdrops; - - netisr_getqdrops(&ip_direct_nh, &qdrops_long); - qdrops = qdrops_long; - error = sysctl_handle_int(oidp, &qdrops, 0, req); - if (error || !req->newptr) - return (error); - if (qdrops != 0) - return (EINVAL); - netisr_clearqdrops(&ip_direct_nh); - return (0); -} - -SYSCTL_PROC(_net_inet_ip, IPCTL_INTRQDROPS, intr_direct_queue_drops, - CTLTYPE_INT|CTLFLAG_RD, 0, 0, sysctl_netinet_intr_direct_queue_drops, "I", - "Number of packets dropped from the IP direct input queue"); -#endif /* RSS */ - -/* - * IP initialization: fill in IP protocol switch table. - * All protocols not implemented in kernel go to raw IP protocol handler. - */ -void -ip_init(void) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 06:55:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D95DDAF8; Fri, 10 Apr 2015 06:55:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA4FE132; Fri, 10 Apr 2015 06:55:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A6tiuD010183; Fri, 10 Apr 2015 06:55:44 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A6tioW010182; Fri, 10 Apr 2015 06:55:44 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504100655.t3A6tioW010182@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 10 Apr 2015 06:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281352 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 06:55:45 -0000 Author: glebius Date: Fri Apr 10 06:55:43 2015 New Revision: 281352 URL: https://svnweb.freebsd.org/changeset/base/281352 Log: o Use Jenkins hash. With previous hash, for a single source IP address and sequential IP ID case (e.g. ping -f), distribution fell into 8-10 buckets out of 64. With Jenkins hash, distribution is even. o Add random seed to the hash. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_reass.c Modified: head/sys/netinet/ip_reass.c ============================================================================== --- head/sys/netinet/ip_reass.c Fri Apr 10 06:02:37 2015 (r281351) +++ head/sys/netinet/ip_reass.c Fri Apr 10 06:55:43 2015 (r281352) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -64,8 +65,6 @@ SYSCTL_DECL(_net_inet_ip); #define IPREASS_NHASH_LOG2 6 #define IPREASS_NHASH (1 << IPREASS_NHASH_LOG2) #define IPREASS_HMASK (IPREASS_NHASH - 1) -#define IPREASS_HASH(x,y) \ - (((((x) & 0xF) | ((((x) >> 8) & 0xF) << 4)) ^ (y)) & IPREASS_HMASK) struct ipqbucket { TAILQ_HEAD(ipqhead, ipq) head; @@ -74,6 +73,8 @@ struct ipqbucket { static VNET_DEFINE(struct ipqbucket, ipq[IPREASS_NHASH]); #define V_ipq VNET(ipq) +static VNET_DEFINE(uint32_t, ipq_hashseed); +#define V_ipq_hashseed VNET(ipq_hashseed) #define IPQ_LOCK(i) mtx_lock(&V_ipq[i].lock) #define IPQ_TRYLOCK(i) mtx_trylock(&V_ipq[i].lock) @@ -146,7 +147,7 @@ ip_reass(struct mbuf *m) struct ipqhead *head; int i, hlen, next; u_int8_t ecn, ecn0; - u_short hash; + uint32_t hash; #ifdef RSS uint32_t rss_hash, rss_type; #endif @@ -200,7 +201,8 @@ ip_reass(struct mbuf *m) m->m_data += hlen; m->m_len -= hlen; - hash = IPREASS_HASH(ip->ip_src.s_addr, ip->ip_id); + hash = ip->ip_src.s_addr ^ ip->ip_id; + hash = jenkins_hash32(&hash, 1, V_ipq_hashseed) & IPREASS_HMASK; head = &V_ipq[hash].head; IPQ_LOCK(hash); @@ -465,6 +467,7 @@ ipreass_init(void) mtx_init(&V_ipq[i].lock, "IP reassembly", NULL, MTX_DEF | MTX_DUPOK); } + V_ipq_hashseed = arc4random(); V_maxfragsperpacket = 16; V_ipq_zone = uma_zcreate("ipq", sizeof(struct ipq), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 06:56:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A410C46; Fri, 10 Apr 2015 06:56:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 057D813E; Fri, 10 Apr 2015 06:56:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A6unXB010365; Fri, 10 Apr 2015 06:56:49 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A6ungc010363; Fri, 10 Apr 2015 06:56:49 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504100656.t3A6ungc010363@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 10 Apr 2015 06:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281353 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 06:56:50 -0000 Author: glebius Date: Fri Apr 10 06:56:49 2015 New Revision: 281353 URL: https://svnweb.freebsd.org/changeset/base/281353 Log: UMA zone limit can be lowered, so remove protection against from the sysctl_handle_uma_zone_max(). Sponsored by: Nginx, Inc. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Fri Apr 10 06:55:43 2015 (r281352) +++ head/sys/vm/uma_core.c Fri Apr 10 06:56:49 2015 (r281353) @@ -3540,16 +3540,13 @@ int sysctl_handle_uma_zone_max(SYSCTL_HANDLER_ARGS) { uma_zone_t zone = *(uma_zone_t *)arg1; - int error, max, old; + int error, max; - old = max = uma_zone_get_max(zone); + max = uma_zone_get_max(zone); error = sysctl_handle_int(oidp, &max, 0, req); if (error || !req->newptr) return (error); - if (max < old) - return (EINVAL); - uma_zone_set_max(zone, max); return (0); From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 07:08:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDA3AD9; Fri, 10 Apr 2015 07:08:49 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D830256; Fri, 10 Apr 2015 07:08:49 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgT3V-000NyQ-9p; Fri, 10 Apr 2015 10:08:45 +0300 Date: Fri, 10 Apr 2015 10:08:45 +0300 From: Slawa Olhovchenkov To: Dmitry Marakasov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410070845.GU8220@zxy.spb.ru> References: <20150406071640.GJ23643@zxy.spb.ru> <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410000259.GA21982@hades.panopticon> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 07:08:49 -0000 On Fri, Apr 10, 2015 at 03:02:59AM +0300, Dmitry Marakasov wrote: > * Slawa Olhovchenkov (slw@zxy.spb.ru) wrote: > > > We don't have any default login class, other then 'dafault' and have > > locale 'C'. What about you talk? > > I'm talking about having utf-8 locale in 'default' login class. At this moment many programs still not utf8 capable. Programs used in scripts -- too. `tr` for example. Swithcing 'default' login class to utf8 locale may break scripts, and custom scripts too. What benefits from switching to utf8 locale in 'default' login class? > > Do you this converting? I am do it. > > Didn't quite catch that. > > > What about you talk? > > Just create new login class, 'russian_utf8', and have fun. > > This is not windows. This is Unix. > > Locale is not system-wide. > > You can have multiple locales together. > > What problems? > > No problems, you can still use any locale you want. You are free > to stay on KOI-8 and not do any charset conversion at all. Best way for this -- adding new login class, not changed existing > > > > Also, some config files (from ports) have raw 8-bit characters inside. > > > > > > They'll have to be converted based on OSVERSION/option. > > > > You don't understund me. > > This charters don't have any encodings/locales. > > This is just octets. > > You're talking of config files which are not utf-8. I say they will be > converted to utf-8 if that's needed. ...and not utf-8 capable. Imposible convert it to utf8. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 07:12:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABB5A27C; Fri, 10 Apr 2015 07:12:53 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63AE834A; Fri, 10 Apr 2015 07:12:53 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgT7T-000O6c-Dh; Fri, 10 Apr 2015 10:12:51 +0300 Date: Fri, 10 Apr 2015 10:12:51 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281352 - head/sys/netinet Message-ID: <20150410071251.GI1394@zxy.spb.ru> References: <201504100655.t3A6tioW010182@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504100655.t3A6tioW010182@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 07:12:53 -0000 On Fri, Apr 10, 2015 at 06:55:44AM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Apr 10 06:55:43 2015 > New Revision: 281352 > URL: https://svnweb.freebsd.org/changeset/base/281352 > > Log: > o Use Jenkins hash. With previous hash, for a single source IP address and Why not meurmur32 hash? From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 07:31:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D47AB25; Fri, 10 Apr 2015 07:31:51 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BB815782; Fri, 10 Apr 2015 07:31:49 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t3A7VlEL099941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Apr 2015 10:31:47 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t3A7VlsX099940; Fri, 10 Apr 2015 10:31:47 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Apr 2015 10:31:47 +0300 From: Gleb Smirnoff To: Slawa Olhovchenkov Subject: Re: svn commit: r281352 - head/sys/netinet Message-ID: <20150410073147.GD99375@FreeBSD.org> References: <201504100655.t3A6tioW010182@svn.freebsd.org> <20150410071251.GI1394@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410071251.GI1394@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 07:31:51 -0000 On Fri, Apr 10, 2015 at 10:12:51AM +0300, Slawa Olhovchenkov wrote: S> On Fri, Apr 10, 2015 at 06:55:44AM +0000, Gleb Smirnoff wrote: S> S> > Author: glebius S> > Date: Fri Apr 10 06:55:43 2015 S> > New Revision: 281352 S> > URL: https://svnweb.freebsd.org/changeset/base/281352 S> > S> > Log: S> > o Use Jenkins hash. With previous hash, for a single source IP address and S> S> Why not meurmur32 hash? I didn't investigate it. I know that Jenkins is reliable, and testing confirmed. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 07:32:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90652D4E; Fri, 10 Apr 2015 07:32:38 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 13316791; Fri, 10 Apr 2015 07:32:37 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t3A7WUg1099966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Apr 2015 10:32:30 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t3A7WU4B099965; Fri, 10 Apr 2015 10:32:30 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Apr 2015 10:32:30 +0300 From: Gleb Smirnoff To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410073230.GE99375@FreeBSD.org> References: <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410070845.GU8220@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 07:32:38 -0000 On Fri, Apr 10, 2015 at 10:08:45AM +0300, Slawa Olhovchenkov wrote: S> What benefits from switching to utf8 locale in 'default' login class? Being on the same page as rest of the world? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 07:35:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 376E6FB8; Fri, 10 Apr 2015 07:35:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A3647BA; Fri, 10 Apr 2015 07:35:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A7Zs2I030048; Fri, 10 Apr 2015 07:35:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A7Zshi030044; Fri, 10 Apr 2015 07:35:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504100735.t3A7Zshi030044@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Apr 2015 07:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281354 - head/tools/regression/sockets/unix_passfd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 07:35:55 -0000 Author: ngie Date: Fri Apr 10 07:35:53 2015 New Revision: 281354 URL: https://svnweb.freebsd.org/changeset/base/281354 Log: Fix warnings, fix a typo in a testcase description, bump WARNS to 3 - Remove argc/argv (-Wunused) - Cast len in comparison to size_t (-Wsign-compare) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/unix_passfd/Makefile head/tools/regression/sockets/unix_passfd/unix_passfd.c Modified: head/tools/regression/sockets/unix_passfd/Makefile ============================================================================== --- head/tools/regression/sockets/unix_passfd/Makefile Fri Apr 10 06:56:49 2015 (r281353) +++ head/tools/regression/sockets/unix_passfd/Makefile Fri Apr 10 07:35:53 2015 (r281354) @@ -2,6 +2,6 @@ PROG= unix_passfd MAN= -WARNS?= 2 +WARNS?= 3 .include Modified: head/tools/regression/sockets/unix_passfd/unix_passfd.c ============================================================================== --- head/tools/regression/sockets/unix_passfd/unix_passfd.c Fri Apr 10 06:56:49 2015 (r281353) +++ head/tools/regression/sockets/unix_passfd/unix_passfd.c Fri Apr 10 07:35:53 2015 (r281354) @@ -139,7 +139,7 @@ sendfd_payload(const char *test, int soc len = sendmsg(sockfd, &msghdr, 0); if (len < 0) err(-1, "%s: sendmsg", test); - if (len != paylen) + if ((size_t)len != paylen) errx(-1, "%s: sendmsg: %zd bytes sent", test, len); } @@ -175,7 +175,7 @@ recvfd_payload(const char *test, int soc len = recvmsg(sockfd, &msghdr, 0); if (len < 0) err(-1, "%s: recvmsg", test); - if (len != buflen) + if ((size_t)len != buflen) errx(-1, "%s: recvmsg: %zd bytes received", test, len); cmsghdr = CMSG_FIRSTHDR(&msghdr); @@ -205,7 +205,7 @@ recvfd(const char *test, int sockfd, int } int -main(int argc, char *argv[]) +main(void) { struct stat putfd_1_stat, putfd_2_stat, getfd_1_stat, getfd_2_stat; int fd[2], putfd_1, putfd_2, getfd_1, getfd_2; @@ -354,7 +354,7 @@ main(int argc, char *argv[]) * payload. Payload + SCM_RIGHTS + LOCAL_CREDS hit socket buffer * limit, and receiver receives truncated data. */ - test = "test8-rigths+creds+payload"; + test = "test8-rights+creds+payload"; printf("beginning %s\n", test); { From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 07:59:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CD225DA; Fri, 10 Apr 2015 07:59:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7823FA12; Fri, 10 Apr 2015 07:59:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A7xlhj039748; Fri, 10 Apr 2015 07:59:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A7xk3t039746; Fri, 10 Apr 2015 07:59:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504100759.t3A7xk3t039746@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Apr 2015 07:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281355 - head/tools/regression/sockets/accf_data_attach X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 07:59:47 -0000 Author: ngie Date: Fri Apr 10 07:59:46 2015 New Revision: 281355 URL: https://svnweb.freebsd.org/changeset/base/281355 Log: Fix -Wunused warnings, bump WARNS to 6 The testcase fails today on subtest # 9 The output is still broken if prove -rv is run and the testcase aborts prematurely (the testcase doesn't really conform to TAP protocol properly, except when it completes fully) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/accf_data_attach/Makefile head/tools/regression/sockets/accf_data_attach/accf_data_attach.c Modified: head/tools/regression/sockets/accf_data_attach/Makefile ============================================================================== --- head/tools/regression/sockets/accf_data_attach/Makefile Fri Apr 10 07:35:53 2015 (r281354) +++ head/tools/regression/sockets/accf_data_attach/Makefile Fri Apr 10 07:59:46 2015 (r281355) @@ -4,8 +4,6 @@ PROG= accf_data_attach MAN= - -accf_data_attach: accf_data_attach.c - gcc -Wall -o accf_data_attach accf_data_attach.c +WARNS?= 6 .include Modified: head/tools/regression/sockets/accf_data_attach/accf_data_attach.c ============================================================================== --- head/tools/regression/sockets/accf_data_attach/accf_data_attach.c Fri Apr 10 07:35:53 2015 (r281354) +++ head/tools/regression/sockets/accf_data_attach/accf_data_attach.c Fri Apr 10 07:59:46 2015 (r281355) @@ -58,7 +58,7 @@ * make sure it is removed. */ int -main(int argc, char *argv[]) +main(void) { struct accept_filter_arg afa; struct sockaddr_in sin; From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 08:01:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A32A8776; Fri, 10 Apr 2015 08:01:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DEDFACA; Fri, 10 Apr 2015 08:01:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A81o47043640; Fri, 10 Apr 2015 08:01:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A81oNW043638; Fri, 10 Apr 2015 08:01:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504100801.t3A81oNW043638@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Apr 2015 08:01:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281356 - head/tools/regression/sockets/kqueue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 08:01:50 -0000 Author: ngie Date: Fri Apr 10 08:01:49 2015 New Revision: 281356 URL: https://svnweb.freebsd.org/changeset/base/281356 Log: Fix -Wunused warnings, bump WARNS to 6 The output is still broken if prove -rv is run and the testcase aborts prematurely with fail_assertion (the testcase doesn't really conform to TAP protocol properly, except when it completes fully) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/kqueue/Makefile head/tools/regression/sockets/kqueue/kqueue.c Modified: head/tools/regression/sockets/kqueue/Makefile ============================================================================== --- head/tools/regression/sockets/kqueue/Makefile Fri Apr 10 07:59:46 2015 (r281355) +++ head/tools/regression/sockets/kqueue/Makefile Fri Apr 10 08:01:49 2015 (r281356) @@ -4,5 +4,6 @@ PROG= kqueue MAN= +WARNS?= 6 .include Modified: head/tools/regression/sockets/kqueue/kqueue.c ============================================================================== --- head/tools/regression/sockets/kqueue/kqueue.c Fri Apr 10 07:59:46 2015 (r281355) +++ head/tools/regression/sockets/kqueue/kqueue.c Fri Apr 10 08:01:49 2015 (r281356) @@ -250,9 +250,9 @@ test_evfilt_write(int kq, int fd[2], con * sockets, and confirm that we can register for various events on them. */ int -main(int argc, char *argv[]) +main(void) { - int i, kq, sv[2]; + int kq, sv[2]; printf("1..49\n"); From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 08:06:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7642920; Fri, 10 Apr 2015 08:06:15 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F182B3C; Fri, 10 Apr 2015 08:06:15 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgTx7-000PaD-LE; Fri, 10 Apr 2015 11:06:13 +0300 Date: Fri, 10 Apr 2015 11:06:13 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281352 - head/sys/netinet Message-ID: <20150410080613.GJ1394@zxy.spb.ru> References: <201504100655.t3A6tioW010182@svn.freebsd.org> <20150410071251.GI1394@zxy.spb.ru> <20150410073147.GD99375@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410073147.GD99375@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 08:06:16 -0000 On Fri, Apr 10, 2015 at 10:31:47AM +0300, Gleb Smirnoff wrote: > On Fri, Apr 10, 2015 at 10:12:51AM +0300, Slawa Olhovchenkov wrote: > S> On Fri, Apr 10, 2015 at 06:55:44AM +0000, Gleb Smirnoff wrote: > S> > S> > Author: glebius > S> > Date: Fri Apr 10 06:55:43 2015 > S> > New Revision: 281352 > S> > URL: https://svnweb.freebsd.org/changeset/base/281352 > S> > > S> > Log: > S> > o Use Jenkins hash. With previous hash, for a single source IP address and > S> > S> Why not meurmur32 hash? > > I didn't investigate it. I know that Jenkins is reliable, and testing > confirmed. Author: gnn Date: Fri Oct 10 19:26:26 2014 New Revision: 272906 URL: https://svnweb.freebsd.org/changeset/base/272906 Log: Change the PF hash from Jenkins to Murmur3. In forwarding tests this showed a conservative 3% incrase in PPS. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 08:20:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62EF41000; Fri, 10 Apr 2015 08:20:53 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13B94D41; Fri, 10 Apr 2015 08:20:53 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgUBF-000PpG-W1; Fri, 10 Apr 2015 11:20:50 +0300 Date: Fri, 10 Apr 2015 11:20:49 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410082049.GV8220@zxy.spb.ru> References: <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410073230.GE99375@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410073230.GE99375@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 08:20:53 -0000 On Fri, Apr 10, 2015 at 10:32:30AM +0300, Gleb Smirnoff wrote: > On Fri, Apr 10, 2015 at 10:08:45AM +0300, Slawa Olhovchenkov wrote: > S> What benefits from switching to utf8 locale in 'default' login class? > > Being on the same page as rest of the world? What benfit from it? What is rest of world? Windows used UTF-16 Centos used en_US.UTF-8 Ubuntu used C I don't see common locale for 'rest of the world'. You can adding new clasess with utf8, adding tools for create users with language preferences, MFC to 10/9/8 and have all benefits from utf8 and save backward compatibility. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 08:38:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AA968F5; Fri, 10 Apr 2015 08:38:44 +0000 (UTC) Received: from mx0.deglitch.com (unknown [IPv6:2001:16d8:ff00:19d::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0DCF3EAC; Fri, 10 Apr 2015 08:38:44 +0000 (UTC) Received: from [192.168.11.8] (unknown [98.248.95.7]) by mx0.deglitch.com (Postfix) with ESMTPSA id 5226C8FC27; Fri, 10 Apr 2015 12:38:35 +0400 (MSK) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r281129 - head/etc From: Stanislav Sedov In-Reply-To: <20150410073230.GE99375@FreeBSD.org> Date: Fri, 10 Apr 2015 01:38:21 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410073230.GE99375@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.2098) Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 08:38:44 -0000 > On Apr 10, 2015, at 12:32 AM, Gleb Smirnoff = wrote: >=20 > On Fri, Apr 10, 2015 at 10:08:45AM +0300, Slawa Olhovchenkov wrote: > S> What benefits from switching to utf8 locale in 'default' login = class? >=20 > Being on the same page as rest of the world? >=20 To be fair, this is not exactly true. To my knowledge no mainstream operating systems except Linux employ UTF-8 at the moment: * Windows is still UTF-16 based * Mac OS X uses it=E2=80=99s own version of UTF-8 (aka UTF-8-MAC) which is the cause of constant pain when moving files between OS X and FreeBSD. Personally, I=E2=80=99d agree with Slawa that this change seems somewhat premature and does not seem to bring any immediate benefits: * It will hardly improve compatibility with other OSes; * A lot of applications in widespread use do not have UTF-8 support, and UTF generally requires some non-trivial handling unlike 8 bit encodings which lead to numerous security issues in the past (and continues to so). * Changing the default encoding for the login class will lead to an unexpected encoding change for =E2=80=98russian=E2=80=99 login = class users. This might affect a lot of legacy applications, and might indeed result in a data loss in case of databases. In my view, adding an additional login class with UTF-8 encoding sounds like a better solution at this time. This will bring pretty much the same benefits (as you noted earlier fresh FreeBSD installation require specifying the login class manually, in which case that new login class can be passed in), but at the same time it won=E2=80=99t result in a sudden encoding change for existing =E2=80=98russian=E2=80=99 login class users.=20 -- ST4096-RIPE From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 08:39:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 2266AA80; Fri, 10 Apr 2015 08:39:49 +0000 (UTC) Date: Fri, 10 Apr 2015 08:39:49 +0000 From: Alexey Dokuchaev To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410083949.GA99728@FreeBSD.org> References: <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410073230.GE99375@FreeBSD.org> <20150410082049.GV8220@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410082049.GV8220@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "src-committers@freebsd.org" , Dmitry Marakasov , "svn-src-all@freebsd.org" , Gleb Smirnoff , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 08:39:49 -0000 On Fri, Apr 10, 2015 at 11:20:49AM +0300, Slawa Olhovchenkov wrote: > On Fri, Apr 10, 2015 at 10:32:30AM +0300, Gleb Smirnoff wrote: > > On Fri, Apr 10, 2015 at 10:08:45AM +0300, Slawa Olhovchenkov wrote: > > S> What benefits from switching to utf8 locale in 'default' login class? > > > > Being on the same page as rest of the world? > > What benfit from it? > What is rest of world? > Windows used UTF-16 > Centos used en_US.UTF-8 > Ubuntu used C Ubuntu is also xx_YY.UTF-8 depending on one's regional settings, but that does not really matter. > I don't see common locale for 'rest of the world'. It's not about having "common locale" with the rest of the world, it's the other way around: UTF-8 is far superior to anything else, and that's why the world (sane part thereof) switched to it, earlier or later. I was just as conservative as you Slawa, and was perfectly happy with KOI8, but really, it should go now. It served us well, but in the multi-language world it has no place, for better or for worse. The unfortunate fat that nvi(1) is truncating files merely means that we'd have to fix nvi(1), not further delay finally going to bed with UTF-8. ./danfe From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 08:46:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81656D64; Fri, 10 Apr 2015 08:46:11 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31675FCE; Fri, 10 Apr 2015 08:46:11 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgUZk-0000M7-CP; Fri, 10 Apr 2015 11:46:08 +0300 Date: Fri, 10 Apr 2015 11:46:08 +0300 From: Slawa Olhovchenkov To: Alexey Dokuchaev Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410084608.GW8220@zxy.spb.ru> References: <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410073230.GE99375@FreeBSD.org> <20150410082049.GV8220@zxy.spb.ru> <20150410083949.GA99728@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410083949.GA99728@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "src-committers@freebsd.org" , Dmitry Marakasov , "svn-src-all@freebsd.org" , Gleb Smirnoff , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 08:46:11 -0000 On Fri, Apr 10, 2015 at 08:39:49AM +0000, Alexey Dokuchaev wrote: > On Fri, Apr 10, 2015 at 11:20:49AM +0300, Slawa Olhovchenkov wrote: > > On Fri, Apr 10, 2015 at 10:32:30AM +0300, Gleb Smirnoff wrote: > > > On Fri, Apr 10, 2015 at 10:08:45AM +0300, Slawa Olhovchenkov wrote: > > > S> What benefits from switching to utf8 locale in 'default' login class? > > > > > > Being on the same page as rest of the world? > > > > What benfit from it? > > What is rest of world? > > Windows used UTF-16 > > Centos used en_US.UTF-8 > > Ubuntu used C > > Ubuntu is also xx_YY.UTF-8 depending on one's regional settings, but that > does not really matter. Ubuntu cron don't have setting for LANG. > > I don't see common locale for 'rest of the world'. > > It's not about having "common locale" with the rest of the world, it's the > other way around: UTF-8 is far superior to anything else, and that's why > the world (sane part thereof) switched to it, earlier or later. > > I was just as conservative as you Slawa, and was perfectly happy with KOI8, > but really, it should go now. It served us well, but in the multi-language > world it has no place, for better or for worse. > > The unfortunate fat that nvi(1) is truncating files merely means that we'd > have to fix nvi(1), not further delay finally going to bed with UTF-8. Having additional login class and improving support of utf-8 in application cover all cases and can be backported to old versions of FreeBSD. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 09:06:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6AD65A1; Fri, 10 Apr 2015 09:06:53 +0000 (UTC) Received: from mx0.deglitch.com (unknown [IPv6:2001:16d8:ff00:19d::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6CA54288; Fri, 10 Apr 2015 09:06:53 +0000 (UTC) Received: from [192.168.11.8] (unknown [98.248.95.7]) by mx0.deglitch.com (Postfix) with ESMTPSA id 4DF138FC2E; Fri, 10 Apr 2015 13:06:48 +0400 (MSK) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r281129 - head/etc From: Stanislav Sedov In-Reply-To: Date: Fri, 10 Apr 2015 02:06:41 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410073230.GE99375@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.2098) Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:06:53 -0000 > On Apr 10, 2015, at 1:38 AM, Stanislav Sedov wrote: >=20 >=20 >> On Apr 10, 2015, at 12:32 AM, Gleb Smirnoff = wrote: >>=20 >> On Fri, Apr 10, 2015 at 10:08:45AM +0300, Slawa Olhovchenkov wrote: >> S> What benefits from switching to utf8 locale in 'default' login = class? >>=20 >> Being on the same page as rest of the world? >>=20 >=20 > To be fair, this is not exactly true. To my knowledge no mainstream > operating systems except Linux employ UTF-8 at the moment: > * Windows is still UTF-16 based > * Mac OS X uses it=E2=80=99s own version of UTF-8 (aka UTF-8-MAC) > which is the cause of constant pain when moving files between > OS X and FreeBSD. >=20 Sorry, I just realized that I might have replied to something that you didn=E2=80=99t actually say. Ignore that part of my email if you didn=E2=80=99t mean compatibility with other operating systems. As for the change, my concern is basically the following. The only effect of this commit is that all the users with the =E2=80=98russian=E2=80=99 login class will be automatically switched = from KOI8 to UTF8 as a part of the next update. Do we actually want this to happen? -- ST4096-RIPE From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 09:15:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2164E9C1; Fri, 10 Apr 2015 09:15:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0BF4B3C5; Fri, 10 Apr 2015 09:15:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A9Fajd077986; Fri, 10 Apr 2015 09:15:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A9FaEj077985; Fri, 10 Apr 2015 09:15:36 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504100915.t3A9FaEj077985@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 10 Apr 2015 09:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281357 - head/sys/boot/efi/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:15:37 -0000 Author: andrew Date: Fri Apr 10 09:15:35 2015 New Revision: 281357 URL: https://svnweb.freebsd.org/changeset/base/281357 Log: Port the EFI reloc codeto work on arm64. This used the rela relocation table so wiill need the addend included in the relocation calculation. Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/efi/loader/reloc.c Modified: head/sys/boot/efi/loader/reloc.c ============================================================================== --- head/sys/boot/efi/loader/reloc.c Fri Apr 10 08:01:49 2015 (r281356) +++ head/sys/boot/efi/loader/reloc.c Fri Apr 10 09:15:35 2015 (r281357) @@ -32,7 +32,12 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(__arm__) || defined(__i386__) +#if defined(__aarch64__) +#define ElfW_Rel Elf64_Rela +#define ElfW_Dyn Elf64_Dyn +#define ELFW_R_TYPE ELF64_R_TYPE +#define ELF_RELA +#elif defined(__arm__) || defined(__i386__) #define ElfW_Rel Elf32_Rel #define ElfW_Dyn Elf32_Dyn #define ELFW_R_TYPE ELF32_R_TYPE @@ -43,7 +48,10 @@ __FBSDID("$FreeBSD$"); #else #error architecture not supported #endif -#if defined(__amd64__) +#if defined(__aarch64__) +#define RELOC_TYPE_NONE R_AARCH64_NONE +#define RELOC_TYPE_RELATIVE R_AARCH64_RELATIVE +#elif defined(__amd64__) #define RELOC_TYPE_NONE R_X86_64_NONE #define RELOC_TYPE_RELATIVE R_X86_64_RELATIVE #elif defined(__arm__) @@ -104,6 +112,10 @@ _reloc(unsigned long ImageBase, ElfW_Dyn /* Address relative to the base address. */ newaddr = (unsigned long *)(ImageBase + rel->r_offset); *newaddr += ImageBase; + /* Add the addend when the ABI uses them */ +#ifdef ELF_RELA + *newaddr += rel->r_addend; +#endif break; default: /* XXX: do we need other relocations ? */ From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 09:21:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 111EDDD5; Fri, 10 Apr 2015 09:21:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFA9B6A8; Fri, 10 Apr 2015 09:21:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A9L8RZ081531; Fri, 10 Apr 2015 09:21:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A9L8ws081529; Fri, 10 Apr 2015 09:21:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504100921.t3A9L8ws081529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Apr 2015 09:21:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281358 - head/tools/regression/sockets/accept_fd_leak X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:21:09 -0000 Author: ngie Date: Fri Apr 10 09:21:07 2015 New Revision: 281358 URL: https://svnweb.freebsd.org/changeset/base/281358 Log: - Parameterize out the number of accept/connect attempts - Randomize the bind port to allow 2+ consecutive calls in < 10 minutes, and to also not fail if (for instance) there's a server already listening on port 8080 - Don't leak the listening socket / fds into the child process - Fix warnings: -- Remove argc/argv (-Wunused) -- Mark sig __unused (-Wunused) -- Mark quit static (-Wmissing-variable-declarations) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/accept_fd_leak/Makefile head/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c Modified: head/tools/regression/sockets/accept_fd_leak/Makefile ============================================================================== --- head/tools/regression/sockets/accept_fd_leak/Makefile Fri Apr 10 09:15:35 2015 (r281357) +++ head/tools/regression/sockets/accept_fd_leak/Makefile Fri Apr 10 09:21:07 2015 (r281358) @@ -4,8 +4,6 @@ PROG= accept_fd_leak MAN= - -regress: - ./accept_fd_leak +WARNS?= 6 .include Modified: head/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c ============================================================================== --- head/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c Fri Apr 10 09:15:35 2015 (r281357) +++ head/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c Fri Apr 10 09:21:07 2015 (r281358) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #include #include @@ -41,13 +41,16 @@ #include #include +#define BIND_ATTEMPTS 10 #define LOOPS 500 +#define NUM_ATTEMPTS 1000 -volatile int quit; +static volatile int quit; static void -child_died(int sig) +child_died(int sig __unused) { + quit = 1; } @@ -59,13 +62,12 @@ child_died(int sig) * briefly before beginning (not 100% reliable, but a good start). */ int -main(int argc, char *argv[]) +main(void) { struct sockaddr_in sin; socklen_t size; pid_t child; - int fd1, fd2, fd3, i, s; - int status; + int fd1, fd2, fd3, i, listen_port, s, status; printf("1..2\n"); @@ -85,10 +87,22 @@ main(int argc, char *argv[]) sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - sin.sin_port = htons(8080); - if (bind(s, (struct sockaddr *) &sin, sizeof(sin)) != 0) - errx(-1, "bind: %s", strerror(errno)); + srandomdev(); + + for (i = 0; i < BIND_ATTEMPTS; i++) { + /* Pick a random unprivileged port 1025-65535 */ + listen_port = MAX((int)random() % 65535, 1025); + sin.sin_port = htons(listen_port); + if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) == 0) + break; + warn("bind with %d failed", listen_port); + usleep(1000); + } + if (i >= BIND_ATTEMPTS) { + printf("Bail out!\n"); + exit(1); + } if (listen(s, -1) != 0) errx(-1, "listen: %s", strerror(errno)); @@ -134,16 +148,20 @@ main(int argc, char *argv[]) errx(-1, "fork: %s", strerror(errno)); /* - * Child process does 1000 connect's. + * Child process does `NUM_ATTEMPTS` connects. */ if (child == 0) { + close(fd1); + close(fd2); + close(s); + bzero(&sin, sizeof(sin)); sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - sin.sin_port = htons(8080); + sin.sin_port = htons(listen_port); - for (i = 0; i < 1000; i++) { + for (i = 0; i < NUM_ATTEMPTS; i++) { s = socket(PF_INET, SOCK_STREAM, 0); if (s == -1) errx(-1, "socket: %s", strerror(errno)); @@ -167,9 +185,9 @@ main(int argc, char *argv[]) errx(-1, "ioctl(F_GETFL): %s", strerror(errno)); if (i & O_NONBLOCK) errx(-1, "Failed to clear O_NONBLOCK (i=0x%x)\n", i); - - /* Do 1000 accept's with an invalid pointer. */ - for (i = 0; !quit && i < 1000; i++) { + + /* Do `NUM_ATTEMPTS` accepts with an invalid pointer. */ + for (i = 0; !quit && i < NUM_ATTEMPTS; i++) { size = sizeof(sin); if (accept(s, (struct sockaddr *)(uintptr_t)(0x100), &size) != -1) @@ -182,7 +200,7 @@ main(int argc, char *argv[]) errx(-1, "waitpid: %s", strerror(errno)); if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) warnx("child process died"); - + /* * Allocate a file descriptor and make sure it's fd2+2. 2 because * we allocate an fd for the socket. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 09:23:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94066F7C; Fri, 10 Apr 2015 09:23:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E9376E9; Fri, 10 Apr 2015 09:23:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A9N1ch082433; Fri, 10 Apr 2015 09:23:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A9N0lp082428; Fri, 10 Apr 2015 09:23:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504100923.t3A9N0lp082428@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Apr 2015 09:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281359 - head/tools/regression/sockets/fstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:23:01 -0000 Author: ngie Date: Fri Apr 10 09:23:00 2015 New Revision: 281359 URL: https://svnweb.freebsd.org/changeset/base/281359 Log: Remove argc/argv (-Wunused) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/fstat/Makefile head/tools/regression/sockets/fstat/fstat.c Modified: head/tools/regression/sockets/fstat/Makefile ============================================================================== --- head/tools/regression/sockets/fstat/Makefile Fri Apr 10 09:21:07 2015 (r281358) +++ head/tools/regression/sockets/fstat/Makefile Fri Apr 10 09:23:00 2015 (r281359) @@ -4,6 +4,6 @@ PROG= fstat MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: head/tools/regression/sockets/fstat/fstat.c ============================================================================== --- head/tools/regression/sockets/fstat/fstat.c Fri Apr 10 09:21:07 2015 (r281358) +++ head/tools/regression/sockets/fstat/fstat.c Fri Apr 10 09:23:00 2015 (r281359) @@ -57,7 +57,7 @@ dotest(int domain, int type, int protoco } int -main(int argc, char *argv[]) +main(void) { dotest(PF_INET, SOCK_DGRAM, 0); From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 09:26:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C47E328F; Fri, 10 Apr 2015 09:26:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEFB676A; Fri, 10 Apr 2015 09:26:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A9QMO2083039; Fri, 10 Apr 2015 09:26:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A9QMse083037; Fri, 10 Apr 2015 09:26:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504100926.t3A9QMse083037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Apr 2015 09:26:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281360 - head/tools/regression/sockets/listen_backlog X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:26:22 -0000 Author: ngie Date: Fri Apr 10 09:26:21 2015 New Revision: 281360 URL: https://svnweb.freebsd.org/changeset/base/281360 Log: Fix warnings - Remove argc/argv (-Wunused) - Mark some parameters to socket_listen_update __unused (-Wunused) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/listen_backlog/Makefile head/tools/regression/sockets/listen_backlog/listen_backlog.c Modified: head/tools/regression/sockets/listen_backlog/Makefile ============================================================================== --- head/tools/regression/sockets/listen_backlog/Makefile Fri Apr 10 09:23:00 2015 (r281359) +++ head/tools/regression/sockets/listen_backlog/Makefile Fri Apr 10 09:26:21 2015 (r281360) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= listen_backlog -WARNS?= 3 MAN= +WARNS?= 6 .include Modified: head/tools/regression/sockets/listen_backlog/listen_backlog.c ============================================================================== --- head/tools/regression/sockets/listen_backlog/listen_backlog.c Fri Apr 10 09:23:00 2015 (r281359) +++ head/tools/regression/sockets/listen_backlog/listen_backlog.c Fri Apr 10 09:26:21 2015 (r281360) @@ -218,7 +218,8 @@ test_defaults(void) * the first and second listen(). */ static int -socket_listen_update(int domain, int type, int protocol, int backlog, +socket_listen_update(int domain __unused, int type __unused, + int protocol __unused, int backlog, int update_backlog, int listen_backlog_assertion, int update_backlog_assertion, int *sockp, const char *domainstring, const char *typestring, const char *testclass, const char *test) @@ -365,7 +366,7 @@ test_set_qlimit(void) } int -main(int argc, char *argv[]) +main(void) { size_t len; From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 09:27:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52BC43D8; Fri, 10 Apr 2015 09:27:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D3E077A; Fri, 10 Apr 2015 09:27:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A9RPHW083204; Fri, 10 Apr 2015 09:27:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A9ROhL083201; Fri, 10 Apr 2015 09:27:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504100927.t3A9ROhL083201@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Apr 2015 09:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281361 - head/tools/regression/sockets/listenclose X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:27:25 -0000 Author: ngie Date: Fri Apr 10 09:27:23 2015 New Revision: 281361 URL: https://svnweb.freebsd.org/changeset/base/281361 Log: Remove argc/argv (-Wunused) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/listenclose/Makefile head/tools/regression/sockets/listenclose/listenclose.c Modified: head/tools/regression/sockets/listenclose/Makefile ============================================================================== --- head/tools/regression/sockets/listenclose/Makefile Fri Apr 10 09:26:21 2015 (r281360) +++ head/tools/regression/sockets/listenclose/Makefile Fri Apr 10 09:27:23 2015 (r281361) @@ -4,6 +4,6 @@ PROG= listenclose MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: head/tools/regression/sockets/listenclose/listenclose.c ============================================================================== --- head/tools/regression/sockets/listenclose/listenclose.c Fri Apr 10 09:26:21 2015 (r281360) +++ head/tools/regression/sockets/listenclose/listenclose.c Fri Apr 10 09:27:23 2015 (r281361) @@ -52,7 +52,7 @@ */ int -main(int argc, char *argv[]) +main(void) { int listen_sock, connect_sock; struct sockaddr_in sin; From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 09:29:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C1366AF for ; Fri, 10 Apr 2015 09:29:49 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id ADEE8797 for ; Fri, 10 Apr 2015 09:29:48 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t3A9TgEv000865 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Apr 2015 12:29:42 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t3A9TgrG000864; Fri, 10 Apr 2015 12:29:42 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Apr 2015 12:29:42 +0300 From: Gleb Smirnoff To: Stanislav Sedov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410092942.GF99375@FreeBSD.org> References: <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410073230.GE99375@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:29:49 -0000 On Fri, Apr 10, 2015 at 02:06:41AM -0700, Stanislav Sedov wrote: S> > To be fair, this is not exactly true. To my knowledge no mainstream S> > operating systems except Linux employ UTF-8 at the moment: S> > * Windows is still UTF-16 based S> > * Mac OS X uses it’s own version of UTF-8 (aka UTF-8-MAC) S> > which is the cause of constant pain when moving files between S> > OS X and FreeBSD. S> S> Sorry, I just realized that I might have replied to something S> that you didn’t actually say. Ignore that part of my email S> if you didn’t mean compatibility with other operating systems. S> S> As for the change, my concern is basically the following. The S> only effect of this commit is that all the users with the S> ‘russian’ login class will be automatically switched from KOI8 S> to UTF8 as a part of the next update. Do we actually want S> this to happen? Yes, we do. And it is long overdue. Today vast majority of Russian users do this change manually. Minority stays with KOI8-R. Even Slawa mentions that he is migrating machines. Yes, this has impact on people doing upgrade. But before we have impact on people doing fresh install. Since today most Russian users already did this change manually, we expect impact to be small. Let me enumerate problems for those who stay with KOI8-R: If your terminal is in KOI8: - Emails with umlaut in From: are mangled. You compose reply, you put "?" char into person's name. - Emails from Japanese and Chinese people are even worse. The entire name is ??????. If your filesystem is in KOI8: - Email attachments you save have names mangled. - Many Gnome based applications crash. - You can't read file names from downloaded torrents with Russian file names inside, neither you can create your own torrent shares that would be compatible with others. Those who use FreeBSD as desktop, except very small minority, switched to UTF-8. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 09:37:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BBD8834; Fri, 10 Apr 2015 09:37:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16ACE885; Fri, 10 Apr 2015 09:37:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A9bs0L087987; Fri, 10 Apr 2015 09:37:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A9bsVV087986; Fri, 10 Apr 2015 09:37:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504100937.t3A9bsVV087986@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 10 Apr 2015 09:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281362 - head/tools/regression/sockets/accept_fd_leak X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:37:55 -0000 Author: ngie Date: Fri Apr 10 09:37:53 2015 New Revision: 281362 URL: https://svnweb.freebsd.org/changeset/base/281362 Log: Use _exit, not exit in forked process MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c Modified: head/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c ============================================================================== --- head/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c Fri Apr 10 09:27:23 2015 (r281361) +++ head/tools/regression/sockets/accept_fd_leak/accept_fd_leak.c Fri Apr 10 09:37:53 2015 (r281362) @@ -170,7 +170,7 @@ main(void) errx(-1, "connect: %s", strerror(errno)); close(s); } - exit(0); + _exit(0); } /* Reset back to a blocking socket. */ From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 09:46:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82DC09E9; Fri, 10 Apr 2015 09:46:18 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3265F95A; Fri, 10 Apr 2015 09:46:18 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgVVv-0001RM-3i; Fri, 10 Apr 2015 12:46:15 +0300 Date: Fri, 10 Apr 2015 12:46:15 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410094614.GX8220@zxy.spb.ru> References: <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410073230.GE99375@FreeBSD.org> <20150410092942.GF99375@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20150410092942.GF99375@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Stanislav Sedov , Dmitry Marakasov , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:46:18 -0000 On Fri, Apr 10, 2015 at 12:29:42PM +0300, Gleb Smirnoff wrote: > On Fri, Apr 10, 2015 at 02:06:41AM -0700, Stanislav Sedov wrote: > S> > To be fair, this is not exactly true. To my knowledge no mainstream > S> > operating systems except Linux employ UTF-8 at the moment: > S> > * Windows is still UTF-16 based > S> > * Mac OS X uses it's own version of UTF-8 (aka UTF-8-MAC) > S> > which is the cause of constant pain when moving files between > S> > OS X and FreeBSD. > S> > S> Sorry, I just realized that I might have replied to something > S> that you didn't actually say. Ignore that part of my email > S> if you didn't mean compatibility with other operating systems. > S> > S> As for the change, my concern is basically the following. The > S> only effect of this commit is that all the users with the > S> 'russian' login class will be automatically switched from KOI8 > S> to UTF8 as a part of the next update. Do we actually want > S> this to happen? > > Yes, we do. And it is long overdue. > > Today vast majority of Russian users do this change manually. > Minority stays with KOI8-R. Even Slawa mentions that he is > migrating machines. And migrating not be done at this year. And migrating give troubles for me in unpredicable time. But I dissalow if you force me to migrate. I see you need to force me. This is bad. > Yes, this has impact on people doing upgrade. But before we > have impact on people doing fresh install. Since today most > Russian users already did this change manually, we expect impact > to be small. Why you don't want add additional login class and give choise at install time for user login class? > Let me enumerate problems for those who stay with KOI8-R: > > If your terminal is in KOI8: > - Emails with umlaut in From: are mangled. You compose reply, > you put "?" char into person's name. > - Emails from Japanese and Chinese people are even worse. The > entire name is ??????. All hieroglyph for me like ?. I am don't distinguish his. > If your filesystem is in KOI8: Filesystem don't have encoding. Except zfs with utf8only=yes property. > - Email attachments you save have names mangled. Wrong > - Many Gnome based applications crash. Wrong > - You can't read file names from downloaded torrents with Russian You can read with small trick. > file names inside, neither you can create your own torrent shares > that would be compatible with others. Wrong. You can put file named in any encodings to file system. > Those who use FreeBSD as desktop, except very small minority, > switched to UTF-8. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 09:48:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68C32B79 for ; Fri, 10 Apr 2015 09:48:39 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DAF1097C for ; Fri, 10 Apr 2015 09:48:38 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t3A9mYIv000949 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Apr 2015 12:48:34 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t3A9mYtx000948; Fri, 10 Apr 2015 12:48:34 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Apr 2015 12:48:34 +0300 From: Gleb Smirnoff To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410094834.GG99375@FreeBSD.org> References: <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410073230.GE99375@FreeBSD.org> <20150410092942.GF99375@FreeBSD.org> <20150410094614.GX8220@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410094614.GX8220@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Stanislav Sedov , Dmitry Marakasov , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:48:39 -0000 On Fri, Apr 10, 2015 at 12:46:15PM +0300, Slawa Olhovchenkov wrote: S> And migrating not be done at this year. Let me ask you for the third time: when? If you were to decide, when should we migrate default to UTF-8? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 09:50:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E0CED01; Fri, 10 Apr 2015 09:50:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2D7B995; Fri, 10 Apr 2015 09:50:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3A9oE90092998; Fri, 10 Apr 2015 09:50:14 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A9oEVG092995; Fri, 10 Apr 2015 09:50:14 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504100950.t3A9oEVG092995@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 10 Apr 2015 09:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281363 - in head: share/man/man4 sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:50:15 -0000 Author: glebius Date: Fri Apr 10 09:50:13 2015 New Revision: 281363 URL: https://svnweb.freebsd.org/changeset/base/281363 Log: Redo r274966. Instead of global all-interface all-vnet undocumented sysctl, use per-interface flag, and document it. Sponsored by: Nginx, Inc. Modified: head/share/man/man4/tap.4 head/sys/net/if_tap.c Modified: head/share/man/man4/tap.4 ============================================================================== --- head/share/man/man4/tap.4 Fri Apr 10 09:37:53 2015 (r281362) +++ head/share/man/man4/tap.4 Fri Apr 10 09:50:13 2015 (r281363) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Based on PR#2411 .\" -.Dd November 30, 2014 +.Dd April 10, 2015 .Dt TAP 4 .Os .Sh NAME @@ -275,7 +275,9 @@ brought down .Dq ifconfig tap Ns Sy N No down ) unless the device is a .Em VMnet -device. +device, or has +.Dv IFF_LINK0 +flag set. All queued frames are thrown away. If the interface is up when the data device is not open, output frames are thrown away rather than Modified: head/sys/net/if_tap.c ============================================================================== --- head/sys/net/if_tap.c Fri Apr 10 09:37:53 2015 (r281362) +++ head/sys/net/if_tap.c Fri Apr 10 09:50:13 2015 (r281363) @@ -156,7 +156,6 @@ static int tapdebug = 0; /* deb static int tapuopen = 0; /* allow user open() */ static int tapuponopen = 0; /* IFF_UP on open() */ static int tapdclone = 1; /* enable devfs cloning */ -static int tapclosedeladdrs = 1; /* del addrs on close */ static SLIST_HEAD(, tap_softc) taphead; /* first device */ static struct clonedevs *tapclones; @@ -173,9 +172,6 @@ SYSCTL_INT(_net_link_tap, OID_AUTO, up_o "Bring interface up when /dev/tap is opened"); SYSCTL_INT(_net_link_tap, OID_AUTO, devfs_cloning, CTLFLAG_RWTUN, &tapdclone, 0, "Enably legacy devfs interface creation"); -SYSCTL_INT(_net_link_tap, OID_AUTO, deladdrs_on_close, CTLFLAG_RW, - &tapclosedeladdrs, 0, "Delete addresses and routes when /dev/tap is " - "closed"); SYSCTL_INT(_net_link_tap, OID_AUTO, debug, CTLFLAG_RW, &tapdebug, 0, ""); DEV_MODULE(if_tap, tapmodevent, NULL); @@ -536,12 +532,11 @@ tapclose(struct cdev *dev, int foo, int IF_DRAIN(&ifp->if_snd); /* - * do not bring the interface down, and do not anything with - * interface, if we are in VMnet mode. just close the device. + * Do not bring the interface down, and do not anything with + * interface, if we are in VMnet mode. Just close the device. */ - - if (tapclosedeladdrs == 1 && ((tp->tap_flags & TAP_VMNET) == 0) && - (ifp->if_flags & IFF_UP)) { + if (((tp->tap_flags & TAP_VMNET) == 0) && + (ifp->if_flags & (IFF_UP | IFF_LINK0)) == IFF_UP) { mtx_unlock(&tp->tap_mtx); if_down(ifp); mtx_lock(&tp->tap_mtx); From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 10:01:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29F122DC; Fri, 10 Apr 2015 10:01:48 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE0E6BC9; Fri, 10 Apr 2015 10:01:47 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgVkv-0001hx-O9; Fri, 10 Apr 2015 13:01:45 +0300 Date: Fri, 10 Apr 2015 13:01:45 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410100145.GK1394@zxy.spb.ru> References: <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410073230.GE99375@FreeBSD.org> <20150410092942.GF99375@FreeBSD.org> <20150410094614.GX8220@zxy.spb.ru> <20150410094834.GG99375@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410094834.GG99375@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Stanislav Sedov , Dmitry Marakasov , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 10:01:48 -0000 On Fri, Apr 10, 2015 at 12:48:34PM +0300, Gleb Smirnoff wrote: > On Fri, Apr 10, 2015 at 12:46:15PM +0300, Slawa Olhovchenkov wrote: > S> And migrating not be done at this year. > > Let me ask you for the third time: when? If you were to decide, > when should we migrate default to UTF-8? Let me ask you again: where do you see default? I don't see any default in FreeBSD. Login class named 'russian' is not default for russian users. Please, answer to me: where you see any default? From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 10:03:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A23A9478; Fri, 10 Apr 2015 10:03:16 +0000 (UTC) Received: from mx0.deglitch.com (unknown [IPv6:2001:16d8:ff00:19d::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1A2BABD9; Fri, 10 Apr 2015 10:03:16 +0000 (UTC) Received: from [192.168.11.8] (unknown [98.248.95.7]) by mx0.deglitch.com (Postfix) with ESMTPSA id 35D428FC27; Fri, 10 Apr 2015 14:03:02 +0400 (MSK) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r281129 - head/etc From: Stanislav Sedov In-Reply-To: <20150410092942.GF99375@FreeBSD.org> Date: Fri, 10 Apr 2015 03:02:54 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <7D18BE54-E0D3-42D6-A00F-1CF7DE435DD8@freebsd.org> References: <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410073230.GE99375@FreeBSD.org> <20150410092942.GF99375@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.2098) Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 10:03:16 -0000 > On Apr 10, 2015, at 2:29 AM, Gleb Smirnoff = wrote: >=20 > Yes, we do. And it is long overdue. >=20 > Today vast majority of Russian users do this change manually. > Minority stays with KOI8-R. Even Slawa mentions that he is > migrating machines. >=20 > Yes, this has impact on people doing upgrade. But before we > have impact on people doing fresh install. Since today most > Russian users already did this change manually, we expect impact > to be small. >=20 > Let me enumerate problems for those who stay with KOI8-R: >=20 > If your terminal is in KOI8: > - Emails with umlaut in From: are mangled. You compose reply, > you put "?" char into person's name. > - Emails from Japanese and Chinese people are even worse. The > entire name is ??????. >=20 > If your filesystem is in KOI8: > - Email attachments you save have names mangled. > - Many Gnome based applications crash. > - You can't read file names from downloaded torrents with Russian > file names inside, neither you can create your own torrent shares > that would be compatible with others. >=20 > Those who use FreeBSD as desktop, except very small minority, > switched to UTF-8. I=E2=80=99m not arguing the benefits of UTF8/KOI8 and userbase sizes of = both, although I don=E2=80=99t necessarily agree with all the statements = above. The question here is how to introduce the change in the least disruptive way. And I fail to see how adding a new, russian_utf login class is inferior to modifying the existing one, which is for better or for worse was using koi8-r for decades. The way I see it, if we modify the existing class: * New and existing users created without login class are unaffected; * New users created with the =E2=80=98russian=E2=80=99 class explicitly set will have UTF-8 encoding enabled; * Existing users with the =E2=80=98russian=E2=80=99 login class switch = from koi8-r to utf8. This is a no-op for the UTF8 russian userbase, and a forced change for KOI8 users as they will have to either modify the login class, or change the login class of existing users * There=E2=80=99s no KOI8 login class anymore, all KOI8 users will have to add a =E2=80=98custom=E2=80=99 KOI8 login class. If we add a new, =E2=80=98russian_utf8' login class: * New and existing users created without login class are unaffected; * New users created with the =E2=80=98russian=E2=80=99 class explicitly set will have KOI-8 encoding enabled; * New users created with the =E2=80=98russian_utf8=E2=80=99 class = explicitly set will have UTF-8 encoding enabled; * Existing russian UTF8 users are unaffected * Existing KOI8-R users are unaffected * Login classes for both UTF8 and KOI8-R are available Am I missing something?=20 -- ST4096-RIPE From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 10:22:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54E9DADF for ; Fri, 10 Apr 2015 10:22:09 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E12ADEC for ; Fri, 10 Apr 2015 10:22:08 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t3AAM4dk001167 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Apr 2015 13:22:04 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t3AAM4m7001166; Fri, 10 Apr 2015 13:22:04 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Apr 2015 13:22:04 +0300 From: Gleb Smirnoff To: Stanislav Sedov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410102204.GH99375@FreeBSD.org> References: <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410073230.GE99375@FreeBSD.org> <20150410092942.GF99375@FreeBSD.org> <7D18BE54-E0D3-42D6-A00F-1CF7DE435DD8@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7D18BE54-E0D3-42D6-A00F-1CF7DE435DD8@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 10:22:09 -0000 On Fri, Apr 10, 2015 at 03:02:54AM -0700, Stanislav Sedov wrote: S> If we add a new, ‘russian_utf8' login class: S> * New and existing users created without login class are unaffected; S> * New users created with the ‘russian’ class explicitly S> set will have KOI-8 encoding enabled; S> * New users created with the ‘russian_utf8’ class explicitly S> set will have UTF-8 encoding enabled; S> * Existing russian UTF8 users are unaffected S> * Existing KOI8-R users are unaffected S> * Login classes for both UTF8 and KOI8-R are available S> S> Am I missing something? What if I am 15 year old newbie, who doesn't know all the drama around 8-bit era. And I read on the Internet, that FreeBSD is superior to Ubuntu. So I decided to try FreeBSD. What login class would I choose: russian or russian_utf8? The latter is something I don't know about, so I will choose the former. Also, if we speak about existing installations. Those have /etc/adduser.conf saved. And new users would be prompted to be created with 'russian' class, since previous were. So new users would be created with KOI8-R til end of life of the box. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 11:18:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E04017AC; Fri, 10 Apr 2015 11:18:47 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E4EB3D6; Fri, 10 Apr 2015 11:18:47 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgWxP-0003Bc-P1; Fri, 10 Apr 2015 14:18:43 +0300 Date: Fri, 10 Apr 2015 14:18:43 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410111843.GY8220@zxy.spb.ru> References: <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410073230.GE99375@FreeBSD.org> <20150410092942.GF99375@FreeBSD.org> <7D18BE54-E0D3-42D6-A00F-1CF7DE435DD8@freebsd.org> <20150410102204.GH99375@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20150410102204.GH99375@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Stanislav Sedov , Dmitry Marakasov , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 11:18:48 -0000 On Fri, Apr 10, 2015 at 01:22:04PM +0300, Gleb Smirnoff wrote: > On Fri, Apr 10, 2015 at 03:02:54AM -0700, Stanislav Sedov wrote: > S> If we add a new, 'russian_utf8' login class: > S> * New and existing users created without login class are unaffected; > S> * New users created with the 'russian' class explicitly > S> set will have KOI-8 encoding enabled; > S> * New users created with the 'russian_utf8' class explicitly > S> set will have UTF-8 encoding enabled; > S> * Existing russian UTF8 users are unaffected > S> * Existing KOI8-R users are unaffected > S> * Login classes for both UTF8 and KOI8-R are available > S> > S> Am I missing something? > > What if I am 15 year old newbie, who doesn't know all the drama > around 8-bit era. And I read on the Internet, that FreeBSD is > superior to Ubuntu. So I decided to try FreeBSD. What login > class would I choose: russian or russian_utf8? The latter === # adduser Username: xxx Full name: xxx Uid (Leave empty for default): Login group [xxx]: Login group is xxx. Invite xxx into other groups? []: Login class [default]: === How do you know about 'russian'? adduser don't give any hint about. > is something I don't know about, so I will choose the former. > Also, if we speak about existing installations. Those have > /etc/adduser.conf saved. And new users would be prompted > to be created with 'russian' class, since previous were. > So new users would be created with KOI8-R til end of life > of the box. Are you think just changed koi8 to utf8 in login.conf is enough? You kidding. If we have saved /etc/adduser.conf -- we very likely have ton of scripts koi8 cacpable (and utf8 incapabile). I am try, I am know. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 11:43:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DE9ECA1; Fri, 10 Apr 2015 11:43:45 +0000 (UTC) Received: from vps.amdmi3.ru (vps.amdmi3.ru [109.234.38.216]) by mx1.freebsd.org (Postfix) with ESMTP id 1C18D8CD; Fri, 10 Apr 2015 11:43:44 +0000 (UTC) Received: from hive.panopticon (unknown [213.148.20.85]) by vps.amdmi3.ru (Postfix) with ESMTPS id 4DEE2B0623; Fri, 10 Apr 2015 14:43:42 +0300 (MSK) Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id C17C1E7E; Fri, 10 Apr 2015 14:43:34 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id AA9C623AB; Fri, 10 Apr 2015 14:43:37 +0300 (MSK) Date: Fri, 10 Apr 2015 14:43:37 +0300 From: Dmitry Marakasov To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410114337.GB21982@hades.panopticon> References: <20150406082553.GW64665@FreeBSD.org> <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150410070845.GU8220@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 11:43:45 -0000 * Slawa Olhovchenkov (slw@zxy.spb.ru) wrote: > At this moment many programs still not utf8 capable. > Programs used in scripts -- too. > `tr` for example. > Swithcing 'default' login class to utf8 locale may break scripts, and > custom scripts too. We need to fix them, that's all. > What benefits from switching to utf8 locale in 'default' login class? Ability to work with utf-8 texts and filenames out of box. I won't mention how important this is nowadays. > ...and not utf-8 capable. Imposible convert it to utf8. This is to be handled individually for each port. If there are 8bit characters in comments, these can be converted right away. If unicode support is required from application and it has the support, it can be converted. If it has no support, it's not converted and warning is added. I think that's obvious. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://amdmi3.ru From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 11:46:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1BC0E4B; Fri, 10 Apr 2015 11:46:25 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6120A8F6; Fri, 10 Apr 2015 11:46:25 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgXOB-0003eR-Aa; Fri, 10 Apr 2015 14:46:23 +0300 Date: Fri, 10 Apr 2015 14:46:23 +0300 From: Slawa Olhovchenkov To: Dmitry Marakasov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410114623.GA12265@zxy.spb.ru> References: <20150406084141.GK23643@zxy.spb.ru> <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410114337.GB21982@hades.panopticon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410114337.GB21982@hades.panopticon> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 11:46:25 -0000 On Fri, Apr 10, 2015 at 02:43:37PM +0300, Dmitry Marakasov wrote: > * Slawa Olhovchenkov (slw@zxy.spb.ru) wrote: > > > At this moment many programs still not utf8 capable. > > Programs used in scripts -- too. > > `tr` for example. > > Swithcing 'default' login class to utf8 locale may break scripts, and > > custom scripts too. > > We need to fix them, that's all. Just don't break that working. > > What benefits from switching to utf8 locale in 'default' login class? > > Ability to work with utf-8 texts and filenames out of box. I won't > mention how important this is nowadays. What you mean? What currenly don't working? From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 12:21:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 523369ED; Fri, 10 Apr 2015 12:21:21 +0000 (UTC) Received: from vps.amdmi3.ru (vps.amdmi3.ru [109.234.38.216]) by mx1.freebsd.org (Postfix) with ESMTP id 10ACDCE8; Fri, 10 Apr 2015 12:21:20 +0000 (UTC) Received: from hive.panopticon (unknown [213.148.20.85]) by vps.amdmi3.ru (Postfix) with ESMTPS id 05B1DB0622; Fri, 10 Apr 2015 15:21:20 +0300 (MSK) Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 8AC52F3A; Fri, 10 Apr 2015 15:21:12 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 787A423EA; Fri, 10 Apr 2015 15:21:15 +0300 (MSK) Date: Fri, 10 Apr 2015 15:21:15 +0300 From: Dmitry Marakasov To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410122115.GC21982@hades.panopticon> References: <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410114337.GB21982@hades.panopticon> <20150410114623.GA12265@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150410114623.GA12265@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 12:21:21 -0000 * Slawa Olhovchenkov (slw@zxy.spb.ru) wrote: > > > What benefits from switching to utf8 locale in 'default' login class? > > > > Ability to work with utf-8 texts and filenames out of box. I won't > > mention how important this is nowadays. > > What you mean? What currenly don't working? Everything. You can't do a thing with utf-8 file unless you set utf-8 locale. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://amdmi3.ru From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 12:26:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD51BDAF; Fri, 10 Apr 2015 12:26:35 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E737DD9; Fri, 10 Apr 2015 12:26:35 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgY11-0004LB-Sh; Fri, 10 Apr 2015 15:26:31 +0300 Date: Fri, 10 Apr 2015 15:26:31 +0300 From: Slawa Olhovchenkov To: Dmitry Marakasov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410122631.GB12265@zxy.spb.ru> References: <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410114337.GB21982@hades.panopticon> <20150410114623.GA12265@zxy.spb.ru> <20150410122115.GC21982@hades.panopticon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410122115.GC21982@hades.panopticon> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 12:26:35 -0000 On Fri, Apr 10, 2015 at 03:21:15PM +0300, Dmitry Marakasov wrote: > * Slawa Olhovchenkov (slw@zxy.spb.ru) wrote: > > > > > What benefits from switching to utf8 locale in 'default' login class? > > > > > > Ability to work with utf-8 texts and filenames out of box. I won't > > > mention how important this is nowadays. > > > > What you mean? What currenly don't working? > > Everything. You can't do a thing with utf-8 file unless you set utf-8 > locale. You are kidding. I can do head and tail to utf-8 file with C locale. I can do truncate. I can copy, compress, decompress and mailing this files. What I need do with this files from default locale, locale assigned to system daemons, daily/weekly/montly jobs? From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 12:36:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1E7C264; Fri, 10 Apr 2015 12:36:42 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86389F23; Fri, 10 Apr 2015 12:36:42 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 108C2B913; Fri, 10 Apr 2015 08:36:41 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Date: Fri, 10 Apr 2015 08:35:43 -0400 Message-ID: <1544429.J8I1RP3MKP@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150410102204.GH99375@FreeBSD.org> References: <20150409220442.GQ8220@zxy.spb.ru> <7D18BE54-E0D3-42D6-A00F-1CF7DE435DD8@freebsd.org> <20150410102204.GH99375@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 10 Apr 2015 08:36:41 -0400 (EDT) Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Stanislav Sedov , Dmitry Marakasov , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 12:36:42 -0000 On Friday, April 10, 2015 01:22:04 PM Gleb Smirnoff wrote: > On Fri, Apr 10, 2015 at 03:02:54AM -0700, Stanislav Sedov wrote: > S> If we add a new, =E2=80=98russian_utf8' login class: > S> * New and existing users created without login class are unaffecte= d; > S> * New users created with the =E2=80=98russian=E2=80=99 class expli= citly > S> set will have KOI-8 encoding enabled; > S> * New users created with the =E2=80=98russian_utf8=E2=80=99 class = explicitly > S> set will have UTF-8 encoding enabled; > S> * Existing russian UTF8 users are unaffected > S> * Existing KOI8-R users are unaffected > S> * Login classes for both UTF8 and KOI8-R are available > S>=20 > S> Am I missing something?=20 >=20 > What if I am 15 year old newbie, who doesn't know all the drama > around 8-bit era. And I read on the Internet, that FreeBSD is > superior to Ubuntu. So I decided to try FreeBSD. What login > class would I choose: russian or russian_utf8? The latter > is something I don't know about, so I will choose the former. >=20 > Also, if we speak about existing installations. Those have > /etc/adduser.conf saved. And new users would be prompted > to be created with 'russian' class, since previous were. > So new users would be created with KOI8-R til end of life > of the box. Eh, that's just a matter of documentation. Just add a comment in /etc/login.conf that "russian_utf8" is the preferred login class, but that "russian" uses something else for legacy reasons. Any user using a non-default login class is already looking at this file anyway. --=20 John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 12:45:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2CA4757; Fri, 10 Apr 2015 12:45:20 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 43D6098; Fri, 10 Apr 2015 12:45:19 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t3ACjGGT001497 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Apr 2015 15:45:16 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t3ACjGbi001496; Fri, 10 Apr 2015 15:45:16 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Apr 2015 15:45:16 +0300 From: Gleb Smirnoff To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410124516.GC883@FreeBSD.org> References: <20150406084937.GX64665@FreeBSD.org> <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410114337.GB21982@hades.panopticon> <20150410114623.GA12265@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410114623.GA12265@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 12:45:20 -0000 On Fri, Apr 10, 2015 at 02:46:23PM +0300, Slawa Olhovchenkov wrote: S> > Ability to work with utf-8 texts and filenames out of box. I won't S> > mention how important this is nowadays. S> S> What you mean? What currenly don't working? I don't even see a good reason to reply to this question, since you would then reply "Wrong". -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 12:47:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 102878D0; Fri, 10 Apr 2015 12:47:34 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 83A3FB7; Fri, 10 Apr 2015 12:47:32 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t3AClUjW001535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Apr 2015 15:47:30 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t3AClUdw001534; Fri, 10 Apr 2015 15:47:30 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Apr 2015 15:47:30 +0300 From: Gleb Smirnoff To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410124730.GD883@FreeBSD.org> References: <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410114337.GB21982@hades.panopticon> <20150410114623.GA12265@zxy.spb.ru> <20150410122115.GC21982@hades.panopticon> <20150410122631.GB12265@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410122631.GB12265@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 12:47:34 -0000 On Fri, Apr 10, 2015 at 03:26:31PM +0300, Slawa Olhovchenkov wrote: S> On Fri, Apr 10, 2015 at 03:21:15PM +0300, Dmitry Marakasov wrote: S> S> > * Slawa Olhovchenkov (slw@zxy.spb.ru) wrote: S> > S> > > > > What benefits from switching to utf8 locale in 'default' login class? S> > > > S> > > > Ability to work with utf-8 texts and filenames out of box. I won't S> > > > mention how important this is nowadays. S> > > S> > > What you mean? What currenly don't working? S> > S> > Everything. You can't do a thing with utf-8 file unless you set utf-8 S> > locale. S> S> You are kidding. S> I can do head and tail to utf-8 file with C locale. S> I can do truncate. S> I can copy, compress, decompress and mailing this files. You can rm and unlink the file! -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 12:48:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D1B9A48; Fri, 10 Apr 2015 12:48:55 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EDE0D0; Fri, 10 Apr 2015 12:48:55 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgYMf-0004jj-39; Fri, 10 Apr 2015 15:48:53 +0300 Date: Fri, 10 Apr 2015 15:48:53 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410124853.GC12265@zxy.spb.ru> References: <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410114337.GB21982@hades.panopticon> <20150410114623.GA12265@zxy.spb.ru> <20150410122115.GC21982@hades.panopticon> <20150410122631.GB12265@zxy.spb.ru> <20150410124730.GD883@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410124730.GD883@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 12:48:55 -0000 On Fri, Apr 10, 2015 at 03:47:30PM +0300, Gleb Smirnoff wrote: > On Fri, Apr 10, 2015 at 03:26:31PM +0300, Slawa Olhovchenkov wrote: > S> On Fri, Apr 10, 2015 at 03:21:15PM +0300, Dmitry Marakasov wrote: > S> > S> > * Slawa Olhovchenkov (slw@zxy.spb.ru) wrote: > S> > > S> > > > > What benefits from switching to utf8 locale in 'default' login class? > S> > > > > S> > > > Ability to work with utf-8 texts and filenames out of box. I won't > S> > > > mention how important this is nowadays. > S> > > > S> > > What you mean? What currenly don't working? > S> > > S> > Everything. You can't do a thing with utf-8 file unless you set utf-8 > S> > locale. > S> > S> You are kidding. > S> I can do head and tail to utf-8 file with C locale. > S> I can do truncate. > S> I can copy, compress, decompress and mailing this files. > > You can rm and unlink the file! Yes. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 12:52:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4830D7E; Fri, 10 Apr 2015 12:52:05 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95D4C198; Fri, 10 Apr 2015 12:52:05 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgYPj-0004oy-LP; Fri, 10 Apr 2015 15:52:03 +0300 Date: Fri, 10 Apr 2015 15:52:03 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410125203.GD12265@zxy.spb.ru> References: <20150406085323.GL23643@zxy.spb.ru> <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410114337.GB21982@hades.panopticon> <20150410114623.GA12265@zxy.spb.ru> <20150410124516.GC883@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410124516.GC883@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 12:52:06 -0000 On Fri, Apr 10, 2015 at 03:45:16PM +0300, Gleb Smirnoff wrote: > On Fri, Apr 10, 2015 at 02:46:23PM +0300, Slawa Olhovchenkov wrote: > S> > Ability to work with utf-8 texts and filenames out of box. I won't > S> > mention how important this is nowadays. > S> > S> What you mean? What currenly don't working? > > I don't even see a good reason to reply to this question, since > you would then reply "Wrong". Because I do all this thinks. Most gnome app repaired by G_FILENAME_ENCODING=KOI8-R. mutt nicely save attachments and etc. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 13:20:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FD88496; Fri, 10 Apr 2015 13:20:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BCE16E8; Fri, 10 Apr 2015 13:20:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3ADKWsC096168; Fri, 10 Apr 2015 13:20:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ADKWu1096167; Fri, 10 Apr 2015 13:20:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201504101320.t3ADKWu1096167@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 10 Apr 2015 13:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281367 - head/sys/dev/usb/serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 13:20:32 -0000 Author: ian Date: Fri Apr 10 13:20:31 2015 New Revision: 281367 URL: https://svnweb.freebsd.org/changeset/base/281367 Log: The "get latency" and "get bitmode" device commands are read operations, not writes. Modified: head/sys/dev/usb/serial/uftdi.c Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Fri Apr 10 10:23:52 2015 (r281366) +++ head/sys/dev/usb/serial/uftdi.c Fri Apr 10 13:20:31 2015 (r281367) @@ -1701,7 +1701,7 @@ uftdi_get_bitmode(struct ucom_softc *uco struct uftdi_softc *sc = ucom->sc_parent; usb_device_request_t req; - req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bmRequestType = UT_READ_VENDOR_DEVICE; req.bRequest = FTDI_SIO_GET_BITMODE; USETW(req.wIndex, sc->sc_ucom.sc_portno); @@ -1738,7 +1738,7 @@ uftdi_get_latency(struct ucom_softc *uco usb_error_t err; uint8_t buf; - req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bmRequestType = UT_READ_VENDOR_DEVICE; req.bRequest = FTDI_SIO_GET_LATENCY; USETW(req.wIndex, sc->sc_ucom.sc_portno); From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 13:26:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24ED28C7; Fri, 10 Apr 2015 13:26:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 101437C5; Fri, 10 Apr 2015 13:26:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3ADQbIl098268; Fri, 10 Apr 2015 13:26:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ADQZhg098252; Fri, 10 Apr 2015 13:26:35 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201504101326.t3ADQZhg098252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 10 Apr 2015 13:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281369 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 13:26:38 -0000 Author: ian Date: Fri Apr 10 13:26:35 2015 New Revision: 281369 URL: https://svnweb.freebsd.org/changeset/base/281369 Log: Add a pmap_kremove_device() to undo mappings made with pmap_kenter_device(). Previously we used pmap_kremove(), but with ARM_NEW_PMAP it does the remove in a way that isn't SMP-coherent (which is appropriate in some circumstances such as mapping/unmapping sf buffers). With matching enter/remove routines for device mappings, each low-level implementation can do the right thing. Reviewed by: Svatopluk Kraus Modified: head/sys/arm/arm/devmap.c head/sys/arm/arm/pmap-v6-new.c head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/pmap.c head/sys/arm/include/pmap-v6.h head/sys/arm/include/pmap.h Modified: head/sys/arm/arm/devmap.c ============================================================================== --- head/sys/arm/arm/devmap.c Fri Apr 10 13:26:05 2015 (r281368) +++ head/sys/arm/arm/devmap.c Fri Apr 10 13:26:35 2015 (r281369) @@ -246,7 +246,7 @@ arm_devmap_vtop(void * vpva, vm_size_t s void * pmap_mapdev(vm_offset_t pa, vm_size_t size) { - vm_offset_t va, tmpva, offset; + vm_offset_t va, offset; void * rva; /* First look in the static mapping table. */ @@ -261,12 +261,7 @@ pmap_mapdev(vm_offset_t pa, vm_size_t si if (!va) panic("pmap_mapdev: Couldn't alloc kernel virtual memory"); - for (tmpva = va; size > 0;) { - pmap_kenter_device(tmpva, pa); - size -= PAGE_SIZE; - tmpva += PAGE_SIZE; - pa += PAGE_SIZE; - } + pmap_kenter_device(va, size, pa); return ((void *)(va + offset)); } @@ -277,25 +272,18 @@ pmap_mapdev(vm_offset_t pa, vm_size_t si void pmap_unmapdev(vm_offset_t va, vm_size_t size) { - vm_offset_t tmpva, offset; - vm_size_t origsize; + vm_offset_t offset; /* Nothing to do if we find the mapping in the static table. */ if (arm_devmap_vtop((void*)va, size) != DEVMAP_PADDR_NOTFOUND) return; - origsize = size; offset = va & PAGE_MASK; va = trunc_page(va); size = round_page(size + offset); - for (tmpva = va; size > 0;) { - pmap_kremove(tmpva); - size -= PAGE_SIZE; - tmpva += PAGE_SIZE; - } - - kva_free(va, origsize); + pmap_kremove_device(va, size); + kva_free(va, size); } #ifdef DDB Modified: head/sys/arm/arm/pmap-v6-new.c ============================================================================== --- head/sys/arm/arm/pmap-v6-new.c Fri Apr 10 13:26:05 2015 (r281368) +++ head/sys/arm/arm/pmap-v6-new.c Fri Apr 10 13:26:35 2015 (r281369) @@ -6051,11 +6051,38 @@ retry: } void -pmap_kenter_device(vm_offset_t va, vm_paddr_t pa) +pmap_kenter_device(vm_offset_t va, vm_size_t size, vm_paddr_t pa) { + vm_offset_t sva; - pmap_kenter_prot_attr(va, pa, PTE2_AP_KRW, PTE2_ATTR_DEVICE); - tlb_flush(va); + KASSERT((size & PAGE_MASK) == 0, + ("%s: device mapping not page-sized", __func__)); + + sva = va; + while (size != 0) { + pmap_kenter_prot_attr(va, pa, PTE2_AP_KRW, PTE2_ATTR_DEVICE); + va += PAGE_SIZE; + pa += PAGE_SIZE; + size -= PAGE_SIZE; + } + tlb_flush_range(sva, va - sva); +} + +void +pmap_kremove_device(vm_offset_t va, vm_size_t size) +{ + vm_offset_t sva; + + KASSERT((size & PAGE_MASK) == 0, + ("%s: device mapping not page-sized", __func__)); + + sva = va; + while (size != 0) { + pmap_kremove(va); + va += PAGE_SIZE; + size -= PAGE_SIZE; + } + tlb_flush_range(sva, va - sva); } void Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Fri Apr 10 13:26:05 2015 (r281368) +++ head/sys/arm/arm/pmap-v6.c Fri Apr 10 13:26:35 2015 (r281369) @@ -2451,10 +2451,36 @@ pmap_kenter_nocache(vm_offset_t va, vm_p } void -pmap_kenter_device(vm_offset_t va, vm_paddr_t pa) +pmap_kenter_device(vm_offset_t va, vm_size_t size, vm_paddr_t pa) { + vm_offset_t sva; - pmap_kenter_internal(va, pa, KENTER_DEVICE); + KASSERT((size & PAGE_MASK) == 0, + ("%s: device mapping not page-sized", __func__)); + + sva = va; + while (size != 0) { + pmap_kenter_internal(va, pa, KENTER_DEVICE); + va += PAGE_SIZE; + pa += PAGE_SIZE; + size -= PAGE_SIZE; + } +} + +void +pmap_kremove_device(vm_offset_t va, vm_size_t size) +{ + vm_offset_t sva; + + KASSERT((size & PAGE_MASK) == 0, + ("%s: device mapping not page-sized", __func__)); + + sva = va; + while (size != 0) { + pmap_kremove(va); + va += PAGE_SIZE; + size -= PAGE_SIZE; + } } void Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Fri Apr 10 13:26:05 2015 (r281368) +++ head/sys/arm/arm/pmap.c Fri Apr 10 13:26:35 2015 (r281369) @@ -2712,14 +2712,36 @@ pmap_kenter_nocache(vm_offset_t va, vm_p } void -pmap_kenter_device(vm_offset_t va, vm_paddr_t pa) +pmap_kenter_device(vm_offset_t va, vm_size_t size, vm_paddr_t pa) { + vm_offset_t sva; - /* - * XXX - Need a way for kenter_internal to handle PTE_DEVICE mapping as - * a potentially different thing than PTE_NOCACHE. - */ - pmap_kenter_internal(va, pa, 0); + KASSERT((size & PAGE_MASK) == 0, + ("%s: device mapping not page-sized", __func__)); + + sva = va; + while (size != 0) { + pmap_kenter_internal(va, pa, 0); + va += PAGE_SIZE; + pa += PAGE_SIZE; + size -= PAGE_SIZE; + } +} + +void +pmap_kremove_device(vm_offset_t va, vm_size_t size) +{ + vm_offset_t sva; + + KASSERT((size & PAGE_MASK) == 0, + ("%s: device mapping not page-sized", __func__)); + + sva = va; + while (size != 0) { + pmap_kremove(va); + va += PAGE_SIZE; + size -= PAGE_SIZE; + } } void Modified: head/sys/arm/include/pmap-v6.h ============================================================================== --- head/sys/arm/include/pmap-v6.h Fri Apr 10 13:26:05 2015 (r281368) +++ head/sys/arm/include/pmap-v6.h Fri Apr 10 13:26:35 2015 (r281369) @@ -190,7 +190,8 @@ void *pmap_mapdev_attr(vm_paddr_t, vm_si boolean_t pmap_page_is_mapped(vm_page_t ); void pmap_page_set_memattr(vm_page_t , vm_memattr_t ); void pmap_unmapdev(vm_offset_t, vm_size_t); -void pmap_kenter_device(vm_offset_t , vm_paddr_t ); +void pmap_kenter_device(vm_offset_t, vm_size_t, vm_paddr_t); +void pmap_kremove_device(vm_offset_t, vm_size_t); void pmap_set_pcb_pagedir(pmap_t , struct pcb *); void pmap_lazyfix_action(void); Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Fri Apr 10 13:26:05 2015 (r281368) +++ head/sys/arm/include/pmap.h Fri Apr 10 13:26:35 2015 (r281369) @@ -258,7 +258,8 @@ void pmap_bootstrap(vm_offset_t firstadd int pmap_change_attr(vm_offset_t, vm_size_t, int); void pmap_kenter(vm_offset_t va, vm_paddr_t pa); void pmap_kenter_nocache(vm_offset_t va, vm_paddr_t pa); -void pmap_kenter_device(vm_offset_t va, vm_paddr_t pa); +void pmap_kenter_device(vm_offset_t, vm_size_t, vm_paddr_t); +void pmap_kremove_device(vm_offset_t, vm_size_t); void *pmap_kenter_temporary(vm_paddr_t pa, int i); void pmap_kenter_user(vm_offset_t va, vm_paddr_t pa); vm_paddr_t pmap_kextract(vm_offset_t va); From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 13:43:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8668C1DC; Fri, 10 Apr 2015 13:43:00 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 08BC3A12; Fri, 10 Apr 2015 13:42:59 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t3ADgoAt001922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Apr 2015 16:42:50 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t3ADgoUK001921; Fri, 10 Apr 2015 16:42:50 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 10 Apr 2015 16:42:50 +0300 From: Gleb Smirnoff To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410134250.GE883@FreeBSD.org> References: <20150409215802.GY21982@hades.panopticon> <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410114337.GB21982@hades.panopticon> <20150410114623.GA12265@zxy.spb.ru> <20150410124516.GC883@FreeBSD.org> <20150410125203.GD12265@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410125203.GD12265@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 13:43:00 -0000 On Fri, Apr 10, 2015 at 03:52:03PM +0300, Slawa Olhovchenkov wrote: S> On Fri, Apr 10, 2015 at 03:45:16PM +0300, Gleb Smirnoff wrote: S> S> > On Fri, Apr 10, 2015 at 02:46:23PM +0300, Slawa Olhovchenkov wrote: S> > S> > Ability to work with utf-8 texts and filenames out of box. I won't S> > S> > mention how important this is nowadays. S> > S> S> > S> What you mean? What currenly don't working? S> > S> > I don't even see a good reason to reply to this question, since S> > you would then reply "Wrong". S> S> Because I do all this thinks. S> Most gnome app repaired by G_FILENAME_ENCODING=KOI8-R. S> mutt nicely save attachments and etc. If you like, we can create russian_koi8-r login class for you, where you will gather all required workarounds to live in KOI8-R. Would be useful if other old timers. To start: russian_koi8-r|Russian Users Accounts in KOI8-R:\ :charset=KOI8-R:\ :lang=ru_RU.KOI-R:\ :setenv=G_FILENAME_ENCODING=KOI8-R:\ :tc=default: Anything else to add there? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 13:50:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49AAE74A; Fri, 10 Apr 2015 13:50:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3557EB73; Fri, 10 Apr 2015 13:50:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3ADowDu011246; Fri, 10 Apr 2015 13:50:58 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ADowWN011245; Fri, 10 Apr 2015 13:50:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201504101350.t3ADowWN011245@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 10 Apr 2015 13:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281371 - head/sys/dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 13:50:58 -0000 Author: ian Date: Fri Apr 10 13:50:57 2015 New Revision: 281371 URL: https://svnweb.freebsd.org/changeset/base/281371 Log: Use OF_getencpropalloc() to handle endianess of the properties. Submitted by: Michal Meloun Modified: head/sys/dev/fdt/fdt_pinctrl.c Modified: head/sys/dev/fdt/fdt_pinctrl.c ============================================================================== --- head/sys/dev/fdt/fdt_pinctrl.c Fri Apr 10 13:28:01 2015 (r281370) +++ head/sys/dev/fdt/fdt_pinctrl.c Fri Apr 10 13:50:57 2015 (r281371) @@ -46,7 +46,7 @@ fdt_pinctrl_configure(device_t client, u char name[16]; snprintf(name, sizeof(name), "pinctrl-%u", index); - nconfigs = OF_getprop_alloc(ofw_bus_get_node(client), name, + nconfigs = OF_getencprop_alloc(ofw_bus_get_node(client), name, sizeof(*configs), (void **)&configs); if (nconfigs < 0) return (ENOENT); @@ -122,12 +122,12 @@ pinctrl_configure_children(device_t pinc if (!fdt_is_enabled(node)) continue; pinctrl_configure_children(pinctrl, node); - nconfigs = OF_getencprop_alloc(node, "pinctrl-0", + nconfigs = OF_getencprop_alloc(node, "pinctrl-0", sizeof(*configs), (void **)&configs); if (nconfigs <= 0) continue; if (bootverbose) { - char name[32]; + char name[32]; OF_getprop(node, "name", &name, sizeof(name)); printf("Processing %d pin-config node(s) in pinctrl-0 for %s\n", nconfigs, name); From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 14:02:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71F4099A; Fri, 10 Apr 2015 14:02:06 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20E06C9A; Fri, 10 Apr 2015 14:02:06 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgZVS-0006Fa-Hk; Fri, 10 Apr 2015 17:02:02 +0300 Date: Fri, 10 Apr 2015 17:02:02 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150410140202.GA18547@zxy.spb.ru> References: <20150409220442.GQ8220@zxy.spb.ru> <20150409232711.GZ21982@hades.panopticon> <20150409234026.GH1394@zxy.spb.ru> <20150410000259.GA21982@hades.panopticon> <20150410070845.GU8220@zxy.spb.ru> <20150410114337.GB21982@hades.panopticon> <20150410114623.GA12265@zxy.spb.ru> <20150410124516.GC883@FreeBSD.org> <20150410125203.GD12265@zxy.spb.ru> <20150410134250.GE883@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150410134250.GE883@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Dmitry Marakasov , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 14:02:06 -0000 On Fri, Apr 10, 2015 at 04:42:50PM +0300, Gleb Smirnoff wrote: > On Fri, Apr 10, 2015 at 03:52:03PM +0300, Slawa Olhovchenkov wrote: > S> On Fri, Apr 10, 2015 at 03:45:16PM +0300, Gleb Smirnoff wrote: > S> > S> > On Fri, Apr 10, 2015 at 02:46:23PM +0300, Slawa Olhovchenkov wrote: > S> > S> > Ability to work with utf-8 texts and filenames out of box. I won't > S> > S> > mention how important this is nowadays. > S> > S> > S> > S> What you mean? What currenly don't working? > S> > > S> > I don't even see a good reason to reply to this question, since > S> > you would then reply "Wrong". > S> > S> Because I do all this thinks. > S> Most gnome app repaired by G_FILENAME_ENCODING=KOI8-R. > S> mutt nicely save attachments and etc. > > If you like, we can create russian_koi8-r login class for you, > where you will gather all required workarounds to live in KOI8-R. > Would be useful if other old timers. > > To start: > > russian_koi8-r|Russian Users Accounts in KOI8-R:\ > :charset=KOI8-R:\ > :lang=ru_RU.KOI-R:\ > :setenv=G_FILENAME_ENCODING=KOI8-R:\ > :tc=default: > > Anything else to add there? Or we can create russian_utf8 login class for you. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 16:06:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53632D88; Fri, 10 Apr 2015 16:06:16 +0000 (UTC) Received: from mail-ob0-x22a.google.com (mail-ob0-x22a.google.com [IPv6:2607:f8b0:4003:c01::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12291DB6; Fri, 10 Apr 2015 16:06:16 +0000 (UTC) Received: by oblw8 with SMTP id w8so22241240obl.0; Fri, 10 Apr 2015 09:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=XnWPih0pwsF6GIt5cEYrk4xflrpoSIeQrzGgcNMHLF8=; b=r5CrU7EHrFs8Ggv0/TaN8MjqfZsxWyNGEluprJSMqObOtct8DY+Hodvvl3f/wLMwzQ zDuY386QPEW2F51YazVcHU3FPlz+zfgltrvcYCWL7lJ+747/CXD3OoAlXv+EQg2wXb1o HYGoYqygeDQvidnSILugrmtnsj0k8xhBYhpm/LQoqunEziCi7mZdXjW39f2M7m/3x4Ng dsPlAuYoc+2KlWCEnO5/rEYUsjw8rsnf7eodd3xD01bsHKTdlmhfialHlMgLp05xYQdr hPhS1d81AXtOfehFeIBv0F2yFphT1hOLqJ3zB0PeryCvkDXmwgykCJ4mwhHwQwU+pPP4 mUvQ== X-Received: by 10.182.5.4 with SMTP id o4mr2816402obo.67.1428681975199; Fri, 10 Apr 2015 09:06:15 -0700 (PDT) MIME-Version: 1.0 Sender: rionda@gmail.com Received: by 10.182.180.110 with HTTP; Fri, 10 Apr 2015 09:05:54 -0700 (PDT) In-Reply-To: <201504091803.t39I3R4Y042146@svn.freebsd.org> References: <201504091803.t39I3R4Y042146@svn.freebsd.org> From: Matteo Riondato Date: Fri, 10 Apr 2015 12:05:54 -0400 X-Google-Sender-Auth: CBfZ3QOqUT1cLQ9TQ-TF7qy-Vqs Message-ID: Subject: Re: svn commit: r281316 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/common contrib/xz/src/liblzma/lz contrib/xz/src/liblzma/lzma contrib/xz/src/xz... To: Xin LI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 16:06:16 -0000 Could this update be causing this error when trying to upgrade the installed packages using "pkg upgrade" ? [1/27] Extracting glib-2.42.2: 99% pkg: archive_read_extract(): Lzma library error: Corrupted input data [1/27] Extracting glib-2.42.2: 100% [1/27] Deleting files for glib-2.42.2: 100% ? I tried removing the fetched archives from /var/cache/pkg and having pkg fetch them again, so that doesn't seem to be the issue. Best, Matteo On Thu, Apr 9, 2015 at 2:03 PM, Xin LI wrote: > Author: delphij > Date: Thu Apr 9 18:03:27 2015 > New Revision: 281316 > URL: https://svnweb.freebsd.org/changeset/base/281316 > > Log: > MFV r281278: > > - Update xz to 5.2.1, where the most visible change is that it > fixed a compression-ratio regression in fast mode LZMA1 and > LZMA2 and used cpuset_getaffinity() for CPU cores detection. > - Make liblzma use the base system SHA256 implementation instead of > the bundled one. > - Additional annotation in config.h for FreeBSD specific tweaks. > - Refresh symbols in XZprivate_1.0 to reflect reality. > > Relnotes: yes > MFC after: 1 month (TBD) > > Modified: > head/contrib/xz/ChangeLog > head/contrib/xz/THANKS > head/contrib/xz/src/common/tuklib_cpucores.c > head/contrib/xz/src/common/tuklib_integer.h > head/contrib/xz/src/liblzma/api/lzma/version.h > head/contrib/xz/src/liblzma/common/memcmplen.h > head/contrib/xz/src/liblzma/lz/lz_encoder.c > head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c > head/contrib/xz/src/xz/file_io.c > head/lib/liblzma/Makefile > head/lib/liblzma/Symbol.map > head/lib/liblzma/config.h > Directory Properties: > head/contrib/xz/ (props changed) > > Modified: head/contrib/xz/ChangeLog > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/xz/ChangeLog Thu Apr 9 17:56:25 2015 (r281315) > +++ head/contrib/xz/ChangeLog Thu Apr 9 18:03:27 2015 (r281316) > @@ -1,3 +1,233 @@ > +commit dec11497a71518423b5ff0e759100cf8aadf6c7b > +Author: Lasse Collin > +Date: 2015-02-26 16:53:44 +0200 > + > + Bump version and soname for 5.2.1. > + > + src/liblzma/Makefile.am | 2 +- > + src/liblzma/api/lzma/version.h | 2 +- > + 2 files changed, 2 insertions(+), 2 deletions(-) > + > +commit 29e39c79975ab89ee5dd671e97064534a9f3a649 > +Author: Lasse Collin > +Date: 2015-02-26 13:01:09 +0200 > + > + Update NEWS for 5.2.1. > + > + NEWS | 14 ++++++++++++++ > + 1 file changed, 14 insertions(+) > + > +commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd > +Author: Lasse Collin > +Date: 2015-02-22 19:38:48 +0200 > + > + xz: Use pipe2() if available. > + > + configure.ac | 4 ++-- > + src/xz/file_io.c | 9 ++++++++- > + 2 files changed, 10 insertions(+), 3 deletions(-) > + > +commit 117d962685c72682c63edc9bb765367189800202 > +Author: Lasse Collin > +Date: 2015-02-21 23:40:26 +0200 > + > + liblzma: Fix a compression-ratio regression in LZMA1/2 in fast mode. > + > + The bug was added in the commit > + f48fce093b07aeda95c18850f5e086d9f2383380 and thus > + affected 5.1.4beta and 5.2.0. Luckily the bug cannot > + cause data corruption or other nasty things. > + > + src/liblzma/lzma/lzma_encoder_optimum_fast.c | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +commit ae984e31c167d3bc52972ec422dd1ebd5f5d5719 > +Author: Lasse Collin > +Date: 2015-02-21 23:00:19 +0200 > + > + xz: Fix the fcntl() usage when creating a pipe for the self-pipe tri= ck. > + > + Now it reads the old flags instead of blindly setting O_NONBLOCK. > + The old code may have worked correctly, but this is better. > + > + src/xz/file_io.c | 16 +++++++++++----- > + 1 file changed, 11 insertions(+), 5 deletions(-) > + > +commit 2205bb5853098aea36a56df6f5747037175f66b4 > +Author: Lasse Collin > +Date: 2015-02-10 15:29:34 +0200 > + > + Update THANKS. > + > + THANKS | 1 + > + 1 file changed, 1 insertion(+) > + > +commit d935b0cdf3db440269b9d952b2b281b18f8c7b08 > +Author: Lasse Collin > +Date: 2015-02-10 15:28:30 +0200 > + > + tuklib_cpucores: Use cpuset_getaffinity() on FreeBSD if available. > + > + In FreeBSD, cpuset_getaffinity() is the preferred way to get > + the number of available cores. > + > + Thanks to Rui Paulo for the patch. I edited it slightly, but > + hopefully I didn't break anything. > + > + m4/tuklib_cpucores.m4 | 23 ++++++++++++++++++++++- > + src/common/tuklib_cpucores.c | 18 ++++++++++++++++++ > + 2 files changed, 40 insertions(+), 1 deletion(-) > + > +commit eb61bc58c20769cac4d05f363b9c0e8c9c71a560 > +Author: Lasse Collin > +Date: 2015-02-09 22:08:37 +0200 > + > + xzdiff: Make the mktemp usage compatible with FreeBSD's mktemp. > + > + Thanks to Rui Paulo for the fix. > + > + src/scripts/xzdiff.in | 7 ++++++- > + 1 file changed, 6 insertions(+), 1 deletion(-) > + > +commit b9a5b6b7a29029680af733082b6a46e0fc01623a > +Author: Lasse Collin > +Date: 2015-02-03 21:45:53 +0200 > + > + Add a few casts to tuklib_integer.h to silence possible warnings. > + > + I heard that Visual Studio 2013 gave warnings without the casts. > + > + Thanks to Gabi Davar. > + > + src/common/tuklib_integer.h | 24 ++++++++++++------------ > + 1 file changed, 12 insertions(+), 12 deletions(-) > + > +commit c45757135f40e4a0de730ba5fff0100219493982 > +Author: Lasse Collin > +Date: 2015-01-26 21:24:39 +0200 > + > + liblzma: Set LZMA_MEMCMPLEN_EXTRA depending on the compare method. > + > + src/liblzma/common/memcmplen.h | 15 ++++++++++----- > + 1 file changed, 10 insertions(+), 5 deletions(-) > + > +commit 3c500174ed5485f550972a2a6109c361e875f069 > +Author: Lasse Collin > +Date: 2015-01-26 20:40:16 +0200 > + > + Update THANKS. > + > + THANKS | 1 + > + 1 file changed, 1 insertion(+) > + > +commit fec88d41e672d9e197c9442aecf02bd0dfa6d516 > +Author: Lasse Collin > +Date: 2015-01-26 20:39:28 +0200 > + > + liblzma: Silence harmless Valgrind errors. > + > + Thanks to Torsten Rupp for reporting this. I had > + forgotten to run Valgrind before the 5.2.0 release. > + > + src/liblzma/lz/lz_encoder.c | 6 ++++++ > + 1 file changed, 6 insertions(+) > + > +commit a9b45badfec0928d20a27c7176c005fa637f7d1e > +Author: Lasse Collin > +Date: 2015-01-09 21:50:19 +0200 > + > + xz: Fix comments. > + > + src/xz/file_io.c | 12 ++++++++---- > + 1 file changed, 8 insertions(+), 4 deletions(-) > + > +commit 541aee6dd4aa97a809aba281475a21b641bb89e2 > +Author: Lasse Collin > +Date: 2015-01-09 21:35:06 +0200 > + > + Update THANKS. > + > + THANKS | 1 + > + 1 file changed, 1 insertion(+) > + > +commit 4170edc914655310d2363baccf5e615e09b04911 > +Author: Lasse Collin > +Date: 2015-01-09 21:34:06 +0200 > + > + xz: Don't fail if stdout doesn't support O_NONBLOCK. > + > + This is similar to the case with stdin. > + > + Thanks to Brad Smith for the bug report and testing > + on OpenBSD. > + > + src/xz/file_io.c | 36 +++++++++++++++--------------------- > + 1 file changed, 15 insertions(+), 21 deletions(-) > + > +commit 04bbc0c2843c50c8ad1cba42b937118e38b0508d > +Author: Lasse Collin > +Date: 2015-01-07 19:18:20 +0200 > + > + xz: Fix a memory leak in DOS-specific code. > + > + src/xz/file_io.c | 2 ++ > + 1 file changed, 2 insertions(+) > + > +commit f0f1f6c7235ffa901cf76fe18e33749e200b3eea > +Author: Lasse Collin > +Date: 2015-01-07 19:08:06 +0200 > + > + xz: Don't fail if stdin doesn't support O_NONBLOCK. > + > + It's a problem at least on OpenBSD which doesn't support > + O_NONBLOCK on e.g. /dev/null. I'm not surprised if it's > + a problem on other OSes too since this behavior is allowed > + in POSIX-1.2008. > + > + The code relying on this behavior was committed in June 2013 > + and included in 5.1.3alpha released on 2013-10-26. Clearly > + the development releases only get limited testing. > + > + src/xz/file_io.c | 18 +++++++----------- > + 1 file changed, 7 insertions(+), 11 deletions(-) > + > +commit d2d484647d9d9d679f03c75abb0404f67069271c > +Author: Lasse Collin > +Date: 2015-01-06 20:30:15 +0200 > + > + Tests: Don't hide unexpected error messages in test_files.sh. > + > + Hiding them makes no sense since normally there's no error > + when testing the "good" files. With "bad" files errors are > + expected and then it makes sense to keep the messages hidden. > + > + tests/test_files.sh | 4 ++-- > + 1 file changed, 2 insertions(+), 2 deletions(-) > + > +commit aae6a6aeda51cf94a47e39ad624728f9bee75e30 > +Author: Lasse Collin > +Date: 2014-12-30 11:17:16 +0200 > + > + Update Solaris notes in INSTALL. > + > + Mention the possible "make check" failure on Solaris in the > + Solaris-specific section of INSTALL. It was already in > + section 4.5 but it is better mention it in the OS-specific > + section too. > + > + INSTALL | 4 ++++ > + 1 file changed, 4 insertions(+) > + > +commit 7815112153178800a3521b9f31960e7cdc26cfba > +Author: Lasse Collin > +Date: 2014-12-26 12:00:05 +0200 > + > + Build: POSIX shell isn't required if scripts are disabled. > + > + INSTALL | 3 ++- > + configure.ac | 2 +- > + 2 files changed, 3 insertions(+), 2 deletions(-) > + > commit a0cd05ee71d330b79ead6eb9222e1b24e1559d3a > Author: Lasse Collin > Date: 2014-12-21 20:48:37 +0200 > > Modified: head/contrib/xz/THANKS > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/xz/THANKS Thu Apr 9 17:56:25 2015 (r281315) > +++ head/contrib/xz/THANKS Thu Apr 9 18:03:27 2015 (r281316) > @@ -67,6 +67,7 @@ has been important. :-) In alphabetical > - Andre Noll > - Peter O'Gorman > - Peter Pallinger > + - Rui Paulo > - Igor Pavlov > - Diego Elio Petten=C3=B2 > - Elbert Pol > @@ -78,12 +79,14 @@ has been important. :-) In alphabetical > - Eric S. Raymond > - Cristian Rodr=C3=ADguez > - Christian von Roques > + - Torsten Rupp > - Jukka Salmi > - Alexandre Sauv=C3=A9 > - Benno Schulenberg > - Andreas Schwab > - Dan Shechter > - Stuart Shelton > + - Brad Smith > - Jonathan Stott > - Dan Stromberg > - Vincent Torri > > Modified: head/contrib/xz/src/common/tuklib_cpucores.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/xz/src/common/tuklib_cpucores.c Thu Apr 9 17:56:= 25 2015 (r281315) > +++ head/contrib/xz/src/common/tuklib_cpucores.c Thu Apr 9 18:03:= 27 2015 (r281316) > @@ -18,6 +18,11 @@ > # endif > # include > > +// FreeBSD > +#elif defined(TUKLIB_CPUCORES_CPUSET) > +# include > +# include > + > #elif defined(TUKLIB_CPUCORES_SYSCTL) > # ifdef HAVE_SYS_PARAM_H > # include > @@ -44,6 +49,19 @@ tuklib_cpucores(void) > GetSystemInfo(&sysinfo); > ret =3D sysinfo.dwNumberOfProcessors; > > +#elif defined(TUKLIB_CPUCORES_CPUSET) > + cpuset_t set; > + if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, > + sizeof(set), &set) =3D=3D 0) { > +# ifdef CPU_COUNT > + ret =3D CPU_COUNT(&set); > +# else > + for (unsigned i =3D 0; i < CPU_SETSIZE; ++i) > + if (CPU_ISSET(i, &set)) > + ++ret; > +# endif > + } > + > #elif defined(TUKLIB_CPUCORES_SYSCTL) > int name[2] =3D { CTL_HW, HW_NCPU }; > int cpus; > > Modified: head/contrib/xz/src/common/tuklib_integer.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/xz/src/common/tuklib_integer.h Thu Apr 9 17:56:25 2015 = (r281315) > +++ head/contrib/xz/src/common/tuklib_integer.h Thu Apr 9 18:03:27 2015 = (r281316) > @@ -321,8 +321,8 @@ unaligned_read32le(const uint8_t *buf) > static inline void > unaligned_write16be(uint8_t *buf, uint16_t num) > { > - buf[0] =3D num >> 8; > - buf[1] =3D num; > + buf[0] =3D (uint8_t)(num >> 8); > + buf[1] =3D (uint8_t)num; > return; > } > > @@ -330,8 +330,8 @@ unaligned_write16be(uint8_t *buf, uint16 > static inline void > unaligned_write16le(uint8_t *buf, uint16_t num) > { > - buf[0] =3D num; > - buf[1] =3D num >> 8; > + buf[0] =3D (uint8_t)num; > + buf[1] =3D (uint8_t)(num >> 8); > return; > } > > @@ -339,10 +339,10 @@ unaligned_write16le(uint8_t *buf, uint16 > static inline void > unaligned_write32be(uint8_t *buf, uint32_t num) > { > - buf[0] =3D num >> 24; > - buf[1] =3D num >> 16; > - buf[2] =3D num >> 8; > - buf[3] =3D num; > + buf[0] =3D (uint8_t)(num >> 24); > + buf[1] =3D (uint8_t)(num >> 16); > + buf[2] =3D (uint8_t)(num >> 8); > + buf[3] =3D (uint8_t)num; > return; > } > > @@ -350,10 +350,10 @@ unaligned_write32be(uint8_t *buf, uint32 > static inline void > unaligned_write32le(uint8_t *buf, uint32_t num) > { > - buf[0] =3D num; > - buf[1] =3D num >> 8; > - buf[2] =3D num >> 16; > - buf[3] =3D num >> 24; > + buf[0] =3D (uint8_t)num; > + buf[1] =3D (uint8_t)(num >> 8); > + buf[2] =3D (uint8_t)(num >> 16); > + buf[3] =3D (uint8_t)(num >> 24); > return; > } > > > Modified: head/contrib/xz/src/liblzma/api/lzma/version.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/xz/src/liblzma/api/lzma/version.h Thu Apr 9 17:56:= 25 2015 (r281315) > +++ head/contrib/xz/src/liblzma/api/lzma/version.h Thu Apr 9 18:03:= 27 2015 (r281316) > @@ -22,7 +22,7 @@ > */ > #define LZMA_VERSION_MAJOR 5 > #define LZMA_VERSION_MINOR 2 > -#define LZMA_VERSION_PATCH 0 > +#define LZMA_VERSION_PATCH 1 > #define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE > > #ifndef LZMA_VERSION_COMMIT > > Modified: head/contrib/xz/src/liblzma/common/memcmplen.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/xz/src/liblzma/common/memcmplen.h Thu Apr 9 17:56:= 25 2015 (r281315) > +++ head/contrib/xz/src/liblzma/common/memcmplen.h Thu Apr 9 18:03:= 27 2015 (r281316) > @@ -19,11 +19,6 @@ > # include > #endif > > -/// How many extra bytes lzma_memcmplen() may read. This depends on > -/// the method but since it is just a few bytes the biggest possible > -/// value is used here. > -#define LZMA_MEMCMPLEN_EXTRA 16 > - > > /// Find out how many equal bytes the two buffers have. > /// > @@ -39,6 +34,11 @@ > /// > /// \return Number of equal bytes in the buffers is returned. > /// This is always at least len and at most limit. > +/// > +/// \note LZMA_MEMCMPLEN_EXTRA defines how many extra bytes may be= read. > +/// It's rounded up to 2^n. This extra amount needs to be > +/// allocated in the buffers being used. It needs to be > +/// initialized too to keep Valgrind quiet. > static inline uint32_t lzma_attribute((__always_inline__)) > lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2, > uint32_t len, uint32_t limit) > @@ -59,6 +59,7 @@ lzma_memcmplen(const uint8_t *buf1, cons > // to be a good method. This may be fine on other 64-bit CPUs too= . > // On big endian one should use xor instead of subtraction and sw= itch > // to __builtin_clzll(). > +#define LZMA_MEMCMPLEN_EXTRA 8 > while (len < limit) { > const uint64_t x =3D *(const uint64_t *)(buf1 + len) > - *(const uint64_t *)(buf2 + len); > @@ -91,6 +92,7 @@ lzma_memcmplen(const uint8_t *buf1, cons > // version is sometimes significantly faster and sometimes > // slightly slower than this SSE2 version, so this SSE2 > // version isn't used on x86-64. > +# define LZMA_MEMCMPLEN_EXTRA 16 > while (len < limit) { > const uint32_t x =3D 0xFFFF ^ _mm_movemask_epi8(_mm_cmpeq= _epi8( > _mm_loadu_si128((const __m128i *)(buf1 + len)), > @@ -116,6 +118,7 @@ lzma_memcmplen(const uint8_t *buf1, cons > > #elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) && !defined(WORDS_BIGENDIAN) > // Generic 32-bit little endian method > +# define LZMA_MEMCMPLEN_EXTRA 4 > while (len < limit) { > uint32_t x =3D *(const uint32_t *)(buf1 + len) > - *(const uint32_t *)(buf2 + len); > @@ -138,6 +141,7 @@ lzma_memcmplen(const uint8_t *buf1, cons > > #elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) && defined(WORDS_BIGENDIAN) > // Generic 32-bit big endian method > +# define LZMA_MEMCMPLEN_EXTRA 4 > while (len < limit) { > uint32_t x =3D *(const uint32_t *)(buf1 + len) > ^ *(const uint32_t *)(buf2 + len); > @@ -160,6 +164,7 @@ lzma_memcmplen(const uint8_t *buf1, cons > > #else > // Simple portable version that doesn't use unaligned access. > +# define LZMA_MEMCMPLEN_EXTRA 0 > while (len < limit && buf1[len] =3D=3D buf2[len]) > ++len; > > > Modified: head/contrib/xz/src/liblzma/lz/lz_encoder.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/xz/src/liblzma/lz/lz_encoder.c Thu Apr 9 17:56:25 2015 = (r281315) > +++ head/contrib/xz/src/liblzma/lz/lz_encoder.c Thu Apr 9 18:03:27 2015 = (r281316) > @@ -110,6 +110,12 @@ fill_window(lzma_coder *coder, const lzm > > coder->mf.write_pos =3D write_pos; > > + // Silence Valgrind. lzma_memcmplen() can read extra bytes > + // and Valgrind will give warnings if those bytes are uninitializ= ed > + // because Valgrind cannot see that the values of the uninitializ= ed > + // bytes are eventually ignored. > + memzero(coder->mf.buffer + write_pos, LZMA_MEMCMPLEN_EXTRA); > + > // If end of stream has been reached or flushing completed, we al= low > // the encoder to process all the input (that is, read_pos is all= owed > // to reach write_pos). Otherwise we keep keep_size_after bytes > > Modified: head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c T= hu Apr 9 17:56:25 2015 (r281315) > +++ head/contrib/xz/src/liblzma/lzma/lzma_encoder_optimum_fast.c T= hu Apr 9 18:03:27 2015 (r281316) > @@ -152,7 +152,7 @@ lzma_lzma_optimum_fast(lzma_coder *restr > // the old buf pointer instead of recalculating it with mf_ptr(). > ++buf; > > - const uint32_t limit =3D len_main - 1; > + const uint32_t limit =3D my_max(2, len_main - 1); > > for (uint32_t i =3D 0; i < REPS; ++i) { > if (memcmp(buf, buf - coder->reps[i] - 1, limit) =3D=3D 0= ) { > > Modified: head/contrib/xz/src/xz/file_io.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/xz/src/xz/file_io.c Thu Apr 9 17:56:25 2015 (= r281315) > +++ head/contrib/xz/src/xz/file_io.c Thu Apr 9 18:03:27 2015 (= r281316) > @@ -82,13 +82,26 @@ io_init(void) > // we are root. > warn_fchown =3D geteuid() =3D=3D 0; > > - if (pipe(user_abort_pipe) > - || fcntl(user_abort_pipe[0], F_SETFL, O_NONBLOCK) > - =3D=3D -1 > - || fcntl(user_abort_pipe[1], F_SETFL, O_NONBLOCK) > - =3D=3D -1) > + // Create a pipe for the self-pipe trick. If pipe2() is available= , > + // we can avoid the fcntl() calls. > +# ifdef HAVE_PIPE2 > + if (pipe2(user_abort_pipe, O_NONBLOCK)) > message_fatal(_("Error creating a pipe: %s"), > strerror(errno)); > +# else > + if (pipe(user_abort_pipe)) > + message_fatal(_("Error creating a pipe: %s"), > + strerror(errno)); > + > + // Make both ends of the pipe non-blocking. > + for (unsigned i =3D 0; i < 2; ++i) { > + int flags =3D fcntl(user_abort_pipe[i], F_GETFL); > + if (flags =3D=3D -1 || fcntl(user_abort_pipe[i], F_SETFL, > + flags | O_NONBLOCK) =3D=3D -1) > + message_fatal(_("Error creating a pipe: %s"), > + strerror(errno)); > + } > +# endif > #endif > > #ifdef __DJGPP__ > @@ -393,7 +406,11 @@ io_open_src_real(file_pair *pair) > #ifdef TUKLIB_DOSLIKE > setmode(STDIN_FILENO, O_BINARY); > #else > - // Enable O_NONBLOCK for stdin. > + // Try to set stdin to non-blocking mode. It won't work > + // e.g. on OpenBSD if stdout is e.g. /dev/null. In such > + // case we proceed as if stdin were non-blocking anyway > + // (in case of /dev/null it will be in practice). The > + // same applies to stdout in io_open_dest_real(). > stdin_flags =3D fcntl(STDIN_FILENO, F_GETFL); > if (stdin_flags =3D=3D -1) { > message_error(_("Error getting the file status fl= ags " > @@ -402,17 +419,10 @@ io_open_src_real(file_pair *pair) > return true; > } > > - if ((stdin_flags & O_NONBLOCK) =3D=3D 0) { > - if (fcntl(STDIN_FILENO, F_SETFL, > - stdin_flags | O_NONBLOCK) =3D=3D = -1) { > - message_error(_("Error setting O_NONBLOCK= " > - "on standard input: %s"), > - strerror(errno)); > - return true; > - } > - > + if ((stdin_flags & O_NONBLOCK) =3D=3D 0 > + && fcntl(STDIN_FILENO, F_SETFL, > + stdin_flags | O_NONBLOCK) !=3D -1= ) > restore_stdin_flags =3D true; > - } > #endif > #ifdef HAVE_POSIX_FADVISE > // It will fail if stdin is a pipe and that's fine. > @@ -705,7 +715,10 @@ io_open_dest_real(file_pair *pair) > #ifdef TUKLIB_DOSLIKE > setmode(STDOUT_FILENO, O_BINARY); > #else > - // Set O_NONBLOCK if it isn't already set. > + // Try to set O_NONBLOCK if it isn't already set. > + // If it fails, we assume that stdout is non-blocking > + // in practice. See the comments in io_open_src_real() > + // for similar situation with stdin. > // > // NOTE: O_APPEND may be unset later in this function > // and it relies on stdout_flags being set here. > @@ -717,17 +730,10 @@ io_open_dest_real(file_pair *pair) > return true; > } > > - if ((stdout_flags & O_NONBLOCK) =3D=3D 0) { > - if (fcntl(STDOUT_FILENO, F_SETFL, > - stdout_flags | O_NONBLOCK) =3D=3D= -1) { > - message_error(_("Error setting O_NONBLOCK= " > - "on standard output: %s")= , > - strerror(errno)); > - return true; > - } > - > - restore_stdout_flags =3D true; > - } > + if ((stdout_flags & O_NONBLOCK) =3D=3D 0 > + && fcntl(STDOUT_FILENO, F_SETFL, > + stdout_flags | O_NONBLOCK) !=3D -= 1) > + restore_stdout_flags =3D true; > #endif > } else { > pair->dest_name =3D suffix_get_dest_name(pair->src_name); > @@ -742,6 +748,7 @@ io_open_dest_real(file_pair *pair) > message_error("%s: Refusing to write to " > "a DOS special file", > pair->dest_name); > + free(pair->dest_name); > return true; > } > > @@ -751,6 +758,7 @@ io_open_dest_real(file_pair *pair) > message_error("%s: Output file is the sam= e " > "as the input file", > pair->dest_name); > + free(pair->dest_name); > return true; > } > } > @@ -829,23 +837,24 @@ io_open_dest_real(file_pair *pair) > if (lseek(STDOUT_FILENO, 0, SEEK_END) =3D= =3D -1) > return false; > > - // O_NONBLOCK was set earlier in this fun= ction > - // so it must be kept here too. If this > - // fcntl() call fails, we continue but wo= n't > + // Construct the new file status flags. > + // If O_NONBLOCK was set earlier in this > + // function, it must be kept here too. > + int flags =3D stdout_flags & ~O_APPEND; > + if (restore_stdout_flags) > + flags |=3D O_NONBLOCK; > + > + // If this fcntl() fails, we continue but= won't > // try to create sparse output. The origi= nal > // flags will still be restored if needed= (to > // unset O_NONBLOCK) when the file is fin= ished. > - if (fcntl(STDOUT_FILENO, F_SETFL, > - (stdout_flags | O_NONBLOC= K) > - & ~O_APPEND) =3D=3D -1) > + if (fcntl(STDOUT_FILENO, F_SETFL, flags) = =3D=3D -1) > return false; > > // Disabling O_APPEND succeeded. Mark > // that the flags should be restored > - // in io_close_dest(). This quite likely = was > - // already set when enabling O_NONBLOCK b= ut > - // just in case O_NONBLOCK was already se= t, > - // set this again here. > + // in io_close_dest(). (This may have alr= eady > + // been set when enabling O_NONBLOCK.) > restore_stdout_flags =3D true; > > } else if (lseek(STDOUT_FILENO, 0, SEEK_CUR) > > Modified: head/lib/liblzma/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/liblzma/Makefile Thu Apr 9 17:56:25 2015 (r281315) > +++ head/lib/liblzma/Makefile Thu Apr 9 18:03:27 2015 (r281316) > @@ -77,8 +77,7 @@ SRCS+=3D common.c \ > .PATH: ${LZMADIR}/check > SRCS+=3D check.c \ > crc32_table.c \ > - crc64_table.c \ > - sha256.c > + crc64_table.c > .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} =3D=3D "i386" > SRCS+=3D crc32_x86.S \ > crc64_x86.S > @@ -146,7 +145,7 @@ CFLAGS+=3D -DHAVE_CONFIG_H \ > -I${LZMADIR}/simple \ > -I${LZMADIR}/../common > > -LIBADD+=3D pthread > +LIBADD+=3D md pthread > > VERSION_DEF=3D ${.CURDIR}/Versions.def > SYMBOL_MAPS=3D ${.CURDIR}/Symbol.map > > Modified: head/lib/liblzma/Symbol.map > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/liblzma/Symbol.map Thu Apr 9 17:56:25 2015 (r281315) > +++ head/lib/liblzma/Symbol.map Thu Apr 9 18:03:27 2015 (r281316) > @@ -108,7 +108,9 @@ XZ_5.2 { > > XZprivate_1.0 { > lzma_alloc; > + lzma_alloc_zero; > lzma_alone_decoder_init; > + lzma_block_buffer_bound64; > lzma_block_decoder_init; > lzma_block_encoder_init; > lzma_bufcpy; > @@ -131,6 +133,7 @@ XZprivate_1.0 { > lzma_lz_decoder_uncompressed; > lzma_lz_encoder_init; > lzma_lz_encoder_memusage; > + lzma_lzma2_block_size; > lzma_lzma2_decoder_init; > lzma_lzma2_decoder_memusage; > lzma_lzma2_encoder_init; > @@ -163,16 +166,20 @@ XZprivate_1.0 { > lzma_mf_hc3_skip; > lzma_mf_hc4_find; > lzma_mf_hc4_skip; > + lzma_mt_block_size; > lzma_next_end; > lzma_next_filter_init; > lzma_next_filter_update; > + lzma_outq_end; > + lzma_outq_get_buf; > + lzma_outq_init; > + lzma_outq_is_readable; > + lzma_outq_memusage; > + lzma_outq_read; > lzma_raw_coder_init; > lzma_raw_coder_memusage; > lzma_raw_decoder_init; > lzma_raw_encoder_init; > - lzma_sha256_finish; > - lzma_sha256_init; > - lzma_sha256_update; > lzma_simple_arm_decoder_init; > lzma_simple_arm_encoder_init; > lzma_simple_armthumb_decoder_init; > @@ -190,7 +197,7 @@ XZprivate_1.0 { > lzma_simple_x86_decoder_init; > lzma_simple_x86_encoder_init; > lzma_stream_decoder_init; > - lzma_stream_encoder_init; > lzma_strm_init; > + lzma_tuklib_cpucores; > lzma_tuklib_physmem; > }; > > Modified: head/lib/liblzma/config.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/liblzma/config.h Thu Apr 9 17:56:25 2015 (r281315) > +++ head/lib/liblzma/config.h Thu Apr 9 18:03:27 2015 (r281316) > @@ -1,95 +1,424 @@ > /* $FreeBSD$ */ > +/* config.h. Generated from config.h.in by configure. */ > +/* config.h.in. Generated from configure.ac by autoheader. */ > + > +/* Define if building universal (internal helper macro) */ > +/* #undef AC_APPLE_UNIVERSAL_BUILD */ > + > +/* How many MiB of RAM to assume if the real amount cannot be determined= . */ > #define ASSUME_RAM 128 > + > +/* Define to 1 if translation of program messages to the user's native > + language is requested. */ > +/* FreeBSD - disabled intentionally */ > +/* #undef ENABLE_NLS */ > + > +/* Define to 1 if bswap_16 is available. */ > +/* #undef HAVE_BSWAP_16 */ > + > +/* Define to 1 if bswap_32 is available. */ > +/* #undef HAVE_BSWAP_32 */ > + > +/* Define to 1 if bswap_64 is available. */ > +/* #undef HAVE_BSWAP_64 */ > + > +/* Define to 1 if you have the header file. */ > +/* #undef HAVE_BYTESWAP_H */ > + > +/* Define to 1 if the system has the type `CC_SHA256_CTX'. */ > +/* #undef HAVE_CC_SHA256_CTX */ > + > +/* Define to 1 if you have the `CC_SHA256_Init' function. */ > +/* #undef HAVE_CC_SHA256_INIT */ > + > +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in t= he > + CoreFoundation framework. */ > +/* #undef HAVE_CFLOCALECOPYCURRENT */ > + > +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValu= e in > + the CoreFoundation framework. */ > +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ > + > +/* Define to 1 if crc32 integrity check is enabled. */ > #define HAVE_CHECK_CRC32 1 > + > +/* Define to 1 if crc64 integrity check is enabled. */ > #define HAVE_CHECK_CRC64 1 > + > +/* Define to 1 if sha256 integrity check is enabled. */ > #define HAVE_CHECK_SHA256 1 > + > +/* Define to 1 if you have the `clock_gettime' function. */ > #define HAVE_CLOCK_GETTIME 1 > + > +/* Define to 1 if you have the header file= . */ > +/* #undef HAVE_COMMONCRYPTO_COMMONDIGEST_H */ > + > +/* Define if the GNU dcgettext() function is already present or preinsta= lled. > + */ > +/* FreeBSD - disabled intentionally */ > +/* #undef HAVE_DCGETTEXT */ > + > +/* Define to 1 if you have the declaration of `CLOCK_MONOTONIC', and to = 0 if > + you don't. */ > #define HAVE_DECL_CLOCK_MONOTONIC 1 > + > +/* Define to 1 if you have the declaration of `program_invocation_name',= and > + to 0 if you don't. */ > #define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 > + > +/* Define to 1 if arm decoder is enabled. */ > #define HAVE_DECODER_ARM 1 > + > +/* Define to 1 if armthumb decoder is enabled. */ > #define HAVE_DECODER_ARMTHUMB 1 > + > +/* Define to 1 if delta decoder is enabled. */ > #define HAVE_DECODER_DELTA 1 > + > +/* Define to 1 if ia64 decoder is enabled. */ > #define HAVE_DECODER_IA64 1 > + > +/* Define to 1 if lzma1 decoder is enabled. */ > #define HAVE_DECODER_LZMA1 1 > + > +/* Define to 1 if lzma2 decoder is enabled. */ > #define HAVE_DECODER_LZMA2 1 > + > +/* Define to 1 if powerpc decoder is enabled. */ > #define HAVE_DECODER_POWERPC 1 > + > +/* Define to 1 if sparc decoder is enabled. */ > #define HAVE_DECODER_SPARC 1 > + > +/* Define to 1 if x86 decoder is enabled. */ > #define HAVE_DECODER_X86 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_DLFCN_H 1 > + > +/* Define to 1 if arm encoder is enabled. */ > #define HAVE_ENCODER_ARM 1 > + > +/* Define to 1 if armthumb encoder is enabled. */ > #define HAVE_ENCODER_ARMTHUMB 1 > + > +/* Define to 1 if delta encoder is enabled. */ > #define HAVE_ENCODER_DELTA 1 > + > +/* Define to 1 if ia64 encoder is enabled. */ > #define HAVE_ENCODER_IA64 1 > + > +/* Define to 1 if lzma1 encoder is enabled. */ > #define HAVE_ENCODER_LZMA1 1 > + > +/* Define to 1 if lzma2 encoder is enabled. */ > #define HAVE_ENCODER_LZMA2 1 > + > +/* Define to 1 if powerpc encoder is enabled. */ > #define HAVE_ENCODER_POWERPC 1 > + > +/* Define to 1 if sparc encoder is enabled. */ > #define HAVE_ENCODER_SPARC 1 > + > +/* Define to 1 if x86 encoder is enabled. */ > #define HAVE_ENCODER_X86 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_FCNTL_H 1 > + > +/* Define to 1 if you have the `futimens' function. */ > #define HAVE_FUTIMENS 1 > -#define HAVE_FUTIMES 1 > + > +/* Define to 1 if you have the `futimes' function. */ > +/* #undef HAVE_FUTIMES */ > + > +/* Define to 1 if you have the `futimesat' function. */ > +/* #undef HAVE_FUTIMESAT */ > + > +/* Define to 1 if you have the header file. */ > #define HAVE_GETOPT_H 1 > + > +/* Define to 1 if you have the `getopt_long' function. */ > #define HAVE_GETOPT_LONG 1 > + > +/* Define if the GNU gettext() function is already present or preinstall= ed. */ > +/* FreeBSD - disabled intentionally */ > +/* #undef HAVE_GETTEXT */ > + > +/* Define if you have the iconv() function and it works. */ > +#define HAVE_ICONV 1 > + > +/* Define to 1 if you have the header file. */ > +#if defined(__FreeBSD__) && defined(__amd64__) > +#define HAVE_IMMINTRIN_H 1 > +#endif > + > +/* Define to 1 if you have the header file. */ > #define HAVE_INTTYPES_H 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_LIMITS_H 1 > + > +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ > #define HAVE_MBRTOWC 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_MEMORY_H 1 > + > +/* Define to 1 to enable bt2 match finder. */ > #define HAVE_MF_BT2 1 > + > +/* Define to 1 to enable bt3 match finder. */ > #define HAVE_MF_BT3 1 > + > +/* Define to 1 to enable bt4 match finder. */ > #define HAVE_MF_BT4 1 > + > +/* Define to 1 to enable hc3 match finder. */ > #define HAVE_MF_HC3 1 > + > +/* Define to 1 to enable hc4 match finder. */ > #define HAVE_MF_HC4 1 > + > +/* Define to 1 if you have the header file. */ > +/* #undef HAVE_MINIX_SHA2_H */ > + > +/* Define to 1 if getopt.h declares extern int optreset. */ > #define HAVE_OPTRESET 1 > + > +/* Define to 1 if you have the `pipe2' function. */ > +#define HAVE_PIPE2 1 > + > +/* Define to 1 if you have the `posix_fadvise' function. */ > #define HAVE_POSIX_FADVISE 1 > + > +/* Define to 1 if you have the `pthread_condattr_setclock' function. */ > #define HAVE_PTHREAD_CONDATTR_SETCLOCK 1 > + > +/* Have PTHREAD_PRIO_INHERIT. */ > #define HAVE_PTHREAD_PRIO_INHERIT 1 > + > +/* Define to 1 if you have the `SHA256Init' function. */ > +/* #undef HAVE_SHA256INIT */ > + > +/* Define to 1 if the system has the type `SHA256_CTX'. */ > +#define HAVE_SHA256_CTX 1 > + > +/* Define to 1 if you have the header file. */ > +#define HAVE_SHA256_H 1 > + > +/* Define to 1 if you have the `SHA256_Init' function. */ > +#define HAVE_SHA256_INIT 1 > + > +/* Define to 1 if the system has the type `SHA2_CTX'. */ > +/* #undef HAVE_SHA2_CTX */ > + > +/* Define to 1 if you have the header file. */ > +/* #undef HAVE_SHA2_H */ > + > +/* Define to 1 if optimizing for size. */ > +/* #undef HAVE_SMALL */ > + > +/* Define to 1 if stdbool.h conforms to C99. */ > #define HAVE_STDBOOL_H 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_STDINT_H 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_STDLIB_H 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_STRINGS_H 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_STRING_H 1 > + > +/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ > +/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ > + > +/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. *= / > #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 > + > +/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'= . */ > +/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ > + > +/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ > #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 > + > +/* Define to 1 if `st_uatime' is a member of `struct stat'. */ > +/* #undef HAVE_STRUCT_STAT_ST_UATIME */ > + > +/* Define to 1 if you have the header file. */ > +/* #undef HAVE_SYS_BYTEORDER_H */ > + > +/* Define to 1 if you have the header file. */ > #define HAVE_SYS_ENDIAN_H 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_SYS_PARAM_H 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_SYS_STAT_H 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_SYS_TIME_H 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_SYS_TYPES_H 1 > + > +/* Define to 1 if the system has the type `uintptr_t'. */ > #define HAVE_UINTPTR_T 1 > + > +/* Define to 1 if you have the header file. */ > #define HAVE_UNISTD_H 1 > + > +/* Define to 1 if you have the `utime' function. */ > +/* #undef HAVE_UTIME */ > + > +/* Define to 1 if you have the `utimes' function. */ > +/* #undef HAVE_UTIMES */ > + > +/* Define to 1 or 0, depending whether the compiler supports simple visi= bility > + declarations. */ > #define HAVE_VISIBILITY 1 > + > +/* Define to 1 if you have the `wcwidth' function. */ > #define HAVE_WCWIDTH 1 > + > +/* Define to 1 if the system has the type `_Bool'. */ > #define HAVE__BOOL 1 > + > +/* Define to 1 if _mm_movemask_epi8 is available. */ > #if defined(__FreeBSD__) && defined(__amd64__) > #define HAVE__MM_MOVEMASK_EPI8 1 > #endif > + > +/* Define to the sub-directory where libtool stores uninstalled librarie= s. */ > +#define LT_OBJDIR ".libs/" > + > +/* Define to 1 when using POSIX threads (pthreads). */ > #define MYTHREAD_POSIX 1 > + > +/* Define to 1 when using Windows Vista compatible threads. This uses fe= atures > + that are not available on Windows XP. */ > +/* #undef MYTHREAD_VISTA */ > + > +/* Define to 1 when using Windows 95 (and thus XP) compatible threads. T= his > + avoids use of features that were added in Windows Vista. */ > +/* #undef MYTHREAD_WIN95 */ > + > +/* Define to 1 to disable debugging code. */ > #define NDEBUG 1 > + > +/* Name of package */ > #define PACKAGE "xz" > + > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 17:09:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E20EDDCA; Fri, 10 Apr 2015 17:09:11 +0000 (UTC) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 6CB8E2265; Fri, 10 Apr 2015 17:09:11 +0000 (UTC) Message-ID: <552803B6.4000005@FreeBSD.org> Date: Fri, 10 Apr 2015 13:09:10 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Matteo Riondato , Xin LI Subject: Re: svn commit: r281316 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/common contrib/xz/src/liblzma/lz contrib/xz/src/liblzma/lzma contrib/xz/src/xz... References: <201504091803.t39I3R4Y042146@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 17:09:12 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 04/10/2015 12:05, Matteo Riondato wrote: > Could this update be causing this error when trying to upgrade the > installed packages using "pkg upgrade" ? > > [1/27] Extracting glib-2.42.2: 99% pkg: archive_read_extract(): > Lzma library error: Corrupted input data [1/27] Extracting > glib-2.42.2: 100% [1/27] Deleting files for glib-2.42.2: 100% > > ? I tried removing the fetched archives from /var/cache/pkg and > having pkg fetch them again, so that doesn't seem to be the issue. Actually libarchive(3) seems broken. # tar tf tar-1.28.tar.xz > /dev/null || echo FAILURE! tar: Truncated input file (needed 976896 bytes, only 0 available) tar: Error exit delayed from previous errors. FAILURE! The same file is fine with GNU tar. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVKAOwAAoJEHyflib82/FG6NYH/15Fqw7srjWjy4h5aXXQUkPV 15UUXe1aB20FqNARQM6FBK9JTCJnDYoqsY6YB5pPbUENBM8JDowX6aezXlaiC6zx vj+JI5cCovYO0lsUcxUEmUEB2Oa0rA5WnI5moa7Y20q4GkPOvTikCwUHfdW+zd4K OZx1BX3OeImkXIXKRZKvAvdXBVPn9jiOnohHcV0/owhMNOfetBg/8aL5PbnGAyQ9 V3+oj68+L5kjsoBEKpw6sy8H8T5K7iDBtsWKTT1S37rJZypqTx/ucuEVTBO/IJrC xYBqkB0nN83Hx+vV9Zs66sr5ReE+UJ9Or4/sCaouYYolgLlMD9jfcUoYOC+iHXo= =F8BC -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 17:21:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 170F53C1; Fri, 10 Apr 2015 17:21:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC68D8BB; Fri, 10 Apr 2015 17:21:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3AHLmQg013443; Fri, 10 Apr 2015 17:21:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AHLmNN013440; Fri, 10 Apr 2015 17:21:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504101721.t3AHLmNN013440@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 10 Apr 2015 17:21:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281372 - head/lib/liblzma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 17:21:49 -0000 Author: delphij Date: Fri Apr 10 17:21:47 2015 New Revision: 281372 URL: https://svnweb.freebsd.org/changeset/base/281372 Log: For reasons that I am not understand yet, using the libmd version of SHA256 would make libarchive based application to give: archive_read_extract(): Lzma library error: Corrupted input data (Internally this is LZMA_DATA_ERR) However, the libmd version of SHA256 is supposed to give same result as the bundled version do, and xz(1) is not affected. As a precaution, revert the SHA256 portion of r281316 for now until we figure out why it breaks libarchive interoperability as we can't yet rule out this change have introduced an ABI breakage. Modified: head/lib/liblzma/Makefile head/lib/liblzma/Symbol.map head/lib/liblzma/config.h Modified: head/lib/liblzma/Makefile ============================================================================== --- head/lib/liblzma/Makefile Fri Apr 10 13:50:57 2015 (r281371) +++ head/lib/liblzma/Makefile Fri Apr 10 17:21:47 2015 (r281372) @@ -77,7 +77,8 @@ SRCS+= common.c \ .PATH: ${LZMADIR}/check SRCS+= check.c \ crc32_table.c \ - crc64_table.c + crc64_table.c \ + sha256.c .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386" SRCS+= crc32_x86.S \ crc64_x86.S @@ -145,7 +146,7 @@ CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMADIR}/simple \ -I${LZMADIR}/../common -LIBADD+= md pthread +LIBADD+= pthread VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map Modified: head/lib/liblzma/Symbol.map ============================================================================== --- head/lib/liblzma/Symbol.map Fri Apr 10 13:50:57 2015 (r281371) +++ head/lib/liblzma/Symbol.map Fri Apr 10 17:21:47 2015 (r281372) @@ -180,6 +180,9 @@ XZprivate_1.0 { lzma_raw_coder_memusage; lzma_raw_decoder_init; lzma_raw_encoder_init; + lzma_sha256_finish; + lzma_sha256_init; + lzma_sha256_update; lzma_simple_arm_decoder_init; lzma_simple_arm_encoder_init; lzma_simple_armthumb_decoder_init; Modified: head/lib/liblzma/config.h ============================================================================== --- head/lib/liblzma/config.h Fri Apr 10 13:50:57 2015 (r281371) +++ head/lib/liblzma/config.h Fri Apr 10 17:21:47 2015 (r281372) @@ -203,13 +203,16 @@ /* #undef HAVE_SHA256INIT */ /* Define to 1 if the system has the type `SHA256_CTX'. */ -#define HAVE_SHA256_CTX 1 +/* FreeBSD - disabled libmd SHA256 for now */ +/* #undef HAVE_SHA256_CTX */ /* Define to 1 if you have the header file. */ -#define HAVE_SHA256_H 1 +/* FreeBSD - disabled libmd SHA256 for now */ +/* #undef HAVE_SHA256_H */ /* Define to 1 if you have the `SHA256_Init' function. */ -#define HAVE_SHA256_INIT 1 +/* FreeBSD - disabled libmd SHA256 for now */ +/* #undef HAVE_SHA256_INIT */ /* Define to 1 if the system has the type `SHA2_CTX'. */ /* #undef HAVE_SHA2_CTX */ From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 17:25:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42AF6580; Fri, 10 Apr 2015 17:25:28 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 226B68E8; Fri, 10 Apr 2015 17:25:27 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id E7F1C12674; Fri, 10 Apr 2015 10:25:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1428686721; x=1428701121; bh=vqksqdI7awuphfUCH8m/fovY2tCsvYFR6C2NyCltPh4=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=YuTFRJ5kBdRt92KlkbnhxU4UEYNkfip1ndbAM8/xAqOk7IAUxIbuZGANr2Qq8GJ5H 3bHZn0NZfkvqpck+0e1hcWYtBvxzsRdnW64oTP1cW4Xrz3BSYGsscAg/+lfDZfLKX4 r2eqS0Jwy2ZnHds4yLyEbDYuCiOkkxuTh8vW1ybI= Message-ID: <55280780.1040104@delphij.net> Date: Fri, 10 Apr 2015 10:25:20 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Jung-uk Kim , Matteo Riondato , Xin LI Subject: Re: svn commit: r281316 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/common contrib/xz/src/liblzma/lz contrib/xz/src/liblzma/lzma contrib/xz/src/xz... References: <201504091803.t39I3R4Y042146@svn.freebsd.org> <552803B6.4000005@FreeBSD.org> In-Reply-To: <552803B6.4000005@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 17:25:28 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 04/10/15 10:09, Jung-uk Kim wrote: > On 04/10/2015 12:05, Matteo Riondato wrote: >> Could this update be causing this error when trying to upgrade >> the installed packages using "pkg upgrade" ? > >> [1/27] Extracting glib-2.42.2: 99% pkg: archive_read_extract(): >> Lzma library error: Corrupted input data [1/27] Extracting >> glib-2.42.2: 100% [1/27] Deleting files for glib-2.42.2: 100% > >> ? I tried removing the fetched archives from /var/cache/pkg and >> having pkg fetch them again, so that doesn't seem to be the >> issue. > > Actually libarchive(3) seems broken. > > # tar tf tar-1.28.tar.xz > /dev/null || echo FAILURE! tar: > Truncated input file (needed 976896 bytes, only 0 available) tar: > Error exit delayed from previous errors. FAILURE! > > The same file is fine with GNU tar. I have see this too. It seems like the libmd implementation of SHA256 is doing something differently than the bundled one and libarchive(3) is expecting a different behavior (not 100% sure yet, still figuring it out). The strange part is that xz's 'make check' passed just fine and the same archive processed by xz(1) as expected, so yes it's possible that we hit a libarchive bug. As a precaution I have reverted the SHA256 portion of the change and the library should work fine with libarchive now. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.2 (FreeBSD) iQIcBAEBCgAGBQJVKAeAAAoJEJW2GBstM+nsRSwP/3GhfVOYIIqG3CZ8duB++4he IURodWRl11uJnagRaOnZnoR9LpDWBoLgx6SK53DDoOkxDGr8PKXr6WxBuX7zTR4P h2Bqu0ibmhPrEPTC3YfLn5nn8IoxtRj8nZZlkD/hU4dGnwiKzaH/9krFVdmGrePn HkdNUkdANp8bDu+AiBxPgSXf+GFYOuDs+fpDIvWCrIaB/MLzD4zrsQZCWdT4p7J3 c8IwzNHW2z0T5dULlEssaxG5bYc+P/RhCC8mRqhj73WpGb7UbNHjcY2ICDA15Hb8 IZYu3quprLx/F40qhGxBUgdgOEyPNqzdBvcUl325N0AqvAnama6zPE4eeZutHioQ LMt8lnllIr5xnmuHaN3+YyyPDuEg03SmyihbjD9vbA+5/M9Y6fLSOWHY/ns/2AUF laO32LZjZiOz0h5r2S5ipJbSWD4vHzWtFPFNW3FwpqPsXsD7ikE2vsJLowMJf6p9 ww4qFzsecXv1YG4tDrUubqci6S06UYNtI+u3Icm7LFJqwMVzAxWCF9IYbzZl5Kqd 4Rcmej8JVA0qC7hheESs5lEN6/6LQ64S89c76M2yxW+H54E2X5VfKGOIVNa1Geuc DtKVz24tjXCspu18RJFPlcsCA+MJOIMVN5oBhll+vPiDu1HOGhykmo0m23sY5UiK ON61a59e3GwA7Ydgp4AC =1Hhm -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 17:27:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 580086CF; Fri, 10 Apr 2015 17:27:02 +0000 (UTC) Received: from mail-ob0-x236.google.com (mail-ob0-x236.google.com [IPv6:2607:f8b0:4003:c01::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13D4F8FE; Fri, 10 Apr 2015 17:27:02 +0000 (UTC) Received: by oblw8 with SMTP id w8so25699325obl.0; Fri, 10 Apr 2015 10:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=VVpoWj1GFnUoP0H+JRMvw/O7/XJ16j7eXoeruXDPYhE=; b=oom7fyCps9nPg0aXUPiipouxSN7dU/FOTi7tlqMLPYEJ0gpOxYT85mZDIon59ZyrX2 Cpq7pqmrbd/LIkgrSLjf/2HAi0l2CzlVoNjSZS2fue2HWBxZ1cYLsr7KR9jodC5mmxwb FuJKfZV+cPFlyOIiT3Sou2E79SSv7LXd0ODBIptF+mAePPt+TDj2hH260N2WQL2tjn3A nl3mJaHHELG6toL50v26CtUShue/kJ5nEPfQkj5luspDY9sNhYra2J/LrffmaeShwVYG Lv5CwkoCGsQDYYLJ2udfALyuqWHxs9JhiXn9xN8UAKPX6Jjxtn413RkFFZ4hg2hpe2tp 9fnw== X-Received: by 10.60.58.165 with SMTP id s5mr3414408oeq.2.1428686821316; Fri, 10 Apr 2015 10:27:01 -0700 (PDT) MIME-Version: 1.0 Sender: rionda@gmail.com Received: by 10.182.180.110 with HTTP; Fri, 10 Apr 2015 10:26:41 -0700 (PDT) In-Reply-To: <55280780.1040104@delphij.net> References: <201504091803.t39I3R4Y042146@svn.freebsd.org> <552803B6.4000005@FreeBSD.org> <55280780.1040104@delphij.net> From: Matteo Riondato Date: Fri, 10 Apr 2015 13:26:41 -0400 X-Google-Sender-Auth: jfoBTPILNxcmDRRaZ2LV1qkz0AE Message-ID: Subject: Re: svn commit: r281316 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/common contrib/xz/src/liblzma/lz contrib/xz/src/liblzma/lzma contrib/xz/src/xz... To: d@delphij.net Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI , Jung-uk Kim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 17:27:02 -0000 Thanks. Let me know if I can test any patch. Best, Matteo On Fri, Apr 10, 2015 at 1:25 PM, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 04/10/15 10:09, Jung-uk Kim wrote: >> On 04/10/2015 12:05, Matteo Riondato wrote: >>> Could this update be causing this error when trying to upgrade >>> the installed packages using "pkg upgrade" ? >> >>> [1/27] Extracting glib-2.42.2: 99% pkg: archive_read_extract(): >>> Lzma library error: Corrupted input data [1/27] Extracting >>> glib-2.42.2: 100% [1/27] Deleting files for glib-2.42.2: 100% >> >>> ? I tried removing the fetched archives from /var/cache/pkg and >>> having pkg fetch them again, so that doesn't seem to be the >>> issue. >> >> Actually libarchive(3) seems broken. >> >> # tar tf tar-1.28.tar.xz > /dev/null || echo FAILURE! tar: >> Truncated input file (needed 976896 bytes, only 0 available) tar: >> Error exit delayed from previous errors. FAILURE! >> >> The same file is fine with GNU tar. > > I have see this too. > > It seems like the libmd implementation of SHA256 is doing something > differently than the bundled one and libarchive(3) is expecting a > different behavior (not 100% sure yet, still figuring it out). > > The strange part is that xz's 'make check' passed just fine and the > same archive processed by xz(1) as expected, so yes it's possible that > we hit a libarchive bug. > > As a precaution I have reverted the SHA256 portion of the change and > the library should work fine with libarchive now. > > Cheers, > - -- > Xin LI https://www.delphij.net/ > FreeBSD - The Power to Serve! Live free or die > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.1.2 (FreeBSD) > > iQIcBAEBCgAGBQJVKAeAAAoJEJW2GBstM+nsRSwP/3GhfVOYIIqG3CZ8duB++4he > IURodWRl11uJnagRaOnZnoR9LpDWBoLgx6SK53DDoOkxDGr8PKXr6WxBuX7zTR4P > h2Bqu0ibmhPrEPTC3YfLn5nn8IoxtRj8nZZlkD/hU4dGnwiKzaH/9krFVdmGrePn > HkdNUkdANp8bDu+AiBxPgSXf+GFYOuDs+fpDIvWCrIaB/MLzD4zrsQZCWdT4p7J3 > c8IwzNHW2z0T5dULlEssaxG5bYc+P/RhCC8mRqhj73WpGb7UbNHjcY2ICDA15Hb8 > IZYu3quprLx/F40qhGxBUgdgOEyPNqzdBvcUl325N0AqvAnama6zPE4eeZutHioQ > LMt8lnllIr5xnmuHaN3+YyyPDuEg03SmyihbjD9vbA+5/M9Y6fLSOWHY/ns/2AUF > laO32LZjZiOz0h5r2S5ipJbSWD4vHzWtFPFNW3FwpqPsXsD7ikE2vsJLowMJf6p9 > ww4qFzsecXv1YG4tDrUubqci6S06UYNtI+u3Icm7LFJqwMVzAxWCF9IYbzZl5Kqd > 4Rcmej8JVA0qC7hheESs5lEN6/6LQ64S89c76M2yxW+H54E2X5VfKGOIVNa1Geuc > DtKVz24tjXCspu18RJFPlcsCA+MJOIMVN5oBhll+vPiDu1HOGhykmo0m23sY5UiK > ON61a59e3GwA7Ydgp4AC > =1Hhm > -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 17:31:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5B9686E; Fri, 10 Apr 2015 17:31:51 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 933699BD; Fri, 10 Apr 2015 17:31:51 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 4313C12714; Fri, 10 Apr 2015 10:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1428687111; x=1428701511; bh=KpkyuI/vfdndMIKsYTfsXK9xE8m0vCfM6fryWSwH9xY=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=JS3y7zWke/5HrUVwUB9Fr3jExVhLs2Stb2ngAyLaAXofJNUoOW0RDRNMyT7AiG/3s 4iePPVECtFjgkhyAmRUtbR2DB8QaLUzEj6ZHAkvgcKxPjiqu8472jxM2VthfAHJvr8 jAKmM3xC5vQXWWrl3meRit3pJXBWDkCBsyCmCrqo= Message-ID: <55280906.4040503@delphij.net> Date: Fri, 10 Apr 2015 10:31:50 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Matteo Riondato , d@delphij.net Subject: Re: svn commit: r281316 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/common contrib/xz/src/liblzma/lz contrib/xz/src/liblzma/lzma contrib/xz/src/xz... References: <201504091803.t39I3R4Y042146@svn.freebsd.org> <552803B6.4000005@FreeBSD.org> <55280780.1040104@delphij.net> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI , Jung-uk Kim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 17:31:51 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 04/10/15 10:26, Matteo Riondato wrote: > Thanks. Let me know if I can test any patch. r281372 (I have already tested it with some test cases already so expect it work for you). > Best, Matteo > > On Fri, Apr 10, 2015 at 1:25 PM, Xin Li > wrote: On 04/10/15 10:09, Jung-uk Kim wrote: >>>> On 04/10/2015 12:05, Matteo Riondato wrote: >>>>> Could this update be causing this error when trying to >>>>> upgrade the installed packages using "pkg upgrade" ? >>>> >>>>> [1/27] Extracting glib-2.42.2: 99% pkg: >>>>> archive_read_extract(): Lzma library error: Corrupted input >>>>> data [1/27] Extracting glib-2.42.2: 100% [1/27] Deleting >>>>> files for glib-2.42.2: 100% >>>> >>>>> ? I tried removing the fetched archives from /var/cache/pkg >>>>> and having pkg fetch them again, so that doesn't seem to be >>>>> the issue. >>>> >>>> Actually libarchive(3) seems broken. >>>> >>>> # tar tf tar-1.28.tar.xz > /dev/null || echo FAILURE! tar: >>>> Truncated input file (needed 976896 bytes, only 0 available) >>>> tar: Error exit delayed from previous errors. FAILURE! >>>> >>>> The same file is fine with GNU tar. > > I have see this too. > > It seems like the libmd implementation of SHA256 is doing > something differently than the bundled one and libarchive(3) is > expecting a different behavior (not 100% sure yet, still figuring > it out). > > The strange part is that xz's 'make check' passed just fine and > the same archive processed by xz(1) as expected, so yes it's > possible that we hit a libarchive bug. > > As a precaution I have reverted the SHA256 portion of the change > and the library should work fine with libarchive now. > > Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.2 (FreeBSD) iQIcBAEBCgAGBQJVKAkGAAoJEJW2GBstM+nsI9IQAIDlY00SxHVh854CzwN/bXct gEnXuc2jzsfCwoLUKrczGWYbn6yEZ+GGzq/K1THVbFw6SfVTByQtR6ExWTs4PY1L 6VkwB4ncDZRlUoiTGjphHz41I3kRyIQalArpS84U+C913JzFlX0JfmFon9hv2KKX 1LzMXaiNvc6WEJ/WVr0Nq3k/5WZEYZCfI/do6KUG4Hal8EL+cXKiWRMCVKOFewEK pwWeAyiTw6pya+uFy3VPPByHUh2jb2OqAFQ1ASwIx/rry6pmZ9XUj3nmaKsjWB9H MrCrgOQPgQF/XSFSrxdmT9zduOGiT8W9HNxLRZUffRLlrXOofl8pYdHdZTzdv10s HmTWAKsjjueeiUn5Vh6sNEh6958GBpou2Tg+ZuOveEt+p55P2aQgl8fWAhZapxZr SVvX4nlgG6ZHvEKTi43Kl8TIGCxvOtd884U8KjRrnQgKICId7OfglLNlOfdJsEzA a5NX7v5vHBb5oa5A9VO7piH5ZEF7GDOdgvODJMlIhIYWc9hcuyVepwJctX4GAdOI ZvYFaBmSayKq/0zl3DXyUfaH7kRjOURwI6fVwtKvI4ZHO+TE//8gyRVd20YRiNEH YFS5HV20gR1JXFOhkXB1syIu3JlcLrksjeZLAzc9VoGlOzq/hXxSikBxh5ZZHQYL xJGCQkLAH1kZVCPsFFQX =C4ZD -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 17:32:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E7F29B7; Fri, 10 Apr 2015 17:32:50 +0000 (UTC) Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE4E29C7; Fri, 10 Apr 2015 17:32:49 +0000 (UTC) Received: by oblw8 with SMTP id w8so25936991obl.0; Fri, 10 Apr 2015 10:32:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=TggeRd9D+OMoS3qj6JR2NLFbJaEYMOWB3b5CD99sRZ0=; b=uGi56msL586wgCbC7I9Fx8nLuoxHj9zd/ySoFesRGZvo4HRgPYTOfpamAsBAlWT/wS rpOg0jxfl04/pFJP442XKFX168c4RkY+NfqDm6tZUUk+twVZxVAfBMueYdnugRpgZxBQ uxjlDTflMoWdKAUImScc/uyoc/NqvWXdUDpf6bw22jWkSWmDm9wWZ/uDFpWAT+nmMnwE j7v4YmL4kQDRxmT3KW42Mr7hlJ0dxOxCYi9nu8+yDa5XkFA+3m3qOCIzh8ZwW0DWkoVo 6hSfRg9s7TgPgCKSGl8Vb2/UoiURTqll/Lpwuq1m1UeRMwX37S7Rx31vRbwDM+jO4hcS JBoQ== X-Received: by 10.183.24.168 with SMTP id ij8mr3376992obd.15.1428687169154; Fri, 10 Apr 2015 10:32:49 -0700 (PDT) MIME-Version: 1.0 Sender: rionda@gmail.com Received: by 10.182.180.110 with HTTP; Fri, 10 Apr 2015 10:32:28 -0700 (PDT) In-Reply-To: <55280906.4040503@delphij.net> References: <201504091803.t39I3R4Y042146@svn.freebsd.org> <552803B6.4000005@FreeBSD.org> <55280780.1040104@delphij.net> <55280906.4040503@delphij.net> From: Matteo Riondato Date: Fri, 10 Apr 2015 13:32:28 -0400 X-Google-Sender-Auth: f9VvFRrRBvGYYStxMniOzi9XkNg Message-ID: Subject: Re: svn commit: r281316 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/common contrib/xz/src/liblzma/lz contrib/xz/src/liblzma/lzma contrib/xz/src/xz... To: d@delphij.net Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI , Jung-uk Kim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 17:32:50 -0000 Yep, I confirm that it works. Thanks again. On Fri, Apr 10, 2015 at 1:31 PM, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 04/10/15 10:26, Matteo Riondato wrote: >> Thanks. Let me know if I can test any patch. > > r281372 (I have already tested it with some test cases already so > expect it work for you). > >> Best, Matteo >> >> On Fri, Apr 10, 2015 at 1:25 PM, Xin Li >> wrote: On 04/10/15 10:09, Jung-uk Kim wrote: >>>>> On 04/10/2015 12:05, Matteo Riondato wrote: >>>>>> Could this update be causing this error when trying to >>>>>> upgrade the installed packages using "pkg upgrade" ? >>>>> >>>>>> [1/27] Extracting glib-2.42.2: 99% pkg: >>>>>> archive_read_extract(): Lzma library error: Corrupted input >>>>>> data [1/27] Extracting glib-2.42.2: 100% [1/27] Deleting >>>>>> files for glib-2.42.2: 100% >>>>> >>>>>> ? I tried removing the fetched archives from /var/cache/pkg >>>>>> and having pkg fetch them again, so that doesn't seem to be >>>>>> the issue. >>>>> >>>>> Actually libarchive(3) seems broken. >>>>> >>>>> # tar tf tar-1.28.tar.xz > /dev/null || echo FAILURE! tar: >>>>> Truncated input file (needed 976896 bytes, only 0 available) >>>>> tar: Error exit delayed from previous errors. FAILURE! >>>>> >>>>> The same file is fine with GNU tar. >> >> I have see this too. >> >> It seems like the libmd implementation of SHA256 is doing >> something differently than the bundled one and libarchive(3) is >> expecting a different behavior (not 100% sure yet, still figuring >> it out). >> >> The strange part is that xz's 'make check' passed just fine and >> the same archive processed by xz(1) as expected, so yes it's >> possible that we hit a libarchive bug. >> >> As a precaution I have reverted the SHA256 portion of the change >> and the library should work fine with libarchive now. >> >> Cheers, > > - -- > Xin LI https://www.delphij.net/ > FreeBSD - The Power to Serve! Live free or die > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.1.2 (FreeBSD) > > iQIcBAEBCgAGBQJVKAkGAAoJEJW2GBstM+nsI9IQAIDlY00SxHVh854CzwN/bXct > gEnXuc2jzsfCwoLUKrczGWYbn6yEZ+GGzq/K1THVbFw6SfVTByQtR6ExWTs4PY1L > 6VkwB4ncDZRlUoiTGjphHz41I3kRyIQalArpS84U+C913JzFlX0JfmFon9hv2KKX > 1LzMXaiNvc6WEJ/WVr0Nq3k/5WZEYZCfI/do6KUG4Hal8EL+cXKiWRMCVKOFewEK > pwWeAyiTw6pya+uFy3VPPByHUh2jb2OqAFQ1ASwIx/rry6pmZ9XUj3nmaKsjWB9H > MrCrgOQPgQF/XSFSrxdmT9zduOGiT8W9HNxLRZUffRLlrXOofl8pYdHdZTzdv10s > HmTWAKsjjueeiUn5Vh6sNEh6958GBpou2Tg+ZuOveEt+p55P2aQgl8fWAhZapxZr > SVvX4nlgG6ZHvEKTi43Kl8TIGCxvOtd884U8KjRrnQgKICId7OfglLNlOfdJsEzA > a5NX7v5vHBb5oa5A9VO7piH5ZEF7GDOdgvODJMlIhIYWc9hcuyVepwJctX4GAdOI > ZvYFaBmSayKq/0zl3DXyUfaH7kRjOURwI6fVwtKvI4ZHO+TE//8gyRVd20YRiNEH > YFS5HV20gR1JXFOhkXB1syIu3JlcLrksjeZLAzc9VoGlOzq/hXxSikBxh5ZZHQYL > xJGCQkLAH1kZVCPsFFQX > =C4ZD > -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 17:50:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D7A5EF9; Fri, 10 Apr 2015 17:50:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8EECC10; Fri, 10 Apr 2015 17:50:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3AHoWnN023980; Fri, 10 Apr 2015 17:50:32 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AHoSo3023955; Fri, 10 Apr 2015 17:50:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504101750.t3AHoSo3023955@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 10 Apr 2015 17:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281373 - in head: contrib/nvi contrib/nvi/catalog contrib/nvi/cl contrib/nvi/common contrib/nvi/docs contrib/nvi/docs/USD.doc contrib/nvi/docs/internals contrib/nvi/docs/interp contrib... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 17:50:33 -0000 Author: bapt Date: Fri Apr 10 17:50:28 2015 New Revision: 281373 URL: https://svnweb.freebsd.org/changeset/base/281373 Log: Update nvi to 2.1.3 which fixes the data corruption when locale conversion failed Added: head/contrib/nvi/docs/man/ - copied from r281368, vendor/nvi/dist/docs/man/ Deleted: head/contrib/nvi/catalog/spell.ok head/contrib/nvi/docs/TODO head/contrib/nvi/docs/USD.doc/ head/contrib/nvi/docs/changelog head/contrib/nvi/docs/ev head/contrib/nvi/docs/features head/contrib/nvi/docs/help head/contrib/nvi/docs/internals/ head/contrib/nvi/docs/interp/ head/contrib/nvi/docs/spell.ok head/contrib/nvi/docs/tutorial/ Modified: head/contrib/nvi/README head/contrib/nvi/catalog/dump.c head/contrib/nvi/cl/cl.h head/contrib/nvi/cl/cl_funcs.c head/contrib/nvi/cl/cl_main.c head/contrib/nvi/cl/cl_read.c head/contrib/nvi/cl/cl_screen.c head/contrib/nvi/cl/cl_term.c head/contrib/nvi/cl/extern.h head/contrib/nvi/common/common.h head/contrib/nvi/common/conv.c head/contrib/nvi/common/cut.c head/contrib/nvi/common/delete.c head/contrib/nvi/common/encoding.c head/contrib/nvi/common/exf.c head/contrib/nvi/common/extern.h head/contrib/nvi/common/gs.h head/contrib/nvi/common/key.c head/contrib/nvi/common/line.c head/contrib/nvi/common/log.c head/contrib/nvi/common/main.c head/contrib/nvi/common/mark.c head/contrib/nvi/common/msg.c head/contrib/nvi/common/options.c head/contrib/nvi/common/options.h head/contrib/nvi/common/options_f.c head/contrib/nvi/common/put.c head/contrib/nvi/common/recover.c head/contrib/nvi/common/screen.c head/contrib/nvi/common/search.c head/contrib/nvi/common/seq.c head/contrib/nvi/common/util.c head/contrib/nvi/ex/ex.c head/contrib/nvi/ex/ex.h head/contrib/nvi/ex/ex_abbrev.c head/contrib/nvi/ex/ex_append.c head/contrib/nvi/ex/ex_args.c head/contrib/nvi/ex/ex_argv.c head/contrib/nvi/ex/ex_at.c head/contrib/nvi/ex/ex_bang.c head/contrib/nvi/ex/ex_cd.c head/contrib/nvi/ex/ex_cscope.c head/contrib/nvi/ex/ex_delete.c head/contrib/nvi/ex/ex_display.c head/contrib/nvi/ex/ex_edit.c head/contrib/nvi/ex/ex_equal.c head/contrib/nvi/ex/ex_file.c head/contrib/nvi/ex/ex_filter.c head/contrib/nvi/ex/ex_global.c head/contrib/nvi/ex/ex_init.c head/contrib/nvi/ex/ex_join.c head/contrib/nvi/ex/ex_map.c head/contrib/nvi/ex/ex_mark.c head/contrib/nvi/ex/ex_mkexrc.c head/contrib/nvi/ex/ex_move.c head/contrib/nvi/ex/ex_open.c head/contrib/nvi/ex/ex_preserve.c head/contrib/nvi/ex/ex_print.c head/contrib/nvi/ex/ex_put.c head/contrib/nvi/ex/ex_quit.c head/contrib/nvi/ex/ex_read.c head/contrib/nvi/ex/ex_screen.c head/contrib/nvi/ex/ex_script.c head/contrib/nvi/ex/ex_set.c head/contrib/nvi/ex/ex_shell.c head/contrib/nvi/ex/ex_shift.c head/contrib/nvi/ex/ex_source.c head/contrib/nvi/ex/ex_stop.c head/contrib/nvi/ex/ex_subst.c head/contrib/nvi/ex/ex_tag.c head/contrib/nvi/ex/ex_txt.c head/contrib/nvi/ex/ex_undo.c head/contrib/nvi/ex/ex_usage.c head/contrib/nvi/ex/ex_util.c head/contrib/nvi/ex/ex_version.c head/contrib/nvi/ex/ex_visual.c head/contrib/nvi/ex/ex_write.c head/contrib/nvi/ex/ex_yank.c head/contrib/nvi/ex/ex_z.c head/contrib/nvi/ex/extern.h head/contrib/nvi/ex/version.h head/contrib/nvi/regex/COPYRIGHT head/contrib/nvi/regex/cclass.h head/contrib/nvi/regex/cname.h head/contrib/nvi/regex/engine.c head/contrib/nvi/regex/re_format.7 head/contrib/nvi/regex/regcomp.c head/contrib/nvi/regex/regerror.c head/contrib/nvi/regex/regex.3 head/contrib/nvi/regex/regex.h head/contrib/nvi/regex/regex2.h head/contrib/nvi/regex/regexec.c head/contrib/nvi/regex/regfree.c head/contrib/nvi/regex/utils.h head/contrib/nvi/vi/extern.h head/contrib/nvi/vi/getc.c head/contrib/nvi/vi/v_at.c head/contrib/nvi/vi/v_ch.c head/contrib/nvi/vi/v_delete.c head/contrib/nvi/vi/v_ex.c head/contrib/nvi/vi/v_increment.c head/contrib/nvi/vi/v_init.c head/contrib/nvi/vi/v_itxt.c head/contrib/nvi/vi/v_left.c head/contrib/nvi/vi/v_mark.c head/contrib/nvi/vi/v_match.c head/contrib/nvi/vi/v_paragraph.c head/contrib/nvi/vi/v_put.c head/contrib/nvi/vi/v_redraw.c head/contrib/nvi/vi/v_replace.c head/contrib/nvi/vi/v_right.c head/contrib/nvi/vi/v_screen.c head/contrib/nvi/vi/v_scroll.c head/contrib/nvi/vi/v_search.c head/contrib/nvi/vi/v_section.c head/contrib/nvi/vi/v_sentence.c head/contrib/nvi/vi/v_status.c head/contrib/nvi/vi/v_txt.c head/contrib/nvi/vi/v_ulcase.c head/contrib/nvi/vi/v_undo.c head/contrib/nvi/vi/v_util.c head/contrib/nvi/vi/v_word.c head/contrib/nvi/vi/v_xchar.c head/contrib/nvi/vi/v_yank.c head/contrib/nvi/vi/v_z.c head/contrib/nvi/vi/v_zexit.c head/contrib/nvi/vi/vi.c head/contrib/nvi/vi/vi.h head/contrib/nvi/vi/vs_line.c head/contrib/nvi/vi/vs_msg.c head/contrib/nvi/vi/vs_refresh.c head/contrib/nvi/vi/vs_relative.c head/contrib/nvi/vi/vs_smap.c head/contrib/nvi/vi/vs_split.c head/usr.bin/vi/Makefile Directory Properties: head/contrib/nvi/ (props changed) Modified: head/contrib/nvi/README ============================================================================== --- head/contrib/nvi/README Fri Apr 10 17:21:47 2015 (r281372) +++ head/contrib/nvi/README Fri Apr 10 17:50:28 2015 (r281373) @@ -1,6 +1,6 @@ -# $Id: README,v 9.1 2013/11/02 02:50:23 zy Exp $ +# $Id: README,v 9.2 2015/04/08 17:18:56 zy Exp $ -This is version 2.1.2 (2012-11-02) of nex/nvi, a reimplementation of the ex/vi +This is version 2.1.3 (2015-04-08) of nex/nvi, a reimplementation of the ex/vi text editors originally distributed as part of the Fourth Berkeley Software Distribution (4BSD), by the University of California, Berkeley. Modified: head/contrib/nvi/catalog/dump.c ============================================================================== --- head/contrib/nvi/catalog/dump.c Fri Apr 10 17:21:47 2015 (r281372) +++ head/contrib/nvi/catalog/dump.c Fri Apr 10 17:50:28 2015 (r281373) @@ -10,11 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -32,12 +28,6 @@ */ #ifndef lint -static char copyright[] = -"@(#) Copyright (c) 1992, 1993, 1994\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint static char sccsid[] = "@(#)dump.c 8.1 (Berkeley) 8/31/94"; #endif /* not lint */ @@ -45,8 +35,7 @@ static char sccsid[] = "@(#)dump.c 8.1 ( #include static void -parse(fp) - FILE *fp; +parse(FILE *fp) { int ch, s1, s2, s3; @@ -96,9 +85,7 @@ parse(fp) } int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { FILE *fp; Modified: head/contrib/nvi/cl/cl.h ============================================================================== --- head/contrib/nvi/cl/cl.h Fri Apr 10 17:21:47 2015 (r281372) +++ head/contrib/nvi/cl/cl.h Fri Apr 10 17:50:28 2015 (r281373) @@ -80,16 +80,4 @@ typedef enum { INP_OK=0, INP_EOF, INP_ER #define RCNO(sp, cno) (cno) #define RLNO(sp, lno) (lno) -/* - * XXX - * Some implementations of curses.h don't define these for us. Used for - * compatibility only. - */ -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif - #include "extern.h" Modified: head/contrib/nvi/cl/cl_funcs.c ============================================================================== --- head/contrib/nvi/cl/cl_funcs.c Fri Apr 10 17:21:47 2015 (r281372) +++ head/contrib/nvi/cl/cl_funcs.c Fri Apr 10 17:50:28 2015 (r281373) @@ -33,7 +33,7 @@ static const char sccsid[] = "$Id: cl_fu #include "../vi/vi.h" #include "cl.h" -static void cl_rdiv __P((SCR *)); +static void cl_rdiv(SCR *); static int addstr4(SCR *sp, void *str, size_t len, int wide) @@ -76,31 +76,31 @@ addstr4(SCR *sp, void *str, size_t len, * cl_waddstr -- * Add len bytes from the string at the cursor, advancing the cursor. * - * PUBLIC: int cl_waddstr __P((SCR *, const CHAR_T *, size_t)); + * PUBLIC: int cl_waddstr(SCR *, const CHAR_T *, size_t); */ int cl_waddstr(SCR *sp, const CHAR_T *str, size_t len) { - return addstr4(sp, (void *)str, len, 1); + return addstr4(sp, (void *)str, len, 1); } /* * cl_addstr -- * Add len bytes from the string at the cursor, advancing the cursor. * - * PUBLIC: int cl_addstr __P((SCR *, const char *, size_t)); + * PUBLIC: int cl_addstr(SCR *, const char *, size_t); */ int cl_addstr(SCR *sp, const char *str, size_t len) { - return addstr4(sp, (void *)str, len, 0); + return addstr4(sp, (void *)str, len, 0); } /* * cl_attr -- * Toggle a screen attribute on/off. * - * PUBLIC: int cl_attr __P((SCR *, scr_attr_t, int)); + * PUBLIC: int cl_attr(SCR *, scr_attr_t, int); */ int cl_attr(SCR *sp, scr_attr_t attribute, int on) @@ -187,7 +187,7 @@ cl_attr(SCR *sp, scr_attr_t attribute, i * cl_baud -- * Return the baud rate. * - * PUBLIC: int cl_baud __P((SCR *, u_long *)); + * PUBLIC: int cl_baud(SCR *, u_long *); */ int cl_baud(SCR *sp, u_long *ratep) @@ -228,7 +228,7 @@ cl_baud(SCR *sp, u_long *ratep) * cl_bell -- * Ring the bell/flash the screen. * - * PUBLIC: int cl_bell __P((SCR *)); + * PUBLIC: int cl_bell(SCR *); */ int cl_bell(SCR *sp) @@ -252,7 +252,7 @@ cl_bell(SCR *sp) * cl_clrtoeol -- * Clear from the current cursor to the end of the line. * - * PUBLIC: int cl_clrtoeol __P((SCR *)); + * PUBLIC: int cl_clrtoeol(SCR *); */ int cl_clrtoeol(SCR *sp) @@ -281,7 +281,7 @@ cl_clrtoeol(SCR *sp) * cl_cursor -- * Return the current cursor position. * - * PUBLIC: int cl_cursor __P((SCR *, size_t *, size_t *)); + * PUBLIC: int cl_cursor(SCR *, size_t *, size_t *); */ int cl_cursor(SCR *sp, size_t *yp, size_t *xp) @@ -307,7 +307,7 @@ cl_cursor(SCR *sp, size_t *yp, size_t *x * cl_deleteln -- * Delete the current line, scrolling all lines below it. * - * PUBLIC: int cl_deleteln __P((SCR *)); + * PUBLIC: int cl_deleteln(SCR *); */ int cl_deleteln(SCR *sp) @@ -344,7 +344,7 @@ cl_deleteln(SCR *sp) * cl_discard -- * Discard a screen. * - * PUBLIC: int cl_discard __P((SCR *, SCR **)); + * PUBLIC: int cl_discard(SCR *, SCR **); */ int cl_discard(SCR *discardp, SCR **acquirep) @@ -385,7 +385,7 @@ cl_discard(SCR *discardp, SCR **acquirep * Adjust the screen for ex. This routine is purely for standalone * ex programs. All special purpose, all special case. * - * PUBLIC: int cl_ex_adjust __P((SCR *, exadj_t)); + * PUBLIC: int cl_ex_adjust(SCR *, exadj_t); */ int cl_ex_adjust(SCR *sp, exadj_t action) @@ -440,7 +440,7 @@ cl_ex_adjust(SCR *sp, exadj_t action) * cl_insertln -- * Push down the current line, discarding the bottom line. * - * PUBLIC: int cl_insertln __P((SCR *)); + * PUBLIC: int cl_insertln(SCR *); */ int cl_insertln(SCR *sp) @@ -458,7 +458,7 @@ cl_insertln(SCR *sp) * cl_keyval -- * Return the value for a special key. * - * PUBLIC: int cl_keyval __P((SCR *, scr_keyval_t, CHAR_T *, int *)); + * PUBLIC: int cl_keyval(SCR *, scr_keyval_t, CHAR_T *, int *); */ int cl_keyval(SCR *sp, scr_keyval_t val, CHAR_T *chp, int *dnep) @@ -496,7 +496,7 @@ cl_keyval(SCR *sp, scr_keyval_t val, CHA * cl_move -- * Move the cursor. * - * PUBLIC: int cl_move __P((SCR *, size_t, size_t)); + * PUBLIC: int cl_move(SCR *, size_t, size_t); */ int cl_move(SCR *sp, size_t lno, size_t cno) @@ -516,7 +516,7 @@ cl_move(SCR *sp, size_t lno, size_t cno) * cl_refresh -- * Refresh the screen. * - * PUBLIC: int cl_refresh __P((SCR *, int)); + * PUBLIC: int cl_refresh(SCR *, int); */ int cl_refresh(SCR *sp, int repaint) @@ -599,7 +599,7 @@ cl_rdiv(SCR *sp) * cl_rename -- * Rename the file. * - * PUBLIC: int cl_rename __P((SCR *, char *, int)); + * PUBLIC: int cl_rename(SCR *, char *, int); */ int cl_rename(SCR *sp, char *name, int on) @@ -621,7 +621,7 @@ cl_rename(SCR *sp, char *name, int on) if (on) { clp->focus = sp; if (!F_ISSET(clp, CL_RENAME_OK) || - strncmp(OG_STR(gp, GO_TERM), "xterm", 5)) + strncmp(OG_STR(gp, GO_TERM), "xterm", 5)) return (0); if (clp->oname == NULL && (wid = getenv("WINDOWID"))) { @@ -654,7 +654,7 @@ rename: cl_setname(gp, name); * cl_setname -- * Set a X11 icon/window name. * - * PUBLIC: void cl_setname __P((GS *, char *)); + * PUBLIC: void cl_setname(GS *, char *); */ void cl_setname(GS *gp, char *name) @@ -671,7 +671,7 @@ cl_setname(GS *gp, char *name) * cl_split -- * Split a screen. * - * PUBLIC: int cl_split __P((SCR *, SCR *)); + * PUBLIC: int cl_split(SCR *, SCR *); */ int cl_split(SCR *origp, SCR *newp) @@ -697,7 +697,7 @@ cl_split(SCR *origp, SCR *newp) * cl_suspend -- * Suspend a screen. * - * PUBLIC: int cl_suspend __P((SCR *, int *)); + * PUBLIC: int cl_suspend(SCR *, int *); */ int cl_suspend(SCR *sp, int *allowedp) @@ -825,7 +825,7 @@ cl_suspend(SCR *sp, int *allowedp) * cl_usage -- * Print out the curses usage messages. * - * PUBLIC: void cl_usage __P((void)); + * PUBLIC: void cl_usage(void); */ void cl_usage(void) Modified: head/contrib/nvi/cl/cl_main.c ============================================================================== --- head/contrib/nvi/cl/cl_main.c Fri Apr 10 17:21:47 2015 (r281372) +++ head/contrib/nvi/cl/cl_main.c Fri Apr 10 17:50:28 2015 (r281373) @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: cl_main.c,v 10.55 2011/08/15 19:52:28 zy Exp $"; +static const char sccsid[] = "$Id: cl_main.c,v 10.56 2015/04/05 06:20:53 zy Exp $"; #endif /* not lint */ #include @@ -36,20 +36,20 @@ static const char sccsid[] = "$Id: cl_ma GS *__global_list; /* GLOBAL: List of screens. */ sigset_t __sigblockset; /* GLOBAL: Blocked signals. */ -static void cl_func_std __P((GS *)); -static CL_PRIVATE *cl_init __P((GS *)); -static GS *gs_init __P((char *)); -static void perr __P((char *, char *)); -static int setsig __P((int, struct sigaction *, void (*)(int))); -static void sig_end __P((GS *)); -static void term_init __P((char *, char *)); +static void cl_func_std(GS *); +static CL_PRIVATE *cl_init(GS *); +static GS *gs_init(char *); +static void perr(char *, char *); +static int setsig(int, struct sigaction *, void (*)(int)); +static void sig_end(GS *); +static void term_init(char *, char *); /* * main -- * This is the main loop for the standalone curses editor. */ int -main(int argc, char **argv) +main(int argc, char *argv[]) { static int reenter; CL_PRIVATE *clp; @@ -92,7 +92,7 @@ main(int argc, char **argv) * have to use termcap/terminfo to find out how big the screen is. */ if ((ttype = getenv("TERM")) == NULL) - ttype = "unknown"; + ttype = "ansi"; term_init(gp->progname, ttype); /* Add the terminal type to the global structure. */ @@ -146,7 +146,7 @@ main(int argc, char **argv) } /* Free the global and CL private areas. */ -#if defined(DEBUG) || defined(PURIFY) || defined(LIBRARY) +#if defined(DEBUG) || defined(PURIFY) if (clp->oname != NULL) free(clp->oname); free(clp); @@ -292,7 +292,7 @@ h_winch(int signo) * sig_init -- * Initialize signals. * - * PUBLIC: int sig_init __P((GS *, SCR *)); + * PUBLIC: int sig_init(GS *, SCR *); */ int sig_init(GS *gp, SCR *sp) @@ -337,7 +337,7 @@ sig_init(GS *gp, SCR *sp) * Set a signal handler. */ static int -setsig(int signo, struct sigaction *oactp, void (*handler) (int)) +setsig(int signo, struct sigaction *oactp, void (*handler)(int)) { struct sigaction act; @@ -345,21 +345,12 @@ setsig(int signo, struct sigaction *oact * Use sigaction(2), not signal(3), since we don't always want to * restart system calls. The example is when waiting for a command * mode keystroke and SIGWINCH arrives. Besides, you can't portably - * restart system calls (thanks, POSIX!). On the other hand, you - * can't portably NOT restart system calls (thanks, Sun!). SunOS - * used SA_INTERRUPT as their extension to NOT restart read calls. - * We sure hope nobody else used it for anything else. Mom told me - * there'd be days like this. She just never told me that there'd - * be so many. + * restart system calls (thanks, POSIX!). */ act.sa_handler = handler; sigemptyset(&act.sa_mask); -#ifdef SA_INTERRUPT - act.sa_flags = SA_INTERRUPT; -#else act.sa_flags = 0; -#endif return (sigaction(signo, &act, oactp)); } Modified: head/contrib/nvi/cl/cl_read.c ============================================================================== --- head/contrib/nvi/cl/cl_read.c Fri Apr 10 17:21:47 2015 (r281372) +++ head/contrib/nvi/cl/cl_read.c Fri Apr 10 17:50:28 2015 (r281373) @@ -35,15 +35,15 @@ static const char sccsid[] = "$Id: cl_re #undef columns #undef lines -static input_t cl_read __P((SCR *, - u_int32_t, char *, size_t, int *, struct timeval *)); -static int cl_resize __P((SCR *, size_t, size_t)); +static input_t cl_read(SCR *, + u_int32_t, char *, size_t, int *, struct timeval *); +static int cl_resize(SCR *, size_t, size_t); /* * cl_event -- * Return a single event. * - * PUBLIC: int cl_event __P((SCR *, EVENT *, u_int32_t, int)); + * PUBLIC: int cl_event(SCR *, EVENT *, u_int32_t, int); */ int cl_event(SCR *sp, EVENT *evp, u_int32_t flags, int ms) @@ -143,7 +143,8 @@ read: * Read characters from the input. */ static input_t -cl_read(SCR *sp, u_int32_t flags, char *bp, size_t blen, int *nrp, struct timeval *tp) +cl_read(SCR *sp, u_int32_t flags, char *bp, size_t blen, int *nrp, + struct timeval *tp) { struct termios term1, term2; CL_PRIVATE *clp; Modified: head/contrib/nvi/cl/cl_screen.c ============================================================================== --- head/contrib/nvi/cl/cl_screen.c Fri Apr 10 17:21:47 2015 (r281372) +++ head/contrib/nvi/cl/cl_screen.c Fri Apr 10 17:50:28 2015 (r281373) @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: cl_screen.c,v 10.56 2002/05/03 19:59:44 skimo Exp $"; +static const char sccsid[] = "$Id: cl_screen.c,v 10.58 2015/04/08 02:12:11 zy Exp $"; #endif /* not lint */ #include @@ -32,18 +32,18 @@ static const char sccsid[] = "$Id: cl_sc #include "../common/common.h" #include "cl.h" -static int cl_ex_end __P((GS *)); -static int cl_ex_init __P((SCR *)); -static void cl_freecap __P((CL_PRIVATE *)); -static int cl_vi_end __P((GS *)); -static int cl_vi_init __P((SCR *)); -static int cl_putenv __P((char *, char *, u_long)); +static int cl_ex_end(GS *); +static int cl_ex_init(SCR *); +static void cl_freecap(CL_PRIVATE *); +static int cl_vi_end(GS *); +static int cl_vi_init(SCR *); +static int cl_putenv(char *, char *, u_long); /* * cl_screen -- * Switch screen types. * - * PUBLIC: int cl_screen __P((SCR *, u_int32_t)); + * PUBLIC: int cl_screen(SCR *, u_int32_t); */ int cl_screen(SCR *sp, u_int32_t flags) @@ -58,11 +58,9 @@ cl_screen(SCR *sp, u_int32_t flags) /* See if the current information is incorrect. */ if (F_ISSET(gp, G_SRESTART)) { - if (CLSP(sp)) { - delwin(CLSP(sp)); - sp->cl_private = NULL; - } - if (cl_quit(gp)) + if ((!F_ISSET(sp, SC_SCR_EX | SC_SCR_VI) || + resizeterm(O_VAL(sp, O_LINES), O_VAL(sp, O_COLUMNS))) && + cl_quit(gp)) return (1); F_CLR(gp, G_SRESTART); } @@ -131,7 +129,7 @@ cl_screen(SCR *sp, u_int32_t flags) * cl_quit -- * Shutdown the screens. * - * PUBLIC: int cl_quit __P((GS *)); + * PUBLIC: int cl_quit(GS *); */ int cl_quit(GS *gp) @@ -234,20 +232,15 @@ cl_vi_init(SCR *sp) cl_putenv("COLUMNS", NULL, (u_long)O_VAL(sp, O_COLUMNS)); /* - * We don't care about the SCREEN reference returned by newterm, we - * never have more than one SCREEN at a time. - * - * XXX - * The SunOS initscr() can't be called twice. Don't even think about - * using it. It fails in subtle ways (e.g. select(2) on fileno(stdin) - * stops working). (The SVID notes that applications should only call - * initscr() once.) - * - * XXX - * The HP/UX newterm doesn't support the NULL first argument, so we - * have to specify the terminal type. + * The terminal is aways initialized, either in `main`, or by a + * previous call to newterm(3X). */ (void)del_curterm(cur_term); + + /* + * We never have more than one SCREEN at a time, so set_term(NULL) will + * give us the last SCREEN. + */ errno = 0; if (newterm(ttype, stdout, stdin) == NULL) { if (errno) @@ -416,6 +409,9 @@ cl_vi_end(GS *gp) /* End curses window. */ (void)endwin(); + /* Free the SCREEN created by newterm(3X). */ + delscreen(set_term(NULL)); + /* * XXX * The screen TE sequence just got sent. See the comment in @@ -520,7 +516,7 @@ cl_ex_end(GS *gp) * cl_getcap -- * Retrieve termcap/terminfo strings. * - * PUBLIC: int cl_getcap __P((SCR *, char *, char **)); + * PUBLIC: int cl_getcap(SCR *, char *, char **); */ int cl_getcap(SCR *sp, char *name, char **elementp) Modified: head/contrib/nvi/cl/cl_term.c ============================================================================== --- head/contrib/nvi/cl/cl_term.c Fri Apr 10 17:21:47 2015 (r281372) +++ head/contrib/nvi/cl/cl_term.c Fri Apr 10 17:50:28 2015 (r281373) @@ -10,7 +10,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: cl_term.c,v 10.34 2013/12/07 16:21:14 wjenkner Exp $"; +static const char sccsid[] = "$Id: cl_term.c,v 10.35 2015/04/08 02:12:11 zy Exp $"; #endif /* not lint */ #include @@ -34,7 +34,7 @@ static const char sccsid[] = "$Id: cl_te #include "../common/common.h" #include "cl.h" -static int cl_pfmap __P((SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t)); +static int cl_pfmap(SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t); /* * XXX @@ -81,7 +81,7 @@ static TKLIST const m2_tklist[] = { /* I * cl_term_init -- * Initialize the special keys defined by the termcap/terminfo entry. * - * PUBLIC: int cl_term_init __P((SCR *)); + * PUBLIC: int cl_term_init(SCR *); */ int cl_term_init(SCR *sp) @@ -182,7 +182,7 @@ cl_term_init(SCR *sp) * cl_term_end -- * End the special keys defined by the termcap/terminfo entry. * - * PUBLIC: int cl_term_end __P((GS *)); + * PUBLIC: int cl_term_end(GS *); */ int cl_term_end(GS *gp) @@ -206,7 +206,7 @@ cl_term_end(GS *gp) * cl_fmap -- * Map a function key. * - * PUBLIC: int cl_fmap __P((SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t)); + * PUBLIC: int cl_fmap(SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t); */ int cl_fmap(SCR *sp, seq_t stype, CHAR_T *from, size_t flen, CHAR_T *to, size_t tlen) @@ -258,7 +258,7 @@ cl_pfmap(SCR *sp, seq_t stype, CHAR_T *f * cl_optchange -- * Curses screen specific "option changed" routine. * - * PUBLIC: int cl_optchange __P((SCR *, int, char *, u_long *)); + * PUBLIC: int cl_optchange(SCR *, int, char *, u_long *); */ int cl_optchange(SCR *sp, int opt, char *str, u_long *valp) @@ -268,15 +268,16 @@ cl_optchange(SCR *sp, int opt, char *str clp = CLP(sp); switch (opt) { + case O_TERM: + F_CLR(sp, SC_SCR_EX | SC_SCR_VI); + /* FALLTHROUGH */ case O_COLUMNS: case O_LINES: - case O_TERM: /* - * Changing the columns, lines or terminal require that - * we restart the screen. + * Changing the terminal type requires that we reinitialize + * curses, while resizing does not. */ F_SET(sp->gp, G_SRESTART); - F_CLR(sp, SC_SCR_EX | SC_SCR_VI); break; case O_MESG: (void)cl_omesg(sp, clp, *valp); @@ -305,7 +306,7 @@ cl_optchange(SCR *sp, int opt, char *str * cl_omesg -- * Turn the tty write permission on or off. * - * PUBLIC: int cl_omesg __P((SCR *, CL_PRIVATE *, int)); + * PUBLIC: int cl_omesg(SCR *, CL_PRIVATE *, int); */ int cl_omesg(SCR *sp, CL_PRIVATE *clp, int on) @@ -351,7 +352,7 @@ cl_omesg(SCR *sp, CL_PRIVATE *clp, int o * cl_ssize -- * Return the terminal size. * - * PUBLIC: int cl_ssize __P((SCR *, int, size_t *, size_t *, int *)); + * PUBLIC: int cl_ssize(SCR *, int, size_t *, size_t *, int *); */ int cl_ssize(SCR *sp, int sigwinch, size_t *rowp, size_t *colp, int *changedp) @@ -467,7 +468,7 @@ noterm: if (row == 0) * cl_putchar -- * Function version of putchar, for tputs. * - * PUBLIC: int cl_putchar __P((int)); + * PUBLIC: int cl_putchar(int); */ int cl_putchar(int ch) Modified: head/contrib/nvi/cl/extern.h ============================================================================== --- head/contrib/nvi/cl/extern.h Fri Apr 10 17:21:47 2015 (r281372) +++ head/contrib/nvi/cl/extern.h Fri Apr 10 17:50:28 2015 (r281373) @@ -1,31 +1,31 @@ -int cl_waddstr __P((SCR *, const CHAR_T *, size_t)); -int cl_addstr __P((SCR *, const char *, size_t)); -int cl_attr __P((SCR *, scr_attr_t, int)); -int cl_baud __P((SCR *, u_long *)); -int cl_bell __P((SCR *)); -int cl_clrtoeol __P((SCR *)); -int cl_cursor __P((SCR *, size_t *, size_t *)); -int cl_deleteln __P((SCR *)); -int cl_discard __P((SCR *, SCR **)); -int cl_ex_adjust __P((SCR *, exadj_t)); -int cl_insertln __P((SCR *)); -int cl_keyval __P((SCR *, scr_keyval_t, CHAR_T *, int *)); -int cl_move __P((SCR *, size_t, size_t)); -int cl_refresh __P((SCR *, int)); -int cl_rename __P((SCR *, char *, int)); -void cl_setname __P((GS *, char *)); -int cl_split __P((SCR *, SCR *)); -int cl_suspend __P((SCR *, int *)); -void cl_usage __P((void)); -int sig_init __P((GS *, SCR *)); -int cl_event __P((SCR *, EVENT *, u_int32_t, int)); -int cl_screen __P((SCR *, u_int32_t)); -int cl_quit __P((GS *)); -int cl_getcap __P((SCR *, char *, char **)); -int cl_term_init __P((SCR *)); -int cl_term_end __P((GS *)); -int cl_fmap __P((SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t)); -int cl_optchange __P((SCR *, int, char *, u_long *)); -int cl_omesg __P((SCR *, CL_PRIVATE *, int)); -int cl_ssize __P((SCR *, int, size_t *, size_t *, int *)); -int cl_putchar __P((int)); +int cl_waddstr(SCR *, const CHAR_T *, size_t); +int cl_addstr(SCR *, const char *, size_t); +int cl_attr(SCR *, scr_attr_t, int); +int cl_baud(SCR *, u_long *); +int cl_bell(SCR *); +int cl_clrtoeol(SCR *); +int cl_cursor(SCR *, size_t *, size_t *); +int cl_deleteln(SCR *); +int cl_discard(SCR *, SCR **); +int cl_ex_adjust(SCR *, exadj_t); +int cl_insertln(SCR *); +int cl_keyval(SCR *, scr_keyval_t, CHAR_T *, int *); +int cl_move(SCR *, size_t, size_t); +int cl_refresh(SCR *, int); +int cl_rename(SCR *, char *, int); +void cl_setname(GS *, char *); +int cl_split(SCR *, SCR *); +int cl_suspend(SCR *, int *); +void cl_usage(void); +int sig_init(GS *, SCR *); +int cl_event(SCR *, EVENT *, u_int32_t, int); +int cl_screen(SCR *, u_int32_t); +int cl_quit(GS *); +int cl_getcap(SCR *, char *, char **); +int cl_term_init(SCR *); +int cl_term_end(GS *); +int cl_fmap(SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t); +int cl_optchange(SCR *, int, char *, u_long *); +int cl_omesg(SCR *, CL_PRIVATE *, int); +int cl_ssize(SCR *, int, size_t *, size_t *, int *); +int cl_putchar(int); Modified: head/contrib/nvi/common/common.h ============================================================================== --- head/contrib/nvi/common/common.h Fri Apr 10 17:21:47 2015 (r281372) +++ head/contrib/nvi/common/common.h Fri Apr 10 17:50:28 2015 (r281373) @@ -23,8 +23,8 @@ */ typedef struct _cb CB; typedef struct _csc CSC; -typedef struct _conv CONV; -typedef struct _conv_win CONVWIN; +typedef struct _conv CONV; +typedef struct _conv_win CONVWIN; typedef struct _event EVENT; typedef struct _excmd EXCMD; typedef struct _exf EXF; Modified: head/contrib/nvi/common/conv.c ============================================================================== --- head/contrib/nvi/common/conv.c Fri Apr 10 17:21:47 2015 (r281372) +++ head/contrib/nvi/common/conv.c Fri Apr 10 17:50:28 2015 (r281373) @@ -12,7 +12,7 @@ #include "config.h" #ifndef lint -static const char sccsid[] = "$Id: conv.c,v 2.39 2013/07/01 23:28:13 zy Exp $"; +static const char sccsid[] = "$Id: conv.c,v 2.40 2014/02/27 16:25:29 zy Exp $"; #endif /* not lint */ #include @@ -36,35 +36,37 @@ static const char sccsid[] = "$Id: conv. * codeset -- * Get the locale encoding. * - * PUBLIC: char * codeset __P((void)); + * PUBLIC: char * codeset(void); */ char * -codeset(void) { - static char *cs; +codeset(void) +{ + static char *cs; + + if (cs == NULL) + cs = nl_langinfo(CODESET); - if (cs == NULL) - cs = nl_langinfo(CODESET); - return cs; + return cs; } #ifdef USE_WIDECHAR static int -raw2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, - size_t *tolen, CHAR_T **dst) +raw2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, size_t *tolen, + CHAR_T **dst) { - int i; - CHAR_T **tostr = &cw->bp1.wc; - size_t *blen = &cw->blen1; + int i; + CHAR_T **tostr = &cw->bp1.wc; + size_t *blen = &cw->blen1; - BINC_RETW(NULL, *tostr, *blen, len); + BINC_RETW(NULL, *tostr, *blen, len); - *tolen = len; - for (i = 0; i < len; ++i) - (*tostr)[i] = (u_char) str[i]; + *tolen = len; + for (i = 0; i < len; ++i) + (*tostr)[i] = (u_char) str[i]; - *dst = cw->bp1.wc; + *dst = cw->bp1.wc; - return 0; + return 0; } #define CONV_BUFFER_SIZE 512 @@ -73,27 +75,27 @@ raw2int(SCR *sp, const char * str, ssize * len contains the number of bytes put in the buffer */ #ifdef USE_ICONV -#define CONVERT(str, left, src, len) \ - do { \ - size_t outleft; \ - char *bp = buffer; \ - outleft = CONV_BUFFER_SIZE; \ - errno = 0; \ - if (iconv(id, (iconv_src_t)&str, &left, &bp, &outleft) == -1 && \ - errno != E2BIG) \ - goto err; \ - if ((len = CONV_BUFFER_SIZE - outleft) == 0) { \ - error = -left; \ - goto err; \ - } \ - src = buffer; \ - } while (0) +#define CONVERT(str, left, src, len) \ + do { \ + size_t outleft; \ + char *bp = buffer; \ + outleft = CONV_BUFFER_SIZE; \ + errno = 0; \ + if (iconv(id, (iconv_src_t)&str, &left, &bp, &outleft) \ + == -1 && errno != E2BIG) \ + goto err; \ + if ((len = CONV_BUFFER_SIZE - outleft) == 0) { \ + error = -left; \ + goto err; \ + } \ + src = buffer; \ + } while (0) #define IC_RESET() \ - do { \ - if (id != (iconv_t)-1) \ - iconv(id, NULL, NULL, NULL, NULL); \ - } while(0) + do { \ + if (id != (iconv_t)-1) \ + iconv(id, NULL, NULL, NULL, NULL); \ + } while(0) #else #define CONVERT(str, left, src, len) #define IC_RESET() @@ -101,114 +103,116 @@ raw2int(SCR *sp, const char * str, ssize static int default_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, - size_t *tolen, CHAR_T **dst, iconv_t id) + size_t *tolen, CHAR_T **dst, iconv_t id) { - size_t i = 0, j; - CHAR_T **tostr = &cw->bp1.wc; - size_t *blen = &cw->blen1; - mbstate_t mbs; - size_t n; - ssize_t nlen = len; - char *src = (char *)str; + size_t i = 0, j; + CHAR_T **tostr = &cw->bp1.wc; + size_t *blen = &cw->blen1; + mbstate_t mbs; + size_t n; + ssize_t nlen = len; + char *src = (char *)str; #ifdef USE_ICONV - char buffer[CONV_BUFFER_SIZE]; + char buffer[CONV_BUFFER_SIZE]; #endif - size_t left = len; - int error = 1; + size_t left = len; + int error = 1; - BZERO(&mbs, 1); - BINC_RETW(NULL, *tostr, *blen, nlen); + BZERO(&mbs, 1); + BINC_RETW(NULL, *tostr, *blen, nlen); #ifdef USE_ICONV - if (id != (iconv_t)-1) - CONVERT(str, left, src, len); + if (id != (iconv_t)-1) + CONVERT(str, left, src, len); #endif - for (i = 0, j = 0; j < len; ) { - n = mbrtowc((*tostr)+i, src+j, len-j, &mbs); - /* NULL character converted */ - if (n == -2) error = -(len-j); - if (n == -1 || n == -2) goto err; - if (n == 0) n = 1; - j += n; - if (++i >= *blen) { - nlen += 256; - BINC_RETW(NULL, *tostr, *blen, nlen); - } - if (id != (iconv_t)-1 && j == len && left) { - CONVERT(str, left, src, len); - j = 0; + for (i = 0, j = 0; j < len; ) { + n = mbrtowc((*tostr)+i, src+j, len-j, &mbs); + /* NULL character converted */ + if (n == -2) + error = -(len-j); + if (n == -1 || n == -2) + goto err; + if (n == 0) + n = 1; + j += n; + if (++i >= *blen) { + nlen += 256; + BINC_RETW(NULL, *tostr, *blen, nlen); + } + if (id != (iconv_t)-1 && j == len && left) { + CONVERT(str, left, src, len); + j = 0; + } } - } - error = 0; + error = 0; err: - *tolen = i; - *dst = cw->bp1.wc; - IC_RESET(); + *tolen = i; + *dst = cw->bp1.wc; + IC_RESET(); - return error; + return error; } static int -fe_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, - size_t *tolen, CHAR_T **dst) +fe_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, size_t *tolen, + CHAR_T **dst) { - return default_char2int(sp, str, len, cw, tolen, dst, - sp->conv.id[IC_FE_CHAR2INT]); + return default_char2int(sp, str, len, cw, tolen, dst, + sp->conv.id[IC_FE_CHAR2INT]); } static int -ie_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, - size_t *tolen, CHAR_T **dst) +ie_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, size_t *tolen, + CHAR_T **dst) { - return default_char2int(sp, str, len, cw, tolen, dst, - sp->conv.id[IC_IE_CHAR2INT]); + return default_char2int(sp, str, len, cw, tolen, dst, + sp->conv.id[IC_IE_CHAR2INT]); } static int -cs_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, - size_t *tolen, CHAR_T **dst) +cs_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, size_t *tolen, + CHAR_T **dst) { - return default_char2int(sp, str, len, cw, tolen, dst, - (iconv_t)-1); + return default_char2int(sp, str, len, cw, tolen, dst, (iconv_t)-1); } static int -int2raw(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, - size_t *tolen, char **dst) +int2raw(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, size_t *tolen, + char **dst) { - int i; - char **tostr = &cw->bp1.c; - size_t *blen = &cw->blen1; + int i; + char **tostr = &cw->bp1.c; + size_t *blen = &cw->blen1; - BINC_RETC(NULL, *tostr, *blen, len); + BINC_RETC(NULL, *tostr, *blen, len); - *tolen = len; - for (i = 0; i < len; ++i) - (*tostr)[i] = str[i]; + *tolen = len; + for (i = 0; i < len; ++i) + (*tostr)[i] = str[i]; - *dst = cw->bp1.c; + *dst = cw->bp1.c; - return 0; + return 0; } static int default_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, - size_t *tolen, char **pdst, iconv_t id) + size_t *tolen, char **pdst, iconv_t id) { - size_t i, j, offset = 0; - char **tostr = &cw->bp1.c; - size_t *blen = &cw->blen1; - mbstate_t mbs; - size_t n; - ssize_t nlen = len + MB_CUR_MAX; - char *dst; - size_t buflen; + size_t i, j, offset = 0; + char **tostr = &cw->bp1.c; + size_t *blen = &cw->blen1; + mbstate_t mbs; + size_t n; + ssize_t nlen = len + MB_CUR_MAX; + char *dst; + size_t buflen; #ifdef USE_ICONV - char buffer[CONV_BUFFER_SIZE]; + char buffer[CONV_BUFFER_SIZE]; #endif - int error = 1; + int error = 1; /* convert first len bytes of buffer and append it to cw->bp * len is adjusted => 0 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 18:08:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C30C7BA; Fri, 10 Apr 2015 18:08:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4724ADB2; Fri, 10 Apr 2015 18:08:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3AI8AnB033278; Fri, 10 Apr 2015 18:08:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AI8AYC033277; Fri, 10 Apr 2015 18:08:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504101808.t3AI8AYC033277@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Apr 2015 18:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281376 - head/sys/boot/efi/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 18:08:10 -0000 Author: emaste Date: Fri Apr 10 18:08:09 2015 New Revision: 281376 URL: https://svnweb.freebsd.org/changeset/base/281376 Log: Limit EFI framebuffer metadata to amd64 for now The i386 loader.efi does not yet exist. Avoid dealing with vt and framebuffer issues there until the initial bootstrapping is done. Modified: head/sys/boot/efi/loader/bootinfo.c Modified: head/sys/boot/efi/loader/bootinfo.c ============================================================================== --- head/sys/boot/efi/loader/bootinfo.c Fri Apr 10 17:55:45 2015 (r281375) +++ head/sys/boot/efi/loader/bootinfo.c Fri Apr 10 18:08:09 2015 (r281376) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "loader_efi.h" -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) #include #include "framebuffer.h" #endif @@ -244,7 +244,7 @@ bi_load_efi_data(struct preloaded_file * UINT32 mmver; struct efi_map_header *efihdr; -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) struct efi_fb efifb; if (efi_find_framebuffer(&efifb) == 0) { From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 18:21:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7DB6C80; Fri, 10 Apr 2015 18:21:24 +0000 (UTC) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8D12FB3; Fri, 10 Apr 2015 18:21:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id t3AIJdSn004253; Fri, 10 Apr 2015 21:20:39 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Fri, 10 Apr 2015 21:19:39 +0300 (MSK) From: Dmitry Morozovsky To: Baptiste Daroussin Subject: Re: svn commit: r281373 - in head: contrib/nvi contrib/nvi/catalog contrib/nvi/cl contrib/nvi/common contrib/nvi/docs contrib/nvi/docs/USD.doc contrib/nvi/docs/internals contrib/nvi/docs/interp contrib... In-Reply-To: <201504101750.t3AHoSo3023955@svn.freebsd.org> Message-ID: References: <201504101750.t3AHoSo3023955@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Fri, 10 Apr 2015 21:20:46 +0300 (MSK) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 18:21:24 -0000 Bapt, On Fri, 10 Apr 2015, Baptiste Daroussin wrote: > Author: bapt > Date: Fri Apr 10 17:50:28 2015 > New Revision: 281373 > URL: https://svnweb.freebsd.org/changeset/base/281373 > > Log: > Update nvi to 2.1.3 which fixes the data corruption when locale conversion > failed Thank you very much for this import. Any MFC Planned please? -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 18:23:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E746FDCA; Fri, 10 Apr 2015 18:23:01 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C3383FC1; Fri, 10 Apr 2015 18:23:01 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 752E312AC6; Fri, 10 Apr 2015 11:23:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1428690181; x=1428704581; bh=9RBszSzp4w9GHrYJvR1Ghnzijy5Mp9xy5emjGsgqDdY=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=0bIAfuFKBNZRpilga2qImrJOkYbLZ3LQNSGm+iYlv5FJ+heip5xzS9uEGeCMyjZ74 qdBs4XYdL2WhAVpZDtoAs1zipO6/YGVyW/a/ovVk59ztWK3K49w1r5ONHSjGBf/jXh aTRrlVwa1CkFWIHnAXHf1fSt4Qu1SKVVSXg5lmJY= Message-ID: <55281505.9030601@delphij.net> Date: Fri, 10 Apr 2015 11:23:01 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Matteo Riondato , d@delphij.net Subject: Re: svn commit: r281316 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/common contrib/xz/src/liblzma/lz contrib/xz/src/liblzma/lzma contrib/xz/src/xz... References: <201504091803.t39I3R4Y042146@svn.freebsd.org> <552803B6.4000005@FreeBSD.org> <55280780.1040104@delphij.net> <55280906.4040503@delphij.net> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Xin LI , thomas@FreeBSD.org, svn-src-head@freebsd.org, Jung-uk Kim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 18:23:02 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 04/10/15 10:32, Matteo Riondato wrote: > Yep, I confirm that it works. Thanks again. Matthew Fuller have pointed out that this is because OpenSSL's libcrypto is supplying same named symbols for libmd. I can confirm that after applying D2216 and reverting the r281372 libarchive would still work fine. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.2 (FreeBSD) iQIcBAEBCgAGBQJVKBUFAAoJEJW2GBstM+nsY50P/1cUO72iROwP6+Sq3eGozYBb 5+Z+1qRceEiRhcoHXwCiO/2SFgIwULkatGvoKJEgCWvRvMAmQKnTxqB9ztB50Jcn hR0w9Ce+k0cuz7SGtCfC75xsnqCdgdSsrui1ZaSgcClAo7X6dhoGulHD0P91r9VD cEkzUTTk8CYt3CT7AYzpR6/12ZB0lJl92Tw7kDqlE7AthbJz7D0lvLzIXevMpbiG 4PxK39Q7DAWFtL/9/cQZ+xCEv+BHjXOvHbLNVW4NY7lAR0QZbmuf5N9kWrLo4D85 neIzkut4UmEDMEIx6BKNwTF54JTNgUAnuaLFNfgNSE2vcv2fL0CGPbkQakVRDx7K qhc6s4nXXRbAF7kb+Mdl3t3zUNGEyegiRffx/zFo4xS9P9iILP2UNrGgfOk3aYvR c/1fZBqAXl6twRew9ChEiN6WtcvPaWIt7MlaEu1PPd5dHgNmDEwJYLUd1s+oLvEf PyPY+3zTg4GiS/yOlyOcjhVu1bc0EE4ZnGet+CuDI7VWOUUZAoEazZAdVYczVNFj 2idIl/IxxDV7TTGasoXDAyC8LgvAnFiqW8Q8nT1LWtN1VNOH/yEp3Ej15825PzZR LDgo0xHM+5VXUd8KnKxoJUBN4Jua+qIHh2bd1vf5AeeZvYe3tYBPrvwR+hEsVhYy Zs6gufMECvOf7YlND/oS =olEY -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 18:45:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A99558D; Fri, 10 Apr 2015 18:45:27 +0000 (UTC) Received: from mail.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "asuka.mahoroba.org", Issuer "ca.mahoroba.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C7F726B; Fri, 10 Apr 2015 18:45:26 +0000 (UTC) Received: from yuga.mahoroba.org (ume@yuga.mahoroba.org [IPv6:2001:2f0:104:8010:7258:12ff:fe22:d94b]) (user=ume mech=DIGEST-MD5 bits=0) by mail.mahoroba.org (8.14.9/8.14.9) with ESMTP/inet6 id t3AIj6qU055787 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Sat, 11 Apr 2015 03:45:11 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sat, 11 Apr 2015 03:45:05 +0900 Message-ID: From: Hajimu UMEMOTO To: d@delphij.net Subject: Re: svn commit: r281316 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/common contrib/xz/src/liblzma/lz contrib/xz/src/liblzma/lzma contrib/xz/src/xz... In-Reply-To: <55281505.9030601@delphij.net> References: <201504091803.t39I3R4Y042146@svn.freebsd.org> <552803B6.4000005@FreeBSD.org> <55280780.1040104@delphij.net> <55280906.4040503@delphij.net> <55281505.9030601@delphij.net> User-Agent: xcite1.60> Wanderlust/2.15.9 (Almost Unreal) Emacs/24.4 Mule/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 10.1-STABLE X-PGP-Key: http://www.mahoroba.org/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Sat, 11 Apr 2015 03:45:12 +0900 (JST) X-Virus-Scanned: clamav-milter 0.98.6 at asuka.mahoroba.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on asuka.mahoroba.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Xin LI , thomas@FreeBSD.org, svn-src-head@freebsd.org, Matteo Riondato , Jung-uk Kim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 18:45:27 -0000 Hi, >>>>> On Fri, 10 Apr 2015 11:23:01 -0700 >>>>> Xin Li said: delphij> I can confirm that after applying D2216 and reverting the r281372 delphij> libarchive would still work fine. Umm, it seems duplicates with D1542. Sincerely, -- Hajimu UMEMOTO ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.mahoroba.org/~ume/ From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 18:49:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 662F8712; Fri, 10 Apr 2015 18:49:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50D5229B; Fri, 10 Apr 2015 18:49:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3AInjdl053500; Fri, 10 Apr 2015 18:49:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AInipT053498; Fri, 10 Apr 2015 18:49:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504101849.t3AInipT053498@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Apr 2015 18:49:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281377 - head/sys/boot/efi/loader/arch/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 18:49:45 -0000 Author: emaste Date: Fri Apr 10 18:49:43 2015 New Revision: 281377 URL: https://svnweb.freebsd.org/changeset/base/281377 Log: Add build support for i386 loader.efi Kernel changes are required for this to be useful but this will allow others to experiment. Differential Revision: https://reviews.freebsd.org/D2276 Added: head/sys/boot/efi/loader/arch/i386/Makefile.inc (contents, props changed) Modified: head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c Added: head/sys/boot/efi/loader/arch/i386/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/efi/loader/arch/i386/Makefile.inc Fri Apr 10 18:49:43 2015 (r281377) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +SRCS+= start.S \ + efimd.c \ + elf32_freebsd.c \ + exec.c \ + reloc.c + +.PATH: ${.CURDIR}/../../i386/libi386 +SRCS+= nullconsole.c \ + comconsole.c Modified: head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c ============================================================================== --- head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c Fri Apr 10 18:08:09 2015 (r281376) +++ head/sys/boot/efi/loader/arch/i386/elf32_freebsd.c Fri Apr 10 18:49:43 2015 (r281377) @@ -48,6 +48,12 @@ static int elf32_obj_exec(struct preload struct file_format i386_elf = { elf32_loadfile, elf32_exec }; struct file_format i386_elf_obj = { elf32_obj_loadfile, elf32_obj_exec }; +struct file_format *file_formats[] = { + &i386_elf, + &i386_elf_obj, + NULL +}; + /* * There is an ELF kernel and one or more ELF modules loaded. * We wish to start executing the kernel image, so make such From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 19:04:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC5DEEF1; Fri, 10 Apr 2015 19:04:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A795C74A; Fri, 10 Apr 2015 19:04:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3AJ4etk064154; Fri, 10 Apr 2015 19:04:40 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AJ4eiK064153; Fri, 10 Apr 2015 19:04:40 GMT (envelope-from will@FreeBSD.org) Message-Id: <201504101904.t3AJ4eiK064153@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Fri, 10 Apr 2015 19:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281378 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 19:04:40 -0000 Author: will Date: Fri Apr 10 19:04:39 2015 New Revision: 281378 URL: https://svnweb.freebsd.org/changeset/base/281378 Log: tmpfs_getattr(): Return more correct allocated byte counts. For VREG vnodes, return the resident page count (multiplied by PAGE_SIZE) for the tmpfs node's anonymous VM object that stores actual file contents. For all other vnodes, return the tmpfs_node's tn_size, which should not be rounded to a page. This change allows using stat(2) to identify a sparse file on tmpfs. Reviewed by: kib MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Fri Apr 10 18:49:43 2015 (r281377) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Fri Apr 10 19:04:39 2015 (r281378) @@ -342,7 +342,7 @@ tmpfs_getattr(struct vop_getattr_args *v { struct vnode *vp = v->a_vp; struct vattr *vap = v->a_vap; - + vm_object_t obj; struct tmpfs_node *node; node = VP_TO_TMPFS_NODE(vp); @@ -366,7 +366,11 @@ tmpfs_getattr(struct vop_getattr_args *v vap->va_flags = node->tn_flags; vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? node->tn_rdev : NODEV; - vap->va_bytes = round_page(node->tn_size); + if (vp->v_type == VREG) { + obj = node->tn_reg.tn_aobj; + vap->va_bytes = (u_quad_t)obj->resident_page_count * PAGE_SIZE; + } else + vap->va_bytes = node->tn_size; vap->va_filerev = 0; return 0; From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 19:06:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB89FF5; Fri, 10 Apr 2015 19:06:59 +0000 (UTC) Received: from mail-ie0-x236.google.com (mail-ie0-x236.google.com [IPv6:2607:f8b0:4001:c03::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E0AE762; Fri, 10 Apr 2015 19:06:59 +0000 (UTC) Received: by iebrs15 with SMTP id rs15so24939899ieb.3; Fri, 10 Apr 2015 12:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=oM70QTvJcI0qc0DoShMgysMimFCHreUZWbJcCdDO07A=; b=jA9Z0Tk1o6bptgDYlCIHg0xxCSz5A+wBB2LGnnGHXH+JXRjGnGhljzdmkJAreiWyc8 TO8SbWu7NOiBEEoHDUIQNHueug3c1WHp2LAM9H0sWqj5czrV3NCA0FhJa8y4LRVuxNOK 4Z8QlMV7V9xi6kcXWe2mC5BVqWfsjfzOseSlQBwR6rvJOscUkTy0+MOqKqCkN+BTMLcD 2nbZtuvc98csn/V76fHOuDWEY3VdLyf4Mn5k777XmOjUrbdWTj+EakRbYeRFlWHN7iUA M1Z9Jh575NGAOCse7ykKBFAtBme1xJi01JFzUqQiIqWSNjkOuuFuTW032e8xB0D3106K uS2Q== MIME-Version: 1.0 X-Received: by 10.107.155.13 with SMTP id d13mr4997706ioe.29.1428692818813; Fri, 10 Apr 2015 12:06:58 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Fri, 10 Apr 2015 12:06:58 -0700 (PDT) In-Reply-To: <20150410080613.GJ1394@zxy.spb.ru> References: <201504100655.t3A6tioW010182@svn.freebsd.org> <20150410071251.GI1394@zxy.spb.ru> <20150410073147.GD99375@FreeBSD.org> <20150410080613.GJ1394@zxy.spb.ru> Date: Fri, 10 Apr 2015 12:06:58 -0700 X-Google-Sender-Auth: ikW9N9hKq-VW51dmnnb4uxMlSr4 Message-ID: Subject: Re: svn commit: r281352 - head/sys/netinet From: Adrian Chadd To: Slawa Olhovchenkov Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 19:06:59 -0000 I don't want to get this bikeshed going again, but: this is just hashing on the ip src/ip_id, and only for fragments. For now i think it's okay to leave as jenkins. Let's bikeshed it with more data about how it behaves when doing frag assembly :) -adrian From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 19:07:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05F5C233; Fri, 10 Apr 2015 19:07:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4AF976D; Fri, 10 Apr 2015 19:07:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3AJ7hLs064928; Fri, 10 Apr 2015 19:07:43 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AJ7hZJ064927; Fri, 10 Apr 2015 19:07:43 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504101907.t3AJ7hZJ064927@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 10 Apr 2015 19:07:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281379 - in head/share/doc/usd: . 10.exref 11.vitut 12.vi 13.viref X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 19:07:44 -0000 Author: bapt Date: Fri Apr 10 19:07:43 2015 New Revision: 281379 URL: https://svnweb.freebsd.org/changeset/base/281379 Log: Remove docs that are not shipped with nvi anymore Reported by: emaste Deleted: head/share/doc/usd/10.exref/ head/share/doc/usd/11.vitut/ head/share/doc/usd/12.vi/ head/share/doc/usd/13.viref/ Modified: head/share/doc/usd/Makefile Modified: head/share/doc/usd/Makefile ============================================================================== --- head/share/doc/usd/Makefile Fri Apr 10 19:04:39 2015 (r281378) +++ head/share/doc/usd/Makefile Fri Apr 10 19:07:43 2015 (r281379) @@ -10,10 +10,6 @@ SUBDIR= title \ 05.dc \ 06.bc \ 07.mail \ - 10.exref \ - 11.vitut \ - 12.vi \ - 13.viref \ 18.msdiffs \ 19.memacros \ 20.meref \ From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 19:09:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34C23399; Fri, 10 Apr 2015 19:09:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FCA5787; Fri, 10 Apr 2015 19:09:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3AJ9qjk065420; Fri, 10 Apr 2015 19:09:52 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AJ9phC065419; Fri, 10 Apr 2015 19:09:51 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504101909.t3AJ9phC065419@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 10 Apr 2015 19:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281380 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 19:09:52 -0000 Author: ae Date: Fri Apr 10 19:09:51 2015 New Revision: 281380 URL: https://svnweb.freebsd.org/changeset/base/281380 Log: Fix the IPV6_MULTICAST_IF sockopt handling. RFC 3493 says when the interface index is specified as zero, the system should select the interface to use for outgoing multicast packets. Even the comment for the in6p_set_multicast_if() function says about index of zero. But in fact for zero index the function just returns EADDRNOTAVAIL. I.e. if you first set some interface and then will try reset it with zero ifindex, you will get EADDRNOTAVAIL. Reset im6o_multicast_ifp to NULL when interface index specified as zero. Also return EINVAL in case when ifnet_byindex() returns NULL. This will be the same behaviour as when ifindex is bigger than V_if_index. And return EADDRNOTAVAIL only when interface is not multicast capable. Reported by: Olivier Cochard-Labbé MFC after: 2 weeks Sponsored by: Yandex LLC Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Fri Apr 10 19:07:43 2015 (r281379) +++ head/sys/netinet6/in6_mcast.c Fri Apr 10 19:09:51 2015 (r281380) @@ -2348,11 +2348,15 @@ in6p_set_multicast_if(struct inpcb *inp, return (error); if (V_if_index < ifindex) return (EINVAL); - - ifp = ifnet_byindex(ifindex); - if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) - return (EADDRNOTAVAIL); - + if (ifindex == 0) + ifp = NULL; + else { + ifp = ifnet_byindex(ifindex); + if (ifp == NULL) + return (EINVAL); + if ((ifp->if_flags & IFF_MULTICAST) == 0) + return (EADDRNOTAVAIL); + } imo = in6p_findmoptions(inp); imo->im6o_multicast_ifp = ifp; INP_WUNLOCK(inp); From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 19:26:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54008B31; Fri, 10 Apr 2015 19:26:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E9009A5; Fri, 10 Apr 2015 19:26:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3AJQknY077837; Fri, 10 Apr 2015 19:26:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AJQkfc077836; Fri, 10 Apr 2015 19:26:46 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504101926.t3AJQkfc077836@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Apr 2015 19:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281381 - head/sys/amd64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 19:26:46 -0000 Author: emaste Date: Fri Apr 10 19:26:45 2015 New Revision: 281381 URL: https://svnweb.freebsd.org/changeset/base/281381 Log: Use explicitly sized types in EFI module metadata This will allow the same metadata struct to be used on all platforms. Differential Revision: https://reviews.freebsd.org/D2275 Reviewed by: jhb Modified: head/sys/amd64/include/metadata.h Modified: head/sys/amd64/include/metadata.h ============================================================================== --- head/sys/amd64/include/metadata.h Fri Apr 10 19:09:51 2015 (r281380) +++ head/sys/amd64/include/metadata.h Fri Apr 10 19:26:45 2015 (r281381) @@ -37,17 +37,17 @@ #define MODINFOMD_MODULEP 0x1006 struct efi_map_header { - size_t memory_size; - size_t descriptor_size; + uint64_t memory_size; + uint64_t descriptor_size; uint32_t descriptor_version; }; struct efi_fb { uint64_t fb_addr; uint64_t fb_size; - int fb_height; - int fb_width; - int fb_stride; + uint32_t fb_height; + uint32_t fb_width; + uint32_t fb_stride; uint32_t fb_mask_red; uint32_t fb_mask_green; uint32_t fb_mask_blue; From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 19:30:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E37A4E8C; Fri, 10 Apr 2015 19:30:26 +0000 (UTC) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABADFA7B; Fri, 10 Apr 2015 19:30:26 +0000 (UTC) Received: by paboj16 with SMTP id oj16so30615305pab.0; Fri, 10 Apr 2015 12:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=D8CkSFg32febALcr9XelC6/XiGwbu2DycKYyhrvZ2eE=; b=eXNruq7FWwJyEt3RunI4+N11XvkQQvmX+dp5Yrd1C/PGEHoub7ZECcjpFUlerC7Jff Zw9kg94PBnjnDQD1/OgXm60xtZRl+3TDhhsIZT5qkyW+NO60mhhJC1r32IwQY7olO413 eYTeZRv2WWwexaQ6RBdOPRC0FHJMfD2RaPYqcTuZ/zRRiOIsCCPuttM+XSI6G4btS1fQ mi1PhPi2a8yzkKIifKqAIHlBO4KJL57kMdnZcM1pdWOnYE4w2gFi7hG0MBFPNw+TFru9 jziKo4wWQ7hIPldkarAMS1A8+Bgs5PMaa3wtL06isEokYyZBeYCqTLhVmKDlK3Igju2G idCw== X-Received: by 10.68.137.70 with SMTP id qg6mr5278863pbb.125.1428694225747; Fri, 10 Apr 2015 12:30:25 -0700 (PDT) Received: from [10.244.131.207] (mobile-166-171-250-229.mycingular.net. [166.171.250.229]) by mx.google.com with ESMTPSA id ey10sm3062255pab.47.2015.04.10.12.30.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Apr 2015 12:30:25 -0700 (PDT) References: <201504101907.t3AJ7hZJ064927@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201504101907.t3AJ7hZJ064927@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <122D4C56-AF8A-4BF8-814D-1625B3B747FE@gmail.com> X-Mailer: iPhone Mail (12D508) From: Garrett Cooper Subject: Re: svn commit: r281379 - in head/share/doc/usd: . 10.exref 11.vitut 12.vi 13.viref Date: Fri, 10 Apr 2015 12:30:19 -0700 To: Baptiste Daroussin Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 19:30:27 -0000 > On Apr 10, 2015, at 12:07, Baptiste Daroussin wrote: > > Author: bapt > Date: Fri Apr 10 19:07:43 2015 > New Revision: 281379 > URL: https://svnweb.freebsd.org/changeset/base/281379 > > Log: > Remove docs that are not shipped with nvi anymore > > Reported by: emaste > > Deleted: > head/share/doc/usd/10.exref/ > head/share/doc/usd/11.vitut/ > head/share/doc/usd/12.vi/ > head/share/doc/usd/13.viref/ > Modified: > head/share/doc/usd/Makefile They should probably be added to ObsoleteFiles.inc too.. From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 19:35:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FA3C1FE; Fri, 10 Apr 2015 19:35:43 +0000 (UTC) Received: from mail-vn0-x22b.google.com (mail-vn0-x22b.google.com [IPv6:2607:f8b0:400c:c0f::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A973ABC; Fri, 10 Apr 2015 19:35:43 +0000 (UTC) Received: by vnbf62 with SMTP id f62so8000824vnb.3; Fri, 10 Apr 2015 12:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=rz+QHy9UQYKazgL6NYxw575oJWPcHSnB1Fc9u5LFKhg=; b=KZwmZBHNHiqOlNgZIjgHFkuXXTEGmXIgnNOp1jU7yrsNDIbL/ZfVSqBcbK54DNK7Bz WGGkhyT3+j0rKl9Rbq1tCz8tkieUHx+A2TwJxeGO137TMcQj532KqZcKkrBmbACs0MuR uMvCEeB6RO24Nw/RhsIlREounpOxyvJWlf/k60Hd9c69+aJY/T8fr4EUwsGac2KGoK5i oFfcNSFU1wryfMQ4fKpUjbQO0OoGcubU9Z8P3hKRUMUswKB0Fp2tilcfOhNcdo5Gxtzr UG8+88Uchnvnbwk5PqVanQWaikXgIZx4W73q+9GBnf9QxxklnSBT0Jhbw2psGQPDs5B4 z27Q== X-Received: by 10.52.254.2 with SMTP id ae2mr3096073vdd.33.1428694542246; Fri, 10 Apr 2015 12:35:42 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id ug16sm505599vdb.14.2015.04.10.12.35.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Apr 2015 12:35:41 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 10 Apr 2015 21:35:36 +0200 From: Baptiste Daroussin To: Garrett Cooper Subject: Re: svn commit: r281379 - in head/share/doc/usd: . 10.exref 11.vitut 12.vi 13.viref Message-ID: <20150410193536.GB65320@ivaldir.etoilebsd.net> References: <201504101907.t3AJ7hZJ064927@svn.freebsd.org> <122D4C56-AF8A-4BF8-814D-1625B3B747FE@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nVMJ2NtxeReIH9PS" Content-Disposition: inline In-Reply-To: <122D4C56-AF8A-4BF8-814D-1625B3B747FE@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 19:35:43 -0000 --nVMJ2NtxeReIH9PS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 10, 2015 at 12:30:19PM -0700, Garrett Cooper wrote: >=20 > > On Apr 10, 2015, at 12:07, Baptiste Daroussin wrote: > >=20 > > Author: bapt > > Date: Fri Apr 10 19:07:43 2015 > > New Revision: 281379 > > URL: https://svnweb.freebsd.org/changeset/base/281379 > >=20 > > Log: > > Remove docs that are not shipped with nvi anymore > >=20 > > Reported by: emaste > >=20 > > Deleted: > > head/share/doc/usd/10.exref/ > > head/share/doc/usd/11.vitut/ > > head/share/doc/usd/12.vi/ > > head/share/doc/usd/13.viref/ > > Modified: > > head/share/doc/usd/Makefile >=20 > They should probably be added to ObsoleteFiles.inc too.. Yes working on that and more, just fixed the build for now Bapt --nVMJ2NtxeReIH9PS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlUoJggACgkQ8kTtMUmk6ExV0wCfbfpAUZ08ka/H08bJdzax8SRz MJoAn2jpGVD55e8dgdeYZlNJj1ATGifG =fssA -----END PGP SIGNATURE----- --nVMJ2NtxeReIH9PS-- From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 20:18:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BABDABE; Fri, 10 Apr 2015 20:18:56 +0000 (UTC) Received: from mail-vn0-x234.google.com (mail-vn0-x234.google.com [IPv6:2607:f8b0:400c:c0f::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB99BEFE; Fri, 10 Apr 2015 20:18:55 +0000 (UTC) Received: by vnbf1 with SMTP id f1so8252981vnb.5; Fri, 10 Apr 2015 13:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=DBIfkpebtK1YE4o8spetXWNlQHwqbGqtaJi7xIWg8do=; b=z31Nl0AT7D2J5UOeqEj/JFC3ik7z/mlDUYXcQbXx7lgv+i1XZjjQojMwmRrhKCIsvp V/rQgXqzitfS+naF4x2GX169i3n7PA2gDy0d8F/azMR4ctNezR6eLG1RVUc2u13fjNaO P1VevHK24drlFX/9EXiRlxzyUfk7LPefwslG3QkepL4vbzxr9KPNUvOQcQjVXnziVj22 3YofYU+th426LRyO6NNABaSc+CEt3DJeumfGXtBA8u3w/iMmQvAnZOyEjb1s9as1KYUK +p3qpa7NIgnRf1kRI4c0UzE5nexGO0x4e+N1N6AEvNQG7SdP2oQVgzoeaZtoqOfUrY7L zH9Q== X-Received: by 10.52.26.17 with SMTP id h17mr3292077vdg.27.1428697134875; Fri, 10 Apr 2015 13:18:54 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id su7sm526164vdc.21.2015.04.10.13.18.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Apr 2015 13:18:53 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 10 Apr 2015 22:18:49 +0200 From: Baptiste Daroussin To: Dmitry Morozovsky Subject: Re: svn commit: r281373 - in head: contrib/nvi contrib/nvi/catalog contrib/nvi/cl contrib/nvi/common contrib/nvi/docs contrib/nvi/docs/USD.doc contrib/nvi/docs/internals contrib/nvi/docs/interp contrib... Message-ID: <20150410201845.GC65320@ivaldir.etoilebsd.net> References: <201504101750.t3AHoSo3023955@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="f0KYrhQ4vYSV2aJu" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 20:18:56 -0000 --f0KYrhQ4vYSV2aJu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 11, 2015 at 09:19:39PM +0300, Dmitry Morozovsky wrote: > Bapt, >=20 > On Fri, 10 Apr 2015, Baptiste Daroussin wrote: >=20 > > Author: bapt > > Date: Fri Apr 10 17:50:28 2015 > > New Revision: 281373 > > URL: https://svnweb.freebsd.org/changeset/base/281373 > >=20 > > Log: > > Update nvi to 2.1.3 which fixes the data corruption when locale conve= rsion > > failed >=20 > Thank you very much for this import. >=20 > Any MFC Planned please? Not before I find how to readd the lost documentations Bapt --f0KYrhQ4vYSV2aJu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlUoMCUACgkQ8kTtMUmk6Ez8cACgiS+gxxcNganlH/tXmGP93RGD ICQAoIK9xva5QVY3f5nkpitPc4JkeeGk =7G9v -----END PGP SIGNATURE----- --f0KYrhQ4vYSV2aJu-- From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 20:40:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F146231A; Fri, 10 Apr 2015 20:40:09 +0000 (UTC) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BB45170; Fri, 10 Apr 2015 20:40:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id t3AKdjh6006008; Fri, 10 Apr 2015 23:39:45 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Fri, 10 Apr 2015 23:39:45 +0300 (MSK) From: Dmitry Morozovsky To: Baptiste Daroussin Subject: Re: svn commit: r281373 - in head: contrib/nvi contrib/nvi/catalog contrib/nvi/cl contrib/nvi/common contrib/nvi/docs contrib/nvi/docs/USD.doc contrib/nvi/docs/internals contrib/nvi/docs/interp contrib... In-Reply-To: <20150410201845.GC65320@ivaldir.etoilebsd.net> Message-ID: References: <201504101750.t3AHoSo3023955@svn.freebsd.org> <20150410201845.GC65320@ivaldir.etoilebsd.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Fri, 10 Apr 2015 23:39:45 +0300 (MSK) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 20:40:10 -0000 On Fri, 10 Apr 2015, Baptiste Daroussin wrote: > > > Update nvi to 2.1.3 which fixes the data corruption when locale conversion > > > failed > > > > Thank you very much for this import. > > > > Any MFC Planned please? > > Not before I find how to readd the lost documentations Fair enough; thanks again for your attention! -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 20:55:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C584178A; Fri, 10 Apr 2015 20:55:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0B6839E; Fri, 10 Apr 2015 20:55:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3AKtIqo029884; Fri, 10 Apr 2015 20:55:18 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AKtIZ7029875; Fri, 10 Apr 2015 20:55:18 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504102055.t3AKtIZ7029875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 10 Apr 2015 20:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281383 - in head/sys: dev/iwn net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 20:55:18 -0000 Author: eadler Date: Fri Apr 10 20:55:17 2015 New Revision: 281383 URL: https://svnweb.freebsd.org/changeset/base/281383 Log: iwn, wlan: fix typos Fxi tow typos Obtained from: DragonFlyBSD MFC after: 3 days Modified: head/sys/dev/iwn/if_iwn.c head/sys/net80211/ieee80211_mesh.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Fri Apr 10 20:38:31 2015 (r281382) +++ head/sys/dev/iwn/if_iwn.c Fri Apr 10 20:55:17 2015 (r281383) @@ -8060,7 +8060,7 @@ iwn_read_firmware_tlv(struct iwn_softc * case IWN_FW_TLV_WOWLAN_INST: case IWN_FW_TLV_WOWLAN_DATA: DPRINTF(sc, IWN_DEBUG_RESET, - "TLV type %d reconized but not handled\n", + "TLV type %d recognized but not handled\n", le16toh(tlv->type)); break; default: Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Fri Apr 10 20:38:31 2015 (r281382) +++ head/sys/net80211/ieee80211_mesh.c Fri Apr 10 20:55:17 2015 (r281383) @@ -126,7 +126,7 @@ static int ieee80211_mesh_backofftimeout SYSCTL_PROC(_net_wlan_mesh, OID_AUTO, backofftimeout, CTLTYPE_INT | CTLFLAG_RW, &ieee80211_mesh_backofftimeout, 0, ieee80211_sysctl_msecs_ticks, "I", "Backoff timeout (msec). This is to throutles peering forever when " - "not receving answer or is rejected by a neighbor"); + "not receiving answer or is rejected by a neighbor"); static int ieee80211_mesh_maxretries = 2; SYSCTL_INT(_net_wlan_mesh, OID_AUTO, maxretries, CTLFLAG_RW, &ieee80211_mesh_maxretries, 0, From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 21:20:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0A941D0; Fri, 10 Apr 2015 21:20:30 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D3E996F; Fri, 10 Apr 2015 21:20:30 +0000 (UTC) Received: from st11p02mm-spool002.mac.com ([17.172.220.247]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTP id <0NMM002YH0M2ZZ40@st11p02mm-asmtp002.mac.com>; Fri, 10 Apr 2015 21:20:28 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-04-10_06:2015-04-10,2015-04-10,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1504100163 MIME-version: 1.0 Received: from localhost ([17.172.220.163]) by st11p02mm-spool002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTP id <0NMM006YW0M2HZ70@st11p02mm-spool002.mac.com>; Fri, 10 Apr 2015 21:20:26 +0000 (GMT) To: Xin LI From: Rui Paulo Subject: Re: svn commit: r281372 - head/lib/liblzma Date: Fri, 10 Apr 2015 21:20:26 +0000 (GMT) X-Mailer: iCloud MailClient15B.9bb3ce9 MailServer15B.18633 X-Originating-IP: [12.218.212.178] Message-id: <0ee85255-a598-4463-aad8-55266bc00a53@me.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 21:20:30 -0000 On Apr 10, 2015, at 10:22 AM, Xin LI wrote:=0A=0AAut= hor: delphij=0ADate: Fri Apr 10 17:21:47 2015=0ANew Revision: 281372=0AURL= : https://svnweb.freebsd.org/changeset/base/281372=0A=0ALog:=0AFor reasons= that I am not understand yet, using the libmd version of=0ASHA256 would m= ake libarchive based application to give:=0A=0A=C2=A0 =C2=A0 =C2=A0 =C2=A0= archive_read_extract(): Lzma library error: Corrupted input data=0A=0A(Int= ernally this is LZMA_DATA_ERR)=0A=0AHowever, the libmd version of SHA256 i= s supposed to give same result=0Aas the bundled version do, and xz(1) is n= ot affected.=0A=C2=A0=0ACan you test libarchive from github?= From owner-svn-src-head@FreeBSD.ORG Fri Apr 10 21:24:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76A0D3A9; Fri, 10 Apr 2015 21:24:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48F169A7; Fri, 10 Apr 2015 21:24:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3ALOeTC046987; Fri, 10 Apr 2015 21:24:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ALOdMd046982; Fri, 10 Apr 2015 21:24:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504102124.t3ALOdMd046982@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 10 Apr 2015 21:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281384 - in head: share/mk usr.sbin/fifolog/fifolog_reader usr.sbin/fifolog/fifolog_writer X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 21:24:40 -0000 Author: emaste Date: Fri Apr 10 21:24:38 2015 New Revision: 281384 URL: https://svnweb.freebsd.org/changeset/base/281384 Log: Fix libfifolog dependency on libz Consumers should not need to encode fifolog's dependency on libz. Handle it automatically in src.libnames.mk. Differential Revision: https://reviews.freebsd.org/D2278 Reviewed by: bapt Sponsored by: The FreeBSD Foundation Modified: head/share/mk/src.libnames.mk head/usr.sbin/fifolog/fifolog_reader/Makefile head/usr.sbin/fifolog/fifolog_writer/Makefile Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Fri Apr 10 20:55:17 2015 (r281383) +++ head/share/mk/src.libnames.mk Fri Apr 10 21:24:38 2015 (r281384) @@ -259,6 +259,9 @@ LDADD_sqlite3+= ${LDADD_pthread} DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} +DPADD_fifolog+= ${DPADD_z} +LDADD_fifolog+= ${LDADD_z} + DPADD_ipf+= ${DPADD_kvm} LDADD_ipf+= ${LDADD_kvm} Modified: head/usr.sbin/fifolog/fifolog_reader/Makefile ============================================================================== --- head/usr.sbin/fifolog/fifolog_reader/Makefile Fri Apr 10 20:55:17 2015 (r281383) +++ head/usr.sbin/fifolog/fifolog_reader/Makefile Fri Apr 10 21:24:38 2015 (r281384) @@ -6,7 +6,7 @@ CFLAGS+= -I${.CURDIR}/../lib MAN= -LIBADD= z fifolog +LIBADD= fifolog regress: ./${PROG} /tmp/fifolog.0 Modified: head/usr.sbin/fifolog/fifolog_writer/Makefile ============================================================================== --- head/usr.sbin/fifolog/fifolog_writer/Makefile Fri Apr 10 20:55:17 2015 (r281383) +++ head/usr.sbin/fifolog/fifolog_writer/Makefile Fri Apr 10 21:24:38 2015 (r281384) @@ -6,7 +6,7 @@ CFLAGS+= -I${.CURDIR}/../lib MAN= -LIBADD= z fifolog +LIBADD= fifolog regress: date | ./${PROG} -z 0 /tmp/fifolog.0 From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 00:45:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45487E41; Sat, 11 Apr 2015 00:45:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F06BEB1; Sat, 11 Apr 2015 00:45:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B0j4j5053942; Sat, 11 Apr 2015 00:45:04 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B0j4G7053938; Sat, 11 Apr 2015 00:45:04 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504110045.t3B0j4G7053938@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 11 Apr 2015 00:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281387 - head/sys/dev/hptnr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 00:45:05 -0000 Author: delphij Date: Sat Apr 11 00:45:03 2015 New Revision: 281387 URL: https://svnweb.freebsd.org/changeset/base/281387 Log: Merge changes from vendor driver version 1.1.1: v1.1.1 2015-03-26 * Support 4Kn drive. * Change the SCSI target ID of the disk to be the index of physical connetion to the HBA. * Support staggered drive spin up. * Fix a bug that command would be timeout because of improper interrupt service routine. * Error handling to avoid scsi command lost which caused system hang up. * Fix a bug that fail to get the devcie's serial number via FreeNAS WebGUI. Many thanks to HighPoint for continued support of FreeBSD! MFC after: 2 weeks Modified: head/sys/dev/hptnr/README head/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu head/sys/dev/hptnr/him.h head/sys/dev/hptnr/hptintf.h head/sys/dev/hptnr/hptnr_config.c head/sys/dev/hptnr/hptnr_config.h head/sys/dev/hptnr/hptnr_osm_bsd.c head/sys/dev/hptnr/i386-elf.hptnr_lib.o.uu head/sys/dev/hptnr/ldm.h head/sys/dev/hptnr/os_bsd.h Modified: head/sys/dev/hptnr/README ============================================================================== --- head/sys/dev/hptnr/README Fri Apr 10 23:43:01 2015 (r281386) +++ head/sys/dev/hptnr/README Sat Apr 11 00:45:03 2015 (r281387) @@ -1,8 +1,16 @@ Rocket Controller Driver for FreeBSD -Copyright (C) 2014 HighPoint Technologies, Inc. All rights reserved. +Copyright (C) 2015 HighPoint Technologies, Inc. All rights reserved. ############################################################################# Revision History: + v1.1.1 2015-03-26 + * Support 4Kn drive. + * Change the SCSI target ID of the disk to be the index of physical connetion to the HBA. + * Support staggered drive spin up. + * Fix a bug that command would be timeout because of improper interrupt service routine. + * Error handling to avoid scsi command lost which caused system hang up. + * Fix a bug that fail to get the devcie's serial number via FreeNAS WebGUI. + v1.0.1 2014-8-19 * Do not retry the command and reset the disk when failed to enable or disable spin up feature. @@ -13,7 +21,7 @@ Revision History: * Support smartmontool for R750. v1.0 2013-7-3 - *First source code release + First source code release ############################################################################# @@ -49,7 +57,7 @@ Revision History: 2) Extract the driver files under the kernel source tree: # cd /usr/src/sys/ - # tar xvzf /your/path/to/hptnr_freebsd_src_v1.0.1_14_08_19.tgz + # tar xvzf /your/path/to/hptnr-freebsd-src-v1.0-130701.tgz 3) Update the kernel configuration file to include the HighPoint source. Assume the configure file is GENERIC, and new kernel configure file is Modified: head/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu ============================================================================== --- head/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu Fri Apr 10 23:43:01 2015 (r281386) +++ head/sys/dev/hptnr/amd64-elf.hptnr_lib.o.uu Sat Apr 11 00:45:03 2015 (r281387) @@ -1,6297 +1,4969 @@ begin 644 hptnr_lib.o -M?T5,1@(!`0D```````````$`/@`!`````````````````````````+`#!@`` -M`````````$```````$``$``-`(G0Q@<(QD0/A!$"``!,B>_H`````$B)1"002(7`=15, -MB>9,B>_H`````+@`````Z>H!``!!QD0D.!I!QD0D.0A!QD0D.@A!QD0D.P!! -MQD0D//]!QD0D/0!!QD0D):M!#[=&.&9!B40D($V);"0H0<=$)#3_````0<>$ -M))0````(````2(M$)!!(BT`028E$)$A(!?\```!)B40D4$'&1"0P)$B+1"00 -M28E$)'A)QX0DH`````````!!QD0D)(!)C5PD6+X`````2(G?Z`````!(BT0D -M$$B+_H`````(3;=`Y!#[9$)"0\@'3=A,!T,4B-="003(GO -MZ`````!!#[=T)#))BWY0Z`````!,B>9,B>_H`````+@`````Z<<```!)QT0D -M>`````!,B>9,B>_H`````$B+1"002(M8$$$/MMP3H`````$&) -MQ,8#`,9#`0#&0P(`QD,#`$B)[DR)[^@`````2(U5.+@`````9F:0Q@00`$B# -MP`%(@_@0=?)!C40D!,9%.!7&13D1B$4\QD4]`$B-75A$#[;@1(EE-,>%E``` -M``````!(BU0D$$B+0A!(B45(2(E5>+X`````2(G?Z`````!(BT0D$$B+)(B=_H`````+@!````2(/$&%M=05Q!74%>05_#D)")\&:)=PC&1PX`9L=' -M#```9H7V=!^-4/^Y`````&9FD$B+!V:)%`A(@\$"@^H!9H/Z_W7L\\-F9F:0 -M9F:09F:008GP9HEW",9'#@%FQT<,``!FA?9T'KH`````N0````!(BP=FB10( -M@\(!2(/!`F9$.<)U[//#9F9FD&9FD&9FD(!_#@%U*@^W1PP/M\A(BQ`>`+_=1!F1(D`B$@"#[?&PV9FD&:0#[;1 -M00^W\.@`````#[?`PTB)^;@`````.%$"=1-F.3%U#L9!`O]FQP'__^L09F:0 -M@\`!2(/!!&8]@`!UVP^WP,-F9F:09F9FD&9F9I!F9I"X`````(G!.%2'`G4& -M9CDTAW0/@\$!2(/``4@]@````'7C9H'Y@`"X@`$```]$R`^WP<-F9F:09F:0 -M9F:09F:0#[9'.#P(=#X\*'0Z/*@/A/\````\B`^$.0$``#P*9I!T)#PJ="`\ -MJ@^$Y0```#R*#X0?`0``/"]T##R/9F9FD`^%E`$``#PO#X22````/"]W(CP* -M=%\\"G<*/`AF9F:0=43K43PH='@\*F9FD&9FD'4TZVP\CP^$V0```#R/9I!W -M%3R(#X3+````/(IF9F:0=13IO@```#RH9F9FD&9FD'1Q/*IT;;D`````N``` -M``#I$P$```^V1SK!X`@/ME<["=`/ME(0"=")P0^V1SSI[P```&9F -M9I!F9I`/ME(8#[9'.\'@$`G"#[9'/0G"#[9'/,'@"(G1"<$/MD<_P>`( -M#[970`G0Z;4````/ME(8#[9'.\'@$`G"#[9'/0G"#[9'/,'@"(G1"<$/ -MME<^P>(8#[9'/\'@$`G"#[9'00G"#[9'0,'@"`G0ZW,/ME`P2`G"#[9'04@)P@^V1SQ(P>`H2`G"#[9'/4C!X"!("<(/MD<^2,'@&$@) -MP@^V1S](P>`02`G"#[9'0$C!X`A(B=%("<$/ME="P>(8#[9'0\'@$`G"#[9' -M10G"#[9'1,'@"`G02(F/B````(F'D````&:#3R(!\\-F9F:0NO____]FA?9T -M,4B)^;\`````NO____])Q\``````9I`/M@$QT`^VP,'J"$$S%("#QP%(@\$! -M9CGW=>6)T,-FD$B#[&A$#[9/.T0/MD)^ -M__[_B9$$`0``)7[_\O](BU<(B0)(BU<(B4(,2(M7"(E"$$B+5PB)0A1(BU<( -MB4(82(M7"(E"!$B+!XN`5`$``(D%`````"7^`/__2(L7B8)4`0``PV9F9I!F -M9I!F9I!F9I")\4B+!XN0!`$``(D5``````^W1SQF/8!D=`QF/8"1=`9F/8"4 -M=1$/MLF#P0BX`0```-/@"<+K$$`/MLZ#P0RX`0```-/@"<)(BP>)D`0!``## -M9F9FD&9F9I!F9I!F9I")\4B+!XN0!`$``(D5``````^W1SQF/8!D=`QF/8"1 -M=`9F/8"4=1$/MLF#P0BX_O___]/`(<+K$$`/MLZ#P0RX_O___]/`(<)(BP>) -MD`0!``##9F9FD&9F9I!F9I!F9I")\4"`_O]T;T"`_A]W,HNW&`$``+H!```` -MT^*)T/?0(?")AQ@!``"+AU@!``")!0`````AT'1`B8=8`0``PV:0B[<<`0`` -M#[;!@^@@N@$```")P=/BB=#WT"'PB8<<`0``BX=@`0``B04`````(=!T!HF' -M8`$``//#9F9FD&9FD$B#["A(B5PD"$B);"003(ED)!A,B6PD($B)U8GP3(LO -M0(#^`P^&B0```$B-',4`````@>/X!P``38VD'0`"``!!QP0D#`$``+\0)P`` -MZ`````!)C9P=!`(```^V50/!XA@/MD4"P>`0"<(/MD4`"<(/MD4!P>`("<*) -M$T''!"00`0``OQ`G``#H``````^V50?!XA@/MD4&P>`0"<(/MD4$"<(/MD4% -MP>`("<*)$^F$````2(TZ`````"_$"<``.@`````B=Y,B>?H`````$B+7"0(3(MD -M)!!(@\08PY!!5T%6055!5%532(/L6$F)_XA4)%=(BQ>`?SX`#X0\`@``0;P` -M````0;W@____0;[P____0`^VQDB)1"1(2(V"@`$``$B)1"1`2(V*A`$``$B) -M3"0X2(V"H`$``$B)1"0P2(V*I`$``$B)3"0H2(V"4`(``$B)1"0@2(V*5`(` -M`$B)3"082(V"X`$``$B)1"002('"T`$``$B)5"0(9F:02(M$)$A$B>%(T_BH -M`0^$C0$``$2)Y8/]`W871(GJ2`-4)"B+`HD%`````(/@_HD"ZQN-%.T````` -MB=)(`U0D.(L"B04`````@^#^B0*_$"<``.@`````@'PD5P!TOC@_X#=CB-'/7@____B=M( -MC80K4`(``,<``````+\0)P``Z`````!(C9PK5`(``(L#B04`````@\@!B0/K -M-HT<]0````")VTB-A"M0`@``QP``````OQ`G``#H`````$B-G"M4`@``BP.) -M!0````"#R`&)`TB#Q`A;7<.0D)"0D)!(B?E(BS\/MX&P$@``@\`!9HF!L!(` -M`&8[@;02``!R"6;'@;`2``````^W@;`2``!(P>`"2`.!:!$``(L6B1`/MX&P -M$@``B8@0B`>)T,'H"(A'`8A7`L-%#[8$,KD'````ZZ)F9F:09F9F -MD&9F9I!F9I!(BX<($0``BQ"+4`2+4`B+0`R)!0````##9F9FD&9FD$B#[`A( -MBX:(````1`^V1T-%A,!T(@^V4`VY`````/;"`70,ZQ)(B=!(T_BH`74(@\$! -M1#C!=>[&1D(,Z`````!(@\0(PV9F9I!F9F:09F:02(/L"$B)^$B+/V;'0$X! -M`,9`0AU(B<;H`````$B#Q`C#9F9FD&9F9I!F9F:09F:02(/L"$B+/P^W]DC! -MY@-(`[>P"0``2(LV2(7V=#U(BQ@%#[?`C02%``,``(F"<`$``$B+$P^W3C*#X1^X`0```$C3X(F"=`$``,9& -M)"&Z`````$B)W^@`````08/%`4F#Q`@/MT-H1#GH#X]X____2(M%0$C'0&`` -M````]D5,!'492(G?Z`````!(BW5`N@$```!(B=_H`````$B+54`/MH+,```` -MC02`#[92`@'02)@/MH@`````#[93.@^VY(B=_H`````$TY?F`/A9#^__])QT9``````$B+`XN(6`$` -M`(D-`````(7)=`E(BP.)B%@!``!(@\0(6UU!7$%=05Y!7\-F9F:09F9FD$B# -M[`A,BP=!#[9P0T"$]G0U28V`N!(``+D`````2#GX=1KK(@^VP4B-%$!(C120 -M28V4T+@2``!(.?IT#X/!`4`X\77@ZP6Y``````^VP4B-%$!(C1202(T$U0`` -M``!)B[0`R!(``$B%]G1]]D8*`G1W28V$`+@2``!(.48@=6D/MD98A,!T"(/` -M`8A&6.M92(M62$B#ZCA(C4Y(2(U".$@YR'1$2(-Z$`!U+.L*9F:02(-Z$`!U -M(,9&6`$/MHJ[````28NXL!```$G'P`````#H`````.L12(M2.$B#ZCA(C4(X -M2#G(=`%2(M$"%`/MD`(ZTYF@?F!`'<<#[;`2(N7B`D``$AI -MP,@/``!(BT00"`^V0`CK*P^VP$B+EV`)``!(C03`2,'@!4B+A!"(````#[9` -M".L+9F:09F:0N/\```!(F$0/MJ0#Y@@``$B+=7A(A?9T"$B)W^@`````2(GN -M2(G?Z`````!!#[;$2(T\@$B-/+A(C;S[P`$``$R)[D'_E:````!(BUPD"$B+ -M;"003(MD)!A,BVPD($B#Q"C#9F9FD&9FD&9FD&9FD$%455-(B?5(B=-F@7XX -MX0%U$0^V1CJ#Z!%!O``````\`78T2(LW2(N^.`D```^W12"Z8)X!`&8]A0!W -M%P^WP`^VA`9@"```2(T40$B-%)!(P>(%3(TD%\9#!`6`8P7^@"/?N`````!F -M@7TXX0%U$0^V13J#Z`$\`0^6P`^VP&:0P>`'#[83@^)_"<*($P^VA98```"# -MX`'!X`:#XK\)PH@3]H66`````70.3(GGZ`````!FB4,(ZP1FB4L(#[=#"(A% -M)6:!?3CA`74E#[95.HU"_SP!=PH/ME4[@^(/ZRJ0C4+ON@\````\`78=9F9F -MD+H`````28-\)&``=`Q!#[:4)($```"#X@\/M@.#X/`)T(@#6UU!7,-F9F:0 -M9F9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H3(E\)#!)B?Q(B?-) -MB=8````/ -MMTL@9H'YA0`/A_($```/M\%!#[:\!&`(``")^$"`__]T;F:#^7]W(T`/MM=) -MBXPD.`D``$B-!%)(C02"2,'@!4B+1`A0#[9`".M%9H'Y@0!W'D`/ML=)BY0D -MB`D``$AIP,@/``!(BT00"`^V0`CK($`/ML=)BY0D8`D``$B-!,!(P>`%2(N$ -M$(@````/MD`(#[;`00^VA`3F"```2(T4@$B-%)!)C;34P`$``$F+E"2("0`` -M0`^VQTAIP,@/``!!O0````#V1`)=$`^%8`(``,9#)`1!QP<`````N`$```#I -M2P0```^W4R"Y_P```+C_____9H'ZA0`/AXL````/M\)!#[:T!&`(``")\$"` -M_O]T0`^VQDF+E"2("0``2&G`R`\``$B+1!`(#[9`".L@0`^V -MQDF+E"1@"0``2(T$P$C!X`5(BX00B`````^V0`A`#[;.1`^V\$ECQD$/MJP$ -MY@@``$B-1*T`2(U$A0!)C;3$P`$```^WP4B-%$!(C1202,'B!4F)U4T#K"0X -M"0``9H'_X0%U"P^V0SJ#Z`$\`78I9H'Y_P!T!T'V14L$=1O&0R0&0<<'```` -M`+@!````Z38#``!F9I!F9I!!#[952(G1@^$!="3VP@1T'T$/MD0D1$$Z1"1. -MT/A/<```"%R0^$[P```/;"!`^$Y@`` -M`$B)WDR)[^@`````A,!U%<9#)`1!QP<`````N`$```#IP@(``$&`O8,````? -M=A%!QP_H`````&:#^!\/AF -M0<<'`0```+@!````Z<@!``!!@?CA`1``#X0,`0``00^W16J`>SCA#X7]```` -M@'LY`0^%\P```$C1Z$B)PH/B`0^V0SJ#Z`8\"0^'Q@````^VP/\DQ0````!! -MN`$```"Y`0```$B)VDR)[DR)Y^@`````A,`/A;````!!QP<"````N`$```#I -M3@$``$&X`0```+D`````2(G:3(GN3(GGZ`````"$P`^%?@```$''!P(```"X -M`0```.D<`0``#[;*0;@!````2(G:3(GN3(GGZ`````"$P'520<<'`@```+@! -M````Z?`````/MLI!N`````!(B=I,B>Y,B>?H`````(3`=29!QP<"````N`$` -M``#IQ````,9#)`1!QP<`````N`$```#IKP```$F-O"2@#P``Z`````"$P'01 -M0<<'`0```+@!````Z8T```"`>SCA=4Z`>SD!9F:0=46`>SH/=3^`>ST!9F9F -MD'4U#[9S/,'F"`^V0SL!Q@^W]DR)Y^@`````2#M#:'4%2(7`=1+&0R0$0<<' -M`````+@!````ZSFX`````.LR9I!!#[:$).4)``!(C12`2(T4D$F-M-3``0`` -M28N4)(@)``"X.+@/`.F4^___9F:09I!(BUPD"$B+;"003(MD)!A,BVPD($R+ -M="0H3(M\)#!(@\0XPV9F9I!F9I!F9I!F9I!(@^P(2(L_Z`````!(@\0(PV9F -M9I!F9F:09F9FD&9FD$%7059!54%455-(@^Q828G]2(GU2(N?.!$``&;'1C+_ -M#TB-5"0LZ`````"$P'0)BT0D+.D."P``BT4X)?___P`]X0$0``^%Y0```+^( -M$P``Z``````/MTT@9H'YA0`/A[D*```/M\%!#[:T!6`(``")\$"`_O]T:V:# -M^7]W(D`/MM9)BXTX"0``2(T$4DB-!()(P>`%2(M$"%`/MD`(ZT-F@?F!`'<= -M0`^VQDF+E8@)``!(:<#(#P``2(M$$`@/MD`(ZQ]`#[;&28N58`D``$B-!,!( -MP>`%2(N$$(@````/MD`(#[;`00^VA`7F"```2(T4@$B-%)!-C;35P`$``$F+ -ME8@)``!`#[;&2&G`R`\``$@!PDB)5"002,=$)`@`````2,=$)!@`````Z7(! -M```/MU4@OO\```!F@?J%`'<,#[?"00^VM`5@"```#[=].&:!_^$!=0\/MD4Z -M@^@1/`$/AL8```!F@?J%`'=Z#[?"00^VA`5@"```//]T:F:#^G]W(0^VT$F+ -MC3@)``!(C0122(T$@DC!X`5(BT0(4`^V0`CK2&:!^H$`=QP/ML!)BY6("0`` -M2&G`R`\``$B+1!`(#[9`".LE#[;`28N58`D``$B-!,!(P>`%2(N$$(@````/ -MMD`(ZP6X_____P^VP$$/MH0%Y@@``$B-%(!(C12038VTU<`!```/M\9(C11` -M2(T4D$C!X@5)`Y4X"0``2(E4)`AF@?_A`75&ZS(/M\9(C03`2,'@!4D#A6`) -M``!(B40D&$R+L(@```!(QT0D"`````!(QT0D$`````#K1`^V53J-0N\\`78G -MC4+_/`%V(&:!_O\`=`M(BT0D"/9`2P1U#L9%)`:X`````.FV"```2,=$)!`` -M````2,=$)!@`````2(UT)$A,B>_H`````$&)QV:)13),B>_H`````$F)Q+@" -M````387D#X1W"```3(FE@````$$/M]=(B10D2&G"L`0``$B-'!A(C4,@22N% -M.!$``$D#A4`1``!(BU0D2(E"($C!Z"!(BU0D2(E")$F+1"082(M4)$B)0BA( -MP>@@2(M4)$B)0BQ(BT0D2&9$B7@(N`````#&!!@`2(/``4@]L`0``'7P9H%] -M..$!=50/MD4Z@^@1/`%W24B-3"0P2(M$)$@/ME`(2(GN2(M\)`CH`````$B- -M@R`$``!)*X4X$0``20.%0!$``$B+5"1(B4(02,'H($B+5"1(B4(4Z14!``!! -M#[96"O;"`74LBT4X)?___P`]X0$0``^$G````$B+3"0(#[9!2*@!#X2+```` -MJ`0/A(,```#VA98````@=`](C70D,$B)[^@`````ZQM(C4PD,$B+1"1(#[90 -M"$B)[DB+?"0(Z`````!(C8,@!```22N%.!$``$D#A4`1``!(BU0D2(E"$$C! -MZ"!(BU0D2(E"%$B)V$DKA3@1``!)`X5`$0``2(M4)$B)0AA(P>@@2(M4)$B) -M0ASK7/;"`G172(G822N%.!$``$D#A4`1``!(BU0D2(E"&$C!Z"!(BU0D2(E" -M'$B-@R`$``!)*X4X$0``20.%0!$``$B+5"1(B4(02,'H($B+5"1(B4(42(M$ -M)$B`2`$"#[9564B+1"1(9HE0`H!]60!T,[\`````B?A(C01`2,'@`DF+="00 -M2(M-8$B+%`A(B10&BU0("(E4!@B#QP$/MD59.?AWTHM5-$B+1"1(B5`,9H%] -M..$!=3\/MD4Z@^@1/`%W-$$/M\](BU0D2$B)[DR)]^@`````2(U,)#!(B=I( -MB>Y,B??H`````$&`9@S^Z8L$``!F9I!!#[9&"J@"#X0B!```2(M$)$C&0`;^ -M2(M$)$B`8`?^2(-\)`@`#X2X````2(M$)`@/ME!(2(G0@^`&2(/X!@^%GP`` -M`/;"`0^$E@```$$/M\](BU0D2$B)[DR)]^@`````]H66`````7002(M$)$@/ -MMT`(P>`#B$0D,4B-3"0P2(G:2(GN3(GWZ`````#VA98````!=`=!@$X,`>L% -M08!F#/[&`Z%(BU0D"`^V@NH```"#X`\/ME,!@^+P"<*(4P%(BTPD"`^W03B# -MP`%FP<`(9HE#`DF)S$F!Q-0```#I/0,``&:!?3CA`0^%)`(```^V13H\#W03 -M0;P`````/!`/A1L#``#IK@````^V53S!X@@/MD4[`<)(BT0D2,9`!`U(BT0D -M2(!@!?Z`3"1#"$B+="1(#[9%)4$/MHWN````T^!F"48(2(M,)$@/MD$!@^`? -M@\@@B$$!2(M%/DB)@S@$``!FP<((9HF31`0```^V13V(@T($``#&`Y%(BU0D -M"`^W0CB#P`%FP<`(9HE#`DB+3"0(#[:1Z@```(/B#P^V0P&#X/`)T(A#`4F) -MS$F!Q-0```#I:`(``$B+5"1(#[9%)4$/MHWN````T^!F"4((Q@.!9L=#`O__ -M2(M$)!`/MI"[````@^(/#[9#`8/@\`G0B$,!2(-]2`!U#L9%)"&X`````.GN -M`P``]D4[`70I3(ME4$V%Y'0@28N]L!```$R)YN@`````@^`/#[93`8/B\`G" -MB%,!ZP5,BV0D$$B+54@/MD(!OA`````\@`^$A@```#R`=Q\\%7<2/!!F9I!F -MD'-G@^@"/`%W1.M7/!=F9I!W.^M>/(5T+CR%9F:09F:0=Q`\@71#/()U(V9F -MD&9FD.LB/)!R%[XH````/))F9I!V-3R3=0>^C````.LJO@0```#K(P^V0@2- -M-(4(````D.L5O@@```#K#KX,````9I#K!;X<````B?+!Z@)(BT0D2(A0!$B+ -M3"1(9L'J"(/B`0^V006#X/X)T(A!!4B-NR`$``")\DB+=4CH`````.D-`0`` -M#[9%.(/H!#RK=T`/ML#_),4`````#[9%0,'@"`^V54&-#!"#^0UW&+@!```` -M2-/@J=@^``!T"4B+1"1(@$@!!$B+1"1(@$@!`>L)2(M$)$B`8`'[2(M$)$C& -M0`0-2(M$)$B`8`7^2(M4)$@/MD4E00^VC>X```#3X&8)0@A(BT0D2(!@`1_& -M@R`$```&3(MD)`A)@<34````2(V[(00``$R)YN@`````2(V[)00``$R)YN@` -M````2(M%.$B)@T0$``!(BT5`2(F#3`0``$B+5"0(2(N"W````$B)@S@$``#& -M`Y%(BTPD"`^VD>H```"#X@\/MD,!@^#P"="(0P$/MT$X@\`!9L'`"&:)0P)- -MA>1T8TF+!"1(B4,$ZUFH`71500^WSTB+5"1(2(GN3(GWZ`````#VA98````! -M=!!(BT0D2`^W0`C!X`.(1"0Q2(U,)#!(B=I(B>Y,B??H`````/:%E@````%T -M!T&`3@P!ZP5!@&8,_DF+A;`)``!(BQ0D2(DLT$2)^F;!Z@5%#[?G@>+_!P`` -M1(GA@^$?N`$```!(T^!!"825N`D``(M%."7___\`/>$!$`!U*4B-3"1`N@`` -M``!$B>9,B??H``````^V1"1#@^`?@\A`B$0D0^FD````9H%]..$!=3,/MD4Z -M@^@1/`%W*$B+="083(GOZ`````!(C4PD0$B+1"08#[904$2)YDR)]^@````` -MZVE(BW0D"$R)[^@`````2(U,)$!(BT0D"`^V4')$B>9,B??H`````$B+3"0( -M#[912$B)T(/@!DB#^`9U+O;"`70I#[9$)$.#X!^#R&"(1"1##[91?H`````$B)PTB# -M>'``=39(B>_H`````$B)0W!(A_H`````.G]````9F:09I`/ -MMW,X9H'^X0%U%0^V>SJ-1^\\`0^'[0```.L?9F9FD`^VPDB-%$!(C1202,'B -M!4F)U4P#K3@)``#K!XU'_SP!=C9F@?F``'0O9H'^X0%FD'4+#[9#.H/H$3P! -M=AM!]D5+!'44QD,D!DB)WDB)[^@`````Z8````!(B=Y(B>_H`````(/X`G<* -M@_@!_H`````&9FD.M&2(.[ -M@`````!T#TB-LX````!(B>_H`````$B-E?@```!(BX7X````2(E8"$B)`TB) -M4PA(B9WX````ZSA(B=Y(B>_H`````$PYI?@````/A3O^___K'@^VPDB-%$!( -MC1202,'B!4F)U4P#K3@)``#I%O___TB#Q`A;74%<05W#2(/L2$B)7"082(EL -M)"!,B60D*$R);"0P3(ET)#A,B7PD0$B)]4F)_4R+9U!-BS0D00^V1"0,J!!T -M#,:'Z`````;IC`(```^VE^@```"`^@$/A((```"`^@%R&H#Z!`^$HP```(#Z -M!@^%S0(``&9FD.E=`@``QH?H`````4B)_DR)]^@`````QD4D@4&`3"0,"$B# -MO8``````=`](C;6`````3(GWZ`````!)BX;X````2(EH"$B)10!)C8;X```` -M2(E%"$F)KO@```!,B??H`````.EB`@``@^#W08A$)`R`A^L````!QH?H```` -M`,9&)`),B??H`````$R)]^@`````Z3,"``#&A^L`````2(.^@`````!T#TB- -MMH````!,B??H`````$F+34!(A?H`````.FH`0``00^V1"0,@^#W@\@008A$ -M)`Q)BW582(7V=11!@'PD#@!U+.GE````9F9FD&9FD$$/MI6!````0;@````` -MN0(```!,B>?H`````.E:`0``0;\`````QD0D%P!)C40D8$B)1"0(2(M\)`CH -M`````$B)Q4F+1"1H28EL)&A(BU0D"$B)50!(B44(2(DH2(M50$B%TG0528NV -M\`@``+\%````Z`````"`34P"2(GJO@8```!,B>?H`````("]@P````!T-D&- -M7P%!@?]_EI@`=R9,B??H`````+\!````Z`````"`O8,`````=`N#PP&!^X&6 -MF`!UVD&)WX!$)!?H`````(#[_W4.3(GJ3(GF3(GWZ`````!,B??H -M`````$B+7"082(ML)"!,BV0D*$R+;"0P3(MT)#A,BWPD0$B#Q$C#9F:005=! -M5D%505154TB#["A(B?U)B?5(BX\X"0``N&">`0!F@7X@A0!W&P^W1B`/MH0' -M8`@``$B-%$!(C1202(G02,'@!4R-)`%(BY4($0``2('"0`@``$$/MD0D\02(N5"!$``$B!PD`(``!!#[9$)'+!X`A( -MF$@!PHM"!(D%`````(A$)!")PL'J"(A4)!'!Z!"(1"022(N5"!$``$B!PD`( -M``!!#[9$)'+!X`A(F$@!PHM""(D%`````(A$)!.)PL'J"(A4)!3!Z!"(1"05 -MQD0D%@#&1"07`(M,)!!!B?9!P>X800^VWT2+1"041(GRB=Y(Q\<`````N``` -M``#H`````(G8@_`!B<*#X@%T%$6$_W0/0<9%)`"X`````.FH`@``08!])(%F -M9I!U(4B-3"001(GRB=Y,B>_H`````$'&120"N`````#I?0(``$&+13@E____ -M`#WA`0X`=0]!QD4D(;@`````Z5X"``!!]H66`````74HA-)U)$&`?"1*_W0< -M2(U,)!!$B?*)WDR)[^@`````N`````#I+`(``$R)YDB)[^@`````3(GF2(GO -MZ`````!(BU4`00^W13)FP>@%#[?`C02%``,``(F"<`$``$B+10!!#[=-,H/A -M'[H!````2(G32-/CB9AT`0``00^W13)(P>`#2`.%L`D``$C'``````!!#[=- -M,HG(9L'H!27_!P``@^$?2(G62-/F2(GQ]]$AC(6X"0``00^W33*)R&;!Z`4E -M_P<``(/A'TC3XO?2(52%;$F+50!)BT4(2(E""$B)$$$/MW4R2(V]H`\``.@` -M````08"L)(,````!0<9%)(%)@[V``````'0/28VU@````$B)[^@`````28U$ -M)"!).40D(`^$"0$``$F)QDB-A:`/``!(B40D"$R-O?@```!F9F:09F:03(GW -MZ`````!(B<-(BU4`#[=`,F;!Z`4/M\"-!(4``P``B8)P`0``2(M%``^W2S*# -MX1^Z`0```$B)UDC3YHFP=`$```^W0S)(P>`#2`.%L`D``$C'```````/MTLR -MB@%)?\'``"#X1](B=9(T^9(B?'WT2&,A;@)```/MTLRB@%)?\' -M``"#X1](T^+WTB%4A6P/MW,R2(M\)`CH`````$&`K"2#`````4B#NX`````` -M=`](C;.`````2(GOZ`````!(BX7X````2(E8"$B)`TR)>PA(B9WX````33ET -M)"`/A13___]!@:64````___^_T'&A"3H````!$R)[DR)Y^@`````N`$```!( -M@\0H6UU!7$%=05Y!7\.02(/L6$B)7"0H2(EL)#!,B60D.$R);"1`3(ET)$A, -MB7PD4$B)5"002(LO3(N%.!$``$B%T@^$Q@(```^WUDAIPK`$``!*C0P`]D$A -M`G082(T$U0````!(`X6P"0``2(L`QD`D`NL62(T$U0````!(`X6P"0``2(L` -MQD`D(4R-%-4`````2(N%L`D``$P!T$B+$(M"."7___\`/>$!$``/A+`!```/ -MMT(@9CV%`'<2#[?`#[:$!6`(```\_W499F:03(G02`.%L`D``$B+`,9`)`;I -MR@@```^VP$B-%$!(C1202,'B!4R+G3@)``!)`=.`?"03`'EN00^V4TA(B="# -MX`9(@_@&=2/VP@%T'DB+10"+D%@!``")%0````"%TG0*2(M%`(F06`$``$B+ -M10"+@%`!``")!0````"#R`)(BU4`B8)0`0``2(M%`(N`!`$``(D%`````(#, -M_TB+50")@@0!``!F]T$@`@@/A.H```"`?4,`#X3@````NP````!!N0````!% -MB@4@^`!ZR5(BT4`2`70`0``C12-`````$ACTD@!T(L`B04` -M````P>@4@^`!A,!T"K@!````2-/@"<-!@\$!08U``3A%0W>!A-MT4CA?#75- -MB?!FP>@%)?\'``"+1(5LB?](T_BH`74R08"[Z`````)W"$'&@^@````# -M3(G02`.%L`D``$B+,$R)W^@`````Z4P'``!!NP````#V1"03`0^$.P<``$R) -MT$@#A;`)``!(BS#&1B0ABT8X)?___P`]X0$.``^$%P<``$B+E0@1``!(@<)` -M"```00^V0W+!X`A(F$@!PHL"B04`````2(N5"!$``$B!PD0(``!!#[9#`(2)A(`<*+`HD% -M`````$B)[^@`````Z:$&``"0#[?V2(T<]0````!(BX6P"0``2`'82(L09H%Z -M..$!#X4,`0``#[9Z.D"`_Q`/AVX&``"X`0```(GY2-/@J<`P```/A"0`#X06!@``2(M04$B%T@^$"08```^V03.(`NG^!0`` -M2&G&L`0``$J-#`!,C6$H2(G82`.%L`D``$B+$$$/MD0D`HA")$B)V$@#A;`) -M``!(BP!(@WA(``^$P04```^VN2$$``#H`````$B)VD@#E;`)``!(BPJ+430Y -MT`]'PHG"2(MY2$R)YN@`````Z8T%``!(B=A(`X6P"0``2(L`QD`D`.EW!0`` -M9F9FD&9FD$B)V$@#A;`)``!,BRA-BWUHN/____]F08%]((4`=QE(B=A(`X6P -M"0``2(L`#[=`(`^VA`5@"```#[;`2(T40$B-%)!(P>(%3(NE.`D``$D!U$'& -MA"3H`````$$/ME0D2$B)T(/@!DB#^`8/A9PB+$TR)[N@````` -MBP-)`<6+0P1(@\,0A`(2)A(`<*+ -M`HD%`````(G"P>H008B7FP```,'H&&9!B8>0````2(N5"!$``$B!PD0(``!! -M#[9$)'+!X`A(F$@!PHL2B14`````#[;"9D&)AY0````/ML9F08F'E@```(G0 -MP>@0#[;`9D&)AY@```#!ZAA!B)>:````2(N5"!$``$B!PDP(``!!#[9$)'+! -MX`A(F$@!PHL"B04`````#[;`9D&)AY(```#I:0,``$AIQK`$``!.C30`00^V -M1C.$P`^%T0```$B)V$@#A;`)``!(BP#&0"0`0?:%E@```!`/A#(#``!-A?\/ -MA"D#``!!#[9&,T&(AY(```!!]H>Q`````@^$#P,``$&#?30`#X0$`P``28._ -MN`````!U#DF#O\``````#X3L`@``38ME2$F+A[@```!(APB+$TR)YN@`````BP-)`<2+0P1(@\,0A<`/A8<"``#KW&9FD&:0/`(/A2@" -M``!!#[9.0$&+1CB)1"0D#[94)"`(08G400G$@^%_@/EQ=CS&1"0-`$&#_`%V#$$/MD9!@^`/B$0D#<9$)`X` -M08/\`G8)00^V3D*(3"0.08/\`W9F00^V1D.(1"0/ZV#&1"0-`$&#_`)V#$$/ -MMDY"@^$/B$PD#<9$)`X`QD0D#P!!@_P'=CE!#[9&1X/`"$$YQ$0/1^#&1"0. -M`$&#_`QV"4$/MD9,B$0D#D&#_`UV"T$/MDY-B$PD#^L%QD0D#P!(B=A(`X6P -M"0``2(L`@'@P`'1(187D=$/&0"0@2(G82`.%L`D``$B+``^V0#`/MM!$..!$ -M#T+B2(G82`.%L`D``$B+`$B+>%!(A?]T'T2)XDF-=D#H`````.L12(G82`.% -ML`D``$B+`,9`)"*`?"0-!'412(G82`.%L`D``$B+`,9`)`)).6TH#X02`0`` -M387_#X0)`0``0?:%E@```!!T0$$/MD8S08B'D@```$'VA[$````"="I!#[9% -M,$2)XD$XQ`]'T(32=!A)B[^H````2(7_=`P/MM))C79`Z`````"`?"0-"W=< -M#[9$)`W_),4`````0<:'L@````'IGP```(!\)`X$=12`?"0/`G4-0<:'L@`` -M`!'IA````$'&A[(````"ZWI!QH>R````$.MP0<:'L@````OK9D'&A[(````& -MZUQ!QH>R````#>M29I`\*'4G00^VA"2#````@^@!08B$)((```!(B=A(`X6P -M"0``2(L`QD`D@>LE/`AU"K\0)P``Z`````!(B=A(`X6P"0``2(L`QD`D(69F -MD&9FD$B+7"0H2(ML)#!,BV0D.$R+;"1`3(MT)$A,BWPD4$B#Q%C#9F9FD&9F -MD&9FD&9FD$%7059!54%455-(@>RH````2(G]2(E\)'`/MX>R$@``9HF$)(`` -M``!(BP>+@$`!``")!0````!F)?\/9HF'LA(``&8[A"2`````=7%(BP>+L%`! -M``")-0````!(BP>)L%`!``"X`````/?&`/__``^$!`D``$C'QP````"X```` -M`.@`````2(M\)'#H`````+@!````Z=\(``!F9I!F9I!(BT4`BX!``0``B04` -M````9B7_#V:)A;(2``#K)$B-EP@!``!(B50D:$B-CZ`/``!(B4PD8$B-M_@` -M``!(B70D6$B+A9@1``"+`(D%``````^WC;(2```E_P\```^WT3G0=9UF@?G_ -M#P^%P@<``.G2!P``3(N%.!$``&:#A"2``````0^WA"2`````9CN%MA(``+@` -M````#[>4)(`````/0]!FB90D@````$B+E9@1``!(@\($#[>$)(````"+#()! -MBD00?;!"`^$KP```$B+10"+D%`!``")%0````!(BT4`B9!0`0``]\(` -M__\`=&F`?4,`=&.)UO?&``$``'4NOP````#WQ@```0!T0.L?#[?7C4H(2(GP -M2-/XJ`%U%(U*$$B)\$C3^*@!=0?K'[\`````#[?'2(T4@$B-%)!(C9S5P`$` -M`$B%VW4=ZPR#QP$/MD5#9CGX=[9(BWPD<.@`````Z<4&``!(BWPD<.@````` -MB$,/Z;,&``!F9I")SF:!YO\/#[?&2&G0L`0``$V+1!`@2(T\Q0````!(BX6P -M"0``2`'X2(L82(7;#X5L`0``#[?VB?)(Q\<`````N`````#H`````&:#?6@` -M#X1;!@``QH0DGP````!F9I!$#[:T))\```!.C3SU`````$B+A;`)``!,`?A( -MBS!(A?8/A/D```!-:>:P!```3`.E.!$``$B+G=@0```/MDXE1`^VK"2?```` -M1(GJ2,?'`````+@`````Z`````!,B?A(`X6P"0``2(LXZ`````!!BXPD)`0` -M`$&+E"0@!```18N,)"P$``!%BX0D*`0``$2)[DC'QP````"X`````.@````` -M3(GP2,'@!D@!PXM#-(M[,$2+4RQ$BULH1(MC)$2+:R!$BW,<1(M[&(M+%(E, -M)'Q$BTL01(M##(M+"(M3!(LSB40D0(E\)#A$B50D,$2)7"0H1(ED)"!$B6PD -M&$2)="001(E\)`B+1"1\B00D2,?'`````+@`````Z`````"`A"2?`````0^V -MA"2?````9CM%:`^#%@4``.G!_O__D$'VP2`/A(@!``"`>R2!9I`/A5L!``#& -M0R0A#[=#,DC!X`-(`X6P"0``2,<```````^W2S*)R&;!Z`4E_P<``(/A'[H! -M````2(G62-/F2(GQ]]$AC(6X"0``#[=+,HG(9L'H!27_!P``@^$?2-/B]](A -M5(5L#[=S,DB+?"1@Z`````!(@[N``````'0/2(VS@````$B)[^@`````#[=3 -M(&:!^H4`#X?'````#[?"#[:$!6`(```\_P^$M````&:#^G]W(P^VP$B-%$!( -MC1202,'B!4@#E3@)``!(BT)0@'@(_P^5P.M9#[=#(&8]@0!W)@^WP`^VA`5@ -M"```2&G`R`\``$@#A8@)``!(BT`(@'@(_P^5P.LI#[=#(`^VA`5@"```2(T$ -MP$C!X`5(`X5@"0``2(N`B````(!X"/\/E<"$P'0N2(G>2(GOZ`````!(BX7X -M````2(E8"$B)`TB+1"182(E#"$B)G?@```#IGP,``$B+3"1H2(M1"$B-0Q!( -MB4$(2(E+$$B)4`A(B0+I?@,``(GP9L'H!40/M_!)8\8/M_9!B?=!@^ -M2(GOZ`````#I20(``$ACP@^VA`7F"```2(T4@$B-%)!(C;S5P`$``$V%P'0- -M0?;!`K@`````3`]$P/9'"@(/A%X!``!,B<+H`````$ECQHM$A6Q$B?E(T_BH -M`0^%]0$``(![)($/A8\````/MT,R2,'@`T@#A;`)``!(QP``````#[=+,HG* -M9L'J!8'B_P<``(/A'[@!````2-/@]]`AA)6X"0``#[=S,DB+?"1@Z`````!( -MB=Y(B>_H`````$B#NX``````=`](C;.`````2(GOZ`````!(BX7X````2(E8 -M"$B)`TB+="182(ES"$B)G?@```#I7`$``$B+A0@!``!(.T0D:'1?0;P````` -M08/$`4B+`$@Y1"1H=?)%A.1T1D&]`````$B+?"1HZ`````!(C4CP2(MT)&A( -MBU8(2(E&"$B),$B)4`A(B0)(.=FX`0```$0/1.A!@.P!=\```!( -MBT0D:$B+4`A(C4,02(M,)&A(B4$(2(E+$$B)4`A(B0))8]:X`0```$2)^4C3 -MX`F$E:P```#IM````$R)PN@`````2(N%"`$``$@[1"1H=%M!O`````!!@\0! -M2(L`2#E$)&AU\D6$Y'1"0;T`````2(M\)&CH`````$B-2/!(BW0D:$B+5@A( -MB48(2(DP2(E0"$B)`D@YV;@!````1`]$Z$&`[`%UR46$[75#@'LD@70]2(M$ -M)&A(BU`(2(U#$$B+3"1H2(E!"$B)2Q!(B5`(2(D"26/6N`$```!$B?E(T^`) -MA)6L````9F9FD&9FD`^WM"2`````9CFULA(```^%+OC__V:!O;(2``#_#W0C -M2(N%F!$``(L`B04`````)?\/```/MY6R$@``.=`/A<[W__](C84(`0``2#F% -M"`$``'1)2(G#2(G?Z`````!(C7#P#[=.,HG*9L'J!8'B_P<``(/A'[@!```` -M2-/@]]`AA)6L````N@````!(B>_H`````$@YG0@!``!UNDB)[^@`````N`$` -M``!(@<2H````6UU!7$%=05Y!7\-F9I!FD$B#["A(B5PD"$B);"003(ED)!A, -MB6PD($B+G_`(``!(BT,(1(LH1(DM`````$'WQ0```)!T>DB+0PA$B2CK<9!( -M@<.(%```2(L#BY!0`0``B14`````2(L#B9!0`0``A=)T//?"````$'0<2(L# -MQX!0`0``````$$B+`XN`4`$``(D%`````$B+`\>`4`$```$```!(B=_H```` -M`$$!Q(/%`8/]`G69ZQ=F9F:09F:00;P`````O0````#KBF9FD$6$Y`^5P$6% -M[0^5P@G0#[;`2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9FD&9FD$%7059! -M54%455-(@^PH28G\2(L'BY!0`0``B14`````2(L'B9!0`0``9F9FD&9FD/?" -M`/__``^$*`D``$&`?"1#``^$'`D``,9$)!``B=)(B50D"$0/MFPD$$&-30A( -MBT0D"$C3^*@!=11!C4T02(M$)`A(T_BH`0^$T0@``(!\)!`#=BM)BP0D2`6` -M`0``0HT4[0````!(8])(`="+`(D%`````,'H$X/@`>LI9F:028L$)$@%@`$` -M`$*-%.T`````2&/22`'0BP")!0````#!Z!.#X`&$P'0F3(GGZ`````!)8]5( -MC0122(T$@D&!C,3L$@`````(`&9F9I!F9I!)BQ0D@'PD$`-V)4*-!.T````` -M2)A(C80"@`$``(L`B04`````)0```0#K(V9F9I!"C03M`````$B82(V$`H`! -M``"+`(D%`````"4```$`A?H`````+^@A@$`Z`````"Z`"TQ`>L%ND!+3`!)8\5(C0Q` -M2(T,B$C!X0-*C30AB9;P$@``2,>&`!,````````/MD0D$$B-%$!(C12028V4 -MU+@2``!(B98($P``28VT#/`2``!)BWPD*.@`````9F:0@'PD$`-V/4*-%.T` -M````2&/228L$)$@%@`$``$@!T(L`B04`````28L$)$@%@`$``$@!PHL"B04` -M````P>@'@^`!ZSM"C13M`````$ACTDF+!"1(!8`!``!(`="+`(D%`````$F+ -M!"1(!8`!``!(`<*+`HD%`````,'H!X/@`83`='6`?"00`W8W0HT,[0````!( -M8\E)BP0D2`6$`0``2`'(BP")!0````!)BQ0D2('"A`$``$@!T0T```$`B0'K -M/D*-#.T`````2&/)28L$)$@%A`$``$@!R(L`B04`````28L4)$B!PH0!``!( -M`=$-```!`(D!ZR^`?"00`W8H28L$)$@%@`$``$*-%.T`````2&/22`'0BP") -M!0````#!Z!*#X`'K)DF+!"1(!8`!``!"C13M`````$ACTD@!T(L`B04````` -MP>@2@^`!A,`/A"("``"`?"00`W8W0HT,[0````!(8\E)BP0D2`6``0``2`'( -MBP")!0`````-```$`$F+%"1(@<*``0``2`'1B0'K-4*-#.T`````2&/)28L$ -M)$@%@`$``$@!R(L`B04`````#0``!`!)BQ0D2('"@`$``$@!T8D!26/%2(T4 -M0$B-%)!)BX34R!(``$B%P'0328G%2(-X0``/A:(```#IA`$``(!\)!`#=DI" -MC13M`````$ACTDF+!"1(!8`!``!(`="+"(D-`````$F+!"1(!8`!``!(C00" -MB0A)BP0D2`6``0``2`'"BP*)!0````#IT`,``$*-%.T`````2&/228L$)$@% -M@`$``$@!T(L(B0T`````28L$)$@%@`$``$B-!`*)"$F+!"1(!8`!``!(`<*+ -M`HD%`````.F&`P``9I!(BTA`#[=!3@^WT/;&`0^%TP```$B)S?;"`@^$QP`` -M`(/@_6:)04Y(C;'`````28M\)"CH`````,9$)!``@'T[`'1WQD0D$``/MD0D -M$$B+7,582(7;=%1(BU-`2(72=!9)B[0D\`@``+\%````Z`````"`2TP"2(G: -MO@8```!,B>_H`````("[@P````!T')!,B>?H`````+\!````Z`````"`NX,` -M````=>6`1"00`0^V1"00.$4[=X['A<````!`2TP`2,>%T`````````!(B:W8 -M````2(VUP````$F+?"0HZ`````"`?"00`W8R28L$)$@%@`$```^V5"002,'B -M`X'B^`<``$@!T(L`B04`````P>@(@^`!ZS!F9I!F9I!)BP0D2`6``0``#[94 -M)!!(P>(#@>+X!P``2`'0BP")!0````#!Z`B#X`&$P`^$%@$``(!\)!`#=BQ) -MBP0D2`6``0``#[94)!!(P>(#@>+X!P``2`'0BP")!0````"#\`&#X`'K*DF+ -M!"1(!8`!```/ME0D$$C!X@.!XO@'``!(`="+`(D%`````(/P`8/@`83`#X2Q -M````#[9$)!!(C11`2(T4D$F-E-2P$@``3(UZ"$F+1Q!(A<`/A(L```!)B<9( -MC7)`28M\)"CH`````$&`?@X`=%%!O0````!)C6Y@D$B)[^@`````2(G#2(M% -M"$B)70A(B2M(B4,(2(D82(M30$B%TG0628NT)/`(``"_!0```.@`````@$M, -M`D&#Q0%%.&X.=[I!QT`$G'1T@`````38E_4$F-=SA)BWPD*.@````` -M@'PD$`,/AG\````/MEPD$$C!XP.!X_@'``!)BP0D2`6``0``2`'8BQ")%0`` -M``!)BP0D2`6``0``2(T$`XD028L$)$@%@`$``$B-!`.+`(D%`````$F+!"1( -M!3`"``!(C00#QP``````OQ`G``#H`````$F+!"1(!30"``!(`<.+`XD%```` -M`.M]#[9<)!!(P>,#@>/X!P``28L$)$@%@`$``$@!V(L0B14`````28L$)$@% -M@`$``$B-!`.)$$F+!"1(!8`!``!(C00#BP")!0````!)BP0D2`50`@``2(T$ -M`\<``````+\0)P``Z`````!)BP0D2`54`@``2`'#BP.)!0````"`1"00`0^V -M1"0003A$)$,/A_#V__])BP0DBY!0`0``B14`````28L$)(F04`$``/?"`/__ -M`'0FZ:7V__]F9I!FD$ECU4B-!%)(C02"08&,Q.P2``````$`Z>CW__^X```` -M`$B#Q"A;74%<05U!7D%?PT%7059!54%455-(@^QH28G]0(AT)$M`#[;&B40D -M3$B82(T40$B-%)!(C1373(NZR!(```^VJL(2``!(BP=`@/X#=@S'@'`!``#$ -M`0``ZPK'@'`!``"H`0``2(E$)&!(!70!``!(B40D4$B+5"1@BX)T`0``B04` -M````BTPD3(/A`[L'````T^-!B=Q!"<1$B:)T`0``O^@#``#H`````/?31"'C -M2(M,)&")F70!``"`?"1+`W95BT0D3,'@`DB82(V4`=`!``"+`HD%`````(/( -M"(D"BUPD3,'C`TACVTB-A!D``@``QP`X````OQ`G``#H`````$B+5"1@2(V$ -M&@0"``#'``````#K6(M$)$S!X`)(F$B+3"1@2(V4`=`!``"+`HD%`````(/( -M"(D"BUPD3,'C`TACVTB-A!D``@``QP`X````OQ`G``#H`````$B+5"1@2(V$ -M&@0"``#'``````!-A?\/A%<(``!!@'U#`'0LNP`````/MLM!#[9'#4C3^*@! -M=`^Z`0```(G.3(GOZ`````"#PP%!.%U#=]E!]D<*`71G3(G^3(GOZ`````"+ -M="1,3(GOZ`````!(8T0D3$B-%$!(C12028V4U>`2``"+0@BI```0`'0()?__ -M[_^)0@A,B?Y,B>_H`````$AC1"1,2(T40$B-%)!)QX35R!(```````#IM@<` -M`$&`?U@`=!1)B[VP$```3(G^Z`````!!@&]8`4C'P/[___\/MDPD3$C3P$`@ -MZ(A$)%L/A+T"``"+="1,3(GOZ`````!(8T0D3$B-%$!(C12028V4U>`2``"+ -M0@BI```0`'0()?__[_^)0@@/MD0D6T&(1PU!@'U#``^$[P$``,=$)%P````` -M#[;02(E4)#!(BTPD8$B!P0`"``!(B4PD*$B+1"1@2`4$`@``2(E$)"`/ME0D -M6XE4)!Q(BTPD8$B!P=`!``!(B4PD$$0/MG0D7$$/MNY(BT0D,(GI2-/XJ`$/ -MA$T!``!(8\5(C11`2(T4D`^V1"1;08B$U<(2``!!@/X##X:5````C1SM```` -M`$ACVTB+1"0H2`'8QP`X````OQ`G``#H`````$@#7"0@BU0D'(D32(M,)&#' -M@7`!``#$`0``2(M4)%"+`HD%`````(GI@^$#NP<```#3XT&)W$$)Q$2)(K_H -M`P``Z`````#WTT0AXTB+3"10B1F-%*T`````2&/22`-4)!"+`HD%`````(/( -M"(D"Z98```"-'.T`````2&/;2(M$)"A(`=C'`#@```"_$"<``.@`````2`-< -M)""+1"0"<`$``*@!``!(BTPD4(L!B04`````B>F#X0.[!P`` -M`-/C08G<00G$2(M$)%!$B2"_Z`,``.@`````]]-!(=Q(BU0D4$2)(HT4K0`` -M``!(8])(`U0D$(L"B04`````@\@(B0*#1"1<`4&-1@%!.$5#=BSI@_[__TB) -MW^@`````2(UPR$B+4PA(B4,(2(D82(E0"$B)`DB#>-@`=!'K";X`````28U? -M2$DY7TAURDB%]G0XQD9:`$&`?4,`="VY`````+H`````00^V1PU(T_BH`70. -M#[;"B$P&<(!&6@&#P@&#P0%!.$U#=]VZ`````+Z!````3(G_Z`````!(8T0D -M3$B-%$!(C1202<>$U<@2````````08!]0P`/A9\#``#IP@0``+H`````O@8` -M``!,B?_H`````(MT)$Q,B>_H`````$AC1"1,2(T40$B-%)!)C935X!(``(M" -M"*D``!``=`@E___O_XE""$F-1TA).4=(#X0``@``2(D$)$B+/"3H`````$R- -M<,A(C5`02#E0$`^$PP$``$F-1DA(B40D"$B+?"0(Z`````!(C5CP@'M)#747 -M2(VP4`$``$B+0U!(BP!(BW@HZ`````!(BQ-(BT,(2(E""$B)$("[@P````!T -M'6:03(GOZ`````"_`0```.@`````@+N#`````'7E2(M#0$B%P`^$*@$``$C' -M0&``````@+N#``````^$IP```&9!@WUH``^$FP```+T`````0;P`````3(G@ -M20.%L`D``$B+,$B%]G1J#[=&(&8[0SAU8&8]A0!W6@^WP$&`O`5@"```_W1, -M28M5``^W1C)FP>@%#[?`C02%``,``(F"<`$``$F+50`/MTXR@^$?N`$```!( -MT^")@G0!``#&1B0AN@````!,B>_H`````&9FD&9FD(/%`4F#Q`A!#[=%:#GH -M#X]P____]D-,!'493(GOZ`````!(BW-`N@$```!,B>_H`````$B+0T`/ME`" -M#[9P`4C'QP````"X`````.@`````2(M30$F+M?`(``"_`0```.@`````2(M3 -M0$F+M?`(``"_!@```.@`````2,=#0`````!!@&\.`4&`;E@!2(G>3(GOZ``` -M``!(BU0D"$DY5D@/A4;^__]!@&\H`4R)]DR)[^@`````2(L,)$DY3T@/A03^ -M__])C4=@23E'8`^$$`$``+T`````28G$2LHB<5,B>_H`````+\!````Z`````"`NX,` -M````=`N#Q0&!_8&6F`!UVDB+0T!(A<`/A(\```!(QT!@`````/9#3`1U&4R) -M[^@`````2(MS0+H!````3(GOZ`````!(BU-`#[:"S````(T$@`^V4@(!T$B8 -M00^V#`9!#[95.D$/MG4Y2,?'`````+@`````Z`````!(BU-`28NU\`@``+\! -M````Z`````!(BU-`28NU\`@``+\&````Z`````!(QT-``````$&`;PX!2(G> -M3(GOZ`````!-.6=@#X7__O__3(G^3(GOZ`````!(8T0D3$B-%$!(C1202<>$ -MU<@2````````Z5;\__]!OP`````/MD0D6TB)1"1`2(M4)&!(@<+0`0``2(E4 -M)#A%B?Y!#[;O2(M$)$")Z4C3^*@!=0M$.'PD2P^%U0```$&`_@-V:$B+1"1@ -MQX!P`0``Q`$``$B+5"10BP*)!0````")Z8/A`XT,2;L'````T^-!B=Q!"<1$ -MB2*_Z`,``.@`````]]-$(>-(BTPD4(D9C12M`````$ACTD@#5"0XBP*)!0`` -M``"#R`B)`NMG2(M$)&#'@'`!``"H`0``2(M4)%"+`HD%`````(GI@^$#C0Q) -MNP<```#3XT&)W$$)Q$2)(K_H`P``Z`````#WTT$AW$B+3"101(DAC12M```` -M`$ACTD@#5"0XBP*)!0````"#R`B)`D&#QP%!C48!03A%0P^'^?[__TB#Q&A; -M74%<05U!7D%?PV9F9I!F9F:09F:09F:005154TF)_$B)]0^V=T-`A/9T)@^V -M50V[`````/;"`70.ZQ9(B=")V4C3^*@!=0^#PP%`./-U[.L%NP````#V10P" -M=0I(C45@2#E%8'5H2(GOZ`````"$P'113(GGZ`````!(B<9(A_H`````.L+#[;S3(GGZ`````!;74%@4@^`!A,!U"H/#`6:!^RP!=:A$B?9(B>_H`````$B)[^@`````26/& -M2(T40$B-%)!(C435`/:`P1(```%T#TB+L,@2``!(B>_H`````%M=05Q!74%> -MPV:0059!54%455-!B?5)B?Q$#[;V26/&2(T40$B-%)!(BZS7R!(``$B%[0^$ -ME@$``$C'P/[___]$B?%(T\"$10T/A8`!``!(C45(2#E%2'450;T`````2(U= -M8(!]#@!U(^GS`@``0`^VQDB-/$!(C3RX28V\_+@2``#H`````.G5`@``2(G? -MZ`````!(B<%(BT,(2(E+"$B)&4B)00A(B0B`>4D`#X4)`0``#[=!.$F#O,1@ -M!````'4+2(-Y0``/A-D````/MT$X28N$Q&`$``!(@[B```````^$IP```,:! -MZ``````/ME%(2(G0@^`&2(/X!G4M]L(!="C&04H%QD%+!`^VD8$```!(BW%8 -M2(MY4.@`````Z9@```!F9F:09F:0#[912$B)T(/@!DB#^`1U(/;"`70;QD%* -M`\9!2P1(B?H`````.MG9F:09F:0#[912$B)T(/@!DB#^`9U4?;"`75, -MQD%+!L9!2@5FQX'(``````!(B?H`````.LN2(M10$F+M"3P"```OP0` -M``#H`````.L6#[=1.$F+M"3P"```OP(```#H`````$&#Q0%$.&T.#X:7`0`` -MZ;W^__]"C02U`````$ACZ+L`````OQ`G``#H`````$&`_0-V'4F+!"1(!=`! -M``!(`>B+`(D%`````,'H%(/@`>L;28L$)$@%T`$``$@!Z(L`B04`````P>@4 -M@^`!A,!U"H/#`6:!^RP!=:I$B?9,B>?H`````$R)Y^@`````26/&2(T40$B- -M%)!)BZS4R!(``$B%[0^$_0```$&`?"1#`'0LNP`````/MLL/MD4-2-/XJ`%T -M#[H`````B?H`````(/#`4$X7"1#=]E!#[;%2(T40$B-%)!)C934N!(` -M`$B)52!(C45(2#E%2'4X2(U%8$@Y16!U+NM[9F:09I!(B=_H`````$B-<,A( -MBU,(2(E#"$B)&$B)4`A(B0)(@WC8`'01ZPF^`````$B-74A(.5U(=@4@^`!ZRVY```` -M`$F+`$@%T`$``$B-%(T`````@>+\`P``2`'0BP")!0````#!Z!2#X`&$P'00 -M#[;Q1(G*3(G'Z`````#K"P^V\4R)Q^@`````2(/$",-F9F:09F9FD$%7059! -M54%455-(@^P(2(GS28G^3(NGB````$F++"1!]D0D#!!T!,9'409!#[9&43P! -M='D\`7(5/`0/A)D````\!@^%2`,``.FZ`0``0<9&40%,B?9(B>_H`````,9# -M)(%!@$PD#`A(@[N``````'0/2(VS@````$B)[^@`````2(V5^````$B+A?@` -M``!(B5@(2(D#2(E3"$B)G?@```!(B>_H`````.GC`@``08!D)`SW08!&4@%! -MQD91`,9#)`)(B=Y(B>_H`````$B)[^@`````Z;<"``!!#[9$)`R#X/>#R!!! -MB$0D#$&+E@@!``"-0@%!B88(`0``@_H"#X<#`0``2(.[@`````!T#TB-LX`` -M``!(B>_H`````$B-E?@```!(BX7X````2(E8"$B)`TB)4PA(B9WX````08!^ -M0@!U&$&_`````$V-;"1@08!\)`X`=1[IG@```+H`````O@(```!,B>?H```` -M`&:0Z1L"``!,B>_H`````$B)PTF+10A)B5T(3(DK2(E#"$B)&$B+4T!(A=)T -M%4B+M?`(``"_!0```.@`````@$M,`DB)VKX&````3(GGZ`````"`NX,````` -M=")F9F:09F:02(GOZ`````"_`0```.@`````@+N#`````'7E08/'`44X?"0. -M#X=[____3(GWZ`````#IB0$``$&`9"0,]T''A@@!````````2(.[@`````!T -M#TB-LX````!(B>_H`````$B-E?@```!(BX7X````2(E8"$B)`TB)4PA(B9WX -M````N@````"^!@```$R)Y^@`````28U$)&!).40D8'1\28G%3(GOZ`````!( -MB<-(BT!`2(7`=%-(QT!@`````$B)[^@`````2(MS0+H!````2(GOZ`````!( -MBU-`2(NU\`@``+\!````Z`````!(BU-`2(NU\`@``+\&````Z`````!(QT-` -M`````$B)WDB)[^@`````33EL)&!UATR)]DB)[^@`````2<=$)$``````2(M% -M`(N06`$``(D5`````(72=`I(BT4`B9!8`0``0?9$)`H!=&N`?4,`="RY```` -M`$'V1"0-`705ZQUF9I!F9I!!#[9$)`U(T_BH`74/@\$!.$U#=^OK!;D````` -M#[;9B=Y(B>_H`````$R)YDB)[^@`````2&/;2(T$6TB-!(-(QX3%R!(````` -M``!F9I!FD$B#Q`A;74%<05U!7D%?PY!(@^PH2(E<)`A(B6PD$$R)9"083(EL -M)"!(B?-(B?U,BV]038ME``^W3C*)R&;!Z`4/M_!(8\9!BT2$;(/A'TC3^*@! -M#X5G`P``28L4)(T$M0`#``")@G`!``!)BP0DBY!T`0``B14`````QD,D(8M# -M."7___\`/>$!#P!U(TB)W^@`````N@````!(B=Y,B>?H`````.D6`P``9F:0 -M9F:0B=`/MTLR@^$?2-/XJ`%T$$B)W^@`````3(GGZ``````/MH7H````/`0/ -MA^$"```/ML#_),4`````QH7H`````;H!````2(G>3(GOZ`````#INP(``,:% -MZ`````*Z"````$B)WDR)[^@`````Z9\"``#&A>@````#2(GJOB$```!,B>_H -M`````$B+=5A(A?9T'P^VE8$```!!N`````"Y`0```$R)[^@`````Z6`"``!! -M#[9U#;H`````3(GGZ`````#I20(``,:%Z`````1(@WU8`'0S2(GJOB$```!, -MB>_H``````^VE8$```!(BW580;@`````N0(```!,B>_H`````.D(`@``N@`` -M``"^(0```$R)[^@`````00^V=0VZ`0```$R)Y^@`````Z=\!``"`?4K_=!5( -MB>J^!@```$R)[^@`````Z<0!``!(B>J^!@```$R)[^@`````2(M-0$B%R702 -MBU$$C4(!B4$$@_H%#X:9`0``QD5+`<9%2@"`O8,`````=!M,B>?H`````+\! -M````Z`````"`O8,`````=>5(@WU8`'092(M5$$B+11A(B4((2(D02(M%6(!H -M6`'K&4B+56!(A=)T$`^VA8$```!(QT3"6`````!(BU4`2(M%"$B)0@A(B1!! -M@&T.`4B+O2`!``!(A?]T$0^VM0T!``"Z`0```.@`````2(M]6$B%_W01#[:U -M@0```+H!````Z`````!(BT5`2(7`=')(QT!@`````$R)Y^@`````2(MU0+H! -M````3(GGZ`````!(BT5`#[90`@^V<`%(Q\<`````N`````#H`````$B+54!) -MB[0D\`@``+\!````Z`````!(BU5`28NT)/`(``"_!@```.@`````2,=%0``` -M``!(B>Y,B>?H`````$&`?0G_=%R]`````$&`?0X`=#F]`````$F-76!F9F:0 -M9F:02(G?Z`````!(BU,(2(E#"$B)&$B)4`A(B0*`>$K_=0F#Q0%!.&T.=]=! -M.&T.=Q%!QD4)_TR)[DR)Y^@`````D$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$ -M*,-F9F:09F:005=!5D%505154TB#[&A)B?](BX>(````2(E$)&!(BRA(BX68 -M$0``1(LP2(G^2(GOZ`````!!@']2`78%0<9'401)C5\H23E?*`^$4P$``$B) -MW^@`````2(E$)%A)BT4&3`'KBT,TBWLP1(M3+$2+6RA$BV,D1(MK((M3'(E4 -M)$R+2QB)3"10BU,4B50D5$2+2Q!$BT,,BTL(BU,$BS.)1"1`B7PD.$2)5"0P -M1(E<)"A$B60D($2);"08BUPD3(E<)!"+?"10B7PD"(M$)%2)!"1(Q\<````` -MN`````#H`````&:#?6@`=3OIZP$``$B+5"1@2(M"(`^V34$/ME4Z#[9U.4&Y -M____`$0/MD`(2,?'`````+@`````Z`````#I$0(``+L`````3(VEH`\``$R- -MK?@```!F9I!FD`^WPTC!X`-(`X6P"0``2(LP2(7V#X1V`0``#[=&(&9!.4=` -M#X5G`0``#[>5LA(``$$YUG10@\(!#[>%MA(``#G"N``````/0]"-0@%(P>`" -M2`.%F!$``(L`J0``"`!U(&8E_P]F.=AU%T@Y="18=15(B>_H`````.E\`0`` -M9F:01#GR=;`/MT8@9CV%`&9FD`^'^@````^WP("\!6`(``#_#X3I````2(M, -M)&"`>5@`#X7:````]D$*`0^$T````$B+50`/MT8R9L'H!0^WP(T$A0`#``") -M@G`!``!(BT4`#[=.,H/A'[H!````2(G72-/GB;AT`0``#[=&,DC!X`-(`X6P -M"0``2,<```````^W3C*)R&;!Z`4E_P<``(/A'TB)UTC3YTB)^??1(8R%N`D` -M``^W3C*)R&;!Z`4E_P<``(/A'TC3XO?2(52%;$@Y="18="=(BP9(BU8(2(E0 -M"$B)`DB+A?@```!(B7`(2(D&3(EN"$B)M?@````/MW8R3(GGZ`````!!@&]% -M`69F9I"#PP%F.5UH#X=C_O__2(M$)&#V0`H!=%%(BTPD6$B+$4B+00A(B4(( -M2(D02(G.3(G_Z`````#K,4B+7"1@2(M#(`^V34$/ME4Z#[9U.4&Y____`$0/ -MMD`(2,?'`````+@`````Z`````!(@\1H6UU!7$%=05Y!7\-F9F:09F9FD$%7 -M059!54%455-(@^PH28GX2(E4)"!,BR\/M_9(P>8#20.UL`D``$B++F:!?3CA -M`74N#[9%.H/H$3P!=R-,BW]`2,=$)!@`````2(72=6E!QD=1`$C'1"08```` -M`.M9D$F+C3@)``"X8)X!`&:!?2"%`'<<#[=%($$/MH0%8`@``$B-%$!(C120 -M2(G02,'@!4@!P4B)3"080;\`````2(-\)"``=1)(BT0D&,:`Z`````!!OP`` -M``"`?22!=05!@&`,]TB#?"0@``^%`@$``,9%)`#VA98````@#X2"!0``2(M% -M:$B%P`^$=04``$B)P_:`L0````)T'4B+N*````!(A?]T$4B+=4A(A?9T"(M5 -M-.@`````28N5"!$``$B!PD`(``!(BTPD&`^V07+!X`A(F$@!PHL"B04````` -MB<+!ZA"(DYL```#!Z!AFB8.0````28N5"!$``$B!PD0(```/MD%RP>`(2)A( -M`<*+$HD5``````^VPF:)@Y0````/ML9FB8.6````B=#!Z!`/ML!FB8.8```` -MP>H8B).:````28N5"!$``$B!PDP(```/MD%RP>`(2)A(`<*+`HD%``````^V -MP&:)@Y(```#ID00```^W13)(:<"P!```38NE.!$``$D!Q$F-G"0@!```@'TD -M@'4$QD4D(4B#?"08``^$F````$B+1"082(M00$B%TG1"#[:"S````(T$@`^V -M4@(!T$B8#[:(`````$$/ME4Z00^V=3E,BTPD($2+131(Q\<`````N`````#H -M`````.F#````BWTT2(M,)!A$#[:)@0```$F+0"!$#[9`"$$/MDU!00^V53I! -M#[9U.4B+1"0@2(E$)`B)/"1(Q\<`````N`````#H`````.L[387_=#9$BTTT -M28M`($0/MD`(00^V34%!#[95.D$/MG4Y2(M$)"!(B00D2,?'`````+@````` -MZ`````"+2P2+$P^W=3)$BTL,1(M#"$C'QP````"X`````.@`````0?9$)"(! -M='],C6583(NU@````$&+5"0$00^V="0!2,?'`````+@`````Z`````"`?5@` -M#X3R````NP`````/ML-(C01`2,'@`DF+5"0(2`'"20-&$(M*"$B+$@^V\T2+ -M2`A,BP!(Q\<`````N`````#H`````(/#`4$X'"0/AJ@```#KN6:008!\)"<` -M#XF8````#[=U,HGR9L'J!0^WT@^W]DC'QP````"X`````.@`````08N-P`D` -M`$&+E;P)``!!B[6X"0``18N%Q`D``$C'QP````"X`````.@`````#[=U,DC' -MQP````"X`````.@`````28M5``^W13)FP>@%#[?`C02%``,``(F"<`$``$F+ -M50`/MTTR@^$?N`$```!(T^")@G0!``!F@7TXX0%U&`^V13J#Z!$\`7<-3(G_ -MZ`````#I'@(```^V5"0C]L(!#X3N`0``BT4X)?___P`]X0$.``^$VP$``$F+ -ME0@1``!(@<)`"```2(M,)!@/MD%RP>`(2)A(`<)$BR)$B24`````28N5"!$` -M`$B!PD0(```/MD%RP>`(2)A(`<)$BS)$B34`````28N5"!$``$B!PD@(```/ -MMD%RP>`(2)A(`<*+&HD=`````$F+E0@1``!(@<),"```#[9!@0B(>;````1(G@P>@89HF'D````(G8 -MP>`(00^VU@'09HF'E````(G8L`!,B?$/MM4!T&:)AY8```")VL'J$,'B"$2) -M\,'H$`^VP`'"9HF7F````$F+E0@1``!(@<),"```2(M,)!@/MD%RP>`(2)A( -M`<*+,HDU`````$`/MO9FB;>2````#[>/E@````^WEY@````/M_9$#[>'E``` -M`$C'QP````"X`````.@`````28N5"!$``$B!PD`(``!(BTPD&`^V07+!X`A( -MF$@!PL<"`````.M:9H%]..$!=2(/MD4Z@^@:/`%W%TC'QP````"X`````.@` -M````QD4D(>LP2(GN3(GOZ`````#K(Y"$TGD>28M%`(N(6`$``(D-`````(7) -M=`I)BT4`B8A8`0``2(/$*%M=05Q!74%>05_#9F9FD&9F9I!F9F:09F:02(/L -M"`^V1CA(.7XH=4H\"'1E/"AT83RH=%T\B&9F9I!T53P*=%$\*G1-/*IF9F:0 -M=$4\BG1!2(N'^````$B)<`A(B09(C8?X````2(E&"$B)M_@```#K'TB+EP`! -M``!(B;<``0``2(V'^````$B)!DB)5@A(B3+H`````$B#Q`C#9F9FD&9F9I!F -M9F:09F:02(/L".@`````2(/$",-FD%-(@^Q@2(G[2(U,)%U(C50D7DB-="1? -M#[=_/$B-1"122(E$)#A(C40D5$B)1"0P2(U$)$Q(B40D*$B-1"1.2(E$)"!( -MC40D6$B)1"082(U$)%I(B40D$$B-1"1;2(E$)`A(C40D5DB)!"1,C4PD7$R- -M1"10Z``````/ME0D7P^V="1>2(U\)$CH``````^V1"1?2(T40$B-%)!(P>(% -M2(MS($B-NQ@)``"Y`0```.@`````#[94)%U(C1322,'B!4B+2&G2R`\``$B+(# -M2(MS($B-NV@*``"Y`0```.@`````#[94)%P/MT0D4$@/K]!(C1122,'B`DB+ -M(#2(MS($B- -MNS`+``"Y`0```.@`````#[=4)%A(`=)(BW,@2(V[>`\``+D!````Z``````/ -MME0D7T@!TDB+(+ -M2(MS($B-NZ@1``!!N`$```"Y"````.@`````2(MS($B-N]@1``!!N`$```"Y -M"````+H```@`Z``````/MU0D5DAITHP!``!(BW,@2('#"!(``$&X`0```+D( -M````2(G?Z`````"X`````$B#Q&!;PV9FD&:02(/L.$B)7"0(2(EL)!!,B60D -M&$R);"0@3(ET)"A,B7PD,$F)]TF)_4B+!TB)!"1,C6=(3(GGZ`````!(B<-, -MC7#(2(L\).@`````2(G%28M%4$F)75!-B68X28E&0$B)&+@!````2(7M='C& -M13CAQD4Y`<9%.A"`33L!28N'H````$B)16A(BT5P3(EX*$F-AY````!(B450 -MQD4ES$$/MD9;9HE%($F+10!(B44HQT4TD````$R)?4A(QX6@`````````$B- -M?5B^`````.@`````2(GN2(L\).@`````N`````!(BUPD"$B+;"003(MD)!A, -MBVPD($R+="0H3(M\)#!(@\0XPV9F9I!F9I!F9I!!5T%6055!5%532(/L&$B) -M_4C'1"00`````$B+1"00#[:4*.8(``"`^O\/A.H````/MLI(C02)2(T$@4B- -MA,7``0``2(E$)`@/MO)(8\9(C12`2(T4D("\U`#3(VT!2`"``!,C2PH2&/&2(T4@$B-%)!,C;S5P`$``$R) -M]^@`````2(G#28N%*`(``$F)G2@"``!,B3-(B4,(2(D82(M30$B%TG052(NU -M\`@``+\%````Z`````"`2TP"2(G:O@(```!(BWPD".@`````@+N#`````'0; -M2(GOZ`````"_`0```.@`````@+N#`````'7E08/$`44X9PX/AWO___](@T0D -M$`%(@WPD$`0/A>[^__](B>_H`````$B#Q!A;74%<05U!7D%?PV9F9I!F9I!F -M9I!F9I!!5T%6055!5%532(/L>$B)^\9'40#&1U``QD=/`,:':10```!(C9>X -M$@``N`````#&!!``2(/``4@]H`$``'7P2(V#^````$B)@_@```!(B8,``0`` -M2(V#"`$``$B)@P@!``!(B8,0`0``3(VC&`$``$R)HQ@!``!,B:,@`0``3(VK -M*`$``$R)JR@!``!,B:LP`0``2(V#.`$``$B)1"1(2(F#.`$``$B)@T`!``!( -MC8M(`0``2(E,)%!(B8M(`0``2(F+4`$``$R-LV@!``!,B;-H`0``3(FS<`$` -M`$B-LW@!``!(B70D0$B)LW@!``!(B;.``0``3(V[6`$``$R)NU@!``!,B;M@ -M`0``2(U,)&Y(C50D<$B-="1Q#[=[/$B-1"1R2(E$)#A(C40D=$B)1"0P2(U$ -M)&1(B40D*$B-1"1J2(E$)"!(C40D=DB)1"082(U$)&Q(B40D$$B-1"1M2(E$ -M)`A(C40D:$B)!"1,C4PD;TR-1"1FZ``````/MD0D<8A#1@^V1"1PB$-'#[9$ -M)&Z(@_$````/MT0D=F:)0V@/MT0D=&:)@[02```/MT0D(%2(72=!!(B`L``$B+DX`!``!(B8.``0`` -M2(M,)$!(B0A(B5`(2(D"@\4!#[9$)'%F.>AWPTB-NW@/``#H`````$B)@Y@/ -M``!(B8.@#P``#[=T)'9FB;.J#P``#[?V2(V[H`\``.@`````2(V[L`\``.@` -M````2(F#T`\``$B)@]@/```/MG0D<6:)L^(/```/M_9(C;O8#P``Z`````!( -MC;OH#P``Z`````!(B8,($```2(F#$!````^V="1N9HFS&A````^W]DB-NQ`0 -M``#H`````$B-NR`0``#H`````$B)@T`0``!(B8-($```#[9T)'!FB;-2$``` -M#[?V2(V[2!```.@`````2(V[6!```.@`````2(F#>!```$B)@X`0```/MD,^ -M9HF#BA````^V`A! -MQD`)`$B)F,`!``!!QD`.`,:`&`(```#&@.@!````QX!@`@```````$B-C!/P -M`0``2(F(\`$``$B)B/@!``!(C8P3"`(``$B)B`@"``!(B8@0`@``2(V4$R`" -M``!(B9`@`@``2(F0*`(``$'&0`H"@\$RV`$```````` -M2(G!2`.+.`D``$B-42!(B5$@2`.#.`D``$B-4"!(B5`H@\8!#[9$)'%F.?`/ -MAV____]FQX/L``````"X`````,:$&&`(``#_2(/``4@]A@```'7L@'PD<``/ -MA+T```"^``````^WQDAIP,@/``!(BY.("0``QD0"6`!(BY.("0``QD0060!( -MBY.("0``2,=$$!``````2(G!2`.+B`D``$B-41A(B5$82(G!2`.+B`D``$B- -M41A(B5$@2(G!2`.+B`D``$B-42A(B5$H2(G!2`.+B`D``$B-42A(B5$P2(N3 -MB`D``$R)1!`(2(G!2`.+B`D``$B-44A(B5%(2`.#B`D``$B-4$A(B5!0@\8! -M#[9$)'!F.?`/ATC____&@^\```"`@'PD;@`/A((```"^``````^WQDB-!,!( -MP>`%2(N38`D``&;'1`).!`!(BY-@"0``QD000@!(BY-@"0``QD001/](BY-@ -M"0``QD004/](B<%(`XM@"0``2(U1*$B)42A(B<%(`XM@"0``2(U1*$B)43!( -MBY-@"0``3(F$$(@```"#Q@$/MD0D;F8Y\'>#QH/P````@DB-L^`0``!(C;NX -M$```Z`````!(B8/8$```2(VS$!$``$B-N^@0``#H`````$B)@P@1``!(C;-` -M$0``2(V[&!$``.@`````2(F#.!$``$B-LW`1``!(C;M($0``Z`````!(B8-H -M$0``2(VSH!$``$B-NW@1``#H`````$B)@Y@1``!(C;/0$0``2(V[J!$``.@` -M````28G$2(F#R!$``$B+J]`1``"`?"1M`'120;T`````2(M\)$CH`````$R) -M8!!(B6@82(N30`$``$B)@T`!``!(BW0D2$B),$B)4`A(B0))@<0`"```2('% -M``@``$&#Q0$/MD0D;69$.>AWM$B-LP`2``!(C;O8$0``Z`````!)B<1(B8/X -M$0``2(NK`!(``$&]`````$B+?"10Z`````!,B6`02(EH&$B+DU`!``!(B8-0 -M`0``2(M,)%!(B0A(B5`(2(D"28'$```!`$B!Q0```0!!@\4!9D&#_0AUN$B- -MLS`2``!(C;L($@``Z`````!(B8,H$@``3(NC,!(``&:#?"1H`'1(2(G%0;4` -M3(G_Z`````!(B6@03(E@&$B+DV`!``!(B8-@`0``3(DX2(E0"$B)`DB!Q8P! -M``!)@<2,`0``08/%`69$.6PD:'>^2(/$>%M=05Q!74%>05_#9F9FD$%50515 -M4TB#[`A)B?U)B?1(BYZ(````#[961TB)_DB)W^@`````2(G%9D"1.$$&` -M?4,`=%FY`````/9##0%T#>M,#[9##4C3^*@!=0V#P0%!#[9%0V8YR'?H9H/Y -M`W8S28M%`$@%T`$``$B-%(T`````@>+\_P,`2`'0BP")!0````#!Z!2#\`&# -MX`'K,;D`````28M%`$@%T`$``$B-%(T`````@>+\_P,`2`'0BP")!0````#! -MZ!2#\`&#X`&$P'00#[;Q3(GOZ`````#IEP$``$B-0V!(.4-@#X09`0``2(7M -M#X00`0``#[:%@0```$G'1,18`````$B+50!(BT4(2(E""$B)$$B)ZKX&```` -M2(G?Z`````"`O8,`````=!M,B>_H`````+\!````Z`````"`O8,`````=>5( -MBT5`2(7`=$A(QT!@`````/9%3`1U"$R)[^@`````2(M50$F+M?`(``"_`0`` -M`.@`````2(M50$F+M?`(``"_!@```.@`````2,=%0`````"`:PX!2(GN3(GO -MZ`````!)BT4`BY!8`0``B14`````A=)T"DF+10")D%@!``!!QD0D0@!F08-D -M)$[O08!\)#L`="JZ``````^WPDF+1,182(7`=`J`>$K_#X5^````@\(!00^V -M1"0[9CG0=]M!@'PD3@!X#[T`````08!\)#L`=1'K2TR)YDR)[^@`````9I#K -M2@^WQ4F+7,182(7;="'V0TP"=!M(BU-`28NU\`@``+\&````Z`````"`8TS] -M9I"#Q0%!#[9$)#MF.>AWQ&9!QT0D3@(`08!D)$G]2(/$"%M=05Q!7<-F9I!F -M9I!F9I!!5T%6055!5%532(/L>$F)_TB)?"102(M'4$B)1"1P2(LH2(N%F!$` -M`$2+,$B)_DB)[^@`````08"_ZP````%V"$'&A^@````$28U'($C'1"1H```` -M`$DY1R!T*4F-7R!(B=_H`````$B)1"1H28M'($B+5"1H2(E0"$B)`DB)6@A) -MB5<@28-_0`!T4$&X____`$B#?"1H`'0*2(M,)&A$#[=!,DF+5T`/MH+,```` -MC02`#[92`@'02)@/MH@`````#[95.@^V=3E(Q\<`````N`````#H`````.M, -MO____P!(@WPD:`!T"4B+="1H#[=^,D4/MH^!````2(M4)'!(BT(@1`^V0`@/ -MMDU!#[95.@^V=3F)/"1(Q\<`````N`````#H`````$B#?"1H``^$S@,``$B+ -M3"1H1`^W:3)-:>6P!```3`.E.!$``$B+G=@0``!(B<_H`````$&+C"0D!``` -M08N4)"`$``!(BT0D:`^W<#)%BXPD+`0``$6+A"0H!```2,?'`````+@````` -MZ`````!)P>4&3`'KBT,TBWLP1(M3+$2+6RA$BV,D1(MK((M3'(E4)%R+2QB) -M3"1@BW,4B70D9$2+2Q!$BT,,BTL(BU,$BS.)1"1`B7PD.$2)5"0P1(E<)"A$ -MB60D($2);"08BT0D7(E$)!"+1"1@B40D"(M$)&2)!"1(Q\<`````N`````#H -M`````$R+9"1H28/$6$B+5"1H3(NJ@````$&+5"0$00^V="0!2,?'`````+@` -M````Z`````!!@'PD`0!T3KL`````9F9FD&9FD`^VPTB-!$!(P>`"28M4)`A( -M`<))`T40BTH(2(L2#[;S1(M("$R+`$C'QP````"X`````.@`````@\,!03A< -M)`%WOF:#?6@`#X0B`@``0;P`````3(VMH`\``$B-C?@```!(B4PD2$$/M\1( -MP>`#2`.%L`D``$B+&$B%VP^$WP$```^W0R!F03E'.`^%T`$```^WE;(2``!! -M.=9T;&9F9I"#P@$/MX6V$@``.<*X``````]#T(U"`4C!X`)(`X68$0``BP"I -M```(`'4X9B7_#V9$.>!U+D@Y7"1H=2Q(BT0D:`^W<#)(Q\<`````N`````#H -M`````$B)[^@`````Z9\!``!$.?)UF$B+5"1P@'I8``^%20$```^W0R!F/84` -M#X<[`0``#[?`@+P%8`@``/\/A"H!``!(@WPD4``/A`0!``!!#[9'2*@!#X3W -M````J`0/A.\```!(BU4`#[=#,F;!Z`4/M\"-!(4``P``B8)P`0``2(M%``^W -M2S*#X1^Z`0```$B)UDC3YHFP=`$```^W0S)(P>`#2`.%L`D``$C'```````/ -MMTLRB@%)?\'``"#X1](B=9(T^9(B?'WT2&,A;@)```/MTLRB@% -M)?\'``"#X1](T^+WTB%4A6Q(.UPD:'1%2(L32(M#"$B)0@A(B1!(@[N````` -M`'0/2(VS@````$B)[^@`````2(N%^````$B)6`A(B0-(BT0D2$B)0PA(B9WX -M````#[=S,DR)[^@`````08"O@P````'K&DB+5"1P]D(*`G0/2(G>3(G_Z``` -M``!F9F:008/$`69$.65H#X?W_?__2(-\)%``="M!#[9'2*@!="*H!'0>2(M, -M)&A(BQ%(BT$(2(E""$B)$$B)SDR)_^@`````2(/$>%M=05Q!74%>05_#D)"0 -MD)"0D)"0D)"0D)"02(M'4$R+"$&X`````$2-%!9##[:$"&`(```\_W1"#[;` -M2(T40$B-%)!(P>(%2(G020.!.`D``$`XL`X!``!U($@YN"`!``!U%T2(D`T! -M``!)BX$X"0``B(P"#`$``&:028/``4F!^(````!UI//#D$B+?U@/MH?````` -M/$]W,0^VP$B-!$!(P>`$`?*(E`?)````#[:'P````$B-!$!(P>`$B(P'R``` -M`("'P`````'SPV9F9I!F9F:09F:09F:00;C_____9H7V=$Q(B?I!N/____^_ -M`````&9F9I!F9I`/M@J-0=`\"7<;08#X_[@`````1`]$P$$/ML"-!(!$C41! -MT.L&08#X_W4,@\(%20.1.`D` -M`$@YNB`!``!U)4`XL@T!``!U'(3)=`Q(BX(8`0``28D#ZQE)BP-(B8(8`0`` -MZPU)@\`!28'X@````'6B3(G7N`````!F9I!F9I`/MI?(````@/H!=D2`^A=T -M/T`XM\D```!U-H3)=!9(F$B-!$!(P>`$28N$`M````!)B0/#2)A(C01`2,'@ -M!$F+$TF)E`+0````PV9FD&9FD(/``4B#QS"#^%!UI//#9I!!5D%505154TB# -M[!!)B?Y!B?%(B[\H`0``#[9'`L'@"`^V5P-$C00000^WP(/`!#T`"```#X_L -M````0(3V=$Q!#[:6$`$``+[@____(=8/MDM*#[97`;[@ -M____(=9!#[:&$`$``(/@#XG1@^$0"?`)R+X(````(=:#X/.)T8/A!`GP"E,B>I,B??H`````$B+1"0(2(/` -M!$B)1"0(@\,!3#G@O0````!,C6X$#[:#R````#P!=D$\%W0]1#BCR0```'4T -M00^V5P-(8\5(C01`2,'@!$F-O`;8````@/H@N"`````/1]`/MM),B>[H```` -M`&9FD&9FD(/%`4B#PS"#_5!UJ$B#Q`A;74%<05U!7D%?PV9FD&:02(/L2$B) -M7"082(EL)"!,B60D*$R);"0P3(ET)#A,B7PD0$F)_$&)UXG+3(D$)$"(="0/ -M2(M'4$R+,$R)]^@`````2(G%2(7`#X3V````3(GWZ`````!)B<5(A$F+11!(B45(BU0D"(E5 -M-$F-A"3L````2(E%4,9%,"!(QX6@`````````,9%.#S&13D"#[9$)`^(13I$ -MB?C!Z!"(13M,B?H/ML:(13Q$B'T]#[9%-HA%/@^V136(13\/MD0D"(A%0,9% -M00"^`````$B+?"00Z`````"+531)BW482(M\)!#H`````$B)[DR)]^@````` -M2(M<)!A(BVPD($R+9"0H3(ML)#!,BW0D.$R+?"1`2(/$2,-F9F:02(/L.$B) -M7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)_$B+1U!,BSA(BY$F+1"002(E%2,=%-``(``!)C87L````2(E%4,9%,"!(QX6@```` -M`````,9%.!S&13D!1(A].L9%.PC&13P`O@````!(B=_H`````(M5-$F+="08 -M2(G?Z`````!(B>Y,B??H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A, -MBWPD,$B#Q#C#D$%7059!54%455-(@^P82(D\)$B+3D@/MD$"P>`(#[91`XT\ -M$`^WQX/`!`^W5C0YT`^/6@$``$R-:0@/M\=,C70!!$R);"0(0;P`````QT0D -M%`````!-.?4/@]D```!FD`^V1"04B$0D$T$/MD4"P>`(00^V50-$C3P000^W -M]TB+?"0(2(/'!.@`````B<$\_W5>00^WQTB+7"0(2(U4`P1(B=-).=8/AL\` -M``!!B7^__\/ME0D$TR)[DB+/"3H```` -M`.NI9I!(@\086UU!7$%=05Y!7\.005=!5D%505154TB#[`A)B?Y(BTY(#[9! -M`L'@"`^V40,!T`^WP(/`!`^W5C0YT`^/#`$``$B-40@/MG$!QD0D`P"Y```` -M``^V0@(`1"0##[9"`TB-5`($@\$!0#C.<^>`?"0#``^$O@```$B-:@1!OP`` -M``!!O0````#'1"0$``````^V5?U!`=4/MD7\/`%T!#P7=3M$B>LHTT$XW79Q -M#[9$)`2#P`%$#[;@9F:09I`/MDW\#[;S1(GB3(GWZ`````"#PP%$..MT1NOD -M9F9FD$F+1EB`N,$````!=#-$B>LHTT$XW78I#[9$)`2#P`%$#[;@#[9-_`^V -M\T2)XDR)]^@`````@\,!1#CK=>9F9I!!@\Y,B??H```` -M`.F)````2(U=6,9%):Q!#[=$)#AFB44@3(EU*,>%E`````@```!,B6UX28M% -M$$B)14C'130`"```28V$).P```!(B450QD4P($C'A:``````````QD4X',9% -M.0'&13H"QD4[",9%/`"^`````$B)W^@`````BU4T28MU&$B)W^@`````2(GN -M3(GWZ`````!(BQPD2(ML)`A,BV0D$$R+;"083(MT)"!(@\0HPV9F9I!F9I!( -M@^P82(D<)$B);"0(3(ED)!!(B?-)B?Q(BVYH#[=.(&:!^84`#X>E````#[?! -M#[:T!V`(``!`@/[_#X20````9H/Y?W`!T#$B-?H```` -M`$B)WDR)Y^@`````QT50_____TB)[_]52.MS9F:0A,!U.?:#E`````AT$TB+ -M?3"+4S1(BW-(Z`````!F9I#'15``````2(M5.$B%TG0%BT4@B0)(B>__54CK -M$\=%4/____](B>__54AF9I!F9I!(@WMX`'0,2(US>$R)Y^@`````2(G>3(GG -MZ`````!FD$B+'"1(BVPD"$R+9"002(/$&,-F9F:09F:09F:09F:02(/L*$B) -M7"0(2(EL)!!,B60D&$R);"0@2(GS28G\1`^V;B0/MT8@9CV%`'`%ZPQ(BX\X"0``N&">`0!(C2P! -M183M=2!FQX7(``````"`>S@<=1&`>SH"=0M(B=Y(B>_H`````$B#>W@`=`Q( -MC7-X3(GGZ`````!(B=Y,B>?H`````$&`_09T/4B-G6`!``!)BWPD*$B)WN@` -M````QX5@`0``@(0>`$C'A7`!````````2(FM>`$``$F+?"0H2(G>Z`````!( -MBUPD"$B+;"003(MD)!A,BVPD($B#Q"C#D$%7059!54%455-(@^P(28G_08G6 -M2(M'4$B+*$&\`````$R-;@Q!#[:$+&`(```\_W12#[;`2(T40$B-%)!(B=-( -MP>,%2(G?2`.].`D``$B!Q]0```"Z"````$R)[N@`````A,!T'DB+A3@)``!$ -MB+0##@$``$B+A3@)``!,B;P#(`$``$F#Q`%)@?R`````=91(@\0(6UU!7$%= -M05Y!7\-!5T%6055!5%532(/L&$B)?"0(2(M.2`^V00+!X`@/ME$#C3P0#[?' -M@\`$#[=6-#G0#X_F````2(U9"`^WQTB-3`$$2(E,)!!)B=U(.=D/AKH```!! -MO@````!F9I!F9I!$B?(/M@N$R0^(A0```(G(@^`//`9U?/9#`\!T!O9#!Y( -MBWPD".@`````2(/%'$&#Q`%$.&,"=^(/MD,!28U"A(B=[H`````,>%8`$``("$'@!(QX5P`0```````$B)K7@! -M``!(BT502(L`2(MX*$B)WN@`````QD5*_TN-!+])C02'2(M4)!"`O,+.`0`` -M``^$DP$``$&\`````$N-!+])C02'2,'@`TR-M`(@`@``2(T<$$R-J\`!``!, -MB??H`````$B)Q4B+@R@"``!(B:LH`@``3(EU`$B)10A(B2B`?4K_#X26```` -M@'U)``^%EP```$B)[H"]Z0`````/A%$B+?"00Z`````!(BW0D"$B+ -M?"00Z`````"`?"0G`'1M#[>%R````(/``6:)A<@```!F@_@*=@YFQX7(```` -M``#IQ?W__[X*````2(GOZ`````#K.4B+1"001`^VN.4)``!+C02_28T$ATB+ -M5"002(V$PL`!``!(B40D&$B+BC@)``"X8)X!`.F?_/__D$B#Q"A;74%<05U! -M7D%?PY!(A?]T2TB%]G1&2(72=$%(A6:!_R(A9I!T<&:!_U`'=6]F9F:09F:0ZV!F@?]$(719 -M9H'_1"%FD')69BT0)V:#^`%W3&9F9I#K0&:!_X(G=#EF@?^")V:0=Q)F@?\D -M)W0I9H'_@"=FD'4FZQYF@?^`D69F9I!F9I!T$&:!_X"4=`EF@?^``%2(N$$(@```!$#[9`"&9F9I!F -M9I!!#[;!2(N/.`D``$$XV'4C#[?`2(T40$B-%)!(P>(%#[9$"DBH`70+J`1T -M![@!````ZQ=!@\,!28/""&9!.?,/A0[___^X`````%M=PV9FD$B+1U!,BQ!- -MBYK8$```10^W2FBY`````$&X`````.M##[?Q28N"L`D``$B+%/!(A=)T+8M" -M."7___\`/>$!$`!T'@^W1SAF.T(@=11(B?!(P>`&9D8Y1!@(=`YF9I!FD(/! -M`69$.P"0``3(L$T$V% -MP'0K#[:W[@```$$/MD`EB?'3X`^W^$$/M]&X__\``-/@(<(YU[@`````3`]% *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 01:07:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E3F827C; Sat, 11 Apr 2015 01:07:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6971AC9; Sat, 11 Apr 2015 01:07:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B170qC063619; Sat, 11 Apr 2015 01:07:00 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B170s1063618; Sat, 11 Apr 2015 01:07:00 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504110107.t3B170s1063618@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 11 Apr 2015 01:07:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281388 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 01:07:00 -0000 Author: delphij Date: Sat Apr 11 01:06:59 2015 New Revision: 281388 URL: https://svnweb.freebsd.org/changeset/base/281388 Log: Attempt to fix build after 281351 by defining full prototype for the functions that were moved to ip_reass.c. Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Sat Apr 11 00:45:03 2015 (r281387) +++ head/sys/netinet/ip_input.c Sat Apr 11 01:06:59 2015 (r281388) @@ -90,11 +90,11 @@ CTASSERT(sizeof(struct ip) == 20); #endif /* IP reassembly functions are defined in ip_reass.c. */ -extern void ipreass_init(); -extern void ipreass_drain(); -extern void ipreass_slowtimo(); +extern void ipreass_init(void); +extern void ipreass_drain(void); +extern void ipreass_slowtimo(void); #ifdef VIMAGE -extern void ipreass_destroy(); +extern void ipreass_destroy(void); #endif struct rwlock in_ifaddr_lock; From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 02:50:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B03B58C; Sat, 11 Apr 2015 02:50:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA8C5C10; Sat, 11 Apr 2015 02:50:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B2ojC0011570; Sat, 11 Apr 2015 02:50:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B2ojJs011569; Sat, 11 Apr 2015 02:50:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110250.t3B2ojJs011569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 02:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281391 - head/tools/regression/sockets/reconnect X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 02:50:46 -0000 Author: ngie Date: Sat Apr 11 02:50:44 2015 New Revision: 281391 URL: https://svnweb.freebsd.org/changeset/base/281391 Log: - Use static buffers for temporary file paths instead of strdup of constant strings - Don't use /tmp because it's outside ATF's prescribed sandbox - Use mkstemp instead of mktemp to eliminate warning MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/reconnect/reconnect.c Modified: head/tools/regression/sockets/reconnect/reconnect.c ============================================================================== --- head/tools/regression/sockets/reconnect/reconnect.c Sat Apr 11 02:23:59 2015 (r281390) +++ head/tools/regression/sockets/reconnect/reconnect.c Sat Apr 11 02:50:44 2015 (r281391) @@ -45,8 +45,8 @@ #include #include -static char *uds_name1 = NULL; -static char *uds_name2 = NULL; +static char uds_name1[] = "reconnect.XXXXXXXX"; +static char uds_name2[] = "reconnect.XXXXXXXX"; #define sstosa(ss) ((struct sockaddr *)(ss)) @@ -112,20 +112,14 @@ main() atexit(cleanup); - uds_name1 = strdup("/tmp/reconnect.XXXXXX"); - if (uds_name1 == NULL) - err(1, "can't allocate memory"); - uds_name1 = mktemp(uds_name1); - if (uds_name1 == NULL) - err(1, "mktemp(3) failed"); + if (mkstemp(uds_name1) == -1) + err(1, "mkstemp"); + unlink(uds_name1); s_sock1 = create_uds_server(uds_name1); - uds_name2 = strdup("/tmp/reconnect.XXXXXX"); - if (uds_name2 == NULL) - err(1, "can't allocate memory"); - uds_name2 = mktemp(uds_name2); - if (uds_name2 == NULL) - err(1, "mktemp(3) failed"); + if (mkstemp(uds_name2) == -1) + err(1, "mkstemp"); + unlink(uds_name2); s_sock2 = create_uds_server(uds_name2); c_sock = socket(PF_LOCAL, SOCK_DGRAM, 0); From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 02:59:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 084C56F2; Sat, 11 Apr 2015 02:59:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7DC0CC7; Sat, 11 Apr 2015 02:59:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B2xkTB015486; Sat, 11 Apr 2015 02:59:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B2xk7r015484; Sat, 11 Apr 2015 02:59:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110259.t3B2xk7r015484@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 02:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281392 - head/tools/regression/sockets/rtsocket X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 02:59:47 -0000 Author: ngie Date: Sat Apr 11 02:59:45 2015 New Revision: 281392 URL: https://svnweb.freebsd.org/changeset/base/281392 Log: - Garbage collect argc/argv (-Wunused) - Bump WARNS to 6 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/rtsocket/Makefile head/tools/regression/sockets/rtsocket/rtsocket.c Modified: head/tools/regression/sockets/rtsocket/Makefile ============================================================================== --- head/tools/regression/sockets/rtsocket/Makefile Sat Apr 11 02:50:44 2015 (r281391) +++ head/tools/regression/sockets/rtsocket/Makefile Sat Apr 11 02:59:45 2015 (r281392) @@ -2,6 +2,6 @@ PROG= rtsocket MAN= -WARNS?= 3 +WARNS?= 6 .include Modified: head/tools/regression/sockets/rtsocket/rtsocket.c ============================================================================== --- head/tools/regression/sockets/rtsocket/rtsocket.c Sat Apr 11 02:50:44 2015 (r281391) +++ head/tools/regression/sockets/rtsocket/rtsocket.c Sat Apr 11 02:59:45 2015 (r281392) @@ -41,7 +41,7 @@ #include int -main(int argc, char *argv[]) +main(void) { int sock, socks[2]; From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 03:13:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DC53BE2; Sat, 11 Apr 2015 03:13:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F723F71; Sat, 11 Apr 2015 03:13:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B3DAdV025119; Sat, 11 Apr 2015 03:13:10 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B3D9IE025117; Sat, 11 Apr 2015 03:13:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110313.t3B3D9IE025117@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 03:13:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281393 - head/tools/regression/sockets/sblock X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 03:13:10 -0000 Author: ngie Date: Sat Apr 11 03:13:09 2015 New Revision: 281393 URL: https://svnweb.freebsd.org/changeset/base/281393 Log: Fix warnings and bump WARNS to 6 - Garbage collect argc/argv (-Wunused) - sleep(3) will always return an unsigned int; don't check for return codes <0 (-Wsign-compare) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/sblock/Makefile head/tools/regression/sockets/sblock/sblock.c Modified: head/tools/regression/sockets/sblock/Makefile ============================================================================== --- head/tools/regression/sockets/sblock/Makefile Sat Apr 11 02:59:45 2015 (r281392) +++ head/tools/regression/sockets/sblock/Makefile Sat Apr 11 03:13:09 2015 (r281393) @@ -4,6 +4,6 @@ PROG= sblock MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: head/tools/regression/sockets/sblock/sblock.c ============================================================================== --- head/tools/regression/sockets/sblock/sblock.c Sat Apr 11 02:59:45 2015 (r281392) +++ head/tools/regression/sockets/sblock/sblock.c Sat Apr 11 03:13:09 2015 (r281393) @@ -54,7 +54,7 @@ static int interrupted; static void -signal_handler(int signum) +signal_handler(int signum __unused) { interrupted++; @@ -95,7 +95,7 @@ locking_recver(int fd) ssize_t len; char ch; - if (sleep(1) < 0) + if (sleep(1) != 0) err(-1, "FAIL: locking_recver: sleep"); len = recv(fd, &ch, sizeof(ch), 0); if (len < 0 && errno != EINTR) @@ -116,7 +116,7 @@ signaller(pid_t locking_recver_pid, int ssize_t len; char ch; - if (sleep(2) < 0) { + if (sleep(2) != 0) { warn("signaller sleep(2)"); return; } @@ -124,7 +124,7 @@ signaller(pid_t locking_recver_pid, int warn("signaller kill(%d)", locking_recver_pid); return; } - if (sleep(1) < 0) { + if (sleep(1) != 0) { warn("signaller sleep(1)"); return; } @@ -141,14 +141,14 @@ signaller(pid_t locking_recver_pid, int warn("signaller close"); return; } - if (sleep(1) < 0) { + if (sleep(1) != 0) { warn("signaller sleep(1)"); return; } } int -main(int argc, char *argv[]) +main(void) { int error, fds[2], recver_fd, sender_fd; pid_t blocking_recver_pid; From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 03:18:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2750D7B; Sat, 11 Apr 2015 03:18:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE43BF8C; Sat, 11 Apr 2015 03:18:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B3IFhO025785; Sat, 11 Apr 2015 03:18:15 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B3IFme025784; Sat, 11 Apr 2015 03:18:15 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110318.t3B3IFme025784@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 03:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281394 - head/tools/regression/sockets/sendfile X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 03:18:16 -0000 Author: ngie Date: Sat Apr 11 03:18:14 2015 New Revision: 281394 URL: https://svnweb.freebsd.org/changeset/base/281394 Log: - Don't use /tmp because it's outside ATF's prescribed sandbox - Replace a hardcoded PATH_MAX value with sizeof(path) - Use path like an array, not a pointer, and always try to unlink it in cleanup MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/sendfile/sendfile.c Modified: head/tools/regression/sockets/sendfile/sendfile.c ============================================================================== --- head/tools/regression/sockets/sendfile/sendfile.c Sat Apr 11 03:13:09 2015 (r281393) +++ head/tools/regression/sockets/sendfile/sendfile.c Sat Apr 11 03:18:14 2015 (r281394) @@ -452,8 +452,8 @@ run_parent(void) static void cleanup(void) { - if (*path != '\0') - unlink(path); + + unlink(path); } int @@ -461,12 +461,12 @@ main(int argc, char *argv[]) { int pagesize; - *path = '\0'; + path[0] = '\0'; pagesize = getpagesize(); if (argc == 1) { - snprintf(path, PATH_MAX, "/tmp/sendfile.XXXXXXXXXXXX"); + snprintf(path, sizeof(path), "sendfile.XXXXXXXXXXXX"); file_fd = mkstemp(path); if (file_fd == -1) FAIL_ERR("mkstemp"); From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 03:19:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41B26F53; Sat, 11 Apr 2015 03:19:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D393F9A; Sat, 11 Apr 2015 03:19:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B3JoPM025988; Sat, 11 Apr 2015 03:19:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B3JnQv025986; Sat, 11 Apr 2015 03:19:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110319.t3B3JnQv025986@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 03:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281395 - head/tools/regression/sockets/shutdown X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 03:19:50 -0000 Author: ngie Date: Sat Apr 11 03:19:48 2015 New Revision: 281395 URL: https://svnweb.freebsd.org/changeset/base/281395 Log: Fix a -Wuninitialized warning by setting the socket to -1 and bump WARNS to 6 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/shutdown/Makefile head/tools/regression/sockets/shutdown/shutdown.c Modified: head/tools/regression/sockets/shutdown/Makefile ============================================================================== --- head/tools/regression/sockets/shutdown/Makefile Sat Apr 11 03:18:14 2015 (r281394) +++ head/tools/regression/sockets/shutdown/Makefile Sat Apr 11 03:19:48 2015 (r281395) @@ -4,6 +4,6 @@ PROG= shutdown MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: head/tools/regression/sockets/shutdown/shutdown.c ============================================================================== --- head/tools/regression/sockets/shutdown/shutdown.c Sat Apr 11 03:18:14 2015 (r281394) +++ head/tools/regression/sockets/shutdown/shutdown.c Sat Apr 11 03:19:48 2015 (r281395) @@ -45,6 +45,8 @@ main(void) int listen_sock, connect_sock; u_short port; + listen_sock = -1; + /* Shutdown(2) on an invalid file descriptor has to return EBADF. */ if ((shutdown(listen_sock, SHUT_RDWR) != -1) && (errno != EBADF)) errx(-1, "shutdown() for invalid file descriptor does not " From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 03:23:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AB37139; Sat, 11 Apr 2015 03:23:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 022DFAB; Sat, 11 Apr 2015 03:23:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B3Nk4w029986; Sat, 11 Apr 2015 03:23:46 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B3Ngep029970; Sat, 11 Apr 2015 03:23:42 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504110323.t3B3Ngep029970@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 11 Apr 2015 03:23:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281396 - in head/sys: contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/components/debugger contrib/dev/acpica/components/disassembler contrib... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 03:23:47 -0000 Author: jkim Date: Sat Apr 11 03:23:41 2015 New Revision: 281396 URL: https://svnweb.freebsd.org/changeset/base/281396 Log: Merge ACPICA 20150410. Modified: head/sys/contrib/dev/acpica/acpica_prep.sh head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/adfile.c head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslfold.c head/sys/contrib/dev/acpica/compiler/asllisting.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/aslmapenter.c head/sys/contrib/dev/acpica/compiler/asloptions.c head/sys/contrib/dev/acpica/compiler/aslrules.y head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/asltree.c head/sys/contrib/dev/acpica/compiler/asltypes.y head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/aslwalks.c head/sys/contrib/dev/acpica/compiler/dtcompile.c head/sys/contrib/dev/acpica/compiler/dtcompiler.h head/sys/contrib/dev/acpica/compiler/dtio.c head/sys/contrib/dev/acpica/compiler/dttable.c head/sys/contrib/dev/acpica/compiler/dttemplate.h head/sys/contrib/dev/acpica/compiler/dtutils.c head/sys/contrib/dev/acpica/components/debugger/dbmethod.c head/sys/contrib/dev/acpica/components/debugger/dbxface.c head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c head/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c head/sys/contrib/dev/acpica/components/events/evregion.c head/sys/contrib/dev/acpica/components/events/evxfevnt.c head/sys/contrib/dev/acpica/components/executer/exdump.c head/sys/contrib/dev/acpica/components/executer/exfldio.c head/sys/contrib/dev/acpica/components/executer/exoparg3.c head/sys/contrib/dev/acpica/components/executer/exregion.c head/sys/contrib/dev/acpica/components/hardware/hwgpe.c head/sys/contrib/dev/acpica/components/hardware/hwvalid.c head/sys/contrib/dev/acpica/components/namespace/nsdump.c head/sys/contrib/dev/acpica/components/parser/psopcode.c head/sys/contrib/dev/acpica/components/parser/psopinfo.c head/sys/contrib/dev/acpica/components/resources/rsaddr.c head/sys/contrib/dev/acpica/components/resources/rsdump.c head/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c head/sys/contrib/dev/acpica/components/resources/rsxface.c head/sys/contrib/dev/acpica/components/tables/tbdata.c head/sys/contrib/dev/acpica/components/tables/tbinstal.c head/sys/contrib/dev/acpica/components/tables/tbprint.c head/sys/contrib/dev/acpica/components/tables/tbxfroot.c head/sys/contrib/dev/acpica/components/utilities/utaddress.c head/sys/contrib/dev/acpica/components/utilities/utbuffer.c head/sys/contrib/dev/acpica/components/utilities/utglobal.c head/sys/contrib/dev/acpica/components/utilities/utmisc.c head/sys/contrib/dev/acpica/components/utilities/utosi.c head/sys/contrib/dev/acpica/components/utilities/utprint.c head/sys/contrib/dev/acpica/components/utilities/utstate.c head/sys/contrib/dev/acpica/components/utilities/utuuid.c head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acopcode.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acresrc.h head/sys/contrib/dev/acpica/include/acrestyp.h head/sys/contrib/dev/acpica/include/acstruct.h head/sys/contrib/dev/acpica/include/actables.h head/sys/contrib/dev/acpica/include/actbl2.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/amlcode.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/dev/acpica/acpi_resource.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- head/sys/contrib/dev/acpica/acpica_prep.sh Sat Apr 11 03:19:48 2015 (r281395) +++ head/sys/contrib/dev/acpica/acpica_prep.sh Sat Apr 11 03:23:41 2015 (r281396) @@ -18,11 +18,12 @@ fulldirs="common compiler components inc # files to remove stripdirs="generate libraries tests tools" -stripfiles="Makefile README accygwin.h acefi.h achaiku.h acintel.h \ - aclinux.h aclinuxex.h acmacosx.h acmsvc.h acnetbsd.h acos2.h \ - acwin.h acwin64.h new_table.txt osefitbl.c osefixf.c \ - osfreebsdtbl.c oslinuxtbl.c osunixdir.c osunixmap.c oswindir.c \ - oswintbl.c oswinxf.c readme.txt utclib.c" +stripfiles="Makefile README accygwin.h acdragonfly.h acdragonflyex.h \ + acefi.h achaiku.h acintel.h aclinux.h aclinuxex.h acmacosx.h \ + acmsvc.h acnetbsd.h acos2.h acwin.h acwin64.h new_table.txt \ + osbsdtbl.c osefitbl.c osefixf.c osfreebsdtbl.c oslinuxtbl.c \ + osunixdir.c osunixmap.c oswindir.c oswintbl.c oswinxf.c \ + readme.txt utclib.c" # include files to canonify src_headers="acapps.h acbuffer.h accommon.h acconfig.h acdebug.h \ Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Sat Apr 11 03:19:48 2015 (r281395) +++ head/sys/contrib/dev/acpica/changes.txt Sat Apr 11 03:23:41 2015 (r281396) @@ -1,7 +1,84 @@ ---------------------------------------- -04 February 2015. Summary of changes for version 20150204: +10 April 2015. Summary of changes for version 20150410: -This release is available at https://acpica.org/downloads +Reverted a change introduced in version 20150408 that caused +a regression in the disassembler where incorrect operator +symbols could be emitted. + +---------------------------------------- +08 April 2015. Summary of changes for version 20150408: + + +1) ACPICA kernel-resident subsystem: + +Permanently set the return value for the _REV predefined name. It now +returns 2 (was 5). This matches other ACPI implementations. _REV will be +deprecated in the future, and is now defined to be 1 for ACPI 1.0, and 2 +for ACPI 2.0 and later. It should never be used to differentiate or +identify operating systems. + +Added the "Windows 2015" string to the _OSI support. ACPICA will now +return TRUE to a query with this string. + +Fixed several issues with the local version of the printf function. + +Added the C99 compiler option (-std=c99) to the Unix makefiles. + + Current Release: + Non-Debug Version: 99.9K Code, 27.4K Data, 127.3K Total + Debug Version: 195.2K Code, 80.7K Data, 275.9K Total + Previous Release: + Non-Debug Version: 98.8K Code, 27.3K Data, 126.1K Total + Debug Version: 192.1K Code, 79.8K Data, 271.9K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented an enhancement to the constant folding feature to +transform the parse tree to a simple Store operation whenever possible: + Add (2, 3, X) ==> is converted to: Store (5, X) + X = 2 + 3 ==> is converted to: Store (5, X) + +Updated support for the SLIC table (Software Licensing Description Table) +in both the Data Table compiler and the disassembler. The SLIC table +support now conforms to "Microsoft Software Licensing Tables (SLIC and +MSDM). November 29, 2011. Copyright 2011 Microsoft". Note: Any SLIC data +following the ACPI header is now defined to be "Proprietary Data", and as +such, can only be entered or displayed as a hex data block. + +Implemented full support for the MSDM table as described in the document +above. Note: The format of MSDM is similar to SLIC. Any MSDM data +following the ACPI header is defined to be "Proprietary Data", and can +only be entered or displayed as a hex data block. + +Implemented the -Pn option for the iASL Table Compiler (was only +implemented for the ASL compiler). This option disables the iASL +preprocessor. + +Disassembler: For disassembly of Data Tables, added a comment field +around the Ascii equivalent data that is emitted as part of the "Raw +Table Data" block. This prevents the iASL Preprocessor from possible +confusion if/when the table is compiled. + +Disassembler: Added an option (-df) to force the disassembler to assume +that the table being disassembled contains valid AML. This feature is +useful for disassembling AML files that contain ACPI signatures other +than DSDT or SSDT (such as OEMx or other signatures). + +Changes for the EFI version of the tools: +1) Fixed a build error/issue +2) Fixed a cast warning + +iASL: Fixed a path issue with the __FILE__ operator by making the +directory prefix optional within the internal SplitInputFilename +function. + +Debugger: Removed some unused global variables. + +Tests: Updated the makefile for proper generation of the AAPITS suite. + +---------------------------------------- +04 February 2015. Summary of changes for version 20150204: ACPICA kernel-resident subsystem: @@ -14,24 +91,26 @@ Events: Introduce ACPI_GPE_DISPATCH_RAW_ A raw gpe handling mechanism was created to allow better handling of GPE storms that aren't easily managed by the normal handler. The raw handler allows disabling/renabling of the the GPE so that interrupt storms can be -avoided in cases where events cannot be timely serviced. In this scenario, -handlers should use the AcpiSetGpe() API to disable/enable the GPE. This API -will leave the reference counts undisturbed, thereby preventing unintentional -clearing of the GPE when the intent in only to temporarily disable it. Raw -handlers allow enabling and disabling of a GPE by removing GPE register -locking. As such, raw handlers much provide their own locks while using -GPE API's to protect access to GPE data structures. +avoided in cases where events cannot be timely serviced. In this +scenario, handlers should use the AcpiSetGpe() API to disable/enable the +GPE. This API will leave the reference counts undisturbed, thereby +preventing unintentional clearing of the GPE when the intent in only to +temporarily disable it. Raw handlers allow enabling and disabling of a +GPE by removing GPE register locking. As such, raw handlers much provide +their own locks while using GPE API's to protect access to GPE data +structures. Lv Zheng Events: Always modify GPE registers under the GPE lock. Applies GPE lock around AcpiFinishGpe() to protect access to GPE register values. Reported as bug by joe.liu@apple.com. -Unix makefiles: Separate option to disable optimizations and _FORTIFY_SOURCE. -This change removes the _FORTIFY_SOURCE flag from the NOOPT disable option and -creates a separate flag (NOFORTIFY) for this purpose. Some toolchains may -define _FORTIFY_SOURCE which leads redefined errors when building ACPICA. This -allows disabling the option without also having to disable optimazations. +Unix makefiles: Separate option to disable optimizations and +_FORTIFY_SOURCE. This change removes the _FORTIFY_SOURCE flag from the +NOOPT disable option and creates a separate flag (NOFORTIFY) for this +purpose. Some toolchains may define _FORTIFY_SOURCE which leads redefined +errors when building ACPICA. This allows disabling the option without +also having to disable optimazations. David Box Current Release: Modified: head/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adfile.c Sat Apr 11 03:19:48 2015 (r281395) +++ head/sys/contrib/dev/acpica/common/adfile.c Sat Apr 11 03:23:41 2015 (r281396) @@ -295,7 +295,10 @@ FlSplitInputPathname ( char *Filename; - *OutDirectoryPath = NULL; + if (OutDirectoryPath) + { + *OutDirectoryPath = NULL; + } if (!InputPath) { @@ -340,7 +343,10 @@ FlSplitInputPathname ( return (AE_NO_MEMORY); } - *OutDirectoryPath = DirectoryPath; + if (OutDirectoryPath) + { + *OutDirectoryPath = DirectoryPath; + } if (OutFilename) { Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Sat Apr 11 03:19:48 2015 (r281395) +++ head/sys/contrib/dev/acpica/common/adisasm.c Sat Apr 11 03:23:41 2015 (r281396) @@ -64,6 +64,11 @@ AdCreateTableHeader ( char *Filename, ACPI_TABLE_HEADER *Table); +static ACPI_STATUS +AdStoreTable ( + ACPI_TABLE_HEADER *Table, + UINT32 *TableIndex); + /* Stubs for ASL compiler */ #ifndef ACPI_ASL_COMPILER @@ -298,7 +303,7 @@ AdAmlDisassemble ( return (Status); } - if (!AcpiGbl_DbOpt_disasm) + if (!AcpiGbl_DbOpt_Disasm) { return (AE_OK); } @@ -337,7 +342,6 @@ AdAmlDisassemble ( { fprintf (stderr, "Could not open output file %s\n", DisasmFilename); Status = AE_ERROR; - ACPI_FREE (DisasmFilename); goto Cleanup; } @@ -346,9 +350,11 @@ AdAmlDisassemble ( *OutFilename = DisasmFilename; - if (!AcpiUtIsAmlTable (Table)) + /* ForceAmlDisassembly means to assume the table contains valid AML */ + + if (!AcpiGbl_ForceAmlDisassembly && !AcpiUtIsAmlTable (Table)) { - AdDisassemblerHeader (Filename); + AdDisassemblerHeader (Filename, ACPI_IS_DATA_TABLE); AcpiOsPrintf (" * ACPI Data Table [%4.4s]\n *\n", Table->Signature); AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength] " @@ -486,7 +492,7 @@ AdAmlDisassemble ( /* Optional displays */ - if (AcpiGbl_DbOpt_disasm) + if (AcpiGbl_DbOpt_Disasm) { /* This is the real disassembly */ @@ -515,7 +521,7 @@ AdAmlDisassemble ( Cleanup: - if (Table && !AcpiUtIsAmlTable (Table)) + if (Table && !AcpiGbl_ForceAmlDisassembly &&!AcpiUtIsAmlTable (Table)) { ACPI_FREE (Table); } @@ -543,6 +549,7 @@ Cleanup: * FUNCTION: AdDisassemblerHeader * * PARAMETERS: Filename - Input file for the table + * TableType - Either AML or DataTable * * RETURN: None * @@ -553,7 +560,8 @@ Cleanup: void AdDisassemblerHeader ( - char *Filename) + char *Filename, + UINT8 TableType) { time_t Timer; @@ -565,17 +573,20 @@ AdDisassemblerHeader ( AcpiOsPrintf ("/*\n"); AcpiOsPrintf (ACPI_COMMON_HEADER (AML_DISASSEMBLER_NAME, " * ")); - if (AcpiGbl_CstyleDisassembly) + if (TableType == ACPI_IS_AML_TABLE) { - AcpiOsPrintf ( - " * Disassembling to symbolic ASL+ operators\n" - " *\n"); - } - else - { - AcpiOsPrintf ( - " * Disassembling to non-symbolic legacy ASL operators\n" - " *\n"); + if (AcpiGbl_CstyleDisassembly) + { + AcpiOsPrintf ( + " * Disassembling to symbolic ASL+ operators\n" + " *\n"); + } + else + { + AcpiOsPrintf ( + " * Disassembling to non-symbolic legacy ASL operators\n" + " *\n"); + } } AcpiOsPrintf (" * Disassembly of %s, %s", Filename, ctime (&Timer)); @@ -609,7 +620,7 @@ AdCreateTableHeader ( /* * Print file header and dump original table header */ - AdDisassemblerHeader (Filename); + AdDisassemblerHeader (Filename, ACPI_IS_AML_TABLE); AcpiOsPrintf (" * Original Table Header:\n"); AcpiOsPrintf (" * Signature \"%4.4s\"\n", Table->Signature); @@ -717,7 +728,7 @@ AdDisplayTables ( return (AE_NOT_EXIST); } - if (!AcpiGbl_DbOpt_verbose) + if (!AcpiGbl_DbOpt_Verbose) { AdCreateTableHeader (Filename, Table); } @@ -725,7 +736,7 @@ AdDisplayTables ( AcpiDmDisassemble (NULL, AcpiGbl_ParseOpRoot, ACPI_UINT32_MAX); MpEmitMappingInfo (); - if (AcpiGbl_DbOpt_verbose) + if (AcpiGbl_DbOpt_Verbose) { AcpiOsPrintf ("\n\nTable Header:\n"); AcpiUtDebugDumpBuffer ((UINT8 *) Table, sizeof (ACPI_TABLE_HEADER), @@ -740,6 +751,43 @@ AdDisplayTables ( } +/******************************************************************************* + * + * FUNCTION: AdStoreTable + * + * PARAMETERS: Table - Table header + * TableIndex - Where the table index is returned + * + * RETURN: Status and table index. + * + * DESCRIPTION: Add an ACPI table to the global table list + * + ******************************************************************************/ + +static ACPI_STATUS +AdStoreTable ( + ACPI_TABLE_HEADER *Table, + UINT32 *TableIndex) +{ + ACPI_STATUS Status; + ACPI_TABLE_DESC *TableDesc; + + + Status = AcpiTbGetNextTableDescriptor (TableIndex, &TableDesc); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + /* Initialize added table */ + + AcpiTbInitTableDescriptor (TableDesc, ACPI_PTR_TO_PHYSADDR (Table), + ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, Table); + AcpiTbValidateTable (TableDesc); + return (AE_OK); +} + + /****************************************************************************** * * FUNCTION: AdGetLocalTables @@ -777,8 +825,7 @@ AdGetLocalTables ( /* Store DSDT in the Table Manager */ - Status = AcpiTbStoreTable (0, NewTable, NewTable->Length, - 0, &TableIndex); + Status = AdStoreTable (NewTable, &TableIndex); if (ACPI_FAILURE (Status)) { fprintf (stderr, "Could not store DSDT\n"); @@ -871,9 +918,7 @@ AdParseTable ( if (LoadTable) { - Status = AcpiTbStoreTable ((ACPI_PHYSICAL_ADDRESS) Table, Table, - Table->Length, ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, - &TableIndex); + Status = AdStoreTable (Table, &TableIndex); if (ACPI_FAILURE (Status)) { return (Status); Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Sat Apr 11 03:19:48 2015 (r281395) +++ head/sys/contrib/dev/acpica/common/dmtable.c Sat Apr 11 03:23:41 2015 (r281396) @@ -241,13 +241,6 @@ static const char *AcpiDmPmttS "Unknown SubTable Type" /* Reserved */ }; -static const char *AcpiDmSlicSubnames[] = -{ - "Public Key Structure", - "Windows Marker Structure", - "Unknown SubTable Type" /* Reserved */ -}; - static const char *AcpiDmSratSubnames[] = { "Processor Local APIC/SAPIC Affinity", @@ -339,6 +332,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi, "Management Controller Host Interface table"}, {ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst, "Memory Power State Table"}, {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct, "Maximum System Characteristics Table"}, + {ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm, "Microsoft Data Management table"}, {ACPI_SIG_MTMR, NULL, AcpiDmDumpMtmr, DtCompileMtmr, TemplateMtmr, "MID Timer Table"}, {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct, "Platform Communications Channel Table"}, {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt, "Platform Memory Topology Table"}, @@ -515,10 +509,20 @@ AcpiDmDumpDataTable ( } else { - AcpiOsPrintf ("\n**** Unknown ACPI table type [%4.4s]\n\n", + AcpiOsPrintf ("\n**** Unknown ACPI table signature [%4.4s]\n\n", Table->Signature); - fprintf (stderr, "Unknown ACPI table signature [%4.4s], decoding header only\n", + + fprintf (stderr, "Unknown ACPI table signature [%4.4s], ", Table->Signature); + + if (!AcpiGbl_ForceAmlDisassembly) + { + fprintf (stderr, "decoding ACPI table header only\n"); + } + else + { + fprintf (stderr, "assuming table contains valid AML code\n"); + } } } else if (TableData->TableHandler) @@ -686,6 +690,7 @@ AcpiDmDumpTable ( UINT32 ByteLength; UINT8 Temp8; UINT16 Temp16; + UINT32 Temp32; UINT64 Value; ACPI_DMTABLE_DATA *TableData; const char *Name; @@ -715,7 +720,8 @@ AcpiDmDumpTable ( if ((CurrentOffset >= TableLength) || (SubtableLength && (Info->Offset >= SubtableLength))) { - AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n"); + AcpiOsPrintf ( + "**** ACPI table terminates in the middle of a data structure! (dump table)\n"); return (AE_BAD_DATA); } @@ -760,7 +766,6 @@ AcpiDmDumpTable ( case ACPI_DMT_UINT32: case ACPI_DMT_NAME4: case ACPI_DMT_SIG: - case ACPI_DMT_SLIC: case ACPI_DMT_LPIT: ByteLength = 4; @@ -805,6 +810,12 @@ AcpiDmDumpTable ( ByteLength = 128; break; + case ACPI_DMT_BUFFER: + case ACPI_DMT_RAW_BUFFER: + + ByteLength = SubtableLength; + break; + case ACPI_DMT_STRING: ByteLength = ACPI_STRLEN (ACPI_CAST_PTR (char, Target)) + 1; @@ -838,7 +849,8 @@ AcpiDmDumpTable ( if (CurrentOffset + ByteLength > TableLength) { - AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n"); + AcpiOsPrintf ( + "**** ACPI table terminates in the middle of a data structure!\n"); return (AE_BAD_DATA); } @@ -1005,8 +1017,9 @@ AcpiDmDumpTable ( AcpiOsPrintf ("%2.2X", *Target); Temp8 = AcpiDmGenerateChecksum (Table, - ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length, - ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum); + ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length, + ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum); + if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum) { AcpiOsPrintf ( @@ -1032,7 +1045,7 @@ AcpiDmDumpTable ( Temp8 = ACPI_GAS_WIDTH_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, Temp8, AcpiDmGasAccessWidth[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGasAccessWidth[Temp8]); break; case ACPI_DMT_GAS: @@ -1069,7 +1082,8 @@ AcpiDmDumpTable ( Temp16 = ACPI_DMAR_TYPE_RESERVED; } - AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), AcpiDmDmarSubnames[Temp16]); + AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), + AcpiDmDmarSubnames[Temp16]); break; case ACPI_DMT_DMAR_SCOPE: @@ -1082,7 +1096,8 @@ AcpiDmDumpTable ( Temp8 = ACPI_DMAR_SCOPE_TYPE_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmDmarScope[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmDmarScope[Temp8]); break; case ACPI_DMT_EINJACT: @@ -1095,7 +1110,8 @@ AcpiDmDumpTable ( Temp8 = ACPI_EINJ_ACTION_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmEinjActions[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmEinjActions[Temp8]); break; case ACPI_DMT_EINJINST: @@ -1108,7 +1124,8 @@ AcpiDmDumpTable ( Temp8 = ACPI_EINJ_INSTRUCTION_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmEinjInstructions[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmEinjInstructions[Temp8]); break; case ACPI_DMT_ERSTACT: @@ -1121,7 +1138,8 @@ AcpiDmDumpTable ( Temp8 = ACPI_ERST_ACTION_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmErstActions[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmErstActions[Temp8]); break; case ACPI_DMT_ERSTINST: @@ -1134,7 +1152,8 @@ AcpiDmDumpTable ( Temp8 = ACPI_ERST_INSTRUCTION_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmErstInstructions[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmErstInstructions[Temp8]); break; case ACPI_DMT_GTDT: @@ -1147,7 +1166,8 @@ AcpiDmDumpTable ( Temp8 = ACPI_GTDT_TYPE_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGtdtSubnames[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmGtdtSubnames[Temp8]); break; case ACPI_DMT_HEST: @@ -1160,12 +1180,15 @@ AcpiDmDumpTable ( Temp16 = ACPI_HEST_TYPE_RESERVED; } - AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), AcpiDmHestSubnames[Temp16]); + AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), + AcpiDmHestSubnames[Temp16]); break; case ACPI_DMT_HESTNTFY: - AcpiOsPrintf (STRING_FORMAT, "Hardware Error Notification Structure"); + AcpiOsPrintf (STRING_FORMAT, + "Hardware Error Notification Structure"); + AcpiDmDumpTable (TableLength, CurrentOffset, Target, sizeof (ACPI_HEST_NOTIFY), AcpiDmTableInfoHestNotify); AcpiOsPrintf ("\n"); @@ -1182,7 +1205,8 @@ AcpiDmDumpTable ( Temp8 = ACPI_HEST_NOTIFY_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmHestNotifySubnames[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmHestNotifySubnames[Temp8]); break; case ACPI_DMT_MADT: @@ -1195,7 +1219,8 @@ AcpiDmDumpTable ( Temp8 = ACPI_MADT_TYPE_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmMadtSubnames[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmMadtSubnames[Temp8]); break; case ACPI_DMT_PCCT: @@ -1208,7 +1233,8 @@ AcpiDmDumpTable ( Temp8 = ACPI_PCCT_TYPE_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmPcctSubnames[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmPcctSubnames[Temp8]); break; case ACPI_DMT_PMTT: @@ -1221,20 +1247,20 @@ AcpiDmDumpTable ( Temp8 = ACPI_PMTT_TYPE_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmPmttSubnames[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmPmttSubnames[Temp8]); break; - case ACPI_DMT_SLIC: - - /* SLIC subtable types */ - - Temp8 = *Target; - if (Temp8 > ACPI_SLIC_TYPE_RESERVED) - { - Temp8 = ACPI_SLIC_TYPE_RESERVED; - } + case ACPI_DMT_RAW_BUFFER: + /* + * Currently only used for SLIC table + */ + AcpiOsPrintf ("/* Proprietary data structure */ "); - AcpiOsPrintf (UINT32_FORMAT, *Target, AcpiDmSlicSubnames[Temp8]); + AcpiDmDumpBuffer (Table, sizeof (ACPI_TABLE_HEADER), + ByteLength, sizeof (ACPI_TABLE_HEADER), + "Licensing Data", TRUE); + AcpiOsPrintf ("\n"); break; case ACPI_DMT_SRAT: @@ -1247,7 +1273,8 @@ AcpiDmDumpTable ( Temp8 = ACPI_SRAT_TYPE_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmSratSubnames[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmSratSubnames[Temp8]); break; case ACPI_DMT_FADTPM: @@ -1260,7 +1287,8 @@ AcpiDmDumpTable ( Temp8 = ACPI_FADT_PM_RESERVED; } - AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmFadtProfiles[Temp8]); + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmFadtProfiles[Temp8]); break; case ACPI_DMT_IVRS: @@ -1295,26 +1323,14 @@ AcpiDmDumpTable ( /* LPIT subtable types */ - Temp8 = *Target; - switch (Temp8) + Temp32 = ACPI_GET32 (Target); + if (Temp32 > ACPI_LPIT_TYPE_RESERVED) { - case ACPI_LPIT_TYPE_NATIVE_CSTATE: - - Name = AcpiDmLpitSubnames[0]; - break; - - case ACPI_LPIT_TYPE_SIMPLE_IO: - - Name = AcpiDmLpitSubnames[1]; - break; - - default: - - Name = AcpiDmLpitSubnames[2]; - break; + Temp32 = ACPI_LPIT_TYPE_RESERVED; } - AcpiOsPrintf (UINT32_FORMAT, *Target, Name); + AcpiOsPrintf (UINT32_FORMAT, ACPI_GET32 (Target), + AcpiDmLpitSubnames[Temp32]); break; case ACPI_DMT_EXIT: @@ -1331,8 +1347,10 @@ AcpiDmDumpTable ( if (TableOffset && !SubtableLength) { - /* If this table is not the main table, subtable must have valid length */ - + /* + * If this table is not the main table, the subtable must have a + * valid length + */ AcpiOsPrintf ("Invalid zero length subtable\n"); return (AE_BAD_DATA); } Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump.c Sat Apr 11 03:19:48 2015 (r281395) +++ head/sys/contrib/dev/acpica/common/dmtbdump.c Sat Apr 11 03:23:41 2015 (r281396) @@ -59,14 +59,6 @@ AcpiDmValidateFadtLength ( UINT32 Revision, UINT32 Length); -static void -AcpiDmDumpBuffer ( - void *Table, - UINT32 BufferOffset, - UINT32 Length, - UINT32 AbsoluteOffset, - char *Header); - /******************************************************************************* * @@ -78,6 +70,7 @@ AcpiDmDumpBuffer ( * AbsoluteOffset - Offset of buffer in the main ACPI table * Header - Name of the buffer field (printed on the * first line only.) + * MultiLine - TRUE if a large, multi-line buffer * * RETURN: None * @@ -86,13 +79,14 @@ AcpiDmDumpBuffer ( * ******************************************************************************/ -static void +void AcpiDmDumpBuffer ( void *Table, UINT32 BufferOffset, UINT32 Length, UINT32 AbsoluteOffset, - char *Header) + char *Header, + BOOLEAN MultiLine) { UINT8 *Buffer; UINT32 i; @@ -110,10 +104,19 @@ AcpiDmDumpBuffer ( { if (!(i % 16)) { - AcpiOsPrintf ("\n"); - AcpiDmLineHeader (AbsoluteOffset, - ((Length - i) > 16) ? 16 : (Length - i), Header); - Header = NULL; + if (MultiLine) + { + /* Insert a backslash - line continuation character */ + + AcpiOsPrintf ("\\\n "); + } + else + { + AcpiOsPrintf ("\n"); + AcpiDmLineHeader (AbsoluteOffset, + ((Length - i) > 16) ? 16 : (Length - i), Header); + Header = NULL; + } } AcpiOsPrintf ("%.02X ", *Buffer); @@ -526,7 +529,7 @@ AcpiDmDumpAsf ( DataOffset++; if (DataOffset > Table->Length) { - AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n"); + AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure! (ASF! table)\n"); return; } } @@ -692,7 +695,7 @@ AcpiDmDumpCsrt ( InfoLength = SubSubTable->Length - SubSubOffset; AcpiDmDumpBuffer (SubSubTable, SubSubOffset, InfoLength, - Offset + SubOffset + SubSubOffset, "ResourceInfo"); + Offset + SubOffset + SubSubOffset, "ResourceInfo", FALSE); SubSubOffset += InfoLength; /* Point to next sub-subtable */ @@ -812,7 +815,7 @@ AcpiDmDumpDbg2 ( if (SubTable->OemDataOffset) { AcpiDmDumpBuffer (SubTable, SubTable->OemDataOffset, SubTable->OemDataLength, - Offset + SubTable->OemDataOffset, "OEM Data"); + Offset + SubTable->OemDataOffset, "OEM Data", FALSE); } /* Point to next subtable */ @@ -2535,67 +2538,8 @@ void AcpiDmDumpSlic ( ACPI_TABLE_HEADER *Table) { - ACPI_STATUS Status; - UINT32 Offset = sizeof (ACPI_TABLE_SLIC); - ACPI_SLIC_HEADER *SubTable; - ACPI_DMTABLE_INFO *InfoTable; - - - /* There is no main SLIC table, only subtables */ - - SubTable = ACPI_ADD_PTR (ACPI_SLIC_HEADER, Table, Offset); - while (Offset < Table->Length) - { - /* Common subtable header */ - - AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, - SubTable->Length, AcpiDmTableInfoSlicHdr); - if (ACPI_FAILURE (Status)) - { - return; - } - - switch (SubTable->Type) - { - case ACPI_SLIC_TYPE_PUBLIC_KEY: - - InfoTable = AcpiDmTableInfoSlic0; - break; - - case ACPI_SLIC_TYPE_WINDOWS_MARKER: - - InfoTable = AcpiDmTableInfoSlic1; - break; - - default: - - AcpiOsPrintf ("\n**** Unknown SLIC subtable type 0x%X\n", SubTable->Type); - - /* Attempt to continue */ - - if (!SubTable->Length) - { - AcpiOsPrintf ("Invalid zero length subtable\n"); - return; - } - goto NextSubTable; - } - - AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, - SubTable->Length, InfoTable); - if (ACPI_FAILURE (Status)) - { - return; - } - -NextSubTable: - /* Point to next subtable */ - - Offset += SubTable->Length; - SubTable = ACPI_ADD_PTR (ACPI_SLIC_HEADER, SubTable, SubTable->Length); - } + AcpiDmDumpTable (Table->Length, sizeof (ACPI_TABLE_HEADER), Table, + Table->Length - sizeof (*Table), AcpiDmTableInfoSlic); } Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo.c Sat Apr 11 03:19:48 2015 (r281395) +++ head/sys/contrib/dev/acpica/common/dmtbinfo.c Sat Apr 11 03:23:41 2015 (r281396) @@ -200,9 +200,7 @@ #define ACPI_S3PTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_HEADER,f) #define ACPI_S3PT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_RESUME,f) #define ACPI_S3PT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_SUSPEND,f) -#define ACPI_SLICH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SLIC_HEADER,f) -#define ACPI_SLIC0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SLIC_KEY,f) -#define ACPI_SLIC1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SLIC_MARKER,f) +#define ACPI_SLIC_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIC,f) #define ACPI_SRATH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f) #define ACPI_SRAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f) #define ACPI_SRAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f) @@ -2043,42 +2041,16 @@ ACPI_DMTABLE_INFO AcpiDmTableI /******************************************************************************* * - * SLIC - Software Licensing Description Table. There is no common table, just - * the standard ACPI header and then subtables. + * SLIC - Software Licensing Description Table. This table contains the standard + * ACPI header followed by proprietary data structures * ******************************************************************************/ -/* Common Subtable header (one per Subtable) */ - -ACPI_DMTABLE_INFO AcpiDmTableInfoSlicHdr[] = -{ - {ACPI_DMT_SLIC, ACPI_SLICH_OFFSET (Type), "Subtable Type", 0}, - {ACPI_DMT_UINT32, ACPI_SLICH_OFFSET (Length), "Length", DT_LENGTH}, - ACPI_DMT_TERMINATOR -}; - -ACPI_DMTABLE_INFO AcpiDmTableInfoSlic0[] = -{ - {ACPI_DMT_UINT8, ACPI_SLIC0_OFFSET (KeyType), "Key Type", 0}, - {ACPI_DMT_UINT8, ACPI_SLIC0_OFFSET (Version), "Version", 0}, - {ACPI_DMT_UINT16, ACPI_SLIC0_OFFSET (Reserved), "Reserved", 0}, - {ACPI_DMT_UINT32, ACPI_SLIC0_OFFSET (Algorithm), "Algorithm", 0}, - {ACPI_DMT_NAME4, ACPI_SLIC0_OFFSET (Magic), "Magic", 0}, - {ACPI_DMT_UINT32, ACPI_SLIC0_OFFSET (BitLength), "BitLength", 0}, - {ACPI_DMT_UINT32, ACPI_SLIC0_OFFSET (Exponent), "Exponent", 0}, - {ACPI_DMT_BUF128, ACPI_SLIC0_OFFSET (Modulus[0]), "Modulus", 0}, - ACPI_DMT_TERMINATOR -}; +/* Single subtable, a proprietary format, so treat it as a buffer */ -ACPI_DMTABLE_INFO AcpiDmTableInfoSlic1[] = +ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[] = { - {ACPI_DMT_UINT32, ACPI_SLIC1_OFFSET (Version), "Version", 0}, - {ACPI_DMT_NAME6, ACPI_SLIC1_OFFSET (OemId[0]), "Oem ID", 0}, - {ACPI_DMT_NAME8, ACPI_SLIC1_OFFSET (OemTableId[0]), "Oem Table ID", 0}, - {ACPI_DMT_NAME8, ACPI_SLIC1_OFFSET (WindowsFlag[0]), "Windows Flag", 0}, - {ACPI_DMT_UINT32, ACPI_SLIC1_OFFSET (SlicVersion), "SLIC Version", 0}, - {ACPI_DMT_BUF16, ACPI_SLIC1_OFFSET (Reserved[0]), "Reserved", 0}, - {ACPI_DMT_BUF128, ACPI_SLIC1_OFFSET (Signature[0]), "Signature", 0}, + {ACPI_DMT_RAW_BUFFER, 0, "Software Licensing Structure", 0}, ACPI_DMT_TERMINATOR }; @@ -2091,7 +2063,7 @@ ACPI_DMTABLE_INFO AcpiDmTableI ACPI_DMTABLE_INFO AcpiDmTableInfoSlit[] = { - {ACPI_DMT_UINT64, ACPI_SLIT_OFFSET (LocalityCount), "Localities", 0}, + {ACPI_DMT_UINT64, ACPI_SLIT_OFFSET (LocalityCount), "Localities", 0}, ACPI_DMT_TERMINATOR }; Modified: head/sys/contrib/dev/acpica/compiler/aslcodegen.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcodegen.c Sat Apr 11 03:19:48 2015 (r281395) +++ head/sys/contrib/dev/acpica/compiler/aslcodegen.c Sat Apr 11 03:23:41 2015 (r281396) @@ -460,7 +460,7 @@ CgWriteTableHeader ( /* Compiler version */ - TableHeader.AslCompilerRevision = ASL_REVISION; + TableHeader.AslCompilerRevision = ACPI_CA_VERSION; /* Table length. Checksum zero for now, will rewrite later */ Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Sat Apr 11 03:19:48 2015 (r281395) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Sat Apr 11 03:23:41 2015 (r281396) @@ -195,8 +195,16 @@ CmDoCompile ( Event = UtBeginEvent ("Constant folding via AML interpreter"); DbgPrint (ASL_DEBUG_OUTPUT, "\nInterpreting compile-time constant expressions\n\n"); - TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD, - OpcAmlConstantWalk, NULL, NULL); + + if (Gbl_FoldConstants) + { + TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD, + OpcAmlConstantWalk, NULL, NULL); + } + else + { + DbgPrint (ASL_PARSE_OUTPUT, " Optional folding disabled\n"); + } UtEndEvent (Event); /* Update AML opcodes if necessary, after constant folding */ Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Sat Apr 11 03:19:48 2015 (r281395) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Sat Apr 11 03:23:41 2015 (r281396) @@ -686,6 +686,10 @@ TrAllocateNode ( UINT32 ParseOpcode); void +TrPrintNodeCompileFlags ( + UINT32 Flags); + +void TrReleaseNode ( ACPI_PARSE_OBJECT *Op); @@ -705,6 +709,10 @@ TrCreateLeafNode ( UINT32 ParseOpcode); ACPI_PARSE_OBJECT * +TrCreateNullTarget ( + void); + +ACPI_PARSE_OBJECT * TrCreateAssignmentNode ( ACPI_PARSE_OBJECT *Target, ACPI_PARSE_OBJECT *Source); Modified: head/sys/contrib/dev/acpica/compiler/asldefine.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldefine.h Sat Apr 11 03:19:48 2015 (r281395) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 03:24:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35F6527B; Sat, 11 Apr 2015 03:24:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21B4FB2; Sat, 11 Apr 2015 03:24:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B3OofU030173; Sat, 11 Apr 2015 03:24:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B3OoUP030170; Sat, 11 Apr 2015 03:24:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110324.t3B3OoUP030170@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 03:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281397 - head/tools/regression/sockets/sigpipe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 03:24:51 -0000 Author: ngie Date: Sat Apr 11 03:24:49 2015 New Revision: 281397 URL: https://svnweb.freebsd.org/changeset/base/281397 Log: Mark signum unused in signal_handler; bump WARNS to 6 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/sigpipe/Makefile head/tools/regression/sockets/sigpipe/sigpipe.c Modified: head/tools/regression/sockets/sigpipe/Makefile ============================================================================== --- head/tools/regression/sockets/sigpipe/Makefile Sat Apr 11 03:23:41 2015 (r281396) +++ head/tools/regression/sockets/sigpipe/Makefile Sat Apr 11 03:24:49 2015 (r281397) @@ -4,6 +4,6 @@ PROG= sigpipe MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: head/tools/regression/sockets/sigpipe/sigpipe.c ============================================================================== --- head/tools/regression/sockets/sigpipe/sigpipe.c Sat Apr 11 03:23:41 2015 (r281396) +++ head/tools/regression/sockets/sigpipe/sigpipe.c Sat Apr 11 03:24:49 2015 (r281397) @@ -69,7 +69,7 @@ got_signal(void) } static void -signal_handler(int signum) +signal_handler(int signum __unused) { signaled = 1; From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 03:35:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 978563EC; Sat, 11 Apr 2015 03:35:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82F97171; Sat, 11 Apr 2015 03:35:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B3ZY44034993; Sat, 11 Apr 2015 03:35:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B3ZYVI034989; Sat, 11 Apr 2015 03:35:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110335.t3B3ZYVI034989@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 03:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281398 - head/tools/regression/sockets/socketpair X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 03:35:34 -0000 Author: ngie Date: Sat Apr 11 03:35:33 2015 New Revision: 281398 URL: https://svnweb.freebsd.org/changeset/base/281398 Log: Garbage collect argc/argv and bump WARNS to 6 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/socketpair/Makefile head/tools/regression/sockets/socketpair/socketpair.c Modified: head/tools/regression/sockets/socketpair/Makefile ============================================================================== --- head/tools/regression/sockets/socketpair/Makefile Sat Apr 11 03:24:49 2015 (r281397) +++ head/tools/regression/sockets/socketpair/Makefile Sat Apr 11 03:35:33 2015 (r281398) @@ -4,6 +4,6 @@ PROG= socketpair MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: head/tools/regression/sockets/socketpair/socketpair.c ============================================================================== --- head/tools/regression/sockets/socketpair/socketpair.c Sat Apr 11 03:24:49 2015 (r281397) +++ head/tools/regression/sockets/socketpair/socketpair.c Sat Apr 11 03:35:33 2015 (r281398) @@ -47,7 +47,7 @@ * right places. */ int -main(int argc, char *argv[]) +main(void) { int fd1, fd2, fd3; int sv[2]; From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 03:38:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25CDC564; Sat, 11 Apr 2015 03:38:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBE06197; Sat, 11 Apr 2015 03:38:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B3coVa035375; Sat, 11 Apr 2015 03:38:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B3co8p035373; Sat, 11 Apr 2015 03:38:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110338.t3B3co8p035373@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 03:38:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281399 - head/tools/regression/sockets/unix_bindconnect X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 03:38:51 -0000 Author: ngie Date: Sat Apr 11 03:38:49 2015 New Revision: 281399 URL: https://svnweb.freebsd.org/changeset/base/281399 Log: Fix warnings and bump WARNS to 6 - Staticize variables as needed - Garbage collect argc/argv - Fix -Wsign-compare warnings by casting small sizeof to (int) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/unix_bindconnect/Makefile head/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c Modified: head/tools/regression/sockets/unix_bindconnect/Makefile ============================================================================== --- head/tools/regression/sockets/unix_bindconnect/Makefile Sat Apr 11 03:35:33 2015 (r281398) +++ head/tools/regression/sockets/unix_bindconnect/Makefile Sat Apr 11 03:38:49 2015 (r281399) @@ -2,6 +2,6 @@ PROG= unix_bindconnect MAN= -WARNS?= 2 +WARNS?= 6 .include Modified: head/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c ============================================================================== --- head/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c Sat Apr 11 03:35:33 2015 (r281398) +++ head/tools/regression/sockets/unix_bindconnect/unix_bindconnect.c Sat Apr 11 03:38:49 2015 (r281399) @@ -54,8 +54,8 @@ #define UNWIND_MAX 1024 -int unwind_len; -struct unwind { +static int unwind_len; +static struct unwind { char u_path[PATH_MAX]; } unwind_list[UNWIND_MAX]; @@ -105,7 +105,7 @@ bind_test(const char *directory_path) sun.sun_len = sizeof(sun); sun.sun_family = AF_UNIX; if (snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", socket_path) - >= sizeof(sun.sun_path)) { + >= (int)sizeof(sun.sun_path)) { warn("bind_test: snprintf(sun.sun_path)"); close(sock1); return (-1); @@ -216,7 +216,7 @@ connect_test(const char *directory_path) sun.sun_len = sizeof(sun); sun.sun_family = AF_UNIX; if (snprintf(sun.sun_path, sizeof(sun.sun_path), "%s", socket_path) - >= sizeof(sun.sun_path)) { + >= (int)sizeof(sun.sun_path)) { warn("connect_test: snprintf(sun.sun_path)"); close(sock1); return (-1); @@ -298,7 +298,7 @@ connect_test(const char *directory_path) return (0); } int -main(int argc, char *argv[]) +main(void) { char directory_path[PATH_MAX]; int error; From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 03:43:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68EC86F2; Sat, 11 Apr 2015 03:43:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B3E7265; Sat, 11 Apr 2015 03:43:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B3hj6H039410; Sat, 11 Apr 2015 03:43:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B3hivP039408; Sat, 11 Apr 2015 03:43:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110343.t3B3hivP039408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 03:43:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281400 - head/tools/regression/sockets/unix_close_race X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 03:43:45 -0000 Author: ngie Date: Sat Apr 11 03:43:43 2015 New Revision: 281400 URL: https://svnweb.freebsd.org/changeset/base/281400 Log: - Garbage collect argc/argv; bump WARNS to 6 - Make the socket path random and move it out of /tmp as that's outside ATF's prescribed path MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/unix_close_race/Makefile head/tools/regression/sockets/unix_close_race/unix_close_race.c Modified: head/tools/regression/sockets/unix_close_race/Makefile ============================================================================== --- head/tools/regression/sockets/unix_close_race/Makefile Sat Apr 11 03:38:49 2015 (r281399) +++ head/tools/regression/sockets/unix_close_race/Makefile Sat Apr 11 03:43:43 2015 (r281400) @@ -2,6 +2,6 @@ PROG= unix_close_race MAN= -WARNS?= 3 +WARNS?= 6 .include Modified: head/tools/regression/sockets/unix_close_race/unix_close_race.c ============================================================================== --- head/tools/regression/sockets/unix_close_race/unix_close_race.c Sat Apr 11 03:38:49 2015 (r281399) +++ head/tools/regression/sockets/unix_close_race/unix_close_race.c Sat Apr 11 03:43:43 2015 (r281400) @@ -54,12 +54,13 @@ #include #include -#define UNIXSTR_PATH "/tmp/mytest.socket" +static char socket_path[] = "tmp.XXXXXXXX"; + #define USLEEP 100 #define LOOPS 100000 int -main(int argc, char **argv) +main(void) { struct sockaddr_un servaddr; int listenfd, connfd, pid; @@ -74,16 +75,20 @@ main(int argc, char **argv) if (ncpus < 2) warnx("SMP not present, test may be unable to trigger race"); + if (mkstemp(socket_path) == -1) + err(1, "mkstemp failed"); + unlink(socket_path); + /* * Create a UNIX domain socket that the child will repeatedly * accept() from, and that the parent will repeatedly connect() to. */ if ((listenfd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0) err(1, "parent: socket error"); - (void)unlink(UNIXSTR_PATH); + (void)unlink(socket_path); bzero(&servaddr, sizeof(servaddr)); servaddr.sun_family = AF_LOCAL; - strcpy(servaddr.sun_path, UNIXSTR_PATH); + strcpy(servaddr.sun_path, socket_path); if (bind(listenfd, (struct sockaddr *) &servaddr, sizeof(servaddr)) < 0) err(1, "parent: bind error"); @@ -102,7 +107,7 @@ main(int argc, char **argv) sleep(1); bzero(&servaddr, sizeof(servaddr)); servaddr.sun_family = AF_LOCAL; - strcpy(servaddr.sun_path, UNIXSTR_PATH); + strcpy(servaddr.sun_path, socket_path); for (counter = 0; counter < LOOPS; counter++) { if ((connfd = socket(AF_LOCAL, SOCK_STREAM, 0)) < 0) { (void)kill(pid, SIGTERM); From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 03:54:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71928868; Sat, 11 Apr 2015 03:54:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5079334B; Sat, 11 Apr 2015 03:54:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B3sjW9044192; Sat, 11 Apr 2015 03:54:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B3sin7044190; Sat, 11 Apr 2015 03:54:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110354.t3B3sin7044190@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 03:54:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281401 - head/tools/regression/sockets/unix_sendtorace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 03:54:45 -0000 Author: ngie Date: Sat Apr 11 03:54:43 2015 New Revision: 281401 URL: https://svnweb.freebsd.org/changeset/base/281401 Log: - Garbage collect argc/argv - Use random paths instead of one in /tmp MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/unix_sendtorace/Makefile head/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c Modified: head/tools/regression/sockets/unix_sendtorace/Makefile ============================================================================== --- head/tools/regression/sockets/unix_sendtorace/Makefile Sat Apr 11 03:43:43 2015 (r281400) +++ head/tools/regression/sockets/unix_sendtorace/Makefile Sat Apr 11 03:54:43 2015 (r281401) @@ -2,6 +2,6 @@ PROG= unix_sendtorace MAN= -WARNS?= 3 +WARNS?= 6 .include Modified: head/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c ============================================================================== --- head/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c Sat Apr 11 03:43:43 2015 (r281400) +++ head/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c Sat Apr 11 03:54:43 2015 (r281401) @@ -45,9 +45,10 @@ #include #include -#define PATH "/tmp/123" #define ITERATIONS 1000000 +static char socket_path[] = "tmp.XXXXXX"; + static void stream_server(int listenfd) { @@ -75,7 +76,7 @@ stream_client(void) bzero(&sun, sizeof(sun)); sun.sun_len = sizeof(sun); sun.sun_family = AF_UNIX; - strcpy(sun.sun_path, PATH); + strcpy(sun.sun_path, socket_path); for (i = 0; i < ITERATIONS; i++) { fd = socket(PF_UNIX, SOCK_STREAM, 0); if (fd < 0) { @@ -104,7 +105,7 @@ stream_test(void) bzero(&sun, sizeof(sun)); sun.sun_len = sizeof(sun); sun.sun_family = AF_UNIX; - strcpy(sun.sun_path, PATH); + strcpy(sun.sun_path, socket_path); if (bind(listenfd, (struct sockaddr *)&sun, sizeof(sun)) < 0) err(-1, "stream_test: bind"); @@ -124,7 +125,7 @@ stream_test(void) } else stream_server(listenfd); - (void)unlink(PATH); + (void)unlink(socket_path); } static void @@ -151,7 +152,7 @@ datagram_client(void) bzero(&sun, sizeof(sun)); sun.sun_len = sizeof(sun); sun.sun_family = AF_UNIX; - strcpy(sun.sun_path, PATH); + strcpy(sun.sun_path, socket_path); for (i = 0; i < ITERATIONS; i++) { fd = socket(PF_UNIX, SOCK_DGRAM, 0); if (fd < 0) { @@ -180,7 +181,7 @@ datagram_test(void) bzero(&sun, sizeof(sun)); sun.sun_len = sizeof(sun); sun.sun_family = AF_UNIX; - strcpy(sun.sun_path, PATH); + strcpy(sun.sun_path, socket_path); if (bind(serverfd, (struct sockaddr *)&sun, sizeof(sun)) < 0) err(-1, "datagram_test: bind"); @@ -197,14 +198,16 @@ datagram_test(void) } else datagram_server(serverfd); - (void)unlink(PATH); + (void)unlink(socket_path); } int -main(int argc, char *argv[]) +main(void) { - - (void)unlink(PATH); + + if (mkstemp(socket_path) == -1) + err(1, "mkstemp failed"); + (void)unlink(socket_path); datagram_test(); if (0) stream_test(); From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 03:56:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 500159AC; Sat, 11 Apr 2015 03:56:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BBEB358; Sat, 11 Apr 2015 03:56:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B3uPYk044484; Sat, 11 Apr 2015 03:56:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B3uOQ8044482; Sat, 11 Apr 2015 03:56:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110356.t3B3uOQ8044482@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 03:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281402 - head/tools/regression/sockets/unix_socket X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 03:56:25 -0000 Author: ngie Date: Sat Apr 11 03:56:23 2015 New Revision: 281402 URL: https://svnweb.freebsd.org/changeset/base/281402 Log: Garbage collect argc/argv and bump WARNS to 6 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/unix_socket/Makefile head/tools/regression/sockets/unix_socket/unix_socket.c Modified: head/tools/regression/sockets/unix_socket/Makefile ============================================================================== --- head/tools/regression/sockets/unix_socket/Makefile Sat Apr 11 03:54:43 2015 (r281401) +++ head/tools/regression/sockets/unix_socket/Makefile Sat Apr 11 03:56:23 2015 (r281402) @@ -2,6 +2,6 @@ PROG= unix_socket MAN= -WARNS?= 3 +WARNS?= 6 .include Modified: head/tools/regression/sockets/unix_socket/unix_socket.c ============================================================================== --- head/tools/regression/sockets/unix_socket/unix_socket.c Sat Apr 11 03:54:43 2015 (r281401) +++ head/tools/regression/sockets/unix_socket/unix_socket.c Sat Apr 11 03:56:23 2015 (r281402) @@ -40,7 +40,7 @@ #include int -main(int argc, char *argv[]) +main(void) { int sock, socks[2]; From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 03:57:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31CB5AF7; Sat, 11 Apr 2015 03:57:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D622367; Sat, 11 Apr 2015 03:57:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B3vaZT044656; Sat, 11 Apr 2015 03:57:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B3vapH044654; Sat, 11 Apr 2015 03:57:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110357.t3B3vapH044654@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 03:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281403 - head/tools/regression/sockets/unix_sorflush X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 03:57:37 -0000 Author: ngie Date: Sat Apr 11 03:57:35 2015 New Revision: 281403 URL: https://svnweb.freebsd.org/changeset/base/281403 Log: Garbage collect argc/argv and bump WARNS to 6 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/unix_sorflush/Makefile head/tools/regression/sockets/unix_sorflush/unix_sorflush.c Modified: head/tools/regression/sockets/unix_sorflush/Makefile ============================================================================== --- head/tools/regression/sockets/unix_sorflush/Makefile Sat Apr 11 03:56:23 2015 (r281402) +++ head/tools/regression/sockets/unix_sorflush/Makefile Sat Apr 11 03:57:35 2015 (r281403) @@ -2,6 +2,6 @@ PROG= unix_sorflush MAN= -WARNS?= 3 +WARNS?= 6 .include Modified: head/tools/regression/sockets/unix_sorflush/unix_sorflush.c ============================================================================== --- head/tools/regression/sockets/unix_sorflush/unix_sorflush.c Sat Apr 11 03:56:23 2015 (r281402) +++ head/tools/regression/sockets/unix_sorflush/unix_sorflush.c Sat Apr 11 03:57:35 2015 (r281403) @@ -68,7 +68,7 @@ shutdown_and_exit(int s) } int -main(int argc, char *argv[]) +main(void) { pid_t pida, pidb; int sv[2]; From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 05:20:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A197DF0E; Sat, 11 Apr 2015 05:20:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D1E5E4E; Sat, 11 Apr 2015 05:20:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B5K2GC082733; Sat, 11 Apr 2015 05:20:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B5K21W082732; Sat, 11 Apr 2015 05:20:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110520.t3B5K21W082732@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 05:20:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281404 - head/tools/regression/sockets/zerosend X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 05:20:02 -0000 Author: ngie Date: Sat Apr 11 05:20:01 2015 New Revision: 281404 URL: https://svnweb.freebsd.org/changeset/base/281404 Log: Generate temporary files with mkstemp instead of mktemp MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/zerosend/zerosend.c Modified: head/tools/regression/sockets/zerosend/zerosend.c ============================================================================== --- head/tools/regression/sockets/zerosend/zerosend.c Sat Apr 11 03:57:35 2015 (r281403) +++ head/tools/regression/sockets/zerosend/zerosend.c Sat Apr 11 05:20:01 2015 (r281404) @@ -209,12 +209,12 @@ setup_pipe(const char *test, int *fdp) static void setup_fifo(const char *test, int *fdp) { - char path[PATH_MAX]; + char path[] = "0send_fifo.XXXXXXX"; int fd1, fd2; - strcpy(path, "/tmp/0send_fifo.XXXXXXX"); - if (mktemp(path) == NULL) + if (mkstemp(path) == -1) err(-1, "%s: setup_fifo: mktemp", test); + unlink(path); if (mkfifo(path, 0600) < 0) err(-1, "%s: setup_fifo: mkfifo(%s)", test, path); From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 05:38:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC7D41FB; Sat, 11 Apr 2015 05:38:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7CCEFDB; Sat, 11 Apr 2015 05:38:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B5c8cj091834; Sat, 11 Apr 2015 05:38:08 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B5c79J091831; Sat, 11 Apr 2015 05:38:07 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504110538.t3B5c79J091831@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 11 Apr 2015 05:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281405 - in head: . etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 05:38:09 -0000 Author: jkim Date: Sat Apr 11 05:38:07 2015 New Revision: 281405 URL: https://svnweb.freebsd.org/changeset/base/281405 Log: Catch up with r281373 and r281379. Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.usr.dist Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Apr 11 05:20:01 2015 (r281404) +++ head/ObsoleteFiles.inc Sat Apr 11 05:38:07 2015 (r281405) @@ -38,6 +38,18 @@ # xargs -n1 | sort | uniq -d; # done +# 20150410 +OLD_FILES+=usr/share/doc/usd/10.exref/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/10.exref/summary.ascii.gz +OLD_DIRS+=usr/share/doc/usd/10.exref +OLD_FILES+=usr/share/doc/usd/11.edit/paper.ascii.gz +OLD_DIRS+=usr/share/doc/usd/11.edit +OLD_FILES+=usr/share/doc/usd/12.vi/paper.ascii.gz +OLD_FILES+=usr/share/doc/usd/12.vi/summary.ascii.gz +OLD_FILES+=usr/share/doc/usd/12.vi/viapwh.ascii.gz +OLD_DIRS+=usr/share/doc/usd/12.vi +OLD_FILES+=usr/share/doc/usd/13.viref/paper.ascii.gz +OLD_DIRS+=usr/share/doc/usd/13.viref # 20150329 .if ${TARGET_ARCH} == "arm" OLD_FILES+=usr/include/bootconfig.h Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Sat Apr 11 05:20:01 2015 (r281404) +++ head/etc/mtree/BSD.usr.dist Sat Apr 11 05:38:07 2015 (r281405) @@ -292,14 +292,6 @@ .. 07.mail .. - 10.exref - .. - 11.edit - .. - 12.vi - .. - 13.viref - .. 18.msdiffs .. 19.memacros From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 06:20:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C390560; Sat, 11 Apr 2015 06:20:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17A8C3B6; Sat, 11 Apr 2015 06:20:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B6Kkvj011975; Sat, 11 Apr 2015 06:20:46 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B6KkQv011974; Sat, 11 Apr 2015 06:20:46 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504110620.t3B6KkQv011974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 11 Apr 2015 06:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281406 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 06:20:47 -0000 Author: rpaulo Date: Sat Apr 11 06:20:46 2015 New Revision: 281406 URL: https://svnweb.freebsd.org/changeset/base/281406 Log: netmap: improve the netmap attach message on FreeBSD. MFC after: 1 week Modified: head/sys/dev/netmap/netmap.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Sat Apr 11 05:38:07 2015 (r281405) +++ head/sys/dev/netmap/netmap.c Sat Apr 11 06:20:46 2015 (r281406) @@ -2710,11 +2710,17 @@ netmap_attach(struct netmap_adapter *arg } #endif /* linux */ +#ifdef __FreeBSD__ + if_printf(ifp, "netmap queues/slots: TX %d/%d, RX %d/%d\n", + hwna->up.num_tx_rings, hwna->up.num_tx_desc, + hwna->up.num_rx_rings, hwna->up.num_rx_desc); +#else D("success for %s tx %d/%d rx %d/%d queues/slots", hwna->up.name, hwna->up.num_tx_rings, hwna->up.num_tx_desc, hwna->up.num_rx_rings, hwna->up.num_rx_desc ); +#endif return 0; fail: From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 06:38:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D8207AB; Sat, 11 Apr 2015 06:38:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 794BD785; Sat, 11 Apr 2015 06:38:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B6cpZT019891; Sat, 11 Apr 2015 06:38:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B6cp8I019890; Sat, 11 Apr 2015 06:38:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110638.t3B6cp8I019890@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 06:38:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281407 - head/tools/regression/sockets/so_setfib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 06:38:51 -0000 Author: ngie Date: Sat Apr 11 06:38:50 2015 New Revision: 281407 URL: https://svnweb.freebsd.org/changeset/base/281407 Log: Fix the knob twiddling to work properly per src.opts.mk MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/so_setfib/Makefile Modified: head/tools/regression/sockets/so_setfib/Makefile ============================================================================== --- head/tools/regression/sockets/so_setfib/Makefile Sat Apr 11 06:20:46 2015 (r281406) +++ head/tools/regression/sockets/so_setfib/Makefile Sat Apr 11 06:38:50 2015 (r281407) @@ -1,14 +1,16 @@ # $FreeBSD$ +.include + PROG= so_setfib MAN= WARNS?= 6 -.ifdef INET6 -CFLAGS+= -DINET6 -.endif -.ifdef INET +.if ${MK_INET} != "no" CFLAGS+= -DINET .endif +.if ${MK_INET6} != "no" +CFLAGS+= -DINET6 +.endif .include From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 06:40:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D085A2A; Sat, 11 Apr 2015 06:40:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68AED83E; Sat, 11 Apr 2015 06:40:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B6edZn022805; Sat, 11 Apr 2015 06:40:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B6edCH022804; Sat, 11 Apr 2015 06:40:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110640.t3B6edCH022804@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 06:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281408 - head/tools/regression/sockets/so_setfib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 06:40:39 -0000 Author: ngie Date: Sat Apr 11 06:40:38 2015 New Revision: 281408 URL: https://svnweb.freebsd.org/changeset/base/281408 Log: - Remove the .t wrapper and put the "magic" of determining the number of testcases into the .c file - Require root for now because it fails with SOCK_RAW without root privileges - Increment the test count properly on socket create failure MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Deleted: head/tools/regression/sockets/so_setfib/so_setfib.t Modified: head/tools/regression/sockets/so_setfib/so_setfib.c Modified: head/tools/regression/sockets/so_setfib/so_setfib.c ============================================================================== --- head/tools/regression/sockets/so_setfib/so_setfib.c Sat Apr 11 06:38:50 2015 (r281407) +++ head/tools/regression/sockets/so_setfib/so_setfib.c Sat Apr 11 06:40:38 2015 (r281408) @@ -45,6 +45,7 @@ * 5. Repeat for next domain family and type from (2) on. */ +#include #include #include #include @@ -143,6 +144,7 @@ t(u_int dom, u_int type) if (s == -1) { printf("not ok %d %s_%s # socket(): %s\n", testno, t_dom[dom].name, t_type[type].name, strerror(errno)); + testno++; return; } @@ -168,6 +170,11 @@ main(int argc __unused, char *argv[] __u u_int i, j; size_t s; + if (geteuid() != 0) { + printf("1..0 # SKIP: must be root"); + return (0); + } + /* Initalize randomness. */ srandomdev(); @@ -175,6 +182,10 @@ main(int argc __unused, char *argv[] __u s = sizeof(rt_numfibs); if (sysctlbyname("net.fibs", &rt_numfibs, &s, NULL, 0) == -1) err(1, "sysctlbyname(net.fibs, ..)"); + + printf("1..%lu\n", + (nitems(t_dom) - 1) * nitems(t_type) * (2 + rt_numfibs + 2 + 3)); + /* Adjust from number to index. */ rt_numfibs -= 1; From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 07:33:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ED62F8B; Sat, 11 Apr 2015 07:33:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FD39C99; Sat, 11 Apr 2015 07:33:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B7X5TB047511; Sat, 11 Apr 2015 07:33:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B7X5nw047506; Sat, 11 Apr 2015 07:33:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110733.t3B7X5nw047506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 07:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281409 - head/tools/regression/sockets/pr_atomic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 07:33:06 -0000 Author: ngie Date: Sat Apr 11 07:33:04 2015 New Revision: 281409 URL: https://svnweb.freebsd.org/changeset/base/281409 Log: Fix warnings, bump WARNS to 6, and use a temporary socket instead of one in /tmp MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/pr_atomic/Makefile head/tools/regression/sockets/pr_atomic/pr_atomic.c Modified: head/tools/regression/sockets/pr_atomic/Makefile ============================================================================== --- head/tools/regression/sockets/pr_atomic/Makefile Sat Apr 11 06:40:38 2015 (r281408) +++ head/tools/regression/sockets/pr_atomic/Makefile Sat Apr 11 07:33:04 2015 (r281409) @@ -2,6 +2,6 @@ PROG= pr_atomic MAN= -WARNS?= 3 +WARNS?= 6 .include Modified: head/tools/regression/sockets/pr_atomic/pr_atomic.c ============================================================================== --- head/tools/regression/sockets/pr_atomic/pr_atomic.c Sat Apr 11 06:40:38 2015 (r281408) +++ head/tools/regression/sockets/pr_atomic/pr_atomic.c Sat Apr 11 07:33:04 2015 (r281409) @@ -42,31 +42,31 @@ #include #include -#define TEST_SOCKET "/tmp/test_socket" +static char socket_path[] = "tmp.XXXXXX"; static jmp_buf myjmpbuf; -void handle_sigalrm(int signo); - -void handle_sigalrm(int signo) +static void handle_sigalrm(int signo __unused) { longjmp(myjmpbuf, 1); } int -main(int argc, char *argv[]) +main(void) { struct sockaddr_un un; pid_t pid; int s; + if (mkstemp(socket_path) == -1) + err(1, "mkstemp"); s = socket(PF_LOCAL, SOCK_DGRAM, 0); if (s == -1) errx(-1, "socket"); memset(&un, 0, sizeof(un)); un.sun_family = AF_LOCAL; - unlink(TEST_SOCKET); - strcpy(un.sun_path, TEST_SOCKET); + unlink(socket_path); + strcpy(un.sun_path, socket_path); if (bind(s, (struct sockaddr *)&un, sizeof(un)) == -1) errx(-1, "bind"); pid = fork(); From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 07:35:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81611161; Sat, 11 Apr 2015 07:35:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C012CA4; Sat, 11 Apr 2015 07:35:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B7ZVHa047864; Sat, 11 Apr 2015 07:35:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B7ZUph047862; Sat, 11 Apr 2015 07:35:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110735.t3B7ZUph047862@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 07:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281410 - head/tools/regression/sockets/reconnect X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 07:35:31 -0000 Author: ngie Date: Sat Apr 11 07:35:30 2015 New Revision: 281410 URL: https://svnweb.freebsd.org/changeset/base/281410 Log: Fix more warnings I didn't catch in the first go-around MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/reconnect/Makefile head/tools/regression/sockets/reconnect/reconnect.c Modified: head/tools/regression/sockets/reconnect/Makefile ============================================================================== --- head/tools/regression/sockets/reconnect/Makefile Sat Apr 11 07:33:04 2015 (r281409) +++ head/tools/regression/sockets/reconnect/Makefile Sat Apr 11 07:35:30 2015 (r281410) @@ -4,6 +4,5 @@ PROG= reconnect MAN= -WARNS?= 2 .include Modified: head/tools/regression/sockets/reconnect/reconnect.c ============================================================================== --- head/tools/regression/sockets/reconnect/reconnect.c Sat Apr 11 07:33:04 2015 (r281409) +++ head/tools/regression/sockets/reconnect/reconnect.c Sat Apr 11 07:35:30 2015 (r281410) @@ -50,7 +50,7 @@ static char uds_name2[] = "reconnect.XXX #define sstosa(ss) ((struct sockaddr *)(ss)) -void +static void prepare_ifsun(struct sockaddr_un *ifsun, const char *path) { @@ -99,10 +99,8 @@ void cleanup(void) { - if (uds_name1 != NULL) - unlink(uds_name1); - if (uds_name2 != NULL) - unlink(uds_name2); + unlink(uds_name1); + unlink(uds_name2); } int From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 07:37:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 693C72DE; Sat, 11 Apr 2015 07:37:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54295CC0; Sat, 11 Apr 2015 07:37:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B7bMp8048136; Sat, 11 Apr 2015 07:37:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B7bLJt048129; Sat, 11 Apr 2015 07:37:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504110737.t3B7bLJt048129@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 11 Apr 2015 07:37:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281411 - head/tools/regression/sockets/reconnect X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 07:37:22 -0000 Author: ngie Date: Sat Apr 11 07:37:21 2015 New Revision: 281411 URL: https://svnweb.freebsd.org/changeset/base/281411 Log: Fix even more warnings.. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/sockets/reconnect/Makefile head/tools/regression/sockets/reconnect/reconnect.c Modified: head/tools/regression/sockets/reconnect/Makefile ============================================================================== --- head/tools/regression/sockets/reconnect/Makefile Sat Apr 11 07:35:30 2015 (r281410) +++ head/tools/regression/sockets/reconnect/Makefile Sat Apr 11 07:37:21 2015 (r281411) @@ -4,5 +4,6 @@ PROG= reconnect MAN= +WARNS?= 6 .include Modified: head/tools/regression/sockets/reconnect/reconnect.c ============================================================================== --- head/tools/regression/sockets/reconnect/reconnect.c Sat Apr 11 07:35:30 2015 (r281410) +++ head/tools/regression/sockets/reconnect/reconnect.c Sat Apr 11 07:37:21 2015 (r281411) @@ -62,7 +62,7 @@ prepare_ifsun(struct sockaddr_un *ifsun, strcpy(ifsun->sun_path, path); } -int +static int create_uds_server(const char *path) { struct sockaddr_un ifsun; @@ -82,7 +82,7 @@ create_uds_server(const char *path) return sock; } -void +static void connect_uds_server(int sock, const char *path) { struct sockaddr_un ifsun; @@ -95,7 +95,7 @@ connect_uds_server(int sock, const char err(1, "can't connect to a socket"); } -void +static void cleanup(void) { From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 07:41:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E972849D; Sat, 11 Apr 2015 07:41:58 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9EDDED76; Sat, 11 Apr 2015 07:41:58 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 1B6D225D3A97; Sat, 11 Apr 2015 07:41:56 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 5B638C7705D; Sat, 11 Apr 2015 07:41:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id mJXkaxOu6ZMG; Sat, 11 Apr 2015 07:41:54 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 3E010C7703A; Sat, 11 Apr 2015 07:41:54 +0000 (UTC) Date: Sat, 11 Apr 2015 07:41:53 +0000 (UTC) From: "Bjoern A. Zeeb" To: Jung-uk Kim Subject: Re: svn commit: r281396 - in head/sys: contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/components/debugger contrib/dev/acpica/components/disassembler contrib... In-Reply-To: <201504110323.t3B3Ngep029970@svn.freebsd.org> Message-ID: References: <201504110323.t3B3Ngep029970@svn.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 07:41:59 -0000 On Sat, 11 Apr 2015, Jung-uk Kim wrote: > Author: jkim > Date: Sat Apr 11 03:23:41 2015 > New Revision: 281396 > URL: https://svnweb.freebsd.org/changeset/base/281396 > > Log: > Merge ACPICA 20150410. This seems to have broken i386 kernels. -- Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 08:17:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E3AAB6B; Sat, 11 Apr 2015 08:17:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EBF16E; Sat, 11 Apr 2015 08:17:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B8HfUw067126; Sat, 11 Apr 2015 08:17:41 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B8Hen9067122; Sat, 11 Apr 2015 08:17:40 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201504110817.t3B8Hen9067122@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Sat, 11 Apr 2015 08:17:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281412 - head/sys/gnu/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 08:17:41 -0000 Author: ganbold Date: Sat Apr 11 08:17:39 2015 New Revision: 281412 URL: https://svnweb.freebsd.org/changeset/base/281412 Log: The GNU Amlogic DTS files have some errors (e.g. bad register address, bad IRQ, etc) which are fixed by this patch. John has sent these changes to the author of the files who said he'll propagate the changes further upstream. Submitted by: John Wehle Reviewed by: imp Modified: head/sys/gnu/dts/arm/meson.dtsi head/sys/gnu/dts/arm/meson6.dtsi head/sys/gnu/dts/arm/meson8.dtsi Modified: head/sys/gnu/dts/arm/meson.dtsi ============================================================================== --- head/sys/gnu/dts/arm/meson.dtsi Sat Apr 11 07:37:21 2015 (r281411) +++ head/sys/gnu/dts/arm/meson.dtsi Sat Apr 11 08:17:39 2015 (r281412) @@ -67,7 +67,7 @@ timer@c1109940 { compatible = "amlogic,meson6-timer"; - reg = <0xc1109940 0x14>; + reg = <0xc1109940 0x18>; interrupts = <0 10 1>; }; @@ -80,36 +80,37 @@ wdt: watchdog@c1109900 { compatible = "amlogic,meson6-wdt"; reg = <0xc1109900 0x8>; + interrupts = <0 0 1>; }; uart_AO: serial@c81004c0 { compatible = "amlogic,meson-uart"; - reg = <0xc81004c0 0x14>; + reg = <0xc81004c0 0x18>; interrupts = <0 90 1>; clocks = <&clk81>; status = "disabled"; }; - uart_A: serial@c81084c0 { + uart_A: serial@c11084c0 { compatible = "amlogic,meson-uart"; - reg = <0xc81084c0 0x14>; - interrupts = <0 90 1>; + reg = <0xc11084c0 0x18>; + interrupts = <0 26 1>; clocks = <&clk81>; status = "disabled"; }; - uart_B: serial@c81084dc { + uart_B: serial@c11084dc { compatible = "amlogic,meson-uart"; - reg = <0xc81084dc 0x14>; - interrupts = <0 90 1>; + reg = <0xc11084dc 0x18>; + interrupts = <0 75 1>; clocks = <&clk81>; status = "disabled"; }; - uart_C: serial@c8108700 { + uart_C: serial@c1108700 { compatible = "amlogic,meson-uart"; - reg = <0xc8108700 0x14>; - interrupts = <0 90 1>; + reg = <0xc1108700 0x18>; + interrupts = <0 93 1>; clocks = <&clk81>; status = "disabled"; }; Modified: head/sys/gnu/dts/arm/meson6.dtsi ============================================================================== --- head/sys/gnu/dts/arm/meson6.dtsi Sat Apr 11 07:37:21 2015 (r281411) +++ head/sys/gnu/dts/arm/meson6.dtsi Sat Apr 11 08:17:39 2015 (r281412) @@ -78,3 +78,7 @@ clock-frequency = <200000000>; }; }; /* end of / */ + +&L2 { + interrupts = <0 61 1>; +}; Modified: head/sys/gnu/dts/arm/meson8.dtsi ============================================================================== --- head/sys/gnu/dts/arm/meson8.dtsi Sat Apr 11 07:37:21 2015 (r281411) +++ head/sys/gnu/dts/arm/meson8.dtsi Sat Apr 11 08:17:39 2015 (r281412) @@ -90,3 +90,7 @@ clock-frequency = <141666666>; }; }; /* end of / */ + +&L2 { + interrupts = <0 143 1>; +}; From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 08:25:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AFE1EB5; Sat, 11 Apr 2015 08:25:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CB2E151; Sat, 11 Apr 2015 08:25:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B8Psk1071819; Sat, 11 Apr 2015 08:25:54 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B8PsHn071818; Sat, 11 Apr 2015 08:25:54 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201504110825.t3B8PsHn071818@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Sat, 11 Apr 2015 08:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281413 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 08:25:54 -0000 Author: ganbold Date: Sat Apr 11 08:25:53 2015 New Revision: 281413 URL: https://svnweb.freebsd.org/changeset/base/281413 Log: The GNU files don't include a DTS for the aml8726-m8b (which has cortex-a5 cores unlike the aml8726-m8 which has cortex-a9 cores). Submitted by: John Wehle Reviewed by: imp Added: head/sys/boot/fdt/dts/arm/meson8b.dtsi (contents, props changed) Added: head/sys/boot/fdt/dts/arm/meson8b.dtsi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/meson8b.dtsi Sat Apr 11 08:25:53 2015 (r281413) @@ -0,0 +1,79 @@ +/*- + * Copyright (c) 2015 John Wehle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/include/ "meson.dtsi" + +/ { + model = "Amlogic Meson8b SoC"; + compatible = "amlogic,meson8b"; + + interrupt-parent = <&gic>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@200 { + device_type = "cpu"; + compatible = "arm,cortex-a5"; + next-level-cache = <&L2>; + reg = <0x200>; + }; + + cpu@201 { + device_type = "cpu"; + compatible = "arm,cortex-a5"; + next-level-cache = <&L2>; + reg = <0x201>; + }; + + cpu@202 { + device_type = "cpu"; + compatible = "arm,cortex-a5"; + next-level-cache = <&L2>; + reg = <0x202>; + }; + + cpu@203 { + device_type = "cpu"; + compatible = "arm,cortex-a5"; + next-level-cache = <&L2>; + reg = <0x203>; + }; + }; + + clk81: clk@0 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <0>; + }; +}; + +&L2 { + interrupts = <0 143 1>; +}; From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 08:27:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 231A816F; Sat, 11 Apr 2015 08:27:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D81616D; Sat, 11 Apr 2015 08:27:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B8Ren1072135; Sat, 11 Apr 2015 08:27:40 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B8RdXK072130; Sat, 11 Apr 2015 08:27:39 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201504110827.t3B8RdXK072130@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Sat, 11 Apr 2015 08:27:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281415 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 08:27:40 -0000 Author: ganbold Date: Sat Apr 11 08:27:38 2015 New Revision: 281415 URL: https://svnweb.freebsd.org/changeset/base/281415 Log: This modifies the FreeBSD Amlogic DTS files to use the GNU files as the base. Submitted by: John Wehle Reviewed by: imp Modified: head/sys/boot/fdt/dts/arm/odroidc1.dts head/sys/boot/fdt/dts/arm/vsatv102-m6.dts Modified: head/sys/boot/fdt/dts/arm/odroidc1.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/odroidc1.dts Sat Apr 11 08:27:34 2015 (r281414) +++ head/sys/boot/fdt/dts/arm/odroidc1.dts Sat Apr 11 08:27:38 2015 (r281415) @@ -39,6 +39,8 @@ /memreserve/ 0x7900000 0x00600000; /* 6MB frame buffer */ +#include "meson8b.dtsi" + / { model = "hardkernel,odroid-c1"; compatible = "hardkernel,odroid-c1", "amlogic,s805"; @@ -46,41 +48,10 @@ #address-cells = <1>; #size-cells = <1>; - interrupt-parent = <&gic>; - aliases { soc = &soc; screen = &screen; - uart0 = &uart0; - }; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - - cpu@0 { - device_type = "cpu"; - compatible = "arm,cortex-a5"; - reg = <0x0>; - }; - - cpu@1 { - device_type = "cpu"; - compatible = "arm,cortex-a5"; - reg = <0x1>; - }; - - cpu@2 { - device_type = "cpu"; - compatible = "arm,cortex-a5"; - reg = <0x2>; - }; - - cpu@3 { - device_type = "cpu"; - compatible = "arm,cortex-a5"; - reg = <0x3>; - }; + uart0 = &uart_AO; }; memory { @@ -88,60 +59,37 @@ reg = <0x0 0x40000000>; /* 1GB RAM */ }; - soc: soc@c0000000 { + soc: soc { device_type = "soc"; - compatible = "simple-bus"; bus-frequency = <0>; - #address-cells = <1>; - #size-cells = <1>; - - ranges = <0x0 0xc0000000 0x1a100000>; - - gic: gic@4301000 { - device_type = "interrupt-controller"; - compatible = "arm,gic"; - reg = <0x4301000 0x1000>, // distributer registers - <0x4300100 0x0100>; // CPU if registers - - interrupt-controller; - #interrupt-cells = <1>; - }; - - scu: scu@4300000 { + scu: scu@c4300000 { compatible = "arm,cortex-a5-scu"; - reg = <0x4300000 0x1000>; + reg = <0xc4300000 0x1000>; }; - cpuconfig: cpuconfig@1901ff80 { + cpuconfig: cpuconfig@d901ff80 { compatible = "amlogic,aml8726-cpuconfig"; - reg = <0x1901ff80 16>; + reg = <0xd901ff80 16>; }; - pl310@4200000 { - compatible = "arm,pl310"; - reg = <0x4200000 0x1000>; - interrupts = <61>; - interrupt-parent = <&gic>; - }; - - ccm@1104140 { + ccm@c1104140 { compatible = "amlogic,aml8726-ccm"; - reg = <0x1104140 20>; /* cbus 0x1050 */ + reg = <0xc1104140 20>; /* cbus 0x1050 */ functions = "ethernet", "i2c", "rng", "sdio", "sdxc", "uart-a", "uart-b", "uart-c", "usb-a", "usb-b"; }; - pinctrl@11080b0 { + pinctrl@c11080b0 { compatible = "amlogic,aml8726-pinctrl"; - reg = <0x11080b0 40>, /* mux */ - <0x11080e8 24>, /* pu/pd */ - <0x1108120 24>, /* pull enable */ - <0x8100014 4>, /* ao mux */ - <0x810002c 4>, /* ao pu/pd */ - <0x810002c 4>; /* ao pull enable */ + reg = <0xc11080b0 40>, /* mux */ + <0xc11080e8 24>, /* pu/pd */ + <0xc1108120 24>, /* pull enable */ + <0xc8100014 4>, /* ao mux */ + <0xc810002c 4>, /* ao pu/pd */ + <0xc810002c 4>; /* ao pull enable */ /* * Currently only pin muxing that deviates @@ -242,24 +190,10 @@ }; }; - watchdog@1109900 { - compatible = "amlogic,aml8726-wdt"; - reg = <0x1109900 8>; /* cbus 0x2640 */ - interrupts = <0>; - interrupt-parent = <&gic>; - }; - - timer@1109940 { - compatible = "amlogic,aml8726-timer"; - reg = <0x1109940 24>; /* cbus 0x2650 */ - interrupts = <10 11 6 29>; - interrupt-parent = <&gic>; - }; - - rtc@8100740 { + rtc@c8100740 { compatible = "amlogic,aml8726-rtc"; - reg = <0x8100740 20>; /* aobus 0x1d0 */ - interrupts = <72>; + reg = <0xc8100740 20>; /* aobus 0x1d0 */ + interrupts = <0 72 1>; interrupt-parent = <&gic>; init-always = "false"; @@ -267,62 +201,55 @@ gpo-init = <0x500000>; }; - clkmsr: clkmsr@1108758 { + clkmsr: clkmsr@c1108758 { compatible = "amlogic,aml8726-clkmsr"; - reg = <0x1108758 16>; /* cbus 0x21d6 */ - }; + reg = <0xc1108758 16>; /* cbus 0x21d6 */ - uart0: uart@81004c0 { - /* uart-ao */ - device_type = "serial"; - compatible = "amlogic,aml8726-uart"; - clock-frequency = <0>; - current-speed = <115200>; - reg = <0x81004c0 20>; /* aobus 0x130 */ - interrupts = <90>; - interrupt-parent = <&gic>; + clocks = <&clk81>; }; - gpioao: gpio@8100024 { + gpioao: gpio@c8100024 { /* gpio unit 7 */ compatible = "amlogic,aml8726-gpio"; - reg = <0x8100024 4>, /* oen aobus 0x9 */ - <0x8100024 4>, /* out */ - <0x8100028 4>; /* in */ + reg = <0xc8100024 4>, /* oen aobus 0x9 */ + <0xc8100024 4>, /* out */ + <0xc8100028 4>; /* in */ gpio-controller; #gpio-cells = <1>; pin-count = <14>; }; - gpio3: gpio@1108054 { + gpio3: gpio@c1108054 { compatible = "amlogic,aml8726-gpio"; - reg = <0x1108054 4>, /* oen cbus 0x2015 */ - <0x1108058 4>, /* out */ - <0x110805c 4>; /* in */ + reg = <0xc1108054 4>, /* oen cbus 0x2015 */ + <0xc1108058 4>, /* out */ + <0xc110805c 4>; /* in */ gpio-controller; #gpio-cells = <1>; pin-count = <32>; }; - gpio5: gpio@110806c { + gpio5: gpio@c110806c { compatible = "amlogic,aml8726-gpio"; - reg = <0x110806c 4>, /* oen cbus 0x201b */ - <0x1108070 4>, /* out */ - <0x1108074 4>; /* in */ + reg = <0xc110806c 4>, /* oen cbus 0x201b */ + <0xc1108070 4>, /* out */ + <0xc1108074 4>; /* in */ gpio-controller; #gpio-cells = <1>; pin-count = <32>; }; - mmc@1108c20 { + mmc@c1108c20 { compatible = "amlogic,aml8726-mmc"; - reg = <0x1108c20 32>; /* cbus 0x2308 */ - interrupts = <28>; + reg = <0xc1108c20 32>; /* cbus 0x2308 */ + interrupts = <0 28 1>; interrupt-parent = <&gic>; + clocks = <&clk81>; + pinctrl-names = "default"; pinctrl-0 = <&pins_sdio_b>; @@ -342,11 +269,11 @@ ins-detect = <&gpio5 29 0>; /* card_6 */ }; - sdxc@1108e00 { + sdxc@c1108e00 { compatible = "amlogic,aml8726-sdxc-m8"; clock-frequency = <1275000000>; - reg = <0x1108e00 60>; /* cbus 0x2380 */ - interrupts = <78>; + reg = <0xc1108e00 60>; /* cbus 0x2380 */ + interrupts = <0 78 1>; interrupt-parent = <&gic>; pinctrl-names = "default"; @@ -357,82 +284,33 @@ mmc-rst = <&gpio3 9 0>; /* boot_9 emmc-rst */ }; - rng@1108100 { + rng@c1108100 { compatible = "amlogic,aml8726-rng"; - reg = <0x1108100 8>; /* cbus 0x2040 */ + reg = <0xc1108100 8>; /* cbus 0x2040 */ }; - i2c@1108500 { - /* i2c-a */ - compatible = "amlogic,aml8726-i2c"; - reg = <0x1108500 32>; /* cbus 0x2140 */ - interrupts = <21>; - interrupt-parent = <&gic>; - }; - - i2c@11087c0 { - /* i2c-b */ - compatible = "amlogic,aml8726-i2c"; - reg = <0x11087c0 32>; /* cbus 0x21f0 */ - interrupts = <128>; - interrupt-parent = <&gic>; - }; - - uart@11084c0 { - /* uart-a */ - device_type = "serial"; - compatible = "amlogic,aml8726-uart"; - clock-frequency = <0>; - current-speed = <115200>; - reg = <0x11084c0 20>; /* cbus 0x2130 */ - interrupts = <26>; - interrupt-parent = <&gic>; - }; - - uart@11084dc { - /* uart-b */ - device_type = "serial"; - compatible = "amlogic,aml8726-uart"; - clock-frequency = <0>; - current-speed = <115200>; - reg = <0x11084dc 20>; /* cbus 0x2137 */ - interrupts = <75>; - interrupt-parent = <&gic>; - }; - - uart@1108700 { - /* uart-c */ - device_type = "serial"; - compatible = "amlogic,aml8726-uart"; - clock-frequency = <0>; - current-speed = <115200>; - reg = <0x1108700 20>; /* cbus 0x21c0 */ - interrupts = <93>; - interrupt-parent = <&gic>; - }; - - usb-phy@1108800 { + usb-phy@c1108800 { /* usb-a phy */ compatible = "amlogic,aml8726-m8-usb-phy"; - reg = <0x1108800 32>; /* cbus 0x2200 */ + reg = <0xc1108800 32>; /* cbus 0x2200 */ usb-pwr-en = <&gpioao 5 1>; /* gpioao_5 vbus */ }; - usb-phy@1108820 { + usb-phy@c1108820 { /* usb-b phy */ compatible = "amlogic,aml8726-m8-usb-phy"; - reg = <0x1108820 32>; /* cbus 0x2208 */ + reg = <0xc1108820 32>; /* cbus 0x2208 */ force-aca = "true"; usb-hub-rst = <&gpioao 4 0>; /* gpioao_4 hub-rst */ }; - usb@9040000 { + usb@c9040000 { /* usb-a */ compatible = "synopsys,designware-hs-otg2"; - reg = <0x9040000 0x40000>; /* ahbbus 0x40000*/ - interrupts = <30>; + reg = <0xc9040000 0x40000>; /* ahbbus 0x40000*/ + interrupts = <0 30 4>; interrupt-parent = <&gic>; #address-cells = <1>; #size-cells = <0>; @@ -440,11 +318,11 @@ dr_mode = "host"; }; - usb@90c0000 { + usb@c90c0000 { /* usb-b */ compatible = "synopsys,designware-hs-otg2"; - reg = <0x90c0000 0x40000>; /* ahbbus 0xc0000 */ - interrupts = <31>; + reg = <0xc90c0000 0x40000>; /* ahbbus 0xc0000 */ + interrupts = <0 31 4>; interrupt-parent = <&gic>; #address-cells = <1>; #size-cells = <0>; @@ -452,11 +330,11 @@ dr_mode = "host"; }; - eth@9410000 { + eth@c9410000 { /* ethernet */ compatible = "snps,dwmac"; - reg = <0x9410000 0x2000>; /* ahbbus 0x410000 */ - interrupts = <8>; + reg = <0xc9410000 0x2000>; /* ahbbus 0x410000 */ + interrupts = <0 8 1>; interrupt-parent = <&gic>; #address-cells = <1>; #size-cells = <0>; @@ -464,13 +342,16 @@ eth-phy-rst = <&gpio3 23 0>; /* gpioh_4 phy-rst */ }; - screen: fb@8006020 { + screen: fb@c8006020 { device_type = "display"; compatible = "amlogic,aml8726-fb"; - reg = <0x8006048 12>, /* CANVAS */ - <0x1106800 1024>, /* VIU */ - <0x1107400 1024>; /* VPP */ - interrupts = <2 3 12 13>; + reg = <0xc8006048 12>, /* CANVAS */ + <0xc1106800 1024>, /* VIU */ + <0xc1107400 1024>; /* VPP */ + interrupts = <0 2 1>, + <0 3 1>, + <0 12 1>, + <0 13 1>; interrupt-parent = <&gic>; address = <0x7900000>; /* match memreserve */ @@ -495,3 +376,32 @@ stdout = "uart0"; }; }; + +&clk81 { + clock-frequency = <0>; +}; + +&uart_AO { + status = "okay"; + current-speed = <115200>; +}; + +&uart_A { + status = "okay"; +}; + +&uart_B { + status = "okay"; +}; + +&uart_C { + status = "okay"; +}; + +&i2c_A { + status = "okay"; +}; + +&i2c_B { + status = "okay"; +}; Modified: head/sys/boot/fdt/dts/arm/vsatv102-m6.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/vsatv102-m6.dts Sat Apr 11 08:27:34 2015 (r281414) +++ head/sys/boot/fdt/dts/arm/vsatv102-m6.dts Sat Apr 11 08:27:38 2015 (r281415) @@ -39,6 +39,8 @@ /memreserve/ 0x84900000 0x00600000; /* 6MB frame buffer */ +#include "meson6.dtsi" + / { /* * My development unit visually appears to be a Visson ATV-102 @@ -50,34 +52,15 @@ */ model = "visson,atv-102"; - compatible = "visson,atv-102", "amlogic,aml8726-m6"; + compatible = "visson,atv-102", "amlogic,meson6"; #address-cells = <1>; #size-cells = <1>; - interrupt-parent = <&gic>; - aliases { soc = &soc; screen = &screen; - uart0 = &uart0; - }; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - - cpu@0 { - device_type = "cpu"; - compatible = "arm,cortex-a9"; - reg = <0x0>; - }; - - cpu@1 { - device_type = "cpu"; - compatible = "arm,cortex-a9"; - reg = <0x1>; - }; + uart0 = &uart_AO; }; memory { @@ -85,69 +68,46 @@ reg = <0x80000000 0x40000000>; /* 1GB RAM */ }; - soc: soc@c0000000 { + soc: soc { device_type = "soc"; - compatible = "simple-bus"; bus-frequency = <0>; - #address-cells = <1>; - #size-cells = <1>; - - ranges = <0x0 0xc0000000 0x1a100000>; - - pic: pic@1109a40 { + pic: pic@c1109a40 { device_type = "interrupt-controller"; compatible = "amlogic,aml8726-pic"; - reg = <0x1109a40 128>; /* cbus 0x2690 */ + reg = <0xc1109a40 128>; /* cbus 0x2690 */ interrupt-controller; - #interrupt-cells = <1>; + #interrupt-cells = <3>; }; - gic: gic@4301000 { - device_type = "interrupt-controller"; - compatible = "arm,gic"; - reg = <0x4301000 0x1000>, /* distributer registers */ - <0x4300100 0x0100>; /* CPU if registers */ - - interrupt-controller; - #interrupt-cells = <1>; - }; - - scu: scu@4300000 { + scu: scu@c4300000 { compatible = "arm,cortex-a9-scu"; - reg = <0x4300000 0x1000>; + reg = <0xc4300000 0x1000>; }; - cpuconfig: cpuconfig@1901ff80 { + cpuconfig: cpuconfig@d901ff80 { compatible = "amlogic,aml8726-cpuconfig"; - reg = <0x1901ff80 8>; - }; - - pl310@4200000 { - compatible = "arm,pl310"; - reg = <0x4200000 0x1000>; - interrupts = <61>; /* AM_IRQ1(29) */ - interrupt-parent = <&gic>; + reg = <0xd901ff80 8>; }; - ccm@1104140 { + ccm@c1104140 { compatible = "amlogic,aml8726-ccm"; - reg = <0x1104140 20>; /* cbus 0x1050 */ + reg = <0xc1104140 20>; /* cbus 0x1050 */ functions = "ethernet", "i2c", "rng", "sdio", "uart-a", "uart-b", "uart-c", "usb-a", "usb-b"; }; - pinctrl: pinctrl@11080b0 { + pinctrl: pinctrl@c11080b0 { compatible = "amlogic,aml8726-pinctrl"; - reg = <0x11080b0 40>, /* mux */ - <0x11080e8 24>, /* pu/pd */ - <0x11080e8 24>, /* pull enable */ - <0x8100014 4>, /* ao mux */ - <0x810002c 4>, /* ao pu/pd */ - <0x810002c 4>; /* ao pull enable */ + reg = <0xc11080b0 40>, /* mux */ + <0xc11080e8 24>, /* pu/pd */ + <0xc11080e8 24>, /* pull enable */ + <0xc8100014 4>, /* ao mux */ + <0xc810002c 4>, /* ao pu/pd */ + <0xc810002c 4>; /* ao pull enable */ /* * Currently only pin muxing that deviates @@ -189,27 +149,10 @@ }; }; - watchdog@1109900 { - compatible = "amlogic,aml8726-wdt"; - reg = <0x1109900 8>; /* cbus 0x2640 */ - interrupts = <0>; /* AM_IRQ0(0) */ - interrupt-parent = <&gic>; - }; - - timer@1109940 { - compatible = "amlogic,aml8726-timer"; - reg = <0x1109940 24>; /* cbus 0x2650 */ - interrupts = <10 /* AM_IRQ0(10) */ - 11 /* AM_IRQ0(11) */ - 6 /* AM_IRQ0(6) */ - 29>; /* AM_IRQ0(29) */ - interrupt-parent = <&gic>; - }; - - rtc@1a004340 { + rtc@da004340 { compatible = "amlogic,aml8726-rtc"; - reg = <0x1a004340 20>; /* secbus2 0xd0 */ - interrupts = <72>; /* AM_IRQ2(8) */ + reg = <0xda004340 20>; /* secbus2 0xd0 */ + interrupts = <0 72 1>; /* AM_IRQ2(8) */ interrupt-parent = <&gic>; init-always = "false"; @@ -217,62 +160,55 @@ gpo-init = <0x500000>; }; - clkmsr: clkmsr@1108758 { + clkmsr: clkmsr@c1108758 { compatible = "amlogic,aml8726-clkmsr"; - reg = <0x1108758 16>; /* cbus 0x21d6 */ - }; + reg = <0xc1108758 16>; /* cbus 0x21d6 */ - uart0: uart@81004c0 { - /* uart-ao */ - device_type = "serial"; - compatible = "amlogic,aml8726-uart"; - clock-frequency = <0>; - current-speed = <115200>; - reg = <0x81004c0 20>; /* aobus 0x130 */ - interrupts = <90>; /* AM_IRQ2(26) */ - interrupt-parent = <&gic>; + clocks = <&clk81>; }; - gpioao: gpio@8100024 { + gpioao: gpio@c8100024 { /* gpio unit 7 */ compatible = "amlogic,aml8726-gpio"; - reg = <0x8100024 4>, /* oen aobus 0x9 */ - <0x8100024 4>, /* out */ - <0x8100028 4>; /* in */ + reg = <0xc8100024 4>, /* oen aobus 0x9 */ + <0xc8100024 4>, /* out */ + <0xc8100028 4>; /* in */ gpio-controller; #gpio-cells = <1>; pin-count = <12>; }; - gpio5: gpio@110806c { + gpio5: gpio@c110806c { compatible = "amlogic,aml8726-gpio"; - reg = <0x110806c 4>, /* oen cbus 0x201b */ - <0x1108070 4>, /* out */ - <0x1108074 4>; /* in */ + reg = <0xc110806c 4>, /* oen cbus 0x201b */ + <0xc1108070 4>, /* out */ + <0xc1108074 4>; /* in */ gpio-controller; #gpio-cells = <1>; pin-count = <32>; }; - gpio6: gpio@1108020 { + gpio6: gpio@c1108020 { compatible = "amlogic,aml8726-gpio"; - reg = <0x1108020 4>, /* oen cbus 0x2008 */ - <0x1108024 4>, /* out */ - <0x1108028 4>; /* in */ + reg = <0xc1108020 4>, /* oen cbus 0x2008 */ + <0xc1108024 4>, /* out */ + <0xc1108028 4>; /* in */ gpio-controller; #gpio-cells = <1>; pin-count = <29>; }; - mmc@1108c20 { + mmc@c1108c20 { compatible = "amlogic,aml8726-mmc"; - reg = <0x1108c20 32>; /* cbus 0x2308 */ - interrupts = <28>; /* AM_IRQ0(28) */ + reg = <0xc1108c20 32>; /* cbus 0x2308 */ + interrupts = <0 28 1>; /* AM_IRQ0(28) */ interrupt-parent = <&gic>; + clocks = <&clk81>; + pinctrl-names = "default"; pinctrl-0 = <&pins_sdio_b>; @@ -282,90 +218,41 @@ ins-detect = <&gpio5 29 0>; /* card_6 */ }; - rng@1108100 { + rng@c1108100 { compatible = "amlogic,aml8726-rng"; - reg = <0x1108100 8>; /* cbus 0x2040 */ - }; - - i2c@1108500 { - /* i2c-a */ - compatible = "amlogic,aml8726-i2c"; - reg = <0x1108500 32>; /* cbus 0x2140 */ - interrupts = <21>; - interrupt-parent = <&gic>; - }; - - i2c@11087c0 { - /* i2c-b */ - compatible = "amlogic,aml8726-i2c"; - reg = <0x11087c0 32>; /* cbus 0x21f0 */ - interrupts = <128>; - interrupt-parent = <&gic>; - }; - - uart@11084c0 { - /* uart-a */ - device_type = "serial"; - compatible = "amlogic,aml8726-uart"; - clock-frequency = <0>; - current-speed = <115200>; - reg = <0x11084c0 20>; /* cbus 0x2130 */ - interrupts = <26>; - interrupt-parent = <&gic>; - }; - - uart@11084dc { - /* uart-b */ - device_type = "serial"; - compatible = "amlogic,aml8726-uart"; - clock-frequency = <0>; - current-speed = <115200>; - reg = <0x11084dc 20>; /* cbus 0x2137 */ - interrupts = <75>; - interrupt-parent = <&gic>; + reg = <0xc1108100 8>; /* cbus 0x2040 */ }; - uart@1108700 { - /* uart-c */ - device_type = "serial"; - compatible = "amlogic,aml8726-uart"; - clock-frequency = <0>; - current-speed = <115200>; - reg = <0x1108700 20>; /* cbus 0x21c0 */ - interrupts = <93>; - interrupt-parent = <&gic>; - }; - - usb-phy@1108400 { + usb-phy@c1108400 { /* usb-a phy */ compatible = "amlogic,aml8726-m6-usb-phy"; - reg = <0x1108400 32>; /* cbus 0x2100 */ + reg = <0xc1108400 32>; /* cbus 0x2100 */ }; - usb-phy@1108420 { + usb-phy@c1108420 { /* usb-b phy */ compatible = "amlogic,aml8726-m6-usb-phy"; - reg = <0x1108420 32>; /* cbus 0x2108 */ + reg = <0xc1108420 32>; /* cbus 0x2108 */ usb-pwr-en = <&gpioao 3 1>, /* gpioao_3 vbus */ <&gpio6 11 0>; /* gpioe_11 wifi */ }; - usb@9040000 { + usb@c9040000 { /* usb-a */ compatible = "synopsys,designware-hs-otg2"; - reg = <0x9040000 0x40000>; /* ahbbus 0x40000*/ - interrupts = <30>; /* AM_IRQ0(30) */ + reg = <0xc9040000 0x40000>; /* ahbbus 0x40000*/ + interrupts = <0 30 4>; /* AM_IRQ0(30) */ interrupt-parent = <&gic>; #address-cells = <1>; #size-cells = <0>; }; - usb@90c0000 { + usb@c90c0000 { /* usb-b */ compatible = "synopsys,designware-hs-otg2"; - reg = <0x90c0000 0x40000>; /* ahbbus 0xc0000 */ - interrupts = <31>; /* AM_IRQ0(31) */ + reg = <0xc90c0000 0x40000>; /* ahbbus 0xc0000 */ + interrupts = <0 31 4>; /* AM_IRQ0(31) */ interrupt-parent = <&gic>; #address-cells = <1>; #size-cells = <0>; @@ -373,11 +260,11 @@ dr_mode = "host"; }; - eth@9410000 { + eth@c9410000 { /* ethernet */ compatible = "snps,dwmac"; - reg = <0x9410000 0x2000>; /* ahbbus 0x410000 */ - interrupts = <8>; /* AM_IRQ0(8) */ + reg = <0xc9410000 0x2000>; /* ahbbus 0x410000 */ + interrupts = <0 8 1>; /* AM_IRQ0(8) */ interrupt-parent = <&gic>; #address-cells = <1>; #size-cells = <0>; @@ -385,16 +272,16 @@ eth-phy-rst = <&gpio5 15 0>; /* gpioy_15 phy-rst */ }; - screen: fb@8006324 { + screen: fb@c8006324 { device_type = "display"; compatible = "amlogic,aml8726-fb"; - reg = <0x8006324 12>, /* CANVAS */ - <0x1106800 1024>, /* VIU */ - <0x1107400 1024>; /* VPP */ - interrupts = <2 /* AM_IRQ0(2) */ - 3 /* AM_IRQ0(3) */ - 12 /* AM_IRQ0(12) */ - 13>; /* AM_IRQ0(13) */ + reg = <0xc8006324 12>, /* CANVAS */ + <0xc1106800 1024>, /* VIU */ + <0xc1107400 1024>; /* VPP */ + interrupts = <0 2 1>, /* AM_IRQ0(2) */ + <0 3 1>, /* AM_IRQ0(3) */ + <0 12 1>, /* AM_IRQ0(12) */ + <0 13 1>; /* AM_IRQ0(13) */ interrupt-parent = <&gic>; address = <0x84900000>; /* match memreserve */ @@ -410,3 +297,12 @@ stdout = "uart0"; }; }; + +&clk81 { + clock-frequency = <0>; +}; + +&uart_AO { + status = "okay"; + current-speed = <115200>; +}; From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 08:30:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F471484; Sat, 11 Apr 2015 08:30:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61652222; Sat, 11 Apr 2015 08:30:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B8Uddp072973; Sat, 11 Apr 2015 08:30:39 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B8Uc1m072970; Sat, 11 Apr 2015 08:30:38 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201504110830.t3B8Uc1m072970@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Sat, 11 Apr 2015 08:30:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281416 - head/sys/arm/amlogic/aml8726 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 08:30:39 -0000 Author: ganbold Date: Sat Apr 11 08:30:37 2015 New Revision: 281416 URL: https://svnweb.freebsd.org/changeset/base/281416 Log: This modifies several FreeBSD drivers to use the hardware strings present in the GNU dts files. Submitted by: John Wehle Reviewed by: imp Modified: head/sys/arm/amlogic/aml8726/aml8726_i2c.c head/sys/arm/amlogic/aml8726/aml8726_timer.c head/sys/arm/amlogic/aml8726/aml8726_wdt.c Modified: head/sys/arm/amlogic/aml8726/aml8726_i2c.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_i2c.c Sat Apr 11 08:27:38 2015 (r281415) +++ head/sys/arm/amlogic/aml8726/aml8726_i2c.c Sat Apr 11 08:30:37 2015 (r281416) @@ -93,7 +93,7 @@ aml8726_iic_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "amlogic,aml8726-i2c")) + if (!ofw_bus_is_compatible(dev, "amlogic,meson6-i2c")) return (ENXIO); device_set_desc(dev, "Amlogic aml8726 I2C"); Modified: head/sys/arm/amlogic/aml8726/aml8726_timer.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_timer.c Sat Apr 11 08:27:38 2015 (r281415) +++ head/sys/arm/amlogic/aml8726/aml8726_timer.c Sat Apr 11 08:30:37 2015 (r281416) @@ -226,7 +226,7 @@ aml8726_timer_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "amlogic,aml8726-timer")) + if (!ofw_bus_is_compatible(dev, "amlogic,meson6-timer")) return (ENXIO); device_set_desc(dev, "Amlogic aml8726 timer"); Modified: head/sys/arm/amlogic/aml8726/aml8726_wdt.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_wdt.c Sat Apr 11 08:27:38 2015 (r281415) +++ head/sys/arm/amlogic/aml8726/aml8726_wdt.c Sat Apr 11 08:30:37 2015 (r281416) @@ -167,7 +167,7 @@ aml8726_wdt_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "amlogic,aml8726-wdt")) + if (!ofw_bus_is_compatible(dev, "amlogic,meson6-wdt")) return (ENXIO); device_set_desc(dev, "Amlogic aml8726 WDT"); From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 08:34:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BEC06D5; Sat, 11 Apr 2015 08:34:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F3AF23C; Sat, 11 Apr 2015 08:34:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3B8YhhF077046; Sat, 11 Apr 2015 08:34:43 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B8YgHC077037; Sat, 11 Apr 2015 08:34:42 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201504110834.t3B8YgHC077037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Sat, 11 Apr 2015 08:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281418 - head/sys/arm/amlogic/aml8726 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 08:34:44 -0000 Author: ganbold Date: Sat Apr 11 08:34:41 2015 New Revision: 281418 URL: https://svnweb.freebsd.org/changeset/base/281418 Log: This modifies several FreeBSD drivers to use the GNU approach to supply clk81 information. It also changes the hardware strings in some of the drivers to match what's present in the GNU files. Submitted by: John Wehle Reviewed by: imp Modified: head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c head/sys/arm/amlogic/aml8726/aml8726_identsoc.c head/sys/arm/amlogic/aml8726/aml8726_machdep.c head/sys/arm/amlogic/aml8726/aml8726_mmc.c head/sys/arm/amlogic/aml8726/aml8726_soc.h head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c Modified: head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c Sat Apr 11 08:34:34 2015 (r281417) +++ head/sys/arm/amlogic/aml8726/aml8726_clkmsr.c Sat Apr 11 08:34:41 2015 (r281418) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include @@ -147,6 +148,30 @@ aml8726_clkmsr_clock_frequency(struct am return value; } +static void +aml8726_clkmsr_fixup_clk81(struct aml8726_clkmsr_softc *sc, int freq) +{ + pcell_t prop; + ssize_t len; + phandle_t clk_node; + phandle_t node; + + node = ofw_bus_get_node(sc->dev); + + len = OF_getencprop(node, "clocks", &prop, sizeof(prop)); + if ((len / sizeof(prop)) != 1 || prop == 0 || + (clk_node = OF_node_from_xref(prop)) == 0) + return; + + len = OF_getencprop(clk_node, "clock-frequency", &prop, sizeof(prop)); + if ((len / sizeof(prop)) != 1 || prop != 0) + return; + + freq = cpu_to_fdt32(freq); + + OF_setprop(clk_node, "clock-frequency", (void *)&freq, sizeof(freq)); +} + static int aml8726_clkmsr_probe(device_t dev) { @@ -178,6 +203,8 @@ aml8726_clkmsr_attach(device_t dev) freq = aml8726_clkmsr_clock_frequency(sc, AML_CLKMSR_CLK81); device_printf(sc->dev, "bus clock %u MHz\n", freq); + aml8726_clkmsr_fixup_clk81(sc, freq * 1000000); + return (0); } @@ -209,8 +236,8 @@ static driver_t aml8726_clkmsr_driver = static devclass_t aml8726_clkmsr_devclass; -DRIVER_MODULE(clkmsr, simplebus, aml8726_clkmsr_driver, - aml8726_clkmsr_devclass, 0, 0); +EARLY_DRIVER_MODULE(clkmsr, simplebus, aml8726_clkmsr_driver, + aml8726_clkmsr_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_EARLY); int aml8726_clkmsr_bus_frequency() @@ -222,6 +249,9 @@ aml8726_clkmsr_bus_frequency() u_long start, size; int freq; + KASSERT(aml8726_soc_hw_rev != AML_SOC_HW_REV_UNKNOWN, + ("aml8726_soc_hw_rev isn't initialized")); + /* * Try to access the clkmsr node directly i.e. through /aliases/. */ Modified: head/sys/arm/amlogic/aml8726/aml8726_identsoc.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_identsoc.c Sat Apr 11 08:34:34 2015 (r281417) +++ head/sys/arm/amlogic/aml8726/aml8726_identsoc.c Sat Apr 11 08:34:41 2015 (r281418) @@ -59,8 +59,8 @@ __FBSDID("$FreeBSD$"); #include -uint32_t aml8726_soc_hw_rev = 0xffffffff; -uint32_t aml8726_soc_metal_rev = 0xffffffff; +uint32_t aml8726_soc_hw_rev = AML_SOC_HW_REV_UNKNOWN; +uint32_t aml8726_soc_metal_rev = AML_SOC_METAL_REV_UNKNOWN; static const struct { uint32_t hw_rev; @@ -86,11 +86,10 @@ static const struct { { 0xff, NULL } }; -static void -aml8726_identify_soc(void *dummy) +void +aml8726_identify_soc() { int err; - int i; struct resource res; memset(&res, 0, sizeof(res)); @@ -108,6 +107,12 @@ aml8726_identify_soc(void *dummy) aml8726_soc_metal_rev = bus_read_4(&res, AML_SOC_METAL_REV_REG); bus_space_unmap(res.r_bustag, res.r_bushandle, 0x100000); +} + +static void +aml8726_identify_announce_soc(void *dummy) +{ + int i; for (i = 0; aml8726_soc_desc[i].desc; i++) if (aml8726_soc_desc[i].hw_rev == aml8726_soc_hw_rev) @@ -133,5 +138,5 @@ aml8726_identify_soc(void *dummy) printf("\n"); } -SYSINIT(aml8726_identify_soc, SI_SUB_CPU, SI_ORDER_SECOND, - aml8726_identify_soc, NULL); +SYSINIT(aml8726_identify_announce_soc, SI_SUB_CPU, SI_ORDER_SECOND, + aml8726_identify_announce_soc, NULL); Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_machdep.c Sat Apr 11 08:34:34 2015 (r281417) +++ head/sys/arm/amlogic/aml8726/aml8726_machdep.c Sat Apr 11 08:34:41 2015 (r281418) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #if defined(SOCDEV_PA) && defined(SOCDEV_VA) @@ -55,12 +56,12 @@ vm_offset_t aml8726_aobus_kva_base; static void aml8726_fixup_busfreq() { - phandle_t node, child; + phandle_t node; pcell_t freq, prop; ssize_t len; /* - * Set the bus-frequency for any top level SoC simple-bus which + * Set the bus-frequency for the SoC simple-bus if it * needs updating (meaning the current frequency is zero). */ @@ -74,16 +75,6 @@ aml8726_fixup_busfreq() len = OF_getencprop(node, "bus-frequency", &prop, sizeof(prop)); if ((len / sizeof(prop)) == 1 && prop == 0) OF_setprop(node, "bus-frequency", (void *)&freq, sizeof(freq)); - - for (child = OF_child(node); child != 0; child = OF_peer(child)) { - if (fdt_is_compatible_strict(child, "simple-bus")) { - len = OF_getencprop(child, "bus-frequency", - &prop, sizeof(prop)); - if ((len / sizeof(prop)) == 1 && prop == 0) - OF_setprop(child, "bus-frequency", - (void *)&freq, sizeof(freq)); - } - } } vm_offset_t @@ -116,6 +107,13 @@ platform_gpio_init(void) (vm_offset_t)arm_devmap_ptov(0xc8100000, 0x100000); /* + * The hardware mux used by clkmsr is unique to the SoC (though + * currently clk81 is at a fixed location, however that might + * change in the future). + */ + aml8726_identify_soc(); + + /* * This FDT fixup should arguably be called through fdt_fixup_table, * however currently there's no mechanism to specify a fixup which * should always be invoked. @@ -179,13 +177,13 @@ fdt_pic_decode_ic(phandle_t node, pcell_ * multi core chips also have a GIC. */ #ifdef SMP - if (!fdt_is_compatible_strict(node, "arm,gic")) + if (!fdt_is_compatible_strict(node, "arm,cortex-a9-gic")) #else if (!fdt_is_compatible_strict(node, "amlogic,aml8726-pic")) #endif return (ENXIO); - *interrupt = fdt32_to_cpu(intr[0]); + *interrupt = fdt32_to_cpu(intr[1]); *trig = INTR_TRIGGER_EDGE; *pol = INTR_POLARITY_HIGH; Modified: head/sys/arm/amlogic/aml8726/aml8726_mmc.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_mmc.c Sat Apr 11 08:34:34 2015 (r281417) +++ head/sys/arm/amlogic/aml8726/aml8726_mmc.c Sat Apr 11 08:34:41 2015 (r281418) @@ -107,6 +107,25 @@ static struct resource_spec aml8726_mmc_ #define PWR_OFF_FLAG(pol) ((pol) == 0 ? GPIO_PIN_HIGH : \ GPIO_PIN_LOW) +static unsigned int +aml8726_mmc_clk(phandle_t node) +{ + pcell_t prop; + ssize_t len; + phandle_t clk_node; + + len = OF_getencprop(node, "clocks", &prop, sizeof(prop)); + if ((len / sizeof(prop)) != 1 || prop == 0 || + (clk_node = OF_node_from_xref(prop)) == 0) + return (0); + + len = OF_getencprop(clk_node, "clock-frequency", &prop, sizeof(prop)); + if ((len / sizeof(prop)) != 1 || prop == 0) + return (0); + + return ((unsigned int)prop); +} + static void aml8726_mmc_mapmem(void *arg, bus_dma_segment_t *segs, int nseg, int error) { @@ -502,15 +521,13 @@ aml8726_mmc_attach(device_t dev) node = ofw_bus_get_node(dev); - len = OF_getencprop(OF_parent(node), "bus-frequency", - prop, sizeof(prop)); - if ((len / sizeof(prop[0])) != 1 || prop[0] == 0) { - device_printf(dev, "missing bus-frequency attribute in FDT\n"); + sc->ref_freq = aml8726_mmc_clk(node); + + if (sc->ref_freq == 0) { + device_printf(dev, "missing clocks attribute in FDT\n"); return (ENXIO); } - sc->ref_freq = prop[0]; - /* * The pins must be specified as part of the device in order * to know which port to used. Modified: head/sys/arm/amlogic/aml8726/aml8726_soc.h ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_soc.h Sat Apr 11 08:34:34 2015 (r281417) +++ head/sys/arm/amlogic/aml8726/aml8726_soc.h Sat Apr 11 08:34:41 2015 (r281418) @@ -32,8 +32,11 @@ #define AML_SOC_AOBUS_BASE_ADDR 0xc8100000 #define AML_SOC_CBUS_BASE_ADDR 0xc1100000 +void aml8726_identify_soc(void); + /* cbus */ #define AML_SOC_HW_REV_REG 0x7d4c +#define AML_SOC_HW_REV_UNKNOWN 0xffffffff #define AML_SOC_HW_REV_M3 0x15 #define AML_SOC_HW_REV_M6 0x16 #define AML_SOC_HW_REV_M6TV 0x17 @@ -42,6 +45,7 @@ #define AML_SOC_HW_REV_M8B 0x1b #define AML_SOC_METAL_REV_REG 0x81a8 +#define AML_SOC_METAL_REV_UNKNOWN 0xffffffff #define AML_SOC_M8_METAL_REV_A 0x11111111 #define AML_SOC_M8_METAL_REV_M2_A 0x11111112 #define AML_SOC_M8_METAL_REV_B 0x11111113 Modified: head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c ============================================================================== --- head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c Sat Apr 11 08:34:34 2015 (r281417) +++ head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c Sat Apr 11 08:34:41 2015 (r281418) @@ -48,6 +48,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include + #include #include #include @@ -262,6 +266,25 @@ struct uart_ops aml8726_uart_ops = { .getc = aml8726_uart_getc, }; +static unsigned int +aml8726_uart_bus_clk(phandle_t node) +{ + pcell_t prop; + ssize_t len; + phandle_t clk_node; + + len = OF_getencprop(node, "clocks", &prop, sizeof(prop)); + if ((len / sizeof(prop)) != 1 || prop == 0 || + (clk_node = OF_node_from_xref(prop)) == 0) + return (0); + + len = OF_getencprop(clk_node, "clock-frequency", &prop, sizeof(prop)); + if ((len / sizeof(prop)) != 1 || prop == 0) + return (0); + + return ((unsigned int)prop); +} + static int aml8726_uart_bus_probe(struct uart_softc *sc) { @@ -330,8 +353,10 @@ aml8726_uart_bus_attach(struct uart_soft bas = &sc->sc_bas; + bas->rclk = aml8726_uart_bus_clk(ofw_bus_get_node(sc->sc_dev)); + if (bas->rclk == 0) { - device_printf(sc->sc_dev, "missing clock attribute in FDT\n"); + device_printf(sc->sc_dev, "missing clocks attribute in FDT\n"); return (ENXIO); } @@ -703,7 +728,7 @@ struct uart_class uart_aml8726_class = { }; static struct ofw_compat_data compat_data[] = { - { "amlogic,aml8726-uart", (uintptr_t)&uart_aml8726_class }, + { "amlogic,meson-uart", (uintptr_t)&uart_aml8726_class }, { NULL, (uintptr_t)NULL } }; UART_FDT_CLASS_AND_DEVICE(compat_data); From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 10:07:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C0BD3DC; Sat, 11 Apr 2015 10:07:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CACAD20; Sat, 11 Apr 2015 10:07:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BA7wMS020565; Sat, 11 Apr 2015 10:07:58 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BA7wDn020564; Sat, 11 Apr 2015 10:07:58 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504111007.t3BA7wDn020564@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 11 Apr 2015 10:07:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281431 - head/sys/boot/efi/loader/arch/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 10:07:59 -0000 Author: andrew Date: Sat Apr 11 10:07:58 2015 New Revision: 281431 URL: https://svnweb.freebsd.org/changeset/base/281431 Log: Update the arm efi ldscript to generate a valid efi binary Modified: head/sys/boot/efi/loader/arch/arm/ldscript.arm Modified: head/sys/boot/efi/loader/arch/arm/ldscript.arm ============================================================================== --- head/sys/boot/efi/loader/arch/arm/ldscript.arm Sat Apr 11 09:28:53 2015 (r281430) +++ head/sys/boot/efi/loader/arch/arm/ldscript.arm Sat Apr 11 10:07:58 2015 (r281431) @@ -8,10 +8,8 @@ SECTIONS /* Read-only sections, merged into text segment: */ . = 0; ImageBase = .; - .peheader : { - *(.peheader) - } .text : { + *(.peheader) *(.text .stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) @@ -22,65 +20,43 @@ SECTIONS . = ALIGN(4096); .data : { - *(.data) + *(.data *.data.*) *(.gnu.linkonce.d*) *(.rodata) *(.rodata.*) CONSTRUCTORS + + PROVIDE (__bss_start = .); + *(.sbss) + *(.scommon) + *(.dynsbss) + *(.dynbss) + *(.bss) + *(COMMON) + PROVIDE (__bss_end = .); } - .data1 : { *(.data1) } - .got1 : { *(.got1) } - .dynamic : { *(.dynamic) } - /* Put .ctors and .dtors next to the .got2 section, so that the pointers - get relocated with -mrelocatable. Also put in the .fixup pointers. - The current compiler no longer needs this, but keep it around for 2.7.2 */ - PROVIDE (_GOT2_START_ = .); - .got2 : { *(.got2) } - PROVIDE (__CTOR_LIST__ = .); - .ctors : { *(.ctors) } - PROVIDE (__CTOR_END__ = .); - PROVIDE (__DTOR_LIST__ = .); - .dtors : { *(.dtors) } - PROVIDE (__DTOR_END__ = .); - PROVIDE (_FIXUP_START_ = .); - .fixup : { *(.fixup) } - PROVIDE (_FIXUP_END_ = .); - PROVIDE (_GOT2_END_ = .); - PROVIDE (_GOT_START_ = .); - .got : { *(.got) } - .got.plt : { *(.got.plt) } - PROVIDE (_GOT_END_ = .); /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ - .sdata : { *(.sdata) } - _edata = .; - PROVIDE (edata = .); + .sdata : { + *(.got.plt .got) + *(.sdata*.sdata.* .gnu.linkonce.s.*) + } set_Xcommand_set : { __start_set_Xcommand_set = .; *(set_Xcommand_set) __stop_set_Xcommand_set = .; } __gp = .; - PROVIDE (__bss_start = .); - .sbss : - { - *(.sbss) - *(.scommon) - *(.dynsbss) - } - .bss : - { - *(.dynbss) - *(.bss) - *(COMMON) - } - PROVIDE (__bss_end = .); .plt : { *(.plt) } .dynamic : { *(.dynamic) } .reloc : { *(.reloc) } - .hash : { *(.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } + .rel.dyn : { + *(.rel.*) + *(.relset_*) + } _edata = .; + .hash : { *(.hash) } } From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 10:21:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DBCE6CB; Sat, 11 Apr 2015 10:21:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2B58E91; Sat, 11 Apr 2015 10:21:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BALSJW029270; Sat, 11 Apr 2015 10:21:28 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BALR0P029265; Sat, 11 Apr 2015 10:21:27 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504111021.t3BALR0P029265@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 11 Apr 2015 10:21:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281433 - in head/sys/boot/efi/loader: . arch/amd64 arch/arm arch/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 10:21:29 -0000 Author: andrew Date: Sat Apr 11 10:21:26 2015 New Revision: 281433 URL: https://svnweb.freebsd.org/changeset/base/281433 Log: Move reloc.c to the top level Makefile as it has become generic. Modified: head/sys/boot/efi/loader/Makefile head/sys/boot/efi/loader/arch/amd64/Makefile.inc head/sys/boot/efi/loader/arch/arm/Makefile.inc head/sys/boot/efi/loader/arch/i386/Makefile.inc Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Sat Apr 11 10:14:59 2015 (r281432) +++ head/sys/boot/efi/loader/Makefile Sat Apr 11 10:21:26 2015 (r281433) @@ -20,6 +20,7 @@ SRCS= autoload.c \ copy.c \ devicename.c \ main.c \ + reloc.c \ smbios.c \ vers.c Modified: head/sys/boot/efi/loader/arch/amd64/Makefile.inc ============================================================================== --- head/sys/boot/efi/loader/arch/amd64/Makefile.inc Sat Apr 11 10:14:59 2015 (r281432) +++ head/sys/boot/efi/loader/arch/amd64/Makefile.inc Sat Apr 11 10:21:26 2015 (r281433) @@ -3,8 +3,7 @@ SRCS+= amd64_tramp.S \ start.S \ framebuffer.c \ - elf64_freebsd.c \ - reloc.c + elf64_freebsd.c .PATH: ${.CURDIR}/../../i386/libi386 SRCS+= nullconsole.c \ Modified: head/sys/boot/efi/loader/arch/arm/Makefile.inc ============================================================================== --- head/sys/boot/efi/loader/arch/arm/Makefile.inc Sat Apr 11 10:14:59 2015 (r281432) +++ head/sys/boot/efi/loader/arch/arm/Makefile.inc Sat Apr 11 10:21:26 2015 (r281433) @@ -1,5 +1,4 @@ # $FreeBSD$ SRCS+= exec.c \ - start.S \ - reloc.c + start.S Modified: head/sys/boot/efi/loader/arch/i386/Makefile.inc ============================================================================== --- head/sys/boot/efi/loader/arch/i386/Makefile.inc Sat Apr 11 10:14:59 2015 (r281432) +++ head/sys/boot/efi/loader/arch/i386/Makefile.inc Sat Apr 11 10:21:26 2015 (r281433) @@ -3,8 +3,7 @@ SRCS+= start.S \ efimd.c \ elf32_freebsd.c \ - exec.c \ - reloc.c + exec.c .PATH: ${.CURDIR}/../../i386/libi386 SRCS+= nullconsole.c \ From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 10:36:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48B1DB6E; Sat, 11 Apr 2015 10:36:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19AC3F96; Sat, 11 Apr 2015 10:36:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BAanVA034845; Sat, 11 Apr 2015 10:36:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BAangB034839; Sat, 11 Apr 2015 10:36:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504111036.t3BAangB034839@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 11 Apr 2015 10:36:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281434 - in head/sys/boot/efi/loader: . arch/amd64 arch/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 10:36:50 -0000 Author: andrew Date: Sat Apr 11 10:36:48 2015 New Revision: 281434 URL: https://svnweb.freebsd.org/changeset/base/281434 Log: Only add -fPIC to CFLAGS and -Wl,-znocombreloc to LDFLAGS on x86, they shouldn't be used on arm. Modified: head/sys/boot/efi/loader/Makefile head/sys/boot/efi/loader/arch/amd64/Makefile.inc head/sys/boot/efi/loader/arch/i386/Makefile.inc Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Sat Apr 11 10:21:26 2015 (r281433) +++ head/sys/boot/efi/loader/Makefile Sat Apr 11 10:36:48 2015 (r281434) @@ -29,7 +29,6 @@ SRCS= autoload.c \ .PATH: ${.CURDIR}/../../i386/libi386 .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" -CFLAGS+= -fPIC CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/arch/${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/../include @@ -72,7 +71,7 @@ FILES= loader.efi FILESMODE_loader.efi= ${BINMODE} LDSCRIPT= ${.CURDIR}/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH} -LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared -Wl,-znocombreloc +LDFLAGS+= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared CLEANFILES= vers.c loader.efi Modified: head/sys/boot/efi/loader/arch/amd64/Makefile.inc ============================================================================== --- head/sys/boot/efi/loader/arch/amd64/Makefile.inc Sat Apr 11 10:21:26 2015 (r281433) +++ head/sys/boot/efi/loader/arch/amd64/Makefile.inc Sat Apr 11 10:36:48 2015 (r281434) @@ -8,3 +8,6 @@ SRCS+= amd64_tramp.S \ .PATH: ${.CURDIR}/../../i386/libi386 SRCS+= nullconsole.c \ comconsole.c + +CFLAGS+= -fPIC +LDFLAGS+= -Wl,-znocombreloc Modified: head/sys/boot/efi/loader/arch/i386/Makefile.inc ============================================================================== --- head/sys/boot/efi/loader/arch/i386/Makefile.inc Sat Apr 11 10:21:26 2015 (r281433) +++ head/sys/boot/efi/loader/arch/i386/Makefile.inc Sat Apr 11 10:36:48 2015 (r281434) @@ -8,3 +8,6 @@ SRCS+= start.S \ .PATH: ${.CURDIR}/../../i386/libi386 SRCS+= nullconsole.c \ comconsole.c + +CFLAGS+= -fPIC +LDFLAGS+= -Wl,-znocombreloc From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 11:00:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54C99389; Sat, 11 Apr 2015 11:00:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4027B1FD; Sat, 11 Apr 2015 11:00:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BB0sTg047570; Sat, 11 Apr 2015 11:00:54 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BB0sjq047569; Sat, 11 Apr 2015 11:00:54 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504111100.t3BB0sjq047569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 11 Apr 2015 11:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281435 - head/sys/boot/efi/loader/arch/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 11:00:54 -0000 Author: andrew Date: Sat Apr 11 11:00:53 2015 New Revision: 281435 URL: https://svnweb.freebsd.org/changeset/base/281435 Log: Add fdt support to the arm loader.efi Modified: head/sys/boot/efi/loader/arch/arm/Makefile.inc Modified: head/sys/boot/efi/loader/arch/arm/Makefile.inc ============================================================================== --- head/sys/boot/efi/loader/arch/arm/Makefile.inc Sat Apr 11 10:36:48 2015 (r281434) +++ head/sys/boot/efi/loader/arch/arm/Makefile.inc Sat Apr 11 11:00:53 2015 (r281435) @@ -2,3 +2,5 @@ SRCS+= exec.c \ start.S + +LOADER_FDT_SUPPORT=yes From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 15:40:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C22A6C2A; Sat, 11 Apr 2015 15:40:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A31251AB; Sat, 11 Apr 2015 15:40:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BFeYAN079415; Sat, 11 Apr 2015 15:40:34 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BFeTRZ079398; Sat, 11 Apr 2015 15:40:29 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201504111540.t3BFeTRZ079398@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 11 Apr 2015 15:40:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281436 - in head/sys: compat/svr4 dev/streams kern netinet ofed/include/linux sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 15:40:34 -0000 Author: mjg Date: Sat Apr 11 15:40:28 2015 New Revision: 281436 URL: https://svnweb.freebsd.org/changeset/base/281436 Log: fd: remove filedesc argument from fdclose Just accept a thread instead. This makes it consistent with fdalloc. No functional changes. Modified: head/sys/compat/svr4/svr4_stream.c head/sys/dev/streams/streams.c head/sys/kern/kern_descrip.c head/sys/kern/kern_fork.c head/sys/kern/sys_pipe.c head/sys/kern/tty_pts.c head/sys/kern/uipc_mqueue.c head/sys/kern/uipc_sem.c head/sys/kern/uipc_shm.c head/sys/kern/uipc_syscalls.c head/sys/netinet/sctp_syscalls.c head/sys/ofed/include/linux/file.h head/sys/sys/filedesc.h Modified: head/sys/compat/svr4/svr4_stream.c ============================================================================== --- head/sys/compat/svr4/svr4_stream.c Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/compat/svr4/svr4_stream.c Sat Apr 11 15:40:28 2015 (r281436) @@ -1829,7 +1829,7 @@ svr4_do_getmsg(td, uap, fp) break; default: - fdclose(td->td_proc->p_fd, afp, st->s_afd, td); + fdclose(td, afp, st->s_afd); fdrop(afp, td); st->s_afd = -1; mtx_unlock(&Giant); @@ -1967,7 +1967,7 @@ svr4_do_getmsg(td, uap, fp) if (error) { if (afp) { - fdclose(td->td_proc->p_fd, afp, st->s_afd, td); + fdclose(td, afp, st->s_afd); fdrop(afp, td); st->s_afd = -1; } Modified: head/sys/dev/streams/streams.c ============================================================================== --- head/sys/dev/streams/streams.c Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/dev/streams/streams.c Sat Apr 11 15:40:28 2015 (r281436) @@ -180,7 +180,6 @@ MODULE_VERSION(streams, 1); static int streamsopen(struct cdev *dev, int oflags, int devtype, struct thread *td) { - struct filedesc *fdp; struct svr4_strm *st; struct socket *so; struct file *fp; @@ -236,14 +235,13 @@ streamsopen(struct cdev *dev, int oflags return EOPNOTSUPP; } - fdp = td->td_proc->p_fd; if ((error = falloc(td, &fp, &fd, 0)) != 0) return error; /* An extra reference on `fp' has been held for us by falloc(). */ error = socreate(family, &so, type, protocol, td->td_ucred, td); if (error) { - fdclose(fdp, fp, fd, td); + fdclose(td, fp, fd); fdrop(fp, td); return error; } Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/kern/kern_descrip.c Sat Apr 11 15:40:28 2015 (r281436) @@ -2155,8 +2155,9 @@ fdsetugidsafety(struct thread *td) * file descriptor out from under the thread creating the file object. */ void -fdclose(struct filedesc *fdp, struct file *fp, int idx, struct thread *td) +fdclose(struct thread *td, struct file *fp, int idx) { + struct filedesc *fdp = td->td_proc->p_fd; FILEDESC_XLOCK(fdp); if (fdp->fd_ofiles[idx].fde_file == fp) { Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/kern/kern_fork.c Sat Apr 11 15:40:28 2015 (r281436) @@ -949,7 +949,7 @@ fail2: vmspace_free(vm2); uma_zfree(proc_zone, newproc); if ((flags & RFPROCDESC) != 0 && fp_procdesc != NULL) { - fdclose(td->td_proc->p_fd, fp_procdesc, *procdescp, td); + fdclose(td, fp_procdesc, *procdescp); fdrop(fp_procdesc, td); } pause("fork", hz / 2); Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/kern/sys_pipe.c Sat Apr 11 15:40:28 2015 (r281436) @@ -406,13 +406,11 @@ kern_pipe(struct thread *td, int fildes[ int kern_pipe2(struct thread *td, int fildes[2], int flags) { - struct filedesc *fdp; struct file *rf, *wf; struct pipe *rpipe, *wpipe; struct pipepair *pp; int fd, fflags, error; - fdp = td->td_proc->p_fd; pipe_paircreate(td, &pp); rpipe = &pp->pp_rpipe; wpipe = &pp->pp_wpipe; @@ -438,7 +436,7 @@ kern_pipe2(struct thread *td, int fildes finit(rf, fflags, DTYPE_PIPE, rpipe, &pipeops); error = falloc(td, &wf, &fd, flags); if (error) { - fdclose(fdp, rf, fildes[0], td); + fdclose(td, rf, fildes[0]); fdrop(rf, td); /* rpipe has been closed by fdrop(). */ pipeclose(wpipe); Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/kern/tty_pts.c Sat Apr 11 15:40:28 2015 (r281436) @@ -845,7 +845,7 @@ sys_posix_openpt(struct thread *td, stru /* Allocate the actual pseudo-TTY. */ error = pts_alloc(FFLAGS(uap->flags & O_ACCMODE), td, fp); if (error != 0) { - fdclose(td->td_proc->p_fd, fp, fd, td); + fdclose(td, fp, fd); fdrop(fp, td); return (error); } Modified: head/sys/kern/uipc_mqueue.c ============================================================================== --- head/sys/kern/uipc_mqueue.c Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/kern/uipc_mqueue.c Sat Apr 11 15:40:28 2015 (r281436) @@ -2022,7 +2022,7 @@ kern_kmq_open(struct thread *td, const c if (error) { sx_xunlock(&mqfs_data.mi_lock); - fdclose(fdp, fp, fd, td); + fdclose(td, fp, fd); fdrop(fp, td); return (error); } Modified: head/sys/kern/uipc_sem.c ============================================================================== --- head/sys/kern/uipc_sem.c Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/kern/uipc_sem.c Sat Apr 11 15:40:28 2015 (r281436) @@ -471,7 +471,7 @@ ksem_create(struct thread *td, const cha */ error = ksem_create_copyout_semid(td, semidp, fd, compat32); if (error) { - fdclose(fdp, fp, fd, td); + fdclose(td, fp, fd); fdrop(fp, td); return (error); } @@ -491,7 +491,7 @@ ksem_create(struct thread *td, const cha if (error == 0 && path[0] != '/') error = EINVAL; if (error) { - fdclose(fdp, fp, fd, td); + fdclose(td, fp, fd); fdrop(fp, td); free(path, M_KSEM); return (error); @@ -542,7 +542,7 @@ ksem_create(struct thread *td, const cha if (error) { KASSERT(ks == NULL, ("ksem_create error with a ksem")); - fdclose(fdp, fp, fd, td); + fdclose(td, fp, fd); fdrop(fp, td); return (error); } Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/kern/uipc_shm.c Sat Apr 11 15:40:28 2015 (r281436) @@ -718,7 +718,7 @@ sys_shm_open(struct thread *td, struct s if (uap->path == SHM_ANON) { /* A read-only anonymous object is pointless. */ if ((uap->flags & O_ACCMODE) == O_RDONLY) { - fdclose(fdp, fp, fd, td); + fdclose(td, fp, fd); fdrop(fp, td); return (EINVAL); } @@ -734,7 +734,7 @@ sys_shm_open(struct thread *td, struct s if (error == 0 && path[0] != '/') error = EINVAL; if (error) { - fdclose(fdp, fp, fd, td); + fdclose(td, fp, fd); fdrop(fp, td); free(path, M_SHMFD); return (error); @@ -800,7 +800,7 @@ sys_shm_open(struct thread *td, struct s sx_xunlock(&shm_dict_lock); if (error) { - fdclose(fdp, fp, fd, td); + fdclose(td, fp, fd); fdrop(fp, td); return (error); } Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/kern/uipc_syscalls.c Sat Apr 11 15:40:28 2015 (r281436) @@ -216,7 +216,7 @@ sys_socket(td, uap) error = socreate(uap->domain, &so, type, uap->protocol, td->td_ucred, td); if (error != 0) { - fdclose(td->td_proc->p_fd, fp, fd, td); + fdclose(td, fp, fd); } else { finit(fp, FREAD | FWRITE | fflag, DTYPE_SOCKET, so, &socketops); if ((fflag & FNONBLOCK) != 0) @@ -373,7 +373,7 @@ accept1(td, s, uname, anamelen, flags) error = copyout(&namelen, anamelen, sizeof(namelen)); if (error != 0) - fdclose(td->td_proc->p_fd, fp, td->td_retval[0], td); + fdclose(td, fp, td->td_retval[0]); fdrop(fp, td); free(name, M_SONAME); return (error); @@ -520,7 +520,7 @@ noconnection: * out from under us. */ if (error != 0) - fdclose(fdp, nfp, fd, td); + fdclose(td, nfp, fd); /* * Release explicitly held references before returning. We return @@ -683,7 +683,6 @@ int kern_socketpair(struct thread *td, int domain, int type, int protocol, int *rsv) { - struct filedesc *fdp = td->td_proc->p_fd; struct file *fp1, *fp2; struct socket *so1, *so2; int fd, error, oflag, fflag; @@ -747,10 +746,10 @@ kern_socketpair(struct thread *td, int d fdrop(fp2, td); return (0); free4: - fdclose(fdp, fp2, rsv[1], td); + fdclose(td, fp2, rsv[1]); fdrop(fp2, td); free3: - fdclose(fdp, fp1, rsv[0], td); + fdclose(td, fp1, rsv[0]); fdrop(fp1, td); free2: if (so2 != NULL) Modified: head/sys/netinet/sctp_syscalls.c ============================================================================== --- head/sys/netinet/sctp_syscalls.c Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/netinet/sctp_syscalls.c Sat Apr 11 15:40:28 2015 (r281436) @@ -187,7 +187,7 @@ noconnection: * out from under us. */ if (error != 0) - fdclose(td->td_proc->p_fd, nfp, fd, td); + fdclose(td, nfp, fd); /* * Release explicitly held references before returning. Modified: head/sys/ofed/include/linux/file.h ============================================================================== --- head/sys/ofed/include/linux/file.h Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/ofed/include/linux/file.h Sat Apr 11 15:40:28 2015 (r281436) @@ -82,7 +82,7 @@ put_unused_fd(unsigned int fd) * installed, so no need to free the associated Linux file * structure. */ - fdclose(curthread->td_proc->p_fd, file, fd, curthread); + fdclose(curthread, file, fd); /* drop extra reference */ fdrop(file, curthread); Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Sat Apr 11 11:00:53 2015 (r281435) +++ head/sys/sys/filedesc.h Sat Apr 11 15:40:28 2015 (r281436) @@ -152,7 +152,7 @@ int finstall(struct thread *td, struct f int fdalloc(struct thread *td, int minfd, int *result); int fdallocn(struct thread *td, int minfd, int *fds, int n); int fdcheckstd(struct thread *td); -void fdclose(struct filedesc *fdp, struct file *fp, int idx, struct thread *td); +void fdclose(struct thread *td, struct file *fp, int idx); void fdcloseexec(struct thread *td); void fdsetugidsafety(struct thread *td); struct filedesc *fdcopy(struct filedesc *fdp); From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 16:00:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C66BF285; Sat, 11 Apr 2015 16:00:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7DE0641; Sat, 11 Apr 2015 16:00:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BG0YNR087205; Sat, 11 Apr 2015 16:00:34 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BG0XAJ087199; Sat, 11 Apr 2015 16:00:33 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201504111600.t3BG0XAJ087199@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 11 Apr 2015 16:00:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281437 - in head/sys: kern netinet sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 16:00:34 -0000 Author: mjg Date: Sat Apr 11 16:00:33 2015 New Revision: 281437 URL: https://svnweb.freebsd.org/changeset/base/281437 Log: Replace struct filedesc argument in getsock_cap with struct thread This is is a step towards removal of spurious arguments. Modified: head/sys/kern/uipc_syscalls.c head/sys/netinet/sctp_syscalls.c head/sys/sys/socketvar.h Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Sat Apr 11 15:40:28 2015 (r281436) +++ head/sys/kern/uipc_syscalls.c Sat Apr 11 16:00:33 2015 (r281437) @@ -150,17 +150,17 @@ SYSCTL_PROC(_kern_ipc, OID_AUTO, sfstat, * A reference on the file entry is held upon returning. */ int -getsock_cap(struct filedesc *fdp, int fd, cap_rights_t *rightsp, +getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp, u_int *fflagp) { struct file *fp; int error; - error = fget_unlocked(fdp, fd, rightsp, &fp, NULL); + error = fget_unlocked(td->td_proc->p_fd, fd, rightsp, &fp, NULL); if (error != 0) return (error); if (fp->f_type != DTYPE_SOCKET) { - fdrop(fp, curthread); + fdrop(fp, td); return (ENOTSOCK); } if (fflagp != NULL) @@ -258,8 +258,8 @@ kern_bindat(struct thread *td, int dirfd AUDIT_ARG_FD(fd); AUDIT_ARG_SOCKADDR(td, dirfd, sa); - error = getsock_cap(td->td_proc->p_fd, fd, - cap_rights_init(&rights, CAP_BIND), &fp, NULL); + error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_BIND), + &fp, NULL); if (error != 0) return (error); so = fp->f_data; @@ -319,8 +319,8 @@ sys_listen(td, uap) int error; AUDIT_ARG_FD(uap->s); - error = getsock_cap(td->td_proc->p_fd, uap->s, - cap_rights_init(&rights, CAP_LISTEN), &fp, NULL); + error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_LISTEN), + &fp, NULL); if (error == 0) { so = fp->f_data; #ifdef MAC @@ -390,7 +390,6 @@ int kern_accept4(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, int flags, struct file **fp) { - struct filedesc *fdp; struct file *headfp, *nfp = NULL; struct sockaddr *sa = NULL; struct socket *head, *so; @@ -403,8 +402,7 @@ kern_accept4(struct thread *td, int s, s *name = NULL; AUDIT_ARG_FD(s); - fdp = td->td_proc->p_fd; - error = getsock_cap(fdp, s, cap_rights_init(&rights, CAP_ACCEPT), + error = getsock_cap(td, s, cap_rights_init(&rights, CAP_ACCEPT), &headfp, &fflag); if (error != 0) return (error); @@ -604,8 +602,8 @@ kern_connectat(struct thread *td, int di AUDIT_ARG_FD(fd); AUDIT_ARG_SOCKADDR(td, dirfd, sa); - error = getsock_cap(td->td_proc->p_fd, fd, - cap_rights_init(&rights, CAP_CONNECT), &fp, NULL); + error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_CONNECT), + &fp, NULL); if (error != 0) return (error); so = fp->f_data; @@ -865,7 +863,7 @@ kern_sendit(td, s, mp, flags, control, s AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp->msg_name); cap_rights_set(&rights, CAP_CONNECT); } - error = getsock_cap(td->td_proc->p_fd, s, &rights, &fp, NULL); + error = getsock_cap(td, s, &rights, &fp, NULL); if (error != 0) return (error); so = (struct socket *)fp->f_data; @@ -1065,8 +1063,8 @@ kern_recvit(td, s, mp, fromseg, controlp *controlp = NULL; AUDIT_ARG_FD(s); - error = getsock_cap(td->td_proc->p_fd, s, - cap_rights_init(&rights, CAP_RECV), &fp, NULL); + error = getsock_cap(td, s, cap_rights_init(&rights, CAP_RECV), + &fp, NULL); if (error != 0) return (error); so = fp->f_data; @@ -1380,8 +1378,8 @@ sys_shutdown(td, uap) int error; AUDIT_ARG_FD(uap->s); - error = getsock_cap(td->td_proc->p_fd, uap->s, - cap_rights_init(&rights, CAP_SHUTDOWN), &fp, NULL); + error = getsock_cap(td, uap->s, cap_rights_init(&rights, CAP_SHUTDOWN), + &fp, NULL); if (error == 0) { so = fp->f_data; error = soshutdown(so, uap->how); @@ -1445,8 +1443,8 @@ kern_setsockopt(td, s, level, name, val, } AUDIT_ARG_FD(s); - error = getsock_cap(td->td_proc->p_fd, s, - cap_rights_init(&rights, CAP_SETSOCKOPT), &fp, NULL); + error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SETSOCKOPT), + &fp, NULL); if (error == 0) { so = fp->f_data; error = sosetopt(so, &sopt); @@ -1526,8 +1524,8 @@ kern_getsockopt(td, s, level, name, val, } AUDIT_ARG_FD(s); - error = getsock_cap(td->td_proc->p_fd, s, - cap_rights_init(&rights, CAP_GETSOCKOPT), &fp, NULL); + error = getsock_cap(td, s, cap_rights_init(&rights, CAP_GETSOCKOPT), + &fp, NULL); if (error == 0) { so = fp->f_data; error = sogetopt(so, &sopt); @@ -1587,8 +1585,8 @@ kern_getsockname(struct thread *td, int int error; AUDIT_ARG_FD(fd); - error = getsock_cap(td->td_proc->p_fd, fd, - cap_rights_init(&rights, CAP_GETSOCKNAME), &fp, NULL); + error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETSOCKNAME), + &fp, NULL); if (error != 0) return (error); so = fp->f_data; @@ -1686,8 +1684,8 @@ kern_getpeername(struct thread *td, int int error; AUDIT_ARG_FD(fd); - error = getsock_cap(td->td_proc->p_fd, fd, - cap_rights_init(&rights, CAP_GETPEERNAME), &fp, NULL); + error = getsock_cap(td, fd, cap_rights_init(&rights, CAP_GETPEERNAME), + &fp, NULL); if (error != 0) return (error); so = fp->f_data; @@ -2153,8 +2151,8 @@ kern_sendfile_getsock(struct thread *td, /* * The socket must be a stream socket and connected. */ - error = getsock_cap(td->td_proc->p_fd, s, cap_rights_init(&rights, - CAP_SEND), sock_fp, NULL); + error = getsock_cap(td, s, cap_rights_init(&rights, CAP_SEND), + sock_fp, NULL); if (error != 0) return (error); *so = (*sock_fp)->f_data; Modified: head/sys/netinet/sctp_syscalls.c ============================================================================== --- head/sys/netinet/sctp_syscalls.c Sat Apr 11 15:40:28 2015 (r281436) +++ head/sys/netinet/sctp_syscalls.c Sat Apr 11 16:00:33 2015 (r281437) @@ -248,7 +248,7 @@ sys_sctp_generic_sendmsg (td, uap) } AUDIT_ARG_FD(uap->sd); - error = getsock_cap(td->td_proc->p_fd, uap->sd, &rights, &fp, NULL); + error = getsock_cap(td, uap->sd, &rights, &fp, NULL); if (error != 0) goto sctp_bad; #ifdef KTRACE @@ -357,7 +357,7 @@ sys_sctp_generic_sendmsg_iov(td, uap) } AUDIT_ARG_FD(uap->sd); - error = getsock_cap(td->td_proc->p_fd, uap->sd, &rights, &fp, NULL); + error = getsock_cap(td, uap->sd, &rights, &fp, NULL); if (error != 0) goto sctp_bad1; @@ -468,8 +468,8 @@ sys_sctp_generic_recvmsg(td, uap) int error, fromlen, i, msg_flags; AUDIT_ARG_FD(uap->sd); - error = getsock_cap(td->td_proc->p_fd, uap->sd, - cap_rights_init(&rights, CAP_RECV), &fp, NULL); + error = getsock_cap(td, uap->sd, cap_rights_init(&rights, CAP_RECV), + &fp, NULL); if (error != 0) return (error); #ifdef COMPAT_FREEBSD32 Modified: head/sys/sys/socketvar.h ============================================================================== --- head/sys/sys/socketvar.h Sat Apr 11 15:40:28 2015 (r281436) +++ head/sys/sys/socketvar.h Sat Apr 11 16:00:33 2015 (r281437) @@ -339,7 +339,7 @@ struct uio; */ int sockargs(struct mbuf **mp, caddr_t buf, int buflen, int type); int getsockaddr(struct sockaddr **namp, caddr_t uaddr, size_t len); -int getsock_cap(struct filedesc *fdp, int fd, cap_rights_t *rightsp, +int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp, u_int *fflagp); void soabort(struct socket *so); int soaccept(struct socket *so, struct sockaddr **nam); From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 17:16:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CA3F155; Sat, 11 Apr 2015 17:16:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23849D29; Sat, 11 Apr 2015 17:16:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BHGWq6024019; Sat, 11 Apr 2015 17:16:32 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BHGOtr023984; Sat, 11 Apr 2015 17:16:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504111716.t3BHGOtr023984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 11 Apr 2015 17:16:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281438 - in head/sys: arm/amlogic/aml8726 arm/freescale/vybrid arm/samsung/exynos arm/samsung/s3c2xx0 dev/uart mips/adm5120 mips/atheros mips/cavium mips/rt305x sparc64/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 17:16:33 -0000 Author: andrew Date: Sat Apr 11 17:16:23 2015 New Revision: 281438 URL: https://svnweb.freebsd.org/changeset/base/281438 Log: Add support for the uart classes to set their default register shift value. This is needed with the pl011 driver. Before this change it would default to a shift of 0, however the hardware places the registers at 4-byte addresses meaning the value should be 2. This patch fixes this for the pl011 when configured using the fdt. The other drivers have a default value of 0 to keep this a no-op. MFC after: 1 week Modified: head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c head/sys/arm/freescale/vybrid/vf_uart.c head/sys/arm/samsung/exynos/exynos_uart.c head/sys/arm/samsung/s3c2xx0/uart_dev_s3c2410.c head/sys/dev/uart/uart_bus.h head/sys/dev/uart/uart_bus_fdt.c head/sys/dev/uart/uart_core.c head/sys/dev/uart/uart_cpu.h head/sys/dev/uart/uart_cpu_fdt.c head/sys/dev/uart/uart_dev_imx.c head/sys/dev/uart/uart_dev_lpc.c head/sys/dev/uart/uart_dev_msm.c head/sys/dev/uart/uart_dev_ns8250.c head/sys/dev/uart/uart_dev_pl011.c head/sys/dev/uart/uart_dev_quicc.c head/sys/dev/uart/uart_dev_sab82532.c head/sys/dev/uart/uart_dev_ti8250.c head/sys/dev/uart/uart_dev_z8530.c head/sys/mips/adm5120/uart_dev_adm5120.c head/sys/mips/atheros/uart_dev_ar933x.c head/sys/mips/cavium/uart_dev_oct16550.c head/sys/mips/rt305x/uart_dev_rt305x.c head/sys/sparc64/pci/sbbc.c Modified: head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c ============================================================================== --- head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/arm/amlogic/aml8726/uart_dev_aml8726.c Sat Apr 11 17:16:23 2015 (r281438) @@ -724,7 +724,8 @@ struct uart_class uart_aml8726_class = { sizeof(struct uart_softc), .uc_ops = &aml8726_uart_ops, .uc_range = 24, - .uc_rclk = 0 + .uc_rclk = 0, + .uc_rshift = 0 }; static struct ofw_compat_data compat_data[] = { Modified: head/sys/arm/freescale/vybrid/vf_uart.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_uart.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/arm/freescale/vybrid/vf_uart.c Sat Apr 11 17:16:23 2015 (r281438) @@ -276,7 +276,8 @@ static struct uart_class uart_vybrid_cla sizeof(struct vf_uart_softc), .uc_ops = &uart_vybrid_ops, .uc_range = 0x100, - .uc_rclk = 24000000 /* TODO: get value from CCM */ + .uc_rclk = 24000000, /* TODO: get value from CCM */ + .uc_rshift = 0 }; static struct ofw_compat_data compat_data[] = { Modified: head/sys/arm/samsung/exynos/exynos_uart.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos_uart.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/arm/samsung/exynos/exynos_uart.c Sat Apr 11 17:16:23 2015 (r281438) @@ -380,6 +380,7 @@ static struct uart_class uart_exynos4210 .uc_ops = &uart_exynos4210_ops, .uc_range = 8, .uc_rclk = 0, + .uc_rshift = 0 }; static struct ofw_compat_data compat_data[] = { Modified: head/sys/arm/samsung/s3c2xx0/uart_dev_s3c2410.c ============================================================================== --- head/sys/arm/samsung/s3c2xx0/uart_dev_s3c2410.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/arm/samsung/s3c2xx0/uart_dev_s3c2410.c Sat Apr 11 17:16:23 2015 (r281438) @@ -402,4 +402,5 @@ struct uart_class uart_s3c2410_class = { .uc_ops = &uart_s3c2410_ops, .uc_range = 8, .uc_rclk = 0, + .uc_rshift = 0 }; Modified: head/sys/dev/uart/uart_bus.h ============================================================================== --- head/sys/dev/uart/uart_bus.h Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_bus.h Sat Apr 11 17:16:23 2015 (r281438) @@ -70,6 +70,7 @@ struct uart_class { struct uart_ops *uc_ops; /* Low-level console operations. */ u_int uc_range; /* Bus space address range. */ u_int uc_rclk; /* Default rclk for this device. */ + u_int uc_rshift; /* Default regshift for this device. */ }; struct uart_softc { Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_bus_fdt.c Sat Apr 11 17:16:23 2015 (r281438) @@ -83,16 +83,10 @@ uart_fdt_get_clock(phandle_t node, pcell int uart_fdt_get_shift(phandle_t node, pcell_t *cell) { -#ifdef __aarch64__ -#define DEFAULT_SHIFT 2 -#else -#define DEFAULT_SHIFT 0 -#endif if ((OF_getencprop(node, "reg-shift", cell, sizeof(*cell))) <= 0) - *cell = DEFAULT_SHIFT; + return (-1); return (0); -#undef DEFAULT_SHIFT } static uintptr_t @@ -130,7 +124,8 @@ uart_fdt_probe(device_t dev) if ((err = uart_fdt_get_clock(node, &clock)) != 0) return (err); - uart_fdt_get_shift(node, &shift); + if (uart_fdt_get_shift(node, &shift) != 0) + shift = uart_getregshift(sc->sc_class); return (uart_bus_probe(dev, (int)shift, (int)clock, 0, 0)); } Modified: head/sys/dev/uart/uart_core.c ============================================================================== --- head/sys/dev/uart/uart_core.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_core.c Sat Apr 11 17:16:23 2015 (r281438) @@ -88,6 +88,12 @@ uart_getrange(struct uart_class *uc) return ((uc != NULL) ? uc->uc_range : 0); } +u_int +uart_getregshift(struct uart_class *uc) +{ + return ((uc != NULL) ? uc->uc_rshift : 0); +} + /* * Schedule a soft interrupt. We do this on the 0 to !0 transition * of the TTY pending interrupt status. Modified: head/sys/dev/uart/uart_cpu.h ============================================================================== --- head/sys/dev/uart/uart_cpu.h Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_cpu.h Sat Apr 11 17:16:23 2015 (r281438) @@ -79,6 +79,7 @@ int uart_getenv(int, struct uart_devinfo const char *uart_getname(struct uart_class *); struct uart_ops *uart_getops(struct uart_class *); int uart_getrange(struct uart_class *); +u_int uart_getregshift(struct uart_class *); void uart_add_sysdev(struct uart_devinfo *); Modified: head/sys/dev/uart/uart_cpu_fdt.c ============================================================================== --- head/sys/dev/uart/uart_cpu_fdt.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_cpu_fdt.c Sat Apr 11 17:16:23 2015 (r281438) @@ -165,15 +165,6 @@ uart_cpu_getdev(int devtype, struct uart return (ENXIO); /* - * Retrieve serial attributes. - */ - uart_fdt_get_shift(node, &shift); - if (OF_getprop(node, "current-speed", &br, sizeof(br)) <= 0) - br = 0; - else - br = fdt32_to_cpu(br); - - /* * Check old style of UART definition first. Unfortunately, the common * FDT processing is not possible if we have clock, power domains and * pinmux stuff. @@ -192,6 +183,17 @@ uart_cpu_getdev(int devtype, struct uart } /* + * Retrieve serial attributes. + */ + if (uart_fdt_get_shift(node, &shift) != 0) + shift = uart_getregshift(class); + + if (OF_getprop(node, "current-speed", &br, sizeof(br)) <= 0) + br = 0; + else + br = fdt32_to_cpu(br); + + /* * Finalize configuration. */ di->bas.chan = 0; Modified: head/sys/dev/uart/uart_dev_imx.c ============================================================================== --- head/sys/dev/uart/uart_dev_imx.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_dev_imx.c Sat Apr 11 17:16:23 2015 (r281438) @@ -298,7 +298,8 @@ static struct uart_class uart_imx_class sizeof(struct imx_uart_softc), .uc_ops = &uart_imx_uart_ops, .uc_range = 0x100, - .uc_rclk = 24000000 /* TODO: get value from CCM */ + .uc_rclk = 24000000, /* TODO: get value from CCM */ + .uc_rshift = 0 }; static struct ofw_compat_data compat_data[] = { Modified: head/sys/dev/uart/uart_dev_lpc.c ============================================================================== --- head/sys/dev/uart/uart_dev_lpc.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_dev_lpc.c Sat Apr 11 17:16:23 2015 (r281438) @@ -428,7 +428,8 @@ static struct uart_class uart_lpc_class sizeof(struct lpc_ns8250_softc), .uc_ops = &uart_lpc_ns8250_ops, .uc_range = 8, - .uc_rclk = DEFAULT_RCLK + .uc_rclk = DEFAULT_RCLK, + .uc_rshift = 0 }; static struct ofw_compat_data compat_data[] = { Modified: head/sys/dev/uart/uart_dev_msm.c ============================================================================== --- head/sys/dev/uart/uart_dev_msm.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_dev_msm.c Sat Apr 11 17:16:23 2015 (r281438) @@ -566,6 +566,7 @@ static struct uart_class uart_msm_class .uc_ops = &uart_msm_ops, .uc_range = 8, .uc_rclk = DEF_CLK, + .uc_rshift = 0 }; static struct ofw_compat_data compat_data[] = { Modified: head/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- head/sys/dev/uart/uart_dev_ns8250.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_dev_ns8250.c Sat Apr 11 17:16:23 2015 (r281438) @@ -378,7 +378,8 @@ struct uart_class uart_ns8250_class = { sizeof(struct ns8250_softc), .uc_ops = &uart_ns8250_ops, .uc_range = 8, - .uc_rclk = DEFAULT_RCLK + .uc_rclk = DEFAULT_RCLK, + .uc_rshift = 0 }; #ifdef FDT Modified: head/sys/dev/uart/uart_dev_pl011.c ============================================================================== --- head/sys/dev/uart/uart_dev_pl011.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_dev_pl011.c Sat Apr 11 17:16:23 2015 (r281438) @@ -273,7 +273,8 @@ static struct uart_class uart_pl011_clas sizeof(struct uart_pl011_softc), .uc_ops = &uart_pl011_ops, .uc_range = 0x48, - .uc_rclk = 0 + .uc_rclk = 0, + .uc_rshift = 2 }; static struct ofw_compat_data compat_data[] = { Modified: head/sys/dev/uart/uart_dev_quicc.c ============================================================================== --- head/sys/dev/uart/uart_dev_quicc.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_dev_quicc.c Sat Apr 11 17:16:23 2015 (r281438) @@ -271,7 +271,8 @@ struct uart_class uart_quicc_class = { sizeof(struct quicc_softc), .uc_ops = &uart_quicc_ops, .uc_range = 2, - .uc_rclk = DEFAULT_RCLK + .uc_rclk = DEFAULT_RCLK, + .uc_rshift = 0 }; #define SIGCHG(c, i, s, d) \ Modified: head/sys/dev/uart/uart_dev_sab82532.c ============================================================================== --- head/sys/dev/uart/uart_dev_sab82532.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_dev_sab82532.c Sat Apr 11 17:16:23 2015 (r281438) @@ -391,7 +391,8 @@ struct uart_class uart_sab82532_class = sizeof(struct sab82532_softc), .uc_ops = &uart_sab82532_ops, .uc_range = 64, - .uc_rclk = DEFAULT_RCLK + .uc_rclk = DEFAULT_RCLK, + .uc_rshift = 0 }; #define SIGCHG(c, i, s, d) \ Modified: head/sys/dev/uart/uart_dev_ti8250.c ============================================================================== --- head/sys/dev/uart/uart_dev_ti8250.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_dev_ti8250.c Sat Apr 11 17:16:23 2015 (r281438) @@ -137,7 +137,8 @@ static struct uart_class uart_ti8250_cla sizeof(struct ti8250_softc), .uc_ops = &uart_ns8250_ops, .uc_range = 0x88, - .uc_rclk = 48000000 + .uc_rclk = 48000000, + .uc_rshift = 0 }; static struct ofw_compat_data compat_data[] = { {"ti,ns16550", (uintptr_t)&uart_ti8250_class}, Modified: head/sys/dev/uart/uart_dev_z8530.c ============================================================================== --- head/sys/dev/uart/uart_dev_z8530.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/dev/uart/uart_dev_z8530.c Sat Apr 11 17:16:23 2015 (r281438) @@ -307,7 +307,8 @@ struct uart_class uart_z8530_class = { sizeof(struct z8530_softc), .uc_ops = &uart_z8530_ops, .uc_range = 2, - .uc_rclk = DEFAULT_RCLK + .uc_rclk = DEFAULT_RCLK, + .uc_rshift = 0 }; #define SIGCHG(c, i, s, d) \ Modified: head/sys/mips/adm5120/uart_dev_adm5120.c ============================================================================== --- head/sys/mips/adm5120/uart_dev_adm5120.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/mips/adm5120/uart_dev_adm5120.c Sat Apr 11 17:16:23 2015 (r281438) @@ -175,7 +175,8 @@ struct uart_class uart_adm5120_uart_clas sizeof(struct adm5120_uart_softc), .uc_ops = &uart_adm5120_uart_ops, .uc_range = 1, /* use hinted range */ - .uc_rclk = 62500000 + .uc_rclk = 62500000, + .uc_rshift = 0 }; #define SIGCHG(c, i, s, d) \ Modified: head/sys/mips/atheros/uart_dev_ar933x.c ============================================================================== --- head/sys/mips/atheros/uart_dev_ar933x.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/mips/atheros/uart_dev_ar933x.c Sat Apr 11 17:16:23 2015 (r281438) @@ -351,7 +351,8 @@ struct uart_class uart_ar933x_class = { sizeof(struct ar933x_softc), .uc_ops = &uart_ar933x_ops, .uc_range = 8, - .uc_rclk = DEFAULT_RCLK + .uc_rclk = DEFAULT_RCLK, + .uc_rshift = 0 }; #define SIGCHG(c, i, s, d) \ Modified: head/sys/mips/cavium/uart_dev_oct16550.c ============================================================================== --- head/sys/mips/cavium/uart_dev_oct16550.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/mips/cavium/uart_dev_oct16550.c Sat Apr 11 17:16:23 2015 (r281438) @@ -424,7 +424,8 @@ struct uart_class uart_oct16550_class = sizeof(struct oct16550_softc), .uc_ops = &uart_oct16550_ops, .uc_range = 8 << 3, - .uc_rclk = 0 + .uc_rclk = 0, + .uc_rshift = 0 }; #define SIGCHG(c, i, s, d) \ Modified: head/sys/mips/rt305x/uart_dev_rt305x.c ============================================================================== --- head/sys/mips/rt305x/uart_dev_rt305x.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/mips/rt305x/uart_dev_rt305x.c Sat Apr 11 17:16:23 2015 (r281438) @@ -217,7 +217,8 @@ struct uart_class uart_rt305x_uart_class sizeof(struct rt305x_uart_softc), .uc_ops = &uart_rt305x_uart_ops, .uc_range = 1, /* use hinted range */ - .uc_rclk = SYSTEM_CLOCK + .uc_rclk = SYSTEM_CLOCK, + .uc_rshift = 0 }; #define SIGCHG(c, i, s, d) \ Modified: head/sys/sparc64/pci/sbbc.c ============================================================================== --- head/sys/sparc64/pci/sbbc.c Sat Apr 11 16:00:33 2015 (r281437) +++ head/sys/sparc64/pci/sbbc.c Sat Apr 11 17:16:23 2015 (r281438) @@ -813,7 +813,8 @@ struct uart_class uart_sbbc_class = { sizeof(struct uart_softc), .uc_ops = &sbbc_uart_ops, .uc_range = 1, - .uc_rclk = 0x5bbc /* arbitrary */ + .uc_rclk = 0x5bbc, /* arbitrary */ + .uc_rshift = 0 }; #define SIGCHG(c, i, s, d) \ From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 17:52:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4752DAF4; Sat, 11 Apr 2015 17:52:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27FB0F1; Sat, 11 Apr 2015 17:52:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BHqoJt042807; Sat, 11 Apr 2015 17:52:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BHqm8s042803; Sat, 11 Apr 2015 17:52:48 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504111752.t3BHqm8s042803@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 11 Apr 2015 17:52:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281439 - in head/sys/arm: conf qemu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 17:52:50 -0000 Author: andrew Date: Sat Apr 11 17:52:47 2015 New Revision: 281439 URL: https://svnweb.freebsd.org/changeset/base/281439 Log: Add support for the QEMU virt SoC. This is a SoC built depending on the command line arguments passed in. It will then generate a dtb on the fly, as such no dts will be added as it may be incorrect. Relnotes: yes Added: head/sys/arm/conf/VIRT (contents, props changed) head/sys/arm/qemu/ head/sys/arm/qemu/files.qemu (contents, props changed) head/sys/arm/qemu/std.virt (contents, props changed) head/sys/arm/qemu/virt_common.c (contents, props changed) head/sys/arm/qemu/virt_machdep.c (contents, props changed) Added: head/sys/arm/conf/VIRT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/VIRT Sat Apr 11 17:52:47 2015 (r281439) @@ -0,0 +1,95 @@ +# +# VIRT -- Custom configuration for the qemu virt platform +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident VIRT + +include "../qemu/std.virt" + +options HZ=100 +options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options GEOM_LABEL # Provides labelization +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options PLATFORM +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support + +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +device bpf +device loop +device ether +device uart +device pty +device snp +device pl011 + +device virtio +device virtio_mmio +device virtio_blk +device vtnet + +device md +device random # Entropy device + +# Flattened Device Tree +options FDT # Configure using FDT/DTB data + Added: head/sys/arm/qemu/files.qemu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/qemu/files.qemu Sat Apr 11 17:52:47 2015 (r281439) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +# +# Standard ARM support. +# +arm/arm/bus_space_base.c standard +arm/arm/bus_space_generic.c standard +kern/kern_clocksource.c standard + +# +# Standard qemu virt devices and support. +# +arm/arm/gic.c standard +arm/arm/generic_timer.c standard +arm/qemu/virt_common.c standard +arm/qemu/virt_machdep.c standard Added: head/sys/arm/qemu/std.virt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/qemu/std.virt Sat Apr 11 17:52:47 2015 (r281439) @@ -0,0 +1,15 @@ +# $FreeBSD$ +machine arm armv6 +cpu CPU_CORTEXA +makeoptions CONF_CFLAGS="-march=armv7a" +makeoptions ARM_LITTLE_ENDIAN +options ARM_L2_PIPT + +options KERNVIRTADDR = 0xc0000000 +makeoptions KERNVIRTADDR = 0xc0000000 + +options IPI_IRQ_START=0 +options IPI_IRQ_END=15 + +files "../qemu/files.qemu" + Added: head/sys/arm/qemu/virt_common.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/qemu/virt_common.c Sat Apr 11 17:52:47 2015 (r281439) @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2015 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include + +#include + +struct fdt_fixup_entry fdt_fixup_table[] = { + { NULL, NULL } +}; + +fdt_pic_decode_t fdt_pic_table[] = { + &gic_decode_fdt, + NULL +}; Added: head/sys/arm/qemu/virt_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/qemu/virt_machdep.c Sat Apr 11 17:52:47 2015 (r281439) @@ -0,0 +1,92 @@ +/*- + * Copyright (c) 2015 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#define _ARM32_BUS_DMA_PRIVATE +#include +#include + +#include + +#include +#include +#include +#include + +#include "platform_if.h" + +struct arm32_dma_range * +bus_dma_get_range(void) +{ + + return (NULL); +} + +int +bus_dma_get_range_nb(void) +{ + + return (0); +} + +void +cpu_reset(void) +{ + + while (1); +} + +static vm_offset_t +virt_lastaddr(platform_t plat) +{ + + return (arm_devmap_lastaddr()); +} + +/* + * Set up static device mappings. + */ +static int +virt_devmap_init(platform_t plat) +{ + + arm_devmap_add_entry(0x09000000, 0x100000); /* Uart */ + return (0); +} + +static platform_method_t virt_methods[] = { + PLATFORMMETHOD(platform_devmap_init, virt_devmap_init), + PLATFORMMETHOD(platform_lastaddr, virt_lastaddr), + + PLATFORMMETHOD_END, +}; + +FDT_PLATFORM_DEF(virt, "virt", 0, "linux,dummy-virt"); From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 18:44:09 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7886167A; Sat, 11 Apr 2015 18:44:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6299D861; Sat, 11 Apr 2015 18:44:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BIi86E066907; Sat, 11 Apr 2015 18:44:08 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BIi8UH066904; Sat, 11 Apr 2015 18:44:08 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504111844.t3BIi8UH066904@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 11 Apr 2015 18:44:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281440 - in head/sys: dev/atkbdc sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 18:44:09 -0000 Author: rpaulo Date: Sat Apr 11 18:44:07 2015 New Revision: 281440 URL: https://svnweb.freebsd.org/changeset/base/281440 Log: Improve Synaptics support for newer touchpads. Enable two finger scrolling by default and disable the edge scrolling if the touchpad has no physical zone for it. Disable directional scrolling by default to avoid using extended buttons as scroll buttons. Add support for ClickPad. On Lenovo laptops, this is the button reported when one presses the touchpad. While there, fix a problem where the extended buttons were not reporting the button release event correctly: we need to save the state of the buttons and report it to sysmouse until we receive a packet from the touchpad indicating the button has been released. This makes it possible to use an extended button to resize a window. On Lenovo laptops, the major buttons are actually reported as extended buttons. Tested by: many (current@) MFC after: 1 week Modified: head/sys/dev/atkbdc/psm.c head/sys/sys/mouse.h Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Sat Apr 11 17:52:47 2015 (r281439) +++ head/sys/dev/atkbdc/psm.c Sat Apr 11 18:44:07 2015 (r281440) @@ -198,6 +198,7 @@ typedef struct synapticsinfo { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; int directional_scrolls; + int two_finger_scroll; int min_pressure; int max_pressure; int max_width; @@ -336,6 +337,7 @@ struct psm_softc { /* Driver status inf int lasterr; int cmdcount; struct sigio *async; /* Processes waiting for SIGIO */ + int extended_buttons; }; static devclass_t psm_devclass; @@ -2752,7 +2754,13 @@ proc_synaptics(struct psm_softc *sc, pac if (pb->ipacket[5] & 0x02) touchpad_buttons |= MOUSE_BUTTON7DOWN; } else { - touchpad_buttons |= MOUSE_BUTTON2DOWN; + if (pb->ipacket[4] & 0x01) + touchpad_buttons |= MOUSE_BUTTON1DOWN; + if (pb->ipacket[5] & 0x01) + touchpad_buttons |= MOUSE_BUTTON3DOWN; + if (pb->ipacket[4] & 0x02) + touchpad_buttons |= MOUSE_BUTTON2DOWN; + sc->extended_buttons = touchpad_buttons; } /* @@ -2774,13 +2782,26 @@ proc_synaptics(struct psm_softc *sc, pac mask = (1 << maskedbits) - 1; pb->ipacket[4] &= ~(mask); pb->ipacket[5] &= ~(mask); + } else if (!sc->syninfo.directional_scrolls && + !sc->synaction.in_vscroll) { + /* + * Keep reporting MOUSE DOWN until we get a new packet + * indicating otherwise. + */ + touchpad_buttons |= sc->extended_buttons; } } + /* Handle ClickPad. */ + if (sc->synhw.capClickPad && + ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01)) + touchpad_buttons |= MOUSE_BUTTON1DOWN; ms->button = touchpad_buttons | guest_buttons; - /* Check pressure to detect a real wanted action on the - * touchpad. */ + /* + * Check pressure to detect a real wanted action on the + * touchpad. + */ if (*z >= sc->syninfo.min_pressure) { synapticsaction_t *synaction; int cursor, peer, window; @@ -2793,7 +2814,7 @@ proc_synaptics(struct psm_softc *sc, pac int weight_current, weight_previous, weight_len_squared; int div_min, div_max, div_len; int vscroll_hor_area, vscroll_ver_area; - + int two_finger_scroll; int len, weight_prev_x, weight_prev_y; int div_max_x, div_max_y, div_x, div_y; @@ -2820,6 +2841,7 @@ proc_synaptics(struct psm_softc *sc, pac div_len = sc->syninfo.div_len; vscroll_hor_area = sc->syninfo.vscroll_hor_area; vscroll_ver_area = sc->syninfo.vscroll_ver_area; + two_finger_scroll = sc->syninfo.two_finger_scroll; /* Palm detection. */ if (!( @@ -2979,33 +3001,57 @@ proc_synaptics(struct psm_softc *sc, pac if (timevalcmp(&sc->lastsoftintr, &sc->taptimeout, >) || dxp >= sc->syninfo.vscroll_min_delta || dyp >= sc->syninfo.vscroll_min_delta) { - /* Check for horizontal scrolling. */ - if ((vscroll_hor_area > 0 && - synaction->start_y <= vscroll_hor_area) || - (vscroll_hor_area < 0 && - synaction->start_y >= - 6143 + vscroll_hor_area)) - synaction->in_vscroll += 2; - - /* Check for vertical scrolling. */ - if ((vscroll_ver_area > 0 && - synaction->start_x <= vscroll_ver_area) || - (vscroll_ver_area < 0 && - synaction->start_x >= - 6143 + vscroll_ver_area)) - synaction->in_vscroll += 1; + /* + * Handle two finger scrolling. + * Note that we don't rely on fingers_nb + * as that keeps the maximum number of fingers. + */ + if (two_finger_scroll) { + if (w == 0) { + synaction->in_vscroll += + dyp ? 2 : 0; + synaction->in_vscroll += + dxp ? 1 : 0; + } + } else { + /* Check for horizontal scrolling. */ + if ((vscroll_hor_area > 0 && + synaction->start_y <= + vscroll_hor_area) || + (vscroll_hor_area < 0 && + synaction->start_y >= + 6143 + vscroll_hor_area)) + synaction->in_vscroll += 2; + + /* Check for vertical scrolling. */ + if ((vscroll_ver_area > 0 && + synaction->start_x <= + vscroll_ver_area) || + (vscroll_ver_area < 0 && + synaction->start_x >= + 6143 + vscroll_ver_area)) + synaction->in_vscroll += 1; + } /* Avoid conflicts if area overlaps. */ - if (synaction->in_vscroll == 3) + if (synaction->in_vscroll >= 3) synaction->in_vscroll = (dxp > dyp) ? 2 : 1; } - VLOG(5, (LOG_DEBUG, - "synaptics: virtual scrolling: %s " - "(direction=%d, dxp=%d, dyp=%d)\n", - synaction->in_vscroll ? "YES" : "NO", - synaction->in_vscroll, dxp, dyp)); } + /* + * Reset two finger scrolling when the number of fingers + * is different from two. + */ + if (two_finger_scroll && w != 0) + synaction->in_vscroll = 0; + + VLOG(5, (LOG_DEBUG, + "synaptics: virtual scrolling: %s " + "(direction=%d, dxp=%d, dyp=%d, fingers=%d)\n", + synaction->in_vscroll ? "YES" : "NO", + synaction->in_vscroll, dxp, dyp, + synaction->fingers_nb)); weight_prev_x = weight_prev_y = weight_previous; div_max_x = div_max_y = div_max; @@ -3247,6 +3293,7 @@ SYNAPTICS_END: * That's why the horizontal wheel is disabled by * default for now. */ + if (ms->button & MOUSE_BUTTON4DOWN) { *z = -1; ms->button &= ~MOUSE_BUTTON4DOWN; @@ -3460,7 +3507,7 @@ psmsoftintr(void *arg) c = ((x < 0) ? MOUSE_PS2_XNEG : 0) | ((y < 0) ? MOUSE_PS2_YNEG : 0); break; - + case MOUSE_MODEL_4D: /* * b7 b6 b5 b4 b3 b2 b1 b0 @@ -4108,13 +4155,29 @@ synaptics_sysctl_create_tree(struct psm_ 0, "Synaptics TouchPad"); /* hw.psm.synaptics.directional_scrolls. */ - sc->syninfo.directional_scrolls = 1; + sc->syninfo.directional_scrolls = 0; SYSCTL_ADD_INT(&sc->syninfo.sysctl_ctx, SYSCTL_CHILDREN(sc->syninfo.sysctl_tree), OID_AUTO, "directional_scrolls", CTLFLAG_RW|CTLFLAG_ANYBODY, &sc->syninfo.directional_scrolls, 0, "Enable hardware scrolling pad (if non-zero) or register it as " - "a middle-click (if 0)"); + "extended buttons (if 0)"); + + /* + * Turn off two finger scroll if we have a + * physical area reserved for scrolling or when + * there's no multi finger support. + */ + if (sc->synhw.verticalScroll || sc->synhw.capMultiFinger == 0) + sc->syninfo.two_finger_scroll = 0; + else + sc->syninfo.two_finger_scroll = 1; + /* hw.psm.synaptics.two_finger_scroll. */ + SYSCTL_ADD_INT(&sc->syninfo.sysctl_ctx, + SYSCTL_CHILDREN(sc->syninfo.sysctl_tree), OID_AUTO, + "two_finger_scroll", CTLFLAG_RW|CTLFLAG_ANYBODY, + &sc->syninfo.two_finger_scroll, 0, + "Enable two finger scrolling"); /* hw.psm.synaptics.min_pressure. */ sc->syninfo.min_pressure = 16; @@ -4519,7 +4582,21 @@ enable_synaptics(KBDC kbdc, struct psm_s return (FALSE); if (get_mouse_status(kbdc, status, 0, 3) != 3) return (FALSE); + synhw.verticalScroll = (status[0] & 0x01) != 0; + synhw.horizontalScroll = (status[0] & 0x02) != 0; + synhw.verticalWheel = (status[0] & 0x08) != 0; synhw.nExtendedButtons = (status[1] & 0xf0) >> 4; + if (verbose >= 2) { + printf(" Extended model ID:\n"); + printf(" verticalScroll: %d\n", + synhw.verticalScroll); + printf(" horizontalScroll: %d\n", + synhw.horizontalScroll); + printf(" verticalWheel: %d\n", + synhw.verticalWheel); + printf(" nExtendedButtons: %d\n", + synhw.nExtendedButtons); + } /* * Add the number of extended buttons to the total * button support count, including the middle button @@ -4540,6 +4617,42 @@ enable_synaptics(KBDC kbdc, struct psm_s printf(" No extended capabilities\n"); } + /* Read the continued capabilities bits. */ + if (mouse_ext_command(kbdc, 0xc) != 0 && + get_mouse_status(kbdc, status, 0, 3) == 3) { + synhw.capClickPad = (status[1] & 0x01) << 1; + synhw.capClickPad |= (status[0] & 0x10) != 0; + synhw.capDeluxeLEDs = (status[1] & 0x02) != 0; + synhw.noAbsoluteFilter = (status[1] & 0x04) != 0; + synhw.capReportsV = (status[1] & 0x08) != 0; + synhw.capUniformClickPad = (status[1] & 0x10) != 0; + synhw.capReportsMin = (status[1] & 0x20) != 0; + synhw.capInterTouch = (status[1] & 0x40) != 0; + synhw.capReportsMax = (status[2] & 0x02) != 0; + synhw.capClearPad = (status[2] & 0x04) != 0; + synhw.capAdvancedGestures = (status[2] & 0x08) != 0; + synhw.capCoveredPad = (status[2] & 0x80) != 0; + + if (verbose >= 2) { + printf(" Continued capabilities:\n"); + printf(" capClickPad: %d\n", synhw.capClickPad); + printf(" capDeluxeLEDs: %d\n", synhw.capDeluxeLEDs); + printf(" noAbsoluteFilter: %d\n", + synhw.noAbsoluteFilter); + printf(" capReportsV: %d\n", synhw.capReportsV); + printf(" capUniformClickPad: %d\n", + synhw.capUniformClickPad); + printf(" capReportsMin: %d\n", synhw.capReportsMin); + printf(" capInterTouch: %d\n", synhw.capInterTouch); + printf(" capReportsMax: %d\n", synhw.capReportsMax); + printf(" capClearPad: %d\n", synhw.capClearPad); + printf(" capAdvancedGestures: %d\n", + synhw.capAdvancedGestures); + printf(" capCoveredPad: %d\n", synhw.capCoveredPad); + } + buttons += synhw.capClickPad; + } + /* * Add the default number of 3 buttons to the total * count of supported buttons reported above. Modified: head/sys/sys/mouse.h ============================================================================== --- head/sys/sys/mouse.h Sat Apr 11 17:52:47 2015 (r281439) +++ head/sys/sys/mouse.h Sat Apr 11 18:44:07 2015 (r281440) @@ -86,7 +86,7 @@ typedef struct mousehw { int type; /* mouse/track ball/pad... */ int model; /* I/F dependent model ID: MOUSE_MODEL_XXX */ int hwid; /* I/F dependent hardware ID - * for the PS/2 mouse, it will be PSM_XXX_ID + * for the PS/2 mouse, it will be PSM_XXX_ID */ } mousehw_t; @@ -113,6 +113,21 @@ typedef struct synapticshw { int capBallistics; int nExtendedButtons; int nExtendedQueries; + int capClickPad; + int capDeluxeLEDs; + int noAbsoluteFilter; + int capReportsV; + int capUniformClickPad; + int capReportsMin; + int capInterTouch; + int capReportsMax; + int capClearPad; + int capAdvancedGestures; + int multiFingerMode; + int capCoveredPad; + int verticalScroll; + int horizontalScroll; + int verticalWheel; } synapticshw_t; /* iftype */ @@ -272,7 +287,7 @@ typedef struct mousevar { #define MOUSE_PS2_BUTTON2DOWN 0x04 /* middle */ #define MOUSE_PS2_BUTTON3DOWN 0x02 /* right */ #define MOUSE_PS2_TAP MOUSE_PS2_SYNC /* GlidePoint (PS/2) `tapping' - * Yes! this is the same bit + * Yes! this is the same bit * as SYNC! */ @@ -327,11 +342,11 @@ typedef struct mousevar { #define MOUSE_PS2VERSA_TAP 0x02 /* A4 Tech 4D Mouse (PS/2) data packet */ -#define MOUSE_4D_PACKETSIZE 3 +#define MOUSE_4D_PACKETSIZE 3 #define MOUSE_4D_WHEELBITS 0xf0 /* A4 Tech 4D+ Mouse (PS/2) data packet */ -#define MOUSE_4DPLUS_PACKETSIZE 3 +#define MOUSE_4DPLUS_PACKETSIZE 3 #define MOUSE_4DPLUS_ZNEG 0x04 /* sign bit */ #define MOUSE_4DPLUS_BUTTON4DOWN 0x08 @@ -343,7 +358,7 @@ typedef struct mousevar { * as at the level 0. There are additional three bytes which shows * `dz' and the states of additional buttons. `dz' is expressed as the * sum of the byte 5 and 6 which contain signed seven bit values. - * The states of the button 4 though 10 are in the bit 0 though 6 in + * The states of the button 4 though 10 are in the bit 0 though 6 in * the byte 7 respectively: 1 indicates the button is up. */ #define MOUSE_SYS_PACKETSIZE 8 From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 18:45:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67B9A7C0; Sat, 11 Apr 2015 18:45:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 497C6869; Sat, 11 Apr 2015 18:45:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BIjNT0067145; Sat, 11 Apr 2015 18:45:23 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BIjNFR067144; Sat, 11 Apr 2015 18:45:23 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504111845.t3BIjNFR067144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Sat, 11 Apr 2015 18:45:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281441 - head/sys/dev/atkbdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 18:45:23 -0000 Author: rpaulo Date: Sat Apr 11 18:45:22 2015 New Revision: 281441 URL: https://svnweb.freebsd.org/changeset/base/281441 Log: Add support for controlling the trackpoint when Synaptics is enabled. To accomplish this, we must put the Synaptics hardware in passthrough mode when talking to the trackpoint. I only performed minor style modifications. Submitted by: Jan Kokemüller MFC after: 1 week Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Sat Apr 11 18:44:07 2015 (r281440) +++ head/sys/dev/atkbdc/psm.c Sat Apr 11 18:45:22 2015 (r281441) @@ -191,7 +191,8 @@ enum { SYNAPTICS_SYSCTL_VSCROLL_VER_AREA, SYNAPTICS_SYSCTL_VSCROLL_MIN_DELTA, SYNAPTICS_SYSCTL_VSCROLL_DIV_MIN, - SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX + SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX, + SYNAPTICS_SYSCTL_TOUCHPAD_OFF }; typedef struct synapticsinfo { @@ -229,6 +230,7 @@ typedef struct synapticsinfo { int vscroll_min_delta; int vscroll_div_min; int vscroll_div_max; + int touchpad_off; } synapticsinfo_t; typedef struct synapticspacket { @@ -478,6 +480,10 @@ static probefunc_t enable_synaptics; static probefunc_t enable_trackpoint; static probefunc_t enable_versapad; +static void set_trackpoint_parameters(struct psm_softc *sc); +static void synaptics_passthrough_on(struct psm_softc *sc); +static void synaptics_passthrough_off(struct psm_softc *sc); + static struct { int model; u_char syncmask; @@ -885,6 +891,13 @@ doinitialize(struct psm_softc *sc, mouse set_mouse_resolution(kbdc, mode->resolution); set_mouse_scaling(kbdc, 1); set_mouse_mode(kbdc); + + /* + * Trackpoint settings are lost on resume. + * Restore them here. + */ + if (sc->tphw > 0) + set_trackpoint_parameters(sc); } /* Record sync on the next data packet we see. */ @@ -2725,6 +2738,12 @@ proc_synaptics(struct psm_softc *sc, pac goto SYNAPTICS_END; } + if (sc->syninfo.touchpad_off) { + *x = *y = *z = 0; + ms->button = ms->obutton; + goto SYNAPTICS_END; + } + /* Button presses */ touchpad_buttons = 0; if (pb->ipacket[0] & 0x01) @@ -4131,6 +4150,10 @@ synaptics_sysctl(SYSCTL_HANDLER_ARGS) if (arg < -6143 || arg > 6143) return (EINVAL); break; + case SYNAPTICS_SYSCTL_TOUCHPAD_OFF: + if (arg < 0 || arg > 1) + return (EINVAL); + break; default: return (EINVAL); } @@ -4458,6 +4481,15 @@ synaptics_sysctl_create_tree(struct psm_ &sc->syninfo.vscroll_div_max, SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX, synaptics_sysctl, "I", "Divisor for slow scrolling"); + + /* hw.psm.synaptics.touchpad_off. */ + sc->syninfo.touchpad_off = 0; + SYSCTL_ADD_PROC(&sc->syninfo.sysctl_ctx, + SYSCTL_CHILDREN(sc->syninfo.sysctl_tree), OID_AUTO, + "touchpad_off", CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_ANYBODY, + &sc->syninfo.touchpad_off, SYNAPTICS_SYSCTL_TOUCHPAD_OFF, + synaptics_sysctl, "I", + "Turn off touchpad"); } static int @@ -4689,25 +4721,75 @@ enable_synaptics(KBDC kbdc, struct psm_s VLOG(3, (LOG_DEBUG, "synaptics: END init (%d buttons)\n", buttons)); if (sc != NULL) { + if (trackpoint_support && synhw.capPassthrough) { + synaptics_passthrough_on(sc); + enable_trackpoint(kbdc, sc); + synaptics_passthrough_off(sc); + } /* Create sysctl tree. */ synaptics_sysctl_create_tree(sc); - sc->hw.buttons = buttons; } return (TRUE); } +static void +synaptics_passthrough_on(struct psm_softc *sc) +{ + int mode_byte; + + mode_byte = 0xc1 | (1 << 5); + VLOG(2, (LOG_NOTICE, "psm: setting pass-through mode. %d\n", + mode_byte)); + mouse_ext_command(sc->kbdc, mode_byte); + + /* "Commit" the Set Mode Byte command sent above. */ + set_mouse_sampling_rate(sc->kbdc, 20); +} + +static void +synaptics_passthrough_off(struct psm_softc *sc) +{ + int mode_byte; + + mode_byte = 0xc1; + VLOG(2, (LOG_NOTICE, "psm: turning pass-through mode off.\n")); + set_mouse_scaling(sc->kbdc, 2); + set_mouse_scaling(sc->kbdc, 1); + mouse_ext_command(sc->kbdc, mode_byte); + + /* "Commit" the Set Mode Byte command sent above. */ + set_mouse_sampling_rate(sc->kbdc, 20); +} + /* IBM/Lenovo TrackPoint */ static int -trackpoint_command(KBDC kbdc, int cmd, int loc, int val) +trackpoint_command(struct psm_softc *sc, int cmd, int loc, int val) { const int seq[] = { 0xe2, cmd, loc, val }; int i; - for (i = 0; i < nitems(seq); i++) - if (send_aux_command(kbdc, seq[i]) != PSM_ACK) + if (sc->synhw.capPassthrough) + synaptics_passthrough_on(sc); + + for (i = 0; i < nitems(seq); i++) { + if (sc->synhw.capPassthrough && + (seq[i] == 0xff || seq[i] == 0xe7)) + if (send_aux_command(sc->kbdc, 0xe7) != PSM_ACK) { + synaptics_passthrough_off(sc); + return (EIO); + } + if (send_aux_command(sc->kbdc, seq[i]) != PSM_ACK) { + if (sc->synhw.capPassthrough) + synaptics_passthrough_off(sc); return (EIO); + } + } + + if (sc->synhw.capPassthrough) + synaptics_passthrough_off(sc); + return (0); } @@ -4750,7 +4832,7 @@ trackpoint_sysctl(SYSCTL_HANDLER_ARGS) return (0); if (newval < 0 || newval > (tp[TPMASK] == 0 ? 255 : 1)) return (EINVAL); - error = trackpoint_command(sc->kbdc, tp[TPMASK] == 0 ? 0x81 : 0x47, + error = trackpoint_command(sc, tp[TPMASK] == 0 ? 0x81 : 0x47, tp[TPLOC], tp[TPMASK] == 0 ? newval : tp[TPMASK]); if (error != 0) return (error); @@ -4773,7 +4855,7 @@ trackpoint_sysctl_create_tree(struct psm 0, "IBM/Lenovo TrackPoint"); /* hw.psm.trackpoint.sensitivity */ - sc->tpinfo.sensitivity = 0x64; + sc->tpinfo.sensitivity = 0x80; SYSCTL_ADD_PROC(&sc->tpinfo.sysctl_ctx, SYSCTL_CHILDREN(sc->tpinfo.sysctl_tree), OID_AUTO, "sensitivity", CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_ANYBODY, @@ -4881,6 +4963,25 @@ trackpoint_sysctl_create_tree(struct psm "Skip backups from drags"); } +static void +set_trackpoint_parameters(struct psm_softc *sc) +{ + trackpoint_command(sc, 0x81, 0x4a, sc->tpinfo.sensitivity); + trackpoint_command(sc, 0x81, 0x60, sc->tpinfo.uplateau); + trackpoint_command(sc, 0x81, 0x4d, sc->tpinfo.inertia); + trackpoint_command(sc, 0x81, 0x57, sc->tpinfo.reach); + trackpoint_command(sc, 0x81, 0x58, sc->tpinfo.draghys); + trackpoint_command(sc, 0x81, 0x59, sc->tpinfo.mindrag); + trackpoint_command(sc, 0x81, 0x5a, sc->tpinfo.upthresh); + trackpoint_command(sc, 0x81, 0x5c, sc->tpinfo.threshold); + trackpoint_command(sc, 0x81, 0x5d, sc->tpinfo.jenks); + trackpoint_command(sc, 0x81, 0x5e, sc->tpinfo.ztime); + if (sc->tpinfo.pts == 0x01) + trackpoint_command(sc, 0x47, 0x2c, 0x01); + if (sc->tpinfo.skipback == 0x01) + trackpoint_command(sc, 0x47, 0x2d, 0x08); +} + static int enable_trackpoint(KBDC kbdc, struct psm_softc *sc) { @@ -4901,23 +5002,14 @@ enable_trackpoint(KBDC kbdc, struct psm_ /* Create sysctl tree. */ trackpoint_sysctl_create_tree(sc); - trackpoint_command(kbdc, 0x81, 0x4a, sc->tpinfo.sensitivity); - trackpoint_command(kbdc, 0x81, 0x4d, sc->tpinfo.inertia); - trackpoint_command(kbdc, 0x81, 0x60, sc->tpinfo.uplateau); - trackpoint_command(kbdc, 0x81, 0x57, sc->tpinfo.reach); - trackpoint_command(kbdc, 0x81, 0x58, sc->tpinfo.draghys); - trackpoint_command(kbdc, 0x81, 0x59, sc->tpinfo.mindrag); - trackpoint_command(kbdc, 0x81, 0x5a, sc->tpinfo.upthresh); - trackpoint_command(kbdc, 0x81, 0x5c, sc->tpinfo.threshold); - trackpoint_command(kbdc, 0x81, 0x5d, sc->tpinfo.jenks); - trackpoint_command(kbdc, 0x81, 0x5e, sc->tpinfo.ztime); - if (sc->tpinfo.pts == 0x01) - trackpoint_command(kbdc, 0x47, 0x2c, 0x01); - if (sc->tpinfo.skipback == 0x01) - trackpoint_command(kbdc, 0x47, 0x2d, 0x08); - - sc->hw.hwid = id; - sc->hw.buttons = 3; + /* + * Don't overwrite hwid and buttons when we are + * a guest device. + */ + if (!sc->synhw.capPassthrough) { + sc->hw.hwid = id; + sc->hw.buttons = 3; + } } return (TRUE); From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 18:51:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7ED9954; Sat, 11 Apr 2015 18:51:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3A13926; Sat, 11 Apr 2015 18:51:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BIpghg071393; Sat, 11 Apr 2015 18:51:42 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BIpgRS071392; Sat, 11 Apr 2015 18:51:42 GMT (envelope-from will@FreeBSD.org) Message-Id: <201504111851.t3BIpgRS071392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Sat, 11 Apr 2015 18:51:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281442 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 18:51:42 -0000 Author: will Date: Sat Apr 11 18:51:41 2015 New Revision: 281442 URL: https://svnweb.freebsd.org/changeset/base/281442 Log: uiomove_object_page(): Avoid instantiating pages in sparse regions on reads. Check whether the page being requested is either resident or on swap. If not, read from the zero_region instead of instantiating an unnecessary page. This avoids consuming memory for sparse files on tmpfs, when they are read by applications that do not use SEEK_HOLE/SEEK_DATA (which is most of them). Reviewed by: kib MFC after: 1 week Sponsored by: Spectra Logic Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Sat Apr 11 18:45:22 2015 (r281441) +++ head/sys/kern/uipc_shm.c Sat Apr 11 18:51:41 2015 (r281442) @@ -163,6 +163,17 @@ uiomove_object_page(vm_object_t obj, siz VM_OBJECT_WLOCK(obj); /* + * Read I/O without either a corresponding resident page or swap + * page: use zero_region. This is intended to avoid instantiating + * pages on read from a sparse region. + */ + if (uio->uio_rw == UIO_READ && vm_page_lookup(obj, idx) == NULL && + !vm_pager_has_page(obj, idx, NULL, NULL)) { + VM_OBJECT_WUNLOCK(obj); + return (uiomove(__DECONST(void *, zero_region), len, uio)); + } + + /* * Parallel reads of the page content from disk are prevented * by exclusive busy. * From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 20:01:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 983B55D5; Sat, 11 Apr 2015 20:01:15 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 21594F2B; Sat, 11 Apr 2015 20:01:14 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t3BK153Z008809 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 11 Apr 2015 23:01:05 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t3BK156i008808; Sat, 11 Apr 2015 23:01:05 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 11 Apr 2015 23:01:05 +0300 From: Gleb Smirnoff To: Xin LI Subject: Re: svn commit: r281388 - head/sys/netinet Message-ID: <20150411200105.GL883@FreeBSD.org> References: <201504110107.t3B170s1063618@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504110107.t3B170s1063618@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 20:01:15 -0000 On Sat, Apr 11, 2015 at 01:07:00AM +0000, Xin LI wrote: X> Author: delphij X> Date: Sat Apr 11 01:06:59 2015 X> New Revision: 281388 X> URL: https://svnweb.freebsd.org/changeset/base/281388 X> X> Log: X> Attempt to fix build after 281351 by defining full prototype for the X> functions that were moved to ip_reass.c. Thanks, Xin! -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 20:44:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13B9FEEF; Sat, 11 Apr 2015 20:44:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2F805F7; Sat, 11 Apr 2015 20:44:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BKiLKp023828; Sat, 11 Apr 2015 20:44:21 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BKiL0J023826; Sat, 11 Apr 2015 20:44:21 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504112044.t3BKiL0J023826@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 11 Apr 2015 20:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281443 - head/sys/arm/qemu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 20:44:22 -0000 Author: andrew Date: Sat Apr 11 20:44:21 2015 New Revision: 281443 URL: https://svnweb.freebsd.org/changeset/base/281443 Log: Change the virtual address used to not be 0xc0000000, the arm loader doesn't handle this address. Modified: head/sys/arm/qemu/std.virt Modified: head/sys/arm/qemu/std.virt ============================================================================== --- head/sys/arm/qemu/std.virt Sat Apr 11 18:51:41 2015 (r281442) +++ head/sys/arm/qemu/std.virt Sat Apr 11 20:44:21 2015 (r281443) @@ -5,8 +5,8 @@ makeoptions CONF_CFLAGS="-march=armv7a" makeoptions ARM_LITTLE_ENDIAN options ARM_L2_PIPT -options KERNVIRTADDR = 0xc0000000 -makeoptions KERNVIRTADDR = 0xc0000000 +options KERNVIRTADDR = 0xc1000000 +makeoptions KERNVIRTADDR = 0xc1000000 options IPI_IRQ_START=0 options IPI_IRQ_END=15 From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 21:16:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 574502C7; Sat, 11 Apr 2015 21:16:20 +0000 (UTC) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 130E08EA; Sat, 11 Apr 2015 21:16:20 +0000 (UTC) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 989895C37; Sat, 11 Apr 2015 23:16:15 +0200 (CEST) Subject: Re: svn commit: r281396 - in head/sys: contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/components/debugger contrib/dev/acpica/components/disassembler contrib... Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_BB4446F8-6BBE-4800-9821-BDE86EA0A48A"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b6 From: Dimitry Andric In-Reply-To: <201504110323.t3B3Ngep029970@svn.freebsd.org> Date: Sat, 11 Apr 2015 23:16:11 +0200 Message-Id: <835FF75C-5740-4EF4-B6EE-5FB48E1523F4@FreeBSD.org> References: <201504110323.t3B3Ngep029970@svn.freebsd.org> To: Jung-uk Kim X-Mailer: Apple Mail (2.2098) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 21:16:20 -0000 --Apple-Mail=_BB4446F8-6BBE-4800-9821-BDE86EA0A48A Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 11 Apr 2015, at 05:23, Jung-uk Kim wrote: > > Author: jkim > Date: Sat Apr 11 03:23:41 2015 > New Revision: 281396 > URL: https://svnweb.freebsd.org/changeset/base/281396 > > Log: > Merge ACPICA 20150410. Shall we MFC this at some point? :) -Dimitry --Apple-Mail=_BB4446F8-6BBE-4800-9821-BDE86EA0A48A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.27 iEYEARECAAYFAlUpjx4ACgkQsF6jCi4glqObRACgjKk7LvDCRIcs05ws/2B1RtZI w5UAoJbJP9r3Z9/hM3ej5tA7+fjR7Lw6 =uLcV -----END PGP SIGNATURE----- --Apple-Mail=_BB4446F8-6BBE-4800-9821-BDE86EA0A48A-- From owner-svn-src-head@FreeBSD.ORG Sat Apr 11 22:57:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76556D54; Sat, 11 Apr 2015 22:57:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6268419A; Sat, 11 Apr 2015 22:57:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3BMvE1E084535; Sat, 11 Apr 2015 22:57:14 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3BMvEWb084534; Sat, 11 Apr 2015 22:57:14 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201504112257.t3BMvEWb084534@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 11 Apr 2015 22:57:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281444 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 22:57:14 -0000 Author: alc Date: Sat Apr 11 22:57:13 2015 New Revision: 281444 URL: https://svnweb.freebsd.org/changeset/base/281444 Log: Correct an off-by-one error in vm_reserv_reclaim_contig() that results in an infinite loop. Submitted by: Svatopluk Kraus MFC after: 1 week Modified: head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Sat Apr 11 20:44:21 2015 (r281443) +++ head/sys/vm/vm_reserv.c Sat Apr 11 22:57:13 2015 (r281444) @@ -983,8 +983,18 @@ vm_reserv_reclaim_contig(u_long npages, break; } else if ((pa & (alignment - 1)) != 0 || ((pa ^ (pa + size - 1)) & ~(boundary - 1)) != 0) { - /* Continue with this reservation. */ - hi = lo; + /* + * The current page doesn't meet the alignment + * and/or boundary requirements. Continue + * searching this reservation until the rest + * of its free pages are either excluded or + * exhausted. + */ + hi = lo + 1; + if (hi >= NBPOPMAP) { + hi = 0; + i++; + } continue; } /* Find the next used page. */