From owner-svn-src-all@FreeBSD.ORG Sun Apr 5 01:03:12 2015 Return-Path: Delivered-To: svn-src-all@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 4803182D; Sun, 5 Apr 2015 01:03: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 33265C3C; Sun, 5 Apr 2015 01:03: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 t3513CHj082103; Sun, 5 Apr 2015 01:03:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3513CJf082102; Sun, 5 Apr 2015 01:03:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504050103.t3513CJf082102@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 01:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281095 - stable/10/sys/fs/msdosfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 01:03:12 -0000 Author: kib Date: Sun Apr 5 01:03:11 2015 New Revision: 281095 URL: https://svnweb.freebsd.org/changeset/base/281095 Log: MFC r280342: msdosfs: mark unused compat-mount fields. Modified: stable/10/sys/fs/msdosfs/msdosfsmount.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/msdosfs/msdosfsmount.h ============================================================================== --- stable/10/sys/fs/msdosfs/msdosfsmount.h Sat Apr 4 23:56:38 2015 (r281094) +++ stable/10/sys/fs/msdosfs/msdosfsmount.h Sun Apr 5 01:03:11 2015 (r281095) @@ -239,8 +239,8 @@ struct msdosfs_args { gid_t gid; /* gid that owns msdosfs files */ mode_t mask; /* file mask to be applied for msdosfs perms */ int flags; /* see below */ - int magic; /* version number */ - u_int16_t u2w[128]; /* Local->Unicode table */ + int unused1; /* unused, was version number */ + u_int16_t unused2[128]; /* no longer used, was Local->Unicode table */ char *cs_win; /* Windows(Unicode) Charset */ char *cs_dos; /* DOS Charset */ char *cs_local; /* Local Charset */ @@ -264,6 +264,4 @@ struct msdosfs_args { #define MSDOSFS_LARGEFS 0x10000000 /* perform fileno mapping */ #define MSDOSFS_FSIMOD 0x01000000 -#define MSDOSFS_ARGSMAGIC 0xe4eff300 - #endif /* !_MSDOSFS_MSDOSFSMOUNT_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Apr 5 02:42:53 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 02:43:37 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 02:57:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 05:00:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 05:07:25 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 05:09:39 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 05:14:22 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 05:18:16 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 06:53:31 2015 Return-Path: Delivered-To: svn-src-all@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 33F092A3; Sun, 5 Apr 2015 06:53: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 1E20E26C; Sun, 5 Apr 2015 06:53: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 t356rU2r047295; Sun, 5 Apr 2015 06:53:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t356rUaw047294; Sun, 5 Apr 2015 06:53:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504050653.t356rUaw047294@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 06:53:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281104 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 06:53:31 -0000 Author: mav Date: Sun Apr 5 06:53:29 2015 New Revision: 281104 URL: https://svnweb.freebsd.org/changeset/base/281104 Log: MFC r280822: Some cosmetic polishing. No functional change. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Apr 5 05:18:14 2015 (r281103) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Apr 5 06:53:29 2015 (r281104) @@ -4152,10 +4152,10 @@ arc_init(void) #endif #endif /* sun */ /* set min cache to 1/32 of all memory, or 16MB, whichever is more */ - arc_c_min = MAX(arc_c / 4, 64<<18); + arc_c_min = MAX(arc_c / 4, 16 << 20); /* set max to 1/2 of all memory, or all but 1GB, whichever is more */ - if (arc_c * 8 >= 1<<30) - arc_c_max = (arc_c * 8) - (1<<30); + if (arc_c * 8 >= 1 << 30) + arc_c_max = (arc_c * 8) - (1 << 30); else arc_c_max = arc_c_min; arc_c_max = MAX(arc_c * 5, arc_c_max); @@ -4165,9 +4165,9 @@ arc_init(void) * Allow the tunables to override our calculations if they are * reasonable (ie. over 16MB) */ - if (zfs_arc_max > 64<<18 && zfs_arc_max < kmem_size()) + if (zfs_arc_max > 16 << 20 && zfs_arc_max < kmem_size()) arc_c_max = zfs_arc_max; - if (zfs_arc_min > 64<<18 && zfs_arc_min <= arc_c_max) + if (zfs_arc_min > 16 << 20 && zfs_arc_min <= arc_c_max) arc_c_min = zfs_arc_min; #endif From owner-svn-src-all@FreeBSD.ORG Sun Apr 5 06:54:29 2015 Return-Path: Delivered-To: svn-src-all@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 7D2B73D5; Sun, 5 Apr 2015 06:54: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 67DC8273; Sun, 5 Apr 2015 06:54: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 t356sTcM047481; Sun, 5 Apr 2015 06:54:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t356sTH0047480; Sun, 5 Apr 2015 06:54:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504050654.t356sTH0047480@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 06:54:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281105 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 06:54:29 -0000 Author: mav Date: Sun Apr 5 06:54:28 2015 New Revision: 281105 URL: https://svnweb.freebsd.org/changeset/base/281105 Log: MFC r280822: Some cosmetic polishing. No functional change. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Apr 5 06:53:29 2015 (r281104) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Apr 5 06:54:28 2015 (r281105) @@ -4027,10 +4027,10 @@ arc_init(void) #endif #endif /* sun */ /* set min cache to 1/32 of all memory, or 16MB, whichever is more */ - arc_c_min = MAX(arc_c / 4, 64<<18); + arc_c_min = MAX(arc_c / 4, 16 << 20); /* set max to 1/2 of all memory, or all but 1GB, whichever is more */ - if (arc_c * 8 >= 1<<30) - arc_c_max = (arc_c * 8) - (1<<30); + if (arc_c * 8 >= 1 << 30) + arc_c_max = (arc_c * 8) - (1 << 30); else arc_c_max = arc_c_min; arc_c_max = MAX(arc_c * 5, arc_c_max); @@ -4040,9 +4040,9 @@ arc_init(void) * Allow the tunables to override our calculations if they are * reasonable (ie. over 16MB) */ - if (zfs_arc_max > 64<<18 && zfs_arc_max < kmem_size()) + if (zfs_arc_max > 16 << 20 && zfs_arc_max < kmem_size()) arc_c_max = zfs_arc_max; - if (zfs_arc_min > 64<<18 && zfs_arc_min <= arc_c_max) + if (zfs_arc_min > 16 << 20 && zfs_arc_min <= arc_c_max) arc_c_min = zfs_arc_min; #endif From owner-svn-src-all@FreeBSD.ORG Sun Apr 5 06:55:33 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 09:50:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 13:26:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 14:06:12 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 14:17:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 14:45:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 15:27:57 2015 Return-Path: Delivered-To: svn-src-all@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 341516DF; Sun, 5 Apr 2015 15:27: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 1F04B905; Sun, 5 Apr 2015 15:27:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t35FRumm088165; Sun, 5 Apr 2015 15:27:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t35FRuvK088164; Sun, 5 Apr 2015 15:27:56 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504051527.t35FRuvK088164@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 5 Apr 2015 15:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281110 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 15:27:57 -0000 Author: dim Date: Sun Apr 5 15:27:56 2015 New Revision: 281110 URL: https://svnweb.freebsd.org/changeset/base/281110 Log: Ensure yacc is built during bootstrap-tools for __FreeBSD_version 1001506 and earlier, since some of the ACPI tools now reach yacc's old maximum table limit. This should fix the Jenkins buildbot, which apparently runs 10.1-RELEASE. Modified: stable/10/Makefile.inc1 Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sun Apr 5 14:45:52 2015 (r281109) +++ stable/10/Makefile.inc1 Sun Apr 5 15:27:56 2015 (r281110) @@ -1252,7 +1252,7 @@ _sed= usr.bin/sed _m4= usr.bin/m4 .endif -.if ${BOOTSTRAPPING} < 1000013 +.if ${BOOTSTRAPPING} < 1001506 _yacc= lib/liby \ usr.bin/yacc From owner-svn-src-all@FreeBSD.ORG Sun Apr 5 16:35:14 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 17:10:00 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 17:16:16 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 18:25:24 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 18:37:41 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 18:39:53 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 18:42:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 18:52:04 2015 Return-Path: Delivered-To: svn-src-all@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 0D5849DB for ; Sun, 5 Apr 2015 18:52:04 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (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 D254DF03 for ; Sun, 5 Apr 2015 18:52:03 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 384D8208CF for ; Sun, 5 Apr 2015 14:51:52 -0400 (EDT) Received: from web3 ([10.202.2.213]) by compute3.internal (MEProxy); Sun, 05 Apr 2015 14:51:55 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=v7ki5aXUpNpQGHn lhuWZtnUyNsk=; b=YN2tUo8WH2VklGr8kHjB2+nqM6Hjm6pZI/mBg4/mClSe5mB GXkk2mrinkFkNZ0e5KnPwGECct9kk+hVAvtkinqKk1X9GurtI08sp+b2e2Ss++Py DiB5taYYs6xCHs4IAwyxRS+2ZjjZhO6ibTs47PAemK7D66B/7MnMxLD8A5fA= Received: by web3.nyi.internal (Postfix, from userid 99) id B430F10B15F; Sun, 5 Apr 2015 14:51:55 -0400 (EDT) Message-Id: <1428259915.3686562.249555513.69B1B019@webmail.messagingengine.com> X-Sasl-Enc: ndSTix58AtDhuNy7RZvvSlsG38yOioVosP9+TB8341nA 1428259915 From: Josh Paetzel To: svn-src-all@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-0b3c2300 In-Reply-To: References: <201504051709.t35H9xG3036827@svn.freebsd.org> Subject: Re: svn commit: r281112 - head/etc/rc.d Date: Sun, 05 Apr 2015 13:51:55 -0500 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2015 18:52:04 -0000 > > Is a character device created for pflog? > No. > > + > > # 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$||') > > + > > Could this use pgrep with a custom pidfile? > Maybe? But as far as I understand it no. pgrep returns a pid. Not following how that would help in selecting the correct pidfile, but maybe I'm missing something here. Perhaps a more concrete example would enlighten me. > Thanks! > _______________________________________________ > 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" -- Thanks, Josh Paetzel From owner-svn-src-all@FreeBSD.ORG Sun Apr 5 18:53:50 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 18:54:29 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 18:57:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 19:06:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 20:07:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 20:56:52 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 21:08:05 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 21:10:39 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 22:00:45 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 22:22:46 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 22:34:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sun Apr 5 23:06:45 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 00:35:00 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 01:04:09 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 01:12:55 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 01:32:27 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 01:39:19 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 01:53:48 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 02:35:58 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 03:02:21 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 03:16:21 2015 Return-Path: Delivered-To: svn-src-all@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 7DD3FB9C; Mon, 6 Apr 2015 03:16: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 67D54693; Mon, 6 Apr 2015 03:16: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 t363GLKX037031; Mon, 6 Apr 2015 03:16:21 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t363GLNa037030; Mon, 6 Apr 2015 03:16:21 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201504060316.t363GLNa037030@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Mon, 6 Apr 2015 03:16:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281134 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 03:16:21 -0000 Author: neel Date: Mon Apr 6 03:16:20 2015 New Revision: 281134 URL: https://svnweb.freebsd.org/changeset/base/281134 Log: MFC r272481. Add new fields in the FADT, required by IASL 20140926-64. Modified: stable/10/usr.sbin/bhyve/acpi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/acpi.c ============================================================================== --- stable/10/usr.sbin/bhyve/acpi.c Mon Apr 6 03:02:20 2015 (r281133) +++ stable/10/usr.sbin/bhyve/acpi.c Mon Apr 6 03:16:20 2015 (r281134) @@ -430,7 +430,10 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, "\n"); EFPRINTF(fp, "[0001]\t\tValue to cause reset : 06\n"); - EFPRINTF(fp, "[0003]\t\tReserved : 000000\n"); + EFPRINTF(fp, "[0002]\t\tARM Flags (decoded below): 0000\n"); + EFPRINTF(fp, "\t\t\tPSCI Compliant : 0\n"); + EFPRINTF(fp, "\t\t\tMust use HVC for PSCI : 0\n"); + EFPRINTF(fp, "[0001]\t\tFADT Minor Revision : 01\n"); EFPRINTF(fp, "[0008]\t\tFACS Address : 00000000%08X\n", basl_acpi_base + FACS_OFFSET); EFPRINTF(fp, "[0008]\t\tDSDT Address : 00000000%08X\n", From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 03:17:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 03:21:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 04:17:03 2015 Return-Path: Delivered-To: svn-src-all@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 D1F1A3C8 for ; Mon, 6 Apr 2015 04:17:03 +0000 (UTC) Received: from mail-wg0-x22b.google.com (mail-wg0-x22b.google.com [IPv6:2a00:1450:400c:c00::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 6CF63C11 for ; Mon, 6 Apr 2015 04:17:03 +0000 (UTC) Received: by wgyo15 with SMTP id o15so6997575wgy.2 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=CTenJcq2EA4R19W24X6/Cwj8aGNFzcpuxf2rZ9zDp/JY+MbKSEUkBVKRx2/sdXCxXd vjIC2x/f6kzEupkx0IJ2vIj1zPLzvC9UVZFOYfryhab82eeLt/4nV69TEP5IEE66epVD OaxboWDLMSWggUlFkSumA1JI9EDWQr6S16sQjl+HK0IZBdAnHcVBfuQPsWLI3fpWyxJQ dEZPLMOAjwI7tnI/HWshUFZnIeTCqOCf87MkLPJHEZWjLLGrMdhIV+X6cXw8FyUq8usZ 0+K5CbAkZ9vaZlIn0oaUOk8RS8MVKqY4E42GT+o57yIphveO56UAC0DDBfFGJ2qt6YPn z0Pw== X-Gm-Message-State: ALoCoQk/VAqB9byx5R39QMO89+tCxxCwAPNiBRkTrzGlZQEz9NTbeAxPirRFbHMW1pelybLMlMyo 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 04:18:38 2015 Return-Path: Delivered-To: svn-src-all@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 38E7250F for ; Mon, 6 Apr 2015 04:18:38 +0000 (UTC) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::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 B8CCDC19 for ; Mon, 6 Apr 2015 04:18:37 +0000 (UTC) Received: by wiun10 with SMTP id n10so23444984wiu.1 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=mkkwumRnx71o/rqZI//BjfMlQI9Wfs3kPvzmV0Sh+J5EatrEHqyGD2JRpQK/ypfN4e JAhj6Z2KcEBLLV65Av82gYWRp4ALuyq+ri/Lq/jUjmYeOaGTHA74rGUuomC8SJAPYzuu OloxNiuvSuVz1hs/eoXVP9QvqhfyaSViRazLlqh9lSH+GzNWTMwxno2tBjqa+y5oTYF8 Prg+jvxMOaWYqro8z1jDjJ0On4RN2pDSkAMcMry6Hgi5VZqosr7HyHweWtbgrWxE36Th P0JlTf7g9aY5JCaJQqy8KEuOEC88ILLbq5LA91uX4uBooB+bBv32z17T0LaISIG+uLs5 F+Ww== X-Gm-Message-State: ALoCoQmEcXNL614HwY564tliL6ibj4A7dw1Nqg6q9YlQB0TqoGespxzDRGpyTAc4Pp7xd9b7WyFJ 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 05:43:12 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 06:02:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 06:21:17 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 06:55:50 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 06:56:29 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 07:10:48 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 07:16:42 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 08:23:19 2015 Return-Path: Delivered-To: svn-src-all@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 103F9692; Mon, 6 Apr 2015 08:23: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 ED4CB6C8; Mon, 6 Apr 2015 08:23: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 t368NIQS082791; Mon, 6 Apr 2015 08:23:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t368N7Zf082734; Mon, 6 Apr 2015 08:23:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504060823.t368N7Zf082734@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 08:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281140 - in stable/10/sys/dev: ahci ata ata/chipsets mvs siis X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 08:23:19 -0000 Author: mav Date: Mon Apr 6 08:23:06 2015 New Revision: 281140 URL: https://svnweb.freebsd.org/changeset/base/281140 Log: MFC r280393: Reduce priority of ATA/SATA drivers. Legacy ata(4) -> BUS_PROBE_LOW_PRIORITY; more functional ahci(4), siis(4), mvs(4) -> BUS_PROBE_DEFAULT; BUS_PROBE_VENDOR leave for vendor drivers. Modified: stable/10/sys/dev/ahci/ahci.c stable/10/sys/dev/ahci/ahci_pci.c stable/10/sys/dev/ahci/ahciem.c stable/10/sys/dev/ata/ata-all.c stable/10/sys/dev/ata/chipsets/ata-acard.c stable/10/sys/dev/ata/chipsets/ata-acerlabs.c stable/10/sys/dev/ata/chipsets/ata-adaptec.c stable/10/sys/dev/ata/chipsets/ata-amd.c stable/10/sys/dev/ata/chipsets/ata-ati.c stable/10/sys/dev/ata/chipsets/ata-cenatek.c stable/10/sys/dev/ata/chipsets/ata-cypress.c stable/10/sys/dev/ata/chipsets/ata-cyrix.c stable/10/sys/dev/ata/chipsets/ata-fsl.c stable/10/sys/dev/ata/chipsets/ata-highpoint.c stable/10/sys/dev/ata/chipsets/ata-intel.c stable/10/sys/dev/ata/chipsets/ata-ite.c stable/10/sys/dev/ata/chipsets/ata-jmicron.c stable/10/sys/dev/ata/chipsets/ata-marvell.c stable/10/sys/dev/ata/chipsets/ata-micron.c stable/10/sys/dev/ata/chipsets/ata-national.c stable/10/sys/dev/ata/chipsets/ata-netcell.c stable/10/sys/dev/ata/chipsets/ata-nvidia.c stable/10/sys/dev/ata/chipsets/ata-promise.c stable/10/sys/dev/ata/chipsets/ata-serverworks.c stable/10/sys/dev/ata/chipsets/ata-siliconimage.c stable/10/sys/dev/ata/chipsets/ata-sis.c stable/10/sys/dev/ata/chipsets/ata-via.c stable/10/sys/dev/mvs/mvs.c stable/10/sys/dev/mvs/mvs_pci.c stable/10/sys/dev/mvs/mvs_soc.c stable/10/sys/dev/siis/siis.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ahci/ahci.c Mon Apr 6 08:23:06 2015 (r281140) @@ -610,7 +610,7 @@ ahci_ch_probe(device_t dev) { device_set_desc_copy(dev, "AHCI channel"); - return (0); + return (BUS_PROBE_DEFAULT); } static int Modified: stable/10/sys/dev/ahci/ahci_pci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci_pci.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ahci/ahci_pci.c Mon Apr 6 08:23:06 2015 (r281140) @@ -339,13 +339,13 @@ ahci_probe(device_t dev) snprintf(buf, sizeof(buf), "%s AHCI SATA controller", ahci_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } if (!valid) return (ENXIO); device_set_desc_copy(dev, "AHCI SATA controller"); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } static int @@ -365,11 +365,11 @@ ahci_ata_probe(device_t dev) snprintf(buf, sizeof(buf), "%s AHCI SATA controller", ahci_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } device_set_desc_copy(dev, "AHCI SATA controller"); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } static int Modified: stable/10/sys/dev/ahci/ahciem.c ============================================================================== --- stable/10/sys/dev/ahci/ahciem.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ahci/ahciem.c Mon Apr 6 08:23:06 2015 (r281140) @@ -65,7 +65,7 @@ ahci_em_probe(device_t dev) { device_set_desc_copy(dev, "AHCI enclosure management bridge"); - return (0); + return (BUS_PROBE_DEFAULT); } static int Modified: stable/10/sys/dev/ata/ata-all.c ============================================================================== --- stable/10/sys/dev/ata/ata-all.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/ata-all.c Mon Apr 6 08:23:06 2015 (r281140) @@ -92,7 +92,7 @@ FEATURE(ata_cam, "ATA devices are access int ata_probe(device_t dev) { - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } int Modified: stable/10/sys/dev/ata/chipsets/ata-acard.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-acard.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-acard.c Mon Apr 6 08:23:06 2015 (r281140) @@ -83,7 +83,7 @@ ata_acard_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_acard_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-acerlabs.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-acerlabs.c Mon Apr 6 08:23:06 2015 (r281140) @@ -96,7 +96,7 @@ ata_ali_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_ali_chipinit; ctlr->chipdeinit = ata_ali_chipdeinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-adaptec.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-adaptec.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-adaptec.c Mon Apr 6 08:23:06 2015 (r281140) @@ -75,7 +75,7 @@ ata_adaptec_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_marvell_edma_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } ATA_DECLARE_DRIVER(ata_adaptec); Modified: stable/10/sys/dev/ata/chipsets/ata-amd.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-amd.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-amd.c Mon Apr 6 08:23:06 2015 (r281140) @@ -82,7 +82,7 @@ ata_amd_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_amd_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-ati.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-ati.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-ati.c Mon Apr 6 08:23:06 2015 (r281140) @@ -123,7 +123,7 @@ ata_ati_probe(device_t dev) ctlr->chipinit = ata_ati_chipinit; break; } - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-cenatek.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-cenatek.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-cenatek.c Mon Apr 6 08:23:06 2015 (r281140) @@ -63,7 +63,7 @@ ata_cenatek_probe(device_t dev) ctlr->chipinit = ata_generic_chipinit; device_set_desc(dev, "Cenatek Rocket Drive controller"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } ATA_DECLARE_DRIVER(ata_cenatek); Modified: stable/10/sys/dev/ata/chipsets/ata-cypress.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-cypress.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-cypress.c Mon Apr 6 08:23:06 2015 (r281140) @@ -75,7 +75,7 @@ ata_cypress_probe(device_t dev) pci_get_subclass(dev) == PCIS_STORAGE_IDE) { device_set_desc(dev, "Cypress 82C693 ATA controller"); ctlr->chipinit = ata_cypress_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return ENXIO; } Modified: stable/10/sys/dev/ata/chipsets/ata-cyrix.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-cyrix.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-cyrix.c Mon Apr 6 08:23:06 2015 (r281140) @@ -66,7 +66,7 @@ ata_cyrix_probe(device_t dev) if (pci_get_devid(dev) == ATA_CYRIX_5530) { device_set_desc(dev, "Cyrix 5530 ATA33 controller"); ctlr->chipinit = ata_cyrix_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return ENXIO; } Modified: stable/10/sys/dev/ata/chipsets/ata-fsl.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-fsl.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-fsl.c Mon Apr 6 08:23:06 2015 (r281140) @@ -79,7 +79,7 @@ imx_ata_probe(device_t dev) ctrl = device_get_softc(dev); device_set_desc(dev, "Freescale Integrated PATA Controller"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static void Modified: stable/10/sys/dev/ata/chipsets/ata-highpoint.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-highpoint.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-highpoint.c Mon Apr 6 08:23:06 2015 (r281140) @@ -103,7 +103,7 @@ ata_highpoint_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_highpoint_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-intel.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-intel.c Mon Apr 6 08:23:06 2015 (r281140) @@ -264,7 +264,7 @@ ata_intel_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_intel_chipinit; ctlr->chipdeinit = ata_intel_chipdeinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-ite.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-ite.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-ite.c Mon Apr 6 08:23:06 2015 (r281140) @@ -77,7 +77,7 @@ ata_ite_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_ite_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-jmicron.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-jmicron.c Mon Apr 6 08:23:06 2015 (r281140) @@ -86,7 +86,7 @@ ata_jmicron_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_jmicron_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-marvell.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-marvell.c Mon Apr 6 08:23:06 2015 (r281140) @@ -139,7 +139,7 @@ ata_marvell_probe(device_t dev) ctlr->chipinit = ata_marvell_dummy_chipinit; break; } - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-micron.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-micron.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-micron.c Mon Apr 6 08:23:06 2015 (r281140) @@ -63,7 +63,7 @@ ata_micron_probe(device_t dev) device_set_desc(dev, "RZ 100? ATA controller !WARNING! data loss/corruption risk"); ctlr->chipinit = ata_generic_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return (ENXIO); } Modified: stable/10/sys/dev/ata/chipsets/ata-national.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-national.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-national.c Mon Apr 6 08:23:06 2015 (r281140) @@ -67,7 +67,7 @@ ata_national_probe(device_t dev) if (pci_get_devid(dev) == ATA_SC1100) { device_set_desc(dev, "National Geode SC1100 ATA33 controller"); ctlr->chipinit = ata_national_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return ENXIO; } Modified: stable/10/sys/dev/ata/chipsets/ata-netcell.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-netcell.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-netcell.c Mon Apr 6 08:23:06 2015 (r281140) @@ -66,7 +66,7 @@ ata_netcell_probe(device_t dev) if (pci_get_devid(dev) == ATA_NETCELL_SR) { device_set_desc(dev, "Netcell SyncRAID SR3000/5000 RAID Controller"); ctlr->chipinit = ata_netcell_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return ENXIO; } Modified: stable/10/sys/dev/ata/chipsets/ata-nvidia.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-nvidia.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-nvidia.c Mon Apr 6 08:23:06 2015 (r281140) @@ -187,7 +187,7 @@ ata_nvidia_probe(device_t dev) ctlr->chipinit = ata_ahci_chipinit; else ctlr->chipinit = ata_nvidia_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-promise.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-promise.c Mon Apr 6 08:23:06 2015 (r281140) @@ -209,7 +209,7 @@ ata_promise_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_promise_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-serverworks.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-serverworks.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-serverworks.c Mon Apr 6 08:23:06 2015 (r281140) @@ -96,7 +96,7 @@ ata_serverworks_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_serverworks_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-siliconimage.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-siliconimage.c Mon Apr 6 08:23:06 2015 (r281140) @@ -113,7 +113,7 @@ ata_sii_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_sii_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } int Modified: stable/10/sys/dev/ata/chipsets/ata-sis.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-sis.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-sis.c Mon Apr 6 08:23:06 2015 (r281140) @@ -154,7 +154,7 @@ ata_sis_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_sis_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-via.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/ata/chipsets/ata-via.c Mon Apr 6 08:23:06 2015 (r281140) @@ -141,7 +141,7 @@ ata_via_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_via_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: stable/10/sys/dev/mvs/mvs.c ============================================================================== --- stable/10/sys/dev/mvs/mvs.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/mvs/mvs.c Mon Apr 6 08:23:06 2015 (r281140) @@ -107,7 +107,7 @@ mvs_ch_probe(device_t dev) { device_set_desc_copy(dev, "Marvell SATA channel"); - return (0); + return (BUS_PROBE_DEFAULT); } static int Modified: stable/10/sys/dev/mvs/mvs_pci.c ============================================================================== --- stable/10/sys/dev/mvs/mvs_pci.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/mvs/mvs_pci.c Mon Apr 6 08:23:06 2015 (r281140) @@ -88,7 +88,7 @@ mvs_probe(device_t dev) snprintf(buf, sizeof(buf), "%s SATA controller", mvs_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } return (ENXIO); Modified: stable/10/sys/dev/mvs/mvs_soc.c ============================================================================== --- stable/10/sys/dev/mvs/mvs_soc.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/mvs/mvs_soc.c Mon Apr 6 08:23:06 2015 (r281140) @@ -91,7 +91,7 @@ mvs_probe(device_t dev) snprintf(buf, sizeof(buf), "%s SATA controller", mvs_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } return (ENXIO); Modified: stable/10/sys/dev/siis/siis.c ============================================================================== --- stable/10/sys/dev/siis/siis.c Mon Apr 6 07:42:05 2015 (r281139) +++ stable/10/sys/dev/siis/siis.c Mon Apr 6 08:23:06 2015 (r281140) @@ -129,7 +129,7 @@ siis_probe(device_t dev) snprintf(buf, sizeof(buf), "%s SATA controller", siis_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } return (ENXIO); @@ -451,7 +451,7 @@ siis_ch_probe(device_t dev) { device_set_desc_copy(dev, "SIIS channel"); - return (0); + return (BUS_PROBE_DEFAULT); } static int From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 08:25:57 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 08:37:41 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 08:41:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 08:49:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 08:53:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 08:55:07 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 09:15:19 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 09:42:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 11:32:44 2015 Return-Path: Delivered-To: svn-src-all@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 1EEFFCED for ; Mon, 6 Apr 2015 11:32:44 +0000 (UTC) Received: from ost.citrin.ru (ost.citrin.ru [193.169.234.215]) (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 C774BAD9 for ; Mon, 6 Apr 2015 11:32:43 +0000 (UTC) Received: from citrin.office.vega.ru (office-nat.spylog.net [193.169.234.6]) (Authenticated sender: citrin@citrin.ru) by ost.citrin.ru (Postfix) with ESMTPSA id BB38DE0F9EB for ; Mon, 6 Apr 2015 11:32:39 +0000 (UTC) Message-ID: <55226ED7.2010007@citrin.ru> Date: Mon, 06 Apr 2015 14:32:39 +0300 From: Anton Yuzhaninov User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/20130516 Thunderbird/17.0.6 MIME-Version: 1.0 To: svn-src-all@freebsd.org Subject: Re: svn commit: r281129 - head/etc References: <201504060132.t361WRVe090234@svn.freebsd.org> In-Reply-To: <201504060132.t361WRVe090234@svn.freebsd.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrin.ru; s=s0; t=1428319959; bh=syKzYM+813+YKBDxPKUU0Mft1lI4ZedjRsLKDzSK2es=; h=Message-ID:Date:From:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Dbp2GcMz06Dg8az8mq2AxzrxCXdMwLy9Sqwl9+SQrK4aNvXy8krKrMCNp7kUfB54bzOmIhvLpIcLGXBr3aIIeztuOVL2HBL1nnFeVkE/Ah8fqf+PFwe6MnYaSMuXqf4WnVz2yg28gUEueROHdsQbjBi0id09S7DhAXD+uasxtEc= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 11:32:44 -0000 On 04/06/15 04:32, Dmitry Marakasov wrote: > Log: > Switch russian login class to UTF-8 > UTF-8 is still has problems in FreeBSD. E. g. try to sort file with lines (with ru_RU.UTF-8 locale) $ cat > ttt Ú £ Ö Å Ctrl+d $ sort ttt Å Ö Ú £ This order is wrong. On Linux sort order for this file is correct (and was correct several years ago). I don't have current now, but this bug still here in stable/10 and I don't remember any commits in this area. I don't find PR after quick search, but I think this problem is well known. From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 11:51:24 2015 Return-Path: Delivered-To: svn-src-all@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 8EF16244 for ; Mon, 6 Apr 2015 11:51:24 +0000 (UTC) Received: from mail-vn0-x233.google.com (mail-vn0-x233.google.com [IPv6:2607:f8b0:400c:c0f::233]) (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 3E7A4C78 for ; Mon, 6 Apr 2015 11:51:24 +0000 (UTC) Received: by vnbf1 with SMTP id f1so4037907vnb.5 for ; Mon, 06 Apr 2015 04:51:23 -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=RbtruM7sA7ENK78X+UrjsMWZixBdAXF9Eofq69CjbK4=; b=CpPgQpuk2fuqDlYQygxVLE8A/iQX7O5RSYDLwwF+B3mNi/mQRtZ56FRTjruDc0lCH6 k3CW2gVALF5pfe0iDrno3hV2PtMef51tXq9nMR2ERWoli7TtgqHtkWjaKdeLZSpO/rjQ KO2R1VjZQ/GeusBKfI1cdPeOLAe5oS57298sLE7D+q36T/GKcddIl4xDLXXEglZt3yAR iolPZuGxYzXxHLagvqjDYhRP8m3iLVbLGMIdXR2byEqDAItvGwjhft7ztKiax8OjEawX PojhIPBOs7YPcVKpyFyT9oGn2uZ99AdcP9uUMlN0Y0MxMGOEUIVbEd2LmCLQS85alJB9 Zzxg== X-Received: by 10.52.138.40 with SMTP id qn8mr9603169vdb.72.1428321083213; Mon, 06 Apr 2015 04:51:23 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id cw4sm813955vdd.14.2015.04.06.04.51.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Apr 2015 04:51:21 -0700 (PDT) Sender: Baptiste Daroussin Date: Mon, 6 Apr 2015 13:51:18 +0200 From: Baptiste Daroussin To: Anton Yuzhaninov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406115117.GB56860@ivaldir.etoilebsd.net> References: <201504060132.t361WRVe090234@svn.freebsd.org> <55226ED7.2010007@citrin.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mojUlQ0s9EVzWg2t" Content-Disposition: inline In-Reply-To: <55226ED7.2010007@citrin.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 11:51:24 -0000 --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 06, 2015 at 02:32:39PM +0300, Anton Yuzhaninov wrote: > On 04/06/15 04:32, Dmitry Marakasov wrote: > > Log: > > Switch russian login class to UTF-8 > > >=20 > UTF-8 is still has problems in FreeBSD. >=20 > E. g. try to sort file with lines (with ru_RU.UTF-8 locale) >=20 > $ cat > ttt > =D0=B7 > =D1=91 > =D0=B6 > =D0=B5 > Ctrl+d > $ sort ttt > =D0=B5 > =D0=B6 > =D0=B7 > =D1=91 >=20 > This order is wrong. >=20 This has been "fixed" after my commit on the same file where we enforce LC_COLLATE=3DC /me will love to see proper utf8 aware collation function in freebsd :( Best regards, Bapt --mojUlQ0s9EVzWg2t Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlUiczUACgkQ8kTtMUmk6EwFxgCfUJ6PkvoOWaD6EQmc1Erkdxd5 FSkAoKMGQRZU8tHY3QxTs3eommJnd2+f =0XSA -----END PGP SIGNATURE----- --mojUlQ0s9EVzWg2t-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 12:22:42 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 12:36:25 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 12:49:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 77879EE1; Mon, 6 Apr 2015 12:49:39 +0000 (UTC) Date: Mon, 6 Apr 2015 12:49:39 +0000 From: Alexey Dokuchaev To: John Baldwin Subject: Re: svn commit: r280973 - in stable: 10/sys/amd64/amd64 10/sys/dev/acpica 10/sys/i386/i386 10/sys/kern 10/sys/sys 10/sys/x86/x86 9/sys/amd64/amd64 9/sys/dev/acpica 9/sys/i386/i386 9/sys/kern 9/sys/sys ... Message-ID: <20150406124939.GA48665@FreeBSD.org> References: <201504020102.t3212lTO021499@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504020102.t3212lTO021499@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 12:49:39 -0000 On Thu, Apr 02, 2015 at 01:02:47AM +0000, John Baldwin wrote: > New Revision: 280973 > URL: https://svnweb.freebsd.org/changeset/base/280973 > > Log: > MFC 276724: > On some Intel CPUs with a P-state but not C-state invariant TSC the TSC > may also halt in C2 and not just C3 (it seems that in some cases the BIOS > advertises its C3 state as a C2 state in _CST). Just play it safe and > disable both C2 and C3 states if a user forces the use of the TSC as the > timecounter on such CPUs. Does it apply to stable/8 as well? Any preliminary testing I might have to conduct first? ./danfe From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 12:57:19 2015 Return-Path: Delivered-To: svn-src-all@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 ACD392C2 for ; Mon, 6 Apr 2015 12:57:19 +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 3273C35D for ; Mon, 6 Apr 2015 12:57:17 +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 t36Cv6BQ091394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 6 Apr 2015 15:57:06 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t36Cv6HS091393; Mon, 6 Apr 2015 15:57:06 +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 15:57:06 +0300 From: Gleb Smirnoff To: Anton Yuzhaninov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406125706.GY64665@glebius.int.ru> References: <201504060132.t361WRVe090234@svn.freebsd.org> <55226ED7.2010007@citrin.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <55226ED7.2010007@citrin.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 12:57:19 -0000 On Mon, Apr 06, 2015 at 02:32:39PM +0300, Anton Yuzhaninov wrote: A> On 04/06/15 04:32, Dmitry Marakasov wrote: A> > Log: A> > Switch russian login class to UTF-8 A> > A> A> UTF-8 is still has problems in FreeBSD. A> A> E. g. try to sort file with lines (with ru_RU.UTF-8 locale) A> A> $ cat > ttt A> з A> Ñ‘ A> ж A> е A> Ctrl+d A> $ sort ttt A> е A> ж A> з A> Ñ‘ A> A> This order is wrong. This is known. The problems of staying w/o UTF-8 today overweight problems of switching to UTF-8. And hopefully, the switch will motivate someone to do the collation :) -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 13:06:56 2015 Return-Path: Delivered-To: svn-src-all@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 5AC6C4F8; Mon, 6 Apr 2015 13:06:56 +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 135C2647; Mon, 6 Apr 2015 13:06:56 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Yf6js-000Il6-Qj; Mon, 06 Apr 2015 16:06:52 +0300 Date: Mon, 6 Apr 2015 16:06:52 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406130652.GI74532@zxy.spb.ru> References: <201504060132.t361WRVe090234@svn.freebsd.org> <55226ED7.2010007@citrin.ru> <20150406125706.GY64665@glebius.int.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150406125706.GY64665@glebius.int.ru> 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-all@freebsd.org, Anton Yuzhaninov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 13:06:56 -0000 On Mon, Apr 06, 2015 at 03:57:06PM +0300, Gleb Smirnoff wrote: > On Mon, Apr 06, 2015 at 02:32:39PM +0300, Anton Yuzhaninov wrote: > A> On 04/06/15 04:32, Dmitry Marakasov wrote: > A> > Log: > A> > Switch russian login class to UTF-8 > A> > > A> > A> UTF-8 is still has problems in FreeBSD. > A> > A> E. g. try to sort file with lines (with ru_RU.UTF-8 locale) > A> > A> $ cat > ttt > A> Ú > A> £ > A> Ö > A> Å > A> Ctrl+d > A> $ sort ttt > A> Å > A> Ö > A> Ú > A> £ > A> > A> This order is wrong. > > This is known. The problems of staying w/o UTF-8 today overweight problems > of switching to UTF-8. > > And hopefully, the switch will motivate someone to do the collation :) Why you need broken somewehere (and broken backward compatibility)? Why you don't just adding new login class (russian_utf8)? From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 13:09:48 2015 Return-Path: Delivered-To: svn-src-all@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 2A93C569 for ; Mon, 6 Apr 2015 13:09:48 +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 A539565A for ; Mon, 6 Apr 2015 13:09:47 +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 t36D9itP091475 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 6 Apr 2015 16:09:44 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t36D9iki091474; Mon, 6 Apr 2015 16:09:44 +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 16:09:44 +0300 From: Gleb Smirnoff To: Slawa Olhovchenkov Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406130944.GZ64665@glebius.int.ru> References: <201504060132.t361WRVe090234@svn.freebsd.org> <55226ED7.2010007@citrin.ru> <20150406125706.GY64665@glebius.int.ru> <20150406130652.GI74532@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150406130652.GI74532@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-all@freebsd.org, Anton Yuzhaninov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 13:09:48 -0000 On Mon, Apr 06, 2015 at 04:06:52PM +0300, Slawa Olhovchenkov wrote: S> On Mon, Apr 06, 2015 at 03:57:06PM +0300, Gleb Smirnoff wrote: S> S> > On Mon, Apr 06, 2015 at 02:32:39PM +0300, Anton Yuzhaninov wrote: S> > A> On 04/06/15 04:32, Dmitry Marakasov wrote: S> > A> > Log: S> > A> > Switch russian login class to UTF-8 S> > A> > S> > A> S> > A> UTF-8 is still has problems in FreeBSD. S> > A> S> > A> E. g. try to sort file with lines (with ru_RU.UTF-8 locale) S> > A> S> > A> $ cat > ttt S> > A> з S> > A> Ñ‘ S> > A> ж S> > A> е S> > A> Ctrl+d S> > A> $ sort ttt S> > A> е S> > A> ж S> > A> з S> > A> Ñ‘ S> > A> S> > A> This order is wrong. S> > S> > This is known. The problems of staying w/o UTF-8 today overweight problems S> > of switching to UTF-8. S> > S> > And hopefully, the switch will motivate someone to do the collation :) S> S> Why you need broken somewehere (and broken backward compatibility)? S> Why you don't just adding new login class (russian_utf8)? Right now we've got broken compatibility with the rest of the world. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 13:15:02 2015 Return-Path: Delivered-To: svn-src-all@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 5FBC4618; Mon, 6 Apr 2015 13:15:02 +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 16EE4770; Mon, 6 Apr 2015 13:15:02 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Yf6rk-000IvQ-6M; Mon, 06 Apr 2015 16:15:00 +0300 Date: Mon, 6 Apr 2015 16:15:00 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r281129 - head/etc Message-ID: <20150406131459.GM23643@zxy.spb.ru> References: <201504060132.t361WRVe090234@svn.freebsd.org> <55226ED7.2010007@citrin.ru> <20150406125706.GY64665@glebius.int.ru> <20150406130652.GI74532@zxy.spb.ru> <20150406130944.GZ64665@glebius.int.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150406130944.GZ64665@glebius.int.ru> 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-all@freebsd.org, Anton Yuzhaninov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 13:15:02 -0000 On Mon, Apr 06, 2015 at 04:09:44PM +0300, Gleb Smirnoff wrote: > On Mon, Apr 06, 2015 at 04:06:52PM +0300, Slawa Olhovchenkov wrote: > S> On Mon, Apr 06, 2015 at 03:57:06PM +0300, Gleb Smirnoff wrote: > S> > S> > On Mon, Apr 06, 2015 at 02:32:39PM +0300, Anton Yuzhaninov wrote: > S> > A> On 04/06/15 04:32, Dmitry Marakasov wrote: > S> > A> > Log: > S> > A> > Switch russian login class to UTF-8 > S> > A> > > S> > A> > S> > A> UTF-8 is still has problems in FreeBSD. > S> > A> > S> > A> E. g. try to sort file with lines (with ru_RU.UTF-8 locale) > S> > A> > S> > A> $ cat > ttt > S> > A> Ú > S> > A> £ > S> > A> Ö > S> > A> Å > S> > A> Ctrl+d > S> > A> $ sort ttt > S> > A> Å > S> > A> Ö > S> > A> Ú > S> > A> £ > S> > A> > S> > A> This order is wrong. > S> > > S> > This is known. The problems of staying w/o UTF-8 today overweight problems > S> > of switching to UTF-8. > S> > > S> > And hopefully, the switch will motivate someone to do the collation :) > S> > S> Why you need broken somewehere (and broken backward compatibility)? > S> Why you don't just adding new login class (russian_utf8)? > > Right now we've got broken compatibility with the rest of the world. We is not Windows? We don't use UTF-16? What about you talk? From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 13:55:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 14:27:40 2015 Return-Path: Delivered-To: svn-src-all@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 8D8289A5; Mon, 6 Apr 2015 14:27:40 +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 61B8BF09; Mon, 6 Apr 2015 14:27:40 +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 17958B93C; Mon, 6 Apr 2015 10:27:39 -0400 (EDT) From: John Baldwin To: Alexey Dokuchaev Subject: Re: svn commit: r280973 - in stable: 10/sys/amd64/amd64 10/sys/dev/acpica 10/sys/i386/i386 10/sys/kern 10/sys/sys 10/sys/x86/x86 9/sys/amd64/amd64 9/sys/dev/acpica 9/sys/i386/i386 9/sys/kern 9/sys/sys ... Date: Mon, 06 Apr 2015 10:25:17 -0400 Message-ID: <1845061.qZcGbcMHKr@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150406124939.GA48665@FreeBSD.org> References: <201504020102.t3212lTO021499@svn.freebsd.org> <20150406124939.GA48665@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); Mon, 06 Apr 2015 10:27:39 -0400 (EDT) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 14:27:40 -0000 On Monday, April 06, 2015 12:49:39 PM Alexey Dokuchaev wrote: > On Thu, Apr 02, 2015 at 01:02:47AM +0000, John Baldwin wrote: > > New Revision: 280973 > > URL: https://svnweb.freebsd.org/changeset/base/280973 > > > > Log: > > MFC 276724: > > On some Intel CPUs with a P-state but not C-state invariant TSC the TSC > > may also halt in C2 and not just C3 (it seems that in some cases the BIOS > > advertises its C3 state as a C2 state in _CST). Just play it safe and > > disable both C2 and C3 states if a user forces the use of the TSC as the > > timecounter on such CPUs. > > Does it apply to stable/8 as well? Any preliminary testing I might have to > conduct first? It needs some manual patching to apply to 8 (8 doesn't have the merged tsc.c in sys/x86/x86 for example). At this point in 8's life cycle I'm not inclined to merge non-trivial changes that need manual fixups, etc. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 14:45:41 2015 Return-Path: Delivered-To: svn-src-all@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 46C307DD; Mon, 6 Apr 2015 14:45: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 306B8155; Mon, 6 Apr 2015 14:45: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 t36EjfXl072219; Mon, 6 Apr 2015 14:45:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36Ejf9B072218; Mon, 6 Apr 2015 14:45:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504061445.t36Ejf9B072218@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 6 Apr 2015 14:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281148 - in stable: 10/bin/expr 9/bin/expr X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 14:45:41 -0000 Author: dim Date: Mon Apr 6 14:45:40 2015 New Revision: 281148 URL: https://svnweb.freebsd.org/changeset/base/281148 Log: MFC r280357: Build expr with -fwrapv, since it relies on signed integer wrapping having defined behavior. Reported by: rodrigc Modified: stable/9/bin/expr/Makefile Directory Properties: stable/9/ (props changed) stable/9/bin/ (props changed) stable/9/bin/expr/ (props changed) Changes in other areas also in this revision: Modified: stable/10/bin/expr/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/bin/expr/Makefile ============================================================================== --- stable/9/bin/expr/Makefile Mon Apr 6 13:55:33 2015 (r281147) +++ stable/9/bin/expr/Makefile Mon Apr 6 14:45:40 2015 (r281148) @@ -4,4 +4,7 @@ PROG= expr SRCS= expr.y YFLAGS= +# expr relies on signed integer wrapping +CFLAGS+= -fwrapv + .include From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 14:45:42 2015 Return-Path: Delivered-To: svn-src-all@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 0A6C27DE; Mon, 6 Apr 2015 14: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 E85C9156; Mon, 6 Apr 2015 14:45: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 t36Ejfed072227; Mon, 6 Apr 2015 14:45:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36EjfAe072226; Mon, 6 Apr 2015 14:45:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504061445.t36EjfAe072226@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 6 Apr 2015 14:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281148 - in stable: 10/bin/expr 9/bin/expr X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 14:45:42 -0000 Author: dim Date: Mon Apr 6 14:45:40 2015 New Revision: 281148 URL: https://svnweb.freebsd.org/changeset/base/281148 Log: MFC r280357: Build expr with -fwrapv, since it relies on signed integer wrapping having defined behavior. Reported by: rodrigc Modified: stable/10/bin/expr/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/bin/expr/Makefile Directory Properties: stable/9/ (props changed) stable/9/bin/ (props changed) stable/9/bin/expr/ (props changed) Modified: stable/10/bin/expr/Makefile ============================================================================== --- stable/10/bin/expr/Makefile Mon Apr 6 13:55:33 2015 (r281147) +++ stable/10/bin/expr/Makefile Mon Apr 6 14:45:40 2015 (r281148) @@ -6,6 +6,9 @@ PROG= expr SRCS= expr.y YFLAGS= +# expr relies on signed integer wrapping +CFLAGS+= -fwrapv + NO_WMISSING_VARIABLE_DECLARATIONS= .if ${MK_TESTS} != "no" From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 14:50:55 2015 Return-Path: Delivered-To: svn-src-all@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 285A7CCC; Mon, 6 Apr 2015 14:50: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 F343A243; Mon, 6 Apr 2015 14:50: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 t36EosBT075632; Mon, 6 Apr 2015 14:50:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36EosDP075631; Mon, 6 Apr 2015 14:50:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504061450.t36EosDP075631@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 6 Apr 2015 14:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281149 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 14:50:55 -0000 Author: dim Date: Mon Apr 6 14:50:54 2015 New Revision: 281149 URL: https://svnweb.freebsd.org/changeset/base/281149 Log: MFC r280864: Pull in r233552 from upstream libc++ trunk (by Eric Fiselier): [libcxx] Fix PR22771 - Support access control SFINAE in the library version of is_convertible. Summary: Currently the conversion check does not take place in a context where access control SFINAE is applied. This patch changes the context of the test expression so that SFINAE occurs if access control does not permit the conversion. Related bug: https://llvm.org/bugs/show_bug.cgi?id=22771 Reviewers: mclow.lists, rsmith, dim Reviewed By: dim Subscribers: dim, rodrigc, emaste, cfe-commits Differential Revision: http://reviews.llvm.org/D8461 This fixes building clang, and other programs using libc++, with newer versions of gcc (specifically, gcc 4.8 and higher). Reported by: rodrigc Modified: stable/9/contrib/libc++/include/type_traits Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/libc++/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libc++/include/type_traits Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libc++/include/type_traits ============================================================================== --- stable/9/contrib/libc++/include/type_traits Mon Apr 6 14:45:40 2015 (r281148) +++ stable/9/contrib/libc++/include/type_traits Mon Apr 6 14:50:54 2015 (r281149) @@ -842,7 +842,16 @@ template struct _ namespace __is_convertible_imp { -template char __test(_Tp); +template void __test_convert(_Tp); + +template +struct __is_convertible_test : public false_type {}; + +template +struct __is_convertible_test<_From, _To, + decltype(__test_convert<_To>(_VSTD::declval<_From>()))> : public true_type +{}; + template __two __test(...); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template _Tp&& __source(); @@ -877,10 +886,8 @@ template ::value> struct __is_convertible : public integral_constant(__is_convertible_imp::__source<_T1>())) == 1 -#else - sizeof(__is_convertible_imp::__test<_T2>(__is_convertible_imp::__source<_T1>())) == 1 + __is_convertible_imp::__is_convertible_test<_T1, _T2>::value +#if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !(!is_function<_T1>::value && !is_reference<_T1>::value && is_reference<_T2>::value && (!is_const::type>::value || is_volatile::type>::value) From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 14:50:55 2015 Return-Path: Delivered-To: svn-src-all@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 CAB39CCF; Mon, 6 Apr 2015 14:50: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 AAD1724B; Mon, 6 Apr 2015 14:50: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 t36EotCP075638; Mon, 6 Apr 2015 14:50:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36EotRw075637; Mon, 6 Apr 2015 14:50:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504061450.t36EotRw075637@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 6 Apr 2015 14:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281149 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 14:50:56 -0000 Author: dim Date: Mon Apr 6 14:50:54 2015 New Revision: 281149 URL: https://svnweb.freebsd.org/changeset/base/281149 Log: MFC r280864: Pull in r233552 from upstream libc++ trunk (by Eric Fiselier): [libcxx] Fix PR22771 - Support access control SFINAE in the library version of is_convertible. Summary: Currently the conversion check does not take place in a context where access control SFINAE is applied. This patch changes the context of the test expression so that SFINAE occurs if access control does not permit the conversion. Related bug: https://llvm.org/bugs/show_bug.cgi?id=22771 Reviewers: mclow.lists, rsmith, dim Reviewed By: dim Subscribers: dim, rodrigc, emaste, cfe-commits Differential Revision: http://reviews.llvm.org/D8461 This fixes building clang, and other programs using libc++, with newer versions of gcc (specifically, gcc 4.8 and higher). Reported by: rodrigc Modified: stable/10/contrib/libc++/include/type_traits Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/libc++/include/type_traits Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/libc++/ (props changed) Modified: stable/10/contrib/libc++/include/type_traits ============================================================================== --- stable/10/contrib/libc++/include/type_traits Mon Apr 6 14:45:40 2015 (r281148) +++ stable/10/contrib/libc++/include/type_traits Mon Apr 6 14:50:54 2015 (r281149) @@ -842,7 +842,16 @@ template struct _ namespace __is_convertible_imp { -template char __test(_Tp); +template void __test_convert(_Tp); + +template +struct __is_convertible_test : public false_type {}; + +template +struct __is_convertible_test<_From, _To, + decltype(__test_convert<_To>(_VSTD::declval<_From>()))> : public true_type +{}; + template __two __test(...); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template _Tp&& __source(); @@ -877,10 +886,8 @@ template ::value> struct __is_convertible : public integral_constant(__is_convertible_imp::__source<_T1>())) == 1 -#else - sizeof(__is_convertible_imp::__test<_T2>(__is_convertible_imp::__source<_T1>())) == 1 + __is_convertible_imp::__is_convertible_test<_T1, _T2>::value +#if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) && !(!is_function<_T1>::value && !is_reference<_T1>::value && is_reference<_T2>::value && (!is_const::type>::value || is_volatile::type>::value) From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 15:31:20 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 15:50:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 16:27:24 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 16:29:46 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 17:24:24 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 17:39:37 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 17:58:48 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 18:03:36 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 18:40:52 2015 Return-Path: Delivered-To: svn-src-all@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 CF8F6A58; Mon, 6 Apr 2015 18:40: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 B0A71A3; Mon, 6 Apr 2015 18:40: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 t36IequM090469; Mon, 6 Apr 2015 18:40:52 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36Iep2j090462; Mon, 6 Apr 2015 18:40:51 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201504061840.t36Iep2j090462@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 6 Apr 2015 18:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281161 - in stable/10: sys/netinet usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 18:40:52 -0000 Author: hiren Date: Mon Apr 6 18:40:50 2015 New Revision: 281161 URL: https://svnweb.freebsd.org/changeset/base/281161 Log: MFC r266418, r266448 Add the flowtype to the inpcb. Add -R to netstat to dump RSS/flow information. Reviewed by: delphij Relnotes: yes (for r266448) Sponsored by: Limelight Networks Modified: stable/10/sys/netinet/in_pcb.h stable/10/usr.bin/netstat/inet.c stable/10/usr.bin/netstat/main.c stable/10/usr.bin/netstat/netstat.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/in_pcb.h ============================================================================== --- stable/10/sys/netinet/in_pcb.h Mon Apr 6 18:03:35 2015 (r281160) +++ stable/10/sys/netinet/in_pcb.h Mon Apr 6 18:40:50 2015 (r281161) @@ -180,7 +180,8 @@ struct inpcb { uint32_t inp_flowid; /* (x) flow id / queue id */ u_int inp_refcount; /* (i) refcount */ void *inp_pspare[5]; /* (x) route caching / general use */ - u_int inp_ispare[6]; /* (x) route caching / user cookie / + uint32_t inp_flowtype; /* (x) M_HASHTYPE value */ + u_int inp_ispare[5]; /* (x) route caching / user cookie / * general use */ /* Local and foreign ports, local and foreign addr. */ Modified: stable/10/usr.bin/netstat/inet.c ============================================================================== --- stable/10/usr.bin/netstat/inet.c Mon Apr 6 18:03:35 2015 (r281160) +++ stable/10/usr.bin/netstat/inet.c Mon Apr 6 18:40:50 2015 (r281161) @@ -429,7 +429,7 @@ protopr(u_long off, const char *name, in "%-5.5s %-6.6s %-6.6s %-22.22s %-22.22s", "Proto", "Recv-Q", "Send-Q", "Local Address", "Foreign Address"); - if (!xflag) + if (!xflag && !Rflag) printf(" (state)"); } if (xflag) { @@ -441,6 +441,9 @@ protopr(u_long off, const char *name, in printf(" %7.7s %7.7s %7.7s %7.7s %7.7s %7.7s", "rexmt", "persist", "keep", "2msl", "delack", "rcvtime"); + } else if (Rflag) { + printf (" %8.8s %5.5s", + "flowid", "ftype"); } putchar('\n'); first = 0; @@ -549,7 +552,7 @@ protopr(u_long off, const char *name, in timer->tt_delack / 1000, (timer->tt_delack % 1000) / 10, timer->t_rcvtime / 1000, (timer->t_rcvtime % 1000) / 10); } - if (istcp && !Lflag && !xflag && !Tflag) { + if (istcp && !Lflag && !xflag && !Tflag && !Rflag) { if (tp->t_state < 0 || tp->t_state >= TCP_NSTATES) printf("%d", tp->t_state); else { @@ -560,7 +563,12 @@ protopr(u_long off, const char *name, in putchar('*'); #endif /* defined(TF_NEEDSYN) && defined(TF_NEEDFIN) */ } - } + } + if (Rflag) { + printf(" %08x %5d", + inp->inp_flowid, + inp->inp_flowtype); + } putchar('\n'); } if (xig != oxig && xig->xig_gen != oxig->xig_gen) { Modified: stable/10/usr.bin/netstat/main.c ============================================================================== --- stable/10/usr.bin/netstat/main.c Mon Apr 6 18:03:35 2015 (r281160) +++ stable/10/usr.bin/netstat/main.c Mon Apr 6 18:40:50 2015 (r281161) @@ -326,6 +326,7 @@ int numeric_port; /* show ports numerica static int pflag; /* show given protocol */ int Qflag; /* show netisr information */ int rflag; /* show routing tables (or routing stats) */ +int Rflag; /* show flow / RSS statistics */ int sflag; /* show protocol statistics */ int Wflag; /* wide display */ int Tflag; /* TCP Information */ @@ -350,7 +351,7 @@ main(int argc, char *argv[]) af = AF_UNSPEC; - while ((ch = getopt(argc, argv, "46AaBbdF:f:ghI:iLlM:mN:np:Qq:rSTsuWw:xz")) + while ((ch = getopt(argc, argv, "46AaBbdF:f:ghI:iLlM:mN:np:Qq:RrSTsuWw:xz")) != -1) switch(ch) { case '4': @@ -468,6 +469,9 @@ main(int argc, char *argv[]) case 'r': rflag = 1; break; + case 'R': + Rflag = 1; + break; case 's': ++sflag; break; @@ -864,7 +868,7 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", -"usage: netstat [-46AaLnSTWx] [-f protocol_family | -p protocol]\n" +"usage: netstat [-46AaLnRSTWx] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", " netstat -i | -I interface [-46abdhnW] [-f address_family]\n" " [-M core] [-N system]", Modified: stable/10/usr.bin/netstat/netstat.h ============================================================================== --- stable/10/usr.bin/netstat/netstat.h Mon Apr 6 18:03:35 2015 (r281160) +++ stable/10/usr.bin/netstat/netstat.h Mon Apr 6 18:40:50 2015 (r281161) @@ -45,6 +45,7 @@ extern int noutputs; /* how much outputs extern int numeric_addr; /* show addresses numerically */ extern int numeric_port; /* show ports numerically */ extern int rflag; /* show routing tables (or routing stats) */ +extern int Rflag; /* show flowid / RSS information */ extern int sflag; /* show protocol statistics */ extern int Tflag; /* show TCP control block info */ extern int Wflag; /* wide display */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 18:45:42 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 18:56:03 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 19:05:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 19:08:45 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 19:23:46 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 19:26:46 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 19:56:31 2015 Return-Path: Delivered-To: svn-src-all@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 DA3B631C; Mon, 6 Apr 2015 19:56: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 C24E5BBC; Mon, 6 Apr 2015 19:56: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 t36JuU40029282; Mon, 6 Apr 2015 19:56:30 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36JuSEx029266; Mon, 6 Apr 2015 19:56:28 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504061956.t36JuSEx029266@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 19:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281168 - in stable/10/usr.bin/xlint: arch/sparc64 common lint1 lint2 xlint X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 19:56:31 -0000 Author: pfg Date: Mon Apr 6 19:56:27 2015 New Revision: 281168 URL: https://svnweb.freebsd.org/changeset/base/281168 Log: MFC r280387: xlint: update. Bring some important updates from NetBSD up to about 2008/04/25. The main feature is initial support for C99. Obtained from: NetBSD Modified: stable/10/usr.bin/xlint/arch/sparc64/targparam.h stable/10/usr.bin/xlint/common/lint.h stable/10/usr.bin/xlint/common/mem.c stable/10/usr.bin/xlint/lint1/cgram.y stable/10/usr.bin/xlint/lint1/decl.c stable/10/usr.bin/xlint/lint1/emit1.c stable/10/usr.bin/xlint/lint1/err.c stable/10/usr.bin/xlint/lint1/externs1.h stable/10/usr.bin/xlint/lint1/func.c stable/10/usr.bin/xlint/lint1/init.c stable/10/usr.bin/xlint/lint1/lint1.h stable/10/usr.bin/xlint/lint1/main1.c stable/10/usr.bin/xlint/lint1/makeman stable/10/usr.bin/xlint/lint1/scan.l stable/10/usr.bin/xlint/lint1/tree.c stable/10/usr.bin/xlint/lint2/read.c stable/10/usr.bin/xlint/xlint/lint.1 stable/10/usr.bin/xlint/xlint/xlint.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/xlint/arch/sparc64/targparam.h ============================================================================== --- stable/10/usr.bin/xlint/arch/sparc64/targparam.h Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/arch/sparc64/targparam.h Mon Apr 6 19:56:27 2015 (r281168) @@ -1,4 +1,4 @@ -/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:55:00 thorpej Exp $ */ +/* $NetBSD: targparam.h,v 1.3 2002/01/31 23:31:34 he Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -29,6 +29,8 @@ * 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$ */ /* Modified: stable/10/usr.bin/xlint/common/lint.h ============================================================================== --- stable/10/usr.bin/xlint/common/lint.h Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/common/lint.h Mon Apr 6 19:56:27 2015 (r281168) @@ -1,4 +1,4 @@ -/* $NetBSD: lint.h,v 1.5 2002/03/07 18:29:56 tv Exp $ */ +/* $NetBSD: lint.h,v 1.7 2003/10/27 00:12:44 lukem Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -29,6 +29,8 @@ * 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$ */ #if HAVE_CONFIG_H @@ -90,7 +92,7 @@ typedef struct { u_int tt_isftyp : 1; /* 1 if floating point type */ u_int tt_isatyp : 1; /* 1 if arithmetic type */ u_int tt_issclt : 1; /* 1 if scalar type */ - char *tt_name; /* Bezeichnung des Typs */ + const char *tt_name; /* Bezeichnung des Typs */ } ttab_t; #define size(t) (ttab[t].tt_sz) Modified: stable/10/usr.bin/xlint/common/mem.c ============================================================================== --- stable/10/usr.bin/xlint/common/mem.c Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/common/mem.c Mon Apr 6 19:56:27 2015 (r281168) @@ -1,4 +1,4 @@ -/* $NetBSD: mem.c,v 1.2 2002/01/21 19:49:51 tv Exp $ */ +/* $NetBSD: mem.c,v 1.4 2003/10/16 06:35:26 itojun Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -33,8 +33,9 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: mem.c,v 1.2 2002/01/21 19:49:51 tv Exp $"); +__RCSID("$NetBSD: mem.c,v 1.4 2003/10/16 06:35:26 itojun Exp $"); #endif +__FBSDID("$FreeBSD$"); #include #include @@ -64,9 +65,13 @@ xcalloc(size_t n, size_t s) void * xrealloc(void *p, size_t s) { + void *n; - if ((p = realloc(p, s)) == NULL) + if ((n = realloc(p, s)) == NULL) { + free(p); nomem(); + } + p = n; return (p); } Modified: stable/10/usr.bin/xlint/lint1/cgram.y ============================================================================== --- stable/10/usr.bin/xlint/lint1/cgram.y Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/lint1/cgram.y Mon Apr 6 19:56:27 2015 (r281168) @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.23 2002/01/31 19:36:53 tv Exp $ */ +/* $NetBSD: cgram.y,v 1.40 2008/04/25 17:18:24 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.23 2002/01/31 19:36:53 tv Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.40 2008/04/25 17:18:24 christos Exp $"); #endif __FBSDID("$FreeBSD$"); @@ -65,13 +65,13 @@ int mblklev; */ static int onowarn = -1; -static int toicon(tnode_t *); +static int toicon(tnode_t *, int); static void idecl(sym_t *, int, sbuf_t *); static void ignuptorp(void); #ifdef DEBUG -static __inline void CLRWFLGS(void); -static __inline void CLRWFLGS(void) +static inline void CLRWFLGS(void); +static inline void CLRWFLGS(void) { printf("%s, %d: clear flags %s %d\n", curr_pos.p_file, curr_pos.p_line, __FILE__, __LINE__); @@ -79,8 +79,8 @@ static __inline void CLRWFLGS(void) onowarn = -1; } -static __inline void SAVE(void); -static __inline void SAVE(void) +static inline void SAVE(void); +static inline void SAVE(void) { if (onowarn != -1) abort(); @@ -89,8 +89,8 @@ static __inline void SAVE(void) onowarn = nowarn; } -static __inline void RESTORE(void); -static __inline void RESTORE(void) +static inline void RESTORE(void); +static inline void RESTORE(void) { if (onowarn != -1) { nowarn = onowarn; @@ -107,6 +107,8 @@ static __inline void RESTORE(void) #endif %} +%expect 1 + %union { int y_int; val_t *y_val; @@ -118,6 +120,7 @@ static __inline void RESTORE(void) tqual_t y_tqual; type_t *y_type; tnode_t *y_tnode; + range_t y_range; strg_t *y_strg; pqinf_t *y_pqinf; }; @@ -243,6 +246,8 @@ static __inline void RESTORE(void) %type parameter_type_list %type parameter_declaration %type expr +%type expr_stmnt_val +%type expr_stmnt_list %type term %type func_arg_list %type point_or_arrow @@ -253,6 +258,8 @@ static __inline void RESTORE(void) %type string %type string2 %type opt_asm_or_symbolrename +%type range +%type lorange %% @@ -682,12 +689,12 @@ notype_member_decl: $$ = $1; } | notype_decl T_COLON constant { - $$ = bitfield($1, toicon($3)); + $$ = bitfield($1, toicon($3, 1)); } | { symtyp = FVFT; } T_COLON constant { - $$ = bitfield(NULL, toicon($3)); + $$ = bitfield(NULL, toicon($3, 1)); } ; @@ -696,12 +703,12 @@ type_member_decl: $$ = $1; } | type_decl T_COLON constant { - $$ = bitfield($1, toicon($3)); + $$ = bitfield($1, toicon($3, 1)); } | { symtyp = FVFT; } T_COLON constant { - $$ = bitfield(NULL, toicon($3)); + $$ = bitfield(NULL, toicon($3, 1)); } ; @@ -784,7 +791,7 @@ enumerator: $$ = ename($1, enumval, 1); } | ename T_ASSIGN constant { - $$ = ename($1, toicon($3), 0); + $$ = ename($1, toicon($3, 1), 0); } ; @@ -849,7 +856,7 @@ notype_direct_decl: $$ = addarray($1, 0, 0); } | notype_direct_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | notype_direct_decl param_list { $$ = addfunc($1, $2); @@ -878,7 +885,7 @@ type_direct_decl: $$ = addarray($1, 0, 0); } | type_direct_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | type_direct_decl param_list { $$ = addfunc($1, $2); @@ -914,7 +921,7 @@ direct_param_decl: $$ = addarray($1, 0, 0); } | direct_param_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | direct_param_decl param_list { $$ = addfunc($1, $2); @@ -943,7 +950,7 @@ direct_notype_param_decl: $$ = addarray($1, 0, 0); } | direct_notype_param_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | direct_notype_param_decl param_list { $$ = addfunc($1, $2); @@ -1121,6 +1128,7 @@ init_expr: expr %prec T_COMMA { mkinit($1); } + | init_by_name init_expr %prec T_COMMA | init_lbrace init_expr_list init_rbrace | init_lbrace init_expr_list T_COMMA init_rbrace | error @@ -1131,6 +1139,38 @@ init_expr_list: | init_expr_list T_COMMA init_expr ; +lorange: + constant T_ELLIPSE { + $$.lo = toicon($1, 1); + } + ; +range: + constant { + $$.lo = toicon($1, 1); + $$.hi = $$.lo + 1; + } + | lorange constant { + $$.lo = $1.lo; + $$.hi = toicon($2, 1); + } + ; + +init_by_name: + T_LBRACK range T_RBRACK T_ASSIGN { + if (!Sflag) + warning(321); + } + | point identifier T_ASSIGN { + if (!Sflag) + warning(313); + memberpush($2); + } + | identifier T_COLON { + gnuism(315); + memberpush($1); + } + ; + init_lbrace: T_LBRACE { initlbr(); @@ -1187,13 +1227,13 @@ direct_abs_decl: $$ = addarray(aname(), 0, 0); } | T_LBRACK constant T_RBRACK { - $$ = addarray(aname(), 1, toicon($2)); + $$ = addarray(aname(), 1, toicon($2, 0)); } | direct_abs_decl T_LBRACK T_RBRACK { $$ = addarray($1, 0, 0); } | direct_abs_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | abs_decl_param_list { $$ = addfunc(aname(), $1); @@ -1207,9 +1247,8 @@ direct_abs_decl: } ; -stmnt: +non_expr_stmnt: labeled_stmnt - | expr_stmnt | comp_stmnt | selection_stmnt | iteration_stmnt @@ -1217,6 +1256,10 @@ stmnt: ftflg = 0; } | asm_stmnt + +stmnt: + expr_stmnt + | non_expr_stmnt ; labeled_stmnt: @@ -1231,7 +1274,12 @@ label: | T_CASE constant T_COLON { label(T_CASE, NULL, $2); ftflg = 1; - } + } + | T_CASE constant T_ELLIPSE constant T_COLON { + /* XXX: We don't fill all cases */ + label(T_CASE, NULL, $2); + ftflg = 1; + } | T_DEFAULT T_COLON { label(T_DEFAULT, NULL, NULL); ftflg = 1; @@ -1239,11 +1287,11 @@ label: ; comp_stmnt: - compstmnt_lbrace declaration_list opt_stmnt_list compstmnt_rbrace - | compstmnt_lbrace opt_stmnt_list compstmnt_rbrace + comp_stmnt_lbrace declaration_list opt_stmnt_list comp_stmnt_rbrace + | comp_stmnt_lbrace opt_stmnt_list comp_stmnt_rbrace ; -compstmnt_lbrace: +comp_stmnt_lbrace: T_LBRACE { blklev++; mblklev++; @@ -1251,7 +1299,7 @@ compstmnt_lbrace: } ; -compstmnt_rbrace: +comp_stmnt_rbrace: T_RBRACE { popdecl(); freeblk(); @@ -1276,7 +1324,7 @@ stmnt_list: expr_stmnt: expr T_SEMI { - expr($1, 0, 0); + expr($1, 0, 0, 1); ftflg = 0; } | T_SEMI { @@ -1284,6 +1332,34 @@ expr_stmnt: } ; +/* + * The following two productions are used to implement + * ({ [[decl-list] stmt-list] }). + * XXX: This is not well tested. + */ +expr_stmnt_val: + expr T_SEMI { + /* XXX: We should really do that only on the last name */ + if ($1->tn_op == NAME) + $1->tn_sym->s_used = 1; + $$ = $1; + expr($1, 0, 0, 0); + ftflg = 0; + } + | non_expr_stmnt { + $$ = getnode(); + $$->tn_type = gettyp(VOID); + } + ; + +expr_stmnt_list: + expr_stmnt_val + | expr_stmnt_list expr_stmnt_val { + $$ = $2; + } + | expr_stmnt_list expr_stmnt_val + ; + selection_stmnt: if_without_else { SAVE(); @@ -1525,6 +1601,26 @@ term: $2->tn_parn = 1; $$ = $2; } + | T_LPARN comp_stmnt_lbrace declaration_list expr_stmnt_list { + blklev--; + mblklev--; + initsym = mktempsym(duptyp($4->tn_type)); + mblklev++; + blklev++; + gnuism(320); + } comp_stmnt_rbrace T_RPARN { + $$ = getnnode(initsym, 0); + } + | T_LPARN comp_stmnt_lbrace expr_stmnt_list { + blklev--; + mblklev--; + initsym = mktempsym($3->tn_type); + mblklev++; + blklev++; + gnuism(320); + } comp_stmnt_rbrace T_RPARN { + $$ = getnnode(initsym, 0); + } | term T_INCDEC { $$ = build($2 == INC ? INCAFT : DECAFT, $1, NULL); } @@ -1580,6 +1676,14 @@ term: | T_LPARN type_name T_RPARN term %prec T_UNOP { $$ = cast($4, $2); } + | T_LPARN type_name T_RPARN %prec T_UNOP { + sym_t *tmp = mktempsym($2); + idecl(tmp, 1, NULL); + } init_lbrace init_expr_list init_rbrace { + if (!Sflag) + gnuism(319); + $$ = getnnode(initsym, 0); + } ; string: @@ -1620,6 +1724,13 @@ point_or_arrow: } ; +point: + T_STROP { + if ($1 != POINT) + error(249); + } + ; + identifier: T_NAME { $$ = $1; @@ -1635,7 +1746,6 @@ identifier: int yyerror(char *msg) { - error(249); if (++sytxerr >= 5) norecover(); @@ -1670,13 +1780,13 @@ q_gt(int64_t a, int64_t b) * expressions, it frees the memory used for the expression. */ static int -toicon(tnode_t *tn) +toicon(tnode_t *tn, int required) { int i; tspec_t t; val_t *v; - v = constant(tn); + v = constant(tn, required); /* * Abstract declarations are used inside expression. To free @@ -1721,7 +1831,7 @@ idecl(sym_t *decl, int initflg, sbuf_t * case EXTERN: if (rename != NULL) { if (decl->s_rename != NULL) - lerror("idecl() 1"); + LERROR("idecl()"); s = getlblk(1, rename->sb_len + 1); (void)memcpy(s, rename->sb_name, rename->sb_len + 1); @@ -1749,7 +1859,7 @@ idecl(sym_t *decl, int initflg, sbuf_t * decl1loc(decl, initflg); break; default: - lerror("idecl() 2"); + LERROR("idecl()"); } if (initflg && !initerr) Modified: stable/10/usr.bin/xlint/lint1/decl.c ============================================================================== --- stable/10/usr.bin/xlint/lint1/decl.c Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/lint1/decl.c Mon Apr 6 19:56:27 2015 (r281168) @@ -1,4 +1,4 @@ -/* $NetBSD: decl.c,v 1.29 2002/01/18 21:01:39 thorpej Exp $ */ +/* $NetBSD: decl.c,v 1.33 2004/06/20 22:20:16 jmc Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -34,7 +34,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: decl.c,v 1.29 2002/01/18 21:01:39 thorpej Exp $"); +__RCSID("$NetBSD: decl.c,v 1.33 2004/06/20 22:20:16 jmc Exp $"); #endif __FBSDID("$FreeBSD$"); @@ -197,7 +197,7 @@ setcompl(type_t *tp, int ic) tp->t_str->sincompl = ic; } else { if (t != ENUM) - lerror("setcompl() 1"); + LERROR("setcompl()"); tp->t_enum->eincompl = ic; } } @@ -256,7 +256,7 @@ addtype(type_t *tp) * something like "typedef int a; int a b;" * This should not happen with current grammar. */ - lerror("addtype()"); + LERROR("addtype()"); } dcs->d_type = tp; return; @@ -297,7 +297,7 @@ addtype(type_t *tp) dcs->d_lmod = NOTSPEC; if (!quadflg) /* %s C does not support 'long long' */ - (void)gnuism(265, tflag ? "traditional" : "ANSI"); + (void)c99ism(265, tflag ? "traditional" : "c89"); } if (dcs->d_type != NULL && dcs->d_type->t_typedef) { @@ -466,7 +466,7 @@ addqual(tqual_t q) dcs->d_const = 1; } else { if (q != VOLATILE) - lerror("addqual() 1"); + LERROR("addqual()"); if (dcs->d_volatile) { /* duplicate "%s" */ warning(10, "volatile"); @@ -508,13 +508,13 @@ popdecl(void) (void)printf("popdecl(%d)\n", (int)dcs->d_ctx); if (dcs->d_nxt == NULL) - lerror("popdecl() 1"); + LERROR("popdecl()"); di = dcs; dcs = di->d_nxt; switch (di->d_ctx) { case EXTERN: /* there is nothing after external declarations */ - lerror("popdecl() 2"); + LERROR("popdecl()"); /* NOTREACHED */ case MOS: case MOU: @@ -562,7 +562,7 @@ popdecl(void) rmsyms(di->d_dlsyms); break; default: - lerror("popdecl() 3"); + LERROR("popdecl()"); } free(di); } @@ -635,7 +635,7 @@ deftyp(void) if (tp != NULL && (t != NOTSPEC || s != NOTSPEC || l != NOTSPEC)) { /* should never happen */ - lerror("deftyp() 1"); + LERROR("deftyp()"); } if (tp == NULL) { @@ -674,7 +674,7 @@ deftyp(void) case VOID: break; default: - lerror("deftyp() 2"); + LERROR("deftyp()"); } if (t != INT && t != CHAR && (s != NOTSPEC || l != NOTSPEC)) { dcs->d_terr = 1; @@ -712,13 +712,13 @@ deftyp(void) if (dcs->d_const && dcs->d_type->t_const) { if (!dcs->d_type->t_typedef) - lerror("deftyp() 3"); + LERROR("deftyp()"); /* typedef already qualified with "%s" */ warning(68, "const"); } if (dcs->d_volatile && dcs->d_type->t_volatile) { if (!dcs->d_type->t_typedef) - lerror("deftyp() 4"); + LERROR("deftyp()"); /* typedef already qualified with "%s" */ warning(68, "volatile"); } @@ -777,7 +777,7 @@ length(type_t *tp, const char *name) switch (tp->t_tspec) { case FUNC: /* compiler takes size of function */ - lerror("%s", msgs[12]); + LERROR("%s", msgs[12]); /* NOTREACHED */ case STRUCT: case UNION: @@ -796,7 +796,7 @@ length(type_t *tp, const char *name) default: elsz = size(tp->t_tspec); if (elsz <= 0) - lerror("length()"); + LERROR("length()"); break; } return (elem * elsz); @@ -831,7 +831,7 @@ getbound(type_t *tp) } } if (a < CHAR_BIT || a > LINT_ALIGN(1) * CHAR_BIT) - lerror("getbound() 1"); + LERROR("getbound()"); return (a); } @@ -925,7 +925,7 @@ chktyp(sym_t *sym) if (dcs->d_ctx == PARG) { if (sym->s_scl != ABSTRACT) { if (sym->s_name == unnamed) - lerror("chktyp()"); + LERROR("chktyp()"); /* void param cannot have name: %s */ error(61, sym->s_name); *tpp = gettyp(INT); @@ -963,12 +963,12 @@ decl1str(sym_t *dsym) scl_t sc; if ((sc = dsym->s_scl) != MOS && sc != MOU) - lerror("decl1str() 1"); + LERROR("decl1str()"); if (dcs->d_rdcsym != NULL) { if ((sc = dcs->d_rdcsym->s_scl) != MOS && sc != MOU) /* should be ensured by storesym() */ - lerror("decl1str() 2"); + LERROR("decl1str()"); if (dsym->s_styp == dcs->d_rdcsym->s_styp) { /* duplicate member name: %s */ error(33, dsym->s_name); @@ -991,11 +991,13 @@ decl1str(sym_t *dsym) t == SHORT || t == USHORT || t == ENUM) { if (bitfieldtype_ok == 0) { if (sflag) { + char buf[64]; /* * bit-field type '%s' invalid in * ANSI C */ - warning(273, tyname(tp)); + warning(273, + tyname(buf, sizeof(buf), tp)); } else if (pflag) { /* nonportable bit-field type */ warning(34); @@ -1051,7 +1053,7 @@ decl1str(sym_t *dsym) if ((sz = length(dsym->s_type, dsym->s_name)) == 0) { if (t == ARRAY && dsym->s_type->t_dim == 0) { /* illegal zero sized structure member: %s */ - warning(39, dsym->s_name); + c99ism(39, dsym->s_name); } } @@ -1221,12 +1223,12 @@ addarray(sym_t *decl, int dim, int n) tp->t_dim = n; if (n < 0) { - /* zero or negative array dimension */ - error(20); + /* negative array dimension */ + error(20, n); n = 0; } else if (n == 0 && dim) { - /* zero or negative array dimension */ - warning(20); + /* zero array dimension */ + c99ism(322, dim); } else if (n == 0 && !dim) { /* is incomplete type */ setcompl(tp, 1); @@ -1417,7 +1419,7 @@ dname(sym_t *sym) } else if (sc == EXTERN) { sym->s_def = DECL; } else { - lerror("dname() 1"); + LERROR("dname()"); } break; case PARG: @@ -1430,7 +1432,7 @@ dname(sym_t *sym) sym->s_reg = 1; sc = AUTO; } else { - lerror("dname() 2"); + LERROR("dname()"); } sym->s_def = DEF; break; @@ -1453,11 +1455,11 @@ dname(sym_t *sym) } else if (sc == EXTERN) { sym->s_def = DECL; } else { - lerror("dname() 3"); + LERROR("dname()"); } break; default: - lerror("dname() 4"); + LERROR("dname()"); } sym->s_scl = sc; @@ -1481,7 +1483,7 @@ iname(sym_t *sym) /* redeclaration of formal parameter %s */ error(21, sym->s_name); if (!sym->s_defarg) - lerror("iname()"); + LERROR("iname()"); } sym = pushdown(sym); } @@ -1514,7 +1516,7 @@ mktag(sym_t *tag, tspec_t kind, int decl } else if (kind == ENUM) { scl = ENUMTAG; } else { - lerror("mktag()"); + LERROR("mktag()"); } if (tag != NULL) { @@ -1636,7 +1638,7 @@ scltoa(scl_t sc) case STRTAG: s = "struct"; break; case UNIONTAG: s = "union"; break; case ENUMTAG: s = "enum"; break; - default: lerror("tagttoa()"); + default: LERROR("tagttoa()"); } return (s); } @@ -1664,7 +1666,7 @@ compltag(type_t *tp, sym_t *fmem) sp->memb = fmem; if (sp->size == 0) { /* zero sized %s */ - (void)gnuism(47, ttab[t].tt_name); + (void)c99ism(47, ttab[t].tt_name); } else { n = 0; for (mem = fmem; mem != NULL; mem = mem->s_nxt) { @@ -2143,7 +2145,7 @@ compltyp(sym_t *dsym, sym_t *ssym) while ((dst = *dstp) != NULL) { if (src == NULL || dst->t_tspec != src->t_tspec) - lerror("compltyp() 1"); + LERROR("compltyp()"); if (dst->t_tspec == ARRAY) { if (dst->t_dim == 0 && src->t_dim != 0) { *dstp = dst = duptyp(dst); @@ -2472,7 +2474,7 @@ decl1loc(sym_t *dsym, int initflg) */ break; default: - lerror("decl1loc() 1"); + LERROR("decl1loc()"); } } else if (dcs->d_rdcsym->s_blklev == blklev) { @@ -2621,7 +2623,7 @@ aname(void) sym_t *sym; if (dcs->d_ctx != ABSTRACT && dcs->d_ctx != PARG) - lerror("aname()"); + LERROR("aname()"); sym = getblk(sizeof (sym_t)); @@ -2791,7 +2793,7 @@ chkausg(int novar, sym_t *arg) { if (!arg->s_set) - lerror("chkausg() 1"); + LERROR("chkausg()"); if (novar) return; @@ -2810,7 +2812,7 @@ chkvusg(int novar, sym_t *sym) sym_t *xsym; if (blklev == 0 || sym->s_blklev == 0) - lerror("chkvusg() 1"); + LERROR("chkvusg()"); /* errors in expressions easily cause lots of these warnings */ if (nerr != 0) @@ -2875,7 +2877,7 @@ chklusg(sym_t *lab) { if (blklev != 1 || lab->s_blklev != 1) - lerror("chklusg() 1"); + LERROR("chklusg()"); if (lab->s_set && !lab->s_used) { STRUCT_ASSIGN(curr_pos, lab->s_spos); @@ -2914,7 +2916,7 @@ chktusg(sym_t *sym) warning(235, sym->s_name); break; default: - lerror("chktusg() 1"); + LERROR("chktusg()"); } } @@ -2946,7 +2948,7 @@ chkglsyms(void) chktusg(sym); } else { if (sym->s_kind != FMOS) - lerror("chkglsyms() 1"); + LERROR("chkglsyms()"); } } @@ -2961,7 +2963,7 @@ chkglvar(sym_t *sym) return; if (sym->s_scl != EXTERN && sym->s_scl != STATIC) - lerror("chkglvar() 1"); + LERROR("chkglvar()"); glchksz(sym); Modified: stable/10/usr.bin/xlint/lint1/emit1.c ============================================================================== --- stable/10/usr.bin/xlint/lint1/emit1.c Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/lint1/emit1.c Mon Apr 6 19:56:27 2015 (r281168) @@ -1,4 +1,4 @@ -/* $NetBSD: emit1.c,v 1.11 2002/01/31 19:36:54 tv Exp $ */ +/* $NetBSD: emit1.c,v 1.14 2004/06/20 22:20:16 jmc Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -34,7 +34,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: emit1.c,v 1.11 2002/01/31 19:36:54 tv Exp $"); +__RCSID("$NetBSD: emit1.c,v 1.14 2004/06/20 22:20:16 jmc Exp $"); #endif __FBSDID("$FreeBSD$"); @@ -117,7 +117,7 @@ outtype(type_t *tp) case STRUCT: t = 'T'; s = 's'; break; case UNION: t = 'T'; s = 'u'; break; default: - lerror("outtyp() 1"); + LERROR("outtyp()"); } if (tp->t_const) outchar('c'); @@ -257,7 +257,7 @@ outsym(sym_t *sym, scl_t sc, def_t def) outchar('e'); break; default: - lerror("outsym() 2"); + LERROR("outsym()"); } if (llibflg && def != DECL) { /* @@ -485,7 +485,7 @@ outfstrg(strg_t *strg) u_char *cp; if (strg->st_tspec != CHAR) - lerror("outfstrg() 1"); + LERROR("outfstrg()"); cp = strg->st_cp; Modified: stable/10/usr.bin/xlint/lint1/err.c ============================================================================== --- stable/10/usr.bin/xlint/lint1/err.c Mon Apr 6 19:26:45 2015 (r281167) +++ stable/10/usr.bin/xlint/lint1/err.c Mon Apr 6 19:56:27 2015 (r281168) @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.17 2002/01/31 19:36:54 tv Exp $ */ +/* $NetBSD: err.c,v 1.40 2009/04/15 01:20:57 christos Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -33,7 +33,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: err.c,v 1.17 2002/01/31 19:36:54 tv Exp $"); +__RCSID("$NetBSD: err.c,v 1.40 2009/04/15 01:20:57 christos Exp $"); #endif __FBSDID("$FreeBSD$"); @@ -76,7 +76,7 @@ const char *msgs[] = { "null dimension", /* 17 */ "illegal use of 'void'", /* 18 */ "void type for %s", /* 19 */ - "zero or negative array dimension", /* 20 */ + "negative array dimension (%d)", /* 20 */ "redeclaration of formal parameter %s", /* 21 */ "incomplete or misplaced function definition", /* 22 */ "undefined label %s", /* 23 */ @@ -95,7 +95,7 @@ const char *msgs[] = { "illegal bit-field size", /* 36 */ "zero size bit-field", /* 37 */ "function illegal in structure or union", /* 38 */ - "illegal zero sized structure member: %s", /* 39 */ + "zero sized array in struct is a C99 extension: %s", /* 39 */ "unknown size: %s", /* 40 */ "illegal use of bit-field", /* 41 */ "forward reference to enum type", /* 42 */ @@ -103,7 +103,7 @@ const char *msgs[] = { "declaration introduces new type in ANSI C: %s %s", /* 44 */ "base type is really '%s %s'", /* 45 */ "(%s) tag redeclared", /* 46 */ - "zero sized %s", /* 47 */ + "zero sized %s is a C9X feature", /* 47 */ "overflow in enumeration values: %s", /* 48 */ "struct or union member must be named", /* 49 */ "a function is declared as an argument: %s", /* 50 */ @@ -188,7 +188,7 @@ const char *msgs[] = { "expression has null effect", /* 129 */ "enum type mismatch, op %s", /* 130 */ "conversion to '%s' may sign-extend incorrectly", /* 131 */ - "conversion from '%s' may lose accuracy", /* 132 */ + "conversion from '%s' to '%s' may lose accuracy", /* 132 */ "conversion of pointer to '%s' loses bits", /* 133 */ "conversion of pointer to '%s' may lose bits", /* 134 */ "possible pointer alignment problem", /* 135 */ @@ -232,7 +232,7 @@ const char *msgs[] = { "too many array initializers", /* 173 */ "too many initializers", /* 174 */ "initialisation of an incomplete type", /* 175 */ - "invalid initializer", /* 176 */ + "invalid initializer type %s", /* 176 */ "non-constant initializer", /* 177 */ "initializer does not fit", /* 178 */ "cannot initialize struct/union with no named member", /* 179 */ @@ -354,7 +354,7 @@ const char *msgs[] = { "conversion of '%s' to '%s' is out of range, arg #%d", /* 295 */ "conversion of negative constant to unsigned type, arg #%d", /* 296 */ "conversion to '%s' may sign-extend incorrectly, arg #%d", /* 297 */ - "conversion from '%s' may lose accuracy, arg #%d", /* 298 */ + "conversion from '%s' to '%s' may lose accuracy, arg #%d", /* 298 */ "prototype does not match old style definition, arg #%d", /* 299 */ "old style definition", /* 300 */ "array of incomplete type", /* 301 */ @@ -369,6 +369,16 @@ const char *msgs[] = { "symbol renaming can't be used on function arguments", /* 310 */ "symbol renaming can't be used on automatic variables", /* 311 */ "%s C does not support // comments", /* 312 */ + "struct or union member name in initializer is a C9X feature",/* 313 */ + "%s is not a structure or a union", /* 314 */ + "GCC style struct or union member name in initializer", /* 315 */ + "__FUNCTION__ is a GCC extension", /* 316 */ + "__func__ is a C9X feature", /* 317 */ + "variable array dimension is a C99/GCC extension", /* 318 */ + "compound literals are a C9X/GCC extension", /* 319 */ + "({ }) is a GCC extension", /* 320 */ + "array initializer with designators is a C9X feature", /* 321 */ + "zero sized array is a C99 extension", /* 322 */ }; /* @@ -377,10 +387,10 @@ const char *msgs[] = { void msglist(void) { - int i; + size_t i; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 19:58:29 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 20:40:02 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 20:58:18 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 21:17:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 21:51:55 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 22:12:21 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 22:41:15 2015 Return-Path: Delivered-To: svn-src-all@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 1801EDFE; Mon, 6 Apr 2015 22:41: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 028AE11A; Mon, 6 Apr 2015 22:41: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 t36MfElD009410; Mon, 6 Apr 2015 22:41:14 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t36MfECC009408; Mon, 6 Apr 2015 22:41:14 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201504062241.t36MfECC009408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 6 Apr 2015 22:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281174 - in stable/10: share/man/man4 sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2015 22:41:15 -0000 Author: hiren Date: Mon Apr 6 22:41:13 2015 New Revision: 281174 URL: https://svnweb.freebsd.org/changeset/base/281174 Log: MFC r280233, r280237, r280441 Add connection flowid and flowtype to siftr(4). Sponsored by: Limelight Networks Modified: stable/10/share/man/man4/siftr.4 stable/10/sys/netinet/siftr.c Modified: stable/10/share/man/man4/siftr.4 ============================================================================== --- stable/10/share/man/man4/siftr.4 Mon Apr 6 22:19:51 2015 (r281173) +++ stable/10/share/man/man4/siftr.4 Mon Apr 6 22:41:13 2015 (r281174) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2010 +.Dd March 18, 2015 .Dt SIFTR 4 .Os .Sh NAME @@ -335,6 +335,22 @@ Bytes acknowledged via SACK are not excl .It Va 26 The current number of segments in the reassembly queue. .El +.Bl -tag -offset indent -width Va +.It Va 27 +Flowid for the connection. +A caveat: Zero '0' either represents a valid flowid or a default value when it's +not being set. There is no easy way to differentiate without looking at actual +network interface card and drivers being used. +.El +.Bl -tag -offset indent -width Va +.It Va 28 +Flow type for the connection. +Flowtype defines which protocol fields are hashed to produce the flowid. +A complete listing is available in +.Pa sys/mbuf.h +under +.Dv M_HASHTYPE_* . +.El .Pp The third type of log message is written to the file when the module is disabled and ceases collecting data from the running kernel. Modified: stable/10/sys/netinet/siftr.c ============================================================================== --- stable/10/sys/netinet/siftr.c Mon Apr 6 22:19:51 2015 (r281173) +++ stable/10/sys/netinet/siftr.c Mon Apr 6 22:41:13 2015 (r281174) @@ -225,6 +225,10 @@ struct pkt_node { u_int sent_inflight_bytes; /* Number of segments currently in the reassembly queue. */ int t_segqlen; + /* Flowid for the connection. */ + u_int flowid; + /* Flow type for the connection. */ + u_int flowtype; /* Link to next pkt_node in the list. */ STAILQ_ENTRY(pkt_node) nodes; }; @@ -442,7 +446,7 @@ siftr_process_pkt(struct pkt_node * pkt_ MAX_LOG_MSG_LEN, "%c,0x%08x,%zd.%06ld,%x:%x:%x:%x:%x:%x:%x:%x,%u,%x:%x:%x:" "%x:%x:%x:%x:%x,%u,%ld,%ld,%ld,%ld,%ld,%u,%u,%u,%u,%u,%u," - "%u,%d,%u,%u,%u,%u,%u,%u\n", + "%u,%d,%u,%u,%u,%u,%u,%u,%u,%u\n", direction[pkt_node->direction], pkt_node->hash, pkt_node->tval.tv_sec, @@ -483,7 +487,9 @@ siftr_process_pkt(struct pkt_node * pkt_ pkt_node->rcv_buf_hiwater, pkt_node->rcv_buf_cc, pkt_node->sent_inflight_bytes, - pkt_node->t_segqlen); + pkt_node->t_segqlen, + pkt_node->flowid, + pkt_node->flowtype); } else { /* IPv4 packet */ pkt_node->ip_laddr[0] = FIRST_OCTET(pkt_node->ip_laddr[3]); pkt_node->ip_laddr[1] = SECOND_OCTET(pkt_node->ip_laddr[3]); @@ -499,7 +505,7 @@ siftr_process_pkt(struct pkt_node * pkt_ log_buf->ae_bytesused = snprintf(log_buf->ae_data, MAX_LOG_MSG_LEN, "%c,0x%08x,%jd.%06ld,%u.%u.%u.%u,%u,%u.%u.%u.%u,%u,%ld,%ld," - "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u\n", + "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u,%u\n", direction[pkt_node->direction], pkt_node->hash, (intmax_t)pkt_node->tval.tv_sec, @@ -532,7 +538,9 @@ siftr_process_pkt(struct pkt_node * pkt_ pkt_node->rcv_buf_hiwater, pkt_node->rcv_buf_cc, pkt_node->sent_inflight_bytes, - pkt_node->t_segqlen); + pkt_node->t_segqlen, + pkt_node->flowid, + pkt_node->flowtype); #ifdef SIFTR_IPV6 } #endif @@ -785,6 +793,8 @@ siftr_siftdata(struct pkt_node *pn, stru pn->rcv_buf_cc = inp->inp_socket->so_rcv.sb_cc; pn->sent_inflight_bytes = tp->snd_max - tp->snd_una; pn->t_segqlen = tp->t_segqlen; + pn->flowid = inp->inp_flowid; + pn->flowtype = inp->inp_flowtype; /* We've finished accessing the tcb so release the lock. */ if (inp_locally_locked) From owner-svn-src-all@FreeBSD.ORG Mon Apr 6 22:53:24 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 23:10:48 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 23:13:18 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 23:16:05 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 23:22:56 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Mon Apr 6 23:37:06 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 01:17:30 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 01:17:51 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 01:34:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 01:42:33 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 01:47:37 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 02:18:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 02:53:16 2015 Return-Path: Delivered-To: svn-src-all@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 53160748; Tue, 7 Apr 2015 02:53: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 3E026DB3; Tue, 7 Apr 2015 02:53: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 t372rGMg030565; Tue, 7 Apr 2015 02:53:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t372rFDV030562; Tue, 7 Apr 2015 02:53:15 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504070253.t372rFDV030562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 7 Apr 2015 02:53:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281185 - stable/10/crypto/openssh X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 02:53:16 -0000 Author: bdrewery Date: Tue Apr 7 02:53:14 2015 New Revision: 281185 URL: https://svnweb.freebsd.org/changeset/base/281185 Log: MFC r280360: Document "none" for VersionAddendum. Modified: stable/10/crypto/openssh/ssh_config.5 stable/10/crypto/openssh/sshd_config.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssh/ssh_config.5 ============================================================================== --- stable/10/crypto/openssh/ssh_config.5 Tue Apr 7 02:18:52 2015 (r281184) +++ stable/10/crypto/openssh/ssh_config.5 Tue Apr 7 02:53:14 2015 (r281185) @@ -35,7 +35,7 @@ .\" .\" $OpenBSD: ssh_config.5,v 1.185 2014/02/23 20:11:36 djm Exp $ .\" $FreeBSD$ -.Dd February 23, 2014 +.Dd March 22, 2015 .Dt SSH_CONFIG 5 .Os .Sh NAME @@ -1424,6 +1424,9 @@ Specifies a string to append to the regu OS- or site-specific modifications. The default is .Dq FreeBSD-20140420 . +The value +.Dq none +may be used to disable this. .It Cm VisualHostKey If this flag is set to .Dq yes , Modified: stable/10/crypto/openssh/sshd_config.5 ============================================================================== --- stable/10/crypto/openssh/sshd_config.5 Tue Apr 7 02:18:52 2015 (r281184) +++ stable/10/crypto/openssh/sshd_config.5 Tue Apr 7 02:53:14 2015 (r281185) @@ -35,7 +35,7 @@ .\" .\" $OpenBSD: sshd_config.5,v 1.172 2014/02/27 22:47:07 djm Exp $ .\" $FreeBSD$ -.Dd February 27, 2014 +.Dd March 22, 2015 .Dt SSHD_CONFIG 5 .Os .Sh NAME @@ -1254,6 +1254,9 @@ Optionally specifies additional text to sent by the server upon connection. The default is .Dq FreeBSD-20140420 . +The value +.Dq none +may be used to disable this. .It Cm X11DisplayOffset Specifies the first display number available for .Xr sshd 8 Ns 's From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 02:55:23 2015 Return-Path: Delivered-To: svn-src-all@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 D231D8D8; Tue, 7 Apr 2015 02:55: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 BCF61DCD; Tue, 7 Apr 2015 02:55: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 t372tNtM030938; Tue, 7 Apr 2015 02:55:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t372tNBO030936; Tue, 7 Apr 2015 02:55:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504070255.t372tNBO030936@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 7 Apr 2015 02:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281186 - stable/9/crypto/openssh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 02:55:23 -0000 Author: bdrewery Date: Tue Apr 7 02:55:22 2015 New Revision: 281186 URL: https://svnweb.freebsd.org/changeset/base/281186 Log: MFC r280360: Document "none" for VersionAddendum. Modified: stable/9/crypto/openssh/ssh_config.5 stable/9/crypto/openssh/sshd_config.5 Directory Properties: stable/9/crypto/openssh/ (props changed) Modified: stable/9/crypto/openssh/ssh_config.5 ============================================================================== --- stable/9/crypto/openssh/ssh_config.5 Tue Apr 7 02:53:14 2015 (r281185) +++ stable/9/crypto/openssh/ssh_config.5 Tue Apr 7 02:55:22 2015 (r281186) @@ -35,7 +35,7 @@ .\" .\" $OpenBSD: ssh_config.5,v 1.185 2014/02/23 20:11:36 djm Exp $ .\" $FreeBSD$ -.Dd February 23, 2014 +.Dd March 22, 2015 .Dt SSH_CONFIG 5 .Os .Sh NAME @@ -1421,6 +1421,9 @@ Specifies a string to append to the regu OS- or site-specific modifications. The default is .Dq FreeBSD-20140420 . +The value +.Dq none +may be used to disable this. .It Cm VisualHostKey If this flag is set to .Dq yes , Modified: stable/9/crypto/openssh/sshd_config.5 ============================================================================== --- stable/9/crypto/openssh/sshd_config.5 Tue Apr 7 02:53:14 2015 (r281185) +++ stable/9/crypto/openssh/sshd_config.5 Tue Apr 7 02:55:22 2015 (r281186) @@ -35,7 +35,7 @@ .\" .\" $OpenBSD: sshd_config.5,v 1.172 2014/02/27 22:47:07 djm Exp $ .\" $FreeBSD$ -.Dd February 27, 2014 +.Dd March 22, 2015 .Dt SSHD_CONFIG 5 .Os .Sh NAME @@ -1254,6 +1254,9 @@ Optionally specifies additional text to sent by the server upon connection. The default is .Dq FreeBSD-20140420 . +The value +.Dq none +may be used to disable this. .It Cm X11DisplayOffset Specifies the first display number available for .Xr sshd 8 Ns 's From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 04:21:37 2015 Return-Path: Delivered-To: svn-src-all@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 60DAE67C; Tue, 7 Apr 2015 04:21: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 4B94A9B7; Tue, 7 Apr 2015 04:21: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 t374LaBU073021; Tue, 7 Apr 2015 04:21:36 GMT (envelope-from jpaetzel@FreeBSD.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t374LaLI073020; Tue, 7 Apr 2015 04:21:36 GMT (envelope-from jpaetzel@FreeBSD.org) Message-Id: <201504070421.t374LaLI073020@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jpaetzel set sender to jpaetzel@FreeBSD.org using -f From: Josh Paetzel Date: Tue, 7 Apr 2015 04:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281187 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 04:21:37 -0000 Author: jpaetzel Date: Tue Apr 7 04:21:36 2015 New Revision: 281187 URL: https://svnweb.freebsd.org/changeset/base/281187 Log: MFC 281084 Fix thinko/copypaste error. When checking the length of the mutual secret password the variable for the secret password was used by mistake. This resulted in ctld never warning about the length of the mutual secret being wrong even if it was. Sponsored by: iXsystems Modified: stable/10/usr.sbin/ctld/ctld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Tue Apr 7 02:55:22 2015 (r281186) +++ stable/10/usr.sbin/ctld/ctld.c Tue Apr 7 04:21:36 2015 (r281187) @@ -203,7 +203,7 @@ auth_check_secret_length(struct auth *au } if (auth->a_mutual_secret != NULL) { - len = strlen(auth->a_secret); + len = strlen(auth->a_mutual_secret); if (len > 16) { if (auth->a_auth_group->ag_name != NULL) log_warnx("mutual secret for user \"%s\", " From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 04:27:03 2015 Return-Path: Delivered-To: svn-src-all@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 EF3C68B6 for ; Tue, 7 Apr 2015 04:27:03 +0000 (UTC) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::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 946329DC for ; Tue, 7 Apr 2015 04:27:03 +0000 (UTC) Received: by wiun10 with SMTP id n10so3336221wiu.1 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=fU7acbCQuQCwG11eczMU+U/Rk6B4QlmkoKDUAHR92ngqMVTqCvcM1Z2OH/G+6Pi70i oHEabymdaEke04QcpJD85osIyYwwR6rMjvo7zJ5kD34rbQ9W5HMn9ugAlZvf+ysetZL6 doAmbVrS/jsflkViphGOmKKC2gDunw1nLv4GoakZrKRnxlR6RtgUHzQphP+eFU1sDZUS aW47DUjQqEnrgsFFXgXOVpyei0a/GAQ1/OfrWWfc5l+5X2bqkmcdR0Pfh8XvAdTLUrrV trZC7e5WesH+gpVa4DcknR/nG8n4OnhmVPzp0sy4vsg00ueyornd8+dGuI0pSpRLzA4t L1Ng== X-Gm-Message-State: ALoCoQkgvvueESUfru8HltgNiGlUUwbykPH21Zt4H/IhV41Wtlei63wzeP8kVvt0iMJh666PCBO2 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 05:37:33 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 05:50:47 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 06:22:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 06:33:21 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 07:08:36 2015 Return-Path: Delivered-To: svn-src-all@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 676A1FB7; Tue, 7 Apr 2015 07:08: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 51FFBC5F; Tue, 7 Apr 2015 07:08: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 t3778aJa048520; Tue, 7 Apr 2015 07:08:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3778abn048519; Tue, 7 Apr 2015 07:08:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504070708.t3778abn048519@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 7 Apr 2015 07:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281194 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 07:08:36 -0000 Author: kib Date: Tue Apr 7 07:08:35 2015 New Revision: 281194 URL: https://svnweb.freebsd.org/changeset/base/281194 Log: MFC r281071: Remove useless initialization. Modified: stable/10/sys/kern/sysv_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sysv_shm.c ============================================================================== --- stable/10/sys/kern/sysv_shm.c Tue Apr 7 06:25:29 2015 (r281193) +++ stable/10/sys/kern/sysv_shm.c Tue Apr 7 07:08:35 2015 (r281194) @@ -327,7 +327,7 @@ kern_shmat_locked(struct thread *td, int { struct proc *p = td->td_proc; struct shmid_kernel *shmseg; - struct shmmap_state *shmmap_s = NULL; + struct shmmap_state *shmmap_s; vm_offset_t attach_va; vm_prot_t prot; vm_size_t size; From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 07:10:45 2015 Return-Path: Delivered-To: svn-src-all@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 793FC1A8; Tue, 7 Apr 2015 07: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 643FCD17; Tue, 7 Apr 2015 07: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 t377AiVI051220; Tue, 7 Apr 2015 07:10:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t377AikA051219; Tue, 7 Apr 2015 07:10:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504070710.t377AikA051219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 7 Apr 2015 07:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281195 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 07:10:45 -0000 Author: kib Date: Tue Apr 7 07:10:44 2015 New Revision: 281195 URL: https://svnweb.freebsd.org/changeset/base/281195 Log: MFC r281094: Restore proper error from oshmctl(2), broken by r280323. Modified: stable/10/sys/kern/sysv_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sysv_shm.c ============================================================================== --- stable/10/sys/kern/sysv_shm.c Tue Apr 7 07:08:35 2015 (r281194) +++ stable/10/sys/kern/sysv_shm.c Tue Apr 7 07:10:44 2015 (r281195) @@ -971,7 +971,7 @@ oshmctl(struct thread *td, struct oshmct shmseg = shm_find_segment(uap->shmid, true); if (shmseg == NULL) { SYSVSHM_UNLOCK(); - return (error); + return (EINVAL); } switch (uap->cmd) { case IPC_STAT: From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 08:12:11 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 09:00:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 09:52:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 10:23:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 10:25:29 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 11:37:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 12:42:08 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 13:17:29 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 13:53:57 2015 Return-Path: Delivered-To: svn-src-all@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 EAFCE4F7 for ; Tue, 7 Apr 2015 13:53:56 +0000 (UTC) Received: from mail-qk0-f180.google.com (mail-qk0-f180.google.com [209.85.220.180]) (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 9FD9C6DE for ; Tue, 7 Apr 2015 13:53:56 +0000 (UTC) Received: by qkhg7 with SMTP id g7so51431342qkh.2 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=A1nJ5tF5k5QNWbfFiYLDdD/NDTvBS+iK5+o09EbNmOhTFG1hALts46eqdiJE7BNO7O jXTE530zX+29PpzZ9+C4TJeKkG7EtJ/v9tL3o+VRzywgyozSt//t/lU25WjdtDNcT251 ZHPr1oCgFjpfKvG25lALMesXS06K0JCqFhKMmRkHD71ViPKs7nOFhOJkxvfeu8v3zMxb 4mEgJ2p9mBogDZFBiaOGw3IvoPeZ0vUgxsnlqlQVL8gyPDeWh3v1FZkNWjb5l3RfFV7A lQt7lBIg9VDTqUpPblahnbeA6MQcCum9DKjOZlicIII0QUGsiTti856zAAR5Xkix3hcQ NStg== X-Gm-Message-State: ALoCoQnUg7yMFW8npUJSeMEVWHZMTtVGELc1RPEaHV8sLf2eTJoYbsBEagtqdYT7/GN3cWojC//K 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 14:24:33 2015 Return-Path: Delivered-To: svn-src-all@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 8A8DBB57 for ; Tue, 7 Apr 2015 14:24:33 +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 31D6BAA5 for ; Tue, 7 Apr 2015 14:24:33 +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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 14:24:33 -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-all@FreeBSD.ORG Tue Apr 7 14:33:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 14:47:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 15:12:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 15:16:11 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 15:24:38 2015 Return-Path: Delivered-To: svn-src-all@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 BFE923DC; Tue, 7 Apr 2015 15:24: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 AA6E93A1; Tue, 7 Apr 2015 15:24: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 t37FOcVZ086845; Tue, 7 Apr 2015 15:24:38 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37FOcDE086844; Tue, 7 Apr 2015 15:24:38 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201504071524.t37FOcDE086844@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:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281205 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 15:24:38 -0000 Author: brueffer Date: Tue Apr 7 15:24:37 2015 New Revision: 281205 URL: https://svnweb.freebsd.org/changeset/base/281205 Log: MFH: r280765 Mention support for 16h family processors, added in r263169. PR: 198933 Submitted by: isoa@kapsi.fi Modified: stable/10/share/man/man4/amdtemp.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/amdtemp.4 ============================================================================== --- stable/10/share/man/man4/amdtemp.4 Tue Apr 7 15:12:03 2015 (r281204) +++ stable/10/share/man/man4/amdtemp.4 Tue Apr 7 15:24:37 2015 (r281205) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 23, 2012 +.Dd March 27, 2015 .Dt AMDTEMP 4 .Os .Sh NAME @@ -53,7 +53,7 @@ The driver provides support for the on-die digital thermal sensor present in .Tn AMD -Family 0Fh, 10h, 11h, 12h, 14h, and 15h processors. +Family 0Fh, 10h, 11h, 12h, 14h, 15h, and 16h processors. .Pp For Family 0Fh processors, the .Nm @@ -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, and 15h 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-all@FreeBSD.ORG Tue Apr 7 15:28:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 36A60631; Tue, 7 Apr 2015 15:28:24 +0000 (UTC) Date: Tue, 7 Apr 2015 15:28:24 +0000 From: Alexey Dokuchaev To: Christian Brueffer Subject: Re: svn commit: r281205 - stable/10/share/man/man4 Message-ID: <20150407152824.GA21492@FreeBSD.org> References: <201504071524.t37FOcDE086844@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504071524.t37FOcDE086844@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 15:28:24 -0000 On Tue, Apr 07, 2015 at 03:24:38PM +0000, Christian Brueffer wrote: > New Revision: 281205 > URL: https://svnweb.freebsd.org/changeset/base/281205 > > [...] > -Family 0Fh, 10h, 11h, 12h, 14h, and 15h processors. > +Family 0Fh, 10h, 11h, 12h, 14h, 15h, and 16h processors. Note that Oxford comma is (correctly) retained here... > -For Family 10h, 11h, 12h, 14h, and 15h processors, the driver reports each > +For Family 10h, 11h, 12h, 14h, 15h and 16h processors, the driver reports each ... but not here. ./danfe From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 15:32:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 15:32:44 2015 Return-Path: Delivered-To: svn-src-all@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 AE6349E4; Tue, 7 Apr 2015 15:32: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 8FA4E75B; Tue, 7 Apr 2015 15:32: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 t37FWixU091427; Tue, 7 Apr 2015 15:32:44 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37FWi7o091425; Tue, 7 Apr 2015 15:32:44 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504071532.t37FWi7o091425@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 7 Apr 2015 15:32:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281207 - in stable/10/sys/dev/cxgbe: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 15:32:44 -0000 Author: np Date: Tue Apr 7 15:32:43 2015 New Revision: 281207 URL: https://svnweb.freebsd.org/changeset/base/281207 Log: MFC r274456: Fix some bad interaction between cxgbe(4) and lacp lagg(4) that could leave a port permanently disabled when a copper cable is unplugged and then plugged right back in. lacp_linkstate goes looking for the current ifmedia on a link state change and it could get stale information from cxgbe(4) on a module unplug followed by replug. The fix is to process module events before link-state events within the driver, and to always rebuild the ifmedia list on a module change event (instead of rebuilding it lazily). Thanks to asomers@ for the problem report and detailed analysis to go with it. Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.c Tue Apr 7 15:32:25 2015 (r281206) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Tue Apr 7 15:32:43 2015 (r281207) @@ -5417,6 +5417,10 @@ int t4_handle_fw_rpl(struct adapter *ada } lc = &pi->link_cfg; + if (mod != pi->mod_type) { + pi->mod_type = mod; + t4_os_portmod_changed(adap, i); + } if (link_ok != lc->link_ok || speed != lc->speed || fc != lc->fc) { /* something changed */ int reason; @@ -5432,10 +5436,6 @@ int t4_handle_fw_rpl(struct adapter *ada lc->supported = ntohs(p->u.info.pcap); t4_os_link_changed(adap, i, link_ok, reason); } - if (mod != pi->mod_type) { - pi->mod_type = mod; - t4_os_portmod_changed(adap, i); - } } else { CH_WARN_RATELIMIT(adap, "Unknown firmware reply 0x%x (0x%x)\n", opcode, action); Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Tue Apr 7 15:32:25 2015 (r281206) +++ stable/10/sys/dev/cxgbe/t4_main.c Tue Apr 7 15:32:43 2015 (r281207) @@ -1483,7 +1483,9 @@ cxgbe_media_status(struct ifnet *ifp, st struct ifmedia *media = NULL; struct ifmedia_entry *cur; int speed = pi->link_cfg.speed; +#ifdef INVARIANTS int data = (pi->port_type << 8) | pi->mod_type; +#endif if (ifp == pi->ifp) media = &pi->media; @@ -1494,10 +1496,7 @@ cxgbe_media_status(struct ifnet *ifp, st MPASS(media != NULL); cur = media->ifm_cur; - if (cur->ifm_data != data) { - build_medialist(pi, media); - cur = media->ifm_cur; - } + MPASS(cur->ifm_data == data); ifmr->ifm_status = IFM_AVALID; if (!pi->link_cfg.link_ok) @@ -7903,6 +7902,11 @@ t4_os_portmod_changed(const struct adapt NULL, "LR", "SR", "ER", "TWINAX", "active TWINAX", "LRM" }; + build_medialist(pi, &pi->media); +#ifdef DEV_NETMAP + build_medialist(pi, &pi->nm_media); +#endif + if (pi->mod_type == FW_PORT_MOD_TYPE_NONE) if_printf(pi->ifp, "transceiver unplugged.\n"); else if (pi->mod_type == FW_PORT_MOD_TYPE_UNKNOWN) From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 15:34:35 2015 Return-Path: Delivered-To: svn-src-all@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 72388B5B; Tue, 7 Apr 2015 15:34: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 5C7CD780; Tue, 7 Apr 2015 15:34: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 t37FYY8H091736; Tue, 7 Apr 2015 15:34:34 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37FYYUL091735; Tue, 7 Apr 2015 15:34:34 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201504071534.t37FYYUL091735@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:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281208 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 15:34:35 -0000 Author: brueffer Date: Tue Apr 7 15:34:34 2015 New Revision: 281208 URL: https://svnweb.freebsd.org/changeset/base/281208 Log: MFH: r281206 Add a missing comma. Modified: stable/10/share/man/man4/amdtemp.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/amdtemp.4 ============================================================================== --- stable/10/share/man/man4/amdtemp.4 Tue Apr 7 15:32:43 2015 (r281207) +++ stable/10/share/man/man4/amdtemp.4 Tue Apr 7 15:34:34 2015 (r281208) @@ -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-all@FreeBSD.ORG Tue Apr 7 15:56:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 16:42:29 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 16:48:51 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 17:07:31 2015 Return-Path: Delivered-To: svn-src-all@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 BD2BE6F2; Tue, 7 Apr 2015 17:07: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 A7C112EC; Tue, 7 Apr 2015 17:07: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 t37H7VPV035389; Tue, 7 Apr 2015 17:07:31 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37H7V3k035386; Tue, 7 Apr 2015 17:07:31 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504071707.t37H7V3k035386@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 7 Apr 2015 17:07:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281211 - in stable/10/sys/dev/cxgbe: . tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 17:07:31 -0000 Author: np Date: Tue Apr 7 17:07:30 2015 New Revision: 281211 URL: https://svnweb.freebsd.org/changeset/base/281211 Log: MFC r275733: Move KTR_CXGBE from t4_tom.h to adapter.h so that the base if_cxgbe code can use it too. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Tue Apr 7 16:48:23 2015 (r281210) +++ stable/10/sys/dev/cxgbe/adapter.h Tue Apr 7 17:07:30 2015 (r281211) @@ -51,6 +51,7 @@ #include "common/t4_msg.h" #include "firmware/t4fw_interface.h" +#define KTR_CXGBE KTR_SPARE3 MALLOC_DECLARE(M_CXGBE); #define CXGBE_UNIMPLEMENTED(s) \ panic("%s (%s, line %d) not implemented yet.", s, __FILE__, __LINE__) Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.h Tue Apr 7 16:48:23 2015 (r281210) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.h Tue Apr 7 17:07:30 2015 (r281211) @@ -31,7 +31,6 @@ #ifndef __T4_TOM_H__ #define __T4_TOM_H__ -#define KTR_CXGBE KTR_SPARE3 #define LISTEN_HASH_SIZE 32 /* From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 17:21:31 2015 Return-Path: Delivered-To: svn-src-all@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 B0685C4D; Tue, 7 Apr 2015 17:21: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 99F836D0; Tue, 7 Apr 2015 17:21: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 t37HLVp6044073; Tue, 7 Apr 2015 17:21:31 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37HLVwk044071; Tue, 7 Apr 2015 17:21:31 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504071721.t37HLVwk044071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 7 Apr 2015 17:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281212 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 17:21:31 -0000 Author: np Date: Tue Apr 7 17:21:30 2015 New Revision: 281212 URL: https://svnweb.freebsd.org/changeset/base/281212 Log: MFC r275539, r275554. r275539: cxgbe(4): Allow for different pad and pack boundaries for different adapters. Set the pack boundary for T5 cards to be the same as the PCIe max payload size. The chip likes it this way. In this revision the driver allocate rx buffers that align on both boundaries. This is not a strict requirement and a followup commit will switch the driver to a more relaxed allocation strategy. r275554: cxgbe(4): allow the driver to use rx buffers that do not end on a pack boundary. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Tue Apr 7 17:07:30 2015 (r281211) +++ stable/10/sys/dev/cxgbe/adapter.h Tue Apr 7 17:21:30 2015 (r281212) @@ -687,6 +687,7 @@ struct sge { struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */ struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */ + int pad_boundary; int pack_boundary; int8_t safe_hwidx1; /* may not have room for metadata */ int8_t safe_hwidx2; /* with room for metadata and maybe more */ Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Tue Apr 7 17:07:30 2015 (r281211) +++ stable/10/sys/dev/cxgbe/t4_sge.c Tue Apr 7 17:21:30 2015 (r281212) @@ -119,19 +119,10 @@ TUNABLE_INT("hw.cxgbe.buffer_packing", & /* * Start next frame in a packed buffer at this boundary. * -1: driver should figure out a good value. - * T4: - * --- - * if fl_pad != 0 - * value specified here will be overridden by fl_pad. - * else - * power of 2 from 32 to 4096 (both inclusive) is a valid value here. - * T5: - * --- - * 16, or a power of 2 from 64 to 4096 (both inclusive) is a valid value. + * T4: driver will ignore this and use the same value as fl_pad above. + * T5: 16, or a power of 2 from 64 to 4096 (both inclusive) is a valid value. */ static int fl_pack = -1; -static int t4_fl_pack; -static int t5_fl_pack; TUNABLE_INT("hw.cxgbe.fl_pack", &fl_pack); /* @@ -174,8 +165,7 @@ static int service_iq(struct sge_iq *, i static struct mbuf *get_fl_payload(struct adapter *, struct sge_fl *, uint32_t); static int t4_eth_rx(struct sge_iq *, const struct rss_header *, struct mbuf *); static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int); -static inline void init_fl(struct adapter *, struct sge_fl *, int, int, int, - char *); +static inline void init_fl(struct adapter *, struct sge_fl *, int, int, char *); static inline void init_eq(struct sge_eq *, int, int, uint8_t, uint16_t, char *); static int alloc_ring(struct adapter *, size_t, bus_dma_tag_t *, bus_dmamap_t *, @@ -263,15 +253,6 @@ static counter_u64_t extfree_rels; void t4_sge_modload(void) { - int pad; - - /* set pad to a reasonable powerof2 between 16 and 4096 (inclusive) */ -#if defined(__i386__) || defined(__amd64__) - pad = max(cpu_clflush_line_size, 16); -#else - pad = max(CACHE_LINE_SIZE, 16); -#endif - pad = min(pad, 4096); if (fl_pktshift < 0 || fl_pktshift > 7) { printf("Invalid hw.cxgbe.fl_pktshift value (%d)," @@ -279,35 +260,6 @@ t4_sge_modload(void) fl_pktshift = 2; } - if (fl_pad != 0 && - (fl_pad < 32 || fl_pad > 4096 || !powerof2(fl_pad))) { - - if (fl_pad != -1) { - printf("Invalid hw.cxgbe.fl_pad value (%d)," - " using %d instead.\n", fl_pad, max(pad, 32)); - } - fl_pad = max(pad, 32); - } - - /* - * T4 has the same pad and pack boundary. If a pad boundary is set, - * pack boundary must be set to the same value. Otherwise take the - * specified value or auto-calculate something reasonable. - */ - if (fl_pad) - t4_fl_pack = fl_pad; - else if (fl_pack < 32 || fl_pack > 4096 || !powerof2(fl_pack)) - t4_fl_pack = max(pad, 32); - else - t4_fl_pack = fl_pack; - - /* T5's pack boundary is independent of the pad boundary. */ - if (fl_pack < 16 || fl_pack == 32 || fl_pack > 4096 || - !powerof2(fl_pack)) - t5_fl_pack = max(pad, CACHE_LINE_SIZE); - else - t5_fl_pack = fl_pack; - if (spg_len != 64 && spg_len != 128) { int len; @@ -365,6 +317,71 @@ t4_init_sge_cpl_handlers(struct adapter t4_register_fw_msg_handler(sc, FW6_TYPE_CMD_RPL, t4_handle_fw_rpl); } +static inline void +setup_pad_and_pack_boundaries(struct adapter *sc) +{ + uint32_t v, m; + int pad, pack; + + pad = fl_pad; + if (fl_pad < 32 || fl_pad > 4096 || !powerof2(fl_pad)) { + /* + * If there is any chance that we might use buffer packing and + * the chip is a T4, then pick 64 as the pad/pack boundary. Set + * it to 32 in all other cases. + */ + pad = is_t4(sc) && buffer_packing ? 64 : 32; + + /* + * For fl_pad = 0 we'll still write a reasonable value to the + * register but all the freelists will opt out of padding. + * We'll complain here only if the user tried to set it to a + * value greater than 0 that was invalid. + */ + if (fl_pad > 0) { + device_printf(sc->dev, "Invalid hw.cxgbe.fl_pad value" + " (%d), using %d instead.\n", fl_pad, pad); + } + } + m = V_INGPADBOUNDARY(M_INGPADBOUNDARY); + v = V_INGPADBOUNDARY(ilog2(pad) - 5); + t4_set_reg_field(sc, A_SGE_CONTROL, m, v); + + if (is_t4(sc)) { + if (fl_pack != -1 && fl_pack != pad) { + /* Complain but carry on. */ + device_printf(sc->dev, "hw.cxgbe.fl_pack (%d) ignored," + " using %d instead.\n", fl_pack, pad); + } + return; + } + + pack = fl_pack; + if (fl_pack < 16 || fl_pack == 32 || fl_pack > 4096 || + !powerof2(fl_pack)) { + pack = max(sc->params.pci.mps, CACHE_LINE_SIZE); + MPASS(powerof2(pack)); + if (pack < 16) + pack = 16; + if (pack == 32) + pack = 64; + if (pack > 4096) + pack = 4096; + if (fl_pack != -1) { + device_printf(sc->dev, "Invalid hw.cxgbe.fl_pack value" + " (%d), using %d instead.\n", fl_pack, pack); + } + } + m = V_INGPACKBOUNDARY(M_INGPACKBOUNDARY); + if (pack == 16) + v = V_INGPACKBOUNDARY(0); + else + v = V_INGPACKBOUNDARY(ilog2(pack) - 5); + + MPASS(!is_t4(sc)); /* T4 doesn't have SGE_CONTROL2 */ + t4_set_reg_field(sc, A_SGE_CONTROL2, m, v); +} + /* * adap->params.vpd.cclk must be set up before this is called. */ @@ -397,24 +414,9 @@ t4_tweak_chip_settings(struct adapter *s m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | F_EGRSTATUSPAGESIZE; v = V_PKTSHIFT(fl_pktshift) | F_RXPKTCPLMODE | V_EGRSTATUSPAGESIZE(spg_len == 128); - if (is_t4(sc) && (fl_pad || buffer_packing)) { - /* t4_fl_pack has the correct value even when fl_pad = 0 */ - m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); - v |= V_INGPADBOUNDARY(ilog2(t4_fl_pack) - 5); - } else if (is_t5(sc) && fl_pad) { - m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); - v |= V_INGPADBOUNDARY(ilog2(fl_pad) - 5); - } t4_set_reg_field(sc, A_SGE_CONTROL, m, v); - if (is_t5(sc) && buffer_packing) { - m = V_INGPACKBOUNDARY(M_INGPACKBOUNDARY); - if (t5_fl_pack == 16) - v = V_INGPACKBOUNDARY(0); - else - v = V_INGPACKBOUNDARY(ilog2(t5_fl_pack) - 5); - t4_set_reg_field(sc, A_SGE_CONTROL2, m, v); - } + setup_pad_and_pack_boundaries(sc); v = V_HOSTPAGESIZEPF0(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF1(PAGE_SHIFT - 10) | @@ -485,13 +487,16 @@ t4_tweak_chip_settings(struct adapter *s } /* - * SGE wants the buffer to be at least 64B and then a multiple of the pad - * boundary or 16, whichever is greater. + * SGE wants the buffer to be at least 64B and then a multiple of 16. If + * padding is is use the buffer's start and end need to be aligned to the pad + * boundary as well. We'll just make sure that the size is a multiple of the + * boundary here, it is up to the buffer allocation code to make sure the start + * of the buffer is aligned as well. */ static inline int -hwsz_ok(int hwsz) +hwsz_ok(struct adapter *sc, int hwsz) { - int mask = max(fl_pad, 16) - 1; + int mask = fl_pad ? sc->sge.pad_boundary - 1 : 16 - 1; return (hwsz >= 64 && (hwsz & mask) == 0); } @@ -520,33 +525,22 @@ t4_read_chip_settings(struct adapter *sc m = V_PKTSHIFT(M_PKTSHIFT) | F_RXPKTCPLMODE | F_EGRSTATUSPAGESIZE; v = V_PKTSHIFT(fl_pktshift) | F_RXPKTCPLMODE | V_EGRSTATUSPAGESIZE(spg_len == 128); - if (is_t4(sc) && (fl_pad || buffer_packing)) { - m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); - v |= V_INGPADBOUNDARY(ilog2(t4_fl_pack) - 5); - } else if (is_t5(sc) && fl_pad) { - m |= V_INGPADBOUNDARY(M_INGPADBOUNDARY); - v |= V_INGPADBOUNDARY(ilog2(fl_pad) - 5); - } r = t4_read_reg(sc, A_SGE_CONTROL); if ((r & m) != v) { device_printf(sc->dev, "invalid SGE_CONTROL(0x%x)\n", r); rc = EINVAL; } + s->pad_boundary = 1 << (G_INGPADBOUNDARY(r) + 5); - if (is_t5(sc) && buffer_packing) { - m = V_INGPACKBOUNDARY(M_INGPACKBOUNDARY); - if (t5_fl_pack == 16) - v = V_INGPACKBOUNDARY(0); - else - v = V_INGPACKBOUNDARY(ilog2(t5_fl_pack) - 5); + if (is_t4(sc)) + s->pack_boundary = s->pad_boundary; + else { r = t4_read_reg(sc, A_SGE_CONTROL2); - if ((r & m) != v) { - device_printf(sc->dev, - "invalid SGE_CONTROL2(0x%x)\n", r); - rc = EINVAL; - } + if (G_INGPACKBOUNDARY(r) == 0) + s->pack_boundary = 16; + else + s->pack_boundary = 1 << (G_INGPACKBOUNDARY(r) + 5); } - s->pack_boundary = is_t4(sc) ? t4_fl_pack : t5_fl_pack; v = V_HOSTPAGESIZEPF0(PAGE_SHIFT - 10) | V_HOSTPAGESIZEPF1(PAGE_SHIFT - 10) | @@ -567,13 +561,22 @@ t4_read_chip_settings(struct adapter *sc for (i = 0; i < nitems(s->hw_buf_info); i++, hwb++) { r = t4_read_reg(sc, A_SGE_FL_BUFFER_SIZE0 + (4 * i)); hwb->size = r; - hwb->zidx = hwsz_ok(r) ? -1 : -2; + hwb->zidx = hwsz_ok(sc, r) ? -1 : -2; hwb->next = -1; } /* * Create a sorted list in decreasing order of hw buffer sizes (and so * increasing order of spare area) for each software zone. + * + * If padding is enabled then the start and end of the buffer must align + * to the pad boundary; if packing is enabled then they must align with + * the pack boundary as well. Allocations from the cluster zones are + * aligned to min(size, 4K), so the buffer starts at that alignment and + * ends at hwb->size alignment. If mbuf inlining is allowed the + * starting alignment will be reduced to MSIZE and the driver will + * exercise appropriate caution when deciding on the best buffer layout + * to use. */ n = 0; /* no usable buffer size to begin with */ swz = &s->sw_zone_info[0]; @@ -585,6 +588,12 @@ t4_read_chip_settings(struct adapter *sc swz->zone = m_getzone(swz->size); swz->type = m_gettype(swz->size); + if (swz->size < PAGE_SIZE) { + MPASS(powerof2(swz->size)); + if (fl_pad && (swz->size % sc->sge.pad_boundary != 0)) + continue; + } + if (swz->size == safest_rx_cluster) safe_swz = swz; @@ -592,6 +601,10 @@ t4_read_chip_settings(struct adapter *sc for (j = 0; j < SGE_FLBUF_SIZES; j++, hwb++) { if (hwb->zidx != -1 || hwb->size > swz->size) continue; +#ifdef INVARIANTS + if (fl_pad) + MPASS(hwb->size % sc->sge.pad_boundary == 0); +#endif hwb->zidx = i; if (head == -1) head = tail = j; @@ -639,14 +652,15 @@ t4_read_chip_settings(struct adapter *sc int spare; hwb = &s->hw_buf_info[i]; +#ifdef INVARIANTS + if (fl_pad) + MPASS(hwb->size % sc->sge.pad_boundary == 0); +#endif spare = safe_swz->size - hwb->size; - if (spare < CL_METADATA_SIZE) - continue; - if (s->safe_hwidx2 == -1 || - spare == CL_METADATA_SIZE + MSIZE) + if (spare >= CL_METADATA_SIZE) { s->safe_hwidx2 = i; - if (spare >= CL_METADATA_SIZE + MSIZE) break; + } } } @@ -744,17 +758,6 @@ t4_create_dma_tag(struct adapter *sc) return (rc); } -static inline int -enable_buffer_packing(struct adapter *sc) -{ - - if (sc->flags & BUF_PACKING_OK && - ((is_t5(sc) && buffer_packing) || /* 1 or -1 both ok for T5 */ - (is_t4(sc) && buffer_packing == 1))) - return (1); - return (0); -} - void t4_sge_sysctls(struct adapter *sc, struct sysctl_ctx_list *ctx, struct sysctl_oid_list *children) @@ -768,7 +771,7 @@ t4_sge_sysctls(struct adapter *sc, struc NULL, fl_pktshift, "payload DMA offset in rx buffer (bytes)"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pad", CTLFLAG_RD, - NULL, fl_pad, "payload pad boundary (bytes)"); + NULL, sc->sge.pad_boundary, "payload pad boundary (bytes)"); SYSCTL_ADD_INT(ctx, children, OID_AUTO, "spg_len", CTLFLAG_RD, NULL, spg_len, "status page size (bytes)"); @@ -776,10 +779,6 @@ t4_sge_sysctls(struct adapter *sc, struc SYSCTL_ADD_INT(ctx, children, OID_AUTO, "cong_drop", CTLFLAG_RD, NULL, cong_drop, "congestion drop setting"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, "buffer_packing", CTLFLAG_RD, - NULL, enable_buffer_packing(sc), - "pack multiple frames in one fl buffer"); - SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pack", CTLFLAG_RD, NULL, sc->sge.pack_boundary, "payload pack boundary (bytes)"); } @@ -957,7 +956,6 @@ mtu_to_max_payload(struct adapter *sc, i #ifdef TCP_OFFLOAD } #endif - payload = roundup2(payload, fl_pad); return (payload); } @@ -982,7 +980,7 @@ t4_setup_port_queues(struct port_info *p struct ifnet *ifp = pi->ifp; struct sysctl_oid *oid = device_get_sysctl_tree(pi->dev); struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid); - int maxp, pack, mtu = ifp->if_mtu; + int maxp, mtu = ifp->if_mtu; /* Interrupt vector to start from (when using multiple vectors) */ intr_idx = first_vector(pi); @@ -993,7 +991,6 @@ t4_setup_port_queues(struct port_info *p * b) allocate queue iff it will take direct interrupts. */ maxp = mtu_to_max_payload(sc, mtu, 0); - pack = enable_buffer_packing(sc); if (pi->flags & INTR_RXQ) { oid = SYSCTL_ADD_NODE(&pi->ctx, children, OID_AUTO, "rxq", CTLFLAG_RD, NULL, "rx queues"); @@ -1004,7 +1001,7 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(sc, &rxq->fl, pi->qsize_rxq / 8, maxp, pack, name); + init_fl(sc, &rxq->fl, pi->qsize_rxq / 8, maxp, name); if (pi->flags & INTR_RXQ) { rxq->iq.flags |= IQ_INTR; @@ -1028,7 +1025,7 @@ t4_setup_port_queues(struct port_info *p snprintf(name, sizeof(name), "%s ofld_rxq%d-fl", device_get_nameunit(pi->dev), i); - init_fl(sc, &ofld_rxq->fl, pi->qsize_rxq / 8, maxp, pack, name); + init_fl(sc, &ofld_rxq->fl, pi->qsize_rxq / 8, maxp, name); if (pi->flags & INTR_OFLD_RXQ) { ofld_rxq->iq.flags |= IQ_INTR; @@ -1561,7 +1558,8 @@ rxb_free(struct mbuf *m, void *arg1, voi * d) m_extaddref (cluster with metadata) zone_mbuf */ static struct mbuf * -get_scatter_segment(struct adapter *sc, struct sge_fl *fl, int total, int flags) +get_scatter_segment(struct adapter *sc, struct sge_fl *fl, int fr_offset, + int remaining) { struct mbuf *m; struct fl_sdesc *sd = &fl->sdesc[fl->cidx]; @@ -1569,12 +1567,23 @@ get_scatter_segment(struct adapter *sc, struct sw_zone_info *swz = &sc->sge.sw_zone_info[cll->zidx]; struct hw_buf_info *hwb = &sc->sge.hw_buf_info[cll->hwidx]; struct cluster_metadata *clm = cl_metadata(sc, fl, cll, sd->cl); - int len, padded_len; + int len, blen; caddr_t payload; - len = min(total, hwb->size - fl->rx_offset); - padded_len = roundup2(len, fl->buf_boundary); + blen = hwb->size - fl->rx_offset; /* max possible in this buf */ + len = min(remaining, blen); payload = sd->cl + cll->region1 + fl->rx_offset; + if (fl->flags & FL_BUF_PACKING) { + const u_int l = fr_offset + len; + const u_int pad = roundup2(l, fl->buf_boundary) - l; + + if (fl->rx_offset + len + pad < hwb->size) + blen = len + pad; + MPASS(fl->rx_offset + blen <= hwb->size); + } else { + MPASS(fl->rx_offset == 0); /* not packing */ + } + if (sc->sc_do_rxcopy && len < RX_COPY_THRESHOLD) { @@ -1582,7 +1591,7 @@ get_scatter_segment(struct adapter *sc, * Copy payload into a freshly allocated mbuf. */ - m = flags & M_PKTHDR ? + m = fr_offset == 0 ? m_gethdr(M_NOWAIT, MT_DATA) : m_get(M_NOWAIT, MT_DATA); if (m == NULL) return (NULL); @@ -1604,10 +1613,11 @@ get_scatter_segment(struct adapter *sc, MPASS(clm != NULL); m = (struct mbuf *)(sd->cl + sd->nmbuf * MSIZE); /* No bzero required */ - if (m_init(m, NULL, 0, M_NOWAIT, MT_DATA, flags | M_NOFREE)) + if (m_init(m, NULL, 0, M_NOWAIT, MT_DATA, + fr_offset == 0 ? M_PKTHDR | M_NOFREE : M_NOFREE)) return (NULL); fl->mbuf_inlined++; - m_extaddref(m, payload, padded_len, &clm->refcount, rxb_free, + m_extaddref(m, payload, blen, &clm->refcount, rxb_free, swz->zone, sd->cl); if (sd->nmbuf++ == 0) counter_u64_add(extfree_refs, 1); @@ -1619,13 +1629,13 @@ get_scatter_segment(struct adapter *sc, * payload in the cluster. */ - m = flags & M_PKTHDR ? + m = fr_offset == 0 ? m_gethdr(M_NOWAIT, MT_DATA) : m_get(M_NOWAIT, MT_DATA); if (m == NULL) return (NULL); fl->mbuf_allocated++; if (clm != NULL) { - m_extaddref(m, payload, padded_len, &clm->refcount, + m_extaddref(m, payload, blen, &clm->refcount, rxb_free, swz->zone, sd->cl); if (sd->nmbuf++ == 0) counter_u64_add(extfree_refs, 1); @@ -1634,12 +1644,12 @@ get_scatter_segment(struct adapter *sc, sd->cl = NULL; /* consumed, not a recycle candidate */ } } - if (flags & M_PKTHDR) - m->m_pkthdr.len = total; + if (fr_offset == 0) + m->m_pkthdr.len = remaining; m->m_len = len; if (fl->flags & FL_BUF_PACKING) { - fl->rx_offset += padded_len; + fl->rx_offset += blen; MPASS(fl->rx_offset <= hwb->size); if (fl->rx_offset < hwb->size) return (m); /* without advancing the cidx */ @@ -1661,17 +1671,17 @@ static struct mbuf * get_fl_payload(struct adapter *sc, struct sge_fl *fl, uint32_t len_newbuf) { struct mbuf *m0, *m, **pnext; - u_int len; + u_int remaining; + const u_int total = G_RSPD_LEN(len_newbuf); - len = G_RSPD_LEN(len_newbuf); if (__predict_false(fl->flags & FL_BUF_RESUME)) { M_ASSERTPKTHDR(fl->m0); - MPASS(len == fl->m0->m_pkthdr.len); - MPASS(fl->remaining < len); + MPASS(fl->m0->m_pkthdr.len == total); + MPASS(fl->remaining < total); m0 = fl->m0; pnext = fl->pnext; - len = fl->remaining; + remaining = fl->remaining; fl->flags &= ~FL_BUF_RESUME; goto get_segment; } @@ -1692,25 +1702,25 @@ get_fl_payload(struct adapter *sc, struc * 'len' and it may span multiple hw buffers. */ - m0 = get_scatter_segment(sc, fl, len, M_PKTHDR); + m0 = get_scatter_segment(sc, fl, 0, total); if (m0 == NULL) return (NULL); - len -= m0->m_len; + remaining = total - m0->m_len; pnext = &m0->m_next; - while (len > 0) { + while (remaining > 0) { get_segment: MPASS(fl->rx_offset == 0); - m = get_scatter_segment(sc, fl, len, 0); + m = get_scatter_segment(sc, fl, total - remaining, remaining); if (__predict_false(m == NULL)) { fl->m0 = m0; fl->pnext = pnext; - fl->remaining = len; + fl->remaining = remaining; fl->flags |= FL_BUF_RESUME; return (NULL); } *pnext = m; pnext = &m->m_next; - len -= m->m_len; + remaining -= m->m_len; } *pnext = NULL; @@ -2122,14 +2132,15 @@ init_iq(struct sge_iq *iq, struct adapte } static inline void -init_fl(struct adapter *sc, struct sge_fl *fl, int qsize, int maxp, int pack, - char *name) +init_fl(struct adapter *sc, struct sge_fl *fl, int qsize, int maxp, char *name) { fl->qsize = qsize; fl->sidx = qsize - spg_len / EQ_ESIZE; strlcpy(fl->lockname, name, sizeof(fl->lockname)); - if (pack) + if (sc->flags & BUF_PACKING_OK && + ((!is_t4(sc) && buffer_packing) || /* T5+: enabled unless 0 */ + (is_t4(sc) && buffer_packing == 1)))/* T4: disabled unless 1 */ fl->flags |= FL_BUF_PACKING; find_best_refill_source(sc, fl, maxp); find_safe_refill_source(sc, fl); @@ -2278,11 +2289,13 @@ alloc_iq_fl(struct port_info *pi, struct if (fl->flags & FL_BUF_PACKING) { fl->lowat = roundup2(sc->sge.fl_starve_threshold2, 8); - fl->buf_boundary = max(fl_pad, sc->sge.pack_boundary); + fl->buf_boundary = sc->sge.pack_boundary; } else { fl->lowat = roundup2(sc->sge.fl_starve_threshold, 8); - fl->buf_boundary = fl_pad; + fl->buf_boundary = 16; } + if (fl_pad && fl->buf_boundary < sc->sge.pad_boundary) + fl->buf_boundary = sc->sge.pad_boundary; c.iqns_to_fl0congen |= htobe32(V_FW_IQ_CMD_FL0HOSTFCMODE(X_HOSTFCMODE_NONE) | @@ -2453,6 +2466,10 @@ add_fl_sysctls(struct sysctl_ctx_list *c SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cntxt_id", CTLTYPE_INT | CTLFLAG_RD, &fl->cntxt_id, 0, sysctl_uint16, "I", "SGE context id of the freelist"); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "padding", CTLFLAG_RD, NULL, + fl_pad ? 1 : 0, "padding enabled"); + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "packing", CTLFLAG_RD, NULL, + fl->flags & FL_BUF_PACKING ? 1 : 0, "packing enabled"); SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "cidx", CTLFLAG_RD, &fl->cidx, 0, "consumer index"); if (fl->flags & FL_BUF_PACKING) { @@ -4368,6 +4385,17 @@ done: if (allow_mbufs_in_cluster == 0 || hwb->size < maxp) break; + + /* + * Do not inline mbufs if doing so would violate the pad/pack + * boundary alignment requirement. + */ + if (fl_pad && (MSIZE % sc->sge.pad_boundary) != 0) + continue; + if (fl->flags & FL_BUF_PACKING && + (MSIZE % sc->sge.pack_boundary) != 0) + continue; + if (spare < CL_METADATA_SIZE + MSIZE) continue; n = (spare - CL_METADATA_SIZE) / MSIZE; @@ -4450,7 +4478,8 @@ find_safe_refill_source(struct adapter * spare = swz->size - hwb->size; fl->cll_alt.hwidx = hwidx; fl->cll_alt.zidx = hwb->zidx; - if (allow_mbufs_in_cluster) + if (allow_mbufs_in_cluster && + (fl_pad == 0 || (MSIZE % sc->sge.pad_boundary) == 0)) fl->cll_alt.region1 = ((spare - CL_METADATA_SIZE) / MSIZE) * MSIZE; else fl->cll_alt.region1 = 0; From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 17:33:52 2015 Return-Path: Delivered-To: svn-src-all@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 98D82F7C; Tue, 7 Apr 2015 17:33: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 8398D87D; Tue, 7 Apr 2015 17:33: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 t37HXqkB049184; Tue, 7 Apr 2015 17:33:52 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37HXqQK049183; Tue, 7 Apr 2015 17:33:52 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504071733.t37HXqQK049183@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 7 Apr 2015 17:33:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281213 - stable/10/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 17:33:52 -0000 Author: np Date: Tue Apr 7 17:33:51 2015 New Revision: 281213 URL: https://svnweb.freebsd.org/changeset/base/281213 Log: MFC r276570: cxgbe/tom: log some more details in send_flowc_wr. Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Apr 7 17:21:30 2015 (r281212) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Apr 7 17:33:51 2015 (r281213) @@ -111,8 +111,6 @@ send_flowc_wr(struct toepcb *toep, struc KASSERT(!(toep->flags & TPF_FLOWC_WR_SENT), ("%s: flowc for tid %u sent already", __func__, toep->tid)); - CTR2(KTR_CXGBE, "%s: tid %u", __func__, toep->tid); - flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval); wr = alloc_wrqe(roundup2(flowclen, 16), toep->ofld_txq); @@ -147,11 +145,18 @@ send_flowc_wr(struct toepcb *toep, struc flowc->mnemval[6].val = htobe32(sndbuf); flowc->mnemval[7].mnemonic = FW_FLOWC_MNEM_MSS; flowc->mnemval[7].val = htobe32(ftxp->mss); + + CTR6(KTR_CXGBE, + "%s: tid %u, mss %u, sndbuf %u, snd_nxt 0x%x, rcv_nxt 0x%x", + __func__, toep->tid, ftxp->mss, sndbuf, ftxp->snd_nxt, + ftxp->rcv_nxt); } else { flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; flowc->mnemval[4].val = htobe32(512); flowc->mnemval[5].mnemonic = FW_FLOWC_MNEM_MSS; flowc->mnemval[5].val = htobe32(512); + + CTR2(KTR_CXGBE, "%s: tid %u", __func__, toep->tid); } txsd->tx_credits = howmany(flowclen, 16); From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 17:40:36 2015 Return-Path: Delivered-To: svn-src-all@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 8AB26230; Tue, 7 Apr 2015 17:40: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 7463C8D7; Tue, 7 Apr 2015 17:40: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 t37HeaLX050113; Tue, 7 Apr 2015 17:40:36 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37HeaPk050112; Tue, 7 Apr 2015 17:40:36 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504071740.t37HeaPk050112@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 7 Apr 2015 17:40:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281214 - stable/10/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 17:40:36 -0000 Author: np Date: Tue Apr 7 17:40:35 2015 New Revision: 281214 URL: https://svnweb.freebsd.org/changeset/base/281214 Log: MFC r276574: cxgbe/tom: fix the MSS calculation for IPv6 connections handled by the TOE. Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Apr 7 17:33:51 2015 (r281213) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Tue Apr 7 17:40:35 2015 (r281214) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #define TCPSTATES #include @@ -236,11 +237,20 @@ static void assign_rxopt(struct tcpcb *tp, unsigned int opt) { struct toepcb *toep = tp->t_toe; + struct inpcb *inp = tp->t_inpcb; struct adapter *sc = td_adapter(toep->td); + int n; + + INP_LOCK_ASSERT(inp); - INP_LOCK_ASSERT(tp->t_inpcb); + if (inp->inp_inc.inc_flags & INC_ISIPV6) + n = sizeof(struct ip6_hdr) + sizeof(struct tcphdr); + else + n = sizeof(struct ip) + sizeof(struct tcphdr); + tp->t_maxseg = tp->t_maxopd = sc->params.mtus[G_TCPOPT_MSS(opt)] - n; - tp->t_maxseg = tp->t_maxopd = sc->params.mtus[G_TCPOPT_MSS(opt)] - 40; + CTR4(KTR_CXGBE, "%s: tid %d, mtu_idx %u (%u)", __func__, toep->tid, + G_TCPOPT_MSS(opt), sc->params.mtus[G_TCPOPT_MSS(opt)]); if (G_TCPOPT_TSTAMP(opt)) { tp->t_flags |= TF_RCVD_TSTMP; /* timestamps ok */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 18:04:19 2015 Return-Path: Delivered-To: svn-src-all@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 8F2C3E32; Tue, 7 Apr 2015 18:04: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 796FDC1B; Tue, 7 Apr 2015 18:04: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 t37I4J4r064498; Tue, 7 Apr 2015 18:04:19 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37I4JaU064496; Tue, 7 Apr 2015 18:04:19 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201504071804.t37I4JaU064496@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 7 Apr 2015 18:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281215 - stable/10/sys/dev/bxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 18:04:19 -0000 Author: davidcs Date: Tue Apr 7 18:04:18 2015 New Revision: 281215 URL: https://svnweb.freebsd.org/changeset/base/281215 Log: MFC r281006 When an mbuf allocation fails in the receive path, the mbuf containing the received packet is not sent to the host network stack and is reused again on the receive ring. Remaining received packets in the ring are not processed in that invocation of bxe_rxeof() and defered to the task thread Modified: stable/10/sys/dev/bxe/bxe.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bxe/bxe.c ============================================================================== --- stable/10/sys/dev/bxe/bxe.c Tue Apr 7 17:40:35 2015 (r281214) +++ stable/10/sys/dev/bxe/bxe.c Tue Apr 7 18:04:18 2015 (r281215) @@ -3257,7 +3257,7 @@ bxe_rxeof(struct bxe_softc *sc, uint16_t bd_cons, bd_prod, bd_prod_fw, comp_ring_cons; uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod; int rx_pkts = 0; - int rc; + int rc = 0; BXE_FP_RX_LOCK(fp); @@ -3399,6 +3399,10 @@ bxe_rxeof(struct bxe_softc *sc, (sc->max_rx_bufs != RX_BD_USABLE) ? bd_prod : bd_cons); if (rc != 0) { + + /* we simply reuse the received mbuf and don't post it to the stack */ + m = NULL; + BLOGE(sc, "mbuf alloc fail for fp[%02d] rx chain (%d)\n", fp->index, rc); fp->eth_q_stats.rx_soft_errors++; @@ -3487,6 +3491,9 @@ next_cqe: sw_cq_cons = RCQ_NEXT(sw_cq_cons); /* limit spinning on the queue */ + if (rc != 0) + break; + if (rx_pkts == sc->rx_budget) { fp->eth_q_stats.rx_budget_reached++; break; From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 18:06:47 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 18:07:17 2015 Return-Path: Delivered-To: svn-src-all@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 27856239; Tue, 7 Apr 2015 18:07: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 11CDBC4C; Tue, 7 Apr 2015 18:07: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 t37I7G41065141; Tue, 7 Apr 2015 18:07:16 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37I7GOJ065140; Tue, 7 Apr 2015 18:07:16 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201504071807.t37I7GOJ065140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 7 Apr 2015 18:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281217 - stable/9/sys/dev/bxe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 18:07:17 -0000 Author: davidcs Date: Tue Apr 7 18:07:16 2015 New Revision: 281217 URL: https://svnweb.freebsd.org/changeset/base/281217 Log: MFC r281006 When an mbuf allocation fails in the receive path, the mbuf containing the received packet is not sent to the host network stack and is reused again on the receive ring. Remaining received packets in the ring are not processed in that invocation of bxe_rxeof() and defered to the task thread Modified: stable/9/sys/dev/bxe/bxe.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bxe/bxe.c ============================================================================== --- stable/9/sys/dev/bxe/bxe.c Tue Apr 7 18:06:46 2015 (r281216) +++ stable/9/sys/dev/bxe/bxe.c Tue Apr 7 18:07:16 2015 (r281217) @@ -3257,7 +3257,7 @@ bxe_rxeof(struct bxe_softc *sc, uint16_t bd_cons, bd_prod, bd_prod_fw, comp_ring_cons; uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod; int rx_pkts = 0; - int rc; + int rc = 0; BXE_FP_RX_LOCK(fp); @@ -3399,6 +3399,10 @@ bxe_rxeof(struct bxe_softc *sc, (sc->max_rx_bufs != RX_BD_USABLE) ? bd_prod : bd_cons); if (rc != 0) { + + /* we simply reuse the received mbuf and don't post it to the stack */ + m = NULL; + BLOGE(sc, "mbuf alloc fail for fp[%02d] rx chain (%d)\n", fp->index, rc); fp->eth_q_stats.rx_soft_errors++; @@ -3487,6 +3491,9 @@ next_cqe: sw_cq_cons = RCQ_NEXT(sw_cq_cons); /* limit spinning on the queue */ + if (rc != 0) + break; + if (rx_pkts == sc->rx_budget) { fp->eth_q_stats.rx_budget_reached++; break; From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 18:10:59 2015 Return-Path: Delivered-To: svn-src-all@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 816FF3F4; Tue, 7 Apr 2015 18:10: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 6B9BCC8C; Tue, 7 Apr 2015 18:10: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 t37IAxaC067647; Tue, 7 Apr 2015 18:10:59 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37IAxvp067646; Tue, 7 Apr 2015 18:10:59 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201504071810.t37IAxvp067646@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 7 Apr 2015 18:10:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r281218 - stable/8/sys/dev/bxe X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 18:10:59 -0000 Author: davidcs Date: Tue Apr 7 18:10:58 2015 New Revision: 281218 URL: https://svnweb.freebsd.org/changeset/base/281218 Log: MFC r281006 When an mbuf allocation fails in the receive path, the mbuf containing the received packet is not sent to the host network stack and is reused again on the receive ring. Remaining received packets in the ring are not processed in that invocation of bxe_rxeof() and defered to the task thread Modified: stable/8/sys/dev/bxe/bxe.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) Modified: stable/8/sys/dev/bxe/bxe.c ============================================================================== --- stable/8/sys/dev/bxe/bxe.c Tue Apr 7 18:07:16 2015 (r281217) +++ stable/8/sys/dev/bxe/bxe.c Tue Apr 7 18:10:58 2015 (r281218) @@ -3257,7 +3257,7 @@ bxe_rxeof(struct bxe_softc *sc, uint16_t bd_cons, bd_prod, bd_prod_fw, comp_ring_cons; uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod; int rx_pkts = 0; - int rc; + int rc = 0; BXE_FP_RX_LOCK(fp); @@ -3399,6 +3399,10 @@ bxe_rxeof(struct bxe_softc *sc, (sc->max_rx_bufs != RX_BD_USABLE) ? bd_prod : bd_cons); if (rc != 0) { + + /* we simply reuse the received mbuf and don't post it to the stack */ + m = NULL; + BLOGE(sc, "mbuf alloc fail for fp[%02d] rx chain (%d)\n", fp->index, rc); fp->eth_q_stats.rx_soft_errors++; @@ -3487,6 +3491,9 @@ next_cqe: sw_cq_cons = RCQ_NEXT(sw_cq_cons); /* limit spinning on the queue */ + if (rc != 0) + break; + if (rx_pkts == sc->rx_budget) { fp->eth_q_stats.rx_budget_reached++; break; From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 18:14:02 2015 Return-Path: Delivered-To: svn-src-all@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 62CC6556; Tue, 7 Apr 2015 18:14: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 4CF01D43; Tue, 7 Apr 2015 18:14: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 t37IE2w7069677; Tue, 7 Apr 2015 18:14:02 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37IE2qb069676; Tue, 7 Apr 2015 18:14:02 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201504071814.t37IE2qb069676@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 7 Apr 2015 18:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r281219 - stable/7/sys/dev/bxe X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 18:14:02 -0000 Author: davidcs Date: Tue Apr 7 18:14:01 2015 New Revision: 281219 URL: https://svnweb.freebsd.org/changeset/base/281219 Log: MFC r281006 When an mbuf allocation fails in the receive path, the mbuf containing the received packet is not sent to the host network stack and is reused again on the receive ring. Remaining received packets in the ring are not processed in that invocation of bxe_rxeof() and defered to the task thread Modified: stable/7/sys/dev/bxe/bxe.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/bxe/bxe.c ============================================================================== --- stable/7/sys/dev/bxe/bxe.c Tue Apr 7 18:10:58 2015 (r281218) +++ stable/7/sys/dev/bxe/bxe.c Tue Apr 7 18:14:01 2015 (r281219) @@ -3257,7 +3257,7 @@ bxe_rxeof(struct bxe_softc *sc, uint16_t bd_cons, bd_prod, bd_prod_fw, comp_ring_cons; uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod; int rx_pkts = 0; - int rc; + int rc = 0; BXE_FP_RX_LOCK(fp); @@ -3399,6 +3399,10 @@ bxe_rxeof(struct bxe_softc *sc, (sc->max_rx_bufs != RX_BD_USABLE) ? bd_prod : bd_cons); if (rc != 0) { + + /* we simply reuse the received mbuf and don't post it to the stack */ + m = NULL; + BLOGE(sc, "mbuf alloc fail for fp[%02d] rx chain (%d)\n", fp->index, rc); fp->eth_q_stats.rx_soft_errors++; @@ -3487,6 +3491,9 @@ next_cqe: sw_cq_cons = RCQ_NEXT(sw_cq_cons); /* limit spinning on the queue */ + if (rc != 0) + break; + if (rx_pkts == sc->rx_budget) { fp->eth_q_stats.rx_budget_reached++; break; From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 18:40:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 18:52:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 18:56:37 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 19:28:55 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 19:31:31 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 19:37:50 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 19:39:24 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 20:20:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 20:20:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 20:20:27 2015 Return-Path: Delivered-To: svn-src-all@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 6A83B2D1; Tue, 7 Apr 2015 20:20: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 52FC1DFB; Tue, 7 Apr 2015 20:20: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 t37KKRap029562; Tue, 7 Apr 2015 20:20:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37KKPiR029555; Tue, 7 Apr 2015 20:20:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504072020.t37KKPiR029555@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:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281230 - in stable/10: contrib/ntp/ntpd sys/netinet sys/netinet6 usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 20:20:27 -0000 Author: delphij Date: Tue Apr 7 20:20:24 2015 New Revision: 281230 URL: https://svnweb.freebsd.org/changeset/base/281230 Log: Improve patch for SA-15:04.igmp to solve a potential buffer overflow. Fix multiple vulnerabilities of ntp. [SA-15:07] Fix bsdinstall(8) insecure default GELI keyfile permissions. [SA-15:08] Fix Denial of Service with IPv6 Router Advertisements. [SA-15:09] Modified: stable/10/contrib/ntp/ntpd/ntp_crypto.c stable/10/contrib/ntp/ntpd/ntp_proto.c stable/10/sys/netinet/igmp.c stable/10/sys/netinet6/nd6_rtr.c stable/10/usr.sbin/bsdinstall/scripts/zfsboot Modified: stable/10/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- stable/10/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:09 2015 (r281229) +++ stable/10/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:24 2015 (r281230) @@ -93,6 +93,7 @@ #define TAI_1972 10 /* initial TAI offset (s) */ #define MAX_LEAP 100 /* max UTC leapseconds (s) */ #define VALUE_LEN (6 * 4) /* min response field length */ +#define MAX_VALLEN (65535 - VALUE_LEN) #define YEAR (60 * 60 * 24 * 365) /* seconds in year */ /* @@ -137,8 +138,8 @@ static u_int ident_scheme = 0; /* server */ static int crypto_verify P((struct exten *, struct value *, struct peer *)); -static int crypto_encrypt P((struct exten *, struct value *, - keyid_t *)); +static int crypto_encrypt P((const u_char *, u_int, keyid_t *, + struct value *)); static int crypto_alice P((struct peer *, struct value *)); static int crypto_alice2 P((struct peer *, struct value *)); static int crypto_alice3 P((struct peer *, struct value *)); @@ -446,6 +447,12 @@ crypto_recv( tstamp = ntohl(ep->tstamp); fstamp = ntohl(ep->fstamp); vallen = ntohl(ep->vallen); + /* + * Bug 2761: I hope this isn't too early... + */ + if ( vallen == 0 + || len - VALUE_LEN < vallen) + return XEVNT_LEN; } switch (code) { @@ -488,7 +495,7 @@ crypto_recv( break; if (vallen == 0 || vallen > MAXHOSTNAME || - len < VALUE_LEN + vallen) { + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; } @@ -1250,7 +1257,8 @@ crypto_xmit( vallen = ntohl(ep->vallen); if (vallen == 8) { strcpy(certname, sys_hostname); - } else if (vallen == 0 || vallen > MAXHOSTNAME) { + } else if (vallen == 0 || vallen > MAXHOSTNAME || + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; @@ -1407,7 +1415,10 @@ crypto_xmit( * anything goes wrong. */ case CRYPTO_COOK | CRYPTO_RESP: - if ((opcode & 0xffff) < VALUE_LEN) { + vallen = ntohl(ep->vallen); /* Must be <64k */ + if ( vallen == 0 + || (vallen >= MAX_VALLEN) + || (opcode & 0x0000ffff) < VALUE_LEN + vallen) { rval = XEVNT_LEN; break; } @@ -1420,10 +1431,11 @@ crypto_xmit( } tcookie = peer->pcookie; } - if ((rval = crypto_encrypt(ep, &vtemp, &tcookie)) == - XEVNT_OK) + if ((rval = crypto_encrypt((const u_char *)ep->pkt, vallen, &tcookie, &vtemp)) + == XEVNT_OK) { len += crypto_send(fp, &vtemp); - value_free(&vtemp); + value_free(&vtemp); + } break; /* @@ -1558,10 +1570,15 @@ crypto_verify( * are rounded up to the next word. */ vallen = ntohl(ep->vallen); + if ( vallen == 0 + || vallen > MAX_VALLEN) + return (XEVNT_LEN); i = (vallen + 3) / 4; siglen = ntohl(ep->pkt[i++]); - if (len < VALUE_LEN + ((vallen + 3) / 4) * 4 + ((siglen + 3) / - 4) * 4) + if ( siglen > MAX_VALLEN + || len - VALUE_LEN < ((vallen + 3) / 4) * 4 + || len - VALUE_LEN - ((vallen + 3) / 4) * 4 + < ((siglen + 3) / 4) * 4) return (XEVNT_LEN); /* @@ -1627,6 +1644,7 @@ crypto_verify( * avoid doing the sign exchange. */ EVP_VerifyInit(&ctx, peer->digest); + /* XXX: the "+ 12" needs to be at least documented... */ EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen + 12); if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen, pkey) <= 0) return (XEVNT_SIG); @@ -1641,10 +1659,10 @@ crypto_verify( /* - * crypto_encrypt - construct encrypted cookie and signature from - * extension field and cookie + * crypto_encrypt - construct vp (encrypted cookie and signature) from + * the public key and cookie. * - * Returns + * Returns: * XEVNT_OK success * XEVNT_PUB bad or missing public key * XEVNT_CKY bad or missing cookie @@ -1652,24 +1670,21 @@ crypto_verify( */ static int crypto_encrypt( - struct exten *ep, /* extension pointer */ - struct value *vp, /* value pointer */ - keyid_t *cookie /* server cookie */ + const u_char *ptr, /* Public Key */ + u_int vallen, /* Length of Public Key */ + keyid_t *cookie, /* server cookie */ + struct value *vp /* value pointer */ ) { EVP_PKEY *pkey; /* public key */ EVP_MD_CTX ctx; /* signature context */ tstamp_t tstamp; /* NTP timestamp */ u_int32 temp32; - u_int len; - u_char *ptr; /* * Extract the public key from the request. */ - len = ntohl(ep->vallen); - ptr = (u_char *)ep->pkt; - pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, len); + pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, vallen); if (pkey == NULL) { msyslog(LOG_ERR, "crypto_encrypt %s\n", ERR_error_string(ERR_get_error(), NULL)); @@ -1683,9 +1698,9 @@ crypto_encrypt( memset(vp, 0, sizeof(struct value)); vp->tstamp = htonl(tstamp); vp->fstamp = hostval.tstamp; - len = EVP_PKEY_size(pkey); - vp->vallen = htonl(len); - vp->ptr = emalloc(len); + vallen = EVP_PKEY_size(pkey); + vp->vallen = htonl(vallen); + vp->ptr = emalloc(vallen); temp32 = htonl(*cookie); if (!RSA_public_encrypt(4, (u_char *)&temp32, vp->ptr, pkey->pkey.rsa, RSA_PKCS1_OAEP_PADDING)) { @@ -1705,9 +1720,9 @@ crypto_encrypt( vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) - vp->siglen = htonl(len); + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) + vp->siglen = htonl(sign_siglen); return (XEVNT_OK); } @@ -1794,6 +1809,9 @@ crypto_ident( * call in the protocol module. * * Returns extension field pointer (no errors). + * + * XXX: opcode and len should really be 32-bit quantities and + * we should make sure that str is not too big. */ struct exten * crypto_args( @@ -1805,11 +1823,14 @@ crypto_args( tstamp_t tstamp; /* NTP timestamp */ struct exten *ep; /* extension field pointer */ u_int len; /* extension field length */ + size_t slen; tstamp = crypto_time(); len = sizeof(struct exten); - if (str != NULL) - len += strlen(str); + if (str != NULL) { + slen = strlen(str); + len += slen; + } ep = emalloc(len); memset(ep, 0, len); if (opcode == 0) @@ -1829,8 +1850,8 @@ crypto_args( ep->fstamp = hostval.tstamp; ep->vallen = 0; if (str != NULL) { - ep->vallen = htonl(strlen(str)); - memcpy((char *)ep->pkt, str, strlen(str)); + ep->vallen = htonl(slen); + memcpy((char *)ep->pkt, str, slen); } else { ep->pkt[0] = peer->associd; } @@ -1844,6 +1865,8 @@ crypto_args( * Returns extension field length. Note: it is not polite to send a * nonempty signature with zero timestamp or a nonzero timestamp with * empty signature, but these rules are not enforced here. + * + * XXX This code won't work on a box with 16-bit ints. */ u_int crypto_send( @@ -2212,7 +2235,8 @@ crypto_bob( tstamp_t tstamp; /* NTP timestamp */ BIGNUM *bn, *bk, *r; u_char *ptr; - u_int len; + u_int len; /* extension field length */ + u_int vallen = 0; /* value length */ /* * If the IFF parameters are not valid, something awful @@ -2227,8 +2251,11 @@ crypto_bob( /* * Extract r from the challenge. */ - len = ntohl(ep->vallen); - if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) { + vallen = ntohl(ep->vallen); + len = ntohl(ep->opcode) & 0x0000ffff; + if (vallen == 0 || len < VALUE_LEN || len - VALUE_LEN < vallen) + return XEVNT_LEN; + if ((r = BN_bin2bn((u_char *)ep->pkt, vallen, NULL)) == NULL) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); return (XEVNT_ERR); @@ -2240,7 +2267,7 @@ crypto_bob( */ bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new(); sdsa = DSA_SIG_new(); - BN_rand(bk, len * 8, -1, 1); /* k */ + BN_rand(bk, vallen * 8, -1, 1); /* k */ BN_mod_mul(bn, dsa->priv_key, r, dsa->q, bctx); /* b r mod q */ BN_add(bn, bn, bk); BN_mod(bn, bn, dsa->q, bctx); /* k + b r mod q */ @@ -2254,19 +2281,25 @@ crypto_bob( /* * Encode the values in ASN.1 and sign. */ - tstamp = crypto_time(); - memset(vp, 0, sizeof(struct value)); - vp->tstamp = htonl(tstamp); - vp->fstamp = htonl(if_fstamp); - len = i2d_DSA_SIG(sdsa, NULL); - if (len <= 0) { + vallen = i2d_DSA_SIG(sdsa, NULL); + if (vallen == 0) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); DSA_SIG_free(sdsa); return (XEVNT_ERR); } - vp->vallen = htonl(len); - ptr = emalloc(len); + if (vallen > MAX_VALLEN) { + msyslog(LOG_ERR, "crypto_bob: signature is too big: %d", + vallen); + DSA_SIG_free(sdsa); + return (XEVNT_LEN); + } + memset(vp, 0, sizeof(struct value)); + tstamp = crypto_time(); + vp->tstamp = htonl(tstamp); + vp->fstamp = htonl(if_fstamp); + vp->vallen = htonl(vallen); + ptr = emalloc(vallen); vp->ptr = ptr; i2d_DSA_SIG(sdsa, &ptr); DSA_SIG_free(sdsa); @@ -2277,11 +2310,12 @@ crypto_bob( if (tstamp < cinfo->first || tstamp > cinfo->last) return (XEVNT_PER); + /* XXX: more validation to make sure the sign fits... */ vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) vp->siglen = htonl(len); return (XEVNT_OK); } Modified: stable/10/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- stable/10/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:09 2015 (r281229) +++ stable/10/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:24 2015 (r281230) @@ -459,7 +459,7 @@ receive( while (has_mac > 0) { int temp; - if (has_mac % 4 != 0 || has_mac < 0) { + if (has_mac % 4 != 0 || has_mac < MIN_MAC_LEN) { sys_badlength++; return; /* bad MAC length */ } @@ -483,6 +483,13 @@ receive( return; /* bad MAC length */ } } + /* + * If has_mac is < 0 we had a malformed packet. + */ + if (has_mac < 0) { + sys_badlength++; + return; /* bad length */ + } #ifdef OPENSSL pkeyid = tkeyid = 0; #endif /* OPENSSL */ @@ -942,12 +949,9 @@ receive( } /* - * Update the origin and destination timestamps. If - * unsynchronized or bogus abandon ship. If the crypto machine + * If unsynchronized or bogus abandon ship. If the crypto machine * breaks, light the crypto bit and plaint the log. */ - peer->org = p_xmt; - peer->rec = rbufp->recv_time; if (peer->flash & PKT_TEST_MASK) { #ifdef OPENSSL if (crypto_flags && (peer->flags & FLAG_SKEY)) { @@ -978,10 +982,11 @@ receive( * versions. If symmetric modes, return a crypto-NAK. The peer * should restart the protocol. */ - } else if (!AUTH(peer->keyid || (restrict_mask & RES_DONTTRUST), - is_authentic)) { + } else if (!AUTH(peer->keyid || has_mac || + (restrict_mask & RES_DONTTRUST), is_authentic)) { peer->flash |= TEST5; - if (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE) + if (has_mac && + (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE)) fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask); return; /* bad auth */ } @@ -989,7 +994,12 @@ receive( /* * That was hard and I am sweaty, but the packet is squeaky * clean. Get on with real work. + * + * Update the origin and destination timestamps. */ + peer->org = p_xmt; + peer->rec = rbufp->recv_time; + peer->received++; peer->timereceived = current_time; if (is_authentic == AUTH_OK) Modified: stable/10/sys/netinet/igmp.c ============================================================================== --- stable/10/sys/netinet/igmp.c Tue Apr 7 20:20:09 2015 (r281229) +++ stable/10/sys/netinet/igmp.c Tue Apr 7 20:20:24 2015 (r281230) @@ -1534,7 +1534,6 @@ igmp_input(struct mbuf *m, int off) struct igmpv3 *igmpv3; uint16_t igmpv3len; uint16_t nsrc; - int srclen; IGMPSTAT_INC(igps_rcv_v3_queries); igmpv3 = (struct igmpv3 *)igmp; @@ -1542,8 +1541,8 @@ igmp_input(struct mbuf *m, int off) * 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; } @@ -1552,7 +1551,7 @@ igmp_input(struct mbuf *m, int off) * this scope. */ igmpv3len = iphlen + IGMP_V3_QUERY_MINLEN + - srclen; + sizeof(struct in_addr) * nsrc; if ((m->m_flags & M_EXT || m->m_len < igmpv3len) && (m = m_pullup(m, igmpv3len)) == NULL) { Modified: stable/10/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/10/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:09 2015 (r281229) +++ stable/10/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:24 2015 (r281230) @@ -296,8 +296,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); } Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Tue Apr 7 20:20:09 2015 (r281229) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Tue Apr 7 20:20:24 2015 (r281230) @@ -1125,6 +1125,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 "$CHMOD_MODE" \ + go-wrx "$bootpool/$zroot_key" || + return $FAILURE else # Clean up f_eval_catch $funcname zfs "$ZFS_UNMOUNT" \ From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 20:20:46 2015 Return-Path: Delivered-To: svn-src-all@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 BE6EE406; Tue, 7 Apr 2015 20:20: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 A7130E03; Tue, 7 Apr 2015 20:20: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 t37KKk4w032129; Tue, 7 Apr 2015 20:20:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37KKjgd032124; Tue, 7 Apr 2015 20:20:45 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504072020.t37KKjgd032124@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:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281231 - in stable: 8/contrib/ntp/ntpd 8/sys/netinet 8/sys/netinet6 9/contrib/ntp/ntpd 9/sys/netinet 9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 20:20:46 -0000 Author: delphij Date: Tue Apr 7 20:20:44 2015 New Revision: 281231 URL: https://svnweb.freebsd.org/changeset/base/281231 Log: Improve patch for SA-15:04.igmp to solve a potential buffer overflow. Fix multiple vulnerabilities of ntp. [SA-15:07] Fix Denial of Service with IPv6 Router Advertisements. [SA-15:09] Modified: stable/9/contrib/ntp/ntpd/ntp_crypto.c stable/9/contrib/ntp/ntpd/ntp_proto.c stable/9/sys/netinet/igmp.c stable/9/sys/netinet6/nd6_rtr.c Changes in other areas also in this revision: Modified: stable/8/contrib/ntp/ntpd/ntp_crypto.c stable/8/contrib/ntp/ntpd/ntp_proto.c stable/8/sys/netinet/igmp.c stable/8/sys/netinet6/nd6_rtr.c Modified: stable/9/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- stable/9/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/9/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:44 2015 (r281231) @@ -93,6 +93,7 @@ #define TAI_1972 10 /* initial TAI offset (s) */ #define MAX_LEAP 100 /* max UTC leapseconds (s) */ #define VALUE_LEN (6 * 4) /* min response field length */ +#define MAX_VALLEN (65535 - VALUE_LEN) #define YEAR (60 * 60 * 24 * 365) /* seconds in year */ /* @@ -137,8 +138,8 @@ static u_int ident_scheme = 0; /* server */ static int crypto_verify P((struct exten *, struct value *, struct peer *)); -static int crypto_encrypt P((struct exten *, struct value *, - keyid_t *)); +static int crypto_encrypt P((const u_char *, u_int, keyid_t *, + struct value *)); static int crypto_alice P((struct peer *, struct value *)); static int crypto_alice2 P((struct peer *, struct value *)); static int crypto_alice3 P((struct peer *, struct value *)); @@ -446,6 +447,12 @@ crypto_recv( tstamp = ntohl(ep->tstamp); fstamp = ntohl(ep->fstamp); vallen = ntohl(ep->vallen); + /* + * Bug 2761: I hope this isn't too early... + */ + if ( vallen == 0 + || len - VALUE_LEN < vallen) + return XEVNT_LEN; } switch (code) { @@ -488,7 +495,7 @@ crypto_recv( break; if (vallen == 0 || vallen > MAXHOSTNAME || - len < VALUE_LEN + vallen) { + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; } @@ -1250,7 +1257,8 @@ crypto_xmit( vallen = ntohl(ep->vallen); if (vallen == 8) { strcpy(certname, sys_hostname); - } else if (vallen == 0 || vallen > MAXHOSTNAME) { + } else if (vallen == 0 || vallen > MAXHOSTNAME || + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; @@ -1407,7 +1415,10 @@ crypto_xmit( * anything goes wrong. */ case CRYPTO_COOK | CRYPTO_RESP: - if ((opcode & 0xffff) < VALUE_LEN) { + vallen = ntohl(ep->vallen); /* Must be <64k */ + if ( vallen == 0 + || (vallen >= MAX_VALLEN) + || (opcode & 0x0000ffff) < VALUE_LEN + vallen) { rval = XEVNT_LEN; break; } @@ -1420,10 +1431,11 @@ crypto_xmit( } tcookie = peer->pcookie; } - if ((rval = crypto_encrypt(ep, &vtemp, &tcookie)) == - XEVNT_OK) + if ((rval = crypto_encrypt((const u_char *)ep->pkt, vallen, &tcookie, &vtemp)) + == XEVNT_OK) { len += crypto_send(fp, &vtemp); - value_free(&vtemp); + value_free(&vtemp); + } break; /* @@ -1558,10 +1570,15 @@ crypto_verify( * are rounded up to the next word. */ vallen = ntohl(ep->vallen); + if ( vallen == 0 + || vallen > MAX_VALLEN) + return (XEVNT_LEN); i = (vallen + 3) / 4; siglen = ntohl(ep->pkt[i++]); - if (len < VALUE_LEN + ((vallen + 3) / 4) * 4 + ((siglen + 3) / - 4) * 4) + if ( siglen > MAX_VALLEN + || len - VALUE_LEN < ((vallen + 3) / 4) * 4 + || len - VALUE_LEN - ((vallen + 3) / 4) * 4 + < ((siglen + 3) / 4) * 4) return (XEVNT_LEN); /* @@ -1627,6 +1644,7 @@ crypto_verify( * avoid doing the sign exchange. */ EVP_VerifyInit(&ctx, peer->digest); + /* XXX: the "+ 12" needs to be at least documented... */ EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen + 12); if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen, pkey) <= 0) return (XEVNT_SIG); @@ -1641,10 +1659,10 @@ crypto_verify( /* - * crypto_encrypt - construct encrypted cookie and signature from - * extension field and cookie + * crypto_encrypt - construct vp (encrypted cookie and signature) from + * the public key and cookie. * - * Returns + * Returns: * XEVNT_OK success * XEVNT_PUB bad or missing public key * XEVNT_CKY bad or missing cookie @@ -1652,24 +1670,21 @@ crypto_verify( */ static int crypto_encrypt( - struct exten *ep, /* extension pointer */ - struct value *vp, /* value pointer */ - keyid_t *cookie /* server cookie */ + const u_char *ptr, /* Public Key */ + u_int vallen, /* Length of Public Key */ + keyid_t *cookie, /* server cookie */ + struct value *vp /* value pointer */ ) { EVP_PKEY *pkey; /* public key */ EVP_MD_CTX ctx; /* signature context */ tstamp_t tstamp; /* NTP timestamp */ u_int32 temp32; - u_int len; - u_char *ptr; /* * Extract the public key from the request. */ - len = ntohl(ep->vallen); - ptr = (u_char *)ep->pkt; - pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, len); + pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, vallen); if (pkey == NULL) { msyslog(LOG_ERR, "crypto_encrypt %s\n", ERR_error_string(ERR_get_error(), NULL)); @@ -1683,9 +1698,9 @@ crypto_encrypt( memset(vp, 0, sizeof(struct value)); vp->tstamp = htonl(tstamp); vp->fstamp = hostval.tstamp; - len = EVP_PKEY_size(pkey); - vp->vallen = htonl(len); - vp->ptr = emalloc(len); + vallen = EVP_PKEY_size(pkey); + vp->vallen = htonl(vallen); + vp->ptr = emalloc(vallen); temp32 = htonl(*cookie); if (!RSA_public_encrypt(4, (u_char *)&temp32, vp->ptr, pkey->pkey.rsa, RSA_PKCS1_OAEP_PADDING)) { @@ -1705,9 +1720,9 @@ crypto_encrypt( vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) - vp->siglen = htonl(len); + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) + vp->siglen = htonl(sign_siglen); return (XEVNT_OK); } @@ -1794,6 +1809,9 @@ crypto_ident( * call in the protocol module. * * Returns extension field pointer (no errors). + * + * XXX: opcode and len should really be 32-bit quantities and + * we should make sure that str is not too big. */ struct exten * crypto_args( @@ -1805,11 +1823,14 @@ crypto_args( tstamp_t tstamp; /* NTP timestamp */ struct exten *ep; /* extension field pointer */ u_int len; /* extension field length */ + size_t slen; tstamp = crypto_time(); len = sizeof(struct exten); - if (str != NULL) - len += strlen(str); + if (str != NULL) { + slen = strlen(str); + len += slen; + } ep = emalloc(len); memset(ep, 0, len); if (opcode == 0) @@ -1829,8 +1850,8 @@ crypto_args( ep->fstamp = hostval.tstamp; ep->vallen = 0; if (str != NULL) { - ep->vallen = htonl(strlen(str)); - memcpy((char *)ep->pkt, str, strlen(str)); + ep->vallen = htonl(slen); + memcpy((char *)ep->pkt, str, slen); } else { ep->pkt[0] = peer->associd; } @@ -1844,6 +1865,8 @@ crypto_args( * Returns extension field length. Note: it is not polite to send a * nonempty signature with zero timestamp or a nonzero timestamp with * empty signature, but these rules are not enforced here. + * + * XXX This code won't work on a box with 16-bit ints. */ u_int crypto_send( @@ -2212,7 +2235,8 @@ crypto_bob( tstamp_t tstamp; /* NTP timestamp */ BIGNUM *bn, *bk, *r; u_char *ptr; - u_int len; + u_int len; /* extension field length */ + u_int vallen = 0; /* value length */ /* * If the IFF parameters are not valid, something awful @@ -2227,8 +2251,11 @@ crypto_bob( /* * Extract r from the challenge. */ - len = ntohl(ep->vallen); - if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) { + vallen = ntohl(ep->vallen); + len = ntohl(ep->opcode) & 0x0000ffff; + if (vallen == 0 || len < VALUE_LEN || len - VALUE_LEN < vallen) + return XEVNT_LEN; + if ((r = BN_bin2bn((u_char *)ep->pkt, vallen, NULL)) == NULL) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); return (XEVNT_ERR); @@ -2240,7 +2267,7 @@ crypto_bob( */ bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new(); sdsa = DSA_SIG_new(); - BN_rand(bk, len * 8, -1, 1); /* k */ + BN_rand(bk, vallen * 8, -1, 1); /* k */ BN_mod_mul(bn, dsa->priv_key, r, dsa->q, bctx); /* b r mod q */ BN_add(bn, bn, bk); BN_mod(bn, bn, dsa->q, bctx); /* k + b r mod q */ @@ -2254,19 +2281,25 @@ crypto_bob( /* * Encode the values in ASN.1 and sign. */ - tstamp = crypto_time(); - memset(vp, 0, sizeof(struct value)); - vp->tstamp = htonl(tstamp); - vp->fstamp = htonl(if_fstamp); - len = i2d_DSA_SIG(sdsa, NULL); - if (len <= 0) { + vallen = i2d_DSA_SIG(sdsa, NULL); + if (vallen == 0) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); DSA_SIG_free(sdsa); return (XEVNT_ERR); } - vp->vallen = htonl(len); - ptr = emalloc(len); + if (vallen > MAX_VALLEN) { + msyslog(LOG_ERR, "crypto_bob: signature is too big: %d", + vallen); + DSA_SIG_free(sdsa); + return (XEVNT_LEN); + } + memset(vp, 0, sizeof(struct value)); + tstamp = crypto_time(); + vp->tstamp = htonl(tstamp); + vp->fstamp = htonl(if_fstamp); + vp->vallen = htonl(vallen); + ptr = emalloc(vallen); vp->ptr = ptr; i2d_DSA_SIG(sdsa, &ptr); DSA_SIG_free(sdsa); @@ -2277,11 +2310,12 @@ crypto_bob( if (tstamp < cinfo->first || tstamp > cinfo->last) return (XEVNT_PER); + /* XXX: more validation to make sure the sign fits... */ vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) vp->siglen = htonl(len); return (XEVNT_OK); } Modified: stable/9/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- stable/9/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/9/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:44 2015 (r281231) @@ -459,7 +459,7 @@ receive( while (has_mac > 0) { int temp; - if (has_mac % 4 != 0 || has_mac < 0) { + if (has_mac % 4 != 0 || has_mac < MIN_MAC_LEN) { sys_badlength++; return; /* bad MAC length */ } @@ -483,6 +483,13 @@ receive( return; /* bad MAC length */ } } + /* + * If has_mac is < 0 we had a malformed packet. + */ + if (has_mac < 0) { + sys_badlength++; + return; /* bad length */ + } #ifdef OPENSSL pkeyid = tkeyid = 0; #endif /* OPENSSL */ @@ -942,12 +949,9 @@ receive( } /* - * Update the origin and destination timestamps. If - * unsynchronized or bogus abandon ship. If the crypto machine + * If unsynchronized or bogus abandon ship. If the crypto machine * breaks, light the crypto bit and plaint the log. */ - peer->org = p_xmt; - peer->rec = rbufp->recv_time; if (peer->flash & PKT_TEST_MASK) { #ifdef OPENSSL if (crypto_flags && (peer->flags & FLAG_SKEY)) { @@ -978,10 +982,11 @@ receive( * versions. If symmetric modes, return a crypto-NAK. The peer * should restart the protocol. */ - } else if (!AUTH(peer->keyid || (restrict_mask & RES_DONTTRUST), - is_authentic)) { + } else if (!AUTH(peer->keyid || has_mac || + (restrict_mask & RES_DONTTRUST), is_authentic)) { peer->flash |= TEST5; - if (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE) + if (has_mac && + (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE)) fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask); return; /* bad auth */ } @@ -989,7 +994,12 @@ receive( /* * That was hard and I am sweaty, but the packet is squeaky * clean. Get on with real work. + * + * Update the origin and destination timestamps. */ + peer->org = p_xmt; + peer->rec = rbufp->recv_time; + peer->received++; peer->timereceived = current_time; if (is_authentic == AUTH_OK) Modified: stable/9/sys/netinet/igmp.c ============================================================================== --- stable/9/sys/netinet/igmp.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/9/sys/netinet/igmp.c Tue Apr 7 20:20:44 2015 (r281231) @@ -1534,7 +1534,6 @@ igmp_input(struct mbuf *m, int off) struct igmpv3 *igmpv3; uint16_t igmpv3len; uint16_t nsrc; - int srclen; IGMPSTAT_INC(igps_rcv_v3_queries); igmpv3 = (struct igmpv3 *)igmp; @@ -1542,8 +1541,8 @@ igmp_input(struct mbuf *m, int off) * 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; } @@ -1552,7 +1551,7 @@ igmp_input(struct mbuf *m, int off) * this scope. */ igmpv3len = iphlen + IGMP_V3_QUERY_MINLEN + - srclen; + sizeof(struct in_addr) * nsrc; if ((m->m_flags & M_EXT || m->m_len < igmpv3len) && (m = m_pullup(m, igmpv3len)) == NULL) { Modified: stable/9/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/9/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/9/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:44 2015 (r281231) @@ -296,8 +296,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-all@FreeBSD.ORG Tue Apr 7 20:20:48 2015 Return-Path: Delivered-To: svn-src-all@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 94A21407; Tue, 7 Apr 2015 20:20: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 7CE77E04; Tue, 7 Apr 2015 20:20: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 t37KKmk1032144; Tue, 7 Apr 2015 20:20:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37KKl5Q032136; Tue, 7 Apr 2015 20:20:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504072020.t37KKl5Q032136@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:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r281231 - in stable: 8/contrib/ntp/ntpd 8/sys/netinet 8/sys/netinet6 9/contrib/ntp/ntpd 9/sys/netinet 9/sys/netinet6 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 20:20:48 -0000 Author: delphij Date: Tue Apr 7 20:20:44 2015 New Revision: 281231 URL: https://svnweb.freebsd.org/changeset/base/281231 Log: Improve patch for SA-15:04.igmp to solve a potential buffer overflow. Fix multiple vulnerabilities of ntp. [SA-15:07] Fix Denial of Service with IPv6 Router Advertisements. [SA-15:09] Modified: stable/8/contrib/ntp/ntpd/ntp_crypto.c stable/8/contrib/ntp/ntpd/ntp_proto.c stable/8/sys/netinet/igmp.c stable/8/sys/netinet6/nd6_rtr.c Changes in other areas also in this revision: Modified: stable/9/contrib/ntp/ntpd/ntp_crypto.c stable/9/contrib/ntp/ntpd/ntp_proto.c stable/9/sys/netinet/igmp.c stable/9/sys/netinet6/nd6_rtr.c Modified: stable/8/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- stable/8/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/8/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:44 2015 (r281231) @@ -93,6 +93,7 @@ #define TAI_1972 10 /* initial TAI offset (s) */ #define MAX_LEAP 100 /* max UTC leapseconds (s) */ #define VALUE_LEN (6 * 4) /* min response field length */ +#define MAX_VALLEN (65535 - VALUE_LEN) #define YEAR (60 * 60 * 24 * 365) /* seconds in year */ /* @@ -137,8 +138,8 @@ static u_int ident_scheme = 0; /* server */ static int crypto_verify P((struct exten *, struct value *, struct peer *)); -static int crypto_encrypt P((struct exten *, struct value *, - keyid_t *)); +static int crypto_encrypt P((const u_char *, u_int, keyid_t *, + struct value *)); static int crypto_alice P((struct peer *, struct value *)); static int crypto_alice2 P((struct peer *, struct value *)); static int crypto_alice3 P((struct peer *, struct value *)); @@ -446,6 +447,12 @@ crypto_recv( tstamp = ntohl(ep->tstamp); fstamp = ntohl(ep->fstamp); vallen = ntohl(ep->vallen); + /* + * Bug 2761: I hope this isn't too early... + */ + if ( vallen == 0 + || len - VALUE_LEN < vallen) + return XEVNT_LEN; } switch (code) { @@ -488,7 +495,7 @@ crypto_recv( break; if (vallen == 0 || vallen > MAXHOSTNAME || - len < VALUE_LEN + vallen) { + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; } @@ -1250,7 +1257,8 @@ crypto_xmit( vallen = ntohl(ep->vallen); if (vallen == 8) { strcpy(certname, sys_hostname); - } else if (vallen == 0 || vallen > MAXHOSTNAME) { + } else if (vallen == 0 || vallen > MAXHOSTNAME || + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; @@ -1407,7 +1415,10 @@ crypto_xmit( * anything goes wrong. */ case CRYPTO_COOK | CRYPTO_RESP: - if ((opcode & 0xffff) < VALUE_LEN) { + vallen = ntohl(ep->vallen); /* Must be <64k */ + if ( vallen == 0 + || (vallen >= MAX_VALLEN) + || (opcode & 0x0000ffff) < VALUE_LEN + vallen) { rval = XEVNT_LEN; break; } @@ -1420,10 +1431,11 @@ crypto_xmit( } tcookie = peer->pcookie; } - if ((rval = crypto_encrypt(ep, &vtemp, &tcookie)) == - XEVNT_OK) + if ((rval = crypto_encrypt((const u_char *)ep->pkt, vallen, &tcookie, &vtemp)) + == XEVNT_OK) { len += crypto_send(fp, &vtemp); - value_free(&vtemp); + value_free(&vtemp); + } break; /* @@ -1558,10 +1570,15 @@ crypto_verify( * are rounded up to the next word. */ vallen = ntohl(ep->vallen); + if ( vallen == 0 + || vallen > MAX_VALLEN) + return (XEVNT_LEN); i = (vallen + 3) / 4; siglen = ntohl(ep->pkt[i++]); - if (len < VALUE_LEN + ((vallen + 3) / 4) * 4 + ((siglen + 3) / - 4) * 4) + if ( siglen > MAX_VALLEN + || len - VALUE_LEN < ((vallen + 3) / 4) * 4 + || len - VALUE_LEN - ((vallen + 3) / 4) * 4 + < ((siglen + 3) / 4) * 4) return (XEVNT_LEN); /* @@ -1627,6 +1644,7 @@ crypto_verify( * avoid doing the sign exchange. */ EVP_VerifyInit(&ctx, peer->digest); + /* XXX: the "+ 12" needs to be at least documented... */ EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen + 12); if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen, pkey) <= 0) return (XEVNT_SIG); @@ -1641,10 +1659,10 @@ crypto_verify( /* - * crypto_encrypt - construct encrypted cookie and signature from - * extension field and cookie + * crypto_encrypt - construct vp (encrypted cookie and signature) from + * the public key and cookie. * - * Returns + * Returns: * XEVNT_OK success * XEVNT_PUB bad or missing public key * XEVNT_CKY bad or missing cookie @@ -1652,24 +1670,21 @@ crypto_verify( */ static int crypto_encrypt( - struct exten *ep, /* extension pointer */ - struct value *vp, /* value pointer */ - keyid_t *cookie /* server cookie */ + const u_char *ptr, /* Public Key */ + u_int vallen, /* Length of Public Key */ + keyid_t *cookie, /* server cookie */ + struct value *vp /* value pointer */ ) { EVP_PKEY *pkey; /* public key */ EVP_MD_CTX ctx; /* signature context */ tstamp_t tstamp; /* NTP timestamp */ u_int32 temp32; - u_int len; - u_char *ptr; /* * Extract the public key from the request. */ - len = ntohl(ep->vallen); - ptr = (u_char *)ep->pkt; - pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, len); + pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, vallen); if (pkey == NULL) { msyslog(LOG_ERR, "crypto_encrypt %s\n", ERR_error_string(ERR_get_error(), NULL)); @@ -1683,9 +1698,9 @@ crypto_encrypt( memset(vp, 0, sizeof(struct value)); vp->tstamp = htonl(tstamp); vp->fstamp = hostval.tstamp; - len = EVP_PKEY_size(pkey); - vp->vallen = htonl(len); - vp->ptr = emalloc(len); + vallen = EVP_PKEY_size(pkey); + vp->vallen = htonl(vallen); + vp->ptr = emalloc(vallen); temp32 = htonl(*cookie); if (!RSA_public_encrypt(4, (u_char *)&temp32, vp->ptr, pkey->pkey.rsa, RSA_PKCS1_OAEP_PADDING)) { @@ -1705,9 +1720,9 @@ crypto_encrypt( vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) - vp->siglen = htonl(len); + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) + vp->siglen = htonl(sign_siglen); return (XEVNT_OK); } @@ -1794,6 +1809,9 @@ crypto_ident( * call in the protocol module. * * Returns extension field pointer (no errors). + * + * XXX: opcode and len should really be 32-bit quantities and + * we should make sure that str is not too big. */ struct exten * crypto_args( @@ -1805,11 +1823,14 @@ crypto_args( tstamp_t tstamp; /* NTP timestamp */ struct exten *ep; /* extension field pointer */ u_int len; /* extension field length */ + size_t slen; tstamp = crypto_time(); len = sizeof(struct exten); - if (str != NULL) - len += strlen(str); + if (str != NULL) { + slen = strlen(str); + len += slen; + } ep = emalloc(len); memset(ep, 0, len); if (opcode == 0) @@ -1829,8 +1850,8 @@ crypto_args( ep->fstamp = hostval.tstamp; ep->vallen = 0; if (str != NULL) { - ep->vallen = htonl(strlen(str)); - memcpy((char *)ep->pkt, str, strlen(str)); + ep->vallen = htonl(slen); + memcpy((char *)ep->pkt, str, slen); } else { ep->pkt[0] = peer->associd; } @@ -1844,6 +1865,8 @@ crypto_args( * Returns extension field length. Note: it is not polite to send a * nonempty signature with zero timestamp or a nonzero timestamp with * empty signature, but these rules are not enforced here. + * + * XXX This code won't work on a box with 16-bit ints. */ u_int crypto_send( @@ -2212,7 +2235,8 @@ crypto_bob( tstamp_t tstamp; /* NTP timestamp */ BIGNUM *bn, *bk, *r; u_char *ptr; - u_int len; + u_int len; /* extension field length */ + u_int vallen = 0; /* value length */ /* * If the IFF parameters are not valid, something awful @@ -2227,8 +2251,11 @@ crypto_bob( /* * Extract r from the challenge. */ - len = ntohl(ep->vallen); - if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) { + vallen = ntohl(ep->vallen); + len = ntohl(ep->opcode) & 0x0000ffff; + if (vallen == 0 || len < VALUE_LEN || len - VALUE_LEN < vallen) + return XEVNT_LEN; + if ((r = BN_bin2bn((u_char *)ep->pkt, vallen, NULL)) == NULL) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); return (XEVNT_ERR); @@ -2240,7 +2267,7 @@ crypto_bob( */ bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new(); sdsa = DSA_SIG_new(); - BN_rand(bk, len * 8, -1, 1); /* k */ + BN_rand(bk, vallen * 8, -1, 1); /* k */ BN_mod_mul(bn, dsa->priv_key, r, dsa->q, bctx); /* b r mod q */ BN_add(bn, bn, bk); BN_mod(bn, bn, dsa->q, bctx); /* k + b r mod q */ @@ -2254,19 +2281,25 @@ crypto_bob( /* * Encode the values in ASN.1 and sign. */ - tstamp = crypto_time(); - memset(vp, 0, sizeof(struct value)); - vp->tstamp = htonl(tstamp); - vp->fstamp = htonl(if_fstamp); - len = i2d_DSA_SIG(sdsa, NULL); - if (len <= 0) { + vallen = i2d_DSA_SIG(sdsa, NULL); + if (vallen == 0) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); DSA_SIG_free(sdsa); return (XEVNT_ERR); } - vp->vallen = htonl(len); - ptr = emalloc(len); + if (vallen > MAX_VALLEN) { + msyslog(LOG_ERR, "crypto_bob: signature is too big: %d", + vallen); + DSA_SIG_free(sdsa); + return (XEVNT_LEN); + } + memset(vp, 0, sizeof(struct value)); + tstamp = crypto_time(); + vp->tstamp = htonl(tstamp); + vp->fstamp = htonl(if_fstamp); + vp->vallen = htonl(vallen); + ptr = emalloc(vallen); vp->ptr = ptr; i2d_DSA_SIG(sdsa, &ptr); DSA_SIG_free(sdsa); @@ -2277,11 +2310,12 @@ crypto_bob( if (tstamp < cinfo->first || tstamp > cinfo->last) return (XEVNT_PER); + /* XXX: more validation to make sure the sign fits... */ vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) vp->siglen = htonl(len); return (XEVNT_OK); } Modified: stable/8/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- stable/8/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/8/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:44 2015 (r281231) @@ -459,7 +459,7 @@ receive( while (has_mac > 0) { int temp; - if (has_mac % 4 != 0 || has_mac < 0) { + if (has_mac % 4 != 0 || has_mac < MIN_MAC_LEN) { sys_badlength++; return; /* bad MAC length */ } @@ -483,6 +483,13 @@ receive( return; /* bad MAC length */ } } + /* + * If has_mac is < 0 we had a malformed packet. + */ + if (has_mac < 0) { + sys_badlength++; + return; /* bad length */ + } #ifdef OPENSSL pkeyid = tkeyid = 0; #endif /* OPENSSL */ @@ -942,12 +949,9 @@ receive( } /* - * Update the origin and destination timestamps. If - * unsynchronized or bogus abandon ship. If the crypto machine + * If unsynchronized or bogus abandon ship. If the crypto machine * breaks, light the crypto bit and plaint the log. */ - peer->org = p_xmt; - peer->rec = rbufp->recv_time; if (peer->flash & PKT_TEST_MASK) { #ifdef OPENSSL if (crypto_flags && (peer->flags & FLAG_SKEY)) { @@ -978,10 +982,11 @@ receive( * versions. If symmetric modes, return a crypto-NAK. The peer * should restart the protocol. */ - } else if (!AUTH(peer->keyid || (restrict_mask & RES_DONTTRUST), - is_authentic)) { + } else if (!AUTH(peer->keyid || has_mac || + (restrict_mask & RES_DONTTRUST), is_authentic)) { peer->flash |= TEST5; - if (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE) + if (has_mac && + (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE)) fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask); return; /* bad auth */ } @@ -989,7 +994,12 @@ receive( /* * That was hard and I am sweaty, but the packet is squeaky * clean. Get on with real work. + * + * Update the origin and destination timestamps. */ + peer->org = p_xmt; + peer->rec = rbufp->recv_time; + peer->received++; peer->timereceived = current_time; if (is_authentic == AUTH_OK) Modified: stable/8/sys/netinet/igmp.c ============================================================================== --- stable/8/sys/netinet/igmp.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/8/sys/netinet/igmp.c Tue Apr 7 20:20:44 2015 (r281231) @@ -1533,7 +1533,6 @@ igmp_input(struct mbuf *m, int off) struct igmpv3 *igmpv3; uint16_t igmpv3len; uint16_t nsrc; - int srclen; IGMPSTAT_INC(igps_rcv_v3_queries); igmpv3 = (struct igmpv3 *)igmp; @@ -1541,8 +1540,8 @@ igmp_input(struct mbuf *m, int off) * 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; } @@ -1551,7 +1550,7 @@ igmp_input(struct mbuf *m, int off) * this scope. */ igmpv3len = iphlen + IGMP_V3_QUERY_MINLEN + - srclen; + sizeof(struct in_addr) * nsrc; if ((m->m_flags & M_EXT || m->m_len < igmpv3len) && (m = m_pullup(m, igmpv3len)) == NULL) { Modified: stable/8/sys/netinet6/nd6_rtr.c ============================================================================== --- stable/8/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:24 2015 (r281230) +++ stable/8/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:44 2015 (r281231) @@ -286,8 +286,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-all@FreeBSD.ORG Tue Apr 7 20:21:04 2015 Return-Path: Delivered-To: svn-src-all@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 E8249660; Tue, 7 Apr 2015 20:21: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 D1355E0C; Tue, 7 Apr 2015 20:21: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 t37KL49G032259; Tue, 7 Apr 2015 20:21:04 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37KL2k7032241; Tue, 7 Apr 2015 20:21:02 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504072021.t37KL2k7032241@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:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r281232 - in releng/10.1: . contrib/ntp/ntpd sys/conf sys/netinet sys/netinet6 usr.sbin/bsdinstall/scripts X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 20:21:05 -0000 Author: delphij Date: Tue Apr 7 20:21:01 2015 New Revision: 281232 URL: https://svnweb.freebsd.org/changeset/base/281232 Log: Improve patch for SA-15:04.igmp to solve a potential buffer overflow. Fix multiple vulnerabilities of ntp. [SA-15:07] Fix bsdinstall(8) insecure default GELI keyfile permissions. [SA-15:08] Fix Denial of Service with IPv6 Router Advertisements. [SA-15:09] Approved by: so Modified: releng/10.1/UPDATING releng/10.1/contrib/ntp/ntpd/ntp_crypto.c releng/10.1/contrib/ntp/ntpd/ntp_proto.c releng/10.1/sys/conf/newvers.sh releng/10.1/sys/netinet/igmp.c releng/10.1/sys/netinet6/nd6_rtr.c releng/10.1/usr.sbin/bsdinstall/scripts/zfsboot Modified: releng/10.1/UPDATING ============================================================================== --- releng/10.1/UPDATING Tue Apr 7 20:20:44 2015 (r281231) +++ releng/10.1/UPDATING Tue Apr 7 20:21:01 2015 (r281232) @@ -16,6 +16,19 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20150407: p9 FreeBSD-SA-15:04.igmp [revised] + FreeBSD-SA-15:07.ntp + FreeBSD-SA-15:08.bsdinstall + FreeBSD-SA-15:09.ipv6 + + Improved patch for SA-15:04.igmp. + + Fix multiple vulnerabilities of ntp. [SA-15:07] + + Fix bsdinstall(8) insecure default GELI keyfile permissions. [SA-15:08] + + Fix Denial of Service with IPv6 Router Advertisements. [SA-15:09] + 20150320: p8 Fix patch for SA-15:06.openssl. Modified: releng/10.1/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- releng/10.1/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:20:44 2015 (r281231) +++ releng/10.1/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:21:01 2015 (r281232) @@ -93,6 +93,7 @@ #define TAI_1972 10 /* initial TAI offset (s) */ #define MAX_LEAP 100 /* max UTC leapseconds (s) */ #define VALUE_LEN (6 * 4) /* min response field length */ +#define MAX_VALLEN (65535 - VALUE_LEN) #define YEAR (60 * 60 * 24 * 365) /* seconds in year */ /* @@ -137,8 +138,8 @@ static u_int ident_scheme = 0; /* server */ static int crypto_verify P((struct exten *, struct value *, struct peer *)); -static int crypto_encrypt P((struct exten *, struct value *, - keyid_t *)); +static int crypto_encrypt P((const u_char *, u_int, keyid_t *, + struct value *)); static int crypto_alice P((struct peer *, struct value *)); static int crypto_alice2 P((struct peer *, struct value *)); static int crypto_alice3 P((struct peer *, struct value *)); @@ -446,6 +447,12 @@ crypto_recv( tstamp = ntohl(ep->tstamp); fstamp = ntohl(ep->fstamp); vallen = ntohl(ep->vallen); + /* + * Bug 2761: I hope this isn't too early... + */ + if ( vallen == 0 + || len - VALUE_LEN < vallen) + return XEVNT_LEN; } switch (code) { @@ -488,7 +495,7 @@ crypto_recv( break; if (vallen == 0 || vallen > MAXHOSTNAME || - len < VALUE_LEN + vallen) { + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; } @@ -1250,7 +1257,8 @@ crypto_xmit( vallen = ntohl(ep->vallen); if (vallen == 8) { strcpy(certname, sys_hostname); - } else if (vallen == 0 || vallen > MAXHOSTNAME) { + } else if (vallen == 0 || vallen > MAXHOSTNAME || + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; @@ -1407,7 +1415,10 @@ crypto_xmit( * anything goes wrong. */ case CRYPTO_COOK | CRYPTO_RESP: - if ((opcode & 0xffff) < VALUE_LEN) { + vallen = ntohl(ep->vallen); /* Must be <64k */ + if ( vallen == 0 + || (vallen >= MAX_VALLEN) + || (opcode & 0x0000ffff) < VALUE_LEN + vallen) { rval = XEVNT_LEN; break; } @@ -1420,10 +1431,11 @@ crypto_xmit( } tcookie = peer->pcookie; } - if ((rval = crypto_encrypt(ep, &vtemp, &tcookie)) == - XEVNT_OK) + if ((rval = crypto_encrypt((const u_char *)ep->pkt, vallen, &tcookie, &vtemp)) + == XEVNT_OK) { len += crypto_send(fp, &vtemp); - value_free(&vtemp); + value_free(&vtemp); + } break; /* @@ -1558,10 +1570,15 @@ crypto_verify( * are rounded up to the next word. */ vallen = ntohl(ep->vallen); + if ( vallen == 0 + || vallen > MAX_VALLEN) + return (XEVNT_LEN); i = (vallen + 3) / 4; siglen = ntohl(ep->pkt[i++]); - if (len < VALUE_LEN + ((vallen + 3) / 4) * 4 + ((siglen + 3) / - 4) * 4) + if ( siglen > MAX_VALLEN + || len - VALUE_LEN < ((vallen + 3) / 4) * 4 + || len - VALUE_LEN - ((vallen + 3) / 4) * 4 + < ((siglen + 3) / 4) * 4) return (XEVNT_LEN); /* @@ -1627,6 +1644,7 @@ crypto_verify( * avoid doing the sign exchange. */ EVP_VerifyInit(&ctx, peer->digest); + /* XXX: the "+ 12" needs to be at least documented... */ EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen + 12); if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen, pkey) <= 0) return (XEVNT_SIG); @@ -1641,10 +1659,10 @@ crypto_verify( /* - * crypto_encrypt - construct encrypted cookie and signature from - * extension field and cookie + * crypto_encrypt - construct vp (encrypted cookie and signature) from + * the public key and cookie. * - * Returns + * Returns: * XEVNT_OK success * XEVNT_PUB bad or missing public key * XEVNT_CKY bad or missing cookie @@ -1652,24 +1670,21 @@ crypto_verify( */ static int crypto_encrypt( - struct exten *ep, /* extension pointer */ - struct value *vp, /* value pointer */ - keyid_t *cookie /* server cookie */ + const u_char *ptr, /* Public Key */ + u_int vallen, /* Length of Public Key */ + keyid_t *cookie, /* server cookie */ + struct value *vp /* value pointer */ ) { EVP_PKEY *pkey; /* public key */ EVP_MD_CTX ctx; /* signature context */ tstamp_t tstamp; /* NTP timestamp */ u_int32 temp32; - u_int len; - u_char *ptr; /* * Extract the public key from the request. */ - len = ntohl(ep->vallen); - ptr = (u_char *)ep->pkt; - pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, len); + pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, vallen); if (pkey == NULL) { msyslog(LOG_ERR, "crypto_encrypt %s\n", ERR_error_string(ERR_get_error(), NULL)); @@ -1683,9 +1698,9 @@ crypto_encrypt( memset(vp, 0, sizeof(struct value)); vp->tstamp = htonl(tstamp); vp->fstamp = hostval.tstamp; - len = EVP_PKEY_size(pkey); - vp->vallen = htonl(len); - vp->ptr = emalloc(len); + vallen = EVP_PKEY_size(pkey); + vp->vallen = htonl(vallen); + vp->ptr = emalloc(vallen); temp32 = htonl(*cookie); if (!RSA_public_encrypt(4, (u_char *)&temp32, vp->ptr, pkey->pkey.rsa, RSA_PKCS1_OAEP_PADDING)) { @@ -1705,9 +1720,9 @@ crypto_encrypt( vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) - vp->siglen = htonl(len); + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) + vp->siglen = htonl(sign_siglen); return (XEVNT_OK); } @@ -1794,6 +1809,9 @@ crypto_ident( * call in the protocol module. * * Returns extension field pointer (no errors). + * + * XXX: opcode and len should really be 32-bit quantities and + * we should make sure that str is not too big. */ struct exten * crypto_args( @@ -1805,11 +1823,14 @@ crypto_args( tstamp_t tstamp; /* NTP timestamp */ struct exten *ep; /* extension field pointer */ u_int len; /* extension field length */ + size_t slen; tstamp = crypto_time(); len = sizeof(struct exten); - if (str != NULL) - len += strlen(str); + if (str != NULL) { + slen = strlen(str); + len += slen; + } ep = emalloc(len); memset(ep, 0, len); if (opcode == 0) @@ -1829,8 +1850,8 @@ crypto_args( ep->fstamp = hostval.tstamp; ep->vallen = 0; if (str != NULL) { - ep->vallen = htonl(strlen(str)); - memcpy((char *)ep->pkt, str, strlen(str)); + ep->vallen = htonl(slen); + memcpy((char *)ep->pkt, str, slen); } else { ep->pkt[0] = peer->associd; } @@ -1844,6 +1865,8 @@ crypto_args( * Returns extension field length. Note: it is not polite to send a * nonempty signature with zero timestamp or a nonzero timestamp with * empty signature, but these rules are not enforced here. + * + * XXX This code won't work on a box with 16-bit ints. */ u_int crypto_send( @@ -2212,7 +2235,8 @@ crypto_bob( tstamp_t tstamp; /* NTP timestamp */ BIGNUM *bn, *bk, *r; u_char *ptr; - u_int len; + u_int len; /* extension field length */ + u_int vallen = 0; /* value length */ /* * If the IFF parameters are not valid, something awful @@ -2227,8 +2251,11 @@ crypto_bob( /* * Extract r from the challenge. */ - len = ntohl(ep->vallen); - if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) { + vallen = ntohl(ep->vallen); + len = ntohl(ep->opcode) & 0x0000ffff; + if (vallen == 0 || len < VALUE_LEN || len - VALUE_LEN < vallen) + return XEVNT_LEN; + if ((r = BN_bin2bn((u_char *)ep->pkt, vallen, NULL)) == NULL) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); return (XEVNT_ERR); @@ -2240,7 +2267,7 @@ crypto_bob( */ bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new(); sdsa = DSA_SIG_new(); - BN_rand(bk, len * 8, -1, 1); /* k */ + BN_rand(bk, vallen * 8, -1, 1); /* k */ BN_mod_mul(bn, dsa->priv_key, r, dsa->q, bctx); /* b r mod q */ BN_add(bn, bn, bk); BN_mod(bn, bn, dsa->q, bctx); /* k + b r mod q */ @@ -2254,19 +2281,25 @@ crypto_bob( /* * Encode the values in ASN.1 and sign. */ - tstamp = crypto_time(); - memset(vp, 0, sizeof(struct value)); - vp->tstamp = htonl(tstamp); - vp->fstamp = htonl(if_fstamp); - len = i2d_DSA_SIG(sdsa, NULL); - if (len <= 0) { + vallen = i2d_DSA_SIG(sdsa, NULL); + if (vallen == 0) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); DSA_SIG_free(sdsa); return (XEVNT_ERR); } - vp->vallen = htonl(len); - ptr = emalloc(len); + if (vallen > MAX_VALLEN) { + msyslog(LOG_ERR, "crypto_bob: signature is too big: %d", + vallen); + DSA_SIG_free(sdsa); + return (XEVNT_LEN); + } + memset(vp, 0, sizeof(struct value)); + tstamp = crypto_time(); + vp->tstamp = htonl(tstamp); + vp->fstamp = htonl(if_fstamp); + vp->vallen = htonl(vallen); + ptr = emalloc(vallen); vp->ptr = ptr; i2d_DSA_SIG(sdsa, &ptr); DSA_SIG_free(sdsa); @@ -2277,11 +2310,12 @@ crypto_bob( if (tstamp < cinfo->first || tstamp > cinfo->last) return (XEVNT_PER); + /* XXX: more validation to make sure the sign fits... */ vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) vp->siglen = htonl(len); return (XEVNT_OK); } Modified: releng/10.1/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- releng/10.1/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:20:44 2015 (r281231) +++ releng/10.1/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:21:01 2015 (r281232) @@ -459,7 +459,7 @@ receive( while (has_mac > 0) { int temp; - if (has_mac % 4 != 0 || has_mac < 0) { + if (has_mac % 4 != 0 || has_mac < MIN_MAC_LEN) { sys_badlength++; return; /* bad MAC length */ } @@ -483,6 +483,13 @@ receive( return; /* bad MAC length */ } } + /* + * If has_mac is < 0 we had a malformed packet. + */ + if (has_mac < 0) { + sys_badlength++; + return; /* bad length */ + } #ifdef OPENSSL pkeyid = tkeyid = 0; #endif /* OPENSSL */ @@ -942,12 +949,9 @@ receive( } /* - * Update the origin and destination timestamps. If - * unsynchronized or bogus abandon ship. If the crypto machine + * If unsynchronized or bogus abandon ship. If the crypto machine * breaks, light the crypto bit and plaint the log. */ - peer->org = p_xmt; - peer->rec = rbufp->recv_time; if (peer->flash & PKT_TEST_MASK) { #ifdef OPENSSL if (crypto_flags && (peer->flags & FLAG_SKEY)) { @@ -978,10 +982,11 @@ receive( * versions. If symmetric modes, return a crypto-NAK. The peer * should restart the protocol. */ - } else if (!AUTH(peer->keyid || (restrict_mask & RES_DONTTRUST), - is_authentic)) { + } else if (!AUTH(peer->keyid || has_mac || + (restrict_mask & RES_DONTTRUST), is_authentic)) { peer->flash |= TEST5; - if (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE) + if (has_mac && + (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE)) fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask); return; /* bad auth */ } @@ -989,7 +994,12 @@ receive( /* * That was hard and I am sweaty, but the packet is squeaky * clean. Get on with real work. + * + * Update the origin and destination timestamps. */ + peer->org = p_xmt; + peer->rec = rbufp->recv_time; + peer->received++; peer->timereceived = current_time; if (is_authentic == AUTH_OK) Modified: releng/10.1/sys/conf/newvers.sh ============================================================================== --- releng/10.1/sys/conf/newvers.sh Tue Apr 7 20:20:44 2015 (r281231) +++ releng/10.1/sys/conf/newvers.sh Tue Apr 7 20:21:01 2015 (r281232) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="RELEASE-p8" +BRANCH="RELEASE-p9" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.1/sys/netinet/igmp.c ============================================================================== --- releng/10.1/sys/netinet/igmp.c Tue Apr 7 20:20:44 2015 (r281231) +++ releng/10.1/sys/netinet/igmp.c Tue Apr 7 20:21:01 2015 (r281232) @@ -1534,7 +1534,6 @@ igmp_input(struct mbuf *m, int off) struct igmpv3 *igmpv3; uint16_t igmpv3len; uint16_t nsrc; - int srclen; IGMPSTAT_INC(igps_rcv_v3_queries); igmpv3 = (struct igmpv3 *)igmp; @@ -1542,8 +1541,8 @@ igmp_input(struct mbuf *m, int off) * 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; } @@ -1552,7 +1551,7 @@ igmp_input(struct mbuf *m, int off) * this scope. */ igmpv3len = iphlen + IGMP_V3_QUERY_MINLEN + - srclen; + sizeof(struct in_addr) * nsrc; if ((m->m_flags & M_EXT || m->m_len < igmpv3len) && (m = m_pullup(m, igmpv3len)) == NULL) { Modified: releng/10.1/sys/netinet6/nd6_rtr.c ============================================================================== --- releng/10.1/sys/netinet6/nd6_rtr.c Tue Apr 7 20:20:44 2015 (r281231) +++ releng/10.1/sys/netinet6/nd6_rtr.c Tue Apr 7 20:21:01 2015 (r281232) @@ -296,8 +296,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); } Modified: releng/10.1/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- releng/10.1/usr.sbin/bsdinstall/scripts/zfsboot Tue Apr 7 20:20:44 2015 (r281231) +++ releng/10.1/usr.sbin/bsdinstall/scripts/zfsboot Tue Apr 7 20:21:01 2015 (r281232) @@ -1137,6 +1137,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 "$CHMOD_MODE" \ + go-wrx "$bootpool/$zroot_key" || + return $FAILURE else # Clean up f_eval_catch $funcname zfs "$ZFS_UNMOUNT" \ From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 20:21:28 2015 Return-Path: Delivered-To: svn-src-all@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 BB6257C4; Tue, 7 Apr 2015 20:21: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 A3D04EB0; Tue, 7 Apr 2015 20: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 t37KLSMS032364; Tue, 7 Apr 2015 20:21:28 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37KLOVi032345; Tue, 7 Apr 2015 20:21:24 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504072021.t37KLOVi032345@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:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r281233 - in releng: 8.4 8.4/contrib/ntp/ntpd 8.4/sys/conf 8.4/sys/netinet 8.4/sys/netinet6 9.3 9.3/contrib/ntp/ntpd 9.3/sys/conf 9.3/sys/netinet 9.3/sys/netinet6 X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 20:21:28 -0000 Author: delphij Date: Tue Apr 7 20:21:23 2015 New Revision: 281233 URL: https://svnweb.freebsd.org/changeset/base/281233 Log: Improve patch for SA-15:04.igmp to solve a potential buffer overflow. Fix multiple vulnerabilities of ntp. [SA-15:07] Fix Denial of Service with IPv6 Router Advertisements. [SA-15:09] Approved by: so Modified: releng/8.4/UPDATING releng/8.4/contrib/ntp/ntpd/ntp_crypto.c releng/8.4/contrib/ntp/ntpd/ntp_proto.c releng/8.4/sys/conf/newvers.sh releng/8.4/sys/netinet/igmp.c releng/8.4/sys/netinet6/nd6_rtr.c releng/9.3/UPDATING releng/9.3/contrib/ntp/ntpd/ntp_crypto.c releng/9.3/contrib/ntp/ntpd/ntp_proto.c releng/9.3/sys/conf/newvers.sh releng/9.3/sys/netinet/igmp.c releng/9.3/sys/netinet6/nd6_rtr.c Modified: releng/8.4/UPDATING ============================================================================== --- releng/8.4/UPDATING Tue Apr 7 20:21:01 2015 (r281232) +++ releng/8.4/UPDATING Tue Apr 7 20:21:23 2015 (r281233) @@ -15,6 +15,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20150407: p27 FreeBSD-SA-15:04.igmp [revised] + FreeBSD-SA-15:07.ntp + FreeBSD-SA-15:09.ipv6 + + Improved patch for SA-15:04.igmp. + + Fix multiple vulnerabilities of ntp. [SA-15:07] + + Fix Denial of Service with IPv6 Router Advertisements. [SA-15:09] + 20150320: p26 Fix patch for SA-15:06.openssl. Modified: releng/8.4/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- releng/8.4/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:21:01 2015 (r281232) +++ releng/8.4/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:21:23 2015 (r281233) @@ -93,6 +93,7 @@ #define TAI_1972 10 /* initial TAI offset (s) */ #define MAX_LEAP 100 /* max UTC leapseconds (s) */ #define VALUE_LEN (6 * 4) /* min response field length */ +#define MAX_VALLEN (65535 - VALUE_LEN) #define YEAR (60 * 60 * 24 * 365) /* seconds in year */ /* @@ -137,8 +138,8 @@ static u_int ident_scheme = 0; /* server */ static int crypto_verify P((struct exten *, struct value *, struct peer *)); -static int crypto_encrypt P((struct exten *, struct value *, - keyid_t *)); +static int crypto_encrypt P((const u_char *, u_int, keyid_t *, + struct value *)); static int crypto_alice P((struct peer *, struct value *)); static int crypto_alice2 P((struct peer *, struct value *)); static int crypto_alice3 P((struct peer *, struct value *)); @@ -446,6 +447,12 @@ crypto_recv( tstamp = ntohl(ep->tstamp); fstamp = ntohl(ep->fstamp); vallen = ntohl(ep->vallen); + /* + * Bug 2761: I hope this isn't too early... + */ + if ( vallen == 0 + || len - VALUE_LEN < vallen) + return XEVNT_LEN; } switch (code) { @@ -488,7 +495,7 @@ crypto_recv( break; if (vallen == 0 || vallen > MAXHOSTNAME || - len < VALUE_LEN + vallen) { + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; } @@ -1250,7 +1257,8 @@ crypto_xmit( vallen = ntohl(ep->vallen); if (vallen == 8) { strcpy(certname, sys_hostname); - } else if (vallen == 0 || vallen > MAXHOSTNAME) { + } else if (vallen == 0 || vallen > MAXHOSTNAME || + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; @@ -1407,7 +1415,10 @@ crypto_xmit( * anything goes wrong. */ case CRYPTO_COOK | CRYPTO_RESP: - if ((opcode & 0xffff) < VALUE_LEN) { + vallen = ntohl(ep->vallen); /* Must be <64k */ + if ( vallen == 0 + || (vallen >= MAX_VALLEN) + || (opcode & 0x0000ffff) < VALUE_LEN + vallen) { rval = XEVNT_LEN; break; } @@ -1420,10 +1431,11 @@ crypto_xmit( } tcookie = peer->pcookie; } - if ((rval = crypto_encrypt(ep, &vtemp, &tcookie)) == - XEVNT_OK) + if ((rval = crypto_encrypt((const u_char *)ep->pkt, vallen, &tcookie, &vtemp)) + == XEVNT_OK) { len += crypto_send(fp, &vtemp); - value_free(&vtemp); + value_free(&vtemp); + } break; /* @@ -1558,10 +1570,15 @@ crypto_verify( * are rounded up to the next word. */ vallen = ntohl(ep->vallen); + if ( vallen == 0 + || vallen > MAX_VALLEN) + return (XEVNT_LEN); i = (vallen + 3) / 4; siglen = ntohl(ep->pkt[i++]); - if (len < VALUE_LEN + ((vallen + 3) / 4) * 4 + ((siglen + 3) / - 4) * 4) + if ( siglen > MAX_VALLEN + || len - VALUE_LEN < ((vallen + 3) / 4) * 4 + || len - VALUE_LEN - ((vallen + 3) / 4) * 4 + < ((siglen + 3) / 4) * 4) return (XEVNT_LEN); /* @@ -1627,6 +1644,7 @@ crypto_verify( * avoid doing the sign exchange. */ EVP_VerifyInit(&ctx, peer->digest); + /* XXX: the "+ 12" needs to be at least documented... */ EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen + 12); if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen, pkey) <= 0) return (XEVNT_SIG); @@ -1641,10 +1659,10 @@ crypto_verify( /* - * crypto_encrypt - construct encrypted cookie and signature from - * extension field and cookie + * crypto_encrypt - construct vp (encrypted cookie and signature) from + * the public key and cookie. * - * Returns + * Returns: * XEVNT_OK success * XEVNT_PUB bad or missing public key * XEVNT_CKY bad or missing cookie @@ -1652,24 +1670,21 @@ crypto_verify( */ static int crypto_encrypt( - struct exten *ep, /* extension pointer */ - struct value *vp, /* value pointer */ - keyid_t *cookie /* server cookie */ + const u_char *ptr, /* Public Key */ + u_int vallen, /* Length of Public Key */ + keyid_t *cookie, /* server cookie */ + struct value *vp /* value pointer */ ) { EVP_PKEY *pkey; /* public key */ EVP_MD_CTX ctx; /* signature context */ tstamp_t tstamp; /* NTP timestamp */ u_int32 temp32; - u_int len; - u_char *ptr; /* * Extract the public key from the request. */ - len = ntohl(ep->vallen); - ptr = (u_char *)ep->pkt; - pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, len); + pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, vallen); if (pkey == NULL) { msyslog(LOG_ERR, "crypto_encrypt %s\n", ERR_error_string(ERR_get_error(), NULL)); @@ -1683,9 +1698,9 @@ crypto_encrypt( memset(vp, 0, sizeof(struct value)); vp->tstamp = htonl(tstamp); vp->fstamp = hostval.tstamp; - len = EVP_PKEY_size(pkey); - vp->vallen = htonl(len); - vp->ptr = emalloc(len); + vallen = EVP_PKEY_size(pkey); + vp->vallen = htonl(vallen); + vp->ptr = emalloc(vallen); temp32 = htonl(*cookie); if (!RSA_public_encrypt(4, (u_char *)&temp32, vp->ptr, pkey->pkey.rsa, RSA_PKCS1_OAEP_PADDING)) { @@ -1705,9 +1720,9 @@ crypto_encrypt( vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) - vp->siglen = htonl(len); + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) + vp->siglen = htonl(sign_siglen); return (XEVNT_OK); } @@ -1794,6 +1809,9 @@ crypto_ident( * call in the protocol module. * * Returns extension field pointer (no errors). + * + * XXX: opcode and len should really be 32-bit quantities and + * we should make sure that str is not too big. */ struct exten * crypto_args( @@ -1805,11 +1823,14 @@ crypto_args( tstamp_t tstamp; /* NTP timestamp */ struct exten *ep; /* extension field pointer */ u_int len; /* extension field length */ + size_t slen; tstamp = crypto_time(); len = sizeof(struct exten); - if (str != NULL) - len += strlen(str); + if (str != NULL) { + slen = strlen(str); + len += slen; + } ep = emalloc(len); memset(ep, 0, len); if (opcode == 0) @@ -1829,8 +1850,8 @@ crypto_args( ep->fstamp = hostval.tstamp; ep->vallen = 0; if (str != NULL) { - ep->vallen = htonl(strlen(str)); - memcpy((char *)ep->pkt, str, strlen(str)); + ep->vallen = htonl(slen); + memcpy((char *)ep->pkt, str, slen); } else { ep->pkt[0] = peer->associd; } @@ -1844,6 +1865,8 @@ crypto_args( * Returns extension field length. Note: it is not polite to send a * nonempty signature with zero timestamp or a nonzero timestamp with * empty signature, but these rules are not enforced here. + * + * XXX This code won't work on a box with 16-bit ints. */ u_int crypto_send( @@ -2212,7 +2235,8 @@ crypto_bob( tstamp_t tstamp; /* NTP timestamp */ BIGNUM *bn, *bk, *r; u_char *ptr; - u_int len; + u_int len; /* extension field length */ + u_int vallen = 0; /* value length */ /* * If the IFF parameters are not valid, something awful @@ -2227,8 +2251,11 @@ crypto_bob( /* * Extract r from the challenge. */ - len = ntohl(ep->vallen); - if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) { + vallen = ntohl(ep->vallen); + len = ntohl(ep->opcode) & 0x0000ffff; + if (vallen == 0 || len < VALUE_LEN || len - VALUE_LEN < vallen) + return XEVNT_LEN; + if ((r = BN_bin2bn((u_char *)ep->pkt, vallen, NULL)) == NULL) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); return (XEVNT_ERR); @@ -2240,7 +2267,7 @@ crypto_bob( */ bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new(); sdsa = DSA_SIG_new(); - BN_rand(bk, len * 8, -1, 1); /* k */ + BN_rand(bk, vallen * 8, -1, 1); /* k */ BN_mod_mul(bn, dsa->priv_key, r, dsa->q, bctx); /* b r mod q */ BN_add(bn, bn, bk); BN_mod(bn, bn, dsa->q, bctx); /* k + b r mod q */ @@ -2254,19 +2281,25 @@ crypto_bob( /* * Encode the values in ASN.1 and sign. */ - tstamp = crypto_time(); - memset(vp, 0, sizeof(struct value)); - vp->tstamp = htonl(tstamp); - vp->fstamp = htonl(if_fstamp); - len = i2d_DSA_SIG(sdsa, NULL); - if (len <= 0) { + vallen = i2d_DSA_SIG(sdsa, NULL); + if (vallen == 0) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); DSA_SIG_free(sdsa); return (XEVNT_ERR); } - vp->vallen = htonl(len); - ptr = emalloc(len); + if (vallen > MAX_VALLEN) { + msyslog(LOG_ERR, "crypto_bob: signature is too big: %d", + vallen); + DSA_SIG_free(sdsa); + return (XEVNT_LEN); + } + memset(vp, 0, sizeof(struct value)); + tstamp = crypto_time(); + vp->tstamp = htonl(tstamp); + vp->fstamp = htonl(if_fstamp); + vp->vallen = htonl(vallen); + ptr = emalloc(vallen); vp->ptr = ptr; i2d_DSA_SIG(sdsa, &ptr); DSA_SIG_free(sdsa); @@ -2277,11 +2310,12 @@ crypto_bob( if (tstamp < cinfo->first || tstamp > cinfo->last) return (XEVNT_PER); + /* XXX: more validation to make sure the sign fits... */ vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) vp->siglen = htonl(len); return (XEVNT_OK); } Modified: releng/8.4/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- releng/8.4/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:21:01 2015 (r281232) +++ releng/8.4/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:21:23 2015 (r281233) @@ -459,7 +459,7 @@ receive( while (has_mac > 0) { int temp; - if (has_mac % 4 != 0 || has_mac < 0) { + if (has_mac % 4 != 0 || has_mac < MIN_MAC_LEN) { sys_badlength++; return; /* bad MAC length */ } @@ -483,6 +483,13 @@ receive( return; /* bad MAC length */ } } + /* + * If has_mac is < 0 we had a malformed packet. + */ + if (has_mac < 0) { + sys_badlength++; + return; /* bad length */ + } #ifdef OPENSSL pkeyid = tkeyid = 0; #endif /* OPENSSL */ @@ -942,12 +949,9 @@ receive( } /* - * Update the origin and destination timestamps. If - * unsynchronized or bogus abandon ship. If the crypto machine + * If unsynchronized or bogus abandon ship. If the crypto machine * breaks, light the crypto bit and plaint the log. */ - peer->org = p_xmt; - peer->rec = rbufp->recv_time; if (peer->flash & PKT_TEST_MASK) { #ifdef OPENSSL if (crypto_flags && (peer->flags & FLAG_SKEY)) { @@ -978,10 +982,11 @@ receive( * versions. If symmetric modes, return a crypto-NAK. The peer * should restart the protocol. */ - } else if (!AUTH(peer->keyid || (restrict_mask & RES_DONTTRUST), - is_authentic)) { + } else if (!AUTH(peer->keyid || has_mac || + (restrict_mask & RES_DONTTRUST), is_authentic)) { peer->flash |= TEST5; - if (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE) + if (has_mac && + (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE)) fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask); return; /* bad auth */ } @@ -989,7 +994,12 @@ receive( /* * That was hard and I am sweaty, but the packet is squeaky * clean. Get on with real work. + * + * Update the origin and destination timestamps. */ + peer->org = p_xmt; + peer->rec = rbufp->recv_time; + peer->received++; peer->timereceived = current_time; if (is_authentic == AUTH_OK) Modified: releng/8.4/sys/conf/newvers.sh ============================================================================== --- releng/8.4/sys/conf/newvers.sh Tue Apr 7 20:21:01 2015 (r281232) +++ releng/8.4/sys/conf/newvers.sh Tue Apr 7 20:21:23 2015 (r281233) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.4" -BRANCH="RELEASE-p26" +BRANCH="RELEASE-p27" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/8.4/sys/netinet/igmp.c ============================================================================== --- releng/8.4/sys/netinet/igmp.c Tue Apr 7 20:21:01 2015 (r281232) +++ releng/8.4/sys/netinet/igmp.c Tue Apr 7 20:21:23 2015 (r281233) @@ -1533,7 +1533,6 @@ igmp_input(struct mbuf *m, int off) struct igmpv3 *igmpv3; uint16_t igmpv3len; uint16_t nsrc; - int srclen; IGMPSTAT_INC(igps_rcv_v3_queries); igmpv3 = (struct igmpv3 *)igmp; @@ -1541,8 +1540,8 @@ igmp_input(struct mbuf *m, int off) * 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; } @@ -1551,7 +1550,7 @@ igmp_input(struct mbuf *m, int off) * this scope. */ igmpv3len = iphlen + IGMP_V3_QUERY_MINLEN + - srclen; + sizeof(struct in_addr) * nsrc; if ((m->m_flags & M_EXT || m->m_len < igmpv3len) && (m = m_pullup(m, igmpv3len)) == NULL) { Modified: releng/8.4/sys/netinet6/nd6_rtr.c ============================================================================== --- releng/8.4/sys/netinet6/nd6_rtr.c Tue Apr 7 20:21:01 2015 (r281232) +++ releng/8.4/sys/netinet6/nd6_rtr.c Tue Apr 7 20:21:23 2015 (r281233) @@ -286,8 +286,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); } Modified: releng/9.3/UPDATING ============================================================================== --- releng/9.3/UPDATING Tue Apr 7 20:21:01 2015 (r281232) +++ releng/9.3/UPDATING Tue Apr 7 20:21:23 2015 (r281233) @@ -11,6 +11,16 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20150407: p13 FreeBSD-SA-15:04.igmp [revised] + FreeBSD-SA-15:07.ntp + FreeBSD-SA-15:09.ipv6 + + Improved patch for SA-15:04.igmp. + + Fix multiple vulnerabilities of ntp. [SA-15:07] + + Fix Denial of Service with IPv6 Router Advertisements. [SA-15:09] + 20150320: p12 Fix patch for SA-15:06.openssl. Modified: releng/9.3/contrib/ntp/ntpd/ntp_crypto.c ============================================================================== --- releng/9.3/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:21:01 2015 (r281232) +++ releng/9.3/contrib/ntp/ntpd/ntp_crypto.c Tue Apr 7 20:21:23 2015 (r281233) @@ -93,6 +93,7 @@ #define TAI_1972 10 /* initial TAI offset (s) */ #define MAX_LEAP 100 /* max UTC leapseconds (s) */ #define VALUE_LEN (6 * 4) /* min response field length */ +#define MAX_VALLEN (65535 - VALUE_LEN) #define YEAR (60 * 60 * 24 * 365) /* seconds in year */ /* @@ -137,8 +138,8 @@ static u_int ident_scheme = 0; /* server */ static int crypto_verify P((struct exten *, struct value *, struct peer *)); -static int crypto_encrypt P((struct exten *, struct value *, - keyid_t *)); +static int crypto_encrypt P((const u_char *, u_int, keyid_t *, + struct value *)); static int crypto_alice P((struct peer *, struct value *)); static int crypto_alice2 P((struct peer *, struct value *)); static int crypto_alice3 P((struct peer *, struct value *)); @@ -446,6 +447,12 @@ crypto_recv( tstamp = ntohl(ep->tstamp); fstamp = ntohl(ep->fstamp); vallen = ntohl(ep->vallen); + /* + * Bug 2761: I hope this isn't too early... + */ + if ( vallen == 0 + || len - VALUE_LEN < vallen) + return XEVNT_LEN; } switch (code) { @@ -488,7 +495,7 @@ crypto_recv( break; if (vallen == 0 || vallen > MAXHOSTNAME || - len < VALUE_LEN + vallen) { + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; } @@ -1250,7 +1257,8 @@ crypto_xmit( vallen = ntohl(ep->vallen); if (vallen == 8) { strcpy(certname, sys_hostname); - } else if (vallen == 0 || vallen > MAXHOSTNAME) { + } else if (vallen == 0 || vallen > MAXHOSTNAME || + len - VALUE_LEN < vallen) { rval = XEVNT_LEN; break; @@ -1407,7 +1415,10 @@ crypto_xmit( * anything goes wrong. */ case CRYPTO_COOK | CRYPTO_RESP: - if ((opcode & 0xffff) < VALUE_LEN) { + vallen = ntohl(ep->vallen); /* Must be <64k */ + if ( vallen == 0 + || (vallen >= MAX_VALLEN) + || (opcode & 0x0000ffff) < VALUE_LEN + vallen) { rval = XEVNT_LEN; break; } @@ -1420,10 +1431,11 @@ crypto_xmit( } tcookie = peer->pcookie; } - if ((rval = crypto_encrypt(ep, &vtemp, &tcookie)) == - XEVNT_OK) + if ((rval = crypto_encrypt((const u_char *)ep->pkt, vallen, &tcookie, &vtemp)) + == XEVNT_OK) { len += crypto_send(fp, &vtemp); - value_free(&vtemp); + value_free(&vtemp); + } break; /* @@ -1558,10 +1570,15 @@ crypto_verify( * are rounded up to the next word. */ vallen = ntohl(ep->vallen); + if ( vallen == 0 + || vallen > MAX_VALLEN) + return (XEVNT_LEN); i = (vallen + 3) / 4; siglen = ntohl(ep->pkt[i++]); - if (len < VALUE_LEN + ((vallen + 3) / 4) * 4 + ((siglen + 3) / - 4) * 4) + if ( siglen > MAX_VALLEN + || len - VALUE_LEN < ((vallen + 3) / 4) * 4 + || len - VALUE_LEN - ((vallen + 3) / 4) * 4 + < ((siglen + 3) / 4) * 4) return (XEVNT_LEN); /* @@ -1627,6 +1644,7 @@ crypto_verify( * avoid doing the sign exchange. */ EVP_VerifyInit(&ctx, peer->digest); + /* XXX: the "+ 12" needs to be at least documented... */ EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen + 12); if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen, pkey) <= 0) return (XEVNT_SIG); @@ -1641,10 +1659,10 @@ crypto_verify( /* - * crypto_encrypt - construct encrypted cookie and signature from - * extension field and cookie + * crypto_encrypt - construct vp (encrypted cookie and signature) from + * the public key and cookie. * - * Returns + * Returns: * XEVNT_OK success * XEVNT_PUB bad or missing public key * XEVNT_CKY bad or missing cookie @@ -1652,24 +1670,21 @@ crypto_verify( */ static int crypto_encrypt( - struct exten *ep, /* extension pointer */ - struct value *vp, /* value pointer */ - keyid_t *cookie /* server cookie */ + const u_char *ptr, /* Public Key */ + u_int vallen, /* Length of Public Key */ + keyid_t *cookie, /* server cookie */ + struct value *vp /* value pointer */ ) { EVP_PKEY *pkey; /* public key */ EVP_MD_CTX ctx; /* signature context */ tstamp_t tstamp; /* NTP timestamp */ u_int32 temp32; - u_int len; - u_char *ptr; /* * Extract the public key from the request. */ - len = ntohl(ep->vallen); - ptr = (u_char *)ep->pkt; - pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, len); + pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, vallen); if (pkey == NULL) { msyslog(LOG_ERR, "crypto_encrypt %s\n", ERR_error_string(ERR_get_error(), NULL)); @@ -1683,9 +1698,9 @@ crypto_encrypt( memset(vp, 0, sizeof(struct value)); vp->tstamp = htonl(tstamp); vp->fstamp = hostval.tstamp; - len = EVP_PKEY_size(pkey); - vp->vallen = htonl(len); - vp->ptr = emalloc(len); + vallen = EVP_PKEY_size(pkey); + vp->vallen = htonl(vallen); + vp->ptr = emalloc(vallen); temp32 = htonl(*cookie); if (!RSA_public_encrypt(4, (u_char *)&temp32, vp->ptr, pkey->pkey.rsa, RSA_PKCS1_OAEP_PADDING)) { @@ -1705,9 +1720,9 @@ crypto_encrypt( vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) - vp->siglen = htonl(len); + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) + vp->siglen = htonl(sign_siglen); return (XEVNT_OK); } @@ -1794,6 +1809,9 @@ crypto_ident( * call in the protocol module. * * Returns extension field pointer (no errors). + * + * XXX: opcode and len should really be 32-bit quantities and + * we should make sure that str is not too big. */ struct exten * crypto_args( @@ -1805,11 +1823,14 @@ crypto_args( tstamp_t tstamp; /* NTP timestamp */ struct exten *ep; /* extension field pointer */ u_int len; /* extension field length */ + size_t slen; tstamp = crypto_time(); len = sizeof(struct exten); - if (str != NULL) - len += strlen(str); + if (str != NULL) { + slen = strlen(str); + len += slen; + } ep = emalloc(len); memset(ep, 0, len); if (opcode == 0) @@ -1829,8 +1850,8 @@ crypto_args( ep->fstamp = hostval.tstamp; ep->vallen = 0; if (str != NULL) { - ep->vallen = htonl(strlen(str)); - memcpy((char *)ep->pkt, str, strlen(str)); + ep->vallen = htonl(slen); + memcpy((char *)ep->pkt, str, slen); } else { ep->pkt[0] = peer->associd; } @@ -1844,6 +1865,8 @@ crypto_args( * Returns extension field length. Note: it is not polite to send a * nonempty signature with zero timestamp or a nonzero timestamp with * empty signature, but these rules are not enforced here. + * + * XXX This code won't work on a box with 16-bit ints. */ u_int crypto_send( @@ -2212,7 +2235,8 @@ crypto_bob( tstamp_t tstamp; /* NTP timestamp */ BIGNUM *bn, *bk, *r; u_char *ptr; - u_int len; + u_int len; /* extension field length */ + u_int vallen = 0; /* value length */ /* * If the IFF parameters are not valid, something awful @@ -2227,8 +2251,11 @@ crypto_bob( /* * Extract r from the challenge. */ - len = ntohl(ep->vallen); - if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) { + vallen = ntohl(ep->vallen); + len = ntohl(ep->opcode) & 0x0000ffff; + if (vallen == 0 || len < VALUE_LEN || len - VALUE_LEN < vallen) + return XEVNT_LEN; + if ((r = BN_bin2bn((u_char *)ep->pkt, vallen, NULL)) == NULL) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); return (XEVNT_ERR); @@ -2240,7 +2267,7 @@ crypto_bob( */ bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new(); sdsa = DSA_SIG_new(); - BN_rand(bk, len * 8, -1, 1); /* k */ + BN_rand(bk, vallen * 8, -1, 1); /* k */ BN_mod_mul(bn, dsa->priv_key, r, dsa->q, bctx); /* b r mod q */ BN_add(bn, bn, bk); BN_mod(bn, bn, dsa->q, bctx); /* k + b r mod q */ @@ -2254,19 +2281,25 @@ crypto_bob( /* * Encode the values in ASN.1 and sign. */ - tstamp = crypto_time(); - memset(vp, 0, sizeof(struct value)); - vp->tstamp = htonl(tstamp); - vp->fstamp = htonl(if_fstamp); - len = i2d_DSA_SIG(sdsa, NULL); - if (len <= 0) { + vallen = i2d_DSA_SIG(sdsa, NULL); + if (vallen == 0) { msyslog(LOG_ERR, "crypto_bob %s\n", ERR_error_string(ERR_get_error(), NULL)); DSA_SIG_free(sdsa); return (XEVNT_ERR); } - vp->vallen = htonl(len); - ptr = emalloc(len); + if (vallen > MAX_VALLEN) { + msyslog(LOG_ERR, "crypto_bob: signature is too big: %d", + vallen); + DSA_SIG_free(sdsa); + return (XEVNT_LEN); + } + memset(vp, 0, sizeof(struct value)); + tstamp = crypto_time(); + vp->tstamp = htonl(tstamp); + vp->fstamp = htonl(if_fstamp); + vp->vallen = htonl(vallen); + ptr = emalloc(vallen); vp->ptr = ptr; i2d_DSA_SIG(sdsa, &ptr); DSA_SIG_free(sdsa); @@ -2277,11 +2310,12 @@ crypto_bob( if (tstamp < cinfo->first || tstamp > cinfo->last) return (XEVNT_PER); + /* XXX: more validation to make sure the sign fits... */ vp->sig = emalloc(sign_siglen); EVP_SignInit(&ctx, sign_digest); EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12); - EVP_SignUpdate(&ctx, vp->ptr, len); - if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey)) + EVP_SignUpdate(&ctx, vp->ptr, vallen); + if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey)) vp->siglen = htonl(len); return (XEVNT_OK); } Modified: releng/9.3/contrib/ntp/ntpd/ntp_proto.c ============================================================================== --- releng/9.3/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:21:01 2015 (r281232) +++ releng/9.3/contrib/ntp/ntpd/ntp_proto.c Tue Apr 7 20:21:23 2015 (r281233) @@ -459,7 +459,7 @@ receive( while (has_mac > 0) { int temp; - if (has_mac % 4 != 0 || has_mac < 0) { + if (has_mac % 4 != 0 || has_mac < MIN_MAC_LEN) { sys_badlength++; return; /* bad MAC length */ } @@ -483,6 +483,13 @@ receive( return; /* bad MAC length */ } } + /* + * If has_mac is < 0 we had a malformed packet. + */ + if (has_mac < 0) { + sys_badlength++; + return; /* bad length */ + } #ifdef OPENSSL pkeyid = tkeyid = 0; #endif /* OPENSSL */ @@ -942,12 +949,9 @@ receive( } /* - * Update the origin and destination timestamps. If - * unsynchronized or bogus abandon ship. If the crypto machine + * If unsynchronized or bogus abandon ship. If the crypto machine * breaks, light the crypto bit and plaint the log. */ - peer->org = p_xmt; - peer->rec = rbufp->recv_time; if (peer->flash & PKT_TEST_MASK) { #ifdef OPENSSL if (crypto_flags && (peer->flags & FLAG_SKEY)) { @@ -978,10 +982,11 @@ receive( * versions. If symmetric modes, return a crypto-NAK. The peer * should restart the protocol. */ - } else if (!AUTH(peer->keyid || (restrict_mask & RES_DONTTRUST), - is_authentic)) { + } else if (!AUTH(peer->keyid || has_mac || + (restrict_mask & RES_DONTTRUST), is_authentic)) { peer->flash |= TEST5; - if (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE) + if (has_mac && + (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE)) fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask); return; /* bad auth */ } @@ -989,7 +994,12 @@ receive( /* * That was hard and I am sweaty, but the packet is squeaky * clean. Get on with real work. + * + * Update the origin and destination timestamps. */ + peer->org = p_xmt; + peer->rec = rbufp->recv_time; + peer->received++; peer->timereceived = current_time; if (is_authentic == AUTH_OK) Modified: releng/9.3/sys/conf/newvers.sh ============================================================================== --- releng/9.3/sys/conf/newvers.sh Tue Apr 7 20:21:01 2015 (r281232) +++ releng/9.3/sys/conf/newvers.sh Tue Apr 7 20:21:23 2015 (r281233) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="RELEASE-p12" +BRANCH="RELEASE-p13" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.3/sys/netinet/igmp.c ============================================================================== --- releng/9.3/sys/netinet/igmp.c Tue Apr 7 20:21:01 2015 (r281232) +++ releng/9.3/sys/netinet/igmp.c Tue Apr 7 20:21:23 2015 (r281233) @@ -1534,7 +1534,6 @@ igmp_input(struct mbuf *m, int off) struct igmpv3 *igmpv3; uint16_t igmpv3len; uint16_t nsrc; - int srclen; IGMPSTAT_INC(igps_rcv_v3_queries); igmpv3 = (struct igmpv3 *)igmp; @@ -1542,8 +1541,8 @@ igmp_input(struct mbuf *m, int off) * 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; } @@ -1552,7 +1551,7 @@ igmp_input(struct mbuf *m, int off) * this scope. */ igmpv3len = iphlen + IGMP_V3_QUERY_MINLEN + - srclen; + sizeof(struct in_addr) * nsrc; if ((m->m_flags & M_EXT || m->m_len < igmpv3len) && (m = m_pullup(m, igmpv3len)) == NULL) { Modified: releng/9.3/sys/netinet6/nd6_rtr.c ============================================================================== --- releng/9.3/sys/netinet6/nd6_rtr.c Tue Apr 7 20:21:01 2015 (r281232) +++ releng/9.3/sys/netinet6/nd6_rtr.c Tue Apr 7 20:21:23 2015 (r281233) @@ -296,8 +296,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-all@FreeBSD.ORG Tue Apr 7 20:29:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 21:05:54 2015 Return-Path: Delivered-To: svn-src-all@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 610E3E37; Tue, 7 Apr 2015 21:05: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 4B99AAAD; Tue, 7 Apr 2015 21:05: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 t37L5s2e052974; Tue, 7 Apr 2015 21:05:54 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t37L5r4D052971; Tue, 7 Apr 2015 21:05:53 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201504072105.t37L5r4D052971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Tue, 7 Apr 2015 21:05:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281235 - stable/10/usr.sbin/pmcstudy X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2015 21:05:54 -0000 Author: rrs Date: Tue Apr 7 21:05:52 2015 New Revision: 281235 URL: https://svnweb.freebsd.org/changeset/base/281235 Log: MFC of r280697 and r280698 Sponsored by: Netflix Inc. Added: stable/10/usr.sbin/pmcstudy/pmcstudy.8 - copied, changed from r280697, head/usr.sbin/pmcstudy/pmcstudy.8 Deleted: stable/10/usr.sbin/pmcstudy/pmcstudy.1 Modified: stable/10/usr.sbin/pmcstudy/Makefile stable/10/usr.sbin/pmcstudy/pmcstudy.c Modified: stable/10/usr.sbin/pmcstudy/Makefile ============================================================================== --- stable/10/usr.sbin/pmcstudy/Makefile Tue Apr 7 20:29:03 2015 (r281234) +++ stable/10/usr.sbin/pmcstudy/Makefile Tue Apr 7 21:05:52 2015 (r281235) @@ -2,6 +2,7 @@ # $FreeBSD$ PROG= pmcstudy +MAN= pmcstudy.8 SRCS= pmcstudy.c eval_expr.c CFLAGS+= -Wall -Werror Copied and modified: stable/10/usr.sbin/pmcstudy/pmcstudy.8 (from r280697, head/usr.sbin/pmcstudy/pmcstudy.8) ============================================================================== --- head/usr.sbin/pmcstudy/pmcstudy.8 Thu Mar 26 15:40:47 2015 (r280697, copy source) +++ stable/10/usr.sbin/pmcstudy/pmcstudy.8 Tue Apr 7 21:05:52 2015 (r281235) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd Mar 26, 2015 -.Dt PMCSTUDY 1 +.Dt PMCSTUDY 8 .Os .Sh NAME .Nm pmcstudy Modified: stable/10/usr.sbin/pmcstudy/pmcstudy.c ============================================================================== --- stable/10/usr.sbin/pmcstudy/pmcstudy.c Tue Apr 7 20:29:03 2015 (r281234) +++ stable/10/usr.sbin/pmcstudy/pmcstudy.c Tue Apr 7 21:05:52 2015 (r281235) @@ -2130,7 +2130,11 @@ test_for_a_pmc(const char *pmc, int out_ printf(" "); } } - printf("%s", &line[j]); + if (len) { + printf("%s", &line[j]); + } else { + printf("\n"); + } goto out; } } From owner-svn-src-all@FreeBSD.ORG Tue Apr 7 21:31:20 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 21:34:50 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Tue Apr 7 21:41:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 00:13:18 2015 Return-Path: Delivered-To: svn-src-all@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 6BFFEFA8; Wed, 8 Apr 2015 00: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 5652C2B1; Wed, 8 Apr 2015 00: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 t380DI6C045071; Wed, 8 Apr 2015 00:13:18 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t380DIlR045070; Wed, 8 Apr 2015 00:13:18 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080013.t380DIlR045070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 00:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281241 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 00:13:18 -0000 Author: np Date: Wed Apr 8 00:13:17 2015 New Revision: 281241 URL: https://svnweb.freebsd.org/changeset/base/281241 Log: MFC r276728: cxgbe(4): fix the description of a strange bunch of counters. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Tue Apr 7 23:31:49 2015 (r281240) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 00:13:17 2015 (r281241) @@ -4587,7 +4587,7 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "ddp_stats", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, - sysctl_ddp_stats, "A", "DDP statistics"); + sysctl_ddp_stats, "A", "non-TCP DDP statistics"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "devlog", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 00:31:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 00:32:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 00:35:14 2015 Return-Path: Delivered-To: svn-src-all@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 61EA268D; Wed, 8 Apr 2015 00: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 4C14D6D1; Wed, 8 Apr 2015 00: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 t380ZEBA054882; Wed, 8 Apr 2015 00:35:14 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t380ZD0r054878; Wed, 8 Apr 2015 00:35:13 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080035.t380ZD0r054878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 00:35:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281244 - in stable/10/sys/dev/cxgbe: . tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 00:35:14 -0000 Author: np Date: Wed Apr 8 00:35:12 2015 New Revision: 281244 URL: https://svnweb.freebsd.org/changeset/base/281244 Log: MFC r276597: cxgbe/tom: do not engage the TOE's payload chopper for payload < 2 MSS or for 10Gbps ports. Modified: stable/10/sys/dev/cxgbe/offload.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/offload.h ============================================================================== --- stable/10/sys/dev/cxgbe/offload.h Wed Apr 8 00:32:39 2015 (r281243) +++ stable/10/sys/dev/cxgbe/offload.h Wed Apr 8 00:35:12 2015 (r281244) @@ -147,6 +147,7 @@ struct tom_tunables { int indsz; int ddp_thres; int rx_coalesce; + int tx_align; }; int t4_register_uld(struct uld_info *); Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 00:32:39 2015 (r281243) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 00:35:12 2015 (r281244) @@ -4689,6 +4689,10 @@ t4_sysctls(struct adapter *sc) sc->tt.rx_coalesce = 1; SYSCTL_ADD_INT(ctx, children, OID_AUTO, "rx_coalesce", CTLFLAG_RW, &sc->tt.rx_coalesce, 0, "receive coalescing"); + + sc->tt.tx_align = 1; + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "tx_align", + CTLFLAG_RW, &sc->tt.tx_align, 0, "chop and align payload"); } #endif Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Apr 8 00:32:39 2015 (r281243) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Wed Apr 8 00:35:12 2015 (r281244) @@ -491,7 +491,7 @@ max_dsgl_nsegs(int tx_credits) static inline void write_tx_wr(void *dst, struct toepcb *toep, unsigned int immdlen, - unsigned int plen, uint8_t credits, int shove, int ulp_mode) + unsigned int plen, uint8_t credits, int shove, int ulp_mode, int txalign) { struct fw_ofld_tx_data_wr *txwr = dst; unsigned int wr_ulp_mode; @@ -513,6 +513,19 @@ write_tx_wr(void *dst, struct toepcb *to V_FW_OFLD_TX_DATA_WR_URGENT(0) | /* XXX */ V_FW_OFLD_TX_DATA_WR_SHOVE(shove)); txwr->plen = htobe32(plen); + + if (txalign > 0) { + struct tcpcb *tp = intotcpcb(toep->inp); + + if (plen < 2 * tp->t_maxseg || is_10G_port(toep->port)) + txwr->lsodisable_to_proxy |= + htobe32(F_FW_OFLD_TX_DATA_WR_LSODISABLE); + else + txwr->lsodisable_to_proxy |= + htobe32(F_FW_OFLD_TX_DATA_WR_ALIGNPLD | + (tp->t_flags & TF_NODELAY ? 0 : + F_FW_OFLD_TX_DATA_WR_ALIGNPLDSHOVE)); + } } /* @@ -716,7 +729,8 @@ t4_push_frames(struct adapter *sc, struc } txwr = wrtod(wr); credits = howmany(wr->wr_len, 16); - write_tx_wr(txwr, toep, plen, plen, credits, shove, 0); + write_tx_wr(txwr, toep, plen, plen, credits, shove, 0, + sc->tt.tx_align); m_copydata(sndptr, 0, plen, (void *)(txwr + 1)); nsegs = 0; } else { @@ -734,7 +748,8 @@ t4_push_frames(struct adapter *sc, struc } txwr = wrtod(wr); credits = howmany(wr_len, 16); - write_tx_wr(txwr, toep, 0, plen, credits, shove, 0); + write_tx_wr(txwr, toep, 0, plen, credits, shove, 0, + sc->tt.tx_align); write_tx_sgl(txwr + 1, sndptr, m, nsegs, max_nsegs_1mbuf); if (wr_len & 0xf) { @@ -890,7 +905,7 @@ t4_ulp_push_frames(struct adapter *sc, s txwr = wrtod(wr); credits = howmany(wr->wr_len, 16); write_tx_wr(txwr, toep, plen, ulp_len, credits, shove, - ulp_mode); + ulp_mode, 0); m_copydata(sndptr, 0, plen, (void *)(txwr + 1)); } else { int wr_len; @@ -907,7 +922,7 @@ t4_ulp_push_frames(struct adapter *sc, s txwr = wrtod(wr); credits = howmany(wr_len, 16); write_tx_wr(txwr, toep, 0, ulp_len, credits, shove, - ulp_mode); + ulp_mode, 0); write_tx_sgl(txwr + 1, sndptr, m, nsegs, max_nsegs_1mbuf); if (wr_len & 0xf) { From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 00:49:55 2015 Return-Path: Delivered-To: svn-src-all@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 2DA779F0; Wed, 8 Apr 2015 00:49: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 0E9D4855; Wed, 8 Apr 2015 00:49: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 t380nsYC060210; Wed, 8 Apr 2015 00:49:54 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t380ns2Y060208; Wed, 8 Apr 2015 00:49:54 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080049.t380ns2Y060208@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 00:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281245 - stable/10/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 00:49:55 -0000 Author: np Date: Wed Apr 8 00:49:53 2015 New Revision: 281245 URL: https://svnweb.freebsd.org/changeset/base/281245 Log: MFC r276729, r276775. r276729: cxgbe/tom: use vmem(9) as the DDP page pod allocator. r276775: cxgbe/tom: allocate page pod addresses instead of ppod#. Modified: stable/10/sys/dev/cxgbe/tom/t4_ddp.c stable/10/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_ddp.c Wed Apr 8 00:35:12 2015 (r281244) +++ stable/10/sys/dev/cxgbe/tom/t4_ddp.c Wed Apr 8 00:49:53 2015 (r281245) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); #define PPOD_SZ(n) ((n) * sizeof(struct pagepod)) #define PPOD_SIZE (PPOD_SZ(1)) -/* XXX: must match A_ULP_RX_TDDP_PSZ */ +/* XXX: must match A_ULP_RX_TDDP_PSZ */ static int t4_ddp_pgsz[] = {4096, 4096 << 2, 4096 << 4, 4096 << 6}; #if 0 @@ -98,74 +98,26 @@ t4_dump_tcb(struct adapter *sc, int tid) #define MAX_DDP_BUFFER_SIZE (M_TCB_RX_DDP_BUF0_LEN) static int -alloc_ppods(struct tom_data *td, int n, struct ppod_region *pr) +alloc_ppods(struct tom_data *td, int n, u_int *ppod_addr) { - int ppod; + vmem_addr_t v; + int rc; - KASSERT(n > 0, ("%s: nonsense allocation (%d)", __func__, n)); + MPASS(n > 0); - mtx_lock(&td->ppod_lock); - if (n > td->nppods_free) { - mtx_unlock(&td->ppod_lock); - return (-1); - } - - if (td->nppods_free_head >= n) { - td->nppods_free_head -= n; - ppod = td->nppods_free_head; - TAILQ_INSERT_HEAD(&td->ppods, pr, link); - } else { - struct ppod_region *p; - - ppod = td->nppods_free_head; - TAILQ_FOREACH(p, &td->ppods, link) { - ppod += p->used + p->free; - if (n <= p->free) { - ppod -= n; - p->free -= n; - TAILQ_INSERT_AFTER(&td->ppods, p, pr, link); - goto allocated; - } - } - - if (__predict_false(ppod != td->nppods)) { - panic("%s: ppods TAILQ (%p) corrupt." - " At %d instead of %d at the end of the queue.", - __func__, &td->ppods, ppod, td->nppods); - } + rc = vmem_alloc(td->ppod_arena, PPOD_SZ(n), M_NOWAIT | M_FIRSTFIT, &v); + *ppod_addr = (u_int)v; - mtx_unlock(&td->ppod_lock); - return (-1); - } - -allocated: - pr->used = n; - pr->free = 0; - td->nppods_free -= n; - mtx_unlock(&td->ppod_lock); - - return (ppod); + return (rc); } static void -free_ppods(struct tom_data *td, struct ppod_region *pr) +free_ppods(struct tom_data *td, u_int ppod_addr, int n) { - struct ppod_region *p; - KASSERT(pr->used > 0, ("%s: nonsense free (%d)", __func__, pr->used)); + MPASS(n > 0); - mtx_lock(&td->ppod_lock); - p = TAILQ_PREV(pr, ppod_head, link); - if (p != NULL) - p->free += pr->used + pr->free; - else - td->nppods_free_head += pr->used + pr->free; - td->nppods_free += pr->used; - KASSERT(td->nppods_free <= td->nppods, - ("%s: nppods_free (%d) > nppods (%d). %d freed this time.", - __func__, td->nppods_free, td->nppods, pr->used)); - TAILQ_REMOVE(&td->ppods, pr, link); - mtx_unlock(&td->ppod_lock); + vmem_free(td->ppod_arena, (vmem_addr_t)ppod_addr, PPOD_SZ(n)); } static inline int @@ -187,7 +139,7 @@ free_ddp_buffer(struct tom_data *td, str free(db->pages, M_CXGBE); if (db->nppods > 0) - free_ppods(td, &db->ppod_region); + free_ppods(td, db->ppod_addr, db->nppods); free(db, M_CXGBE); } @@ -702,6 +654,7 @@ alloc_ddp_buffer(struct tom_data *td, vm break; } have_pgsz: + MPASS(idx <= M_PPOD_PGSZ); db = malloc(sizeof(*db), M_CXGBE, M_NOWAIT); if (db == NULL) { @@ -710,16 +663,13 @@ have_pgsz: } nppods = pages_to_nppods(npages, t4_ddp_pgsz[idx]); - ppod = alloc_ppods(td, nppods, &db->ppod_region); - if (ppod < 0) { + if (alloc_ppods(td, nppods, &db->ppod_addr) != 0) { free(db, M_CXGBE); CTR4(KTR_CXGBE, "%s: no pods, nppods %d, resid %d, pgsz %d", __func__, nppods, len, t4_ddp_pgsz[idx]); return (NULL); } - - KASSERT(idx <= M_PPOD_PGSZ && ppod <= M_PPOD_TAG, - ("%s: DDP pgsz_idx = %d, ppod = %d", __func__, idx, ppod)); + ppod = (db->ppod_addr - td->ppod_start) / PPOD_SIZE; db->tag = V_PPOD_PGSZ(idx) | V_PPOD_TAG(ppod); db->nppods = nppods; @@ -745,7 +695,8 @@ write_page_pods(struct adapter *sc, stru struct ulp_mem_io *ulpmc; struct ulptx_idata *ulpsc; struct pagepod *ppod; - int i, j, k, n, chunk, len, ddp_pgsz, idx, ppod_addr; + int i, j, k, n, chunk, len, ddp_pgsz, idx; + u_int ppod_addr; uint32_t cmd; cmd = htobe32(V_ULPTX_CMD(ULP_TX_MEM_WRITE)); @@ -754,7 +705,7 @@ write_page_pods(struct adapter *sc, stru else cmd |= htobe32(F_T5_ULP_MEMIO_IMM); ddp_pgsz = t4_ddp_pgsz[G_PPOD_PGSZ(db->tag)]; - ppod_addr = sc->vres.ddp.start + G_PPOD_TAG(db->tag) * PPOD_SIZE; + ppod_addr = db->ppod_addr; for (i = 0; i < db->nppods; ppod_addr += chunk) { /* How many page pods are we writing in this cycle */ @@ -986,13 +937,10 @@ no_ddp: void t4_init_ddp(struct adapter *sc, struct tom_data *td) { - int nppods = sc->vres.ddp.size / PPOD_SIZE; - td->nppods = nppods; - td->nppods_free = nppods; - td->nppods_free_head = nppods; - TAILQ_INIT(&td->ppods); - mtx_init(&td->ppod_lock, "page pods", NULL, MTX_DEF); + td->ppod_start = sc->vres.ddp.start; + td->ppod_arena = vmem_create("DDP page pods", sc->vres.ddp.start, + sc->vres.ddp.size, 1, 32, M_FIRSTFIT | M_NOWAIT); t4_register_cpl_handler(sc, CPL_RX_DATA_DDP, do_rx_data_ddp); t4_register_cpl_handler(sc, CPL_RX_DDP_COMPLETE, do_rx_ddp_complete); @@ -1002,12 +950,10 @@ void t4_uninit_ddp(struct adapter *sc __unused, struct tom_data *td) { - KASSERT(td->nppods == td->nppods_free, - ("%s: page pods still in use, nppods = %d, free = %d", - __func__, td->nppods, td->nppods_free)); - - if (mtx_initialized(&td->ppod_lock)) - mtx_destroy(&td->ppod_lock); + if (td->ppod_arena != NULL) { + vmem_destroy(td->ppod_arena); + td->ppod_arena = NULL; + } } #define VNET_SO_ASSERT(so) \ Modified: stable/10/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_tom.h Wed Apr 8 00:35:12 2015 (r281244) +++ stable/10/sys/dev/cxgbe/tom/t4_tom.h Wed Apr 8 00:49:53 2015 (r281245) @@ -30,6 +30,7 @@ #ifndef __T4_TOM_H__ #define __T4_TOM_H__ +#include #define LISTEN_HASH_SIZE 32 @@ -80,18 +81,12 @@ struct ofld_tx_sdesc { uint8_t tx_credits; /* firmware tx credits (unit is 16B) */ }; -struct ppod_region { - TAILQ_ENTRY(ppod_region) link; - int used; /* # of pods used by this region */ - int free; /* # of contiguous pods free right after this region */ -}; - struct ddp_buffer { uint32_t tag; /* includes color, page pod addr, and DDP page size */ + u_int ppod_addr; int nppods; int offset; int len; - struct ppod_region ppod_region; int npages; vm_page_t *pages; }; @@ -179,8 +174,6 @@ struct listen_ctx { TAILQ_HEAD(, synq_entry) synq; }; -TAILQ_HEAD(ppod_head, ppod_region); - struct clip_entry { TAILQ_ENTRY(clip_entry) link; struct in6_addr lip; /* local IPv6 address */ @@ -200,11 +193,8 @@ struct tom_data { u_long listen_mask; int lctx_count; /* # of lctx in the hash table */ - struct mtx ppod_lock; - int nppods; - int nppods_free; /* # of available ppods */ - int nppods_free_head; /* # of available ppods at the begining */ - struct ppod_head ppods; + u_int ppod_start; + vmem_t *ppod_arena; struct mtx clip_table_lock; struct clip_head clip_table; From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 00:52:47 2015 Return-Path: Delivered-To: svn-src-all@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 22642B31; Wed, 8 Apr 2015 00:52: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 0341A900; Wed, 8 Apr 2015 00:52: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 t380qkXc064097; Wed, 8 Apr 2015 00:52:46 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t380qkgt064095; Wed, 8 Apr 2015 00:52:46 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080052.t380qkgt064095@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 00:52:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281246 - stable/10/tools/tools/cxgbetool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 00:52:47 -0000 Author: np Date: Wed Apr 8 00:52:45 2015 New Revision: 281246 URL: https://svnweb.freebsd.org/changeset/base/281246 Log: MFC r276598, r276607. r276598: Add a manual page for cxgbetool. It is incomplete but definitely better than nothing. r276607: Fix all nits reported by mandoc -Tlint. Added: stable/10/tools/tools/cxgbetool/cxgbetool.8 - copied, changed from r276598, head/tools/tools/cxgbetool/cxgbetool.8 Modified: stable/10/tools/tools/cxgbetool/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/cxgbetool/Makefile ============================================================================== --- stable/10/tools/tools/cxgbetool/Makefile Wed Apr 8 00:49:53 2015 (r281245) +++ stable/10/tools/tools/cxgbetool/Makefile Wed Apr 8 00:52:45 2015 (r281246) @@ -2,7 +2,7 @@ PROG= cxgbetool SRCS= cxgbetool.c -MAN= +MAN= cxgbetool.8 CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I${.CURDIR}/../../../sys -I. BINDIR?= /usr/sbin Copied and modified: stable/10/tools/tools/cxgbetool/cxgbetool.8 (from r276598, head/tools/tools/cxgbetool/cxgbetool.8) ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.8 Sat Jan 3 00:26:21 2015 (r276598, copy source) +++ stable/10/tools/tools/cxgbetool/cxgbetool.8 Wed Apr 8 00:52:45 2015 (r281246) @@ -1,4 +1,4 @@ -." Copyright (c) 2015, Chelsio Inc +.\" Copyright (c) 2015, Chelsio Inc .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -93,7 +93,7 @@ The rest consists of a command and any p .It Cm clearstats Ar port_id Clear all transmit, receive, and error statistics of all queues associated with a port. -The total number of ports attached to a nexus is listed in +The total number of ports attached to a nexus is listed in .Va dev.t4nex.%d.nports and the 0 based .Ar port_id @@ -407,7 +407,6 @@ Class Weighted Round Robin. .It Sy cl-wrr Channel Rate Limiting. .El -.Pp .It Sy mode Ar scheduler-mode The mode in which the scheduling class is going to operate: .Pp @@ -425,7 +424,6 @@ mode, all of the "flows" bound to the cl aggregate bandwidth of 10Mb/s; but in .Cm flow mode, each of the "flows" bound to the scheduling class would be limited to 10Mb/s. -.Pp .It Sy rate-unit Ar scheduler-rate-unit The units of the scheduler rate constraints: .Pp @@ -446,19 +444,14 @@ percent of port rate. .It Sy absolute Kb/s. .El -.Pp .It Sy channel Ar scheduler-channel-index The scheduling channel to which the scheduling class will be bound. -.Pp .It Sy class Ar scheduler-class-index The scheduling class being programmed. -.Pp .It Sy min-rate Ar minimum-rate The minimum guaranteed rate to which a rate-limiting scheduling class hierarchy will have access. -.Pp .It Sy max-rate Ar maximum-rate The maximum rate for a rate-limiting scheduling class hierarchy. -.Pp .It Sy weight Ar round-robin-weight The weight to be used for a weighted-round-robin scheduling hierarchy. .It Sy pkt-size Ar average-packet-size From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 01:02:12 2015 Return-Path: Delivered-To: svn-src-all@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 9A358DD5; Wed, 8 Apr 2015 01:02: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 843EF9F1; Wed, 8 Apr 2015 01:02: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 t3812CgM068884; Wed, 8 Apr 2015 01:02:12 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3812CNi068883; Wed, 8 Apr 2015 01:02:12 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080102.t3812CNi068883@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281247 - stable/10/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:02:12 -0000 Author: np Date: Wed Apr 8 01:02:11 2015 New Revision: 281247 URL: https://svnweb.freebsd.org/changeset/base/281247 Log: MFC r277102, r277135. r277102: cxgbe/iw_cxgbe: allow any size during the initial MPA exchange. r277135: cxgbe/iw_cxgbe: fix whitespace nit in r277102. Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Apr 8 00:52:45 2015 (r281246) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Apr 8 01:02:11 2015 (r281247) @@ -971,18 +971,14 @@ send_mpa_req(struct c4iw_ep *ep) if (mpa_rev_to_use == 2) mpalen += sizeof(struct mpa_v2_conn_params); - if (mpalen > MHLEN) - CXGBE_UNIMPLEMENTED(__func__); - - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) { + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + if (mpa == NULL) { +failed: connect_reply_upcall(ep, -ENOMEM); return; } - mpa = mtod(m, struct mpa_message *); - m->m_len = mpalen; - m->m_pkthdr.len = mpalen; + memset(mpa, 0, mpalen); memcpy(mpa->key, MPA_KEY_REQ, sizeof(mpa->key)); mpa->flags = (crc_enabled ? MPA_CRC : 0) | (markers_enabled ? MPA_MARKERS : 0) | @@ -1029,11 +1025,18 @@ send_mpa_req(struct c4iw_ep *ep) CTR2(KTR_IW_CXGBE, "%s:smr7 %p", __func__, ep); } - err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); - if (err) { - connect_reply_upcall(ep, -ENOMEM); - return; + m = m_getm(NULL, mpalen, M_NOWAIT, MT_DATA); + if (m == NULL) { + free(mpa, M_CXGBE); + goto failed; } + m_copyback(m, 0, mpalen, (void *)mpa); + free(mpa, M_CXGBE); + + err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, + ep->com.thread); + if (err) + goto failed; START_EP_TIMER(ep); state_set(&ep->com, MPA_REQ_SENT); @@ -1060,22 +1063,11 @@ static int send_mpa_reject(struct c4iw_e ep->mpa_attr.version, mpalen); } - if (mpalen > MHLEN) - CXGBE_UNIMPLEMENTED(__func__); - - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) { - - printf("%s - cannot alloc mbuf!\n", __func__); - CTR2(KTR_IW_CXGBE, "%s:smrej2 %p", __func__, ep); + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + if (mpa == NULL) return (-ENOMEM); - } - - mpa = mtod(m, struct mpa_message *); - m->m_len = mpalen; - m->m_pkthdr.len = mpalen; - memset(mpa, 0, sizeof(*mpa)); + memset(mpa, 0, mpalen); memcpy(mpa->key, MPA_KEY_REP, sizeof(mpa->key)); mpa->flags = MPA_REJECT; mpa->revision = mpa_rev; @@ -1107,7 +1099,15 @@ static int send_mpa_reject(struct c4iw_e if (plen) memcpy(mpa->private_data, pdata, plen); - err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); + m = m_getm(NULL, mpalen, M_NOWAIT, MT_DATA); + if (m == NULL) { + free(mpa, M_CXGBE); + return (-ENOMEM); + } + m_copyback(m, 0, mpalen, (void *)mpa); + free(mpa, M_CXGBE); + + err = -sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); if (!err) ep->snd_seq += mpalen; CTR4(KTR_IW_CXGBE, "%s:smrejE %p %u %d", __func__, ep, ep->hwtid, err); @@ -1133,21 +1133,10 @@ static int send_mpa_reply(struct c4iw_ep mpalen += sizeof(struct mpa_v2_conn_params); } - if (mpalen > MHLEN) - CXGBE_UNIMPLEMENTED(__func__); - - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) { - - CTR2(KTR_IW_CXGBE, "%s:smrep2 %p", __func__, ep); - printf("%s - cannot alloc mbuf!\n", __func__); + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + if (mpa == NULL) return (-ENOMEM); - } - - mpa = mtod(m, struct mpa_message *); - m->m_len = mpalen; - m->m_pkthdr.len = mpalen; memset(mpa, 0, sizeof(*mpa)); memcpy(mpa->key, MPA_KEY_REP, sizeof(mpa->key)); mpa->flags = (ep->mpa_attr.crc_enabled ? MPA_CRC : 0) | @@ -1198,9 +1187,18 @@ static int send_mpa_reply(struct c4iw_ep if (plen) memcpy(mpa->private_data, pdata, plen); + m = m_getm(NULL, mpalen, M_NOWAIT, MT_DATA); + if (m == NULL) { + free(mpa, M_CXGBE); + return (-ENOMEM); + } + m_copyback(m, 0, mpalen, (void *)mpa); + free(mpa, M_CXGBE); + + state_set(&ep->com, MPA_REP_SENT); ep->snd_seq += mpalen; - err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, + err = -sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); CTR3(KTR_IW_CXGBE, "%s:smrepE %p %d", __func__, ep, err); return err; From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 01:05:51 2015 Return-Path: Delivered-To: svn-src-all@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 5DDD8F40; Wed, 8 Apr 2015 01:05: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 487B3A16; Wed, 8 Apr 2015 01:05: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 t3815plU069389; Wed, 8 Apr 2015 01:05:51 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3815pkp069388; Wed, 8 Apr 2015 01:05:51 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080105.t3815pkp069388@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281248 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:05:51 -0000 Author: np Date: Wed Apr 8 01:05:50 2015 New Revision: 281248 URL: https://svnweb.freebsd.org/changeset/base/281248 Log: MFC r278342: cxgbe(4): fix a test made while enabling TOE. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:02:11 2015 (r281247) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:05:50 2015 (r281248) @@ -8157,7 +8157,12 @@ toe_capability(struct port_info *pi, int return (ENODEV); if (enable) { - if (!(sc->flags & FULL_INIT_DONE)) { + /* + * We need the port's queues around so that we're able to send + * and receive CPLs to/from the TOE even if the ifnet for this + * port has never been UP'd administratively. + */ + if (!(pi->flags & PORT_INIT_DONE)) { rc = cxgbe_init_synchronized(pi); if (rc) return (rc); From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 01:07:52 2015 Return-Path: Delivered-To: svn-src-all@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 B1C96141; Wed, 8 Apr 2015 01:07: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 9BF3AA39; Wed, 8 Apr 2015 01:07: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 t3817qIA069670; Wed, 8 Apr 2015 01:07:52 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3817qa2069668; Wed, 8 Apr 2015 01:07:52 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080107.t3817qa2069668@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281249 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:07:52 -0000 Author: np Date: Wed Apr 8 01:07:51 2015 New Revision: 281249 URL: https://svnweb.freebsd.org/changeset/base/281249 Log: MFC r278371: cxgbe(4): a change to the synchronization rules within the the driver. This is purely cosmetic because the new rules are already followed. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Wed Apr 8 01:05:50 2015 (r281248) +++ stable/10/sys/dev/cxgbe/adapter.h Wed Apr 8 01:07:51 2015 (r281249) @@ -803,7 +803,6 @@ struct adapter { #define ADAPTER_LOCK_ASSERT_OWNED(sc) mtx_assert(&(sc)->sc_lock, MA_OWNED) #define ADAPTER_LOCK_ASSERT_NOTOWNED(sc) mtx_assert(&(sc)->sc_lock, MA_NOTOWNED) -/* XXX: not bulletproof, but much better than nothing */ #define ASSERT_SYNCHRONIZED_OP(sc) \ KASSERT(IS_BUSY(sc) && \ (mtx_owned(&(sc)->sc_lock) || sc->last_op_thr == curthread), \ Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:05:50 2015 (r281248) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:07:51 2015 (r281249) @@ -3049,6 +3049,9 @@ mcfail: return (rc); } +/* + * {begin|end}_synchronized_op must be called from the same thread. + */ int begin_synchronized_op(struct adapter *sc, struct port_info *pi, int flags, char *wmesg) @@ -3104,6 +3107,9 @@ done: return (rc); } +/* + * {begin|end}_synchronized_op must be called from the same thread. + */ void end_synchronized_op(struct adapter *sc, int flags) { From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 01:09:37 2015 Return-Path: Delivered-To: svn-src-all@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 E52192D3; Wed, 8 Apr 2015 01:09: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 CF889A52; Wed, 8 Apr 2015 01:09: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 t3819bBx069929; Wed, 8 Apr 2015 01:09:37 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3819bGG069928; Wed, 8 Apr 2015 01:09:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080109.t3819bGG069928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:09:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281250 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:09:38 -0000 Author: np Date: Wed Apr 8 01:09:36 2015 New Revision: 281250 URL: https://svnweb.freebsd.org/changeset/base/281250 Log: MFC r278372: cxgbe(4): adapter_full_init is always a synchronized operation. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:07:51 2015 (r281249) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:09:36 2015 (r281250) @@ -3317,6 +3317,7 @@ adapter_full_init(struct adapter *sc) { int rc, i; + ASSERT_SYNCHRONIZED_OP(sc); ADAPTER_LOCK_ASSERT_NOTOWNED(sc); KASSERT((sc->flags & FULL_INIT_DONE) == 0, ("%s: FULL_INIT_DONE already", __func__)); From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 01:16:20 2015 Return-Path: Delivered-To: svn-src-all@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 3D43C584; Wed, 8 Apr 2015 01:16: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 27E33B85; Wed, 8 Apr 2015 01:16: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 t381GKa2074275; Wed, 8 Apr 2015 01:16:20 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t381GKBR074274; Wed, 8 Apr 2015 01:16:20 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080116.t381GKBR074274@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281251 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:16:20 -0000 Author: np Date: Wed Apr 8 01:16:19 2015 New Revision: 281251 URL: https://svnweb.freebsd.org/changeset/base/281251 Log: MFC r279969: cxgbe(4): fix if_media handling for T520-BT cards. 1Gbps and 100Mbps are valid for this card. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:09:36 2015 (r281250) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:16:19 2015 (r281251) @@ -2807,9 +2807,6 @@ build_medialist(struct port_info *pi, st switch(pi->port_type) { case FW_PORT_TYPE_BT_XFI: - ifmedia_add(media, m | IFM_10G_T, data, NULL); - break; - case FW_PORT_TYPE_BT_XAUI: ifmedia_add(media, m | IFM_10G_T, data, NULL); /* fall through */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 01:25:27 2015 Return-Path: Delivered-To: svn-src-all@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 6ED8776E; Wed, 8 Apr 2015 01:25: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 595C7C83; Wed, 8 Apr 2015 01:25: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 t381PRX4078869; Wed, 8 Apr 2015 01:25:27 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t381PRdH078868; Wed, 8 Apr 2015 01:25:27 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080125.t381PRdH078868@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281252 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:25:27 -0000 Author: np Date: Wed Apr 8 01:25:26 2015 New Revision: 281252 URL: https://svnweb.freebsd.org/changeset/base/281252 Log: MFC r280403: cxgbe(4): Do not call sbuf_trim on an sbuf with a drain function. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:16:19 2015 (r281251) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 01:25:26 2015 (r281252) @@ -4951,13 +4951,16 @@ cxgbe_sysctls(struct port_info *pi) static int sysctl_int_array(SYSCTL_HANDLER_ARGS) { - int rc, *i; + int rc, *i, space = 0; struct sbuf sb; sbuf_new(&sb, NULL, 32, SBUF_AUTOEXTEND); - for (i = arg1; arg2; arg2 -= sizeof(int), i++) - sbuf_printf(&sb, "%d ", *i); - sbuf_trim(&sb); + for (i = arg1; arg2; arg2 -= sizeof(int), i++) { + if (space) + sbuf_printf(&sb, " "); + sbuf_printf(&sb, "%d", *i); + space = 1; + } sbuf_finish(&sb); rc = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); sbuf_delete(&sb); From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 01:43:31 2015 Return-Path: Delivered-To: svn-src-all@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 2589CCE3; Wed, 8 Apr 2015 01:43: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 0F3F2EAE; Wed, 8 Apr 2015 01:43: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 t381hUE9087990; Wed, 8 Apr 2015 01:43:30 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t381hT0P087984; Wed, 8 Apr 2015 01:43:29 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080143.t381hT0P087984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 01:43:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281253 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 01:43:31 -0000 Author: np Date: Wed Apr 8 01:43:29 2015 New Revision: 281253 URL: https://svnweb.freebsd.org/changeset/base/281253 Log: MFC r279243-r279246, r279251, r279691, r279700, and r279701. r279243: cxgbe(4): request an automatic tx update when a netmap txq idles. r279244: cxgbe(4): wait for the hardware to catch up before destroying a netmap txq. r279245: cxgbe(4): do not set the netmap rxq interrupts on a hair-trigger. r279246: cxgbe(4): set up congestion management for netmap rx queues. The hw.cxgbe.cong_drop knob controls the response of the chip when netmap queues are congested. r279251: cxgbe(4): allow tx hardware checksumming on the netmap interface. It is disabled by default but users can set IFCAP_TXCSUM on the netmap ifnet (ifconfig ncxl0 txcsum) to override netmap and force the hardware to calculate and insert proper IP and L4 checksums in outbound frames. r279691: cxgbe(4): provide the correct size of freelists associated with netmap rx queues to the chip. This will fix many problems with native netmap rx on ncxl/ncxgbe interfaces. r279700: cxgbe(4): knobs to experiment with the interrupt coalescing timer for netmap rx queues, and the "batchiness" of rx updates sent to the chip. These knobs will probably become per-rxq in the near future and will be documented only after their final form is decided. r279701: cxgbe(4): experimental rx packet sink for netmap queues. This is not intended for general use. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_netmap.c stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/10/sys/dev/cxgbe/adapter.h Wed Apr 8 01:25:26 2015 (r281252) +++ stable/10/sys/dev/cxgbe/adapter.h Wed Apr 8 01:43:29 2015 (r281253) @@ -1022,6 +1022,7 @@ void t4_wrq_tx_locked(struct adapter *, int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *); void t4_update_fl_bufsize(struct ifnet *); int can_resume_tx(struct sge_eq *); +int tnl_cong(struct port_info *); /* t4_tracer.c */ struct t4_tracer; Modified: stable/10/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_netmap.c Wed Apr 8 01:25:26 2015 (r281252) +++ stable/10/sys/dev/cxgbe/t4_netmap.c Wed Apr 8 01:43:29 2015 (r281253) @@ -58,6 +58,25 @@ extern int fl_pad; /* XXXNM */ extern int spg_len; /* XXXNM */ extern int fl_pktshift; /* XXXNM */ +SYSCTL_NODE(_hw, OID_AUTO, cxgbe, CTLFLAG_RD, 0, "cxgbe netmap parameters"); + +/* + * 0 = normal netmap rx + * 1 = black hole + * 2 = supermassive black hole (buffer packing enabled) + */ +int black_hole = 0; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nm_black_hole, CTLFLAG_RDTUN, &black_hole, 0, + "Sink incoming packets."); + +int rx_ndesc = 256; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nm_rx_ndesc, CTLFLAG_RWTUN, + &rx_ndesc, 0, "# of rx descriptors after which the hw cidx is updated."); + +int holdoff_tmr_idx = 2; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nm_holdoff_tmr_idx, CTLFLAG_RWTUN, + &holdoff_tmr_idx, 0, "Holdoff timer index for netmap rx queues."); + /* netmap ifnet routines */ static void cxgbe_nm_init(void *); static int cxgbe_nm_ioctl(struct ifnet *, unsigned long, caddr_t); @@ -226,9 +245,9 @@ cxgbe_nm_qflush(struct ifnet *ifp) } static int -alloc_nm_rxq_hwq(struct port_info *pi, struct sge_nm_rxq *nm_rxq) +alloc_nm_rxq_hwq(struct port_info *pi, struct sge_nm_rxq *nm_rxq, int cong) { - int rc, cntxt_id; + int rc, cntxt_id, i; __be32 v; struct adapter *sc = pi->adapter; struct netmap_adapter *na = NA(pi->nm_ifp); @@ -267,14 +286,20 @@ alloc_nm_rxq_hwq(struct port_info *pi, s V_FW_IQ_CMD_IQESIZE(ilog2(IQ_ESIZE) - 4)); c.iqsize = htobe16(pi->qsize_rxq); c.iqaddr = htobe64(nm_rxq->iq_ba); + if (cong >= 0) { + c.iqns_to_fl0congen = htobe32(F_FW_IQ_CMD_IQFLINTCONGEN | + V_FW_IQ_CMD_FL0CNGCHMAP(cong) | F_FW_IQ_CMD_FL0CONGCIF | + F_FW_IQ_CMD_FL0CONGEN); + } c.iqns_to_fl0congen |= htobe32(V_FW_IQ_CMD_FL0HOSTFCMODE(X_HOSTFCMODE_NONE) | F_FW_IQ_CMD_FL0FETCHRO | F_FW_IQ_CMD_FL0DATARO | - (fl_pad ? F_FW_IQ_CMD_FL0PADEN : 0)); + (fl_pad ? F_FW_IQ_CMD_FL0PADEN : 0) | + (black_hole == 2 ? F_FW_IQ_CMD_FL0PACKEN : 0)); c.fl0dcaen_to_fl0cidxfthresh = htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_64B) | V_FW_IQ_CMD_FL0FBMAX(X_FETCHBURSTMAX_512B)); - c.fl0size = htobe16(na->num_rx_desc + spg_len / EQ_ESIZE); + c.fl0size = htobe16(na->num_rx_desc / 8 + spg_len / EQ_ESIZE); c.fl0addr = htobe64(nm_rxq->fl_ba); rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c); @@ -310,8 +335,37 @@ alloc_nm_rxq_hwq(struct port_info *pi, s if (is_t5(sc)) nm_rxq->fl_db_val |= F_DBTYPE; - t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_SEINTARM(F_QINTR_CNT_EN) | - V_INGRESSQID(nm_rxq->iq_cntxt_id)); + if (is_t5(sc) && cong >= 0) { + uint32_t param, val; + + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_CONM_CTXT) | + V_FW_PARAMS_PARAM_YZ(nm_rxq->iq_cntxt_id); + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_CONM_CTXT) | + V_FW_PARAMS_PARAM_YZ(nm_rxq->iq_cntxt_id); + if (cong == 0) + val = 1 << 19; + else { + val = 2 << 19; + for (i = 0; i < 4; i++) { + if (cong & (1 << i)) + val |= 1 << (i << 2); + } + } + + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); + if (rc != 0) { + /* report error but carry on */ + device_printf(sc->dev, + "failed to set congestion manager context for " + "ingress queue %d: %d\n", nm_rxq->iq_cntxt_id, rc); + } + } + + t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), + V_INGRESSQID(nm_rxq->iq_cntxt_id) | + V_SEINTARM(V_QINTR_TIMER_IDX(holdoff_tmr_idx))); return (rc); } @@ -351,7 +405,8 @@ alloc_nm_txq_hwq(struct port_info *pi, s V_FW_EQ_ETH_CMD_VFN(0)); c.alloc_to_len16 = htobe32(F_FW_EQ_ETH_CMD_ALLOC | F_FW_EQ_ETH_CMD_EQSTART | FW_LEN16(c)); - c.autoequiqe_to_viid = htobe32(V_FW_EQ_ETH_CMD_VIID(pi->nm_viid)); + c.autoequiqe_to_viid = htobe32(F_FW_EQ_ETH_CMD_AUTOEQUEQE | + V_FW_EQ_ETH_CMD_VIID(pi->nm_viid)); c.fetchszm_to_iqid = htobe32(V_FW_EQ_ETH_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) | V_FW_EQ_ETH_CMD_PCIECHN(pi->tx_chan) | F_FW_EQ_ETH_CMD_FETCHRO | @@ -448,7 +503,7 @@ cxgbe_netmap_on(struct adapter *sc, stru nm_set_native_flags(na); for_each_nm_rxq(pi, i, nm_rxq) { - alloc_nm_rxq_hwq(pi, nm_rxq); + alloc_nm_rxq_hwq(pi, nm_rxq, tnl_cong(pi)); nm_rxq->fl_hwidx = hwidx; slot = netmap_reset(na, NR_RX, i, 0); MPASS(slot != NULL); /* XXXNM: error check, not assert */ @@ -456,13 +511,14 @@ cxgbe_netmap_on(struct adapter *sc, stru /* We deal with 8 bufs at a time */ MPASS((na->num_rx_desc & 7) == 0); MPASS(na->num_rx_desc == nm_rxq->fl_sidx); - for (j = 0; j < nm_rxq->fl_sidx - 8; j++) { + for (j = 0; j < nm_rxq->fl_sidx; j++) { uint64_t ba; PNMB(na, &slot[j], &ba); + MPASS(ba != 0); nm_rxq->fl_desc[j] = htobe64(ba | hwidx); } - nm_rxq->fl_pidx = j; + j = nm_rxq->fl_pidx = nm_rxq->fl_sidx - 8; MPASS((j & 7) == 0); j /= 8; /* driver pidx to hardware pidx */ wmb(); @@ -513,12 +569,17 @@ cxgbe_netmap_off(struct adapter *sc, str if_printf(ifp, "netmap disable_vi failed: %d\n", rc); nm_clear_native_flags(na); - /* - * XXXNM: We need to make sure that the tx queues are quiet and won't - * request any more SGE_EGR_UPDATEs. - */ - for_each_nm_txq(pi, i, nm_txq) { + struct sge_qstat *spg = (void *)&nm_txq->desc[nm_txq->sidx]; + + /* Wait for hw pidx to catch up ... */ + while (be16toh(nm_txq->pidx) != spg->pidx) + pause("nmpidx", 1); + + /* ... and then for the cidx. */ + while (spg->pidx != spg->cidx) + pause("nmcidx", 1); + free_nm_txq_hwq(pi, nm_txq); } for_each_nm_rxq(pi, i, nm_rxq) { @@ -641,7 +702,7 @@ int lazy_tx_credit_flush = 1; */ static void cxgbe_nm_tx(struct adapter *sc, struct sge_nm_txq *nm_txq, - struct netmap_kring *kring, int npkt, int npkt_remaining) + struct netmap_kring *kring, int npkt, int npkt_remaining, int txcsum) { struct netmap_ring *ring = kring->ring; struct netmap_slot *slot; @@ -668,6 +729,7 @@ cxgbe_nm_tx(struct adapter *sc, struct s for (i = 0; i < n; i++) { slot = &ring->slot[kring->nr_hwcur]; PNMB(kring->na, slot, &ba); + MPASS(ba != 0); cpl->ctrl0 = nm_txq->cpl_ctrl0; cpl->pack = 0; @@ -677,10 +739,12 @@ cxgbe_nm_tx(struct adapter *sc, struct s * checksum offloading, TCP segmentation offloading, * encryption, VLAN encapsulation/decapsulation, etc." * - * XXXNM: it makes sense to enable checksum offload. + * So the ncxl interfaces have tx hardware checksumming + * disabled by default. But you can override netmap by + * enabling IFCAP_TXCSUM on the interface manully. */ - cpl->ctrl1 = htobe64(F_TXPKT_IPCSUM_DIS | - F_TXPKT_L4CSUM_DIS); + cpl->ctrl1 = txcsum ? 0 : + htobe64(F_TXPKT_IPCSUM_DIS | F_TXPKT_L4CSUM_DIS); usgl = (void *)(cpl + 1); usgl->cmd_nsge = htobe32(V_ULPTX_CMD(ULP_TX_SC_DSGL) | @@ -793,7 +857,7 @@ cxgbe_netmap_txsync(struct netmap_kring struct sge_nm_txq *nm_txq = &sc->sge.nm_txq[pi->first_nm_txq + kring->ring_id]; const u_int head = kring->rhead; u_int reclaimed = 0; - int n, d, npkt_remaining, ndesc_remaining; + int n, d, npkt_remaining, ndesc_remaining, txcsum; /* * Tx was at kring->nr_hwcur last time around and now we need to advance @@ -804,6 +868,7 @@ cxgbe_netmap_txsync(struct netmap_kring npkt_remaining = head >= kring->nr_hwcur ? head - kring->nr_hwcur : kring->nkr_num_slots - kring->nr_hwcur + head; + txcsum = ifp->if_capenable & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6); while (npkt_remaining) { reclaimed += reclaim_nm_tx_desc(nm_txq); ndesc_remaining = contiguous_ndesc_available(nm_txq); @@ -827,7 +892,7 @@ cxgbe_netmap_txsync(struct netmap_kring /* Send n packets and update nm_txq->pidx and kring->nr_hwcur */ npkt_remaining -= n; - cxgbe_nm_tx(sc, nm_txq, kring, n, npkt_remaining); + cxgbe_nm_tx(sc, nm_txq, kring, n, npkt_remaining, txcsum); } MPASS(npkt_remaining == 0); MPASS(kring->nr_hwcur == head); @@ -861,6 +926,9 @@ cxgbe_netmap_rxsync(struct netmap_kring u_int n; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; + if (black_hole) + return (0); /* No updates ever. */ + if (netmap_no_pendintr || force_update) { kring->nr_hwtail = atomic_load_acq_32(&nm_rxq->fl_cidx); kring->nr_kflags &= ~NKR_PENDINTR; @@ -890,6 +958,7 @@ cxgbe_netmap_rxsync(struct netmap_kring while (n > 0) { for (i = 0; i < 8; i++, fl_pidx++, slot++) { PNMB(na, slot, &ba); + MPASS(ba != 0); nm_rxq->fl_desc[fl_pidx] = htobe64(ba | hwidx); slot->flags &= ~NS_BUF_CHANGED; MPASS(fl_pidx <= nm_rxq->fl_sidx); @@ -1064,10 +1133,10 @@ t4_nm_intr(void *arg) struct netmap_ring *ring = kring->ring; struct iq_desc *d = &nm_rxq->iq_desc[nm_rxq->iq_cidx]; uint32_t lq; - u_int n = 0; - int processed = 0; + u_int n = 0, work = 0; uint8_t opcode; uint32_t fl_cidx = atomic_load_acq_32(&nm_rxq->fl_cidx); + u_int fl_credits = fl_cidx & 7; while ((d->rsp.u.type_gen & F_RSPD_GEN) == nm_rxq->iq_gen) { @@ -1078,8 +1147,10 @@ t4_nm_intr(void *arg) switch (G_RSPD_TYPE(d->rsp.u.type_gen)) { case X_RSPD_TYPE_FLBUF: - /* No buffer packing so new buf every time */ - MPASS(lq & F_RSPD_NEWBUF); + if (black_hole != 2) { + /* No buffer packing so new buf every time */ + MPASS(lq & F_RSPD_NEWBUF); + } /* fall through */ @@ -1095,7 +1166,9 @@ t4_nm_intr(void *arg) case CPL_RX_PKT: ring->slot[fl_cidx].len = G_RSPD_LEN(lq) - fl_pktshift; ring->slot[fl_cidx].flags = kring->nkr_slot_flags; - if (__predict_false(++fl_cidx == nm_rxq->fl_sidx)) + fl_cidx += (lq & F_RSPD_NEWBUF) ? 1 : 0; + fl_credits += (lq & F_RSPD_NEWBUF) ? 1 : 0; + if (__predict_false(fl_cidx == nm_rxq->fl_sidx)) fl_cidx = 0; break; default: @@ -1121,18 +1194,37 @@ t4_nm_intr(void *arg) nm_rxq->iq_gen ^= F_RSPD_GEN; } - if (__predict_false(++n == 64)) { /* XXXNM: tune */ + if (__predict_false(++n == rx_ndesc)) { + atomic_store_rel_32(&nm_rxq->fl_cidx, fl_cidx); + if (black_hole && fl_credits >= 8) { + fl_credits /= 8; + IDXINCR(nm_rxq->fl_pidx, fl_credits * 8, + nm_rxq->fl_sidx); + t4_write_reg(sc, MYPF_REG(A_SGE_PF_KDOORBELL), + nm_rxq->fl_db_val | V_PIDX(fl_credits)); + fl_credits = fl_cidx & 7; + } else if (!black_hole) { + netmap_rx_irq(ifp, nm_rxq->nid, &work); + MPASS(work != 0); + } t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_CIDXINC(n) | V_INGRESSQID(nm_rxq->iq_cntxt_id) | V_SEINTARM(V_QINTR_TIMER_IDX(X_TIMERREG_UPDATE_CIDX))); n = 0; } } - if (fl_cidx != nm_rxq->fl_cidx) { - atomic_store_rel_32(&nm_rxq->fl_cidx, fl_cidx); - netmap_rx_irq(ifp, nm_rxq->nid, &processed); - } + + atomic_store_rel_32(&nm_rxq->fl_cidx, fl_cidx); + if (black_hole) { + fl_credits /= 8; + IDXINCR(nm_rxq->fl_pidx, fl_credits * 8, nm_rxq->fl_sidx); + t4_write_reg(sc, MYPF_REG(A_SGE_PF_KDOORBELL), + nm_rxq->fl_db_val | V_PIDX(fl_credits)); + } else + netmap_rx_irq(ifp, nm_rxq->nid, &work); + t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_CIDXINC(n) | - V_INGRESSQID((u32)nm_rxq->iq_cntxt_id) | V_SEINTARM(F_QINTR_CNT_EN)); + V_INGRESSQID((u32)nm_rxq->iq_cntxt_id) | + V_SEINTARM(V_QINTR_TIMER_IDX(holdoff_tmr_idx))); } #endif Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Wed Apr 8 01:25:26 2015 (r281252) +++ stable/10/sys/dev/cxgbe/t4_sge.c Wed Apr 8 01:43:29 2015 (r281253) @@ -2563,7 +2563,7 @@ free_mgmtq(struct adapter *sc) return free_wrq(sc, &sc->sge.mgmtq); } -static inline int +int tnl_cong(struct port_info *pi) { From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 01:55:24 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 02:15:14 2015 Return-Path: Delivered-To: svn-src-all@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 B49784E0; Wed, 8 Apr 2015 02:15: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 951592FF; Wed, 8 Apr 2015 02:15: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 t382FEIS002606; Wed, 8 Apr 2015 02:15:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t382FDC0002604; Wed, 8 Apr 2015 02:15:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504080215.t382FDC0002604@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 02:15:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281255 - stable/10/sys/fs/devfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 02:15:14 -0000 Author: kib Date: Wed Apr 8 02:15:13 2015 New Revision: 281255 URL: https://svnweb.freebsd.org/changeset/base/281255 Log: MFC r280308 (by delphij): Disable timestamping on devfs read/write operations by default. MFC r280949: Refine r280308. Use seconds precision for devfs timestamps by default. Modified: stable/10/sys/fs/devfs/devfs_devs.c stable/10/sys/fs/devfs/devfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/devfs/devfs_devs.c ============================================================================== --- stable/10/sys/fs/devfs/devfs_devs.c Wed Apr 8 01:55:22 2015 (r281254) +++ stable/10/sys/fs/devfs/devfs_devs.c Wed Apr 8 02:15:13 2015 (r281255) @@ -61,7 +61,7 @@ static MALLOC_DEFINE(M_DEVFS2, "DEVFS2", static MALLOC_DEFINE(M_DEVFS3, "DEVFS3", "DEVFS data 3"); static MALLOC_DEFINE(M_CDEVP, "DEVFS1", "DEVFS cdev_priv storage"); -static SYSCTL_NODE(_vfs, OID_AUTO, devfs, CTLFLAG_RW, 0, "DEVFS filesystem"); +SYSCTL_NODE(_vfs, OID_AUTO, devfs, CTLFLAG_RW, 0, "DEVFS filesystem"); static unsigned devfs_generation; SYSCTL_UINT(_vfs_devfs, OID_AUTO, generation, CTLFLAG_RD, Modified: stable/10/sys/fs/devfs/devfs_vnops.c ============================================================================== --- stable/10/sys/fs/devfs/devfs_vnops.c Wed Apr 8 01:55:22 2015 (r281254) +++ stable/10/sys/fs/devfs/devfs_vnops.c Wed Apr 8 02:15:13 2015 (r281255) @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -79,6 +80,32 @@ SX_SYSINIT(clone_drain_lock, &clone_drai struct mtx cdevpriv_mtx; MTX_SYSINIT(cdevpriv_mtx, &cdevpriv_mtx, "cdevpriv lock", MTX_DEF); +SYSCTL_DECL(_vfs_devfs); + +static int devfs_dotimes; +SYSCTL_INT(_vfs_devfs, OID_AUTO, dotimes, CTLFLAG_RW, + &devfs_dotimes, 0, "Update timestamps on DEVFS with default precision"); + +/* + * Update devfs node timestamp. Note that updates are unlocked and + * stat(2) could see partially updated times. + */ +static void +devfs_timestamp(struct timespec *tsp) +{ + time_t ts; + + if (devfs_dotimes) { + vfs_timestamp(tsp); + } else { + ts = time_second; + if (tsp->tv_sec != ts) { + tsp->tv_sec = ts; + tsp->tv_nsec = 0; + } + } +} + static int devfs_fp_check(struct file *fp, struct cdev **devp, struct cdevsw **dswp, int *ref) @@ -1200,7 +1227,7 @@ devfs_read_f(struct file *fp, struct uio foffset_lock_uio(fp, uio, flags | FOF_NOLOCK); error = dsw->d_read(dev, uio, ioflag); if (uio->uio_resid != resid || (error == 0 && resid != 0)) - vfs_timestamp(&dev->si_atime); + devfs_timestamp(&dev->si_atime); td->td_fpop = fpop; dev_relthread(dev, ref); @@ -1679,7 +1706,7 @@ devfs_write_f(struct file *fp, struct ui error = dsw->d_write(dev, uio, ioflag); if (uio->uio_resid != resid || (error == 0 && resid != 0)) { - vfs_timestamp(&dev->si_ctime); + devfs_timestamp(&dev->si_ctime); dev->si_mtime = dev->si_ctime; } td->td_fpop = fpop; From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 02:21:46 2015 Return-Path: Delivered-To: svn-src-all@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 45AAB8DE; Wed, 8 Apr 2015 02:21: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 2FCC33EF; Wed, 8 Apr 2015 02:21: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 t382Lk5p006856; Wed, 8 Apr 2015 02:21:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t382Ljt0006854; Wed, 8 Apr 2015 02:21:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504080221.t382Ljt0006854@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 02:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281256 - in stable/10/lib/libc: include sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 02:21:46 -0000 Author: kib Date: Wed Apr 8 02:21:44 2015 New Revision: 281256 URL: https://svnweb.freebsd.org/changeset/base/281256 Log: MFC r280959: Correctly handle __fcntl_compat symbol for the !SYSCALL_COMPAT case. Modified: stable/10/lib/libc/include/compat.h stable/10/lib/libc/sys/fcntl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/include/compat.h ============================================================================== --- stable/10/lib/libc/include/compat.h Wed Apr 8 02:15:13 2015 (r281255) +++ stable/10/lib/libc/include/compat.h Wed Apr 8 02:21:44 2015 (r281256) @@ -44,5 +44,14 @@ __sym_compat(shmctl, freebsd7_shmctl, FB #undef __sym_compat +#define __weak_reference(sym,alias) \ + .weak alias;.equ alias,sym + +#ifndef SYSCALL_COMPAT +__weak_reference(__sys_fcntl,__fcntl_compat) +#endif + +#undef __weak_reference + #endif /* __LIBC_COMPAT_H__ */ Modified: stable/10/lib/libc/sys/fcntl.c ============================================================================== --- stable/10/lib/libc/sys/fcntl.c Wed Apr 8 02:15:13 2015 (r281255) +++ stable/10/lib/libc/sys/fcntl.c Wed Apr 8 02:21:44 2015 (r281256) @@ -103,7 +103,4 @@ __fcntl_compat(int fd, int cmd, ...) return (__sys_fcntl(fd, cmd, arg)); } } -#else -__weak_reference(__sys_fcntl, __fcntl_compat); -__weak_reference(__sys_fcntl, __fcntl); #endif From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 02:36:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 02:43:06 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 03:55:04 2015 Return-Path: Delivered-To: svn-src-all@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 B4F5BDC7; Wed, 8 Apr 2015 03:55: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 9F349FC0; Wed, 8 Apr 2015 03:55: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 t383t3Bk050155; Wed, 8 Apr 2015 03:55:03 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t383t3Db050153; Wed, 8 Apr 2015 03:55:03 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080355.t383t3Db050153@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 03:55:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281259 - in stable/10/sys/dev/cxgbe: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 03:55:04 -0000 Author: np Date: Wed Apr 8 03:55:02 2015 New Revision: 281259 URL: https://svnweb.freebsd.org/changeset/base/281259 Log: MFC r278485: cxgbe(4): allow the SET_FILTER_MODE ioctl to change the mode when it's safe to do so. Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/10/sys/dev/cxgbe/common/t4_hw.c Wed Apr 8 02:43:05 2015 (r281258) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Wed Apr 8 03:55:02 2015 (r281259) @@ -3108,6 +3108,31 @@ void t4_write_rss_pf_mask(struct adapter &pfmask, 1, A_TP_RSS_PF_MSK); } +static void refresh_vlan_pri_map(struct adapter *adap) +{ + + t4_read_indirect(adap, A_TP_PIO_ADDR, A_TP_PIO_DATA, + &adap->params.tp.vlan_pri_map, 1, + A_TP_VLAN_PRI_MAP); + + /* + * Now that we have TP_VLAN_PRI_MAP cached, we can calculate the field + * shift positions of several elements of the Compressed Filter Tuple + * for this adapter which we need frequently ... + */ + adap->params.tp.vlan_shift = t4_filter_field_shift(adap, F_VLAN); + adap->params.tp.vnic_shift = t4_filter_field_shift(adap, F_VNIC_ID); + adap->params.tp.port_shift = t4_filter_field_shift(adap, F_PORT); + adap->params.tp.protocol_shift = t4_filter_field_shift(adap, F_PROTOCOL); + + /* + * If TP_INGRESS_CONFIG.VNID == 0, then TP_VLAN_PRI_MAP.VNIC_ID + * represents the presense of an Outer VLAN instead of a VNIC ID. + */ + if ((adap->params.tp.ingress_config & F_VNIC) == 0) + adap->params.tp.vnic_shift = -1; +} + /** * t4_set_filter_mode - configure the optional components of filter tuples * @adap: the adapter @@ -3131,6 +3156,8 @@ int t4_set_filter_mode(struct adapter *a return -EINVAL; t4_write_indirect(adap, A_TP_PIO_ADDR, A_TP_PIO_DATA, &mode_map, 1, A_TP_VLAN_PRI_MAP); + refresh_vlan_pri_map(adap); + return 0; } @@ -5615,33 +5642,10 @@ int __devinit t4_init_tp_params(struct a for (chan = 0; chan < NCHAN; chan++) adap->params.tp.tx_modq[chan] = chan; - /* - * Cache the adapter's Compressed Filter Mode and global Incress - * Configuration. - */ - t4_read_indirect(adap, A_TP_PIO_ADDR, A_TP_PIO_DATA, - &adap->params.tp.vlan_pri_map, 1, - A_TP_VLAN_PRI_MAP); t4_read_indirect(adap, A_TP_PIO_ADDR, A_TP_PIO_DATA, &adap->params.tp.ingress_config, 1, A_TP_INGRESS_CONFIG); - - /* - * Now that we have TP_VLAN_PRI_MAP cached, we can calculate the field - * shift positions of several elements of the Compressed Filter Tuple - * for this adapter which we need frequently ... - */ - adap->params.tp.vlan_shift = t4_filter_field_shift(adap, F_VLAN); - adap->params.tp.vnic_shift = t4_filter_field_shift(adap, F_VNIC_ID); - adap->params.tp.port_shift = t4_filter_field_shift(adap, F_PORT); - adap->params.tp.protocol_shift = t4_filter_field_shift(adap, F_PROTOCOL); - - /* - * If TP_INGRESS_CONFIG.VNID == 0, then TP_VLAN_PRI_MAP.VNIC_ID - * represents the presense of an Outer VLAN instead of a VNIC ID. - */ - if ((adap->params.tp.ingress_config & F_VNIC) == 0) - adap->params.tp.vnic_shift = -1; + refresh_vlan_pri_map(adap); return 0; } Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 02:43:05 2015 (r281258) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Apr 8 03:55:02 2015 (r281259) @@ -7056,10 +7056,9 @@ get_filter_mode(struct adapter *sc, uint log(LOG_WARNING, "%s: cached filter mode out of sync %x %x.\n", device_get_nameunit(sc->dev), sc->params.tp.vlan_pri_map, fconf); - sc->params.tp.vlan_pri_map = fconf; } - *mode = fconf_to_mode(sc->params.tp.vlan_pri_map); + *mode = fconf_to_mode(fconf); end_synchronized_op(sc, LOCK_HELD); return (0); @@ -7090,14 +7089,7 @@ set_filter_mode(struct adapter *sc, uint } #endif -#ifdef notyet rc = -t4_set_filter_mode(sc, fconf); - if (rc == 0) - sc->filter_mode = fconf; -#else - rc = ENOTSUP; -#endif - done: end_synchronized_op(sc, LOCK_HELD); return (rc); From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 04:01:03 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 04:35:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 04:37:12 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 04:40:05 2015 Return-Path: Delivered-To: svn-src-all@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 AFF5A702; Wed, 8 Apr 2015 04:40: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 9A64C3D9; Wed, 8 Apr 2015 04:40: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 t384e5g2069759; Wed, 8 Apr 2015 04:40:05 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t384e5LR069755; Wed, 8 Apr 2015 04:40:05 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080440.t384e5LR069755@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 04:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281263 - in stable/10/sys: dev/cxgbe modules/cxgbe modules/cxgbe/if_cxl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 04:40:05 -0000 Author: np Date: Wed Apr 8 04:40:04 2015 New Revision: 281263 URL: https://svnweb.freebsd.org/changeset/base/281263 Log: MFC r278303: cxgbe(4): Add a minimal if_cxl module that pulls in the real driver as a dependency. This ensures "ifconfig cxl ..." does the right thing even when it's run with no driver loaded. if_cxl.ko is the tiniest module in /boot/kernel. Added: stable/10/sys/dev/cxgbe/if_cxl.c - copied unchanged from r278303, head/sys/dev/cxgbe/if_cxl.c stable/10/sys/modules/cxgbe/if_cxl/ - copied from r278303, head/sys/modules/cxgbe/if_cxl/ Modified: stable/10/sys/modules/cxgbe/Makefile Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/dev/cxgbe/if_cxl.c (from r278303, head/sys/dev/cxgbe/if_cxl.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/cxgbe/if_cxl.c Wed Apr 8 04:40:04 2015 (r281263, copy of r278303, head/sys/dev/cxgbe/if_cxl.c) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2015 Chelsio Communications, Inc. + * All rights reserved. + * Written by: Navdeep Parhar + * + * 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 +mod_event(module_t mod, int cmd, void *arg) +{ + + return (0); +} +static moduledata_t if_cxl_mod = {"if_cxl", mod_event}; +DECLARE_MODULE(if_cxl, if_cxl_mod, SI_SUB_EXEC, SI_ORDER_ANY); +MODULE_VERSION(if_cxl, 1); +MODULE_DEPEND(if_cxl, cxl, 1, 1, 1); Modified: stable/10/sys/modules/cxgbe/Makefile ============================================================================== --- stable/10/sys/modules/cxgbe/Makefile Wed Apr 8 04:37:11 2015 (r281262) +++ stable/10/sys/modules/cxgbe/Makefile Wed Apr 8 04:40:04 2015 (r281263) @@ -3,6 +3,7 @@ # SUBDIR= if_cxgbe +SUBDIR+= if_cxl SUBDIR+= t4_firmware SUBDIR+= t5_firmware SUBDIR+= ${_tom} From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 05:02:22 2015 Return-Path: Delivered-To: svn-src-all@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 D96169DD; Wed, 8 Apr 2015 05:02: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 C527585B; Wed, 8 Apr 2015 05:02: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 t3852Mco082755; Wed, 8 Apr 2015 05:02:22 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3852MHU082754; Wed, 8 Apr 2015 05:02:22 GMT (envelope-from np@FreeBSD.org) Message-Id: <201504080502.t3852MHU082754@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 8 Apr 2015 05:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281264 - stable/10/sys/dev/cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 05:02:23 -0000 Author: np Date: Wed Apr 8 05:02:21 2015 New Revision: 281264 URL: https://svnweb.freebsd.org/changeset/base/281264 Log: MFC r279092: cxgbe(4): there is no need to force an "unimplemented" panic needlessly. The calls to free_nm_txq and free_nm_rxq are made just a few lines prior to the panic. Modified: stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_sge.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_sge.c Wed Apr 8 04:40:04 2015 (r281263) +++ stable/10/sys/dev/cxgbe/t4_sge.c Wed Apr 8 05:02:21 2015 (r281264) @@ -1244,9 +1244,6 @@ t4_teardown_port_queues(struct port_info free_ofld_rxq(pi, ofld_rxq); } #endif -#ifdef DEV_NETMAP - CXGBE_UNIMPLEMENTED(__func__); -#endif return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 08:48:42 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 10:28:47 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 11:59:02 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 16:26:30 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 16:30:48 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 17:36:19 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Wed Apr 8 17:52:25 2015 Return-Path: Delivered-To: svn-src-all@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 37C7190C; Wed, 8 Apr 2015 17:52: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 035EAF2B; Wed, 8 Apr 2015 17:52: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 t38HqOce046956; Wed, 8 Apr 2015 17:52:24 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38HqOwP046955; Wed, 8 Apr 2015 17:52:24 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504081752.t38HqOwP046955@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 17:52:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r281267 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 17:52:25 -0000 Author: delphij Date: Wed Apr 8 17:52:23 2015 New Revision: 281267 URL: https://svnweb.freebsd.org/changeset/base/281267 Log: Bump my limit temporarily. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Wed Apr 8 16:30:45 2015 (r281266) +++ svnadmin/conf/sizelimit.conf Wed Apr 8 17:52:23 2015 (r281267) @@ -21,6 +21,7 @@ # adrian brooks # cy +delphij des dim ed From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 17:52:59 2015 Return-Path: Delivered-To: svn-src-all@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 4FF99A36; Wed, 8 Apr 2015 17:52: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 35743F34; Wed, 8 Apr 2015 17:52: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 t38HqxaA047085; Wed, 8 Apr 2015 17:52:59 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t38Hqt2o047060; Wed, 8 Apr 2015 17:52:55 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504081752.t38Hqt2o047060@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 17:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r281268 - in vendor/bind9/dist: . bin/check bin/dig bin/dig/include/dig bin/dnssec bin/named bin/named/include/named bin/nsupdate bin/rndc doc/arm lib/bind9 lib/dns lib/dns/include/dns ... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 17:52:59 -0000 Author: delphij Date: Wed Apr 8 17:52:54 2015 New Revision: 281268 URL: https://svnweb.freebsd.org/changeset/base/281268 Log: Vendor import of BIND 9.9.7 Added: vendor/bind9/dist/doc/arm/Bv9ARM.ch11.html (contents, props changed) vendor/bind9/dist/doc/arm/Bv9ARM.ch12.html (contents, props changed) vendor/bind9/dist/doc/arm/Bv9ARM.ch13.html (contents, props changed) vendor/bind9/dist/doc/arm/notes-wrapper.xml (contents, props changed) vendor/bind9/dist/doc/arm/notes.html (contents, props changed) vendor/bind9/dist/doc/arm/notes.pdf (contents, props changed) vendor/bind9/dist/doc/arm/notes.xml (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/openpgpkey_61.c (contents, props changed) vendor/bind9/dist/lib/dns/rdata/generic/openpgpkey_61.h (contents, props changed) Modified: vendor/bind9/dist/CHANGES vendor/bind9/dist/COPYRIGHT vendor/bind9/dist/FAQ.xml vendor/bind9/dist/README vendor/bind9/dist/bin/check/named-checkconf.c vendor/bind9/dist/bin/dig/dig.1 vendor/bind9/dist/bin/dig/dig.docbook vendor/bind9/dist/bin/dig/dig.html vendor/bind9/dist/bin/dig/dighost.c vendor/bind9/dist/bin/dig/host.c vendor/bind9/dist/bin/dig/include/dig/dig.h vendor/bind9/dist/bin/dig/nslookup.c vendor/bind9/dist/bin/dnssec/dnssec-dsfromkey.c vendor/bind9/dist/bin/dnssec/dnssec-importkey.c vendor/bind9/dist/bin/dnssec/dnssec-keyfromlabel.c vendor/bind9/dist/bin/dnssec/dnssec-keygen.8 vendor/bind9/dist/bin/dnssec/dnssec-keygen.c vendor/bind9/dist/bin/dnssec/dnssec-keygen.docbook vendor/bind9/dist/bin/dnssec/dnssec-keygen.html vendor/bind9/dist/bin/dnssec/dnssec-settime.8 vendor/bind9/dist/bin/dnssec/dnssec-settime.c vendor/bind9/dist/bin/dnssec/dnssec-settime.docbook vendor/bind9/dist/bin/dnssec/dnssec-settime.html vendor/bind9/dist/bin/dnssec/dnssec-signzone.c vendor/bind9/dist/bin/dnssec/dnssec-verify.c vendor/bind9/dist/bin/dnssec/dnssectool.c vendor/bind9/dist/bin/dnssec/dnssectool.h vendor/bind9/dist/bin/named/client.c vendor/bind9/dist/bin/named/config.c vendor/bind9/dist/bin/named/include/named/globals.h vendor/bind9/dist/bin/named/interfacemgr.c vendor/bind9/dist/bin/named/main.c vendor/bind9/dist/bin/named/named.html vendor/bind9/dist/bin/named/query.c vendor/bind9/dist/bin/named/server.c vendor/bind9/dist/bin/named/update.c vendor/bind9/dist/bin/named/zoneconf.c vendor/bind9/dist/bin/nsupdate/nsupdate.c vendor/bind9/dist/bin/rndc/rndc.c vendor/bind9/dist/config.h.in vendor/bind9/dist/configure.in vendor/bind9/dist/doc/arm/Bv9ARM-book.xml vendor/bind9/dist/doc/arm/Bv9ARM.ch01.html vendor/bind9/dist/doc/arm/Bv9ARM.ch02.html vendor/bind9/dist/doc/arm/Bv9ARM.ch03.html vendor/bind9/dist/doc/arm/Bv9ARM.ch04.html vendor/bind9/dist/doc/arm/Bv9ARM.ch05.html vendor/bind9/dist/doc/arm/Bv9ARM.ch06.html vendor/bind9/dist/doc/arm/Bv9ARM.ch07.html vendor/bind9/dist/doc/arm/Bv9ARM.ch08.html vendor/bind9/dist/doc/arm/Bv9ARM.ch09.html vendor/bind9/dist/doc/arm/Bv9ARM.ch10.html vendor/bind9/dist/doc/arm/Bv9ARM.html vendor/bind9/dist/doc/arm/Bv9ARM.pdf vendor/bind9/dist/doc/arm/Makefile.in vendor/bind9/dist/doc/arm/dnssec.xml vendor/bind9/dist/doc/arm/man.arpaname.html vendor/bind9/dist/doc/arm/man.ddns-confgen.html vendor/bind9/dist/doc/arm/man.dig.html vendor/bind9/dist/doc/arm/man.dnssec-checkds.html vendor/bind9/dist/doc/arm/man.dnssec-coverage.html vendor/bind9/dist/doc/arm/man.dnssec-dsfromkey.html vendor/bind9/dist/doc/arm/man.dnssec-keyfromlabel.html vendor/bind9/dist/doc/arm/man.dnssec-keygen.html vendor/bind9/dist/doc/arm/man.dnssec-revoke.html vendor/bind9/dist/doc/arm/man.dnssec-settime.html vendor/bind9/dist/doc/arm/man.dnssec-signzone.html vendor/bind9/dist/doc/arm/man.dnssec-verify.html vendor/bind9/dist/doc/arm/man.genrandom.html vendor/bind9/dist/doc/arm/man.host.html vendor/bind9/dist/doc/arm/man.isc-hmac-fixup.html vendor/bind9/dist/doc/arm/man.named-checkconf.html vendor/bind9/dist/doc/arm/man.named-checkzone.html vendor/bind9/dist/doc/arm/man.named-journalprint.html vendor/bind9/dist/doc/arm/man.named.html vendor/bind9/dist/doc/arm/man.nsec3hash.html vendor/bind9/dist/doc/arm/man.nsupdate.html vendor/bind9/dist/doc/arm/man.rndc-confgen.html vendor/bind9/dist/doc/arm/man.rndc.conf.html vendor/bind9/dist/doc/arm/man.rndc.html vendor/bind9/dist/lib/bind9/api vendor/bind9/dist/lib/bind9/check.c vendor/bind9/dist/lib/bind9/getaddresses.c vendor/bind9/dist/lib/dns/adb.c vendor/bind9/dist/lib/dns/api vendor/bind9/dist/lib/dns/diff.c vendor/bind9/dist/lib/dns/dispatch.c vendor/bind9/dist/lib/dns/gen.c vendor/bind9/dist/lib/dns/include/dns/dispatch.h vendor/bind9/dist/lib/dns/include/dns/log.h vendor/bind9/dist/lib/dns/include/dns/rbt.h vendor/bind9/dist/lib/dns/include/dns/request.h vendor/bind9/dist/lib/dns/journal.c vendor/bind9/dist/lib/dns/keytable.c vendor/bind9/dist/lib/dns/log.c vendor/bind9/dist/lib/dns/master.c vendor/bind9/dist/lib/dns/masterdump.c vendor/bind9/dist/lib/dns/message.c vendor/bind9/dist/lib/dns/name.c vendor/bind9/dist/lib/dns/nsec3.c vendor/bind9/dist/lib/dns/openssldh_link.c vendor/bind9/dist/lib/dns/opensslecdsa_link.c vendor/bind9/dist/lib/dns/opensslgost_link.c vendor/bind9/dist/lib/dns/private.c vendor/bind9/dist/lib/dns/rbt.c vendor/bind9/dist/lib/dns/rbtdb.c vendor/bind9/dist/lib/dns/rdata.c vendor/bind9/dist/lib/dns/rdata/generic/cdnskey_60.c vendor/bind9/dist/lib/dns/rdata/generic/cds_59.c vendor/bind9/dist/lib/dns/rdata/generic/keydata_65533.c vendor/bind9/dist/lib/dns/rdata/generic/nsec3_50.c vendor/bind9/dist/lib/dns/rdata/generic/opt_41.c vendor/bind9/dist/lib/dns/rdata/generic/rrsig_46.c vendor/bind9/dist/lib/dns/rdata/generic/sig_24.c vendor/bind9/dist/lib/dns/rdata/generic/spf_99.h vendor/bind9/dist/lib/dns/rdata/generic/txt_16.c vendor/bind9/dist/lib/dns/rdataset.c vendor/bind9/dist/lib/dns/request.c vendor/bind9/dist/lib/dns/resolver.c vendor/bind9/dist/lib/dns/rootns.c vendor/bind9/dist/lib/dns/spnego_asn1.c vendor/bind9/dist/lib/dns/tkey.c vendor/bind9/dist/lib/dns/tsig.c vendor/bind9/dist/lib/dns/validator.c vendor/bind9/dist/lib/dns/zone.c vendor/bind9/dist/lib/dns/zt.c vendor/bind9/dist/lib/export/isc/Makefile.in vendor/bind9/dist/lib/export/isc/unix/Makefile.in vendor/bind9/dist/lib/export/samples/nsprobe.c vendor/bind9/dist/lib/export/samples/sample-request.c vendor/bind9/dist/lib/export/samples/sample-update.c vendor/bind9/dist/lib/irs/getnameinfo.c vendor/bind9/dist/lib/isc/api vendor/bind9/dist/lib/isc/hash.c vendor/bind9/dist/lib/isc/hmacmd5.c vendor/bind9/dist/lib/isc/hmacsha.c vendor/bind9/dist/lib/isc/httpd.c vendor/bind9/dist/lib/isc/include/isc/platform.h.in vendor/bind9/dist/lib/isc/include/isc/radix.h vendor/bind9/dist/lib/isc/include/isc/ratelimiter.h vendor/bind9/dist/lib/isc/md5.c vendor/bind9/dist/lib/isc/mem.c vendor/bind9/dist/lib/isc/radix.c vendor/bind9/dist/lib/isc/ratelimiter.c vendor/bind9/dist/lib/isc/result.c vendor/bind9/dist/lib/isc/sha1.c vendor/bind9/dist/lib/isc/sha2.c vendor/bind9/dist/lib/isc/unix/app.c vendor/bind9/dist/lib/isc/unix/include/isc/net.h vendor/bind9/dist/lib/isc/unix/include/isc/time.h vendor/bind9/dist/lib/isc/unix/net.c vendor/bind9/dist/lib/isc/unix/socket.c vendor/bind9/dist/lib/isc/unix/stdio.c vendor/bind9/dist/lib/isc/unix/time.c vendor/bind9/dist/lib/isccfg/api vendor/bind9/dist/lib/isccfg/parser.c vendor/bind9/dist/lib/lwres/api vendor/bind9/dist/lib/lwres/compat.c vendor/bind9/dist/lib/lwres/gethost.c vendor/bind9/dist/lib/lwres/man/lwres.html vendor/bind9/dist/lib/lwres/man/lwres_buffer.html vendor/bind9/dist/lib/lwres/man/lwres_config.html vendor/bind9/dist/lib/lwres/man/lwres_context.html vendor/bind9/dist/lib/lwres/man/lwres_gabn.html vendor/bind9/dist/lib/lwres/man/lwres_gai_strerror.html vendor/bind9/dist/lib/lwres/man/lwres_getaddrinfo.html vendor/bind9/dist/lib/lwres/man/lwres_gethostent.html vendor/bind9/dist/lib/lwres/man/lwres_getipnode.html vendor/bind9/dist/lib/lwres/man/lwres_getnameinfo.html vendor/bind9/dist/lib/lwres/man/lwres_getrrsetbyname.html vendor/bind9/dist/lib/lwres/man/lwres_gnba.html vendor/bind9/dist/lib/lwres/man/lwres_hstrerror.html vendor/bind9/dist/lib/lwres/man/lwres_inetntop.html vendor/bind9/dist/lib/lwres/man/lwres_noop.html vendor/bind9/dist/lib/lwres/man/lwres_packet.html vendor/bind9/dist/lib/lwres/man/lwres_resutil.html vendor/bind9/dist/version Modified: vendor/bind9/dist/CHANGES ============================================================================== --- vendor/bind9/dist/CHANGES Wed Apr 8 17:52:23 2015 (r281267) +++ vendor/bind9/dist/CHANGES Wed Apr 8 17:52:54 2015 (r281268) @@ -1,11 +1,145 @@ - --- 9.9.6-P2 released --- + --- 9.9.7 released --- + + --- 9.9.7rc2 released --- + +4061. [bug] Handle timeout in legacy system test. [RT #38573] + +4060. [bug] dns_rdata_freestruct could be called on a + uninitialised structure when handling a error. + [RT #38568] + +4059. [bug] Addressed valgrind warnings. [RT #38549] + +4058. [bug] UDP dispatches could use the wrong pseudorandom + number generator context. [RT #38578] + +4056. [bug] Fixed several small bugs in automatic trust anchor + management, including a memory leak and a possible + loss of key state information. [RT #38458] + +4057. [bug] 'dnssec-dsfromkey -T 0' failed to add ttl field. + [RT #38565] 4053. [security] Revoking a managed trust anchor and supplying an untrusted replacement could cause named to crash with an assertion failure. (CVE-2015-1349) [RT #38344] - --- 9.9.6-P1 released --- +4052. [bug] Fix a leak of query fetchlock. [RT #38454] + +4050. [bug] RPZ could send spurious SERVFAILs in response + to duplicate queries. [RT #38510] + +4049. [bug] CDS and CDNSKEY had the wrong attributes. [RT #38491] + +4048. [bug] adb hash table was not being grown. [RT #38470] + + --- 9.9.7rc1 released --- + +4047. [cleanup] "named -V" now reports the current running versions + of OpenSSL and the libxml2 libraries, in addition to + the versions that were in use at build time. + +4046. [bug] Accounting of "total use" in memory context + statistics was not correct. [RT #38370] + +4045. [bug] Skip to next master on dns_request_createvia4 failure. + [RT #25185] + +4044. [bug] Change 3955 was not complete, resulting in an assertion + failure if the timing was just right. [RT #38352] + +4039. [cleanup] Cleaned up warnings from gcc -Wshadow. [RT #37381] + +4038. [bug] Add 'rpz' flag to node and use it to determine whether + to call dns_rpz_delete. This should prevent unbalanced + add / delete calls. [RT #36888] + +4037. [bug] also-notify was ignoring the tsig key when checking + for duplicates resulting in some expected notify + messages not being sent. [RT #38369] + +4035. [bug] Close temporary and NZF FILE pointers before moving + the former into the latter's place, as required on + Windows. [RT #38332] + +4032. [bug] Built-in "empty" zones did not correctly inherit the + "allow-transfer" ACL from the options or view. + [RT #38310] + +4031. [bug] named-checkconf -z failed to report a missing file + with a hint zone. [RT #38294] + +4028. [bug] $GENERATE with a zero step was not being caught as a + error. A $GENERATE with a / but no step was not being + caught as a error. [RT #38262] + +3973. [test] Added hooks for Google Performance Tools CPU profiler, + including real-time/wall-clock profiling. Use + "configure --with-gperftools-profiler" to enable. + [RT #37339] + + --- 9.9.7b1 released --- + +4027. [port] Net::DNS 0.81 compatibility. [RT #38165] + +4026. [bug] Fix RFC 3658 reference in dig +sigchase. [RT #38173] + +4025. [port] bsdi: failed to build. [RT #38047] + +4024. [bug] dns_rdata_opt_first, dns_rdata_opt_next, + dns_rdata_opt_current, dns_rdata_txt_first, + dns_rdata_txt_next and dns_rdata_txt_current were + documented but not implemented. These have now been + implemented. + + dns_rdata_spf_first, dns_rdata_spf_next and + dns_rdata_spf_current were documented but not + implemented. The prototypes for these + functions have been removed. [RT #38068] + +4023. [bug] win32: socket handling with explicit ports and + invoking named with -4 was broken for some + configurations. [RT #38068] + +4021. [bug] Adjust max-recursion-queries to accommodate + the need for more queries when the cache is + empty. [RT #38104] + +4020. [bug] Change 3736 broke nsupdate's SOA MNAME discovery + resulting in updates being sent to the wrong server. + [RT #37925] + +4019. [func] If named is not configured to validate the answer + then allow fallback to plain DNS on timeout even + when we know the server supports EDNS. [RT #37978] + +4018. [bug] Fall back to plain DNS when EDNS queries are being + dropped was failing. [RT #37965] + +4017. [test] Add system test to check lookups to legacy servers + with broken DNS behavior. [RT #37965] + +4016. [bug] Fix a dig segfault due to bad linked list usage. + [RT #37591] + +4015. [bug] Nameservers that are skipped due to them being + CNAMEs were not being logged. They are now logged + to category 'cname' as per BIND 8. [RT #37935] + +4014. [bug] When including a master file origin_changed was + not being properly set leading to a potentially + spurious 'inherited owner' warning. [RT #37919] + +4012. [bug] Check returned status of OpenSSL digest and HMAC + functions when they return one. Note this applies + only to FIPS capable OpenSSL libraries put in + FIPS mode and MD5. [RT #37944] + +4011. [bug] master's list port inheritance was not properly + implemented. [RT #37792] + +4007. [doc] Remove acl forward reference restriction. [RT #37772] 4006. [security] A flaw in delegation handling could be exploited to put named into an infinite loop. This has @@ -19,6 +153,99 @@ "max-recursion-depth" option, and the query limit via the "max-recursion-queries" option. [RT #37580] +4004. [bug] When delegations had AAAA glue but not A, a + reference could be leaked causing an assertion + failure on shutdown. [RT #37796] + +4000. [bug] NXDOMAIN redirection incorrectly handled NXRRSET + from the redirect zone. [RT #37722] + +3998. [bug] isc_radix_search was returning matches that were + too precise. [RT #37680] + +3997. [protocol] Add OPENGPGKEY record. [RT# 37671] + +3996. [bug] Address use after free on out of memory error in + keyring_add. [RT #37639] + +3995. [bug] receive_secure_serial holds the zone lock for too + long. [RT #37626] + +3990. [testing] Add tests for unknown DNSSEC algorithm handling. + [RT #37541] + +3989. [cleanup] Remove redundant dns_db_resigned calls. [RT #35748] + +3987. [func] Handle future Visual Studio 14 incompatible changes. + [RT #37380] + +3986. [doc] Add the BIND version number to page footers + in the ARM. [RT #37398] + +3985. [doc] Describe how +ndots and +search interact in dig. + [RT #37529] + +3982. [doc] Include release notes in product documentation. + [RT #37272] + +3981. [bug] Cache DS/NXDOMAIN independently of other query types. + [RT #37467] + +3978. [test] Added a unit test for Diffie-Hellman key + computation, completing change #3974. [RT #37477] + +3976. [bug] When refreshing managed-key trust anchors, clear + any cached trust so that they will always be + revalidated with the current set of secure + roots. [RT #37506] + +3974. [bug] Handle DH_compute_key() failure correctly in + openssldh_link.c. [RT #37477] + +3972. [bug] Fix host's usage statement. [RT #37397] + +3971. [bug] Reduce the cascading failures due to a bad $TTL line + in named-checkconf / named-checkzone. [RT #37138] + +3970. [contrib] Fixed a use after free bug in the SDB LDAP driver. + [RT #37237] + +3968. [bug] Silence spurious log messages when using 'named -[46]'. + [RT #37308] + +3967. [test] Add test for inlined signed zone in multiple views + with different DNSKEY sets. [RT #35759] + +3966. [bug] Missing dns_db_closeversion call in receive_secure_db. + [RT #35746] + +3962. [bug] 'dig +topdown +trace +sigchase' address unhandled error + conditions. [RT #34663] + +3961. [bug] Forwarding of SIG(0) signed UPDATE messages failed with + BADSIG. [RT #37216] + +3960. [bug] 'dig +sigchase' could loop forever. [RT #37220] + +3959. [bug] Updates could be lost if they arrived immediately + after a rndc thaw. [RT #37233] + +3958. [bug] Detect when writeable files have multiple references + in named.conf. [RT #37172] + +3957. [bug] "dnssec-keygen -S" failed for ECCGOST, ECDSAP256SHA256 + and ECDSAP384SHA384. [RT #37183] + +3955. [bug] Notify messages due to changes are no longer queued + behind startup notify messages. [RT #24454] + +3954. [bug] Unchecked mutex init in dlz_dlopen_driver.c [RT #37112] + +3953. [bug] Don't escape semi-colon in TXT fields. [RT #37159] + +3952. [bug] dns_name_fullcompare failed to set *nlabelsp when the + two name pointers were the same. [RT #37176] + --- 9.9.6 released --- 3950. [port] Changed the bin/python Makefile to work around a @@ -63,7 +290,7 @@ 3922. [bug] When resigning, dnssec-signzone was removing all signatures from delegation nodes. It now - retains DS and (if applicable) NSEC signatures. + retains DS and (if applicable) NSEC signatures. [RT #36946] 3921. [bug] AD was inappropriately set on RPZ responses. [RT #36833] Modified: vendor/bind9/dist/COPYRIGHT ============================================================================== --- vendor/bind9/dist/COPYRIGHT Wed Apr 8 17:52:23 2015 (r281267) +++ vendor/bind9/dist/COPYRIGHT Wed Apr 8 17:52:54 2015 (r281268) @@ -1,4 +1,4 @@ -Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 1996-2003 Internet Software Consortium. Permission to use, copy, modify, and/or distribute this software for any Modified: vendor/bind9/dist/FAQ.xml ============================================================================== --- vendor/bind9/dist/FAQ.xml Wed Apr 8 17:52:23 2015 (r281267) +++ vendor/bind9/dist/FAQ.xml Wed Apr 8 17:52:54 2015 (r281268) @@ -1,7 +1,7 @@ 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-all@FreeBSD.ORG Thu Apr 9 10:05:59 2015 Return-Path: Delivered-To: svn-src-all@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 A40C93D6; Thu, 9 Apr 2015 10:05: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 8EC88C5C; Thu, 9 Apr 2015 10:05: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 t39A5xsv010765; Thu, 9 Apr 2015 10:05:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39A5x2X010764; Thu, 9 Apr 2015 10:05:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091005.t39A5x2X010764@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 10:05:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281298 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:05:59 -0000 Author: mav Date: Thu Apr 9 10:05:58 2015 New Revision: 281298 URL: https://svnweb.freebsd.org/changeset/base/281298 Log: MFC r280685: When searching for provider by name, prefer non-withered one. Modified: stable/10/sys/geom/geom_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_subr.c ============================================================================== --- stable/10/sys/geom/geom_subr.c Thu Apr 9 10:00:26 2015 (r281297) +++ stable/10/sys/geom/geom_subr.c Thu Apr 9 10:05:58 2015 (r281298) @@ -683,21 +683,27 @@ g_provider_by_name(char const *arg) { struct g_class *cp; struct g_geom *gp; - struct g_provider *pp; + struct g_provider *pp, *wpp; if (strncmp(arg, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) arg += sizeof(_PATH_DEV) - 1; + wpp = NULL; LIST_FOREACH(cp, &g_classes, class) { LIST_FOREACH(gp, &cp->geom, geom) { LIST_FOREACH(pp, &gp->provider, provider) { - if (!strcmp(arg, pp->name)) + if (strcmp(arg, pp->name) != 0) + continue; + if ((gp->flags & G_GEOM_WITHER) == 0 && + (pp->flags & G_PF_WITHER) == 0) return (pp); + else + wpp = pp; } } } - return (NULL); + return (wpp); } void From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 10:07:07 2015 Return-Path: Delivered-To: svn-src-all@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 65FEF51C; Thu, 9 Apr 2015 10: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 50A2AC77; Thu, 9 Apr 2015 10: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 t39A77wd010995; Thu, 9 Apr 2015 10:07:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39A7706010994; Thu, 9 Apr 2015 10:07:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091007.t39A7706010994@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 10:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281299 - stable/9/sys/geom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:07:07 -0000 Author: mav Date: Thu Apr 9 10:07:06 2015 New Revision: 281299 URL: https://svnweb.freebsd.org/changeset/base/281299 Log: MFC r280685: When searching for provider by name, prefer non-withered one. Modified: stable/9/sys/geom/geom_subr.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_subr.c ============================================================================== --- stable/9/sys/geom/geom_subr.c Thu Apr 9 10:05:58 2015 (r281298) +++ stable/9/sys/geom/geom_subr.c Thu Apr 9 10:07:06 2015 (r281299) @@ -606,21 +606,27 @@ g_provider_by_name(char const *arg) { struct g_class *cp; struct g_geom *gp; - struct g_provider *pp; + struct g_provider *pp, *wpp; if (strncmp(arg, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) arg += sizeof(_PATH_DEV) - 1; + wpp = NULL; LIST_FOREACH(cp, &g_classes, class) { LIST_FOREACH(gp, &cp->geom, geom) { LIST_FOREACH(pp, &gp->provider, provider) { - if (!strcmp(arg, pp->name)) + if (strcmp(arg, pp->name) != 0) + continue; + if ((gp->flags & G_GEOM_WITHER) == 0 && + (pp->flags & G_PF_WITHER) == 0) return (pp); + else + wpp = pp; } } } - return (NULL); + return (wpp); } void From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 10:08:11 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 10:08:12 2015 Return-Path: Delivered-To: svn-src-all@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 59BD9661; Thu, 9 Apr 2015 10:08: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 44E57C85; Thu, 9 Apr 2015 10:08: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 t39A8CLU011299; Thu, 9 Apr 2015 10:08:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39A8C1J011298; Thu, 9 Apr 2015 10:08:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091008.t39A8C1J011298@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 10:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281301 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:08:12 -0000 Author: mav Date: Thu Apr 9 10:08:11 2015 New Revision: 281301 URL: https://svnweb.freebsd.org/changeset/base/281301 Log: MFC r280686: Report withered providers as such alike to GEOMs. Modified: stable/10/sys/geom/geom_dump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_dump.c ============================================================================== --- stable/10/sys/geom/geom_dump.c Thu Apr 9 10:08:10 2015 (r281300) +++ stable/10/sys/geom/geom_dump.c Thu Apr 9 10:08:11 2015 (r281301) @@ -215,7 +215,9 @@ g_conf_provider(struct sbuf *sb, struct sbuf_printf(sb, "\t %u\n", pp->sectorsize); sbuf_printf(sb, "\t %u\n", pp->stripesize); sbuf_printf(sb, "\t %u\n", pp->stripeoffset); - if (pp->geom->flags & G_GEOM_WITHER) + if (pp->flags & G_PF_WITHER) + sbuf_printf(sb, "\t \n"); + else if (pp->geom->flags & G_GEOM_WITHER) ; else if (pp->geom->dumpconf != NULL) { sbuf_printf(sb, "\t \n"); From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 10:08:50 2015 Return-Path: Delivered-To: svn-src-all@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 910248DB; Thu, 9 Apr 2015 10:08: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 7B93AC94; Thu, 9 Apr 2015 10:08: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 t39A8oL9011439; Thu, 9 Apr 2015 10:08:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39A8ob0011438; Thu, 9 Apr 2015 10:08:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091008.t39A8ob0011438@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 10:08:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281302 - stable/9/sys/geom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:08:50 -0000 Author: mav Date: Thu Apr 9 10:08:49 2015 New Revision: 281302 URL: https://svnweb.freebsd.org/changeset/base/281302 Log: MFC r280686: Report withered providers as such alike to GEOMs. Modified: stable/9/sys/geom/geom_dump.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_dump.c ============================================================================== --- stable/9/sys/geom/geom_dump.c Thu Apr 9 10:08:11 2015 (r281301) +++ stable/9/sys/geom/geom_dump.c Thu Apr 9 10:08:49 2015 (r281302) @@ -214,7 +214,9 @@ g_conf_provider(struct sbuf *sb, struct sbuf_printf(sb, "\t %u\n", pp->sectorsize); sbuf_printf(sb, "\t %u\n", pp->stripesize); sbuf_printf(sb, "\t %u\n", pp->stripeoffset); - if (pp->geom->flags & G_GEOM_WITHER) + if (pp->flags & G_PF_WITHER) + sbuf_printf(sb, "\t \n"); + else if (pp->geom->flags & G_GEOM_WITHER) ; else if (pp->geom->dumpconf != NULL) { sbuf_printf(sb, "\t \n"); From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 10:10:07 2015 Return-Path: Delivered-To: svn-src-all@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 90DD8B92; Thu, 9 Apr 2015 10:10: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 7ACBECAB; Thu, 9 Apr 2015 10:10: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 t39AA7oE011763; Thu, 9 Apr 2015 10:10:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39AA6UO011758; Thu, 9 Apr 2015 10:10:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091010.t39AA6UO011758@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 10:10:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281303 - in stable/10: lib/libgeom sbin/geom/class/part sys/geom/part X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:10:07 -0000 Author: mav Date: Thu Apr 9 10:10:05 2015 New Revision: 281303 URL: https://svnweb.freebsd.org/changeset/base/281303 Log: MFC r280687: Make GEOM_PART work in presence of previous withered self. Modified: stable/10/lib/libgeom/geom_xml2tree.c stable/10/sbin/geom/class/part/geom_part.c stable/10/sys/geom/part/g_part.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libgeom/geom_xml2tree.c ============================================================================== --- stable/10/lib/libgeom/geom_xml2tree.c Thu Apr 9 10:08:49 2015 (r281302) +++ stable/10/lib/libgeom/geom_xml2tree.c Thu Apr 9 10:10:05 2015 (r281303) @@ -186,6 +186,7 @@ static void EndElement(void *userData, const char *name) { struct mystate *mt; + struct gconf *c; struct gconfig *gc; char *p; @@ -259,7 +260,14 @@ EndElement(void *userData, const char *n return; } - if (mt->config != NULL) { + if (mt->config != NULL || (!strcmp(name, "wither") && + (mt->provider != NULL || mt->geom != NULL))) { + if (mt->config != NULL) + c = mt->config; + else if (mt->provider != NULL) + c = &mt->provider->lg_config; + else + c = &mt->geom->lg_config; gc = calloc(1, sizeof *gc); if (gc == NULL) { mt->error = errno; @@ -270,14 +278,15 @@ EndElement(void *userData, const char *n } gc->lg_name = strdup(name); if (gc->lg_name == NULL) { + free(gc); mt->error = errno; XML_StopParser(mt->parser, 0); warn("Cannot allocate memory during processing of '%s' " "element", name); return; } - gc->lg_val = p; - LIST_INSERT_HEAD(mt->config, gc, lg_config); + gc->lg_val = p ? p : strdup("1"); + LIST_INSERT_HEAD(c, gc, lg_config); return; } Modified: stable/10/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/10/sbin/geom/class/part/geom_part.c Thu Apr 9 10:08:49 2015 (r281302) +++ stable/10/sbin/geom/class/part/geom_part.c Thu Apr 9 10:10:05 2015 (r281303) @@ -207,15 +207,20 @@ find_class(struct gmesh *mesh, const cha static struct ggeom * find_geom(struct gclass *classp, const char *name) { - struct ggeom *gp; + struct ggeom *gp, *wgp; if (strncmp(name, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) name += sizeof(_PATH_DEV) - 1; + wgp = NULL; LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { - if (strcmp(gp->lg_name, name) == 0) + if (strcmp(gp->lg_name, name) != 0) + continue; + if (find_geomcfg(gp, "wither") == NULL) return (gp); + else + wgp = gp; } - return (NULL); + return (wgp); } static const char * @@ -598,6 +603,8 @@ gpart_show_geom(struct ggeom *gp, const off_t length, secsz; int idx, wblocks, wname, wmax; + if (find_geomcfg(gp, "wither")) + return; scheme = find_geomcfg(gp, "scheme"); if (scheme == NULL) errx(EXIT_FAILURE, "Scheme not found for geom %s", gp->lg_name); Modified: stable/10/sys/geom/part/g_part.c ============================================================================== --- stable/10/sys/geom/part/g_part.c Thu Apr 9 10:08:49 2015 (r281302) +++ stable/10/sys/geom/part/g_part.c Thu Apr 9 10:10:05 2015 (r281303) @@ -451,7 +451,8 @@ g_part_find_geom(const char *name) { struct g_geom *gp; LIST_FOREACH(gp, &g_part_class.geom, geom) { - if (!strcmp(name, gp->name)) + if ((gp->flags & G_GEOM_WITHER) == 0 && + strcmp(name, gp->name) == 0) break; } return (gp); @@ -473,10 +474,6 @@ g_part_parm_geom(struct gctl_req *req, c gctl_error(req, "%d %s '%s'", EINVAL, name, gname); return (EINVAL); } - if ((gp->flags & G_GEOM_WITHER) != 0) { - gctl_error(req, "%d %s", ENXIO, gname); - return (ENXIO); - } *v = gp; return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 10:10:41 2015 Return-Path: Delivered-To: svn-src-all@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 EA9C7CD3; Thu, 9 Apr 2015 10:10: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 D4A94CB7; Thu, 9 Apr 2015 10:10: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 t39AAenv012502; Thu, 9 Apr 2015 10:10:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39AAdSn012499; Thu, 9 Apr 2015 10:10:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091010.t39AAdSn012499@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 10:10:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281304 - in stable/9: lib/libgeom sbin/geom/class/part sys/geom/part X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:10:41 -0000 Author: mav Date: Thu Apr 9 10:10:38 2015 New Revision: 281304 URL: https://svnweb.freebsd.org/changeset/base/281304 Log: MFC r280687: Make GEOM_PART work in presence of previous withered self. Modified: stable/9/lib/libgeom/geom_xml2tree.c stable/9/sbin/geom/class/part/geom_part.c stable/9/sys/geom/part/g_part.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libgeom/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/geom/ (props changed) stable/9/sbin/geom/class/part/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/lib/libgeom/geom_xml2tree.c ============================================================================== --- stable/9/lib/libgeom/geom_xml2tree.c Thu Apr 9 10:10:05 2015 (r281303) +++ stable/9/lib/libgeom/geom_xml2tree.c Thu Apr 9 10:10:38 2015 (r281304) @@ -186,6 +186,7 @@ static void EndElement(void *userData, const char *name) { struct mystate *mt; + struct gconf *c; struct gconfig *gc; char *p; @@ -259,7 +260,14 @@ EndElement(void *userData, const char *n return; } - if (mt->config != NULL) { + if (mt->config != NULL || (!strcmp(name, "wither") && + (mt->provider != NULL || mt->geom != NULL))) { + if (mt->config != NULL) + c = mt->config; + else if (mt->provider != NULL) + c = &mt->provider->lg_config; + else + c = &mt->geom->lg_config; gc = calloc(1, sizeof *gc); if (gc == NULL) { mt->error = errno; @@ -270,14 +278,15 @@ EndElement(void *userData, const char *n } gc->lg_name = strdup(name); if (gc->lg_name == NULL) { + free(gc); mt->error = errno; XML_StopParser(mt->parser, 0); warn("Cannot allocate memory during processing of '%s' " "element", name); return; } - gc->lg_val = p; - LIST_INSERT_HEAD(mt->config, gc, lg_config); + gc->lg_val = p ? p : strdup("1"); + LIST_INSERT_HEAD(c, gc, lg_config); return; } Modified: stable/9/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/9/sbin/geom/class/part/geom_part.c Thu Apr 9 10:10:05 2015 (r281303) +++ stable/9/sbin/geom/class/part/geom_part.c Thu Apr 9 10:10:38 2015 (r281304) @@ -207,15 +207,20 @@ find_class(struct gmesh *mesh, const cha static struct ggeom * find_geom(struct gclass *classp, const char *name) { - struct ggeom *gp; + struct ggeom *gp, *wgp; if (strncmp(name, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) name += sizeof(_PATH_DEV) - 1; + wgp = NULL; LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { - if (strcmp(gp->lg_name, name) == 0) + if (strcmp(gp->lg_name, name) != 0) + continue; + if (find_geomcfg(gp, "wither") == NULL) return (gp); + else + wgp = gp; } - return (NULL); + return (wgp); } static const char * @@ -598,6 +603,8 @@ gpart_show_geom(struct ggeom *gp, const off_t length, secsz; int idx, wblocks, wname, wmax; + if (find_geomcfg(gp, "wither")) + return; scheme = find_geomcfg(gp, "scheme"); if (scheme == NULL) errx(EXIT_FAILURE, "Scheme not found for geom %s", gp->lg_name); Modified: stable/9/sys/geom/part/g_part.c ============================================================================== --- stable/9/sys/geom/part/g_part.c Thu Apr 9 10:10:05 2015 (r281303) +++ stable/9/sys/geom/part/g_part.c Thu Apr 9 10:10:38 2015 (r281304) @@ -439,7 +439,8 @@ g_part_find_geom(const char *name) { struct g_geom *gp; LIST_FOREACH(gp, &g_part_class.geom, geom) { - if (!strcmp(name, gp->name)) + if ((gp->flags & G_GEOM_WITHER) == 0 && + strcmp(name, gp->name) == 0) break; } return (gp); @@ -461,10 +462,6 @@ g_part_parm_geom(struct gctl_req *req, c gctl_error(req, "%d %s '%s'", EINVAL, name, gname); return (EINVAL); } - if ((gp->flags & G_GEOM_WITHER) != 0) { - gctl_error(req, "%d %s", ENXIO, gname); - return (ENXIO); - } *v = gp; return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 10:11:48 2015 Return-Path: Delivered-To: svn-src-all@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 29D1CE63; Thu, 9 Apr 2015 10:11: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 149C8D66; Thu, 9 Apr 2015 10:11: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 t39ABl0F015078; Thu, 9 Apr 2015 10:11:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39ABlP4015077; Thu, 9 Apr 2015 10:11:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091011.t39ABlP4015077@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 10:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281305 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:11:48 -0000 Author: mav Date: Thu Apr 9 10:11:47 2015 New Revision: 281305 URL: https://svnweb.freebsd.org/changeset/base/281305 Log: MFC r280702: Make swapper release orphaned (lost) GEOM provider. Swap device is still reported as enabled, and system still may crash later if some swapped-out kernel pages were lost with the device, but at least GEOM and CAM can now release the lost disk, allowing it to be reconnected. Modified: stable/10/sys/vm/swap_pager.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/swap_pager.c ============================================================================== --- stable/10/sys/vm/swap_pager.c Thu Apr 9 10:10:38 2015 (r281304) +++ stable/10/sys/vm/swap_pager.c Thu Apr 9 10:11:47 2015 (r281305) @@ -2527,18 +2527,42 @@ DECLARE_GEOM_CLASS(g_swap_class, g_class static void +swapgeom_close_ev(void *arg, int flags) +{ + struct g_consumer *cp; + + cp = arg; + g_access(cp, -1, -1, 0); + g_detach(cp); + g_destroy_consumer(cp); +} + +static void 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; bp->b_ioflags = bp2->bio_flags; if (bp2->bio_error) bp->b_ioflags |= BIO_ERROR; bp->b_resid = bp->b_bcount - bp2->bio_completed; 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; + } + mtx_unlock(&sw_dev_mtx); g_destroy_bio(bp2); + if (destroy) + g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); } static void @@ -2547,13 +2571,17 @@ swapgeom_strategy(struct buf *bp, struct struct bio *bio; struct g_consumer *cp; + mtx_lock(&sw_dev_mtx); cp = sp->sw_id; if (cp == NULL) { + mtx_unlock(&sw_dev_mtx); bp->b_error = ENXIO; bp->b_ioflags |= BIO_ERROR; bufdone(bp); return; } + cp->index++; + mtx_unlock(&sw_dev_mtx); if (bp->b_iocmd == BIO_WRITE) bio = g_new_bio(); else @@ -2565,6 +2593,7 @@ swapgeom_strategy(struct buf *bp, struct return; } + bio->bio_caller1 = sp; bio->bio_caller2 = bp; bio->bio_cmd = bp->b_iocmd; bio->bio_offset = (bp->b_blkno - sp->sw_first) * PAGE_SIZE; @@ -2588,31 +2617,36 @@ static void swapgeom_orphan(struct g_consumer *cp) { struct swdevt *sp; + int destroy; mtx_lock(&sw_dev_mtx); - TAILQ_FOREACH(sp, &swtailq, sw_list) - if (sp->sw_id == cp) + TAILQ_FOREACH(sp, &swtailq, sw_list) { + if (sp->sw_id == cp) { sp->sw_flags |= SW_CLOSING; + break; + } + } + cp->private = (void *)(uintptr_t)1; + destroy = ((sp != NULL) && (cp->index == 0)); + if (destroy) + sp->sw_id = NULL; mtx_unlock(&sw_dev_mtx); -} - -static void -swapgeom_close_ev(void *arg, int flags) -{ - struct g_consumer *cp; - - cp = arg; - g_access(cp, -1, -1, 0); - g_detach(cp); - g_destroy_consumer(cp); + if (destroy) + swapgeom_close_ev(cp, 0); } static void swapgeom_close(struct thread *td, struct swdevt *sw) { + struct g_consumer *cp; + mtx_lock(&sw_dev_mtx); + cp = sw->sw_id; + sw->sw_id = NULL; + mtx_unlock(&sw_dev_mtx); /* XXX: direct call when Giant untangled */ - g_waitfor_event(swapgeom_close_ev, sw->sw_id, M_WAITOK, NULL); + if (cp != NULL) + g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); } @@ -2653,6 +2687,8 @@ swapongeom_ev(void *arg, int flags) if (gp == NULL) gp = g_new_geomf(&g_swap_class, "swap"); cp = g_new_consumer(gp); + cp->index = 0; /* Number of active I/Os. */ + cp->private = NULL; /* Orphanization flag */ g_attach(cp, pp); /* * XXX: Everytime you think you can improve the margin for From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 10:12:59 2015 Return-Path: Delivered-To: svn-src-all@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 7001BFA7; Thu, 9 Apr 2015 10:12: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 5A8B5D76; Thu, 9 Apr 2015 10:12: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 t39ACwLf015768; Thu, 9 Apr 2015 10:12:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39ACw2C015767; Thu, 9 Apr 2015 10:12:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504091012.t39ACw2C015767@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 10:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281306 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 10:12:59 -0000 Author: mav Date: Thu Apr 9 10:12:58 2015 New Revision: 281306 URL: https://svnweb.freebsd.org/changeset/base/281306 Log: MFC r280702: Make swapper release orphaned (lost) GEOM provider. Swap device is still reported as enabled, and system still may crash later if some swapped-out kernel pages were lost with the device, but at least GEOM and CAM can now release the lost disk, allowing it to be reconnected. Modified: stable/9/sys/vm/swap_pager.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/vm/swap_pager.c ============================================================================== --- stable/9/sys/vm/swap_pager.c Thu Apr 9 10:11:47 2015 (r281305) +++ stable/9/sys/vm/swap_pager.c Thu Apr 9 10:12:58 2015 (r281306) @@ -2508,18 +2508,42 @@ DECLARE_GEOM_CLASS(g_swap_class, g_class static void +swapgeom_close_ev(void *arg, int flags) +{ + struct g_consumer *cp; + + cp = arg; + g_access(cp, -1, -1, 0); + g_detach(cp); + g_destroy_consumer(cp); +} + +static void 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; bp->b_ioflags = bp2->bio_flags; if (bp2->bio_error) bp->b_ioflags |= BIO_ERROR; bp->b_resid = bp->b_bcount - bp2->bio_completed; 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; + } + mtx_unlock(&sw_dev_mtx); g_destroy_bio(bp2); + if (destroy) + g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); } static void @@ -2528,13 +2552,17 @@ swapgeom_strategy(struct buf *bp, struct struct bio *bio; struct g_consumer *cp; + mtx_lock(&sw_dev_mtx); cp = sp->sw_id; if (cp == NULL) { + mtx_unlock(&sw_dev_mtx); bp->b_error = ENXIO; bp->b_ioflags |= BIO_ERROR; bufdone(bp); return; } + cp->index++; + mtx_unlock(&sw_dev_mtx); if (bp->b_iocmd == BIO_WRITE) bio = g_new_bio(); else @@ -2546,6 +2574,7 @@ swapgeom_strategy(struct buf *bp, struct return; } + bio->bio_caller1 = sp; bio->bio_caller2 = bp; bio->bio_cmd = bp->b_iocmd; bio->bio_offset = (bp->b_blkno - sp->sw_first) * PAGE_SIZE; @@ -2569,31 +2598,36 @@ static void swapgeom_orphan(struct g_consumer *cp) { struct swdevt *sp; + int destroy; mtx_lock(&sw_dev_mtx); - TAILQ_FOREACH(sp, &swtailq, sw_list) - if (sp->sw_id == cp) + TAILQ_FOREACH(sp, &swtailq, sw_list) { + if (sp->sw_id == cp) { sp->sw_flags |= SW_CLOSING; + break; + } + } + cp->private = (void *)(uintptr_t)1; + destroy = ((sp != NULL) && (cp->index == 0)); + if (destroy) + sp->sw_id = NULL; mtx_unlock(&sw_dev_mtx); -} - -static void -swapgeom_close_ev(void *arg, int flags) -{ - struct g_consumer *cp; - - cp = arg; - g_access(cp, -1, -1, 0); - g_detach(cp); - g_destroy_consumer(cp); + if (destroy) + swapgeom_close_ev(cp, 0); } static void swapgeom_close(struct thread *td, struct swdevt *sw) { + struct g_consumer *cp; + mtx_lock(&sw_dev_mtx); + cp = sw->sw_id; + sw->sw_id = NULL; + mtx_unlock(&sw_dev_mtx); /* XXX: direct call when Giant untangled */ - g_waitfor_event(swapgeom_close_ev, sw->sw_id, M_WAITOK, NULL); + if (cp != NULL) + g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); } @@ -2634,6 +2668,8 @@ swapongeom_ev(void *arg, int flags) if (gp == NULL) gp = g_new_geomf(&g_swap_class, "swap"); cp = g_new_consumer(gp); + cp->index = 0; /* Number of active I/Os. */ + cp->private = NULL; /* Orphanization flag */ g_attach(cp, pp); /* * XXX: Everytime you think you can improve the margin for From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 10:15:48 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 10:28:06 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 11:38:11 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 12:57:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 13:03:36 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 13:09:07 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 13:45:18 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 14:31:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 14:44:31 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 15:08:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 16:52:54 2015 Return-Path: Delivered-To: svn-src-all@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 30F72555; Thu, 9 Apr 2015 16:52: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 116206CB; Thu, 9 Apr 2015 16:52: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 t39Gqr28008590; Thu, 9 Apr 2015 16:52:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Gqr43008589; Thu, 9 Apr 2015 16:52:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504091652.t39Gqr43008589@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 9 Apr 2015 16:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281314 - stable/9/tools/regression/sockets/unix_passfd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 16:52:54 -0000 Author: ngie Date: Thu Apr 9 16:52:53 2015 New Revision: 281314 URL: https://svnweb.freebsd.org/changeset/base/281314 Log: MFstable/10 r228371: This missing MFC fixes PR 199308 r228371 (by jhb): - Add a test for PR 151758. - While here, make this compile and work on non-i386: - Use CMSG_SPACE(), CMSG_LEN(), and CMSG_FIRSTHDR() instead of ignoring padding between 'struct cmsghdr' and control message payloads. - Don't initialize the control message before calling recvmsg(). Instead, check that we get a valid control message on return from recvmsg(). - Use errx() instead of err() for some errors that don't report failures that set errno. Requested by: kib (1) Modified: stable/9/tools/regression/sockets/unix_passfd/unix_passfd.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) stable/9/tools/regression/sockets/ (props changed) Modified: stable/9/tools/regression/sockets/unix_passfd/unix_passfd.c ============================================================================== --- stable/9/tools/regression/sockets/unix_passfd/unix_passfd.c Thu Apr 9 15:08:39 2015 (r281313) +++ stable/9/tools/regression/sockets/unix_passfd/unix_passfd.c Thu Apr 9 16:52:53 2015 (r281314) @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -62,6 +63,17 @@ closesocketpair(int *fdp) } static void +devnull(const char *test, int *fdp) +{ + int fd; + + fd = open("/dev/null", O_RDONLY); + if (fd < 0) + err(-1, "%s: open(/dev/null)", test); + *fdp = fd; +} + +static void tempfile(const char *test, int *fdp) { char path[PATH_MAX]; @@ -88,9 +100,9 @@ samefile(const char *test, struct stat * { if (sb1->st_dev != sb2->st_dev) - err(-1, "%s: samefile: different device", test); + errx(-1, "%s: samefile: different device", test); if (sb1->st_ino != sb2->st_ino) - err(-1, "%s: samefile: different inode", test); + errx(-1, "%s: samefile: different inode", test); } static void @@ -99,10 +111,8 @@ sendfd(const char *test, int sockfd, int struct iovec iovec; char ch; - struct { - struct cmsghdr cmsghdr; - int fd; - } message; + char message[CMSG_SPACE(sizeof(int))]; + struct cmsghdr *cmsghdr; struct msghdr msghdr; ssize_t len; @@ -110,7 +120,7 @@ sendfd(const char *test, int sockfd, int bzero(&message, sizeof(message)); ch = 0; - msghdr.msg_control = &message; + msghdr.msg_control = message; msghdr.msg_controllen = sizeof(message); iovec.iov_base = &ch; @@ -119,35 +129,33 @@ sendfd(const char *test, int sockfd, int msghdr.msg_iov = &iovec; msghdr.msg_iovlen = 1; - message.cmsghdr.cmsg_len = sizeof(message); - message.cmsghdr.cmsg_level = SOL_SOCKET; - message.cmsghdr.cmsg_type = SCM_RIGHTS; - message.fd = sendfd; + cmsghdr = (struct cmsghdr *)message; + cmsghdr->cmsg_len = CMSG_LEN(sizeof(int)); + cmsghdr->cmsg_level = SOL_SOCKET; + cmsghdr->cmsg_type = SCM_RIGHTS; + *(int *)CMSG_DATA(cmsghdr) = sendfd; len = sendmsg(sockfd, &msghdr, 0); if (len < 0) err(-1, "%s: sendmsg", test); if (len != sizeof(ch)) - errx(-1, "%s: sendmsg: %d bytes sent", test, len); + errx(-1, "%s: sendmsg: %zd bytes sent", test, len); } static void recvfd(const char *test, int sockfd, int *recvfd) { - struct { - struct cmsghdr cmsghdr; - int fd; - } message; + struct cmsghdr *cmsghdr; + char message[CMSG_SPACE(sizeof(int))]; struct msghdr msghdr; struct iovec iovec; ssize_t len; char ch; bzero(&msghdr, sizeof(msghdr)); - bzero(&message, sizeof(message)); ch = 0; - msghdr.msg_control = &message; + msghdr.msg_control = message; msghdr.msg_controllen = sizeof(message); iovec.iov_base = &ch; @@ -161,19 +169,22 @@ recvfd(const char *test, int sockfd, int msghdr.msg_iov = &iovec; msghdr.msg_iovlen = 1; - message.cmsghdr.cmsg_len = sizeof(message); - message.cmsghdr.cmsg_level = SOL_SOCKET; - message.cmsghdr.cmsg_type = SCM_RIGHTS; - message.fd = -1; - len = recvmsg(sockfd, &msghdr, 0); if (len < 0) err(-1, "%s: recvmsg", test); if (len != sizeof(ch)) - errx(-1, "%s: recvmsg: %d bytes received", test, len); - if (message.fd == -1) + errx(-1, "%s: recvmsg: %zd bytes received", test, len); + cmsghdr = CMSG_FIRSTHDR(&msghdr); + if (cmsghdr == NULL) + errx(-1, "%s: recvmsg: did not receive control message", test); + if (cmsghdr->cmsg_len != CMSG_LEN(sizeof(int)) || + cmsghdr->cmsg_level != SOL_SOCKET || + cmsghdr->cmsg_type != SCM_RIGHTS) + errx(-1, "%s: recvmsg: did not receive single-fd message", + test); + *recvfd = *(int *)CMSG_DATA(cmsghdr); + if (*recvfd == -1) errx(-1, "%s: recvmsg: received fd -1", test); - *recvfd = message.fd; } int @@ -303,5 +314,22 @@ main(int argc, char *argv[]) printf("%s passed\n", test); + /* + * Test for PR 151758: Send an character device over the UNIX + * domain socket and then close both sockets to orphan the + * device. + */ + + test = "test7-devfsorphan"; + printf("beginning %s\n", test); + + domainsocketpair(test, fd); + devnull(test, &putfd_1); + sendfd(test, fd[0], putfd_1); + close(putfd_1); + closesocketpair(fd); + + printf("%s passed\n", test); + return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 17:56:27 2015 Return-Path: Delivered-To: svn-src-all@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 3346B789; Thu, 9 Apr 2015 17:56: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 0473BDEA; Thu, 9 Apr 2015 17:56: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 t39HuQok037623; Thu, 9 Apr 2015 17:56:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39HuQsN037622; Thu, 9 Apr 2015 17:56:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091756.t39HuQsN037622@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 17:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281315 - in stable: 10/sys/dev/cxgbe/tom 9/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 17:56:27 -0000 Author: jhb Date: Thu Apr 9 17:56:25 2015 New Revision: 281315 URL: https://svnweb.freebsd.org/changeset/base/281315 Log: MFC 279892: Resize receive socket buffers that support autosizing when receiving TCP data via direct data placement. Modified: stable/10/sys/dev/cxgbe/tom/t4_ddp.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/cxgbe/tom/t4_ddp.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_ddp.c Thu Apr 9 16:52:53 2015 (r281314) +++ stable/10/sys/dev/cxgbe/tom/t4_ddp.c Thu Apr 9 17:56:25 2015 (r281315) @@ -65,6 +65,13 @@ __FBSDID("$FreeBSD$"); #include "common/t4_tcb.h" #include "tom/t4_tom.h" +VNET_DECLARE(int, tcp_do_autorcvbuf); +#define V_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf) +VNET_DECLARE(int, tcp_autorcvbuf_inc); +#define V_tcp_autorcvbuf_inc VNET(tcp_autorcvbuf_inc) +VNET_DECLARE(int, tcp_autorcvbuf_max); +#define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) + #define PPOD_SZ(n) ((n) * sizeof(struct pagepod)) #define PPOD_SIZE (PPOD_SZ(1)) @@ -411,6 +418,21 @@ handle_ddp_data(struct toepcb *toep, __b else discourage_ddp(toep); + /* receive buffer autosize */ + if (sb->sb_flags & SB_AUTOSIZE && + V_tcp_do_autorcvbuf && + sb->sb_hiwat < V_tcp_autorcvbuf_max && + len > (sbspace(sb) / 8 * 7)) { + unsigned int hiwat = sb->sb_hiwat; + unsigned int newsize = min(hiwat + V_tcp_autorcvbuf_inc, + V_tcp_autorcvbuf_max); + + if (!sbreserve_locked(sb, newsize, so, NULL)) + sb->sb_flags &= ~SB_AUTOSIZE; + else + toep->rx_credits += newsize - hiwat; + } + KASSERT(toep->sb_cc >= sb->sb_cc, ("%s: sb %p has more data (%d) than last time (%d).", __func__, sb, sb->sb_cc, toep->sb_cc)); From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 17:56:27 2015 Return-Path: Delivered-To: svn-src-all@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 628AE78A; Thu, 9 Apr 2015 17:56: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 337ACDEB; Thu, 9 Apr 2015 17:56: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 t39HuRb7037631; Thu, 9 Apr 2015 17:56:27 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39HuRfY037630; Thu, 9 Apr 2015 17:56:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091756.t39HuRfY037630@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 17:56:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281315 - in stable: 10/sys/dev/cxgbe/tom 9/sys/dev/cxgbe/tom X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 17:56:27 -0000 Author: jhb Date: Thu Apr 9 17:56:25 2015 New Revision: 281315 URL: https://svnweb.freebsd.org/changeset/base/281315 Log: MFC 279892: Resize receive socket buffers that support autosizing when receiving TCP data via direct data placement. Modified: stable/9/sys/dev/cxgbe/tom/t4_ddp.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/cxgbe/tom/t4_ddp.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- stable/9/sys/dev/cxgbe/tom/t4_ddp.c Thu Apr 9 16:52:53 2015 (r281314) +++ stable/9/sys/dev/cxgbe/tom/t4_ddp.c Thu Apr 9 17:56:25 2015 (r281315) @@ -65,6 +65,13 @@ __FBSDID("$FreeBSD$"); #include "common/t4_tcb.h" #include "tom/t4_tom.h" +VNET_DECLARE(int, tcp_do_autorcvbuf); +#define V_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf) +VNET_DECLARE(int, tcp_autorcvbuf_inc); +#define V_tcp_autorcvbuf_inc VNET(tcp_autorcvbuf_inc) +VNET_DECLARE(int, tcp_autorcvbuf_max); +#define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) + #define PPOD_SZ(n) ((n) * sizeof(struct pagepod)) #define PPOD_SIZE (PPOD_SZ(1)) @@ -459,6 +466,21 @@ handle_ddp_data(struct toepcb *toep, __b else discourage_ddp(toep); + /* receive buffer autosize */ + if (sb->sb_flags & SB_AUTOSIZE && + V_tcp_do_autorcvbuf && + sb->sb_hiwat < V_tcp_autorcvbuf_max && + len > (sbspace(sb) / 8 * 7)) { + unsigned int hiwat = sb->sb_hiwat; + unsigned int newsize = min(hiwat + V_tcp_autorcvbuf_inc, + V_tcp_autorcvbuf_max); + + if (!sbreserve_locked(sb, newsize, so, NULL)) + sb->sb_flags &= ~SB_AUTOSIZE; + else + toep->rx_credits += newsize - hiwat; + } + KASSERT(toep->sb_cc >= sb->sb_cc, ("%s: sb %p has more data (%d) than last time (%d).", __func__, sb, sb->sb_cc, toep->sb_cc)); From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 18:03:32 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 18:28:12 2015 Return-Path: Delivered-To: svn-src-all@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 50BA113E; Thu, 9 Apr 2015 18:28:12 +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 0252C1A3; Thu, 9 Apr 2015 18:28:12 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgHBP-0007W8-VJ; Thu, 09 Apr 2015 21:28:07 +0300 Date: Thu, 9 Apr 2015 21:28:07 +0300 From: Slawa Olhovchenkov To: Dimitry Andric Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... Message-ID: <20150409182807.GF1394@zxy.spb.ru> References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409075538.GG8220@zxy.spb.ru> 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-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 18:28:12 -0000 On Thu, Apr 09, 2015 at 10:55:38AM +0300, Slawa Olhovchenkov wrote: > On Thu, Apr 09, 2015 at 08:24:19AM +0200, Dimitry Andric wrote: > > > On 09 Apr 2015, at 01:21, Slawa Olhovchenkov wrote: > > > > > > On Sat, Apr 04, 2015 at 10:17:53AM +0000, Dimitry Andric wrote: > > > > > >> Author: dim > > >> Date: Sat Apr 4 10:17:51 2015 > > >> New Revision: 281075 > > >> URL: https://svnweb.freebsd.org/changeset/base/281075 > > >> > > >> Log: > > >> MFC r272444 (by jkim): > > >> > > >> Merge ACPICA 20140926. > > >> > > >> MFC r278970 (by jkim): > > >> > > >> Merge ACPICA 20141107 and 20150204. > > >> > > >> Approved by: jkim > > >> Relnotes: yes > > >> > > > > > > Some time ago `acpidump -dt` was broken for me: > > > > > > # acpidump -dt > > > /* > > > RSD PTR: OEM=ALASKA, ACPI_Rev=2.0x (2) > > > XSDT=0x7f1e6080, length=36, cksum=95 > > > */ > > > /* > > > XSDT: Length=132, Revision=1, Checksum=106, > > > OEMID=ALASKA, OEM Table ID=A M I, OEM Revision=0x1072009, > > > Creator ID=AMI, Creator Revision=0x10013 > > > Assertion failed: (addr != 0), function acpi_print_rsdt, file /usr/src/usr.sbin/acpi/acpidump/acpi.c, line 1097. > > > Entries={ 0x7f1efe90, 0x7f1eff88, 0x7f1f0098, 0x7f1f00d8, 0x7f1f0448, 0x7f1f0478, 0x7f1f04b0, 0x7f1f0570, 0x7f1f05b0, 0x7f2606b8, 0x7f260708, Abort (core dumped) > > > > Hi Slawa, > > > > Is there a PR for this? And a core dump or (preferably) a reproduction > > scenario? > > Currently no PR. > This is always on may Supermicro X9SRL-F. FIX: X9DRH-7F > `acpidump -d` work > `acpidump -t` don't work > > > From a quick look, it seems that your RSDT contains an entry with an > > address size which is neither 4 nor 8, and that leads to the assertion > > failure. I am unsure whether there is any upstream fix for it. > > I am not sure how long acpidump -t don't work. > _______________________________________________ > 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-all@FreeBSD.ORG Thu Apr 9 18:45:04 2015 Return-Path: Delivered-To: svn-src-all@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 A83B4519; Thu, 9 Apr 2015 18:45: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 92A6B3DE; Thu, 9 Apr 2015 18:45: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 t39Ij4jO061044; Thu, 9 Apr 2015 18:45:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Ij44S061043; Thu, 9 Apr 2015 18:45:04 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091845.t39Ij44S061043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 18:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281317 - in stable: 10/lib/libstand 9/lib/libstand X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 18:45:04 -0000 Author: jhb Date: Thu Apr 9 18:45:03 2015 New Revision: 281317 URL: https://svnweb.freebsd.org/changeset/base/281317 Log: MFC 279931: Spin the twiddle in dosfs to give visual feedback for disk I/O on FAT filesystems as is done for other filesystems in the loader. Modified: stable/10/lib/libstand/dosfs.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/lib/libstand/dosfs.c Directory Properties: stable/9/lib/libstand/ (props changed) Modified: stable/10/lib/libstand/dosfs.c ============================================================================== --- stable/10/lib/libstand/dosfs.c Thu Apr 9 18:03:27 2015 (r281316) +++ stable/10/lib/libstand/dosfs.c Thu Apr 9 18:45:03 2015 (r281317) @@ -767,7 +767,8 @@ static int ioget(struct open_file *fd, u_int lsec, void *buf, u_int nsec) { int err; - + + twiddle(1); if ((err = (fd->f_dev->dv_strategy)(fd->f_devdata, F_READ, lsec, secbyt(nsec), buf, NULL))) return(err); From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 18:45:05 2015 Return-Path: Delivered-To: svn-src-all@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 1914D51A; Thu, 9 Apr 2015 18: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 03E253DF; Thu, 9 Apr 2015 18: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 t39Ij4HW061055; Thu, 9 Apr 2015 18:45:04 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Ij4DB061054; Thu, 9 Apr 2015 18:45:04 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091845.t39Ij4DB061054@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 18:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281317 - in stable: 10/lib/libstand 9/lib/libstand X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 18:45:05 -0000 Author: jhb Date: Thu Apr 9 18:45:03 2015 New Revision: 281317 URL: https://svnweb.freebsd.org/changeset/base/281317 Log: MFC 279931: Spin the twiddle in dosfs to give visual feedback for disk I/O on FAT filesystems as is done for other filesystems in the loader. Modified: stable/9/lib/libstand/dosfs.c Directory Properties: stable/9/lib/libstand/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libstand/dosfs.c Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/libstand/dosfs.c ============================================================================== --- stable/9/lib/libstand/dosfs.c Thu Apr 9 18:03:27 2015 (r281316) +++ stable/9/lib/libstand/dosfs.c Thu Apr 9 18:45:03 2015 (r281317) @@ -767,7 +767,8 @@ static int ioget(struct open_file *fd, u_int lsec, void *buf, u_int nsec) { int err; - + + twiddle(); if ((err = (fd->f_dev->dv_strategy)(fd->f_devdata, F_READ, lsec, secbyt(nsec), buf, NULL))) return(err); From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 18:50:43 2015 Return-Path: Delivered-To: svn-src-all@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 E0DCE849; Thu, 9 Apr 2015 18:50: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 CB0EE6A7; Thu, 9 Apr 2015 18:50: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 t39IohQ9062407; Thu, 9 Apr 2015 18:50:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Iohel062405; Thu, 9 Apr 2015 18:50:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091850.t39Iohel062405@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 18:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281318 - in stable: 10/etc/defaults 10/share/man/man5 9/etc/defaults 9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 18:50:44 -0000 Author: jhb Date: Thu Apr 9 18:50:41 2015 New Revision: 281318 URL: https://svnweb.freebsd.org/changeset/base/281318 Log: MFC 279952: - Align comment for df flags variable in periodic.conf. - Note default value of df flags variable in periodoc.conf(5). Modified: stable/9/etc/defaults/periodic.conf stable/9/share/man/man5/periodic.conf.5 Directory Properties: stable/9/etc/ (props changed) stable/9/share/man/man5/ (props changed) Changes in other areas also in this revision: Modified: stable/10/etc/defaults/periodic.conf stable/10/share/man/man5/periodic.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/9/etc/defaults/periodic.conf ============================================================================== --- stable/9/etc/defaults/periodic.conf Thu Apr 9 18:45:03 2015 (r281317) +++ stable/9/etc/defaults/periodic.conf Thu Apr 9 18:50:41 2015 (r281318) @@ -92,7 +92,7 @@ daily_news_expire_enable="YES" # Run # 400.status-disks daily_status_disks_enable="YES" # Check disk status -daily_status_disks_df_flags="-l -h" # df(1) flags for check +daily_status_disks_df_flags="-l -h" # df(1) flags for check # 401.status-graid daily_status_graid_enable="NO" # Check graid(8) Modified: stable/9/share/man/man5/periodic.conf.5 ============================================================================== --- stable/9/share/man/man5/periodic.conf.5 Thu Apr 9 18:45:03 2015 (r281317) +++ stable/9/share/man/man5/periodic.conf.5 Thu Apr 9 18:50:41 2015 (r281318) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2015 +.Dd March 13, 2015 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -335,6 +335,8 @@ utility when .Va daily_status_disks_enable is set to .Dq Li YES . +The default is +.Fl l Fl h . .It Va daily_status_zfs_enable .Pq Vt bool Set to From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 18:50:42 2015 Return-Path: Delivered-To: svn-src-all@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 B3432848; Thu, 9 Apr 2015 18:50: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 9D1356A6; Thu, 9 Apr 2015 18:50: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 t39IogUt062399; Thu, 9 Apr 2015 18:50:42 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Iogre062397; Thu, 9 Apr 2015 18:50:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091850.t39Iogre062397@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 18:50:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281318 - in stable: 10/etc/defaults 10/share/man/man5 9/etc/defaults 9/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 18:50:42 -0000 Author: jhb Date: Thu Apr 9 18:50:41 2015 New Revision: 281318 URL: https://svnweb.freebsd.org/changeset/base/281318 Log: MFC 279952: - Align comment for df flags variable in periodic.conf. - Note default value of df flags variable in periodoc.conf(5). Modified: stable/10/etc/defaults/periodic.conf stable/10/share/man/man5/periodic.conf.5 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/etc/defaults/periodic.conf stable/9/share/man/man5/periodic.conf.5 Directory Properties: stable/9/etc/ (props changed) stable/9/share/man/man5/ (props changed) Modified: stable/10/etc/defaults/periodic.conf ============================================================================== --- stable/10/etc/defaults/periodic.conf Thu Apr 9 18:45:03 2015 (r281317) +++ stable/10/etc/defaults/periodic.conf Thu Apr 9 18:50:41 2015 (r281318) @@ -93,7 +93,7 @@ daily_news_expire_enable="YES" # Run # 400.status-disks daily_status_disks_enable="YES" # Check disk status -daily_status_disks_df_flags="-l -h" # df(1) flags for check +daily_status_disks_df_flags="-l -h" # df(1) flags for check # 401.status-graid daily_status_graid_enable="NO" # Check graid(8) Modified: stable/10/share/man/man5/periodic.conf.5 ============================================================================== --- stable/10/share/man/man5/periodic.conf.5 Thu Apr 9 18:45:03 2015 (r281317) +++ stable/10/share/man/man5/periodic.conf.5 Thu Apr 9 18:50:41 2015 (r281318) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2015 +.Dd March 13, 2015 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -335,6 +335,8 @@ utility when .Va daily_status_disks_enable is set to .Dq Li YES . +The default is +.Fl l Fl h . .It Va daily_status_zfs_enable .Pq Vt bool Set to From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 19:03:12 2015 Return-Path: Delivered-To: svn-src-all@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 CB904EB1; Thu, 9 Apr 2015 19:03: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 B5C9784D; Thu, 9 Apr 2015 19:03: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 t39J3CuY070746; Thu, 9 Apr 2015 19:03:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39J3CcS070744; Thu, 9 Apr 2015 19:03:12 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091903.t39J3CcS070744@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 19:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281319 - stable/10/sys/boot/amd64/efi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:03:13 -0000 Author: jhb Date: Thu Apr 9 19:03:11 2015 New Revision: 281319 URL: https://svnweb.freebsd.org/changeset/base/281319 Log: MFC 279929: Allow the EFI loader to work with large kernels and/or modules (for example, a large mfsroot). Note that for EFI the kernel and modules (as well as other metadata files such as splash screens or memory disk images) are loaded into a statically-sized staging area. When the EFI loader exits it copies this staging area down to the location the kernel expects to run at. - Add bounds checking to the copy routines to fail attempts to access memory outside of the staging area. Previously loading a combined kernel + modules larger than the staging size (32MB) would overflow the staging area trashing whatever memory was afterwards. Under Intel's OVMF firmware for qemu this resulted in fatal faults in the firmware itself. Now the attempt will fail with ENOMEM. - Allow the staging area size to be configured at compile time via an EFI_STAGING_SIZE variable in src.conf or on the command line. It accepts the size of the staging area in MB. The default size remains 32MB. Modified: stable/10/sys/boot/amd64/efi/Makefile stable/10/sys/boot/amd64/efi/copy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/amd64/efi/Makefile ============================================================================== --- stable/10/sys/boot/amd64/efi/Makefile Thu Apr 9 18:50:41 2015 (r281318) +++ stable/10/sys/boot/amd64/efi/Makefile Thu Apr 9 19:03:11 2015 (r281319) @@ -44,6 +44,10 @@ LIBFICL= ${.OBJDIR}/../../ficl/libficl.a # Include bcache code. HAVE_BCACHE= yes +.if defined(EFI_STAGING_SIZE) +CFLAGS+= -DEFI_STAGING_SIZE=${EFI_STAGING_SIZE} +.endif + # Always add MI sources .PATH: ${.CURDIR}/../../common .include "${.CURDIR}/../../common/Makefile.inc" Modified: stable/10/sys/boot/amd64/efi/copy.c ============================================================================== --- stable/10/sys/boot/amd64/efi/copy.c Thu Apr 9 18:50:41 2015 (r281318) +++ stable/10/sys/boot/amd64/efi/copy.c Thu Apr 9 19:03:11 2015 (r281319) @@ -37,9 +37,13 @@ __FBSDID("$FreeBSD$"); #include #include -#define STAGE_PAGES 8192 /* 32MB */ +#ifndef EFI_STAGING_SIZE +#define EFI_STAGING_SIZE 32 +#endif -EFI_PHYSICAL_ADDRESS staging; +#define STAGE_PAGES ((EFI_STAGING_SIZE) * 1024 * 1024 / 4096) + +EFI_PHYSICAL_ADDRESS staging, staging_end; int stage_offset_set = 0; ssize_t stage_offset; @@ -55,6 +59,7 @@ x86_efi_copy_init(void) (unsigned long)(status & EFI_ERROR_MASK)); return (status); } + staging_end = staging + STAGE_PAGES * 4096; return (0); } @@ -68,6 +73,11 @@ x86_efi_copyin(const void *src, vm_offse stage_offset_set = 1; } + /* XXX: Callers do not check for failure. */ + if (dest + stage_offset + len > staging_end) { + errno = ENOMEM; + return (-1); + } bcopy(src, (void *)(dest + stage_offset), len); return (len); } @@ -76,6 +86,11 @@ ssize_t x86_efi_copyout(const vm_offset_t src, void *dest, const size_t len) { + /* XXX: Callers do not check for failure. */ + if (src + stage_offset + len > staging_end) { + errno = ENOMEM; + return (-1); + } bcopy((void *)(src + stage_offset), dest, len); return (len); } @@ -85,6 +100,10 @@ ssize_t x86_efi_readin(const int fd, vm_offset_t dest, const size_t len) { + if (dest + stage_offset + len > staging_end) { + errno = ENOMEM; + return (-1); + } return (read(fd, (void *)(dest + stage_offset), len)); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 19:07:02 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 19:25:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D22872A; Thu, 9 Apr 2015 19:25:24 +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 749244768; Thu, 9 Apr 2015 19:25:23 +0000 (UTC) Message-ID: <5526D222.8030100@FreeBSD.org> Date: Thu, 09 Apr 2015 15:25:22 -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: Slawa Olhovchenkov , Dimitry Andric Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> <20150409182807.GF1394@zxy.spb.ru> In-Reply-To: <20150409182807.GF1394@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:25:24 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 04/09/2015 14:28, Slawa Olhovchenkov wrote: > On Thu, Apr 09, 2015 at 10:55:38AM +0300, Slawa Olhovchenkov > wrote: >> On Thu, Apr 09, 2015 at 08:24:19AM +0200, Dimitry Andric wrote: >>> On 09 Apr 2015, at 01:21, Slawa Olhovchenkov >>> wrote: >>>> On Sat, Apr 04, 2015 at 10:17:53AM +0000, Dimitry Andric >>>> wrote: >>>> >>>>> Author: dim Date: Sat Apr 4 10:17:51 2015 New Revision: >>>>> 281075 URL: >>>>> https://svnweb.freebsd.org/changeset/base/281075 >>>>> >>>>> Log: MFC r272444 (by jkim): >>>>> >>>>> Merge ACPICA 20140926. >>>>> >>>>> MFC r278970 (by jkim): >>>>> >>>>> Merge ACPICA 20141107 and 20150204. >>>>> >>>>> Approved by: jkim Relnotes: yes >>>>> >>>> >>>> Some time ago `acpidump -dt` was broken for me: >>>> >>>> # acpidump -dt /* RSD PTR: OEM=ALASKA, ACPI_Rev=2.0x (2) >>>> XSDT=0x7f1e6080, length=36, cksum=95 */ /* XSDT: Length=132, >>>> Revision=1, Checksum=106, OEMID=ALASKA, OEM Table ID=A M I, >>>> OEM Revision=0x1072009, Creator ID=AMI, Creator >>>> Revision=0x10013 Assertion failed: (addr != 0), function >>>> acpi_print_rsdt, file /usr/src/usr.sbin/acpi/acpidump/acpi.c, >>>> line 1097. Entries={ 0x7f1efe90, 0x7f1eff88, 0x7f1f0098, >>>> 0x7f1f00d8, 0x7f1f0448, 0x7f1f0478, 0x7f1f04b0, 0x7f1f0570, >>>> 0x7f1f05b0, 0x7f2606b8, 0x7f260708, Abort (core dumped) >>> >>> Hi Slawa, >>> >>> Is there a PR for this? And a core dump or (preferably) a >>> reproduction scenario? >> >> Currently no PR. This is always on may Supermicro X9SRL-F. > > FIX: X9DRH-7F > >> `acpidump -d` work `acpidump -t` don't work >> >>> From a quick look, it seems that your RSDT contains an entry >>> with an address size which is neither 4 nor 8, and that leads >>> to the assertion failure. I am unsure whether there is any >>> upstream fix for it. >> >> I am not sure how long acpidump -t don't work. addr_size must be 4 or 8 here. Otherwise, something is corrupting memory. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVJtIdAAoJEHyflib82/FGotYH/RI2GSv02RLiZWfHM2KN5JUk 9Z/lzQb+nUtv88cGyfbEsuFDWgn1dHK8QYPIT7tH7owjvqZUIMYwHhIzPctwWiz+ YUHbiK+0WtV+7n1a+F+bcheeVnr4gL8F5gQZGlJGsNqfqWiM03TZ5w7k5j2PTVjM vyguEvxnSDa1c4TCbwtckYYARBRM3xyEPuSgcWLM/fRqr7NgCvA0JU5L7lqULCOe xJvJpTxCtGO0L75kMDbe0qSt95H6KH9cdCMc14TrXPWAjIdUCX76xKbFCAowvx3j xs9CFc+KDqf8n2zPHMncgsw7gD/FPqijHbHHxT9+iP52SCppJcO8sF0T8z8mD8o= =aF7o -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 19:32:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1576CF9; Thu, 9 Apr 2015 19:32:09 +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 2F501303D; Thu, 9 Apr 2015 19:32:09 +0000 (UTC) Message-ID: <5526D3B8.3060900@FreeBSD.org> Date: Thu, 09 Apr 2015 15:32:08 -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: Slawa Olhovchenkov , Dimitry Andric Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> <20150409182807.GF1394@zxy.spb.ru> <5526D222.8030100@FreeBSD.org> In-Reply-To: <5526D222.8030100@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:32:09 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 04/09/2015 15:25, Jung-uk Kim wrote: > On 04/09/2015 14:28, Slawa Olhovchenkov wrote: >> On Thu, Apr 09, 2015 at 10:55:38AM +0300, Slawa Olhovchenkov >> wrote: >>> On Thu, Apr 09, 2015 at 08:24:19AM +0200, Dimitry Andric >>> wrote: >>>> On 09 Apr 2015, at 01:21, Slawa Olhovchenkov >>>> wrote: >>>>> On Sat, Apr 04, 2015 at 10:17:53AM +0000, Dimitry Andric >>>>> wrote: >>>>> >>>>>> Author: dim Date: Sat Apr 4 10:17:51 2015 New Revision: >>>>>> 281075 URL: >>>>>> https://svnweb.freebsd.org/changeset/base/281075 >>>>>> >>>>>> Log: MFC r272444 (by jkim): >>>>>> >>>>>> Merge ACPICA 20140926. >>>>>> >>>>>> MFC r278970 (by jkim): >>>>>> >>>>>> Merge ACPICA 20141107 and 20150204. >>>>>> >>>>>> Approved by: jkim Relnotes: yes >>>>>> >>>>> >>>>> Some time ago `acpidump -dt` was broken for me: >>>>> >>>>> # acpidump -dt /* RSD PTR: OEM=ALASKA, ACPI_Rev=2.0x (2) >>>>> XSDT=0x7f1e6080, length=36, cksum=95 */ /* XSDT: >>>>> Length=132, Revision=1, Checksum=106, OEMID=ALASKA, OEM >>>>> Table ID=A M I, OEM Revision=0x1072009, Creator ID=AMI, >>>>> Creator Revision=0x10013 Assertion failed: (addr != 0), >>>>> function acpi_print_rsdt, file >>>>> /usr/src/usr.sbin/acpi/acpidump/acpi.c, line 1097. >>>>> Entries={ 0x7f1efe90, 0x7f1eff88, 0x7f1f0098, 0x7f1f00d8, >>>>> 0x7f1f0448, 0x7f1f0478, 0x7f1f04b0, 0x7f1f0570, 0x7f1f05b0, >>>>> 0x7f2606b8, 0x7f260708, Abort (core dumped) >>>> >>>> Hi Slawa, >>>> >>>> Is there a PR for this? And a core dump or (preferably) a >>>> reproduction scenario? >>> >>> Currently no PR. This is always on may Supermicro X9SRL-F. > >> FIX: X9DRH-7F > >>> `acpidump -d` work `acpidump -t` don't work >>> >>>> From a quick look, it seems that your RSDT contains an entry >>>> with an address size which is neither 4 nor 8, and that >>>> leads to the assertion failure. I am unsure whether there is >>>> any upstream fix for it. >>> >>> I am not sure how long acpidump -t don't work. > > addr_size must be 4 or 8 here. Otherwise, something is corrupting > memory. Sorry, I misread your message. Please install sysutils/acpica-tools from ports, then do /usr/local/bin/acpidump and send me the output. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVJtOyAAoJEHyflib82/FGfhQIAJ+kjYUGkq2psx6+oCMijM8S 5awuUvEPlMbWUYF4StKIO4MToxiyQMruCm+uPudKRmxOU0eJDSzUyr55MGlMplN1 cfTIlqjTFT6I2LlsjYnCDVF96H1oXiXG3T48/SgdvKAck7wwpDkjoXoS2HjmpA1/ jlJtFwNd/4HI4qGSMOqevkKYcjmrkfWo1PR40BEeO8AD0c0JDS07fhvnuKINufgv NtIJC5CIaLly2pND1z9JSDApF4umavr9LpTyFHxME0U2gU+jLYudC2z1uG7+dkv6 DvM7a/SQzYmFHBP2gBPi24oq2XfiWHxwYnGk6NufLWFTIUUISSvVUFzL6o5s7JA= =ySMD -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 19:36:08 2015 Return-Path: Delivered-To: svn-src-all@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 8AC1DDD; Thu, 9 Apr 2015 19:36: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 74637C5A; Thu, 9 Apr 2015 19:36: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 t39Ja88f085939; Thu, 9 Apr 2015 19:36:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Ja74I085931; Thu, 9 Apr 2015 19:36:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091936.t39Ja74I085931@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 19:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281321 - in stable/10: lib/libstand sys/boot/amd64 sys/boot/efi/libefi sys/boot/ficl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:36:08 -0000 Author: jhb Date: Thu Apr 9 19:36:06 2015 New Revision: 281321 URL: https://svnweb.freebsd.org/changeset/base/281321 Log: MFC 279949: The System V ABI for amd64 allows functions to use space in a 128 byte redzone below the stack pointer for scratch space and requires interrupt and signal frames to avoid overwriting it. However, EFI uses the Windows ABI which does not support this. As a result, interrupt handlers in EFI push their interrupt frames directly on top of the stack pointer. If the compiler used the red zone in a function in the EFI loader, then a device interrupt that occurred while that function was running could trash its local variables. In practice this happens fairly reliable when using gzipfs as an interrupt during decompression can trash the local variables in the inflate_table() function resulting in corrupted output or hangs. Fix this by disabling the redzone for amd64 EFI binaries. This requires building not only the loader but any libraries used by the loader without redzone support. Thanks to Jilles for pointing me at the redzone once I found the stack corruption. Modified: stable/10/lib/libstand/Makefile stable/10/sys/boot/amd64/Makefile.inc stable/10/sys/boot/efi/libefi/Makefile stable/10/sys/boot/ficl/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstand/Makefile ============================================================================== --- stable/10/lib/libstand/Makefile Thu Apr 9 19:07:01 2015 (r281320) +++ stable/10/lib/libstand/Makefile Thu Apr 9 19:36:06 2015 (r281321) @@ -27,7 +27,7 @@ CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -m CFLAGS.gcc+= -mpreferred-stack-boundary=2 .endif .if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -fPIC +CFLAGS+= -fPIC -mno-red-zone .endif .if ${MACHINE} == "pc98" CFLAGS+= -Os Modified: stable/10/sys/boot/amd64/Makefile.inc ============================================================================== --- stable/10/sys/boot/amd64/Makefile.inc Thu Apr 9 19:07:01 2015 (r281320) +++ stable/10/sys/boot/amd64/Makefile.inc Thu Apr 9 19:36:06 2015 (r281321) @@ -5,7 +5,7 @@ BINDIR?= /boot # See conf/kern.mk for the correct set of these -CFLAGS+= -ffreestanding +CFLAGS+= -ffreestanding -mno-red-zone CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx -msoft-float LDFLAGS+= -nostdlib Modified: stable/10/sys/boot/efi/libefi/Makefile ============================================================================== --- stable/10/sys/boot/efi/libefi/Makefile Thu Apr 9 19:07:01 2015 (r281320) +++ stable/10/sys/boot/efi/libefi/Makefile Thu Apr 9 19:36:06 2015 (r281321) @@ -9,7 +9,7 @@ SRCS= delay.c efi_console.c efinet.c efi SRCS+= nullconsole.c comconsole.c .if ${MACHINE_ARCH} == "amd64" -CFLAGS+= -fPIC +CFLAGS+= -fPIC -mno-red-zone .endif CFLAGS+= -I${.CURDIR}/../include CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH} Modified: stable/10/sys/boot/ficl/Makefile ============================================================================== --- stable/10/sys/boot/ficl/Makefile Thu Apr 9 19:07:01 2015 (r281320) +++ stable/10/sys/boot/ficl/Makefile Thu Apr 9 19:36:06 2015 (r281321) @@ -19,6 +19,9 @@ CFLAGS+= -ffreestanding CFLAGS+= -march=i386 CFLAGS.gcc+= -mpreferred-stack-boundary=2 .endif +.if ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -mno-red-zone +.endif .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 19:45:32 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 19:48:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 19:51:57 2015 Return-Path: Delivered-To: svn-src-all@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 EF07CA1E; Thu, 9 Apr 2015 19:51: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 D92F4ECB; Thu, 9 Apr 2015 19:51: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 t39Jpunw094940; Thu, 9 Apr 2015 19:51:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39Jpuui094938; Thu, 9 Apr 2015 19:51:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504091951.t39Jpuui094938@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 19:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281323 - in stable/10/sys/boot: amd64/efi efi/libefi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 19:51:57 -0000 Author: jhb Date: Thu Apr 9 19:51:55 2015 New Revision: 281323 URL: https://svnweb.freebsd.org/changeset/base/281323 Log: MFC 279950: Enable bzipfs support in the EFI loader. - Add bzipfs to the list of supported filesystems in the EFI loader. - Increase the heap size allocated for the EFI loader from 2MB to 3MB. Modified: stable/10/sys/boot/amd64/efi/conf.c stable/10/sys/boot/efi/libefi/libefi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/amd64/efi/conf.c ============================================================================== --- stable/10/sys/boot/amd64/efi/conf.c Thu Apr 9 19:48:42 2015 (r281322) +++ stable/10/sys/boot/amd64/efi/conf.c Thu Apr 9 19:51:55 2015 (r281323) @@ -44,6 +44,7 @@ struct fs_ops *file_system[] = { &cd9660_fsops, &nfs_fsops, &gzipfs_fsops, + &bzipfs_fsops, NULL }; Modified: stable/10/sys/boot/efi/libefi/libefi.c ============================================================================== --- stable/10/sys/boot/efi/libefi/libefi.c Thu Apr 9 19:48:42 2015 (r281322) +++ stable/10/sys/boot/efi/libefi/libefi.c Thu Apr 9 19:51:55 2015 (r281323) @@ -102,7 +102,7 @@ efi_main(EFI_HANDLE image_handle, EFI_SY (void)console_control->SetMode(console_control, EfiConsoleControlScreenText); - heapsize = 2 * 1024 * 1024; + heapsize = 3 * 1024 * 1024; status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, EFI_SIZE_TO_PAGES(heapsize), &heap); if (status != EFI_SUCCESS) From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 20:35:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 20:56:50 2015 Return-Path: Delivered-To: svn-src-all@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 1C996FDA; Thu, 9 Apr 2015 20:56:50 +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 C31CC9E5; Thu, 9 Apr 2015 20:56:49 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgJV9-000Ce4-VJ; Thu, 09 Apr 2015 23:56:39 +0300 Date: Thu, 9 Apr 2015 23:56:39 +0300 From: Slawa Olhovchenkov To: Jung-uk Kim Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... Message-ID: <20150409205639.GO8220@zxy.spb.ru> References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> <20150409182807.GF1394@zxy.spb.ru> <5526D222.8030100@FreeBSD.org> <5526D3B8.3060900@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5526D3B8.3060900@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-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 20:56:50 -0000 On Thu, Apr 09, 2015 at 03:32:08PM -0400, Jung-uk Kim wrote: > >>> `acpidump -d` work `acpidump -t` don't work > >>> > >>>> From a quick look, it seems that your RSDT contains an entry > >>>> with an address size which is neither 4 nor 8, and that > >>>> leads to the assertion failure. I am unsure whether there is > >>>> any upstream fix for it. > >>> > >>> I am not sure how long acpidump -t don't work. > > > > addr_size must be 4 or 8 here. Otherwise, something is corrupting > > memory. > > Sorry, I misread your message. Please install sysutils/acpica-tools > from ports, then do /usr/local/bin/acpidump and send me the output. Host crashed From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 20:58:39 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:05:49 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:06:53 2015 Return-Path: Delivered-To: svn-src-all@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 A8F5F8F4; Thu, 9 Apr 2015 21:06: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 93738B80; Thu, 9 Apr 2015 21:06: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 t39L6rAk029908; Thu, 9 Apr 2015 21:06:53 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39L6rML029907; Thu, 9 Apr 2015 21:06:53 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504092106.t39L6rML029907@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 21:06:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281326 - in stable: 10/sbin/ifconfig 9/sbin/ifconfig X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:06:53 -0000 Author: jhb Date: Thu Apr 9 21:06:51 2015 New Revision: 281326 URL: https://svnweb.freebsd.org/changeset/base/281326 Log: MFC 279951: Simplify string mangling in ifmaybeload(). - Use strlcpy() instead of strcpy(). - Use strlcat() instead of a strlcpy() with a magic number subtracted from the length. - Replace strncmp(..., strlen(foo) + 1) with strcmp(...). Modified: stable/9/sbin/ifconfig/ifconfig.c Directory Properties: stable/9/sbin/ifconfig/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sbin/ifconfig/ifconfig.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/9/sbin/ifconfig/ifconfig.c Thu Apr 9 21:05:48 2015 (r281325) +++ stable/9/sbin/ifconfig/ifconfig.c Thu Apr 9 21:06:51 2015 (r281326) @@ -1100,9 +1100,8 @@ ifmaybeload(const char *name) } /* turn interface and unit into module name */ - strcpy(ifkind, "if_"); - strlcpy(ifkind + MOD_PREFIX_LEN, ifname, - sizeof(ifkind) - MOD_PREFIX_LEN); + strlcpy(ifkind, "if_", sizeof(ifkind)); + strlcat(ifkind, ifname, sizeof(ifkind)); /* scan files in kernel */ mstat.version = sizeof(struct module_stat); @@ -1119,8 +1118,8 @@ ifmaybeload(const char *name) cp = mstat.name; } /* already loaded? */ - if (strncmp(ifname, cp, strlen(ifname) + 1) == 0 || - strncmp(ifkind, cp, strlen(ifkind) + 1) == 0) + if (strcmp(ifname, cp) == 0 || + strcmp(ifkind, cp) == 0) return; } } From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 21:06:52 2015 Return-Path: Delivered-To: svn-src-all@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 E9DD68F3; Thu, 9 Apr 2015 21:06: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 D47B3B7F; Thu, 9 Apr 2015 21:06: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 t39L6quM029902; Thu, 9 Apr 2015 21:06:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39L6quP029901; Thu, 9 Apr 2015 21:06:52 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504092106.t39L6quP029901@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 9 Apr 2015 21:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281326 - in stable: 10/sbin/ifconfig 9/sbin/ifconfig X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:06:53 -0000 Author: jhb Date: Thu Apr 9 21:06:51 2015 New Revision: 281326 URL: https://svnweb.freebsd.org/changeset/base/281326 Log: MFC 279951: Simplify string mangling in ifmaybeload(). - Use strlcpy() instead of strcpy(). - Use strlcat() instead of a strlcpy() with a magic number subtracted from the length. - Replace strncmp(..., strlen(foo) + 1) with strcmp(...). Modified: stable/10/sbin/ifconfig/ifconfig.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sbin/ifconfig/ifconfig.c Directory Properties: stable/9/sbin/ifconfig/ (props changed) Modified: stable/10/sbin/ifconfig/ifconfig.c ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.c Thu Apr 9 21:05:48 2015 (r281325) +++ stable/10/sbin/ifconfig/ifconfig.c Thu Apr 9 21:06:51 2015 (r281326) @@ -1121,9 +1121,8 @@ ifmaybeload(const char *name) } /* turn interface and unit into module name */ - strcpy(ifkind, "if_"); - strlcpy(ifkind + MOD_PREFIX_LEN, ifname, - sizeof(ifkind) - MOD_PREFIX_LEN); + strlcpy(ifkind, "if_", sizeof(ifkind)); + strlcat(ifkind, ifname, sizeof(ifkind)); /* scan files in kernel */ mstat.version = sizeof(struct module_stat); @@ -1140,8 +1139,8 @@ ifmaybeload(const char *name) cp = mstat.name; } /* already loaded? */ - if (strncmp(ifname, cp, strlen(ifname) + 1) == 0 || - strncmp(ifkind, cp, strlen(ifkind) + 1) == 0) + if (strcmp(ifname, cp) == 0 || + strcmp(ifkind, cp) == 0) return; } } From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 21:08:22 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:11:23 2015 Return-Path: Delivered-To: svn-src-all@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 D271FDDC; Thu, 9 Apr 2015 21:11:23 +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 82137C64; Thu, 9 Apr 2015 21:11:23 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgJjN-000Cul-Em; Fri, 10 Apr 2015 00:11:21 +0300 Date: Fri, 10 Apr 2015 00:11:21 +0300 From: Slawa Olhovchenkov To: Jung-uk Kim Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... Message-ID: <20150409211121.GP8220@zxy.spb.ru> References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> <20150409182807.GF1394@zxy.spb.ru> <5526D222.8030100@FreeBSD.org> <5526D3B8.3060900@FreeBSD.org> <20150409205639.GO8220@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150409205639.GO8220@zxy.spb.ru> 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-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:11:24 -0000 On Thu, Apr 09, 2015 at 11:56:39PM +0300, Slawa Olhovchenkov wrote: > On Thu, Apr 09, 2015 at 03:32:08PM -0400, Jung-uk Kim wrote: > > > >>> `acpidump -d` work `acpidump -t` don't work > > >>> > > >>>> From a quick look, it seems that your RSDT contains an entry > > >>>> with an address size which is neither 4 nor 8, and that > > >>>> leads to the assertion failure. I am unsure whether there is > > >>>> any upstream fix for it. > > >>> > > >>> I am not sure how long acpidump -t don't work. > > > > > > addr_size must be 4 or 8 here. Otherwise, something is corrupting > > > memory. > > > > Sorry, I misread your message. Please install sysutils/acpica-tools > > from ports, then do /usr/local/bin/acpidump and send me the output. > > Host crashed Captured inforamtion you can take here: http://zxy.spb.ru/acpi/ From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 21:14:41 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:17:08 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:20:56 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:23:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:26:24 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:26:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:30:11 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:32:33 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:32:41 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:33:58 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:35:45 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:36:49 2015 Return-Path: Delivered-To: svn-src-all@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 5605B5EB; Thu, 9 Apr 2015 21:36:49 +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 C346069F19; Thu, 9 Apr 2015 21:36:48 +0000 (UTC) Message-ID: <5526F0F0.7060507@FreeBSD.org> Date: Thu, 09 Apr 2015 17:36:48 -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: Slawa Olhovchenkov Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> <20150409182807.GF1394@zxy.spb.ru> <5526D222.8030100@FreeBSD.org> <5526D3B8.3060900@FreeBSD.org> <20150409205639.GO8220@zxy.spb.ru> <20150409211121.GP8220@zxy.spb.ru> In-Reply-To: <20150409211121.GP8220@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:36:49 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 04/09/2015 17:11, Slawa Olhovchenkov wrote: > On Thu, Apr 09, 2015 at 11:56:39PM +0300, Slawa Olhovchenkov > wrote: > >> On Thu, Apr 09, 2015 at 03:32:08PM -0400, Jung-uk Kim wrote: >> >>>>>> `acpidump -d` work `acpidump -t` don't work >>>>>> >>>>>>> From a quick look, it seems that your RSDT contains an >>>>>>> entry with an address size which is neither 4 nor 8, >>>>>>> and that leads to the assertion failure. I am unsure >>>>>>> whether there is any upstream fix for it. >>>>>> >>>>>> I am not sure how long acpidump -t don't work. >>>> >>>> addr_size must be 4 or 8 here. Otherwise, something is >>>> corrupting memory. >>> >>> Sorry, I misread your message. Please install >>> sysutils/acpica-tools from ports, then do >>> /usr/local/bin/acpidump and send me the output. >> >> Host crashed > > Captured inforamtion you can take here: http://zxy.spb.ru/acpi/ The last entry in your XSDT is actually empty. Although it is not clearly defined in the specification, I believe it should be skipped. I just committed a workaround on head (r281331) and it will be merged to stable branches after 3 days. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVJvDrAAoJEHyflib82/FGkocH/idaHJNEMb2FmD8fhqJItWP3 lIxGpRXL5TfLbou8GHkPOE7TDiSwnI41oQs6Ir70/pLhtEb4TNGe+U2XiVXNJrDX 4+22/oEOqbm7xrlXGrvfXnNvY2gJYGRWijohdmjLq2ciMXiUEL1bG9YUQSd4IXFV EQIpVl5mw3AUUK7a22AOMSg2o/+BAuVDpPkgmZyHYDghAv6wb1kWx9GxAEsyVQUr g3P/pCACj1PoFAlEqY97jpQ3n+HagkqFxA6nbWCmxq5l21tCBMv4Tx+iyjs7N/FZ gQjLBQH5ocmhSrauSCaIhbsfTbArRXH7Kn42c3e79FNxwTn2lKDXKSESu0ioGPc= =6bWt -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 21:38:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:39:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:47:46 2015 Return-Path: Delivered-To: svn-src-all@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 11C8BAF8; Thu, 9 Apr 2015 21:47:46 +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 B5D059; Thu, 9 Apr 2015 21:47:45 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YgKIZ-000DYX-Mc; Fri, 10 Apr 2015 00:47:43 +0300 Date: Fri, 10 Apr 2015 00:47:43 +0300 From: Slawa Olhovchenkov To: Jung-uk Kim Subject: Re: svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... Message-ID: <20150409214743.GG1394@zxy.spb.ru> References: <201504041017.t34AHr5R059717@svn.freebsd.org> <20150408232131.GB1394@zxy.spb.ru> <20150409075538.GG8220@zxy.spb.ru> <20150409182807.GF1394@zxy.spb.ru> <5526D222.8030100@FreeBSD.org> <5526D3B8.3060900@FreeBSD.org> <20150409205639.GO8220@zxy.spb.ru> <20150409211121.GP8220@zxy.spb.ru> <5526F0F0.7060507@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5526F0F0.7060507@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-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 21:47:46 -0000 On Thu, Apr 09, 2015 at 05:36:48PM -0400, Jung-uk Kim wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > On 04/09/2015 17:11, Slawa Olhovchenkov wrote: > > On Thu, Apr 09, 2015 at 11:56:39PM +0300, Slawa Olhovchenkov > > wrote: > > > >> On Thu, Apr 09, 2015 at 03:32:08PM -0400, Jung-uk Kim wrote: > >> > >>>>>> `acpidump -d` work `acpidump -t` don't work > >>>>>> > >>>>>>> From a quick look, it seems that your RSDT contains an > >>>>>>> entry with an address size which is neither 4 nor 8, > >>>>>>> and that leads to the assertion failure. I am unsure > >>>>>>> whether there is any upstream fix for it. > >>>>>> > >>>>>> I am not sure how long acpidump -t don't work. > >>>> > >>>> addr_size must be 4 or 8 here. Otherwise, something is > >>>> corrupting memory. > >>> > >>> Sorry, I misread your message. Please install > >>> sysutils/acpica-tools from ports, then do > >>> /usr/local/bin/acpidump and send me the output. > >> > >> Host crashed > > > > Captured inforamtion you can take here: http://zxy.spb.ru/acpi/ > > The last entry in your XSDT is actually empty. Although it is not > clearly defined in the specification, I believe it should be skipped. > I just committed a workaround on head (r281331) and it will be merged > to stable branches after 3 days. I am try some timr later. I never expect that 'Fatal trap 12: page fault while in user mode' may trigger kernel crash. From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 21:48:18 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:52:15 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 21:58:17 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 22:04:45 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 22:13:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 22:16:36 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 22:16:36 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 22:25:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 22:28:38 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 22:37:07 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 22:47:20 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 23:01:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 23:08:53 2015 Return-Path: Delivered-To: svn-src-all@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 F07D9A2D; Thu, 9 Apr 2015 23:08: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 D7C24BA0; Thu, 9 Apr 2015 23:08: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 t39N8qVv087730; Thu, 9 Apr 2015 23:08:52 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39N8mfC087715; Thu, 9 Apr 2015 23:08:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504092308.t39N8mfC087715@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 23:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r281344 - in vendor-sys/acpica/dist: . generate/unix generate/unix/acpidump source/common source/compiler source/components/debugger source/components/disassembler source/components/dis... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 23:08:53 -0000 Author: jkim Date: Thu Apr 9 23:08:47 2015 New Revision: 281344 URL: https://svnweb.freebsd.org/changeset/base/281344 Log: Import ACPICA 20150408. Added: vendor-sys/acpica/dist/source/include/platform/acdragonfly.h (contents, props changed) vendor-sys/acpica/dist/source/include/platform/acdragonflyex.h (contents, props changed) vendor-sys/acpica/dist/source/os_specific/service_layers/osbsdtbl.c - copied, changed from r281343, vendor-sys/acpica/dist/source/os_specific/service_layers/osfreebsdtbl.c Deleted: vendor-sys/acpica/dist/source/os_specific/service_layers/osfreebsdtbl.c Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/Makefile.config vendor-sys/acpica/dist/generate/unix/acpidump/Makefile vendor-sys/acpica/dist/source/common/adfile.c vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslfold.c vendor-sys/acpica/dist/source/compiler/asllisting.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/aslmapenter.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslrules.y vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.y vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/dttable.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/executer/exdump.c vendor-sys/acpica/dist/source/components/executer/exfldio.c vendor-sys/acpica/dist/source/components/executer/exoparg3.c vendor-sys/acpica/dist/source/components/executer/exregion.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/hardware/hwvalid.c vendor-sys/acpica/dist/source/components/namespace/nsdump.c vendor-sys/acpica/dist/source/components/parser/psopcode.c vendor-sys/acpica/dist/source/components/parser/psopinfo.c vendor-sys/acpica/dist/source/components/resources/rsaddr.c vendor-sys/acpica/dist/source/components/resources/rsdump.c vendor-sys/acpica/dist/source/components/resources/rsdumpinfo.c vendor-sys/acpica/dist/source/components/resources/rsxface.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbprint.c vendor-sys/acpica/dist/source/components/tables/tbxfroot.c vendor-sys/acpica/dist/source/components/utilities/utaddress.c vendor-sys/acpica/dist/source/components/utilities/utbuffer.c vendor-sys/acpica/dist/source/components/utilities/utclib.c vendor-sys/acpica/dist/source/components/utilities/utglobal.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/utprint.c vendor-sys/acpica/dist/source/components/utilities/utstate.c vendor-sys/acpica/dist/source/components/utilities/utuuid.c vendor-sys/acpica/dist/source/include/acapps.h vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acopcode.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acresrc.h vendor-sys/acpica/dist/source/include/acrestyp.h vendor-sys/acpica/dist/source/include/acstruct.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/amlcode.h vendor-sys/acpica/dist/source/include/platform/acenv.h vendor-sys/acpica/dist/source/include/platform/acnetbsd.h vendor-sys/acpica/dist/source/os_specific/service_layers/osefixf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oslinuxtbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixmap.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpihelp/ahamlops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslops.c vendor-sys/acpica/dist/source/tools/acpinames/antables.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c vendor-sys/acpica/dist/source/tools/examples/extables.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Thu Apr 9 22:16:35 2015 (r281343) +++ vendor-sys/acpica/dist/changes.txt Thu Apr 9 23:08:47 2015 (r281344) @@ -1,7 +1,77 @@ ---------------------------------------- -04 February 2015. Summary of changes for version 20150204: +08 April 2015. Summary of changes for version 20150408: -This release is available at https://acpica.org/downloads + +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 +84,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: vendor-sys/acpica/dist/generate/unix/Makefile.config ============================================================================== --- vendor-sys/acpica/dist/generate/unix/Makefile.config Thu Apr 9 22:16:35 2015 (r281343) +++ vendor-sys/acpica/dist/generate/unix/Makefile.config Thu Apr 9 23:08:47 2015 (r281344) @@ -59,6 +59,10 @@ ifeq ($(UNAME_S), FreeBSD) HOST = _FreeBSD endif +ifeq ($(UNAME_S), NetBSD) +HOST = _NetBSD +endif + ifeq ($(HOST), _APPLE) INSTALL = cp INSTALLFLAGS ?= -f @@ -161,7 +165,7 @@ CFLAGS += \ # to -Wall are not automatically included in -Wall. # CWARNINGFLAGS = \ - -ansi\ + -std=c99\ -Wall\ -Wbad-function-cast\ -Wdeclaration-after-statement\ @@ -241,4 +245,3 @@ MFLAGS= -P -I$(ASL_COMPILER) LEX= flex LFLAGS += -i -s - Modified: vendor-sys/acpica/dist/generate/unix/acpidump/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpidump/Makefile Thu Apr 9 22:16:35 2015 (r281343) +++ vendor-sys/acpica/dist/generate/unix/acpidump/Makefile Thu Apr 9 23:08:47 2015 (r281344) @@ -52,8 +52,16 @@ OBJECTS = \ # Per-host interfaces # ifeq ($(HOST), _FreeBSD) +HOST_FAMILY = BSD +endif + +ifeq ($(HOST), _NetBSD) +HOST_FAMILY = BSD +endif + +ifeq ($(HOST_FAMILY), BSD) OBJECTS += \ - $(OBJDIR)/osfreebsdtbl.o + $(OBJDIR)/osbsdtbl.o else OBJECTS += \ $(OBJDIR)/oslinuxtbl.o Modified: vendor-sys/acpica/dist/source/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adfile.c Thu Apr 9 22:16:35 2015 (r281343) +++ vendor-sys/acpica/dist/source/common/adfile.c Thu Apr 9 23:08:47 2015 (r281344) @@ -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: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Thu Apr 9 22:16:35 2015 (r281343) +++ vendor-sys/acpica/dist/source/common/adisasm.c Thu Apr 9 23:08:47 2015 (r281344) @@ -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: vendor-sys/acpica/dist/source/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtable.c Thu Apr 9 22:16:35 2015 (r281343) +++ vendor-sys/acpica/dist/source/common/dmtable.c Thu Apr 9 23:08:47 2015 (r281344) @@ -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: vendor-sys/acpica/dist/source/common/dmtbdump.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbdump.c Thu Apr 9 22:16:35 2015 (r281343) +++ vendor-sys/acpica/dist/source/common/dmtbdump.c Thu Apr 9 23:08:47 2015 (r281344) @@ -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: vendor-sys/acpica/dist/source/common/dmtbinfo.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbinfo.c Thu Apr 9 22:16:35 2015 (r281343) +++ vendor-sys/acpica/dist/source/common/dmtbinfo.c Thu Apr 9 23:08:47 2015 (r281344) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Apr 9 22:16:35 2015 (r281343) +++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c Thu Apr 9 23:08:47 2015 (r281344) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Apr 9 22:16:35 2015 (r281343) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Apr 9 23:08:47 2015 (r281344) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Apr 9 22:16:35 2015 (r281343) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Apr 9 23:08:47 2015 (r281344) @@ -686,6 +686,10 @@ TrAllocateNode ( UINT32 ParseOpcode); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 23:09:48 2015 Return-Path: Delivered-To: svn-src-all@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 A6C80B5D; Thu, 9 Apr 2015 23:09: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 78D59BA8; Thu, 9 Apr 2015 23:09: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 t39N9mgd087903; Thu, 9 Apr 2015 23:09:48 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t39N9msU087902; Thu, 9 Apr 2015 23:09:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504092309.t39N9msU087902@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 23:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r281345 - vendor-sys/acpica/20150408 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 23:09:48 -0000 Author: jkim Date: Thu Apr 9 23:09:47 2015 New Revision: 281345 URL: https://svnweb.freebsd.org/changeset/base/281345 Log: Tag ACPICA 20150408. Added: vendor-sys/acpica/20150408/ - copied from r281344, vendor-sys/acpica/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 23:18:45 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 23:27:19 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Thu Apr 9 23:40:30 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 00:03:04 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 00:43:26 2015 Return-Path: Delivered-To: svn-src-all@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 999DEA3B; Fri, 10 Apr 2015 00:43: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 840576EE; Fri, 10 Apr 2015 00:43: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 t3A0hPYJ034399; Fri, 10 Apr 2015 00:43:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A0hPLb034397; Fri, 10 Apr 2015 00:43:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504100043.t3A0hPLb034397@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 10 Apr 2015 00:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281346 - in stable/10/sys/geom: mirror raid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 00:43:26 -0000 Author: mav Date: Fri Apr 10 00:43:24 2015 New Revision: 281346 URL: https://svnweb.freebsd.org/changeset/base/281346 Log: MFC r280757: Remove request sorting from GEOM_MIRROR and GEOM_RAID. When CPU is not busy, those queues are typically empty. When CPU is busy, then one more extra sorting is the last thing it needs. If specific device (HDD) really needs sorting, then it will be done later by CAM. This supposed to fix livelock reported for mirror of two SSDs, when UFS fires zillion of BIO_DELETE requests, that totally blocks I/O subsystem by pointless sorting of requests and responses under single mutex lock. Modified: stable/10/sys/geom/mirror/g_mirror.c stable/10/sys/geom/raid/g_raid.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/10/sys/geom/mirror/g_mirror.c Thu Apr 9 23:09:47 2015 (r281345) +++ stable/10/sys/geom/mirror/g_mirror.c Fri Apr 10 00:43:24 2015 (r281346) @@ -894,7 +894,7 @@ g_mirror_done(struct bio *bp) sc = bp->bio_from->geom->softc; bp->bio_cflags = G_MIRROR_BIO_FLAG_REGULAR; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); } @@ -981,7 +981,7 @@ g_mirror_regular_request(struct bio *bp) else { pbp->bio_error = 0; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, pbp); + bioq_insert_tail(&sc->sc_queue, pbp); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); @@ -1021,7 +1021,7 @@ g_mirror_sync_done(struct bio *bp) sc = bp->bio_from->geom->softc; bp->bio_cflags = G_MIRROR_BIO_FLAG_SYNC; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); } @@ -1150,7 +1150,7 @@ g_mirror_start(struct bio *bp) return; } mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); Modified: stable/10/sys/geom/raid/g_raid.c ============================================================================== --- stable/10/sys/geom/raid/g_raid.c Thu Apr 9 23:09:47 2015 (r281345) +++ stable/10/sys/geom/raid/g_raid.c Fri Apr 10 00:43:24 2015 (r281346) @@ -1143,7 +1143,7 @@ g_raid_start(struct bio *bp) return; } mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (!dumping) { G_RAID_DEBUG1(4, sc, "Waking up %p.", sc); @@ -1355,7 +1355,7 @@ g_raid_unlock_range(struct g_raid_volume (intmax_t)(lp->l_offset+lp->l_length)); mtx_lock(&sc->sc_queue_mtx); while ((bp = bioq_takefirst(&vol->v_locked)) != NULL) - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); free(lp, M_RAID); return (0); @@ -1449,7 +1449,7 @@ g_raid_disk_done(struct bio *bp) sd = bp->bio_caller1; sc = sd->sd_softc; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (!dumping) wakeup(sc); From owner-svn-src-all@FreeBSD.ORG Fri Apr 10 00:44:44 2015 Return-Path: Delivered-To: svn-src-all@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 7DE7DB73; Fri, 10 Apr 2015 00:44: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 68CB5750; Fri, 10 Apr 2015 00:44: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 t3A0iib4034670; Fri, 10 Apr 2015 00:44:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A0ihq6034667; Fri, 10 Apr 2015 00:44:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504100044.t3A0ihq6034667@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 10 Apr 2015 00:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r281347 - in stable/8/sys/geom: mirror raid X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 00:44:44 -0000 Author: mav Date: Fri Apr 10 00:44:43 2015 New Revision: 281347 URL: https://svnweb.freebsd.org/changeset/base/281347 Log: MFC r280757: Remove request sorting from GEOM_MIRROR and GEOM_RAID. When CPU is not busy, those queues are typically empty. When CPU is busy, then one more extra sorting is the last thing it needs. If specific device (HDD) really needs sorting, then it will be done later by CAM. This supposed to fix livelock reported for mirror of two SSDs, when UFS fires zillion of BIO_DELETE requests, that totally blocks I/O subsystem by pointless sorting of requests and responses under single mutex lock. Modified: stable/8/sys/geom/mirror/g_mirror.c stable/8/sys/geom/raid/g_raid.c Directory Properties: stable/8/ (props changed) stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/8/sys/geom/mirror/g_mirror.c Fri Apr 10 00:43:24 2015 (r281346) +++ stable/8/sys/geom/mirror/g_mirror.c Fri Apr 10 00:44:43 2015 (r281347) @@ -853,7 +853,7 @@ g_mirror_done(struct bio *bp) sc = bp->bio_from->geom->softc; bp->bio_cflags = G_MIRROR_BIO_FLAG_REGULAR; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); } @@ -939,7 +939,7 @@ g_mirror_regular_request(struct bio *bp) else { pbp->bio_error = 0; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, pbp); + bioq_insert_tail(&sc->sc_queue, pbp); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); @@ -979,7 +979,7 @@ g_mirror_sync_done(struct bio *bp) sc = bp->bio_from->geom->softc; bp->bio_cflags = G_MIRROR_BIO_FLAG_SYNC; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); } @@ -1092,7 +1092,7 @@ g_mirror_start(struct bio *bp) return; } mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); Modified: stable/8/sys/geom/raid/g_raid.c ============================================================================== --- stable/8/sys/geom/raid/g_raid.c Fri Apr 10 00:43:24 2015 (r281346) +++ stable/8/sys/geom/raid/g_raid.c Fri Apr 10 00:44:43 2015 (r281347) @@ -1141,7 +1141,7 @@ g_raid_start(struct bio *bp) return; } mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (!dumping) { G_RAID_DEBUG1(4, sc, "Waking up %p.", sc); @@ -1353,7 +1353,7 @@ g_raid_unlock_range(struct g_raid_volume (intmax_t)(lp->l_offset+lp->l_length)); mtx_lock(&sc->sc_queue_mtx); while ((bp = bioq_takefirst(&vol->v_locked)) != NULL) - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); free(lp, M_RAID); return (0); @@ -1447,7 +1447,7 @@ g_raid_disk_done(struct bio *bp) sd = bp->bio_caller1; sc = sd->sd_softc; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (!dumping) wakeup(sc); From owner-svn-src-all@FreeBSD.ORG Fri Apr 10 01:26:04 2015 Return-Path: Delivered-To: svn-src-all@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 EEA16664; Fri, 10 Apr 2015 01:26: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 D6198B77; Fri, 10 Apr 2015 01:26: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 t3A1Q34U053949; Fri, 10 Apr 2015 01:26:03 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A1Q3PJ053937; Fri, 10 Apr 2015 01:26:03 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201504100126.t3A1Q3PJ053937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 10 Apr 2015 01:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r281348 - in vendor/ntp/dist: . adjtimed clockstuff html include include/isc kernel kernel/sys lib/isc lib/isc/unix libntp libparse ntpd ntpdate ntpdc ntpq ntpsnmpd parseutil ports/winn... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 01:26:04 -0000 Author: cy Date: Fri Apr 10 01:26:02 2015 New Revision: 281348 URL: https://svnweb.freebsd.org/changeset/base/281348 Log: Vendor import ntp 4.2.8p2 Approved by: delphij Security: CVE-2015-1798, CVE-2015-1799 Security: VuXML ebd84c96-dd7e-11e4-854e-3c970e169bc2 Added: vendor/ntp/dist/ports/winnt/libntp/arc4wrap.c (contents, props changed) vendor/ntp/dist/scripts/update-leap/ vendor/ntp/dist/scripts/update-leap/Makefile.am (contents, props changed) vendor/ntp/dist/scripts/update-leap/Makefile.in (contents, props changed) vendor/ntp/dist/scripts/update-leap/invoke-update-leap.menu vendor/ntp/dist/scripts/update-leap/invoke-update-leap.texi vendor/ntp/dist/scripts/update-leap/update-leap vendor/ntp/dist/scripts/update-leap/update-leap-opts vendor/ntp/dist/scripts/update-leap/update-leap-opts.def vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapman vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapmdoc vendor/ntp/dist/scripts/update-leap/update-leap.html (contents, props changed) vendor/ntp/dist/scripts/update-leap/update-leap.man.in (contents, props changed) vendor/ntp/dist/scripts/update-leap/update-leap.mdoc.in (contents, props changed) vendor/ntp/dist/scripts/update-leap/update-leap.texi vendor/ntp/dist/sntp/libevent/m4/acx_pthread.m4 vendor/ntp/dist/sntp/m4/ax_c99_struct_init.m4 vendor/ntp/dist/sntp/m4/openldap-thread-check.m4 vendor/ntp/dist/sntp/m4/openldap.m4 Deleted: vendor/ntp/dist/sntp/libevent/README vendor/ntp/dist/sntp/libevent/m4/openldap-thread-check.m4 vendor/ntp/dist/sntp/libevent/m4/openldap.m4 vendor/ntp/dist/util/jitter.h Modified: vendor/ntp/dist/ChangeLog vendor/ntp/dist/CommitLog vendor/ntp/dist/Makefile.in vendor/ntp/dist/NEWS vendor/ntp/dist/aclocal.m4 vendor/ntp/dist/adjtimed/Makefile.in vendor/ntp/dist/clockstuff/Makefile.in vendor/ntp/dist/config.h.in vendor/ntp/dist/configure vendor/ntp/dist/configure.ac vendor/ntp/dist/html/build.html vendor/ntp/dist/html/miscopt.html vendor/ntp/dist/html/sntp.html vendor/ntp/dist/include/Makefile.in vendor/ntp/dist/include/binio.h vendor/ntp/dist/include/isc/Makefile.in vendor/ntp/dist/include/mbg_gps166.h vendor/ntp/dist/include/ntp.h vendor/ntp/dist/include/ntp_calendar.h vendor/ntp/dist/include/ntp_fp.h vendor/ntp/dist/include/ntp_md5.h vendor/ntp/dist/include/ntpd.h vendor/ntp/dist/include/parse.h vendor/ntp/dist/include/parse_conf.h vendor/ntp/dist/kernel/Makefile.in vendor/ntp/dist/kernel/sys/Makefile.in vendor/ntp/dist/kernel/sys/parsestreams.h vendor/ntp/dist/lib/isc/inet_ntop.c vendor/ntp/dist/lib/isc/log.c vendor/ntp/dist/lib/isc/result.c vendor/ntp/dist/lib/isc/unix/file.c vendor/ntp/dist/lib/isc/unix/ifiter_getifaddrs.c vendor/ntp/dist/lib/isc/unix/ifiter_ioctl.c vendor/ntp/dist/lib/isc/unix/net.c vendor/ntp/dist/libntp/Makefile.in vendor/ntp/dist/libntp/ntp_calendar.c vendor/ntp/dist/libntp/work_fork.c vendor/ntp/dist/libparse/Makefile.in vendor/ntp/dist/libparse/clk_computime.c vendor/ntp/dist/libparse/clk_dcf7000.c vendor/ntp/dist/libparse/clk_hopf6021.c vendor/ntp/dist/libparse/clk_meinberg.c vendor/ntp/dist/libparse/clk_rawdcf.c vendor/ntp/dist/libparse/clk_rcc8000.c vendor/ntp/dist/libparse/clk_schmid.c vendor/ntp/dist/libparse/clk_sel240x.c vendor/ntp/dist/libparse/clk_trimtaip.c vendor/ntp/dist/libparse/clk_trimtsip.c vendor/ntp/dist/libparse/clk_varitext.c vendor/ntp/dist/libparse/clk_wharton.c vendor/ntp/dist/libparse/data_mbg.c vendor/ntp/dist/libparse/gpstolfp.c vendor/ntp/dist/libparse/parse.c vendor/ntp/dist/libparse/parse_conf.c vendor/ntp/dist/libparse/parsesolaris.c vendor/ntp/dist/libparse/parsestreams.c vendor/ntp/dist/libparse/trim_info.c vendor/ntp/dist/ntpd/Makefile.in vendor/ntp/dist/ntpd/cmd_args.c vendor/ntp/dist/ntpd/invoke-ntp.conf.texi vendor/ntp/dist/ntpd/invoke-ntp.keys.texi vendor/ntp/dist/ntpd/invoke-ntpd.texi vendor/ntp/dist/ntpd/keyword-gen-utd vendor/ntp/dist/ntpd/keyword-gen.c vendor/ntp/dist/ntpd/ntp.conf.5man vendor/ntp/dist/ntpd/ntp.conf.5mdoc vendor/ntp/dist/ntpd/ntp.conf.def vendor/ntp/dist/ntpd/ntp.conf.html vendor/ntp/dist/ntpd/ntp.conf.man.in vendor/ntp/dist/ntpd/ntp.conf.mdoc.in vendor/ntp/dist/ntpd/ntp.keys.5man vendor/ntp/dist/ntpd/ntp.keys.5mdoc vendor/ntp/dist/ntpd/ntp.keys.html vendor/ntp/dist/ntpd/ntp.keys.man.in vendor/ntp/dist/ntpd/ntp.keys.mdoc.in vendor/ntp/dist/ntpd/ntp_config.c vendor/ntp/dist/ntpd/ntp_control.c vendor/ntp/dist/ntpd/ntp_crypto.c vendor/ntp/dist/ntpd/ntp_keyword.h vendor/ntp/dist/ntpd/ntp_leapsec.c vendor/ntp/dist/ntpd/ntp_loopfilter.c vendor/ntp/dist/ntpd/ntp_parser.c vendor/ntp/dist/ntpd/ntp_parser.h vendor/ntp/dist/ntpd/ntp_parser.y vendor/ntp/dist/ntpd/ntp_peer.c vendor/ntp/dist/ntpd/ntp_proto.c vendor/ntp/dist/ntpd/ntpd-opts.c vendor/ntp/dist/ntpd/ntpd-opts.h vendor/ntp/dist/ntpd/ntpd.1ntpdman vendor/ntp/dist/ntpd/ntpd.1ntpdmdoc vendor/ntp/dist/ntpd/ntpd.c vendor/ntp/dist/ntpd/ntpd.html vendor/ntp/dist/ntpd/ntpd.man.in vendor/ntp/dist/ntpd/ntpd.mdoc.in vendor/ntp/dist/ntpd/ntpdbase-opts.def vendor/ntp/dist/ntpd/refclock_palisade.c vendor/ntp/dist/ntpd/refclock_palisade.h vendor/ntp/dist/ntpd/refclock_parse.c vendor/ntp/dist/ntpdate/Makefile.in vendor/ntp/dist/ntpdc/Makefile.in vendor/ntp/dist/ntpdc/invoke-ntpdc.texi vendor/ntp/dist/ntpdc/ntpdc-opts.c vendor/ntp/dist/ntpdc/ntpdc-opts.h vendor/ntp/dist/ntpdc/ntpdc.1ntpdcman vendor/ntp/dist/ntpdc/ntpdc.1ntpdcmdoc vendor/ntp/dist/ntpdc/ntpdc.html vendor/ntp/dist/ntpdc/ntpdc.man.in vendor/ntp/dist/ntpdc/ntpdc.mdoc.in vendor/ntp/dist/ntpq/Makefile.in vendor/ntp/dist/ntpq/invoke-ntpq.texi vendor/ntp/dist/ntpq/ntpq-opts.c vendor/ntp/dist/ntpq/ntpq-opts.h vendor/ntp/dist/ntpq/ntpq-subs.c vendor/ntp/dist/ntpq/ntpq.1ntpqman vendor/ntp/dist/ntpq/ntpq.1ntpqmdoc vendor/ntp/dist/ntpq/ntpq.html vendor/ntp/dist/ntpq/ntpq.man.in vendor/ntp/dist/ntpq/ntpq.mdoc.in vendor/ntp/dist/ntpsnmpd/Makefile.in vendor/ntp/dist/ntpsnmpd/invoke-ntpsnmpd.texi vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.c vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.h vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdman vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc vendor/ntp/dist/ntpsnmpd/ntpsnmpd.html vendor/ntp/dist/ntpsnmpd/ntpsnmpd.man.in vendor/ntp/dist/ntpsnmpd/ntpsnmpd.mdoc.in vendor/ntp/dist/packageinfo.sh vendor/ntp/dist/parseutil/Makefile.in vendor/ntp/dist/parseutil/dcfd.c vendor/ntp/dist/parseutil/testdcf.c vendor/ntp/dist/ports/winnt/include/config.h vendor/ntp/dist/ports/winnt/include/termios.h vendor/ntp/dist/ports/winnt/libntp/getclock.c vendor/ntp/dist/ports/winnt/libntp/termios.c vendor/ntp/dist/ports/winnt/ntpd/nt_clockstuff.c vendor/ntp/dist/ports/winnt/vs2005/libntp.vcproj vendor/ntp/dist/ports/winnt/vs2008/libntp/libntp.vcproj vendor/ntp/dist/ports/winnt/vs2013/libntp/libntp.vcxproj vendor/ntp/dist/ports/winnt/vs2013/libntp/libntp.vcxproj.filters vendor/ntp/dist/scripts/Makefile.am vendor/ntp/dist/scripts/Makefile.in vendor/ntp/dist/scripts/build/Makefile.in vendor/ntp/dist/scripts/calc_tickadj/Makefile.in vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.html vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.man.in vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.mdoc.in vendor/ntp/dist/scripts/calc_tickadj/invoke-calc_tickadj.texi vendor/ntp/dist/scripts/invoke-plot_summary.texi vendor/ntp/dist/scripts/invoke-summary.texi vendor/ntp/dist/scripts/lib/Makefile.in vendor/ntp/dist/scripts/lib/NTP/Util.pm vendor/ntp/dist/scripts/ntp-wait/Makefile.in vendor/ntp/dist/scripts/ntp-wait/invoke-ntp-wait.texi vendor/ntp/dist/scripts/ntp-wait/ntp-wait-opts vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitman vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc vendor/ntp/dist/scripts/ntp-wait/ntp-wait.html vendor/ntp/dist/scripts/ntp-wait/ntp-wait.man.in vendor/ntp/dist/scripts/ntp-wait/ntp-wait.mdoc.in vendor/ntp/dist/scripts/ntpsweep/Makefile.in vendor/ntp/dist/scripts/ntpsweep/invoke-ntpsweep.texi vendor/ntp/dist/scripts/ntpsweep/ntpsweep-opts vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepman vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc vendor/ntp/dist/scripts/ntpsweep/ntpsweep.html vendor/ntp/dist/scripts/ntpsweep/ntpsweep.man.in vendor/ntp/dist/scripts/ntpsweep/ntpsweep.mdoc.in vendor/ntp/dist/scripts/ntptrace/Makefile.in vendor/ntp/dist/scripts/ntptrace/invoke-ntptrace.texi vendor/ntp/dist/scripts/ntptrace/ntptrace-opts vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptraceman vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptracemdoc vendor/ntp/dist/scripts/ntptrace/ntptrace.html vendor/ntp/dist/scripts/ntptrace/ntptrace.man.in vendor/ntp/dist/scripts/ntptrace/ntptrace.mdoc.in vendor/ntp/dist/scripts/plot_summary-opts vendor/ntp/dist/scripts/plot_summary.1plot_summaryman vendor/ntp/dist/scripts/plot_summary.1plot_summarymdoc vendor/ntp/dist/scripts/plot_summary.html vendor/ntp/dist/scripts/plot_summary.man.in vendor/ntp/dist/scripts/plot_summary.mdoc.in vendor/ntp/dist/scripts/summary-opts vendor/ntp/dist/scripts/summary.1summaryman vendor/ntp/dist/scripts/summary.1summarymdoc vendor/ntp/dist/scripts/summary.html vendor/ntp/dist/scripts/summary.man.in vendor/ntp/dist/scripts/summary.mdoc.in vendor/ntp/dist/sntp/Makefile.in vendor/ntp/dist/sntp/aclocal.m4 vendor/ntp/dist/sntp/configure vendor/ntp/dist/sntp/include/Makefile.in vendor/ntp/dist/sntp/include/version.def vendor/ntp/dist/sntp/include/version.texi vendor/ntp/dist/sntp/invoke-sntp.texi vendor/ntp/dist/sntp/libevent/ChangeLog vendor/ntp/dist/sntp/libevent/Makefile.am vendor/ntp/dist/sntp/libevent/Makefile.in vendor/ntp/dist/sntp/libevent/WIN32-Code/nmake/event2/event-config.h vendor/ntp/dist/sntp/libevent/WIN32-Code/tree.h vendor/ntp/dist/sntp/libevent/aclocal.m4 vendor/ntp/dist/sntp/libevent/buffer.c vendor/ntp/dist/sntp/libevent/bufferevent.c vendor/ntp/dist/sntp/libevent/bufferevent_async.c vendor/ntp/dist/sntp/libevent/bufferevent_filter.c vendor/ntp/dist/sntp/libevent/bufferevent_openssl.c vendor/ntp/dist/sntp/libevent/bufferevent_pair.c vendor/ntp/dist/sntp/libevent/config.h.in vendor/ntp/dist/sntp/libevent/configure vendor/ntp/dist/sntp/libevent/configure.ac vendor/ntp/dist/sntp/libevent/evbuffer-internal.h vendor/ntp/dist/sntp/libevent/evdns.c vendor/ntp/dist/sntp/libevent/event.c vendor/ntp/dist/sntp/libevent/event_tagging.c vendor/ntp/dist/sntp/libevent/evrpc-internal.h vendor/ntp/dist/sntp/libevent/evthread-internal.h vendor/ntp/dist/sntp/libevent/evthread.c vendor/ntp/dist/sntp/libevent/evutil.c vendor/ntp/dist/sntp/libevent/evutil_time.c vendor/ntp/dist/sntp/libevent/ht-internal.h vendor/ntp/dist/sntp/libevent/http-internal.h vendor/ntp/dist/sntp/libevent/http.c vendor/ntp/dist/sntp/libevent/include/event2/buffer.h vendor/ntp/dist/sntp/libevent/include/event2/bufferevent.h vendor/ntp/dist/sntp/libevent/include/event2/dns.h vendor/ntp/dist/sntp/libevent/include/event2/event.h vendor/ntp/dist/sntp/libevent/include/event2/http.h vendor/ntp/dist/sntp/libevent/include/event2/listener.h vendor/ntp/dist/sntp/libevent/include/event2/util.h vendor/ntp/dist/sntp/libevent/kqueue.c vendor/ntp/dist/sntp/libevent/listener.c vendor/ntp/dist/sntp/libevent/sample/http-server.c vendor/ntp/dist/sntp/libevent/sample/https-client.c vendor/ntp/dist/sntp/libevent/sample/include.am vendor/ntp/dist/sntp/libevent/test/include.am vendor/ntp/dist/sntp/libevent/test/regress.c vendor/ntp/dist/sntp/libevent/test/regress.h vendor/ntp/dist/sntp/libevent/test/regress_buffer.c vendor/ntp/dist/sntp/libevent/test/regress_bufferevent.c vendor/ntp/dist/sntp/libevent/test/regress_dns.c vendor/ntp/dist/sntp/libevent/test/regress_finalize.c vendor/ntp/dist/sntp/libevent/test/regress_http.c vendor/ntp/dist/sntp/libevent/test/regress_main.c vendor/ntp/dist/sntp/libevent/test/regress_minheap.c vendor/ntp/dist/sntp/libevent/test/regress_ssl.c vendor/ntp/dist/sntp/libevent/test/regress_thread.c vendor/ntp/dist/sntp/libevent/test/regress_util.c vendor/ntp/dist/sntp/libevent/test/regress_zlib.c vendor/ntp/dist/sntp/libevent/test/test-fdleak.c vendor/ntp/dist/sntp/libevent/test/test-ratelim.c vendor/ntp/dist/sntp/libevent/test/test-time.c vendor/ntp/dist/sntp/libevent/test/tinytest.c vendor/ntp/dist/sntp/libevent/test/tinytest.h vendor/ntp/dist/sntp/libevent/test/tinytest_macros.h vendor/ntp/dist/sntp/libevent/time-internal.h vendor/ntp/dist/sntp/libevent/util-internal.h vendor/ntp/dist/sntp/libevent/whatsnew-2.1.txt vendor/ntp/dist/sntp/libopts/Makefile.in vendor/ntp/dist/sntp/libopts/m4/libopts.m4 vendor/ntp/dist/sntp/loc/darwin vendor/ntp/dist/sntp/loc/debian vendor/ntp/dist/sntp/loc/freebsd vendor/ntp/dist/sntp/loc/legacy vendor/ntp/dist/sntp/loc/netbsd vendor/ntp/dist/sntp/loc/solaris vendor/ntp/dist/sntp/m4/ntp_libntp.m4 vendor/ntp/dist/sntp/m4/ntp_locinfo.m4 vendor/ntp/dist/sntp/m4/version.m4 vendor/ntp/dist/sntp/main.c vendor/ntp/dist/sntp/scripts/Makefile.in vendor/ntp/dist/sntp/sntp-opts.c vendor/ntp/dist/sntp/sntp-opts.def vendor/ntp/dist/sntp/sntp-opts.h vendor/ntp/dist/sntp/sntp.1sntpman vendor/ntp/dist/sntp/sntp.1sntpmdoc vendor/ntp/dist/sntp/sntp.html vendor/ntp/dist/sntp/sntp.man.in vendor/ntp/dist/sntp/sntp.mdoc.in vendor/ntp/dist/sntp/tests/Makefile.in vendor/ntp/dist/tests/Makefile.in vendor/ntp/dist/tests/libntp/Makefile.in vendor/ntp/dist/tests/ntpd/Makefile.in vendor/ntp/dist/util/Makefile.am vendor/ntp/dist/util/Makefile.in vendor/ntp/dist/util/invoke-ntp-keygen.texi vendor/ntp/dist/util/jitter.c vendor/ntp/dist/util/ntp-keygen-opts.c vendor/ntp/dist/util/ntp-keygen-opts.h vendor/ntp/dist/util/ntp-keygen.1ntp-keygenman vendor/ntp/dist/util/ntp-keygen.1ntp-keygenmdoc vendor/ntp/dist/util/ntp-keygen.c vendor/ntp/dist/util/ntp-keygen.html vendor/ntp/dist/util/ntp-keygen.man.in vendor/ntp/dist/util/ntp-keygen.mdoc.in Modified: vendor/ntp/dist/ChangeLog ============================================================================== --- vendor/ntp/dist/ChangeLog Fri Apr 10 00:44:43 2015 (r281347) +++ vendor/ntp/dist/ChangeLog Fri Apr 10 01:26:02 2015 (r281348) @@ -1,4 +1,80 @@ --- +(4.2.8p2) 2015/04/07 Released by Harlan Stenn +(4.2.8p2-RC3) 2015/04/03 Released by Harlan Stenn + +* [Bug 2763] Fix for different thresholds for forward and backward steps. +--- +(4.2.8p2-RC2) 2015/04/03 Released by Harlan Stenn + +* [Bug 2592] FLAG_TSTAMP_PPS cleanup for refclock_parse.c. +* [Bug 2769] New script: update-leap +* [Bug 2769] cleannup for update-leap +* [Bug 2788] New flag -G (force_step_once). +* [Bug 2794] Clean up kernel clock status reports. +* [Bug 2795] Cannot build without OpenSLL (on Win32). + Provided a Win32 specific wrapper around libevent/arc4random.c. + fixed some minor warnings. +* [Bug 2796] ntp-keygen crashes in 'getclock()' on Win32. +* [Bug 2797] ntp-keygen trapped in endless loop for MD5 keys + on big-endian machines. +* [Bug 2798] sntp should decode and display the leap indicator. +* Simple cleanup to html/build.html +--- +(4.2.8p2-RC1) 2015/03/30 Released by Harlan Stenn + +* [Bug 2794] Don't let reports on normal kernel status changes + look like errors. +* [Bug 2788] New flag -G (force_step_once). +* [Bug 2592] Account for PPS sources which can provide an accurate + absolute time stamp, and status information. + Fixed indention and removed trailing whitespace. +* [Bug 1787] DCF77's formerly "antenna" bit is "call bit" since 2003. +* [Bug 1960] setsockopt IPV6_MULTICAST_IF: Invalid argument. +* [Bug 2346] "graceful termination" signals do not do peer cleanup. +* [Bug 2728] See if C99-style structure initialization works. +* [Bug 2747] Upgrade libevent to 2.1.5-beta. +* [Bug 2749] ntp/lib/NTP/Util.pm needs update for ntpq -w, IPv6, .POOL. . +* [Bug 2751] jitter.h has stale copies of l_fp macros. +* [Bug 2756] ntpd hangs in startup with gcc 3.3.5 on ARM. +* [Bug 2757] Quiet compiler warnings. +* [Bug 2759] Expose nonvolatile/clk_wander_threshold to ntpq. +* [Bug 2763] Allow different thresholds for forward and backward steps. +* [Bug 2766] ntp-keygen output files should not be world-readable. +* [Bug 2767] ntp-keygen -M should symlink to ntp.keys. +* [Bug 2771] nonvolatile value is documented in wrong units. +* [Bug 2773] Early leap announcement from Palisade/Thunderbolt +* [Bug 2774] Unreasonably verbose printout - leap pending/warning +* [Bug 2775] ntp-keygen.c fails to compile under Windows. +* [Bug 2777] Fixed loops and decoding of Meinberg GPS satellite info. + Removed non-ASCII characters from some copyright comments. + Removed trailing whitespace. + Updated definitions for Meinberg clocks from current Meinberg header files. + Now use C99 fixed-width types and avoid non-ASCII characters in comments. + Account for updated definitions pulled from Meinberg header files. + Updated comments on Meinberg GPS receivers which are not only called GPS16x. + Replaced some constant numbers by defines from ntp_calendar.h + Modified creation of parse-specific variables for Meinberg devices + in gps16x_message(). + Reworked mk_utcinfo() to avoid printing of ambiguous leap second dates. + Modified mbg_tm_str() which now expexts an additional parameter controlling + if the time status shall be printed. +* [Sec 2779] ntpd accepts unauthenticated packets with symmetric key crypto. +* [Sec 2781] Authentication doesn't protect symmetric associations against + DoS attacks. +* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE. +* [Bug 2789] Quiet compiler warnings from libevent. +* [Bug 2790] If ntpd sets the Windows MM timer highest resolution + pause briefly before measuring system clock precision to yield + correct results. +* Comment from Juergen Perlinger in ntp_calendar.c to make the code clearer. +* Use predefined function types for parse driver functions + used to set up function pointers. + Account for changed prototype of parse_inp_fnc_t functions. + Cast parse conversion results to appropriate types to avoid + compiler warnings. + Let ioctl() for Windows accept a (void *) to avoid compiler warnings + when called with pointers to different types. +--- (4.2.8p1) 2015/02/04 Released by Harlan Stenn * Update the NEWS file. @@ -14,7 +90,7 @@ (This should work for all versions of Windows >= W2K) * [Bug 2738] Missing buffer initialization in refclocK_parse.c::parsestate(). * [Bug 2739] Parse driver with PPS enabled occasionally evaluates - PPS timestamp with wrong sign. + PPS timestamp with wrong sign. Removed some German umlauts. * [Bug 2740] Removed some obsolete code from the parse driver. * [Bug 2741] Incorrect buffer check in refclocK_parse.c::parsestatus(). @@ -94,7 +170,7 @@ * [Bug 2678] nmea_control() now checks 'refclock_params()' result. (4.2.7p481) 2014/11/22 Released by Harlan Stenn * [Bug 2314] Only enable PPS if kernel consumer binding succeeds. -* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition. +* [Bug 2314] Kernel PPS binding EOPNOTSUPP is a failure condition. * Rename pps_enable to hardpps_enable. (4.2.7p480) 2014/11/21 Released by Harlan Stenn * [Bug 2677] PATH_MAX isn't #define'd under Windows. Modified: vendor/ntp/dist/CommitLog ============================================================================== --- vendor/ntp/dist/CommitLog Fri Apr 10 00:44:43 2015 (r281347) +++ vendor/ntp/dist/CommitLog Fri Apr 10 01:26:02 2015 (r281348) @@ -1,3 +1,2569 @@ +ChangeSet@1.3320, 2015-04-07 04:28:16-04:00, stenn@deacon.udel.edu + NTP_4_2_8P2 + TAG: NTP_4_2_8P2 + + ChangeLog@1.1633 +1 -0 + NTP_4_2_8P2 + + ntpd/invoke-ntp.conf.texi@1.182 +1 -1 + NTP_4_2_8P2 + + ntpd/invoke-ntp.keys.texi@1.178 +1 -1 + NTP_4_2_8P2 + + ntpd/invoke-ntpd.texi@1.495 +2 -2 + NTP_4_2_8P2 + + ntpd/ntp.conf.5man@1.216 +3 -3 + NTP_4_2_8P2 + + ntpd/ntp.conf.5mdoc@1.216 +2 -2 + NTP_4_2_8P2 + + ntpd/ntp.conf.html@1.173 +1 -1 + NTP_4_2_8P2 + + ntpd/ntp.conf.man.in@1.216 +3 -3 + NTP_4_2_8P2 + + ntpd/ntp.conf.mdoc.in@1.216 +2 -2 + NTP_4_2_8P2 + + ntpd/ntp.keys.5man@1.212 +2 -2 + NTP_4_2_8P2 + + ntpd/ntp.keys.5mdoc@1.212 +2 -2 + NTP_4_2_8P2 + + ntpd/ntp.keys.html@1.174 +1 -1 + NTP_4_2_8P2 + + ntpd/ntp.keys.man.in@1.212 +2 -2 + NTP_4_2_8P2 + + ntpd/ntp.keys.mdoc.in@1.212 +2 -2 + NTP_4_2_8P2 + + ntpd/ntpd-opts.c@1.517 +245 -245 + NTP_4_2_8P2 + + ntpd/ntpd-opts.h@1.516 +3 -3 + NTP_4_2_8P2 + + ntpd/ntpd.1ntpdman@1.324 +3 -3 + NTP_4_2_8P2 + + ntpd/ntpd.1ntpdmdoc@1.324 +2 -2 + NTP_4_2_8P2 + + ntpd/ntpd.html@1.168 +2 -2 + NTP_4_2_8P2 + + ntpd/ntpd.man.in@1.324 +3 -3 + NTP_4_2_8P2 + + ntpd/ntpd.mdoc.in@1.324 +2 -2 + NTP_4_2_8P2 + + ntpdc/invoke-ntpdc.texi@1.492 +2 -2 + NTP_4_2_8P2 + + ntpdc/ntpdc-opts.c@1.510 +107 -107 + NTP_4_2_8P2 + + ntpdc/ntpdc-opts.h@1.509 +3 -3 + NTP_4_2_8P2 + + ntpdc/ntpdc.1ntpdcman@1.323 +3 -3 + NTP_4_2_8P2 + + ntpdc/ntpdc.1ntpdcmdoc@1.323 +2 -2 + NTP_4_2_8P2 + + ntpdc/ntpdc.html@1.336 +2 -2 + NTP_4_2_8P2 + + ntpdc/ntpdc.man.in@1.323 +3 -3 + NTP_4_2_8P2 + + ntpdc/ntpdc.mdoc.in@1.323 +2 -2 + NTP_4_2_8P2 + + ntpq/invoke-ntpq.texi@1.498 +2 -2 + NTP_4_2_8P2 + + ntpq/ntpq-opts.c@1.515 +106 -106 + NTP_4_2_8P2 + + ntpq/ntpq-opts.h@1.513 +3 -3 + NTP_4_2_8P2 + + ntpq/ntpq.1ntpqman@1.326 +3 -3 + NTP_4_2_8P2 + + ntpq/ntpq.1ntpqmdoc@1.326 +2 -2 + NTP_4_2_8P2 + + ntpq/ntpq.html@1.165 +2 -2 + NTP_4_2_8P2 + + ntpq/ntpq.man.in@1.326 +3 -3 + NTP_4_2_8P2 + + ntpq/ntpq.mdoc.in@1.326 +2 -2 + NTP_4_2_8P2 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.494 +2 -2 + NTP_4_2_8P2 + + ntpsnmpd/ntpsnmpd-opts.c@1.512 +68 -68 + NTP_4_2_8P2 + + ntpsnmpd/ntpsnmpd-opts.h@1.511 +3 -3 + NTP_4_2_8P2 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.323 +3 -3 + NTP_4_2_8P2 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.323 +2 -2 + NTP_4_2_8P2 + + ntpsnmpd/ntpsnmpd.html@1.163 +1 -1 + NTP_4_2_8P2 + + ntpsnmpd/ntpsnmpd.man.in@1.323 +3 -3 + NTP_4_2_8P2 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.323 +2 -2 + NTP_4_2_8P2 + + packageinfo.sh@1.509 +2 -2 + NTP_4_2_8P2 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.84 +3 -3 + NTP_4_2_8P2 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.85 +2 -2 + NTP_4_2_8P2 + + scripts/calc_tickadj/calc_tickadj.html@1.86 +1 -1 + NTP_4_2_8P2 + + scripts/calc_tickadj/calc_tickadj.man.in@1.83 +3 -3 + NTP_4_2_8P2 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.85 +2 -2 + NTP_4_2_8P2 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.88 +1 -1 + NTP_4_2_8P2 + + scripts/invoke-plot_summary.texi@1.105 +2 -2 + NTP_4_2_8P2 + + scripts/invoke-summary.texi@1.105 +2 -2 + NTP_4_2_8P2 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.315 +2 -2 + NTP_4_2_8P2 + + scripts/ntp-wait/ntp-wait-opts@1.51 +2 -2 + NTP_4_2_8P2 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.312 +3 -3 + NTP_4_2_8P2 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.313 +2 -2 + NTP_4_2_8P2 + + scripts/ntp-wait/ntp-wait.html@1.332 +2 -2 + NTP_4_2_8P2 + + scripts/ntp-wait/ntp-wait.man.in@1.312 +3 -3 + NTP_4_2_8P2 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.313 +2 -2 + NTP_4_2_8P2 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.103 +2 -2 + NTP_4_2_8P2 + + scripts/ntpsweep/ntpsweep-opts@1.53 +2 -2 + NTP_4_2_8P2 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.91 +3 -3 + NTP_4_2_8P2 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.91 +2 -2 + NTP_4_2_8P2 + + scripts/ntpsweep/ntpsweep.html@1.104 +2 -2 + NTP_4_2_8P2 + + scripts/ntpsweep/ntpsweep.man.in@1.91 +3 -3 + NTP_4_2_8P2 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.92 +2 -2 + NTP_4_2_8P2 + + scripts/ntptrace/invoke-ntptrace.texi@1.104 +2 -2 + NTP_4_2_8P2 + + scripts/ntptrace/ntptrace-opts@1.53 +2 -2 + NTP_4_2_8P2 + + scripts/ntptrace/ntptrace.1ntptraceman@1.91 +3 -3 + NTP_4_2_8P2 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.92 +2 -2 + NTP_4_2_8P2 + + scripts/ntptrace/ntptrace.html@1.105 +2 -2 + NTP_4_2_8P2 + + scripts/ntptrace/ntptrace.man.in@1.91 +3 -3 + NTP_4_2_8P2 + + scripts/ntptrace/ntptrace.mdoc.in@1.93 +2 -2 + NTP_4_2_8P2 + + scripts/plot_summary-opts@1.53 +2 -2 + NTP_4_2_8P2 + + scripts/plot_summary.1plot_summaryman@1.103 +3 -3 + NTP_4_2_8P2 + + scripts/plot_summary.1plot_summarymdoc@1.103 +2 -2 + NTP_4_2_8P2 + + scripts/plot_summary.html@1.106 +2 -2 + NTP_4_2_8P2 + + scripts/plot_summary.man.in@1.103 +3 -3 + NTP_4_2_8P2 + + scripts/plot_summary.mdoc.in@1.103 +2 -2 + NTP_4_2_8P2 + + scripts/summary-opts@1.53 +2 -2 + NTP_4_2_8P2 + + scripts/summary.1summaryman@1.103 +3 -3 + NTP_4_2_8P2 + + scripts/summary.1summarymdoc@1.103 +2 -2 + NTP_4_2_8P2 + + scripts/summary.html@1.106 +2 -2 + NTP_4_2_8P2 + + scripts/summary.man.in@1.103 +3 -3 + NTP_4_2_8P2 + + scripts/summary.mdoc.in@1.103 +2 -2 + NTP_4_2_8P2 + + scripts/update-leap/invoke-update-leap.texi@1.4 +1 -1 + NTP_4_2_8P2 + + scripts/update-leap/update-leap-opts@1.4 +2 -2 + NTP_4_2_8P2 + + scripts/update-leap/update-leap.1update-leapman@1.4 +3 -3 + NTP_4_2_8P2 + + scripts/update-leap/update-leap.1update-leapmdoc@1.4 +2 -2 + NTP_4_2_8P2 + + scripts/update-leap/update-leap.html@1.4 +1 -1 + NTP_4_2_8P2 + + scripts/update-leap/update-leap.man.in@1.4 +3 -3 + NTP_4_2_8P2 + + scripts/update-leap/update-leap.mdoc.in@1.4 +2 -2 + NTP_4_2_8P2 + + sntp/invoke-sntp.texi@1.492 +2 -2 + NTP_4_2_8P2 + + sntp/sntp-opts.c@1.511 +159 -159 + NTP_4_2_8P2 + + sntp/sntp-opts.h@1.509 +3 -3 + NTP_4_2_8P2 + + sntp/sntp.1sntpman@1.327 +3 -3 + NTP_4_2_8P2 + + sntp/sntp.1sntpmdoc@1.327 +2 -2 + NTP_4_2_8P2 + + sntp/sntp.html@1.507 +2 -2 + NTP_4_2_8P2 + + sntp/sntp.man.in@1.327 +3 -3 + NTP_4_2_8P2 + + sntp/sntp.mdoc.in@1.327 +2 -2 + NTP_4_2_8P2 + + util/invoke-ntp-keygen.texi@1.495 +2 -2 + NTP_4_2_8P2 + + util/ntp-keygen-opts.c@1.513 +173 -173 + NTP_4_2_8P2 + + util/ntp-keygen-opts.h@1.511 +3 -3 + NTP_4_2_8P2 + + util/ntp-keygen.1ntp-keygenman@1.323 +3 -3 + NTP_4_2_8P2 + + util/ntp-keygen.1ntp-keygenmdoc@1.323 +2 -2 + NTP_4_2_8P2 + + util/ntp-keygen.html@1.169 +2 -2 + NTP_4_2_8P2 + + util/ntp-keygen.man.in@1.323 +3 -3 + NTP_4_2_8P2 + + util/ntp-keygen.mdoc.in@1.323 +2 -2 + NTP_4_2_8P2 + +ChangeSet@1.3319, 2015-04-07 04:05:46-04:00, stenn@deacon.udel.edu + ntp-4.2.8p2 + + packageinfo.sh@1.508 +2 -2 + ntp-4.2.8p2 + +ChangeSet@1.3318, 2015-04-07 07:57:32+00:00, stenn@psp-fb1.ntp.org + NEWS update + + NEWS@1.135 +4 -2 + NEWS update + +ChangeSet@1.3314.1.3, 2015-04-03 03:56:38-04:00, stenn@deacon.udel.edu + NTP_4_2_8P2_RC3 + TAG: NTP_4_2_8P2_RC3 + + ChangeLog@1.1629.1.3 +1 -0 + NTP_4_2_8P2_RC3 + + ntpd/invoke-ntp.conf.texi@1.181 +1 -1 + NTP_4_2_8P2_RC3 + + ntpd/invoke-ntp.keys.texi@1.177 +1 -1 + NTP_4_2_8P2_RC3 + + ntpd/invoke-ntpd.texi@1.494 +2 -2 + NTP_4_2_8P2_RC3 + + ntpd/ntp.conf.5man@1.215 +3 -3 + NTP_4_2_8P2_RC3 + + ntpd/ntp.conf.5mdoc@1.215 +1 -1 + NTP_4_2_8P2_RC3 + + ntpd/ntp.conf.html@1.172 +1 -1 + NTP_4_2_8P2_RC3 + + ntpd/ntp.conf.man.in@1.215 +3 -3 + NTP_4_2_8P2_RC3 + + ntpd/ntp.conf.mdoc.in@1.215 +1 -1 + NTP_4_2_8P2_RC3 + + ntpd/ntp.keys.5man@1.211 +2 -2 + NTP_4_2_8P2_RC3 + + ntpd/ntp.keys.5mdoc@1.211 +1 -1 + NTP_4_2_8P2_RC3 + + ntpd/ntp.keys.html@1.173 +1 -1 + NTP_4_2_8P2_RC3 + + ntpd/ntp.keys.man.in@1.211 +2 -2 + NTP_4_2_8P2_RC3 + + ntpd/ntp.keys.mdoc.in@1.211 +1 -1 + NTP_4_2_8P2_RC3 + + ntpd/ntpd-opts.c@1.516 +7 -7 + NTP_4_2_8P2_RC3 + + ntpd/ntpd-opts.h@1.515 +3 -3 + NTP_4_2_8P2_RC3 + + ntpd/ntpd.1ntpdman@1.323 +3 -3 + NTP_4_2_8P2_RC3 + + ntpd/ntpd.1ntpdmdoc@1.323 +1 -1 + NTP_4_2_8P2_RC3 + + ntpd/ntpd.html@1.167 +2 -2 + NTP_4_2_8P2_RC3 + + ntpd/ntpd.man.in@1.323 +3 -3 + NTP_4_2_8P2_RC3 + + ntpd/ntpd.mdoc.in@1.323 +1 -1 + NTP_4_2_8P2_RC3 + + ntpdc/invoke-ntpdc.texi@1.491 +2 -2 + NTP_4_2_8P2_RC3 + + ntpdc/ntpdc-opts.c@1.509 +7 -7 + NTP_4_2_8P2_RC3 + + ntpdc/ntpdc-opts.h@1.508 +3 -3 + NTP_4_2_8P2_RC3 + + ntpdc/ntpdc.1ntpdcman@1.322 +3 -3 + NTP_4_2_8P2_RC3 + + ntpdc/ntpdc.1ntpdcmdoc@1.322 +1 -1 + NTP_4_2_8P2_RC3 + + ntpdc/ntpdc.html@1.335 +2 -2 + NTP_4_2_8P2_RC3 + + ntpdc/ntpdc.man.in@1.322 +3 -3 + NTP_4_2_8P2_RC3 + + ntpdc/ntpdc.mdoc.in@1.322 +1 -1 + NTP_4_2_8P2_RC3 + + ntpq/invoke-ntpq.texi@1.497 +2 -2 + NTP_4_2_8P2_RC3 + + ntpq/ntpq-opts.c@1.514 +7 -7 + NTP_4_2_8P2_RC3 + + ntpq/ntpq-opts.h@1.512 +3 -3 + NTP_4_2_8P2_RC3 + + ntpq/ntpq.1ntpqman@1.325 +3 -3 + NTP_4_2_8P2_RC3 + + ntpq/ntpq.1ntpqmdoc@1.325 +1 -1 + NTP_4_2_8P2_RC3 + + ntpq/ntpq.html@1.164 +2 -2 + NTP_4_2_8P2_RC3 + + ntpq/ntpq.man.in@1.325 +3 -3 + NTP_4_2_8P2_RC3 + + ntpq/ntpq.mdoc.in@1.325 +1 -1 + NTP_4_2_8P2_RC3 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.493 +2 -2 + NTP_4_2_8P2_RC3 + + ntpsnmpd/ntpsnmpd-opts.c@1.511 +7 -7 + NTP_4_2_8P2_RC3 + + ntpsnmpd/ntpsnmpd-opts.h@1.510 +3 -3 + NTP_4_2_8P2_RC3 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.322 +3 -3 + NTP_4_2_8P2_RC3 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.322 +1 -1 + NTP_4_2_8P2_RC3 + + ntpsnmpd/ntpsnmpd.html@1.162 +1 -1 + NTP_4_2_8P2_RC3 + + ntpsnmpd/ntpsnmpd.man.in@1.322 +3 -3 + NTP_4_2_8P2_RC3 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.322 +1 -1 + NTP_4_2_8P2_RC3 + + packageinfo.sh@1.507 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.83 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.84 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/calc_tickadj/calc_tickadj.html@1.85 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/calc_tickadj/calc_tickadj.man.in@1.82 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.84 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.87 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/invoke-plot_summary.texi@1.104 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/invoke-summary.texi@1.104 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.314 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/ntp-wait/ntp-wait-opts@1.50 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.311 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.312 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/ntp-wait/ntp-wait.html@1.331 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/ntp-wait/ntp-wait.man.in@1.311 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.312 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.102 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/ntpsweep/ntpsweep-opts@1.52 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.90 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.90 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/ntpsweep/ntpsweep.html@1.103 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/ntpsweep/ntpsweep.man.in@1.90 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.91 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/ntptrace/invoke-ntptrace.texi@1.103 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/ntptrace/ntptrace-opts@1.52 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/ntptrace/ntptrace.1ntptraceman@1.90 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.91 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/ntptrace/ntptrace.html@1.104 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/ntptrace/ntptrace.man.in@1.90 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/ntptrace/ntptrace.mdoc.in@1.92 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/plot_summary-opts@1.52 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/plot_summary.1plot_summaryman@1.102 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/plot_summary.1plot_summarymdoc@1.102 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/plot_summary.html@1.105 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/plot_summary.man.in@1.102 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/plot_summary.mdoc.in@1.102 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/summary-opts@1.52 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/summary.1summaryman@1.102 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/summary.1summarymdoc@1.102 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/summary.html@1.105 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/summary.man.in@1.102 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/summary.mdoc.in@1.102 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/update-leap/invoke-update-leap.texi@1.3 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/update-leap/update-leap-opts@1.3 +2 -2 + NTP_4_2_8P2_RC3 + + scripts/update-leap/update-leap.1update-leapman@1.3 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/update-leap/update-leap.1update-leapmdoc@1.3 +1 -1 + NTP_4_2_8P2_RC3 + + scripts/update-leap/update-leap.html@1.3 +6 -5 + NTP_4_2_8P2_RC3 + + scripts/update-leap/update-leap.man.in@1.3 +3 -3 + NTP_4_2_8P2_RC3 + + scripts/update-leap/update-leap.mdoc.in@1.3 +1 -1 + NTP_4_2_8P2_RC3 + + sntp/invoke-sntp.texi@1.491 +2 -2 + NTP_4_2_8P2_RC3 + + sntp/sntp-opts.c@1.510 +7 -7 + NTP_4_2_8P2_RC3 + + sntp/sntp-opts.h@1.508 +3 -3 + NTP_4_2_8P2_RC3 + + sntp/sntp.1sntpman@1.326 +3 -3 + NTP_4_2_8P2_RC3 + + sntp/sntp.1sntpmdoc@1.326 +1 -1 + NTP_4_2_8P2_RC3 + + sntp/sntp.html@1.506 +2 -2 + NTP_4_2_8P2_RC3 + + sntp/sntp.man.in@1.326 +3 -3 + NTP_4_2_8P2_RC3 + + sntp/sntp.mdoc.in@1.326 +1 -1 + NTP_4_2_8P2_RC3 + + util/invoke-ntp-keygen.texi@1.494 +2 -2 + NTP_4_2_8P2_RC3 + + util/ntp-keygen-opts.c@1.512 +7 -7 + NTP_4_2_8P2_RC3 + + util/ntp-keygen-opts.h@1.510 +3 -3 + NTP_4_2_8P2_RC3 + + util/ntp-keygen.1ntp-keygenman@1.322 +3 -3 + NTP_4_2_8P2_RC3 + + util/ntp-keygen.1ntp-keygenmdoc@1.322 +1 -1 + NTP_4_2_8P2_RC3 + + util/ntp-keygen.html@1.168 +2 -2 + NTP_4_2_8P2_RC3 + + util/ntp-keygen.man.in@1.322 +3 -3 + NTP_4_2_8P2_RC3 + + util/ntp-keygen.mdoc.in@1.322 +1 -1 + NTP_4_2_8P2_RC3 + +ChangeSet@1.3314.1.2, 2015-04-03 03:35:54-04:00, stenn@deacon.udel.edu + [Bug 2763] Fix for different thresholds for forward and backward steps + + ChangeLog@1.1629.1.2 +3 -0 + [Bug 2763] Fix for different thresholds for forward and backward steps + + ntpd/ntp_loopfilter.c@1.183 +2 -2 + [Bug 2763] Fix for different thresholds for forward and backward steps + +ChangeSet@1.3314.1.1, 2015-04-03 01:16:34-04:00, stenn@deacon.udel.edu + NTP_4_2_8P2_RC2 + TAG: NTP_4_2_8P2_RC2 + + ChangeLog@1.1629.1.1 +1 -0 + NTP_4_2_8P2_RC2 + + ntpd/invoke-ntp.conf.texi@1.180 +1 -1 + NTP_4_2_8P2_RC2 + + ntpd/invoke-ntp.keys.texi@1.176 +1 -1 + NTP_4_2_8P2_RC2 + + ntpd/invoke-ntpd.texi@1.493 +2 -2 + NTP_4_2_8P2_RC2 + + ntpd/ntp.conf.5man@1.214 +3 -3 + NTP_4_2_8P2_RC2 + + ntpd/ntp.conf.5mdoc@1.214 +2 -2 + NTP_4_2_8P2_RC2 + + ntpd/ntp.conf.html@1.171 +1 -1 + NTP_4_2_8P2_RC2 + + ntpd/ntp.conf.man.in@1.214 +3 -3 + NTP_4_2_8P2_RC2 + + ntpd/ntp.conf.mdoc.in@1.214 +2 -2 + NTP_4_2_8P2_RC2 + + ntpd/ntp.keys.5man@1.210 +2 -2 + NTP_4_2_8P2_RC2 + + ntpd/ntp.keys.5mdoc@1.210 +2 -2 + NTP_4_2_8P2_RC2 + + ntpd/ntp.keys.html@1.172 +1 -1 + NTP_4_2_8P2_RC2 + + ntpd/ntp.keys.man.in@1.210 +2 -2 + NTP_4_2_8P2_RC2 + + ntpd/ntp.keys.mdoc.in@1.210 +2 -2 + NTP_4_2_8P2_RC2 + + ntpd/ntpd-opts.c@1.515 +7 -7 + NTP_4_2_8P2_RC2 + + ntpd/ntpd-opts.h@1.514 +3 -3 + NTP_4_2_8P2_RC2 + + ntpd/ntpd.1ntpdman@1.322 +3 -3 + NTP_4_2_8P2_RC2 + + ntpd/ntpd.1ntpdmdoc@1.322 +2 -2 + NTP_4_2_8P2_RC2 + + ntpd/ntpd.html@1.166 +50 -26 + NTP_4_2_8P2_RC2 + + ntpd/ntpd.man.in@1.322 +3 -3 + NTP_4_2_8P2_RC2 + + ntpd/ntpd.mdoc.in@1.322 +2 -2 + NTP_4_2_8P2_RC2 + + ntpdc/invoke-ntpdc.texi@1.490 +2 -2 + NTP_4_2_8P2_RC2 + + ntpdc/ntpdc-opts.c@1.508 +7 -7 + NTP_4_2_8P2_RC2 + + ntpdc/ntpdc-opts.h@1.507 +3 -3 + NTP_4_2_8P2_RC2 + + ntpdc/ntpdc.1ntpdcman@1.321 +3 -3 + NTP_4_2_8P2_RC2 + + ntpdc/ntpdc.1ntpdcmdoc@1.321 +2 -2 + NTP_4_2_8P2_RC2 + + ntpdc/ntpdc.html@1.334 +2 -2 + NTP_4_2_8P2_RC2 + + ntpdc/ntpdc.man.in@1.321 +3 -3 + NTP_4_2_8P2_RC2 + + ntpdc/ntpdc.mdoc.in@1.321 +2 -2 + NTP_4_2_8P2_RC2 + + ntpq/invoke-ntpq.texi@1.496 +2 -2 + NTP_4_2_8P2_RC2 + + ntpq/ntpq-opts.c@1.513 +7 -7 + NTP_4_2_8P2_RC2 + + ntpq/ntpq-opts.h@1.511 +3 -3 + NTP_4_2_8P2_RC2 + + ntpq/ntpq.1ntpqman@1.324 +3 -3 + NTP_4_2_8P2_RC2 + + ntpq/ntpq.1ntpqmdoc@1.324 +2 -2 + NTP_4_2_8P2_RC2 + + ntpq/ntpq.html@1.163 +2 -2 + NTP_4_2_8P2_RC2 + + ntpq/ntpq.man.in@1.324 +3 -3 + NTP_4_2_8P2_RC2 + + ntpq/ntpq.mdoc.in@1.324 +2 -2 + NTP_4_2_8P2_RC2 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.492 +2 -2 + NTP_4_2_8P2_RC2 + + ntpsnmpd/ntpsnmpd-opts.c@1.510 +7 -7 + NTP_4_2_8P2_RC2 + + ntpsnmpd/ntpsnmpd-opts.h@1.509 +3 -3 + NTP_4_2_8P2_RC2 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.321 +3 -3 + NTP_4_2_8P2_RC2 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.321 +2 -2 + NTP_4_2_8P2_RC2 + + ntpsnmpd/ntpsnmpd.html@1.161 +1 -1 + NTP_4_2_8P2_RC2 + + ntpsnmpd/ntpsnmpd.man.in@1.321 +3 -3 + NTP_4_2_8P2_RC2 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.321 +2 -2 + NTP_4_2_8P2_RC2 + + packageinfo.sh@1.506 +1 -1 + NTP_4_2_8P2_RC2 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.82 +3 -3 + NTP_4_2_8P2_RC2 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.83 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/calc_tickadj/calc_tickadj.html@1.84 +1 -1 + NTP_4_2_8P2_RC2 + + scripts/calc_tickadj/calc_tickadj.man.in@1.81 +3 -3 + NTP_4_2_8P2_RC2 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.83 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.86 +1 -1 + NTP_4_2_8P2_RC2 + + scripts/invoke-plot_summary.texi@1.103 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/invoke-summary.texi@1.103 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.313 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/ntp-wait/ntp-wait-opts@1.49 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.310 +3 -3 + NTP_4_2_8P2_RC2 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.311 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/ntp-wait/ntp-wait.html@1.330 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/ntp-wait/ntp-wait.man.in@1.310 +3 -3 + NTP_4_2_8P2_RC2 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.311 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.101 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/ntpsweep/ntpsweep-opts@1.51 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.89 +3 -3 + NTP_4_2_8P2_RC2 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.89 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/ntpsweep/ntpsweep.html@1.102 +2 -2 + NTP_4_2_8P2_RC2 + + scripts/ntpsweep/ntpsweep.man.in@1.89 +3 -3 + NTP_4_2_8P2_RC2 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.90 +2 -2 + NTP_4_2_8P2_RC2 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 10 01:29:30 2015 Return-Path: Delivered-To: svn-src-all@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 5433280A; Fri, 10 Apr 2015 01:29: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 26865B9F; Fri, 10 Apr 2015 01:29: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 t3A1TT57054415; Fri, 10 Apr 2015 01:29:29 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A1TTuv054414; Fri, 10 Apr 2015 01:29:29 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201504100129.t3A1TTuv054414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Fri, 10 Apr 2015 01:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r281349 - vendor/ntp/4.2.8p2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 01:29:30 -0000 Author: cy Date: Fri Apr 10 01:29:29 2015 New Revision: 281349 URL: https://svnweb.freebsd.org/changeset/base/281349 Log: Tag ntp-4.2.8p2. Approved by: delphij Security: CVE-2015-1798, CVE-2015-1799 Security: VuXML ebd84c96-dd7e-11e4-854e-3c970e169bc2 Added: vendor/ntp/4.2.8p2/ - copied from r281348, vendor/ntp/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Apr 10 02:23:46 2015 Return-Path: Delivered-To: svn-src-all@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 2F78E1C9; Fri, 10 Apr 2015 02: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 19AEF127; Fri, 10 Apr 2015 02: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 t3A2Njio082264; Fri, 10 Apr 2015 02:23:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A2Njjp082262; Fri, 10 Apr 2015 02:23:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504100223.t3A2Njjp082262@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 10 Apr 2015 02:23:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281350 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 02:23:46 -0000 Author: kib Date: Fri Apr 10 02:23:44 2015 New Revision: 281350 URL: https://svnweb.freebsd.org/changeset/base/281350 Log: MFC r280760: Fix the hand after the immediate reboot after the init binary is unlinked. MFC r280763: Fix build (with gcc). Modified: stable/10/sys/ufs/ffs/ffs_softdep.c stable/10/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Fri Apr 10 01:29:29 2015 (r281349) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Fri Apr 10 02:23:44 2015 (r281350) @@ -738,6 +738,7 @@ static int softdep_process_worklist(stru static int softdep_waitidle(struct mount *, int); static void drain_output(struct vnode *); static struct buf *getdirtybuf(struct buf *, struct rwlock *, int); +static int check_inodedep_free(struct inodedep *); static void clear_remove(struct mount *); static void clear_inodedeps(struct mount *); static void unlinked_inodedep(struct mount *, struct inodedep *); @@ -1885,8 +1886,8 @@ softdep_flushworklist(oldmnt, countp, td struct thread *td; { struct vnode *devvp; - int count, error = 0; struct ufsmount *ump; + int count, error; /* * Alternately flush the block device associated with the mount @@ -1895,6 +1896,7 @@ softdep_flushworklist(oldmnt, countp, td * are found. */ *countp = 0; + error = 0; ump = VFSTOUFS(oldmnt); devvp = ump->um_devvp; while ((count = softdep_process_worklist(oldmnt, 1)) > 0) { @@ -1902,37 +1904,47 @@ softdep_flushworklist(oldmnt, countp, td vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(devvp, MNT_WAIT, td); VOP_UNLOCK(devvp, 0); - if (error) + if (error != 0) break; } return (error); } +#define SU_WAITIDLE_RETRIES 20 static int softdep_waitidle(struct mount *mp, int flags __unused) { struct ufsmount *ump; - int error; - int i; + struct vnode *devvp; + struct thread *td; + int error, i; ump = VFSTOUFS(mp); + devvp = ump->um_devvp; + td = curthread; + error = 0; ACQUIRE_LOCK(ump); - for (i = 0; i < 10 && ump->softdep_deps; i++) { + for (i = 0; i < SU_WAITIDLE_RETRIES && ump->softdep_deps != 0; i++) { ump->softdep_req = 1; KASSERT((flags & FORCECLOSE) == 0 || ump->softdep_on_worklist == 0, ("softdep_waitidle: work added after flush")); - msleep(&ump->softdep_deps, LOCK_PTR(ump), PVM, "softdeps", 1); + msleep(&ump->softdep_deps, LOCK_PTR(ump), PVM | PDROP, + "softdeps", 10 * hz); + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); + error = VOP_FSYNC(devvp, MNT_WAIT, td); + VOP_UNLOCK(devvp, 0); + if (error != 0) + break; + ACQUIRE_LOCK(ump); } ump->softdep_req = 0; - FREE_LOCK(ump); - error = 0; - if (i == 10) { + if (i == SU_WAITIDLE_RETRIES && error == 0 && ump->softdep_deps != 0) { error = EBUSY; printf("softdep_waitidle: Failed to flush worklist for %p\n", mp); } - + FREE_LOCK(ump); return (error); } @@ -7637,17 +7649,13 @@ check_inode_unwritten(inodedep) return (1); } -/* - * Try to free an inodedep structure. Return 1 if it could be freed. - */ static int -free_inodedep(inodedep) +check_inodedep_free(inodedep) struct inodedep *inodedep; { LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); - if ((inodedep->id_state & (ONWORKLIST | UNLINKED)) != 0 || - (inodedep->id_state & ALLCOMPLETE) != ALLCOMPLETE || + if ((inodedep->id_state & ALLCOMPLETE) != ALLCOMPLETE || !LIST_EMPTY(&inodedep->id_dirremhd) || !LIST_EMPTY(&inodedep->id_pendinghd) || !LIST_EMPTY(&inodedep->id_bufwait) || @@ -7662,6 +7670,21 @@ free_inodedep(inodedep) inodedep->id_nlinkdelta != 0 || inodedep->id_savedino1 != NULL) return (0); + return (1); +} + +/* + * Try to free an inodedep structure. Return 1 if it could be freed. + */ +static int +free_inodedep(inodedep) + struct inodedep *inodedep; +{ + + LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); + if ((inodedep->id_state & (ONWORKLIST | UNLINKED)) != 0 || + !check_inodedep_free(inodedep)) + return (0); if (inodedep->id_state & ONDEPLIST) LIST_REMOVE(inodedep, id_deps); LIST_REMOVE(inodedep, id_hash); @@ -13846,7 +13869,8 @@ softdep_check_suspend(struct mount *mp, { struct bufobj *bo; struct ufsmount *ump; - int error; + struct inodedep *inodedep; + int error, unlinked; bo = &devvp->v_bufobj; ASSERT_BO_WLOCKED(bo); @@ -13907,6 +13931,20 @@ softdep_check_suspend(struct mount *mp, break; } + unlinked = 0; + if (MOUNTEDSUJ(mp)) { + for (inodedep = TAILQ_FIRST(&ump->softdep_unlinked); + inodedep != NULL; + inodedep = TAILQ_NEXT(inodedep, id_unlinked)) { + if ((inodedep->id_state & (UNLINKED | UNLINKLINKS | + UNLINKONLIST)) != (UNLINKED | UNLINKLINKS | + UNLINKONLIST) || + !check_inodedep_free(inodedep)) + continue; + unlinked++; + } + } + /* * Reasons for needing more work before suspend: * - Dirty buffers on devvp. @@ -13916,8 +13954,8 @@ softdep_check_suspend(struct mount *mp, error = 0; if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0 || - softdep_depcnt != 0 || - ump->softdep_deps != 0 || + softdep_depcnt != unlinked || + ump->softdep_deps != unlinked || softdep_accdepcnt != ump->softdep_accdeps || secondary_writes != 0 || mp->mnt_secondary_writes != 0 || Modified: stable/10/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_vfsops.c Fri Apr 10 01:29:29 2015 (r281349) +++ stable/10/sys/ufs/ffs/ffs_vfsops.c Fri Apr 10 02:23:44 2015 (r281350) @@ -1502,8 +1502,11 @@ ffs_sync(mp, waitfor) if (fs->fs_fmod != 0 && fs->fs_ronly != 0 && ump->um_fsckpid == 0) panic("%s: ffs_sync: modification on read-only filesystem", fs->fs_fsmnt); - if (waitfor == MNT_LAZY) - return (ffs_sync_lazy(mp)); + if (waitfor == MNT_LAZY) { + if (!rebooting) + return (ffs_sync_lazy(mp)); + waitfor = MNT_NOWAIT; + } /* * Write back each (modified) inode. @@ -1560,7 +1563,7 @@ loop: /* * Force stale filesystem control information to be flushed. */ - if (waitfor == MNT_WAIT) { + if (waitfor == MNT_WAIT || rebooting) { if ((error = softdep_flushworklist(ump->um_mountp, &count, td))) allerror = error; /* Flushed work items may create new vnodes to clean */ @@ -1577,9 +1580,12 @@ loop: if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0) { BO_UNLOCK(bo); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); - if ((error = VOP_FSYNC(devvp, waitfor, td)) != 0) - allerror = error; + error = VOP_FSYNC(devvp, waitfor, td); VOP_UNLOCK(devvp, 0); + if (MOUNTEDSOFTDEP(mp) && (error == 0 || error == EAGAIN)) + error = ffs_sbupdate(ump, waitfor, 0); + if (error != 0) + allerror = error; if (allerror == 0 && waitfor == MNT_WAIT) goto loop; } else if (suspend != 0) { From owner-svn-src-all@FreeBSD.ORG Fri Apr 10 04:15:15 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 06:02:39 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 06:55:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 06:56:50 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 07:08:49 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 07:12:53 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 07:31:51 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 07:32:38 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 07:35:55 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 07:59:47 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 08:01:50 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 08:06:15 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 08:20:53 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 08:38:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 08:39:49 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 08:46:11 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 09:06:53 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 09:15:37 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 09:21:09 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 09:23:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 09:26:22 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 09:27:25 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 09:29:47 2015 Return-Path: Delivered-To: svn-src-all@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 6DC3E614; Fri, 10 Apr 2015 09:29: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 C6ABE796; Fri, 10 Apr 2015 09:29: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 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:29:47 -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-all@FreeBSD.ORG Fri Apr 10 09:37:55 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 09:46:18 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 09:48:38 2015 Return-Path: Delivered-To: svn-src-all@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 0027CB75; Fri, 10 Apr 2015 09:48: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 7245C97A; Fri, 10 Apr 2015 09:48: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 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:48:38 -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-all@FreeBSD.ORG Fri Apr 10 09:50:15 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 09:52:18 2015 Return-Path: Delivered-To: svn-src-all@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 A100BE8F; Fri, 10 Apr 2015 09:52: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 8B232A58; Fri, 10 Apr 2015 09:52: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 t3A9qIcw096724; Fri, 10 Apr 2015 09:52:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3A9qIx2096722; Fri, 10 Apr 2015 09:52:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504100952.t3A9qIx2096722@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 10 Apr 2015 09:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281364 - in stable/9/sys/geom: mirror raid X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 09:52:18 -0000 Author: mav Date: Fri Apr 10 09:52:17 2015 New Revision: 281364 URL: https://svnweb.freebsd.org/changeset/base/281364 Log: MFC r280757: Remove request sorting from GEOM_MIRROR and GEOM_RAID. When CPU is not busy, those queues are typically empty. When CPU is busy, then one more extra sorting is the last thing it needs. If specific device (HDD) really needs sorting, then it will be done later by CAM. This supposed to fix livelock reported for mirror of two SSDs, when UFS fires zillion of BIO_DELETE requests, that totally blocks I/O subsystem by pointless sorting of requests and responses under single mutex lock. Modified: stable/9/sys/geom/mirror/g_mirror.c stable/9/sys/geom/raid/g_raid.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/9/sys/geom/mirror/g_mirror.c Fri Apr 10 09:50:13 2015 (r281363) +++ stable/9/sys/geom/mirror/g_mirror.c Fri Apr 10 09:52:17 2015 (r281364) @@ -861,7 +861,7 @@ g_mirror_done(struct bio *bp) sc = bp->bio_from->geom->softc; bp->bio_cflags = G_MIRROR_BIO_FLAG_REGULAR; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); } @@ -948,7 +948,7 @@ g_mirror_regular_request(struct bio *bp) else { pbp->bio_error = 0; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, pbp); + bioq_insert_tail(&sc->sc_queue, pbp); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); @@ -988,7 +988,7 @@ g_mirror_sync_done(struct bio *bp) sc = bp->bio_from->geom->softc; bp->bio_cflags = G_MIRROR_BIO_FLAG_SYNC; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); } @@ -1103,7 +1103,7 @@ g_mirror_start(struct bio *bp) return; } mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); Modified: stable/9/sys/geom/raid/g_raid.c ============================================================================== --- stable/9/sys/geom/raid/g_raid.c Fri Apr 10 09:50:13 2015 (r281363) +++ stable/9/sys/geom/raid/g_raid.c Fri Apr 10 09:52:17 2015 (r281364) @@ -1142,7 +1142,7 @@ g_raid_start(struct bio *bp) return; } mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (!dumping) { G_RAID_DEBUG1(4, sc, "Waking up %p.", sc); @@ -1354,7 +1354,7 @@ g_raid_unlock_range(struct g_raid_volume (intmax_t)(lp->l_offset+lp->l_length)); mtx_lock(&sc->sc_queue_mtx); while ((bp = bioq_takefirst(&vol->v_locked)) != NULL) - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); free(lp, M_RAID); return (0); @@ -1448,7 +1448,7 @@ g_raid_disk_done(struct bio *bp) sd = bp->bio_caller1; sc = sd->sd_softc; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (!dumping) wakeup(sc); From owner-svn-src-all@FreeBSD.ORG Fri Apr 10 10:01:48 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 10:03:16 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 10:22:07 2015 Return-Path: Delivered-To: svn-src-all@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 77E5CA7C; Fri, 10 Apr 2015 10:22:07 +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 EA7B5DEB; Fri, 10 Apr 2015 10:22:06 +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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 10:22:07 -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-all@FreeBSD.ORG Fri Apr 10 11:18:47 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 11:43:45 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 11:46:25 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 12:21:21 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 12:26:35 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 12:36:42 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 12:45:20 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 12:47:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 12:48:55 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 12:52:05 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 13:20:32 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 13:26:10 2015 Return-Path: Delivered-To: svn-src-all@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 3A6F178A; Fri, 10 Apr 2015 13:26: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 227057B5; Fri, 10 Apr 2015 13:26: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 t3ADQAa5098168; Fri, 10 Apr 2015 13:26:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ADQ6X2098127; Fri, 10 Apr 2015 13:26:06 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504101326.t3ADQ6X2098127@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 13:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r281368 - in vendor/nvi/dist: . catalog cl common docs docs/USD.doc docs/internals docs/interp docs/man docs/tutorial ex regex vi X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 13:26:10 -0000 Author: bapt Date: Fri Apr 10 13:26:05 2015 New Revision: 281368 URL: https://svnweb.freebsd.org/changeset/base/281368 Log: Import nvi 2.1.3 Approved by: peter Added: vendor/nvi/dist/docs/man/ vendor/nvi/dist/docs/man/Makefile (contents, props changed) vendor/nvi/dist/docs/man/vi.1 (contents, props changed) Deleted: vendor/nvi/dist/catalog/spell.ok vendor/nvi/dist/docs/TODO vendor/nvi/dist/docs/USD.doc/ vendor/nvi/dist/docs/changelog vendor/nvi/dist/docs/ev vendor/nvi/dist/docs/features vendor/nvi/dist/docs/help vendor/nvi/dist/docs/internals/ vendor/nvi/dist/docs/interp/ vendor/nvi/dist/docs/spell.ok vendor/nvi/dist/docs/tutorial/ Modified: vendor/nvi/dist/README vendor/nvi/dist/catalog/dump.c vendor/nvi/dist/cl/cl.h vendor/nvi/dist/cl/cl_funcs.c vendor/nvi/dist/cl/cl_main.c vendor/nvi/dist/cl/cl_read.c vendor/nvi/dist/cl/cl_screen.c vendor/nvi/dist/cl/cl_term.c vendor/nvi/dist/cl/extern.h vendor/nvi/dist/common/common.h vendor/nvi/dist/common/conv.c vendor/nvi/dist/common/cut.c vendor/nvi/dist/common/delete.c vendor/nvi/dist/common/encoding.c vendor/nvi/dist/common/exf.c vendor/nvi/dist/common/extern.h vendor/nvi/dist/common/gs.h vendor/nvi/dist/common/key.c vendor/nvi/dist/common/line.c vendor/nvi/dist/common/log.c vendor/nvi/dist/common/main.c vendor/nvi/dist/common/mark.c vendor/nvi/dist/common/msg.c vendor/nvi/dist/common/options.c vendor/nvi/dist/common/options.h vendor/nvi/dist/common/options_f.c vendor/nvi/dist/common/put.c vendor/nvi/dist/common/recover.c vendor/nvi/dist/common/screen.c vendor/nvi/dist/common/search.c vendor/nvi/dist/common/seq.c vendor/nvi/dist/common/util.c vendor/nvi/dist/ex/ex.c vendor/nvi/dist/ex/ex.h vendor/nvi/dist/ex/ex_abbrev.c vendor/nvi/dist/ex/ex_append.c vendor/nvi/dist/ex/ex_args.c vendor/nvi/dist/ex/ex_argv.c vendor/nvi/dist/ex/ex_at.c vendor/nvi/dist/ex/ex_bang.c vendor/nvi/dist/ex/ex_cd.c vendor/nvi/dist/ex/ex_cscope.c vendor/nvi/dist/ex/ex_delete.c vendor/nvi/dist/ex/ex_display.c vendor/nvi/dist/ex/ex_edit.c vendor/nvi/dist/ex/ex_equal.c vendor/nvi/dist/ex/ex_file.c vendor/nvi/dist/ex/ex_filter.c vendor/nvi/dist/ex/ex_global.c vendor/nvi/dist/ex/ex_init.c vendor/nvi/dist/ex/ex_join.c vendor/nvi/dist/ex/ex_map.c vendor/nvi/dist/ex/ex_mark.c vendor/nvi/dist/ex/ex_mkexrc.c vendor/nvi/dist/ex/ex_move.c vendor/nvi/dist/ex/ex_open.c vendor/nvi/dist/ex/ex_preserve.c vendor/nvi/dist/ex/ex_print.c vendor/nvi/dist/ex/ex_put.c vendor/nvi/dist/ex/ex_quit.c vendor/nvi/dist/ex/ex_read.c vendor/nvi/dist/ex/ex_screen.c vendor/nvi/dist/ex/ex_script.c vendor/nvi/dist/ex/ex_set.c vendor/nvi/dist/ex/ex_shell.c vendor/nvi/dist/ex/ex_shift.c vendor/nvi/dist/ex/ex_source.c vendor/nvi/dist/ex/ex_stop.c vendor/nvi/dist/ex/ex_subst.c vendor/nvi/dist/ex/ex_tag.c vendor/nvi/dist/ex/ex_txt.c vendor/nvi/dist/ex/ex_undo.c vendor/nvi/dist/ex/ex_usage.c vendor/nvi/dist/ex/ex_util.c vendor/nvi/dist/ex/ex_version.c vendor/nvi/dist/ex/ex_visual.c vendor/nvi/dist/ex/ex_write.c vendor/nvi/dist/ex/ex_yank.c vendor/nvi/dist/ex/ex_z.c vendor/nvi/dist/ex/extern.h vendor/nvi/dist/ex/version.h vendor/nvi/dist/regex/COPYRIGHT vendor/nvi/dist/regex/cclass.h vendor/nvi/dist/regex/cname.h vendor/nvi/dist/regex/engine.c vendor/nvi/dist/regex/re_format.7 vendor/nvi/dist/regex/regcomp.c vendor/nvi/dist/regex/regerror.c vendor/nvi/dist/regex/regex.3 vendor/nvi/dist/regex/regex.h vendor/nvi/dist/regex/regex2.h vendor/nvi/dist/regex/regexec.c vendor/nvi/dist/regex/regfree.c vendor/nvi/dist/regex/utils.h vendor/nvi/dist/vi/extern.h vendor/nvi/dist/vi/getc.c vendor/nvi/dist/vi/v_at.c vendor/nvi/dist/vi/v_ch.c vendor/nvi/dist/vi/v_delete.c vendor/nvi/dist/vi/v_ex.c vendor/nvi/dist/vi/v_increment.c vendor/nvi/dist/vi/v_init.c vendor/nvi/dist/vi/v_itxt.c vendor/nvi/dist/vi/v_left.c vendor/nvi/dist/vi/v_mark.c vendor/nvi/dist/vi/v_match.c vendor/nvi/dist/vi/v_paragraph.c vendor/nvi/dist/vi/v_put.c vendor/nvi/dist/vi/v_redraw.c vendor/nvi/dist/vi/v_replace.c vendor/nvi/dist/vi/v_right.c vendor/nvi/dist/vi/v_screen.c vendor/nvi/dist/vi/v_scroll.c vendor/nvi/dist/vi/v_search.c vendor/nvi/dist/vi/v_section.c vendor/nvi/dist/vi/v_sentence.c vendor/nvi/dist/vi/v_status.c vendor/nvi/dist/vi/v_txt.c vendor/nvi/dist/vi/v_ulcase.c vendor/nvi/dist/vi/v_undo.c vendor/nvi/dist/vi/v_util.c vendor/nvi/dist/vi/v_word.c vendor/nvi/dist/vi/v_xchar.c vendor/nvi/dist/vi/v_yank.c vendor/nvi/dist/vi/v_z.c vendor/nvi/dist/vi/v_zexit.c vendor/nvi/dist/vi/vi.c vendor/nvi/dist/vi/vi.h vendor/nvi/dist/vi/vs_line.c vendor/nvi/dist/vi/vs_msg.c vendor/nvi/dist/vi/vs_refresh.c vendor/nvi/dist/vi/vs_relative.c vendor/nvi/dist/vi/vs_smap.c vendor/nvi/dist/vi/vs_split.c Modified: vendor/nvi/dist/README ============================================================================== --- vendor/nvi/dist/README Fri Apr 10 13:20:31 2015 (r281367) +++ vendor/nvi/dist/README Fri Apr 10 13:26:05 2015 (r281368) @@ -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: vendor/nvi/dist/catalog/dump.c ============================================================================== --- vendor/nvi/dist/catalog/dump.c Fri Apr 10 13:20:31 2015 (r281367) +++ vendor/nvi/dist/catalog/dump.c Fri Apr 10 13:26:05 2015 (r281368) @@ -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[] = "$Id: dump.c,v 8.2 2011/07/14 00:05:25 zy Exp $"; #endif /* not lint */ @@ -45,8 +35,7 @@ static char sccsid[] = "$Id: dump.c,v 8. #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: vendor/nvi/dist/cl/cl.h ============================================================================== --- vendor/nvi/dist/cl/cl.h Fri Apr 10 13:20:31 2015 (r281367) +++ vendor/nvi/dist/cl/cl.h Fri Apr 10 13:26:05 2015 (r281368) @@ -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: vendor/nvi/dist/cl/cl_funcs.c ============================================================================== --- vendor/nvi/dist/cl/cl_funcs.c Fri Apr 10 13:20:31 2015 (r281367) +++ vendor/nvi/dist/cl/cl_funcs.c Fri Apr 10 13:26:05 2015 (r281368) @@ -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: vendor/nvi/dist/cl/cl_main.c ============================================================================== --- vendor/nvi/dist/cl/cl_main.c Fri Apr 10 13:20:31 2015 (r281367) +++ vendor/nvi/dist/cl/cl_main.c Fri Apr 10 13:26:05 2015 (r281368) @@ -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: vendor/nvi/dist/cl/cl_read.c ============================================================================== --- vendor/nvi/dist/cl/cl_read.c Fri Apr 10 13:20:31 2015 (r281367) +++ vendor/nvi/dist/cl/cl_read.c Fri Apr 10 13:26:05 2015 (r281368) @@ -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: vendor/nvi/dist/cl/cl_screen.c ============================================================================== --- vendor/nvi/dist/cl/cl_screen.c Fri Apr 10 13:20:31 2015 (r281367) +++ vendor/nvi/dist/cl/cl_screen.c Fri Apr 10 13:26:05 2015 (r281368) @@ -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: vendor/nvi/dist/cl/cl_term.c ============================================================================== --- vendor/nvi/dist/cl/cl_term.c Fri Apr 10 13:20:31 2015 (r281367) +++ vendor/nvi/dist/cl/cl_term.c Fri Apr 10 13:26:05 2015 (r281368) @@ -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: vendor/nvi/dist/cl/extern.h ============================================================================== --- vendor/nvi/dist/cl/extern.h Fri Apr 10 13:20:31 2015 (r281367) +++ vendor/nvi/dist/cl/extern.h Fri Apr 10 13:26:05 2015 (r281368) @@ -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: vendor/nvi/dist/common/common.h ============================================================================== --- vendor/nvi/dist/common/common.h Fri Apr 10 13:20:31 2015 (r281367) +++ vendor/nvi/dist/common/common.h Fri Apr 10 13:26:05 2015 (r281368) @@ -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: vendor/nvi/dist/common/conv.c ============================================================================== --- vendor/nvi/dist/common/conv.c Fri Apr 10 13:20:31 2015 (r281367) +++ vendor/nvi/dist/common/conv.c Fri Apr 10 13:26:05 2015 (r281368) @@ -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-all@FreeBSD.ORG Fri Apr 10 13:26:38 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 13:28:03 2015 Return-Path: Delivered-To: svn-src-all@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 28E2EA3C; Fri, 10 Apr 2015 13:28: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 0F4627E3; Fri, 10 Apr 2015 13:28: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 t3ADS3HQ098495; Fri, 10 Apr 2015 13:28:03 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ADS1Yr098485; Fri, 10 Apr 2015 13:28:01 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504101328.t3ADS1Yr098485@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 13:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r281370 - in vendor/nvi/2.1.3: . catalog cl common docs docs/USD.doc docs/internals docs/interp docs/man docs/tutorial ex regex vi X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 13:28:03 -0000 Author: bapt Date: Fri Apr 10 13:28:01 2015 New Revision: 281370 URL: https://svnweb.freebsd.org/changeset/base/281370 Log: Tag nvi2 import 2.1.3 Added: vendor/nvi/2.1.3/ - copied from r281364, vendor/nvi/dist/ vendor/nvi/2.1.3/docs/man/ - copied from r281368, vendor/nvi/dist/docs/man/ Replaced: vendor/nvi/2.1.3/README - copied unchanged from r281368, vendor/nvi/dist/README vendor/nvi/2.1.3/catalog/dump.c - copied unchanged from r281368, vendor/nvi/dist/catalog/dump.c vendor/nvi/2.1.3/cl/cl.h - copied unchanged from r281368, vendor/nvi/dist/cl/cl.h vendor/nvi/2.1.3/cl/cl_funcs.c - copied unchanged from r281368, vendor/nvi/dist/cl/cl_funcs.c vendor/nvi/2.1.3/cl/cl_main.c - copied unchanged from r281368, vendor/nvi/dist/cl/cl_main.c vendor/nvi/2.1.3/cl/cl_read.c - copied unchanged from r281368, vendor/nvi/dist/cl/cl_read.c vendor/nvi/2.1.3/cl/cl_screen.c - copied unchanged from r281368, vendor/nvi/dist/cl/cl_screen.c vendor/nvi/2.1.3/cl/cl_term.c - copied unchanged from r281368, vendor/nvi/dist/cl/cl_term.c vendor/nvi/2.1.3/cl/extern.h - copied unchanged from r281368, vendor/nvi/dist/cl/extern.h vendor/nvi/2.1.3/common/common.h - copied unchanged from r281368, vendor/nvi/dist/common/common.h vendor/nvi/2.1.3/common/conv.c - copied unchanged from r281368, vendor/nvi/dist/common/conv.c vendor/nvi/2.1.3/common/cut.c - copied unchanged from r281368, vendor/nvi/dist/common/cut.c vendor/nvi/2.1.3/common/delete.c - copied unchanged from r281368, vendor/nvi/dist/common/delete.c vendor/nvi/2.1.3/common/encoding.c - copied unchanged from r281368, vendor/nvi/dist/common/encoding.c vendor/nvi/2.1.3/common/exf.c - copied unchanged from r281368, vendor/nvi/dist/common/exf.c vendor/nvi/2.1.3/common/extern.h - copied unchanged from r281368, vendor/nvi/dist/common/extern.h vendor/nvi/2.1.3/common/gs.h - copied unchanged from r281368, vendor/nvi/dist/common/gs.h vendor/nvi/2.1.3/common/key.c - copied unchanged from r281368, vendor/nvi/dist/common/key.c vendor/nvi/2.1.3/common/line.c - copied unchanged from r281368, vendor/nvi/dist/common/line.c vendor/nvi/2.1.3/common/log.c - copied unchanged from r281368, vendor/nvi/dist/common/log.c vendor/nvi/2.1.3/common/main.c - copied unchanged from r281368, vendor/nvi/dist/common/main.c vendor/nvi/2.1.3/common/mark.c - copied unchanged from r281368, vendor/nvi/dist/common/mark.c vendor/nvi/2.1.3/common/msg.c - copied unchanged from r281368, vendor/nvi/dist/common/msg.c vendor/nvi/2.1.3/common/options.c - copied unchanged from r281368, vendor/nvi/dist/common/options.c vendor/nvi/2.1.3/common/options.h - copied unchanged from r281368, vendor/nvi/dist/common/options.h vendor/nvi/2.1.3/common/options_f.c - copied unchanged from r281368, vendor/nvi/dist/common/options_f.c vendor/nvi/2.1.3/common/put.c - copied unchanged from r281368, vendor/nvi/dist/common/put.c vendor/nvi/2.1.3/common/recover.c - copied unchanged from r281368, vendor/nvi/dist/common/recover.c vendor/nvi/2.1.3/common/screen.c - copied unchanged from r281368, vendor/nvi/dist/common/screen.c vendor/nvi/2.1.3/common/search.c - copied unchanged from r281368, vendor/nvi/dist/common/search.c vendor/nvi/2.1.3/common/seq.c - copied unchanged from r281368, vendor/nvi/dist/common/seq.c vendor/nvi/2.1.3/common/util.c - copied unchanged from r281368, vendor/nvi/dist/common/util.c vendor/nvi/2.1.3/ex/ex.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex.c vendor/nvi/2.1.3/ex/ex.h - copied unchanged from r281368, vendor/nvi/dist/ex/ex.h vendor/nvi/2.1.3/ex/ex_abbrev.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_abbrev.c vendor/nvi/2.1.3/ex/ex_append.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_append.c vendor/nvi/2.1.3/ex/ex_args.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_args.c vendor/nvi/2.1.3/ex/ex_argv.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_argv.c vendor/nvi/2.1.3/ex/ex_at.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_at.c vendor/nvi/2.1.3/ex/ex_bang.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_bang.c vendor/nvi/2.1.3/ex/ex_cd.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_cd.c vendor/nvi/2.1.3/ex/ex_cscope.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_cscope.c vendor/nvi/2.1.3/ex/ex_delete.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_delete.c vendor/nvi/2.1.3/ex/ex_display.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_display.c vendor/nvi/2.1.3/ex/ex_edit.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_edit.c vendor/nvi/2.1.3/ex/ex_equal.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_equal.c vendor/nvi/2.1.3/ex/ex_file.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_file.c vendor/nvi/2.1.3/ex/ex_filter.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_filter.c vendor/nvi/2.1.3/ex/ex_global.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_global.c vendor/nvi/2.1.3/ex/ex_init.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_init.c vendor/nvi/2.1.3/ex/ex_join.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_join.c vendor/nvi/2.1.3/ex/ex_map.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_map.c vendor/nvi/2.1.3/ex/ex_mark.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_mark.c vendor/nvi/2.1.3/ex/ex_mkexrc.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_mkexrc.c vendor/nvi/2.1.3/ex/ex_move.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_move.c vendor/nvi/2.1.3/ex/ex_open.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_open.c vendor/nvi/2.1.3/ex/ex_preserve.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_preserve.c vendor/nvi/2.1.3/ex/ex_print.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_print.c vendor/nvi/2.1.3/ex/ex_put.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_put.c vendor/nvi/2.1.3/ex/ex_quit.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_quit.c vendor/nvi/2.1.3/ex/ex_read.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_read.c vendor/nvi/2.1.3/ex/ex_screen.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_screen.c vendor/nvi/2.1.3/ex/ex_script.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_script.c vendor/nvi/2.1.3/ex/ex_set.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_set.c vendor/nvi/2.1.3/ex/ex_shell.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_shell.c vendor/nvi/2.1.3/ex/ex_shift.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_shift.c vendor/nvi/2.1.3/ex/ex_source.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_source.c vendor/nvi/2.1.3/ex/ex_stop.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_stop.c vendor/nvi/2.1.3/ex/ex_subst.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_subst.c vendor/nvi/2.1.3/ex/ex_tag.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_tag.c vendor/nvi/2.1.3/ex/ex_txt.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_txt.c vendor/nvi/2.1.3/ex/ex_undo.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_undo.c vendor/nvi/2.1.3/ex/ex_usage.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_usage.c vendor/nvi/2.1.3/ex/ex_util.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_util.c vendor/nvi/2.1.3/ex/ex_version.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_version.c vendor/nvi/2.1.3/ex/ex_visual.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_visual.c vendor/nvi/2.1.3/ex/ex_write.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_write.c vendor/nvi/2.1.3/ex/ex_yank.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_yank.c vendor/nvi/2.1.3/ex/ex_z.c - copied unchanged from r281368, vendor/nvi/dist/ex/ex_z.c vendor/nvi/2.1.3/ex/extern.h - copied unchanged from r281368, vendor/nvi/dist/ex/extern.h vendor/nvi/2.1.3/ex/version.h - copied unchanged from r281368, vendor/nvi/dist/ex/version.h vendor/nvi/2.1.3/regex/COPYRIGHT - copied unchanged from r281368, vendor/nvi/dist/regex/COPYRIGHT vendor/nvi/2.1.3/regex/cclass.h - copied unchanged from r281368, vendor/nvi/dist/regex/cclass.h vendor/nvi/2.1.3/regex/cname.h - copied unchanged from r281368, vendor/nvi/dist/regex/cname.h vendor/nvi/2.1.3/regex/engine.c - copied unchanged from r281368, vendor/nvi/dist/regex/engine.c vendor/nvi/2.1.3/regex/re_format.7 - copied unchanged from r281368, vendor/nvi/dist/regex/re_format.7 vendor/nvi/2.1.3/regex/regcomp.c - copied unchanged from r281368, vendor/nvi/dist/regex/regcomp.c vendor/nvi/2.1.3/regex/regerror.c - copied unchanged from r281368, vendor/nvi/dist/regex/regerror.c vendor/nvi/2.1.3/regex/regex.3 - copied unchanged from r281368, vendor/nvi/dist/regex/regex.3 vendor/nvi/2.1.3/regex/regex.h - copied unchanged from r281368, vendor/nvi/dist/regex/regex.h vendor/nvi/2.1.3/regex/regex2.h - copied unchanged from r281368, vendor/nvi/dist/regex/regex2.h vendor/nvi/2.1.3/regex/regexec.c - copied unchanged from r281368, vendor/nvi/dist/regex/regexec.c vendor/nvi/2.1.3/regex/regfree.c - copied unchanged from r281368, vendor/nvi/dist/regex/regfree.c vendor/nvi/2.1.3/regex/utils.h - copied unchanged from r281368, vendor/nvi/dist/regex/utils.h vendor/nvi/2.1.3/vi/extern.h - copied unchanged from r281368, vendor/nvi/dist/vi/extern.h vendor/nvi/2.1.3/vi/getc.c - copied unchanged from r281368, vendor/nvi/dist/vi/getc.c vendor/nvi/2.1.3/vi/v_at.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_at.c vendor/nvi/2.1.3/vi/v_ch.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_ch.c vendor/nvi/2.1.3/vi/v_delete.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_delete.c vendor/nvi/2.1.3/vi/v_ex.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_ex.c vendor/nvi/2.1.3/vi/v_increment.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_increment.c vendor/nvi/2.1.3/vi/v_init.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_init.c vendor/nvi/2.1.3/vi/v_itxt.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_itxt.c vendor/nvi/2.1.3/vi/v_left.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_left.c vendor/nvi/2.1.3/vi/v_mark.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_mark.c vendor/nvi/2.1.3/vi/v_match.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_match.c vendor/nvi/2.1.3/vi/v_paragraph.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_paragraph.c vendor/nvi/2.1.3/vi/v_put.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_put.c vendor/nvi/2.1.3/vi/v_redraw.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_redraw.c vendor/nvi/2.1.3/vi/v_replace.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_replace.c vendor/nvi/2.1.3/vi/v_right.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_right.c vendor/nvi/2.1.3/vi/v_screen.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_screen.c vendor/nvi/2.1.3/vi/v_scroll.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_scroll.c vendor/nvi/2.1.3/vi/v_search.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_search.c vendor/nvi/2.1.3/vi/v_section.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_section.c vendor/nvi/2.1.3/vi/v_sentence.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_sentence.c vendor/nvi/2.1.3/vi/v_status.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_status.c vendor/nvi/2.1.3/vi/v_txt.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_txt.c vendor/nvi/2.1.3/vi/v_ulcase.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_ulcase.c vendor/nvi/2.1.3/vi/v_undo.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_undo.c vendor/nvi/2.1.3/vi/v_util.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_util.c vendor/nvi/2.1.3/vi/v_word.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_word.c vendor/nvi/2.1.3/vi/v_xchar.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_xchar.c vendor/nvi/2.1.3/vi/v_yank.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_yank.c vendor/nvi/2.1.3/vi/v_z.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_z.c vendor/nvi/2.1.3/vi/v_zexit.c - copied unchanged from r281368, vendor/nvi/dist/vi/v_zexit.c vendor/nvi/2.1.3/vi/vi.c - copied unchanged from r281368, vendor/nvi/dist/vi/vi.c vendor/nvi/2.1.3/vi/vi.h - copied unchanged from r281368, vendor/nvi/dist/vi/vi.h vendor/nvi/2.1.3/vi/vs_line.c - copied unchanged from r281368, vendor/nvi/dist/vi/vs_line.c vendor/nvi/2.1.3/vi/vs_msg.c - copied unchanged from r281368, vendor/nvi/dist/vi/vs_msg.c vendor/nvi/2.1.3/vi/vs_refresh.c - copied unchanged from r281368, vendor/nvi/dist/vi/vs_refresh.c vendor/nvi/2.1.3/vi/vs_relative.c - copied unchanged from r281368, vendor/nvi/dist/vi/vs_relative.c vendor/nvi/2.1.3/vi/vs_smap.c - copied unchanged from r281368, vendor/nvi/dist/vi/vs_smap.c vendor/nvi/2.1.3/vi/vs_split.c - copied unchanged from r281368, vendor/nvi/dist/vi/vs_split.c Deleted: vendor/nvi/2.1.3/catalog/spell.ok vendor/nvi/2.1.3/docs/TODO vendor/nvi/2.1.3/docs/USD.doc/ vendor/nvi/2.1.3/docs/changelog vendor/nvi/2.1.3/docs/ev vendor/nvi/2.1.3/docs/features vendor/nvi/2.1.3/docs/help vendor/nvi/2.1.3/docs/internals/ vendor/nvi/2.1.3/docs/interp/ vendor/nvi/2.1.3/docs/spell.ok vendor/nvi/2.1.3/docs/tutorial/ Copied: vendor/nvi/2.1.3/README (from r281368, vendor/nvi/dist/README) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/nvi/2.1.3/README Fri Apr 10 13:28:01 2015 (r281370, copy of r281368, vendor/nvi/dist/README) @@ -0,0 +1,66 @@ +# $Id: README,v 9.2 2015/04/08 17:18:56 zy Exp $ + +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. + +The directory layout is as follows: + + LICENSE ....... Copyright, use and redistribution information. + README ........ This file. + build ......... Build directory. + catalog ....... Message catalogs; see catalog/README. + cl ............ Vi interface to the curses(3) library. + common ........ Code shared by ex and vi. + docs .......... Ex/vi documentation, both current and historic. + ex ............ Ex source code. + regex ......... Modified regex library with wide character support. + vi ............ Vi source code. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +o Nvi was written by Keith Bostic, and the last version is 1.79. After that, + + Sven Verdoolaege added the iconv support and the DB3 locking. + + Jun-ichiro itojun Hagino developed the file encoding detection + techniques in his nvi-m17n. + +The following acknowledgments were written by Keith Bostic: + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +o This software is several years old and is the product of many folks' work. + + This software was originally derived from software contributed to + the University of California, Berkeley by Steve Kirkendall, the + author of the vi clone elvis. Without his work, this work would + have been far more difficult. + + IEEE POSIX 1003.2 style regular expression support is courtesy of + Henry Spencer, for which I am *very* grateful. + + Elan Amir did the original 4BSD curses work that made it possible + to support a full-screen editor using curses. + + George Neville-Neil added the Tcl interpreter, and the initial + interpreter design was his. + + Sven Verdoolaege added the Perl interpreter. + + Rob Mayoff provided the original Cscope support. + +o Many, many people suggested enhancements, and provided bug reports and + testing, far too many to individually thank. + +o From the original vi acknowledgements, by William Joy and Mark Horton: + + Bruce Englar encouraged the early development of this display + editor. Peter Kessler helped bring sanity to version 2's + command layout. Bill Joy wrote versions 1 and 2.0 through 2.7, + and created the framework that users see in the present editor. + Mark Horton added macros and other features and made the editor + work on a large number of terminals and Unix systems. + +o And... + The financial support of UUNET Communications Services is gratefully + acknowledged. Copied: vendor/nvi/2.1.3/catalog/dump.c (from r281368, vendor/nvi/dist/catalog/dump.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/nvi/2.1.3/catalog/dump.c Fri Apr 10 13:28:01 2015 (r281370, copy of r281368, vendor/nvi/dist/catalog/dump.c) @@ -0,0 +1,101 @@ +/*- + * Copyright (c) 1992, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. 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. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + */ + +#ifndef lint +static char sccsid[] = "$Id: dump.c,v 8.2 2011/07/14 00:05:25 zy Exp $"; +#endif /* not lint */ + +#include +#include + +static void +parse(FILE *fp) +{ + int ch, s1, s2, s3; + +#define TESTD(s) { \ + if ((s = getc(fp)) == EOF) \ + return; \ + if (!isdigit(s)) \ + continue; \ +} +#define TESTP { \ + if ((ch = getc(fp)) == EOF) \ + return; \ + if (ch != '|') \ + continue; \ +} +#define MOVEC(t) { \ + do { \ + if ((ch = getc(fp)) == EOF) \ + return; \ + } while (ch != (t)); \ +} + for (;;) { + MOVEC('"'); + TESTD(s1); + TESTD(s2); + TESTD(s3); + TESTP; + putchar('"'); + putchar(s1); + putchar(s2); + putchar(s3); + putchar('|'); + for (;;) { /* dump to end quote. */ + if ((ch = getc(fp)) == EOF) + return; + putchar(ch); + if (ch == '"') + break; + if (ch == '\\') { + if ((ch = getc(fp)) == EOF) + return; + putchar(ch); + } + } + putchar('\n'); + } +} + +int +main(int argc, char *argv[]) +{ + FILE *fp; + + for (; *argv != NULL; ++argv) { + if ((fp = fopen(*argv, "r")) == NULL) { + perror(*argv); + return (1); + } + parse(fp); + (void)fclose(fp); + } + return (0); +} Copied: vendor/nvi/2.1.3/cl/cl.h (from r281368, vendor/nvi/dist/cl/cl.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/nvi/2.1.3/cl/cl.h Fri Apr 10 13:28:01 2015 (r281370, copy of r281368, vendor/nvi/dist/cl/cl.h) @@ -0,0 +1,83 @@ +/*- + * Copyright (c) 1993, 1994 + * The Regents of the University of California. All rights reserved. + * Copyright (c) 1993, 1994, 1995, 1996 + * Keith Bostic. All rights reserved. + * + * See the LICENSE file for redistribution information. + * + * $Id: cl.h,v 10.34 2011/08/15 20:07:32 zy Exp $ + */ + +#ifdef USE_WIDECHAR +#define _XOPEN_SOURCE_EXTENDED +#endif +#ifdef HAVE_NCURSES_H +#include +#else +#include +#endif + +typedef struct _cl_private { + char ibuf[256]; /* Input keys. */ + + size_t skip; /* Remaining keys. */ + + CONVWIN cw; /* Conversion buffer. */ + + int eof_count; /* EOF count. */ + + struct termios orig; /* Original terminal values. */ + struct termios ex_enter;/* Terminal values to enter ex. */ + struct termios vi_enter;/* Terminal values to enter vi. */ + + char *el; /* Clear to EOL terminal string. */ + char *cup; /* Cursor movement terminal string. */ + char *cuu1; /* Cursor up terminal string. */ + char *rmso, *smso; /* Inverse video terminal strings. */ + char *smcup, *rmcup; /* Terminal start/stop strings. */ + + char *oname; /* Original screen window name. */ + + SCR *focus; /* Screen that has the "focus". */ + + int killersig; /* Killer signal. */ +#define INDX_HUP 0 +#define INDX_INT 1 +#define INDX_TERM 2 +#define INDX_WINCH 3 +#define INDX_MAX 4 /* Original signal information. */ + struct sigaction oact[INDX_MAX]; + + enum { /* Tty group write mode. */ + TGW_UNKNOWN=0, TGW_SET, TGW_UNSET } tgw; + + enum { /* Terminal initialization strings. */ + TE_SENT=0, TI_SENT } ti_te; + +#define CL_IN_EX 0x0001 /* Currently running ex. */ +#define CL_LAYOUT 0x0002 /* Screen layout changed. */ +#define CL_RENAME 0x0004 /* X11 xterm icon/window renamed. */ +#define CL_RENAME_OK 0x0008 /* User wants the windows renamed. */ +#define CL_SCR_EX_INIT 0x0010 /* Ex screen initialized. */ +#define CL_SCR_VI_INIT 0x0020 /* Vi screen initialized. */ +#define CL_SIGHUP 0x0040 /* SIGHUP arrived. */ +#define CL_SIGINT 0x0080 /* SIGINT arrived. */ +#define CL_SIGTERM 0x0100 /* SIGTERM arrived. */ +#define CL_SIGWINCH 0x0200 /* SIGWINCH arrived. */ +#define CL_STDIN_TTY 0x0400 /* Talking to a terminal. */ + u_int32_t flags; +} CL_PRIVATE; + +#define CLP(sp) ((CL_PRIVATE *)((sp)->gp->cl_private)) +#define GCLP(gp) ((CL_PRIVATE *)gp->cl_private) +#define CLSP(sp) ((WINDOW *)((sp)->cl_private)) + +/* Return possibilities from the keyboard read routine. */ +typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t; + +/* The screen position relative to a specific window. */ +#define RCNO(sp, cno) (cno) +#define RLNO(sp, lno) (lno) + +#include "extern.h" Copied: vendor/nvi/2.1.3/cl/cl_funcs.c (from r281368, vendor/nvi/dist/cl/cl_funcs.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/nvi/2.1.3/cl/cl_funcs.c Fri Apr 10 13:28:01 2015 (r281370, copy of r281368, vendor/nvi/dist/cl/cl_funcs.c) @@ -0,0 +1,852 @@ +/*- + * Copyright (c) 1993, 1994 + * The Regents of the University of California. All rights reserved. + * Copyright (c) 1993, 1994, 1995, 1996 + * Keith Bostic. All rights reserved. + * + * See the LICENSE file for redistribution information. + */ + +#include "config.h" + +#ifndef lint +static const char sccsid[] = "$Id: cl_funcs.c,v 10.74 2012/10/11 10:30:16 zy Exp $"; +#endif /* not lint */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#ifdef HAVE_TERM_H +#include +#endif +#include +#include + +#include "../common/common.h" +#include "../vi/vi.h" +#include "cl.h" + +static void cl_rdiv(SCR *); + +static int +addstr4(SCR *sp, void *str, size_t len, int wide) +{ + CL_PRIVATE *clp; + WINDOW *win; + size_t y, x; + int iv; + + clp = CLP(sp); + win = CLSP(sp) ? CLSP(sp) : stdscr; + + /* + * If ex isn't in control, it's the last line of the screen and + * it's a split screen, use inverse video. + */ + iv = 0; + getyx(win, y, x); + if (!F_ISSET(sp, SC_SCR_EXWROTE) && + y == RLNO(sp, LASTLINE(sp)) && IS_SPLIT(sp)) { + iv = 1; + (void)wstandout(win); + } + +#ifdef USE_WIDECHAR + if (wide) { + if (waddnwstr(win, str, len) == ERR) + return (1); + } else +#endif + if (waddnstr(win, str, len) == ERR) + return (1); + + if (iv) + (void)wstandend(win); + return (0); +} + +/* + * cl_waddstr -- + * Add len bytes from the string at the cursor, advancing the cursor. + * + * 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); +} + +/* + * cl_addstr -- + * Add len bytes from the string at the cursor, advancing the cursor. + * + * 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); +} + +/* + * cl_attr -- + * Toggle a screen attribute on/off. + * + * PUBLIC: int cl_attr(SCR *, scr_attr_t, int); + */ +int +cl_attr(SCR *sp, scr_attr_t attribute, int on) +{ + CL_PRIVATE *clp; + WINDOW *win; + + clp = CLP(sp); + win = CLSP(sp) ? CLSP(sp) : stdscr; + + switch (attribute) { + case SA_ALTERNATE: + /* + * !!! + * There's a major layering violation here. The problem is that the + * X11 xterm screen has what's known as an "alternate" screen. Some + * xterm termcap/terminfo entries include sequences to switch to/from + * that alternate screen as part of the ti/te (smcup/rmcup) strings. + * Vi runs in the alternate screen, so that you are returned to the + * same screen contents on exit from vi that you had when you entered + * vi. Further, when you run :shell, or :!date or similar ex commands, + * you also see the original screen contents. This wasn't deliberate + * on vi's part, it's just that it historically sent terminal init/end + * sequences at those times, and the addition of the alternate screen + * sequences to the strings changed the behavior of vi. The problem + * caused by this is that we don't want to switch back to the alternate + * screen while getting a new command from the user, when the user is + * continuing to enter ex commands, e.g.: + * + * :!date <<< switch to original screen + * [Hit return to continue] <<< prompt user to continue + * :command <<< get command from user + * + * Note that the :command input is a true vi input mode, e.g., input + * maps and abbreviations are being done. So, we need to be able to + * switch back into the vi screen mode, without flashing the screen. + * + * To make matters worse, the curses initscr() and endwin() calls will + * do this automatically -- so, this attribute isn't as controlled by + * the higher level screen as closely as one might like. + */ + if (on) { + if (clp->ti_te != TI_SENT) { + clp->ti_te = TI_SENT; + if (clp->smcup == NULL) + (void)cl_getcap(sp, "smcup", &clp->smcup); + if (clp->smcup != NULL) + (void)tputs(clp->smcup, 1, cl_putchar); + } + } else + if (clp->ti_te != TE_SENT) { + clp->ti_te = TE_SENT; + if (clp->rmcup == NULL) + (void)cl_getcap(sp, "rmcup", &clp->rmcup); + if (clp->rmcup != NULL) + (void)tputs(clp->rmcup, 1, cl_putchar); + (void)fflush(stdout); + } + (void)fflush(stdout); + break; + case SA_INVERSE: + if (F_ISSET(sp, SC_EX | SC_SCR_EXWROTE)) { + if (clp->smso == NULL) + return (1); + if (on) + (void)tputs(clp->smso, 1, cl_putchar); + else + (void)tputs(clp->rmso, 1, cl_putchar); + (void)fflush(stdout); + } else { + if (on) + (void)wstandout(win); + else + (void)wstandend(win); + } + break; + default: + abort(); + } + return (0); +} + +/* + * cl_baud -- + * Return the baud rate. + * + * PUBLIC: int cl_baud(SCR *, u_long *); + */ +int +cl_baud(SCR *sp, u_long *ratep) +{ + CL_PRIVATE *clp; + + /* + * XXX + * There's no portable way to get a "baud rate" -- cfgetospeed(3) + * returns the value associated with some #define, which we may + * never have heard of, or which may be a purely local speed. Vi + * only cares if it's SLOW (w300), slow (w1200) or fast (w9600). + * Try and detect the slow ones, and default to fast. + */ + clp = CLP(sp); + switch (cfgetospeed(&clp->orig)) { + case B50: + case B75: + case B110: + case B134: + case B150: + case B200: + case B300: + case B600: + *ratep = 600; + break; + case B1200: + *ratep = 1200; + break; + default: + *ratep = 9600; + break; + } + return (0); +} + +/* + * cl_bell -- + * Ring the bell/flash the screen. + * + * PUBLIC: int cl_bell(SCR *); + */ +int +cl_bell(SCR *sp) +{ + if (F_ISSET(sp, SC_EX | SC_SCR_EXWROTE | SC_SCR_EX)) + (void)write(STDOUT_FILENO, "\07", 1); /* \a */ + else { + /* + * Vi has an edit option which determines if the terminal + * should be beeped or the screen flashed. + */ + if (O_ISSET(sp, O_FLASH)) + (void)flash(); + else + (void)beep(); + } + return (0); +} + +/* + * cl_clrtoeol -- + * Clear from the current cursor to the end of the line. + * + * PUBLIC: int cl_clrtoeol(SCR *); + */ +int +cl_clrtoeol(SCR *sp) +{ + WINDOW *win; +#if 0 + size_t spcnt, y, x; +#endif + + win = CLSP(sp) ? CLSP(sp) : stdscr; + +#if 0 + if (IS_VSPLIT(sp)) { + /* The cursor must be returned to its original position. */ + getyx(win, y, x); + for (spcnt = (sp->coff + sp->cols) - x; spcnt > 0; --spcnt) + (void)waddch(win, ' '); + (void)wmove(win, y, x); + return (0); + } else +#endif + return (wclrtoeol(win) == ERR); +} + +/* + * cl_cursor -- + * Return the current cursor position. + * + * PUBLIC: int cl_cursor(SCR *, size_t *, size_t *); + */ +int +cl_cursor(SCR *sp, size_t *yp, size_t *xp) +{ + WINDOW *win; + win = CLSP(sp) ? CLSP(sp) : stdscr; + /* + * The curses screen support splits a single underlying curses screen + * into multiple screens to support split screen semantics. For this + * reason the returned value must be adjusted to be relative to the + * current screen, and not absolute. Screens that implement the split + * using physically distinct screens won't need this hack. + */ + getyx(win, *yp, *xp); + /* + *yp -= sp->roff; + *xp -= sp->coff; + */ + return (0); +} + +/* + * cl_deleteln -- + * Delete the current line, scrolling all lines below it. + * + * PUBLIC: int cl_deleteln(SCR *); + */ +int +cl_deleteln(SCR *sp) +{ + CL_PRIVATE *clp; + WINDOW *win; + size_t y, x; + + clp = CLP(sp); + win = CLSP(sp) ? CLSP(sp) : stdscr; + + /* + * This clause is required because the curses screen uses reverse + * video to delimit split screens. If the screen does not do this, + * this code won't be necessary. + * + * If the bottom line was in reverse video, rewrite it in normal + * video before it's scrolled. + */ + if (!F_ISSET(sp, SC_SCR_EXWROTE) && IS_SPLIT(sp)) { + getyx(win, y, x); + mvwchgat(win, RLNO(sp, LASTLINE(sp)), 0, -1, A_NORMAL, 0, NULL); + (void)wmove(win, y, x); + } + + /* + * The bottom line is expected to be blank after this operation, + * and other screens must support that semantic. + */ + return (wdeleteln(win) == ERR); +} + +/* + * cl_discard -- + * Discard a screen. + * + * PUBLIC: int cl_discard(SCR *, SCR **); + */ +int +cl_discard(SCR *discardp, SCR **acquirep) +{ + CL_PRIVATE *clp; + SCR* tsp; + + if (discardp) { + clp = CLP(discardp); + F_SET(clp, CL_LAYOUT); + + if (CLSP(discardp)) { + delwin(CLSP(discardp)); + discardp->cl_private = NULL; + } + } + + /* no screens got a piece; we're done */ + if (!acquirep) + return 0; + + for (; (tsp = *acquirep) != NULL; ++acquirep) { + clp = CLP(tsp); + F_SET(clp, CL_LAYOUT); + + if (CLSP(tsp)) + delwin(CLSP(tsp)); + tsp->cl_private = subwin(stdscr, tsp->rows, tsp->cols, + tsp->roff, tsp->coff); + } + + /* discardp is going away, acquirep is taking up its space. */ + return (0); +} + +/* + * cl_ex_adjust -- + * Adjust the screen for ex. This routine is purely for standalone + * ex programs. All special purpose, all special case. + * + * PUBLIC: int cl_ex_adjust(SCR *, exadj_t); + */ +int +cl_ex_adjust(SCR *sp, exadj_t action) +{ + CL_PRIVATE *clp; + int cnt; + + clp = CLP(sp); + switch (action) { + case EX_TERM_SCROLL: + /* Move the cursor up one line if that's possible. */ + if (clp->cuu1 != NULL) + (void)tputs(clp->cuu1, 1, cl_putchar); + else if (clp->cup != NULL) + (void)tputs(tgoto(clp->cup, + 0, LINES - 2), 1, cl_putchar); + else + return (0); + /* FALLTHROUGH */ + case EX_TERM_CE: + /* Clear the line. */ + if (clp->el != NULL) { + (void)putchar('\r'); + (void)tputs(clp->el, 1, cl_putchar); + } else { + /* + * Historically, ex didn't erase the line, so, if the + * displayed line was only a single glyph, and + * was more than one glyph, the output would not fully + * overwrite the user's input. To fix this, output + * the maxiumum character number of spaces. Note, + * this won't help if the user entered extra prompt + * or characters before the command character. + * We'd have to do a lot of work to make that work, and + * it's almost certainly not worth the effort. + */ + for (cnt = 0; cnt < MAX_CHARACTER_COLUMNS; ++cnt) + (void)putchar('\b'); + for (cnt = 0; cnt < MAX_CHARACTER_COLUMNS; ++cnt) + (void)putchar(' '); + (void)putchar('\r'); + (void)fflush(stdout); + } + break; + default: + abort(); + } + return (0); +} + +/* + * cl_insertln -- + * Push down the current line, discarding the bottom line. + * + * PUBLIC: int cl_insertln(SCR *); + */ +int +cl_insertln(SCR *sp) +{ + WINDOW *win; + win = CLSP(sp) ? CLSP(sp) : stdscr; + /* + * The current line is expected to be blank after this operation, + * and the screen must support that semantic. + */ + return (winsertln(win) == ERR); +} + +/* + * cl_keyval -- + * Return the value for a special key. + * + * 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) +{ + CL_PRIVATE *clp; + + /* + * VEOF, VERASE and VKILL are required by POSIX 1003.1-1990, + * VWERASE is a 4BSD extension. + */ + clp = CLP(sp); + switch (val) { + case KEY_VEOF: + *dnep = (*chp = clp->orig.c_cc[VEOF]) == _POSIX_VDISABLE; + break; + case KEY_VERASE: + *dnep = (*chp = clp->orig.c_cc[VERASE]) == _POSIX_VDISABLE; + break; + case KEY_VKILL: + *dnep = (*chp = clp->orig.c_cc[VKILL]) == _POSIX_VDISABLE; + break; +#ifdef VWERASE + case KEY_VWERASE: + *dnep = (*chp = clp->orig.c_cc[VWERASE]) == _POSIX_VDISABLE; + break; +#endif + default: + *dnep = 1; + break; + } + return (0); +} + +/* + * cl_move -- + * Move the cursor. + * + * PUBLIC: int cl_move(SCR *, size_t, size_t); + */ +int +cl_move(SCR *sp, size_t lno, size_t cno) +{ + WINDOW *win; + win = CLSP(sp) ? CLSP(sp) : stdscr; + /* See the comment in cl_cursor. */ + if (wmove(win, RLNO(sp, lno), RCNO(sp, cno)) == ERR) { + msgq(sp, M_ERR, "Error: move: l(%zu + %zu) c(%zu + %zu)", + lno, sp->roff, cno, sp->coff); + return (1); + } + return (0); +} + +/* + * cl_refresh -- + * Refresh the screen. + * + * PUBLIC: int cl_refresh(SCR *, int); + */ +int +cl_refresh(SCR *sp, int repaint) +{ + GS *gp; + CL_PRIVATE *clp; + WINDOW *win; + SCR *psp, *tsp; + size_t y, x; + + gp = sp->gp; + clp = CLP(sp); + win = CLSP(sp) ? CLSP(sp) : stdscr; + + /* + * If we received a killer signal, we're done, there's no point + * in refreshing the screen. + */ + if (clp->killersig) + return (0); + + /* + * If repaint is set, the editor is telling us that we don't know + * what's on the screen, so we have to repaint from scratch. + * + * If repaint set or the screen layout changed, we need to redraw + * any lines separating vertically split screens. If the horizontal + * offsets are the same, then the split was vertical, and need to + * draw a dividing line. + */ + if (repaint || F_ISSET(clp, CL_LAYOUT)) { + getyx(stdscr, y, x); + for (psp = sp; psp != NULL; psp = TAILQ_NEXT(psp, q)) + for (tsp = TAILQ_NEXT(psp, q); tsp != NULL; + tsp = TAILQ_NEXT(tsp, q)) + if (psp->roff == tsp->roff) { + if (psp->coff + psp->cols + 1 == tsp->coff) + cl_rdiv(psp); + else + if (tsp->coff + tsp->cols + 1 == psp->coff) + cl_rdiv(tsp); + } + (void)wmove(stdscr, y, x); + F_CLR(clp, CL_LAYOUT); + } + + /* + * In the curses library, doing wrefresh(curscr) is okay, but the + * screen flashes when we then apply the refresh() to bring it up + * to date. So, use clearok(). + */ + if (repaint) + clearok(curscr, 1); + /* + * Only do an actual refresh, when this is the focus window, + * i.e. the one holding the cursor. This assumes that refresh + * is called for that window after refreshing the others. + * This prevents the cursor being drawn in the other windows. + */ + return (wnoutrefresh(stdscr) == ERR || + wnoutrefresh(win) == ERR || + (sp == clp->focus && doupdate() == ERR)); +} + +/* + * cl_rdiv -- + * Draw a dividing line between two vertically split screens. + */ +static void +cl_rdiv(SCR *sp) +{ +#ifdef __NetBSD__ + mvvline(sp->roff, sp->cols + sp->coff, '|', sp->rows); +#else + mvvline(sp->roff, sp->cols + sp->coff, ACS_VLINE, sp->rows); +#endif +} + +/* + * cl_rename -- + * Rename the file. + * + * PUBLIC: int cl_rename(SCR *, char *, int); + */ +int +cl_rename(SCR *sp, char *name, int on) +{ + GS *gp; + CL_PRIVATE *clp; + FILE *pfp; + char buf[256], *s, *e; + char * wid; + char cmd[64]; + + gp = sp->gp; + clp = CLP(sp); + + /* + * XXX + * We can only rename windows for xterm. + */ + if (on) { + clp->focus = sp; + if (!F_ISSET(clp, CL_RENAME_OK) || + strncmp(OG_STR(gp, GO_TERM), "xterm", 5)) + return (0); + + if (clp->oname == NULL && (wid = getenv("WINDOWID"))) { + snprintf(cmd, sizeof(cmd), "xprop -id %s WM_NAME", wid); + if ((pfp = popen(cmd, "r")) == NULL) + goto rename; + if (fgets(buf, sizeof(buf), pfp) == NULL) { + pclose(pfp); + goto rename; + } + pclose(pfp); + if ((s = strchr(buf, '"')) != NULL && + (e = strrchr(buf, '"')) != NULL) + clp->oname = strndup(s + 1, e - s - 1); + } + +rename: cl_setname(gp, name); + + F_SET(clp, CL_RENAME); + } else + if (F_ISSET(clp, CL_RENAME)) { + cl_setname(gp, clp->oname); + + F_CLR(clp, CL_RENAME); + } + return (0); +} + +/* + * cl_setname -- + * Set a X11 icon/window name. + * + * PUBLIC: void cl_setname(GS *, char *); + */ +void +cl_setname(GS *gp, char *name) +{ +/* X11 xterm escape sequence to rename the icon/window. */ +#define XTERM_RENAME "\033]0;%s\007" + + (void)printf(XTERM_RENAME, name == NULL ? OG_STR(gp, GO_TERM) : name); + (void)fflush(stdout); +#undef XTERM_RENAME +} + +/* + * cl_split -- + * Split a screen. + * + * PUBLIC: int cl_split(SCR *, SCR *); + */ +int +cl_split(SCR *origp, SCR *newp) +{ + CL_PRIVATE *clp; + + clp = CLP(origp); + F_SET(clp, CL_LAYOUT); + + if (CLSP(origp)) + delwin(CLSP(origp)); + + origp->cl_private = subwin(stdscr, origp->rows, origp->cols, + origp->roff, origp->coff); + newp->cl_private = subwin(stdscr, newp->rows, newp->cols, + newp->roff, newp->coff); + + /* origp is the original screen, giving up space to newp. */ + return (0); +} + +/* + * cl_suspend -- + * Suspend a screen. + * + * PUBLIC: int cl_suspend(SCR *, int *); + */ +int +cl_suspend(SCR *sp, int *allowedp) +{ + struct termios t; + CL_PRIVATE *clp; + WINDOW *win; + GS *gp; + size_t y, x; + int changed; + + gp = sp->gp; + clp = CLP(sp); + win = CLSP(sp) ? CLSP(sp) : stdscr; + *allowedp = 1; + + /* + * The ex implementation of this function isn't needed by screens not + * supporting ex commands that require full terminal canonical mode + * (e.g. :suspend). + * + * The vi implementation of this function isn't needed by screens not + * supporting vi process suspension, i.e. any screen that isn't backed + * by a UNIX shell. + * + * Setting allowedp to 0 will cause the editor to reject the command. + */ + if (F_ISSET(sp, SC_EX)) { + /* Save the terminal settings, and restore the original ones. */ + if (F_ISSET(clp, CL_STDIN_TTY)) { + (void)tcgetattr(STDIN_FILENO, &t); + (void)tcsetattr(STDIN_FILENO, + TCSASOFT | TCSADRAIN, &clp->orig); + } + + /* Stop the process group. */ + (void)kill(0, SIGTSTP); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 10 13:43:00 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 13:49:44 2015 Return-Path: Delivered-To: svn-src-all@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 2B92D614; Fri, 10 Apr 2015 13:49:44 +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 62566A7D; Fri, 10 Apr 2015 13:49:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id t3ADgA2j000415; Fri, 10 Apr 2015 16:43:10 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Fri, 10 Apr 2015 16:42:10 +0300 (MSK) From: Dmitry Morozovsky To: Baptiste Daroussin Subject: Re: svn commit: r281368 - in vendor/nvi/dist: . catalog cl common docs docs/USD.doc docs/internals docs/interp docs/man docs/tutorial ex regex vi In-Reply-To: <201504101326.t3ADQ6X2098127@svn.freebsd.org> Message-ID: References: <201504101326.t3ADQ6X2098127@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 16:43:17 +0300 (MSK) Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-vendor@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 13:49:44 -0000 On Fri, 10 Apr 2015, Baptiste Daroussin wrote: > Author: bapt > Date: Fri Apr 10 13:26:05 2015 > New Revision: 281368 > URL: https://svnweb.freebsd.org/changeset/base/281368 > > Log: > Import nvi 2.1.3 Wow! Was this import provoked by glebius/lsw hot discussion? ;-P -- 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-all@FreeBSD.ORG Fri Apr 10 13:50:58 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 14:02:06 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 16:06:16 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 17:09:11 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 17:21:49 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 17:25:28 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 17:27:02 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 17:31:51 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 17:32:50 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 17:50:33 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 17:54:55 2015 Return-Path: Delivered-To: svn-src-all@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 53973380; Fri, 10 Apr 2015 17:54: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 3DDC7C6E; Fri, 10 Apr 2015 17:54: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 t3AHstod027950; Fri, 10 Apr 2015 17:54:55 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AHssYx027944; Fri, 10 Apr 2015 17:54:54 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504101754.t3AHssYx027944@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 10 Apr 2015 17:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r281374 - in vendor-sys/acpica/dist: . source/components/disassembler source/include X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 17:54:55 -0000 Author: jkim Date: Fri Apr 10 17:54:53 2015 New Revision: 281374 URL: https://svnweb.freebsd.org/changeset/base/281374 Log: Import ACPICA 20150410. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c vendor-sys/acpica/dist/source/include/acpixf.h Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Apr 10 17:50:28 2015 (r281373) +++ vendor-sys/acpica/dist/changes.txt Fri Apr 10 17:54:53 2015 (r281374) @@ -1,4 +1,11 @@ ---------------------------------------- +10 April 2015. Summary of changes for version 20150410: + +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: Modified: vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c ============================================================================== --- vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c Fri Apr 10 17:50:28 2015 (r281373) +++ vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c Fri Apr 10 17:54:53 2015 (r281374) @@ -114,20 +114,12 @@ AcpiDmCheckForSymbolicOpcode ( Child1 = AcpiPsGetArg (Op, 0); if (!Child1) { - /* Parse tree may be confused or corrupted */ - return (FALSE); } /* Get the second operand */ Child2 = Child1->Common.Next; - if (!Child2) - { - /* Parse tree may be confused or corrupted */ - - return (FALSE); - } /* Setup the operator string for this opcode */ @@ -307,16 +299,8 @@ AcpiDmCheckForSymbolicOpcode ( /* Target is 3rd operand */ Target = Child2->Common.Next; - if (Op->Common.AmlOpcode == AML_DIVIDE_OP) { - if (!Target) - { - /* Parse tree may be confused or corrupted */ - - return (FALSE); - } - /* * Divide has an extra target operand (Remainder). * If this extra target is specified, it cannot be converted @@ -419,13 +403,6 @@ AcpiDmCheckForSymbolicOpcode ( /* Target is optional, 3rd operand */ Target = Child2->Common.Next; - if (!Target) - { - /* Parse tree may be confused or corrupted */ - - return (FALSE); - } - if (AcpiDmIsValidTarget (Target)) { AcpiDmPromoteTarget (Op, Target); @@ -446,13 +423,6 @@ AcpiDmCheckForSymbolicOpcode ( * source so that the target is processed first. */ Target = Child1->Common.Next; - if (!Target) - { - /* Parse tree may be confused or corrupted */ - - return (FALSE); - } - AcpiDmPromoteTarget (Op, Target); if (!Target->Common.OperatorSymbol) Modified: vendor-sys/acpica/dist/source/include/acpixf.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acpixf.h Fri Apr 10 17:50:28 2015 (r281373) +++ vendor-sys/acpica/dist/source/include/acpixf.h Fri Apr 10 17:54:53 2015 (r281374) @@ -46,7 +46,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20150408 +#define ACPI_CA_VERSION 0x20150410 #include "acconfig.h" #include "actypes.h" From owner-svn-src-all@FreeBSD.ORG Fri Apr 10 17:55:46 2015 Return-Path: Delivered-To: svn-src-all@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 ADB744AB; Fri, 10 Apr 2015 17:55: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 7F007C74; Fri, 10 Apr 2015 17:55: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 t3AHtk4O028155; Fri, 10 Apr 2015 17:55:46 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AHtkrC028154; Fri, 10 Apr 2015 17:55:46 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504101755.t3AHtkrC028154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 10 Apr 2015 17:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r281375 - vendor-sys/acpica/20150410 X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 17:55:46 -0000 Author: jkim Date: Fri Apr 10 17:55:45 2015 New Revision: 281375 URL: https://svnweb.freebsd.org/changeset/base/281375 Log: Tag ACPICA 20150410. Added: vendor-sys/acpica/20150410/ - copied from r281374, vendor-sys/acpica/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Apr 10 18:08:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 18:21:24 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 18:23:01 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 18:45:27 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 18:49:45 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 19:04:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 19:06:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 19:07:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 19:09:52 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 19:26:46 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 19:30:26 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 19:35:43 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 20:18:56 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 20:38:32 2015 Return-Path: Delivered-To: svn-src-all@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 AC9C2155; Fri, 10 Apr 2015 20:38: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 97B41157; Fri, 10 Apr 2015 20:38: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 t3AKcWdZ019114; Fri, 10 Apr 2015 20:38:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AKcWQ5019113; Fri, 10 Apr 2015 20:38:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504102038.t3AKcWQ5019113@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 10 Apr 2015 20:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281382 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 20:38:32 -0000 Author: dim Date: Fri Apr 10 20:38:31 2015 New Revision: 281382 URL: https://svnweb.freebsd.org/changeset/base/281382 Log: MFC r272814 (by bapt): Add OBJCOPY to the list of external tools MFC r272815 (by bapt): Fix typo This should fix the build troubles some people have been seeing after the MFC of r280980 (in r281289). Sorry for the breakage. Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Fri Apr 10 19:26:45 2015 (r281381) +++ stable/10/Makefile.inc1 Fri Apr 10 20:38:31 2015 (r281382) @@ -311,7 +311,7 @@ X${COMPILER}?= ${CROSS_COMPILER_PREFIX}$ X${COMPILER}?= ${${COMPILER}} .endif .endfor -XBINUTILS= AS AR LD NM OBJDUMP RANLIB STRINGS +XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB STRINGS .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}} @@ -322,7 +322,8 @@ X${BINUTIL}?= ${${BINUTIL}} WMAKEENV+= CC="${XCC} ${XFLAGS}" CXX="${XCXX} ${XFLAGS}" \ CPP="${XCPP} ${XFLAGS}" \ AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \ - OBJDUMP=${XOBJDUMP} RANLIB=${XRANLIB} STRINGS=${XSTRINGS} + OBJDUMP=${XOBJDUMP} OBJCOPY="${XOBJCOPY}" \ + RANLIB=${XRANLIB} STRINGS=${XSTRINGS} .if ${XCC:T:Mgcc} == "gcc" WMAKE_COMPILER_TYPE= gcc From owner-svn-src-all@FreeBSD.ORG Fri Apr 10 20:40:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 20:55:18 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 21:20:30 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 21:24:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Fri Apr 10 22:53:08 2015 Return-Path: Delivered-To: svn-src-all@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 DC30EFD; Fri, 10 Apr 2015 22:53: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 ACC522D2; Fri, 10 Apr 2015 22:53: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 t3AMr8nJ097220; Fri, 10 Apr 2015 22:53:08 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3AMr8Kc097219; Fri, 10 Apr 2015 22:53:08 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201504102253.t3AMr8Kc097219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 10 Apr 2015 22:53:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281385 - stable/9/sys/fs/nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 22:53:09 -0000 Author: rmacklem Date: Fri Apr 10 22:53:07 2015 New Revision: 281385 URL: https://svnweb.freebsd.org/changeset/base/281385 Log: MFC: r276347 r245508 modified the NFS client's Setattr RPC to use VA_UTIMES_NULL to indicate whether it should set the time to the current tod on the server. This had the side effect of making the NFS client use the client's timestamp for exclusive create, starting with FreeBSD9.2. Unfortunately a bug in some Solaris NFS servers causes these servers to return NFS_OK to the Setattr RPC done during exclusive create, but not actually set the file's mode, leaving the file's mode == 0. This patch restores the NFS client's behaviour to use the server's tod for the exclusive open's Setattr RPC, to avoid the Solaris server bug and to restore the pre-FreeBSD9.2 NFS behaviour. Modified: stable/9/sys/fs/nfsclient/nfs_clport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clport.c Fri Apr 10 21:24:38 2015 (r281384) +++ stable/9/sys/fs/nfsclient/nfs_clport.c Fri Apr 10 22:53:07 2015 (r281385) @@ -1103,9 +1103,16 @@ nfscl_checksattr(struct vattr *vap, stru * us to do a SETATTR RPC. FreeBSD servers store the verifier * in atime, but we can't really assume that all servers will * so we ensure that our SETATTR sets both atime and mtime. + * Set the VA_UTIMES_NULL flag for this case, so that + * the server's time will be used. This is needed to + * work around a bug in some Solaris servers, where + * setting the time TOCLIENT causes the Setattr RPC + * to return NFS_OK, but not set va_mode. */ - if (vap->va_mtime.tv_sec == VNOVAL) + if (vap->va_mtime.tv_sec == VNOVAL) { vfs_timestamp(&vap->va_mtime); + vap->va_vaflags |= VA_UTIMES_NULL; + } if (vap->va_atime.tv_sec == VNOVAL) vap->va_atime = vap->va_mtime; return (1); From owner-svn-src-all@FreeBSD.ORG Fri Apr 10 23:43:03 2015 Return-Path: Delivered-To: svn-src-all@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 182D58DA; Fri, 10 Apr 2015 23:43: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 DCAC5989; Fri, 10 Apr 2015 23:43: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 t3ANh2XO024720; Fri, 10 Apr 2015 23:43:02 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ANh2CO024719; Fri, 10 Apr 2015 23:43:02 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201504102343.t3ANh2CO024719@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 10 Apr 2015 23:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281386 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 23:43:03 -0000 Author: rmacklem Date: Fri Apr 10 23:43:01 2015 New Revision: 281386 URL: https://svnweb.freebsd.org/changeset/base/281386 Log: MFC: r276347 r245508 modified the NFS client's Setattr RPC to use VA_UTIMES_NULL to indicate whether it should set the time to the current tod on the server. This had the side effect of making the NFS client use the client's timestamp for exclusive create, starting with FreeBSD9.2. Unfortunately a bug in some Solaris NFS servers causes these servers to return NFS_OK to the Setattr RPC done during exclusive create, but not actually set the file's mode, leaving the file's mode == 0. This patch restores the NFS client's behaviour to use the server's tod for the exclusive open's Setattr RPC, to avoid the Solaris server bug and to restore the pre-FreeBSD9.2 NFS behaviour. Modified: stable/10/sys/fs/nfsclient/nfs_clport.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clport.c Fri Apr 10 22:53:07 2015 (r281385) +++ stable/10/sys/fs/nfsclient/nfs_clport.c Fri Apr 10 23:43:01 2015 (r281386) @@ -1097,9 +1097,16 @@ nfscl_checksattr(struct vattr *vap, stru * us to do a SETATTR RPC. FreeBSD servers store the verifier * in atime, but we can't really assume that all servers will * so we ensure that our SETATTR sets both atime and mtime. + * Set the VA_UTIMES_NULL flag for this case, so that + * the server's time will be used. This is needed to + * work around a bug in some Solaris servers, where + * setting the time TOCLIENT causes the Setattr RPC + * to return NFS_OK, but not set va_mode. */ - if (vap->va_mtime.tv_sec == VNOVAL) + if (vap->va_mtime.tv_sec == VNOVAL) { vfs_timestamp(&vap->va_mtime); + vap->va_vaflags |= VA_UTIMES_NULL; + } if (vap->va_atime.tv_sec == VNOVAL) vap->va_atime = vap->va_mtime; return (1); From owner-svn-src-all@FreeBSD.ORG Sat Apr 11 00:45:05 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 01:07:00 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 01:17:22 2015 Return-Path: Delivered-To: svn-src-all@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 3EFB45A2; Sat, 11 Apr 2015 01:17: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 0FAB81A4; Sat, 11 Apr 2015 01:17: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 t3B1HLZr068512; Sat, 11 Apr 2015 01:17:21 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B1HLAq068511; Sat, 11 Apr 2015 01:17:21 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504110117.t3B1HLAq068511@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 01:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281389 - in stable: 10/usr.sbin/acpi/acpiconf 8/usr.sbin/acpi/acpiconf 9/usr.sbin/acpi/acpiconf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 01:17:22 -0000 Author: jkim Date: Sat Apr 11 01:17:19 2015 New Revision: 281389 URL: https://svnweb.freebsd.org/changeset/base/281389 Log: MFC: r281171 Tidy up battery status information. Remove a trailing white space. PR: 193671 Modified: stable/9/usr.sbin/acpi/acpiconf/acpiconf.c Directory Properties: stable/9/usr.sbin/acpi/acpiconf/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/acpi/acpiconf/acpiconf.c stable/8/usr.sbin/acpi/acpiconf/acpiconf.c Directory Properties: stable/10/ (props changed) stable/8/usr.sbin/acpi/acpiconf/ (props changed) Modified: stable/9/usr.sbin/acpi/acpiconf/acpiconf.c ============================================================================== --- stable/9/usr.sbin/acpi/acpiconf/acpiconf.c Sat Apr 11 01:06:59 2015 (r281388) +++ stable/9/usr.sbin/acpi/acpiconf/acpiconf.c Sat Apr 11 01:17:19 2015 (r281389) @@ -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-all@FreeBSD.ORG Sat Apr 11 01:17:20 2015 Return-Path: Delivered-To: svn-src-all@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 B85695A0; Sat, 11 Apr 2015 01:17: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 897901A2; Sat, 11 Apr 2015 01:17: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 t3B1HKfl068500; Sat, 11 Apr 2015 01:17:20 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B1HKEe068499; Sat, 11 Apr 2015 01:17:20 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504110117.t3B1HKEe068499@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 01:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281389 - in stable: 10/usr.sbin/acpi/acpiconf 8/usr.sbin/acpi/acpiconf 9/usr.sbin/acpi/acpiconf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 01:17:20 -0000 Author: jkim Date: Sat Apr 11 01:17:19 2015 New Revision: 281389 URL: https://svnweb.freebsd.org/changeset/base/281389 Log: MFC: r281171 Tidy up battery status information. Remove a trailing white space. PR: 193671 Modified: stable/10/usr.sbin/acpi/acpiconf/acpiconf.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/usr.sbin/acpi/acpiconf/acpiconf.c stable/9/usr.sbin/acpi/acpiconf/acpiconf.c Directory Properties: stable/8/usr.sbin/acpi/acpiconf/ (props changed) stable/9/usr.sbin/acpi/acpiconf/ (props changed) Modified: stable/10/usr.sbin/acpi/acpiconf/acpiconf.c ============================================================================== --- stable/10/usr.sbin/acpi/acpiconf/acpiconf.c Sat Apr 11 01:06:59 2015 (r281388) +++ stable/10/usr.sbin/acpi/acpiconf/acpiconf.c Sat Apr 11 01:17:19 2015 (r281389) @@ -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-all@FreeBSD.ORG Sat Apr 11 01:17:21 2015 Return-Path: Delivered-To: svn-src-all@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 7D55F5A1; Sat, 11 Apr 2015 01:17: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 4E19B1A3; Sat, 11 Apr 2015 01:17: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 t3B1HLAa068506; Sat, 11 Apr 2015 01:17:21 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B1HL0q068505; Sat, 11 Apr 2015 01:17:21 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504110117.t3B1HL0q068505@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 01:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r281389 - in stable: 10/usr.sbin/acpi/acpiconf 8/usr.sbin/acpi/acpiconf 9/usr.sbin/acpi/acpiconf X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 01:17:21 -0000 Author: jkim Date: Sat Apr 11 01:17:19 2015 New Revision: 281389 URL: https://svnweb.freebsd.org/changeset/base/281389 Log: MFC: r281171 Tidy up battery status information. Remove a trailing white space. PR: 193671 Modified: stable/8/usr.sbin/acpi/acpiconf/acpiconf.c Directory Properties: stable/8/usr.sbin/acpi/acpiconf/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/acpi/acpiconf/acpiconf.c stable/9/usr.sbin/acpi/acpiconf/acpiconf.c Directory Properties: stable/10/ (props changed) stable/9/usr.sbin/acpi/acpiconf/ (props changed) Modified: stable/8/usr.sbin/acpi/acpiconf/acpiconf.c ============================================================================== --- stable/8/usr.sbin/acpi/acpiconf/acpiconf.c Sat Apr 11 01:06:59 2015 (r281388) +++ stable/8/usr.sbin/acpi/acpiconf/acpiconf.c Sat Apr 11 01:17:19 2015 (r281389) @@ -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-all@FreeBSD.ORG Sat Apr 11 02:24:00 2015 Return-Path: Delivered-To: svn-src-all@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 961D6FF8; Sat, 11 Apr 2015 02:24: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 80A4D9EA; Sat, 11 Apr 2015 02:24: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 t3B2O0lr000951; Sat, 11 Apr 2015 02:24:00 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3B2O0tK000950; Sat, 11 Apr 2015 02:24:00 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201504110224.t3B2O0tK000950@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 02:24:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r281390 - stable/10/sys/dev/usb/wlan X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2015 02:24:00 -0000 Author: rpaulo Date: Sat Apr 11 02:23:59 2015 New Revision: 281390 URL: https://svnweb.freebsd.org/changeset/base/281390 Log: MFC r281070: urtwn: blink the LED when scanning. Modified: stable/10/sys/dev/usb/wlan/if_urtwn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_urtwn.c Sat Apr 11 01:17:19 2015 (r281389) +++ stable/10/sys/dev/usb/wlan/if_urtwn.c Sat Apr 11 02:23:59 2015 (r281390) @@ -1561,14 +1561,9 @@ urtwn_newstate(struct ieee80211vap *vap, urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(1), reg); } } - /* Make link LED blink during scan. */ - urtwn_set_led(sc, URTWN_LED_LINK, !sc->ledlink); - /* Pause AC Tx queues. */ urtwn_write_1(sc, R92C_TXPAUSE, urtwn_read_1(sc, R92C_TXPAUSE) | 0x0f); - - urtwn_set_chan(sc, ic->ic_curchan, NULL); break; case IEEE80211_S_AUTH: /* Set initial gain under link. */ @@ -3124,8 +3119,13 @@ static void urtwn_set_channel(struct ieee80211com *ic) { struct urtwn_softc *sc = ic->ic_ifp->if_softc; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); URTWN_LOCK(sc); + if (vap->iv_state == IEEE80211_S_SCAN) { + /* Make link LED blink during scan. */ + urtwn_set_led(sc, URTWN_LED_LINK, !sc->ledlink); + } urtwn_set_chan(sc, ic->ic_curchan, NULL); URTWN_UNLOCK(sc); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 11 02:50:46 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 02:59:47 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 03:13:10 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 03:18:16 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 03:19:50 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 03:23:47 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 03:24:51 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 03:35:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 03:38:51 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 03:43:45 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 03:54:45 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 03:56:25 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 03:57:37 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 05:20:02 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 05:38:08 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 06:20:47 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 06:38:51 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 06:40:39 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 07:33:06 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 07:35:31 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 07:37:22 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 07:41:58 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 08:17:41 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 08:25:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 08:27:40 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 08:30:39 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 08:34:44 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 10:07:59 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 10:21:29 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 10:36:50 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 11:00:54 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 15:40:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 16:00:34 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 17:16:33 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 17:52:50 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 18:44:09 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 18:45:23 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 18:51:42 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 20:01:15 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 20:44:22 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 21:16:20 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@FreeBSD.ORG Sat Apr 11 22:57:14 2015 Return-Path: Delivered-To: svn-src-all@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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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. */