CVS commit: othersrc/external/bsd/dust/dist
Module Name:othersrc Committed By: wiz Date: Wed Apr 2 08:50:43 UTC 2014 Modified Files: othersrc/external/bsd/dust/dist: dust.1 Log Message: Fix typo, whitespace, use .Ex, use EXIT STATUS instead of RETURN VALUES, use em-dash. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/dust/dist/dust.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/dust/dist/dust.1 diff -u othersrc/external/bsd/dust/dist/dust.1:1.1.1.1 othersrc/external/bsd/dust/dist/dust.1:1.2 --- othersrc/external/bsd/dust/dist/dust.1:1.1.1.1 Wed Apr 2 04:38:22 2014 +++ othersrc/external/bsd/dust/dist/dust.1 Wed Apr 2 08:50:43 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: dust.1,v 1.1.1.1 2014/04/02 04:38:22 agc Exp $ +.\ $NetBSD: dust.1,v 1.2 2014/04/02 08:50:43 wiz Exp $ .\ .\ Copyright (c) 2014 Alistair Crooks a...@netbsd.org .\ All rights reserved. @@ -32,7 +32,7 @@ .Sh SYNOPSIS .Nm .Op Fl rs -.Ar file... +.Ar file ... .Sh DESCRIPTION The .Nm @@ -41,21 +41,18 @@ command uses to retrieve the sizes on disk of the specified files and directories, and orders them in size order. -.Bl -tag -width keyring1234567 +.Bl -tag -width XrX .It Fl r -Reverse the order of the output \- instead of printing +Reverse the order of the output \(em instead of printing the directory entries in smallest to largest order, this argument will print the entries in largest to smallest order. .It Fl s As in .Xr du 1 , -perform the listing silently, recurisng into directories, +perform the listing silently, recursing into directories, but only printing the results at the topmost level of specification. -.Sh RETURN VALUES -The -.Nm -utilities will return 0 for success, -and non-zero for failure. +.Sh EXIT STATUS +.Ex -std dust .Sh EXAMPLES .Bd -literal % dust .
CVS commit: othersrc/external/bsd/starsign/dist
Module Name:othersrc Committed By: wiz Date: Wed Apr 2 08:55:38 UTC 2014 Modified Files: othersrc/external/bsd/starsign/dist: starsign.1 Log Message: Fix xref, consistent casing, use EXIT STATUS instead of RETURN VALUES, fix typo. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 othersrc/external/bsd/starsign/dist/starsign.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/external/bsd/starsign/dist/starsign.1 diff -u othersrc/external/bsd/starsign/dist/starsign.1:1.1.1.1 othersrc/external/bsd/starsign/dist/starsign.1:1.2 --- othersrc/external/bsd/starsign/dist/starsign.1:1.1.1.1 Wed Apr 2 04:03:33 2014 +++ othersrc/external/bsd/starsign/dist/starsign.1 Wed Apr 2 08:55:38 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: starsign.1,v 1.1.1.1 2014/04/02 04:03:33 agc Exp $ +.\ $NetBSD: starsign.1,v 1.2 2014/04/02 08:55:38 wiz Exp $ .\ .\ Copyright (c) 2014 Alistair Crooks a...@netbsd.org .\ All rights reserved. @@ -61,7 +61,7 @@ The .Nm command signs data, typically a -.Xr tar 4 +.Xr tar 1 archive, although it can be any data whatsoever, which can be verified using the .Nm starverify @@ -115,7 +115,7 @@ The public key is not normally included .Dq star data to allow for out of band communication of public keys, which is safer in general. -For example, it would be sub\-optimal to sign the ephemeral key on a piece +For example, it would be sub\-optimal to sign the ephemeral key on a piece of data if the public key was not available on the remote host. .Pp For verification, the @@ -137,7 +137,7 @@ The type of the key is encoded in the si archive, and is used during verification. .Pp The following options are available in -.Nm +.Nm : .Bl -tag -width keyring1234567 .It Fl d Ar duration This is the period (in seconds) for which the signature is valid. @@ -152,15 +152,15 @@ and in days. The default duration, if none is otherwise specified, is 5 years. .It Fl f Ar seconds -The time (in seconds since the spart of the epoch) +The time (in seconds since the start of the epoch) from which the signature is valid. .It Fl h -print a help message and exit. +Print a help message and exit. .It Fl k Ar keyring When signing, use the argument as the source of truth for the signing key (to sign the public part of the ephemeral key) to establish trust. .It Fl o Ar outname -Use the argument as the output file name +Use the argument as the output file name. .It Fl t Ar keytype Sign the data using the requested key type. At the present time, two key types are available: @@ -178,29 +178,29 @@ be verbose in operation. .El .Pp The following options are available in -.Nm starverify +.Nm starverify : .Bl -tag -width keyring1234567 .It Fl h -print a help message and exit. +Print a help message and exit. .It Fl k Ar keyring Use the argument as the keyring for the public key which will be used to verify the signature on the ephemeral key. .It Fl v -be verbose in operation. +Be verbose in operation. .El .Pp The following options are available in -.Nm starcat +.Nm starcat : .Bl -tag -width keyring1234567 .It Fl h -print a help message and exit. +Print a help message and exit. .It Fl k Ar keyring When signing, use the argument as the source of truth for the signing key (to sign the public part of the ephemeral key) to establish trust. .It Fl o Ar outname Use the argument as the output file name .It Fl s -sign the data, rather than verifying it (the default) +Sign the data, rather than verifying it (the default). .It Fl t Ar keytype Sign the data using the requested key type. At the present time, two key types are available: @@ -214,19 +214,19 @@ keys. Use the argument as the PGP/GPG identity of the key which signs the public part of the ephemeral key. .It Fl v -be verbose in operation. +Be verbose in operation. .El .Pp The following options are available in -.Nm starinfo +.Nm starinfo : .Bl -tag -width keyring1234567 .It Fl h -print a help message and exit. +Print a help message and exit. .It Fl k Ar keyring Use the argument as the keyring for the public key which will be used to verify the signature on the ephemeral key. .It Fl v -be verbose in operation. +Be verbose in operation. .El .Pp In normal operation, a @@ -250,11 +250,10 @@ a verification of the two signatures use integrity and provide trust for the data, and the information for the host on which the signing was performed. -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm -utilities will return 0 for success, -and non-zero for failure. +utilities exit 0 on success, and 0 if an error occurs. .Sh EXAMPLES .Bd -literal % starcat -s -t pgp Makefile | starcat m2
CVS commit: src/bin/ls
Module Name:src Committed By: wiz Date: Wed Apr 2 10:55:47 UTC 2014 Modified Files: src/bin/ls: ls.1 ls.c Log Message: Apply diff from Igor Sobrado i...@orion.ciencias.uniovi.es: We have written a diff to our ls(1) to recover the traditional behaviour of -f implying -a. This change does not only accommodates POSIX.1 but also matches traditional UNIX. OpenBSD commit message: CVSROOT:/cvs Module name:src Changes by: sobr...@cvs.openbsd.org 2014/03/31 14:54:37 Modified files: bin/ls : ls.1 ls.c Log message: restore the traditional behavior of -f implying -a; apparently Keith Bostic forgot to restore it when the -f flag was put back on 2nd of September 1989, after being removed on 16th of August as a consequence of issues getting it working over NFS, so deviation from traditional UNIX behavior in all BSDs looks like an historical accident; as a side effect, this change accommodates behavior of this option to IEEE Std 1003.1-2008 (``POSIX.1''). joint work with jmc@ (who found the inaccuracy in our implementation), schwarze@ (who provided a detailed tracking of historical facts) and millert@ ok millert@, schwarze@ To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/bin/ls/ls.1 cvs rdiff -u -r1.73 -r1.74 src/bin/ls/ls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ls/ls.1 diff -u src/bin/ls/ls.1:1.75 src/bin/ls/ls.1:1.76 --- src/bin/ls/ls.1:1.75 Fri Feb 21 02:42:41 2014 +++ src/bin/ls/ls.1 Wed Apr 2 10:55:47 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: ls.1,v 1.75 2014/02/21 02:42:41 christos Exp $ +.\ $NetBSD: ls.1,v 1.76 2014/04/02 10:55:47 wiz Exp $ .\ .\ Copyright (c) 1980, 1990, 1991, 1993, 1994 .\ The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\ .\ @(#)ls.1 8.7 (Berkeley) 7/29/94 .\ -.Dd February 20, 2014 +.Dd April 2, 2014 .Dt LS 1 .Os .Sh NAME @@ -127,6 +127,8 @@ after each that is a .Tn FIFO . .It Fl f Output is not sorted. +This option turns on +.Fl a . .It Fl g The same as .Fl l , Index: src/bin/ls/ls.c diff -u src/bin/ls/ls.c:1.73 src/bin/ls/ls.c:1.74 --- src/bin/ls/ls.c:1.73 Sat Feb 22 13:08:13 2014 +++ src/bin/ls/ls.c Wed Apr 2 10:55:47 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ls.c,v 1.73 2014/02/22 13:08:13 mlelstv Exp $ */ +/* $NetBSD: ls.c,v 1.74 2014/04/02 10:55:47 wiz Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -42,7 +42,7 @@ __COPYRIGHT(@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = @(#)ls.c 8.7 (Berkeley) 8/5/94; #else -__RCSID($NetBSD: ls.c,v 1.73 2014/02/22 13:08:13 mlelstv Exp $); +__RCSID($NetBSD: ls.c,v 1.74 2014/04/02 10:55:47 wiz Exp $); #endif #endif /* not lint */ @@ -207,6 +207,9 @@ ls_main(int argc, char *argv[]) case 'R': f_recursive = 1; break; + case 'f': + f_nosort = 1; + /* FALLTHROUGH */ case 'a': fts_options |= FTS_SEEDOT; /* FALLTHROUGH */ @@ -230,9 +233,6 @@ ls_main(int argc, char *argv[]) f_listdir = 1; f_recursive = 0; break; - case 'f': - f_nosort = 1; - break; case 'i': f_inode = 1; break;
CVS commit: src/sys/arch
Module Name:src Committed By: matt Date: Wed Apr 2 11:35:36 UTC 2014 Modified Files: src/sys/arch/arm/footbridge: footbridge_irqhandler.c footbridge_irqhandler.h src/sys/arch/cats/cats: autoconf.c Log Message: Defer intr evcnt_attach to cpu_configure To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 \ src/sys/arch/arm/footbridge/footbridge_irqhandler.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/footbridge/footbridge_irqhandler.h cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cats/cats/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/footbridge/footbridge_irqhandler.c diff -u src/sys/arch/arm/footbridge/footbridge_irqhandler.c:1.24 src/sys/arch/arm/footbridge/footbridge_irqhandler.c:1.25 --- src/sys/arch/arm/footbridge/footbridge_irqhandler.c:1.24 Wed Mar 26 08:51:59 2014 +++ src/sys/arch/arm/footbridge/footbridge_irqhandler.c Wed Apr 2 11:35:36 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: footbridge_irqhandler.c,v 1.24 2014/03/26 08:51:59 christos Exp $ */ +/* $NetBSD: footbridge_irqhandler.c,v 1.25 2014/04/02 11:35:36 matt Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ #endif #include sys/cdefs.h -__KERNEL_RCSID(0,$NetBSD: footbridge_irqhandler.c,v 1.24 2014/03/26 08:51:59 christos Exp $); +__KERNEL_RCSID(0,$NetBSD: footbridge_irqhandler.c,v 1.25 2014/04/02 11:35:36 matt Exp $); #include opt_irqstats.h @@ -195,10 +195,6 @@ footbridge_intr_init(void) for (i = 0, iq = footbridge_intrq; i NIRQ; i++, iq++) { TAILQ_INIT(iq-iq_list); - - snprintf(iq-iq_name, sizeof(iq-iq_name), irq %d, i); - evcnt_attach_dynamic(iq-iq_ev, EVCNT_TYPE_INTR, - NULL, footbridge, iq-iq_name); } footbridge_intr_calculate_masks(); @@ -207,6 +203,20 @@ footbridge_intr_init(void) enable_interrupts(I32_bit); } +void +footbridge_intr_evcnt_attach(void) +{ + struct intrq *iq; + int i; + + for (i = 0, iq = footbridge_intrq; i NIRQ; i++, iq++) { + + snprintf(iq-iq_name, sizeof(iq-iq_name), irq %d, i); + evcnt_attach_dynamic(iq-iq_ev, EVCNT_TYPE_INTR, + NULL, footbridge, iq-iq_name); + } +} + void * footbridge_intr_claim(int irq, int ipl, const char *name, int (*func)(void *), void *arg) { Index: src/sys/arch/arm/footbridge/footbridge_irqhandler.h diff -u src/sys/arch/arm/footbridge/footbridge_irqhandler.h:1.5 src/sys/arch/arm/footbridge/footbridge_irqhandler.h:1.6 --- src/sys/arch/arm/footbridge/footbridge_irqhandler.h:1.5 Sun Dec 11 12:16:45 2005 +++ src/sys/arch/arm/footbridge/footbridge_irqhandler.h Wed Apr 2 11:35:36 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: footbridge_irqhandler.h,v 1.5 2005/12/11 12:16:45 christos Exp $ */ +/* $NetBSD: footbridge_irqhandler.h,v 1.6 2014/04/02 11:35:36 matt Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -51,6 +51,7 @@ void footbridge_intr_disestablish(void * #ifdef _KERNEL void *footbridge_intr_claim(int irq, int ipl, const char *name, int (*func)(void *), void *arg); void footbridge_intr_init(void); +void footbridge_intr_evcnt_attach(void); void footbridge_intr_disestablish(void *cookie); #endif /* _KERNEL */ Index: src/sys/arch/cats/cats/autoconf.c diff -u src/sys/arch/cats/cats/autoconf.c:1.18 src/sys/arch/cats/cats/autoconf.c:1.19 --- src/sys/arch/cats/cats/autoconf.c:1.18 Sat Oct 27 17:17:43 2012 +++ src/sys/arch/cats/cats/autoconf.c Wed Apr 2 11:35:36 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.18 2012/10/27 17:17:43 chs Exp $ */ +/* $NetBSD: autoconf.c,v 1.19 2014/04/02 11:35:36 matt Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -41,7 +41,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.18 2012/10/27 17:17:43 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.19 2014/04/02 11:35:36 matt Exp $); #include opt_md.h @@ -136,6 +136,7 @@ extern int footbridge_imask[NIPL]; void cpu_configure(void) { + footbridge_intr_evcnt_attach(); /* * Since various PCI interrupts could be routed via the ICU * (for PCI devices in the bridge) we need to set up the ICU
CVS commit: src/sys/arch/cats/cats
Module Name:src Committed By: matt Date: Wed Apr 2 11:36:50 UTC 2014 Modified Files: src/sys/arch/cats/cats: cats_machdep.c Log Message: Don't map ebsabootinfo.bt_vargp if it is the same address as the vector page To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/arch/cats/cats/cats_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cats/cats/cats_machdep.c diff -u src/sys/arch/cats/cats/cats_machdep.c:1.77 src/sys/arch/cats/cats/cats_machdep.c:1.78 --- src/sys/arch/cats/cats/cats_machdep.c:1.77 Sun Aug 18 06:50:31 2013 +++ src/sys/arch/cats/cats/cats_machdep.c Wed Apr 2 11:36:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cats_machdep.c,v 1.77 2013/08/18 06:50:31 matt Exp $ */ +/* $NetBSD: cats_machdep.c,v 1.78 2014/04/02 11:36:50 matt Exp $ */ /* * Copyright (c) 1997,1998 Mark Brinicombe. @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cats_machdep.c,v 1.77 2013/08/18 06:50:31 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cats_machdep.c,v 1.78 2014/04/02 11:36:50 matt Exp $); #include opt_ddb.h #include opt_modular.h @@ -622,8 +622,10 @@ initarm(void *arm_bootargs) #endif /* Map the boot arguments page */ - pmap_map_entry(l1pagetable, ebsabootinfo.bt_vargp, - ebsabootinfo.bt_pargp, VM_PROT_READ, PTE_CACHE); + if (ebsabootinfo.bt_vargp != vector_page) { + pmap_map_entry(l1pagetable, ebsabootinfo.bt_vargp, + ebsabootinfo.bt_pargp, VM_PROT_READ, PTE_CACHE); + } /* Map the stack pages */ pmap_map_chunk(l1pagetable, irqstack.pv_va, irqstack.pv_pa,
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Wed Apr 2 12:04:09 UTC 2014 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Because vector_page might be 0, we have to process the entry L1pt. Make sure to map the new l2 area after we've grown the kernel. If msgbufaddr is set, don't alloc space for msgbuf. To generate a diff of this commit: cvs rdiff -u -r1.274 -r1.275 src/sys/arch/arm/arm32/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.274 src/sys/arch/arm/arm32/pmap.c:1.275 --- src/sys/arch/arm/arm32/pmap.c:1.274 Tue Apr 1 18:01:45 2014 +++ src/sys/arch/arm/arm32/pmap.c Wed Apr 2 12:04:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.274 2014/04/01 18:01:45 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.275 2014/04/02 12:04:09 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -216,7 +216,7 @@ #include arm/locore.h //#include arm/arm32/katelib.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.274 2014/04/01 18:01:45 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.275 2014/04/02 12:04:09 matt Exp $); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -1572,6 +1572,7 @@ pmap_alloc_l2_bucket(pmap_t pm, vaddr_t static void pmap_free_l2_bucket(pmap_t pm, struct l2_bucket *l2b, u_int count) { + KASSERT(pm != pmap_kernel()); KDASSERT(count = l2b-l2b_occupancy); /* @@ -2904,7 +2905,9 @@ pmap_page_remove(struct vm_page_md *md, */ l2pte_reset(ptep); PTE_SYNC_CURRENT(pm, ptep); - pmap_free_l2_bucket(pm, l2b, PAGE_SIZE / L2_S_SIZE); + if (pm != pmap_kernel()) { + pmap_free_l2_bucket(pm, l2b, PAGE_SIZE / L2_S_SIZE); + } pmap_release_pmap_lock(pm); pool_put(pmap_pv_pool, pv); @@ -3202,18 +3205,18 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ } #endif } else + pmap_release_pmap_lock(pm); if ((pv = pool_get(pmap_pv_pool, PR_NOWAIT)) == NULL){ -pmap_release_page_lock(md); if ((flags PMAP_CANFAIL) == 0) panic(pmap_enter: no pv entries); if (pm != pmap_kernel()) pmap_free_l2_bucket(pm, l2b, 0); -pmap_release_pmap_lock(pm); UVMHIST_LOG(maphist, -- done (ENOMEM), 0, 0, 0, 0); return (ENOMEM); } + pmap_acquire_page_lock(md); pmap_enter_pv(md, pa, pv, pm, va, nflags); } @@ -3561,7 +3564,8 @@ pmap_remove(pmap_t pm, vaddr_t sva, vadd } } - pmap_free_l2_bucket(pm, l2b, mappings); + if (pm != pmap_kernel()) + pmap_free_l2_bucket(pm, l2b, mappings); pm-pm_stats.resident_count -= mappings; } @@ -5554,18 +5558,14 @@ pmap_grow_map(vaddr_t va, paddr_t *pap) if (pg == NULL) return (1); pa = VM_PAGE_TO_PHYS(pg); -#ifdef PMAP_CACHE_VIPT -#ifdef DIAGNOSTIC - struct vm_page_md *md = VM_PAGE_TO_MD(pg); -#endif /* * This new page must not have any mappings. Enter it via * pmap_kenter_pa and let that routine do the hard work. */ + struct vm_page_md *md __diagused = VM_PAGE_TO_MD(pg); KASSERT(SLIST_EMPTY(md-pvh_list)); pmap_kenter_pa(va, pa, VM_PROT_READ|VM_PROT_WRITE, PMAP_KMPAGE|PMAP_PTE); -#endif } if (pap) @@ -5955,7 +5955,8 @@ pmap_bootstrap(vaddr_t vstart, vaddr_t v * Scan the L1 translation table created by initarm() and create * the required metadata for all valid mappings found in it. */ - for (size_t l1slot = 0; l1slot L1_TABLE_SIZE / sizeof(pd_entry_t); + for (size_t l1slot = 0; + l1slot L1_TABLE_SIZE / sizeof(pd_entry_t); l1slot++) { pd_entry_t pde = l1pt[l1slot]; @@ -6079,8 +6080,11 @@ pmap_bootstrap(vaddr_t vstart, vaddr_t v pmap_alloc_specials(virtual_avail, nptes, cdstp, cdst_pte); pmap_set_pt_cache_mode(l1pt, (vaddr_t)cdst_pte, nptes); pmap_alloc_specials(virtual_avail, nptes, memhook, NULL); - pmap_alloc_specials(virtual_avail, round_page(MSGBUFSIZE) / PAGE_SIZE, - (void *)msgbufaddr, NULL); + if (msgbufaddr == NULL) { + pmap_alloc_specials(virtual_avail, + round_page(MSGBUFSIZE) / PAGE_SIZE, + (void *)msgbufaddr, NULL); + } /* * Allocate a range of kernel virtual address space to be used @@ -6488,7 +6492,7 @@ pmap_map_entry(vaddr_t l1pt, vaddr_t va, if ((pdep[l1slot] L1_TYPE_MASK) != L1_TYPE_C) panic(pmap_map_entry: no L2 table for VA 0x%08lx, va); - ptep = (pt_entry_t *) kernel_pt_lookup(l1pte_pa(pdep[l1pte_index(va)])); + ptep = (pt_entry_t *) kernel_pt_lookup(l1pte_pa(pdep[l1slot])); if (ptep == NULL) panic(pmap_map_entry: can't find L2 table for VA 0x%08lx, va);
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Wed Apr 2 12:28:54 UTC 2014 Modified Files: src/sys/arch/arm/arm32: bus_dma.c Log Message: Deal with bus_dmamem_unmap of direct mapped KVA. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/arm/arm32/bus_dma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/bus_dma.c diff -u src/sys/arch/arm/arm32/bus_dma.c:1.83 src/sys/arch/arm/arm32/bus_dma.c:1.84 --- src/sys/arch/arm/arm32/bus_dma.c:1.83 Mon Mar 24 20:06:31 2014 +++ src/sys/arch/arm/arm32/bus_dma.c Wed Apr 2 12:28:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.83 2014/03/24 20:06:31 christos Exp $ */ +/* $NetBSD: bus_dma.c,v 1.84 2014/04/02 12:28:54 matt Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -35,13 +35,15 @@ #include opt_arm_bus_space.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.83 2014/03/24 20:06:31 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: bus_dma.c,v 1.84 2014/04/02 12:28:54 matt Exp $); #include sys/param.h #include sys/systm.h #include sys/kernel.h #include sys/proc.h #include sys/buf.h +#include sys/bus.h +#include sys/cpu.h #include sys/reboot.h #include sys/conf.h #include sys/file.h @@ -52,11 +54,12 @@ __KERNEL_RCSID(0, $NetBSD: bus_dma.c,v #include uvm/uvm.h -#include sys/bus.h -#include machine/cpu.h - #include arm/cpufunc.h +#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS +#include dev/mm.h +#endif + #ifdef BUSDMA_COUNTERS static struct evcnt bus_dma_creates = EVCNT_INITIALIZER(EVCNT_TYPE_MISC, NULL, busdma, creates); @@ -1391,6 +1394,19 @@ _bus_dmamem_unmap(bus_dma_tag_t t, void KASSERTMSG(((uintptr_t)kva PAGE_MASK) == 0, kva %p (%#PRIxPTR), kva, ((uintptr_t)kva PAGE_MASK)); +#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS + /* + * Check to see if this used direct mapped memory. Get it's physical + * address and try to map it. If the resultant matches the kva, then + * it was and so we can just return since we have notice to free up. + */ + paddr_t pa; + vaddr_t va; + (void)pmap_extract(pmap_kernel(), (vaddr_t)kva, pa); + if (mm_md_direct_mapped_phys(pa, va) va == (vaddr_t)kva) + return; +#endif + size = round_page(size); pmap_kremove((vaddr_t)kva, size); pmap_update(pmap_kernel());
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Wed Apr 2 12:36:05 UTC 2014 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Really fix locking this time. To generate a diff of this commit: cvs rdiff -u -r1.275 -r1.276 src/sys/arch/arm/arm32/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.275 src/sys/arch/arm/arm32/pmap.c:1.276 --- src/sys/arch/arm/arm32/pmap.c:1.275 Wed Apr 2 12:04:09 2014 +++ src/sys/arch/arm/arm32/pmap.c Wed Apr 2 12:36:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.275 2014/04/02 12:04:09 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.276 2014/04/02 12:36:05 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -216,7 +216,7 @@ #include arm/locore.h //#include arm/arm32/katelib.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.275 2014/04/02 12:04:09 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.276 2014/04/02 12:36:05 matt Exp $); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -3205,8 +3205,9 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ } #endif } else - pmap_release_pmap_lock(pm); + pmap_release_page_lock(md); if ((pv = pool_get(pmap_pv_pool, PR_NOWAIT)) == NULL){ +pmap_release_pmap_lock(pm); if ((flags PMAP_CANFAIL) == 0) panic(pmap_enter: no pv entries);
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Wed Apr 2 13:26:22 UTC 2014 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: braces are your friends. use them. To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/sys/arch/arm/arm32/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.276 src/sys/arch/arm/arm32/pmap.c:1.277 --- src/sys/arch/arm/arm32/pmap.c:1.276 Wed Apr 2 12:36:05 2014 +++ src/sys/arch/arm/arm32/pmap.c Wed Apr 2 13:26:22 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.276 2014/04/02 12:36:05 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.277 2014/04/02 13:26:22 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -216,7 +216,7 @@ #include arm/locore.h //#include arm/arm32/katelib.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.276 2014/04/02 12:36:05 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.277 2014/04/02 13:26:22 matt Exp $); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -3204,20 +3204,23 @@ pmap_enter(pmap_t pm, vaddr_t va, paddr_ oflags); } #endif - } else - pmap_release_page_lock(md); - if ((pv = pool_get(pmap_pv_pool, PR_NOWAIT)) == NULL){ -pmap_release_pmap_lock(pm); -if ((flags PMAP_CANFAIL) == 0) - panic(pmap_enter: no pv entries); - -if (pm != pmap_kernel()) - pmap_free_l2_bucket(pm, l2b, 0); -UVMHIST_LOG(maphist, -- done (ENOMEM), -0, 0, 0, 0); -return (ENOMEM); + } else { +pmap_release_page_lock(md); +pv = pool_get(pmap_pv_pool, PR_NOWAIT); +if (pv == NULL) { + pmap_release_pmap_lock(pm); + if ((flags PMAP_CANFAIL) == 0) + panic(pmap_enter: + no pv entries); + + if (pm != pmap_kernel()) + pmap_free_l2_bucket(pm, l2b, 0); + UVMHIST_LOG(maphist, -- done (ENOMEM), + 0, 0, 0, 0); + return (ENOMEM); +} +pmap_acquire_page_lock(md); } - pmap_acquire_page_lock(md); pmap_enter_pv(md, pa, pv, pm, va, nflags); } @@ -3630,7 +3633,7 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v struct pv_entry *pv = NULL; #endif #endif - struct vm_page_md *md = VM_PAGE_TO_MD(pg); + struct vm_page_md *md = pg != NULL ? VM_PAGE_TO_MD(pg) : NULL; UVMHIST_FUNC(__func__); @@ -3672,9 +3675,9 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v KASSERT((omd-pvh_attrs PVF_KMPAGE) == 0); KASSERT((flags PMAP_KMPAGE) == 0); #ifndef ARM_MMU_EXTENDED - pmap_acquire_page_lock(md); + pmap_acquire_page_lock(omd); pv = pmap_kremove_pg(opg, va); - pmap_release_page_lock(md); + pmap_release_page_lock(omd); #endif } #endif @@ -3756,11 +3759,12 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v pool_put(pmap_pv_pool, pv); #endif } - + KASSERT(md == NULL || !pmap_page_locked_p(md)); if (pmap_initialized) { UVMHIST_LOG(maphist, -- done (ptep %p: %#x - %#x), ptep, opte, npte, 0); } + } void
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Wed Apr 2 13:54:42 UTC 2014 Modified Files: src/lib/librumpuser: rumpuser.c Log Message: Always use sysconf() to query host processor count instead of separate tricks for each platform. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/lib/librumpuser/rumpuser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser.c diff -u src/lib/librumpuser/rumpuser.c:1.58 src/lib/librumpuser/rumpuser.c:1.59 --- src/lib/librumpuser/rumpuser.c:1.58 Sun Mar 16 10:23:59 2014 +++ src/lib/librumpuser/rumpuser.c Wed Apr 2 13:54:42 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser.c,v 1.58 2014/03/16 10:23:59 njoly Exp $ */ +/* $NetBSD: rumpuser.c,v 1.59 2014/04/02 13:54:42 pooka Exp $ */ /* * Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser.c,v 1.58 2014/03/16 10:23:59 njoly Exp $); +__RCSID($NetBSD: rumpuser.c,v 1.59 2014/04/02 13:54:42 pooka Exp $); #endif /* !lint */ #include sys/ioctl.h @@ -536,32 +536,9 @@ rumpuser_clock_sleep(int enum_rumpclock, static int gethostncpu(void) { - int ncpu = 1; + int ncpu = 1; /* unknown, really */ -#if defined(__BSD__) - size_t sz = sizeof(ncpu); - - sysctlbyname(hw.ncpu, ncpu, sz, NULL, 0); -#elif defined(__linux__) || defined(__CYGWIN__) - FILE *fp; - char *line = NULL; - size_t n = 0; - - /* If anyone knows a better way, I'm all ears */ - if ((fp = fopen(/proc/cpuinfo, r)) != NULL) { - ncpu = 0; - while (getline(line, n, fp) != -1) { - if (strncmp(line, - processor, sizeof(processor)-1) == 0) - ncpu++; - } - if (ncpu == 0) - ncpu = 1; - free(line); - fclose(fp); - } -#elif __sun__ - /* XXX: this is just a rough estimate ... */ +#ifdef _SC_NPROCESSORS_ONLN ncpu = sysconf(_SC_NPROCESSORS_ONLN); #endif
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Wed Apr 2 14:05:54 UTC 2014 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Init the page_lock to IPL_VM iff VIPT arm_cache_prefer_mask != 0 otherwise use IPL_NONE. Don't bother with page_lock for KMPAGEs. To generate a diff of this commit: cvs rdiff -u -r1.277 -r1.278 src/sys/arch/arm/arm32/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.277 src/sys/arch/arm/arm32/pmap.c:1.278 --- src/sys/arch/arm/arm32/pmap.c:1.277 Wed Apr 2 13:26:22 2014 +++ src/sys/arch/arm/arm32/pmap.c Wed Apr 2 14:05:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.277 2014/04/02 13:26:22 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.278 2014/04/02 14:05:54 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -216,7 +216,7 @@ #include arm/locore.h //#include arm/arm32/katelib.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.277 2014/04/02 13:26:22 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.278 2014/04/02 14:05:54 matt Exp $); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -3725,16 +3725,17 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v PMAPCOUNT(vac_flush_lots2); pmap_flush_page(md, pa, PMAP_FLUSH_SECONDARY); } - pmap_acquire_page_lock(md); + /* + * Since this is a KMPAGE, there can be no contention + * for this page so don't lock it. + */ md-pvh_attrs = PAGE_SIZE - 1; md-pvh_attrs |= PVF_KMPAGE | PVF_COLORED | PVF_DIRTY | (va arm_cache_prefer_mask); #else /* !PMAP_CACHE_VIPT || ARM_MMU_EXTENDED */ - pmap_acquire_page_lock(md); md-pvh_attrs |= PVF_KMPAGE; #endif - pmap_kmpages++; - pmap_release_page_lock(md); + atomic_inc_32(pmap_kmpages); #if defined(PMAP_CACHE_VIPT) !defined(ARM_MMU_EXTENDED) } else if (arm_cache_prefer_mask != 0) { if (pv == NULL) { @@ -3800,7 +3801,6 @@ pmap_kremove(vaddr_t va, vsize_t len) if (opg != NULL) { struct vm_page_md *omd = VM_PAGE_TO_MD(opg); -pmap_acquire_page_lock(omd); if (omd-pvh_attrs PVF_KMPAGE) { KASSERT(omd-urw_mappings == 0); KASSERT(omd-uro_mappings == 0); @@ -3812,14 +3812,15 @@ pmap_kremove(vaddr_t va, vsize_t len) omd-pvh_attrs = ~PVF_WRITE; } #endif - pmap_kmpages--; + atomic_dec_32(pmap_kmpages); #if defined(PMAP_CACHE_VIPT) !defined(ARM_MMU_EXTENDED) } else if (arm_cache_prefer_mask != 0) { + pmap_acquire_page_lock(omd); pool_put(pmap_pv_pool, pmap_kremove_pg(opg, va)); + pmap_release_page_lock(omd); #endif } -pmap_release_page_lock(omd); } if (l2pte_valid_p(opte)) { #ifdef PMAP_CACHE_VIVT @@ -5948,7 +5949,15 @@ pmap_bootstrap(vaddr_t vstart, vaddr_t v #ifdef VERBOSE_INIT_ARM printf(locks ); #endif - mutex_init(pmap_lock, MUTEX_DEFAULT, IPL_NONE); +#if defined(PMAP_CACHE_VIPT) !defined(ARM_MMU_EXTENDED) + if (arm_cache_prefer_mask != 0) { + mutex_init(pmap_lock, MUTEX_DEFAULT, IPL_VM); + } else { +#endif + mutex_init(pmap_lock, MUTEX_DEFAULT, IPL_NONE); +#if defined(PMAP_CACHE_VIPT) !defined(ARM_MMU_EXTENDED) + } +#endif mutex_init(pm-pm_obj_lock, MUTEX_DEFAULT, IPL_NONE); uvm_obj_init(pm-pm_obj, NULL, false, 1); uvm_obj_setlock(pm-pm_obj, pm-pm_obj_lock);
CVS commit: src/libexec/ld.elf_so/arch/sparc64
Module Name:src Committed By: martin Date: Wed Apr 2 14:11:25 UTC 2014 Modified Files: src/libexec/ld.elf_so/arch/sparc64: mdreloc.c Log Message: The table of masks applied for each relocation type was wrong for some relocs with 64bit targets, like GLOB_DAT. Change some instruction patterns used for PLT slots, so -current objdump -d shows what the comment says. Fix encoding of %lox() in PLT slots close to -1. Enhance debug output slightly. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/libexec/ld.elf_so/arch/sparc64/mdreloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/sparc64/mdreloc.c diff -u src/libexec/ld.elf_so/arch/sparc64/mdreloc.c:1.55 src/libexec/ld.elf_so/arch/sparc64/mdreloc.c:1.56 --- src/libexec/ld.elf_so/arch/sparc64/mdreloc.c:1.55 Thu Oct 3 10:45:57 2013 +++ src/libexec/ld.elf_so/arch/sparc64/mdreloc.c Wed Apr 2 14:11:25 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mdreloc.c,v 1.55 2013/10/03 10:45:57 martin Exp $ */ +/* $NetBSD: mdreloc.c,v 1.56 2014/04/02 14:11:25 martin Exp $ */ /*- * Copyright (c) 2000 Eduardo Horvath. @@ -32,7 +32,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: mdreloc.c,v 1.55 2013/10/03 10:45:57 martin Exp $); +__RCSID($NetBSD: mdreloc.c,v 1.56 2014/04/02 14:11:25 martin Exp $); #endif /* not lint */ #include errno.h @@ -170,7 +170,7 @@ static const long reloc_target_bitmask[] _BM(10), _BM(13), _BM(22), /* GOT10, GOT13, GOT22 */ _BM(10), _BM(22), /* _PC10, _PC22 */ _BM(30), 0, /* _WPLT30, _COPY */ - _BM(32), _BM(32), _BM(32), /* _GLOB_DAT, JMP_SLOT, _RELATIVE */ + -1, _BM(32), -1, /* _GLOB_DAT, JMP_SLOT, _RELATIVE */ _BM(32), _BM(32), /* _UA32, PLT32 */ _BM(22), _BM(10), /* _HIPLT22, LOPLT10 */ _BM(32), _BM(22), _BM(10), /* _PCPLT32, _PCPLT22, _PCPLT10 */ @@ -192,18 +192,18 @@ static const long reloc_target_bitmask[] /* * Instruction templates: */ -#define BAA 0x1040 /* ba,a %xcc, 0 */ +#define BAA 0x3068 /* ba,a %xcc, 0 */ #define SETHI 0x0300 /* sethi %hi(0), %g1 */ #define JMP 0x81c06000 /* jmpl %g1+%lo(0), %g0 */ #define NOP 0x0100 /* sethi %hi(0), %g0 */ -#define OR 0x82806000 /* or %g1, 0, %g1 */ -#define XOR 0x82c06000 /* xor %g1, 0, %g1 */ -#define MOV71 0x8283a000 /* or %o7, 0, %g1 */ -#define MOV17 0x9c806000 /* or %g1, 0, %o7 */ +#define OR 0x82106000 /* or %g1, 0, %g1 */ +#define XOR 0x82186000 /* xor %g1, 0, %g1 */ +#define MOV71 0x8213e000 /* or %o7, 0, %g1 */ +#define MOV17 0x9e106000 /* or %g1, 0, %o7 */ #define CALL 0x4000 /* call 0 */ -#define SLLX 0x8b407000 /* sllx %g1, 0, %g1 */ +#define SLLX 0x83287000 /* sllx %g1, 0, %g1 */ #define SETHIG5 0x0b00 /* sethi %hi(0), %g5 */ -#define ORG5 0x82804005 /* or %g1, %g5, %g1 */ +#define ORG5 0x82104005 /* or %g1, %g5, %g1 */ /* %hi(v)/%lo(v) with variable shift */ @@ -603,8 +603,8 @@ _rtld_relocate_plt_object(const Obj_Entr return 0; value = (Elf_Addr)(defobj-relocbase + def-st_value); - rdbg((bind now/fixup in %s -- new=%p, - defobj-strtab + def-st_name, (void *)value)); + rdbg((bind now/fixup in %s at %p -- new=%p, + defobj-strtab + def-st_name, (void*)where, (void *)value)); /* * At the PLT entry pointed at by `where', we now construct a direct @@ -696,7 +696,7 @@ _rtld_relocate_plt_object(const Obj_Entr * */ where[3] = JMP; - where[2] = XOR | ((~value) 0x1fff); + where[2] = XOR | (value 0x3ff) | 0x1c00; where[1] = SETHI | HIVAL(~value, 10); __asm volatile(iflush %0+12 : : r (where)); __asm volatile(iflush %0+8 : : r (where));
CVS commit: src/lib/librumpclient
Module Name:src Committed By: pooka Date: Wed Apr 2 14:48:04 UTC 2014 Modified Files: src/lib/librumpclient: rumpclient.c Log Message: On Linux, poll signalfd() when waiting for a kernel response. This allows the same type of race-free handling of signals as kqueue() allows on NetBSD. One of the noticeable things is that you can now interrupt rumprun ping mid-interval on Linux. per suggestion from Justin Cormack To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/lib/librumpclient/rumpclient.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpclient/rumpclient.c diff -u src/lib/librumpclient/rumpclient.c:1.57 src/lib/librumpclient/rumpclient.c:1.58 --- src/lib/librumpclient/rumpclient.c:1.57 Wed Feb 26 02:03:40 2014 +++ src/lib/librumpclient/rumpclient.c Wed Apr 2 14:48:03 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpclient.c,v 1.57 2014/02/26 02:03:40 pooka Exp $ */ +/* $NetBSD: rumpclient.c,v 1.58 2014/04/02 14:48:03 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -38,17 +38,19 @@ * notifications but defer their handling to a stage where we do not * hold the communication lock. Taking a signal while holding on to * that lock may cause a deadlock. Therefore, block signals throughout - * the RPC when using poll. This unfortunately means that the normal - * SIGINT way of stopping a process while it is undergoing rump kernel - * RPC will not work. If anyone know which Linux system call handles - * the above scenario correctly, I'm all ears. + * the RPC when using poll. On Linux, we use signalfd in the same role + * as kqueue on NetBSD to be able to take signals while waiting for a + * response from the server. */ #ifdef __NetBSD__ #define USE_KQUEUE #endif +#ifdef __linux__ +#define USE_SIGNALFD +#endif -__RCSID($NetBSD: rumpclient.c,v 1.57 2014/02/26 02:03:40 pooka Exp $); +__RCSID($NetBSD: rumpclient.c,v 1.58 2014/04/02 14:48:03 pooka Exp $); #include sys/param.h #include sys/mman.h @@ -96,6 +98,12 @@ int (*host_kevent)(int, const struct kev struct kevent *, size_t, const struct timespec *); #endif +#ifdef USE_SIGNALFD +#include sys/signalfd.h + +int (*host_signalfd)(int, const sigset_t *, int); +#endif + int (*host_execve)(const char *, char *const[], char *const[]); #include sp_common.c @@ -105,7 +113,7 @@ static struct spclient clispc = { .spc_fd = -1, }; -static int kq = -1; +static int holyfd; static sigset_t fullset; static int doconnect(void); @@ -237,7 +245,7 @@ cliwaitresp(struct spclient *spc, struct * typically we don't have a frame waiting * when we come in here, so call kevent now */ -rv = host_kevent(kq, NULL, 0, +rv = host_kevent(holyfd, NULL, 0, kev, __arraycount(kev), NULL); if (__predict_false(rv == -1)) { @@ -267,13 +275,19 @@ cliwaitresp(struct spclient *spc, struct * determine what happens next. */ activity: -#else /* USE_KQUEUE */ -struct pollfd pfd; - -pfd.fd = clispc.spc_fd; -pfd.events = POLLIN; +#else /* !USE_KQUEUE */ +struct pollfd pfd[2]; -rv = host_poll(pfd, 1, -1); +pfd[0].fd = clispc.spc_fd; +pfd[0].events = POLLIN; +pfd[1].fd = holyfd; +pfd[1].events = POLLIN; + +rv = host_poll(pfd, 2, -1); +if (pfd[1].revents POLLIN) { + dosig = 1; + goto cleanup; +} #endif /* !USE_KQUEUE */ switch (readframe(spc)) { @@ -677,6 +691,52 @@ dupgood(int myfd, int mustchange) return myfd; } +#if defined(USE_KQUEUE) + +static int +makeholyfd(void) +{ + struct kevent kev[NSIG+1]; + int i, fd; + + /* setup kqueue, we want all signals and the fd */ + if ((fd = dupgood(host_kqueue(), 0)) == -1) { + ERRLOG((rump_sp: cannot setup kqueue)); + return -1; + } + + for (i = 0; i NSIG; i++) { + EV_SET(kev[i], i+1, EVFILT_SIGNAL, EV_ADD|EV_ENABLE, 0, 0, 0); + } + EV_SET(kev[NSIG], clispc.spc_fd, + EVFILT_READ, EV_ADD|EV_ENABLE, 0, 0, 0); + if (host_kevent(fd, kev, NSIG+1, NULL, 0, NULL) == -1) { + ERRLOG((rump_sp: kevent() failed)); + return -1; + + return fd; +} + +#elif defined(USE_SIGNALFD) /* !USE_KQUEUE */ + +static int +makeholyfd(void) +{ + + return host_signalfd(-1, fullset, 0); +} + +#else /* !USE_KQUEUE !USE_SIGNALFD */ + +static int +makeholyfd(void) +{ + + return -1; +} + +#endif + static int doconnect(void) { @@ -686,9 +746,9 @@ doconnect(void) int s, error, flags; ssize_t n; - if (kq != -1) - host_close(kq); - kq = -1; + if (holyfd != -1) + host_close(holyfd); + holyfd = -1; s = -1; if (clispc.spc_fd != -1) @@ -759,29 +819,7 @@ doconnect(void) clispc.spc_fd = s; clispc.spc_state = SPCSTATE_RUNNING; clispc.spc_reconnecting = 0; - -#ifdef USE_KQUEUE -{ - struct kevent kev[NSIG+1]; - int i; - - /* setup kqueue, we want all signals and the fd */ - if ((kq = dupgood(host_kqueue(), 0)) == -1) { -
CVS commit: src/lib/librumpclient
Module Name:src Committed By: pooka Date: Wed Apr 2 15:04:19 UTC 2014 Modified Files: src/lib/librumpclient: rumpclient.c Log Message: fix build on NetBSD. also, prevent fd leak in error path To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/lib/librumpclient/rumpclient.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpclient/rumpclient.c diff -u src/lib/librumpclient/rumpclient.c:1.58 src/lib/librumpclient/rumpclient.c:1.59 --- src/lib/librumpclient/rumpclient.c:1.58 Wed Apr 2 14:48:03 2014 +++ src/lib/librumpclient/rumpclient.c Wed Apr 2 15:04:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpclient.c,v 1.58 2014/04/02 14:48:03 pooka Exp $ */ +/* $NetBSD: rumpclient.c,v 1.59 2014/04/02 15:04:19 pooka Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -50,7 +50,7 @@ #define USE_SIGNALFD #endif -__RCSID($NetBSD: rumpclient.c,v 1.58 2014/04/02 14:48:03 pooka Exp $); +__RCSID($NetBSD: rumpclient.c,v 1.59 2014/04/02 15:04:19 pooka Exp $); #include sys/param.h #include sys/mman.h @@ -712,7 +712,9 @@ makeholyfd(void) EVFILT_READ, EV_ADD|EV_ENABLE, 0, 0, 0); if (host_kevent(fd, kev, NSIG+1, NULL, 0, NULL) == -1) { ERRLOG((rump_sp: kevent() failed)); + host_close(fd); return -1; + } return fd; }
CVS commit: src/sys/kern
Module Name:src Committed By: seanb Date: Wed Apr 2 15:35:45 UTC 2014 Modified Files: src/sys/kern: uipc_domain.c Log Message: len argument to strlcpy() was incorrect when copying out AF_LOCAL sockets in sysctl helper. The entire buffer wasn't available since sun_path member is not at offset 0 in struct sockaddr_un. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/kern/uipc_domain.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/uipc_domain.c diff -u src/sys/kern/uipc_domain.c:1.90 src/sys/kern/uipc_domain.c:1.91 --- src/sys/kern/uipc_domain.c:1.90 Tue Feb 25 18:30:11 2014 +++ src/sys/kern/uipc_domain.c Wed Apr 2 15:35:45 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_domain.c,v 1.90 2014/02/25 18:30:11 pooka Exp $ */ +/* $NetBSD: uipc_domain.c,v 1.91 2014/04/02 15:35:45 seanb Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uipc_domain.c,v 1.90 2014/02/25 18:30:11 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: uipc_domain.c,v 1.91 2014/04/02 15:35:45 seanb Exp $); #include sys/param.h #include sys/socket.h @@ -424,10 +424,13 @@ sysctl_dounpcb(struct kinfo_pcb *pcb, co * endpoint. bleah! */ if (unp-unp_addr != NULL) { - un-sun_len = unp-unp_addr-sun_len; - un-sun_family = unp-unp_addr-sun_family; - strlcpy(un-sun_path, unp-unp_addr-sun_path, - sizeof(pcb-ki_s)); + /* + * We've added one to sun_len when allocating to + * hold terminating NUL which we want here. See + * makeun(). + */ + memcpy(un, unp-unp_addr, + min(sizeof(pcb-ki_s), unp-unp_addr-sun_len + 1)); } else { un-sun_len = offsetof(struct sockaddr_un, sun_path); @@ -436,11 +439,8 @@ sysctl_dounpcb(struct kinfo_pcb *pcb, co if (unp-unp_conn != NULL) { un = (struct sockaddr_un *)pcb-ki_dst; if (unp-unp_conn-unp_addr != NULL) { - un-sun_len = unp-unp_conn-unp_addr-sun_len; - un-sun_family = unp-unp_conn-unp_addr-sun_family; - un-sun_family = unp-unp_conn-unp_addr-sun_family; - strlcpy(un-sun_path, unp-unp_conn-unp_addr-sun_path, -sizeof(pcb-ki_d)); + memcpy(un, unp-unp_conn-unp_addr, + min(sizeof(pcb-ki_s), unp-unp_conn-unp_addr-sun_len + 1)); } else { un-sun_len = offsetof(struct sockaddr_un, sun_path);
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: skrll Date: Wed Apr 2 15:35:14 UTC 2014 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Fix non-DIAGNOSTIC build To generate a diff of this commit: cvs rdiff -u -r1.278 -r1.279 src/sys/arch/arm/arm32/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.278 src/sys/arch/arm/arm32/pmap.c:1.279 --- src/sys/arch/arm/arm32/pmap.c:1.278 Wed Apr 2 14:05:54 2014 +++ src/sys/arch/arm/arm32/pmap.c Wed Apr 2 15:35:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.278 2014/04/02 14:05:54 matt Exp $ */ +/* $NetBSD: pmap.c,v 1.279 2014/04/02 15:35:14 skrll Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -216,7 +216,7 @@ #include arm/locore.h //#include arm/arm32/katelib.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.278 2014/04/02 14:05:54 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.279 2014/04/02 15:35:14 skrll Exp $); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -3667,7 +3667,7 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v PMAPCOUNT(kenter_remappings); #ifdef PMAP_CACHE_VIPT opg = PHYS_TO_VM_PAGE(l2pte_pa(opte)); -#ifdef DIAGNOSTIC +#if !defined(ARM_MMU_EXTENDED) || defined(DIAGNOSTIC) struct vm_page_md *omd = VM_PAGE_TO_MD(opg); #endif if (opg arm_cache_prefer_mask != 0) {
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Wed Apr 2 15:45:51 UTC 2014 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Mark omd as diagused for the ARM_MMU_EXTENDED case. To generate a diff of this commit: cvs rdiff -u -r1.279 -r1.280 src/sys/arch/arm/arm32/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.279 src/sys/arch/arm/arm32/pmap.c:1.280 --- src/sys/arch/arm/arm32/pmap.c:1.279 Wed Apr 2 15:35:14 2014 +++ src/sys/arch/arm/arm32/pmap.c Wed Apr 2 15:45:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.279 2014/04/02 15:35:14 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.280 2014/04/02 15:45:51 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -216,7 +216,7 @@ #include arm/locore.h //#include arm/arm32/katelib.h -__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.279 2014/04/02 15:35:14 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.280 2014/04/02 15:45:51 matt Exp $); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -3668,7 +3668,7 @@ pmap_kenter_pa(vaddr_t va, paddr_t pa, v #ifdef PMAP_CACHE_VIPT opg = PHYS_TO_VM_PAGE(l2pte_pa(opte)); #if !defined(ARM_MMU_EXTENDED) || defined(DIAGNOSTIC) - struct vm_page_md *omd = VM_PAGE_TO_MD(opg); + struct vm_page_md *omd __diagused = VM_PAGE_TO_MD(opg); #endif if (opg arm_cache_prefer_mask != 0) { KASSERT(opg != pg);
CVS commit: src/sys/kern
Module Name:src Committed By: para Date: Wed Apr 2 16:14:50 UTC 2014 Modified Files: src/sys/kern: subr_vmem.c Log Message: bt_refill is and must be called with VM_NOSLEEP set, assert this fix error path if pool_get returns NULL To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/kern/subr_vmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_vmem.c diff -u src/sys/kern/subr_vmem.c:1.90 src/sys/kern/subr_vmem.c:1.91 --- src/sys/kern/subr_vmem.c:1.90 Thu Mar 20 06:48:22 2014 +++ src/sys/kern/subr_vmem.c Wed Apr 2 16:14:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_vmem.c,v 1.90 2014/03/20 06:48:22 mlelstv Exp $ */ +/* $NetBSD: subr_vmem.c,v 1.91 2014/04/02 16:14:50 para Exp $ */ /*- * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi, @@ -46,7 +46,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.90 2014/03/20 06:48:22 mlelstv Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.91 2014/04/02 16:14:50 para Exp $); #if defined(_KERNEL) #include opt_ddb.h @@ -230,6 +230,8 @@ bt_refill(vmem_t *vm, vm_flag_t flags) { bt_t *bt; + KASSERT(flags VM_NOSLEEP); + VMEM_LOCK(vm); if (vm-vm_nfreetags BT_MINRESERVE) { VMEM_UNLOCK(vm); @@ -251,22 +253,21 @@ bt_refill(vmem_t *vm, vm_flag_t flags) while (vm-vm_nfreetags = BT_MINRESERVE) { VMEM_UNLOCK(vm); mutex_enter(vmem_btag_refill_lock); - bt = pool_get(vmem_btag_pool, - (flags VM_SLEEP) ? PR_WAITOK: PR_NOWAIT); + bt = pool_get(vmem_btag_pool, PR_NOWAIT); mutex_exit(vmem_btag_refill_lock); VMEM_LOCK(vm); - if (bt == NULL (flags VM_SLEEP) == 0) + if (bt == NULL) break; LIST_INSERT_HEAD(vm-vm_freetags, bt, bt_freelist); vm-vm_nfreetags++; } - VMEM_UNLOCK(vm); - if (vm-vm_nfreetags == 0) { + VMEM_UNLOCK(vm); return ENOMEM; } + VMEM_UNLOCK(vm); if (kmem_meta_arena != NULL) { bt_refill(kmem_arena, (flags ~VM_FITMASK)
CVS commit: src
Module Name:src Committed By: justin Date: Wed Apr 2 17:09:23 UTC 2014 Modified Files: src/lib/librumpclient: rumpclient.c src/lib/librumphijack: hijack.c src/lib/librumpuser: rumpuser_dl.c rumpuser_port.h rumpuser_pth.c src/sys/rump/include/rump: rump.h Log Message: Add Android support for rump kernel. Reviewed by pooka@ To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/lib/librumpclient/rumpclient.c cvs rdiff -u -r1.106 -r1.107 src/lib/librumphijack/hijack.c cvs rdiff -u -r1.27 -r1.28 src/lib/librumpuser/rumpuser_dl.c cvs rdiff -u -r1.31 -r1.32 src/lib/librumpuser/rumpuser_port.h cvs rdiff -u -r1.39 -r1.40 src/lib/librumpuser/rumpuser_pth.c cvs rdiff -u -r1.61 -r1.62 src/sys/rump/include/rump/rump.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpclient/rumpclient.c diff -u src/lib/librumpclient/rumpclient.c:1.59 src/lib/librumpclient/rumpclient.c:1.60 --- src/lib/librumpclient/rumpclient.c:1.59 Wed Apr 2 15:04:19 2014 +++ src/lib/librumpclient/rumpclient.c Wed Apr 2 17:09:23 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpclient.c,v 1.59 2014/04/02 15:04:19 pooka Exp $ */ +/* $NetBSD: rumpclient.c,v 1.60 2014/04/02 17:09:23 justin Exp $ */ /* * Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved. @@ -46,11 +46,11 @@ #ifdef __NetBSD__ #define USE_KQUEUE #endif -#ifdef __linux__ +#if defined(__linux__) !defined(__ANDROID__) #define USE_SIGNALFD #endif -__RCSID($NetBSD: rumpclient.c,v 1.59 2014/04/02 15:04:19 pooka Exp $); +__RCSID($NetBSD: rumpclient.c,v 1.60 2014/04/02 17:09:23 justin Exp $); #include sys/param.h #include sys/mman.h @@ -86,9 +86,17 @@ int (*host_socket)(int, int, int); int (*host_close)(int); int (*host_connect)(int, const struct sockaddr *, socklen_t); int (*host_fcntl)(int, int, ...); +#ifdef __ANDROID__ +int (*host_poll)(struct pollfd *, nfds_t, long); +#else int (*host_poll)(struct pollfd *, nfds_t, int); +#endif ssize_t (*host_read)(int, void *, size_t); +#ifdef __ANDROID__ +int (*host_sendmsg)(int, const struct msghdr *, unsigned int); +#else ssize_t (*host_sendmsg)(int, const struct msghdr *, int); +#endif int (*host_setsockopt)(int, int, int, const void *, socklen_t); int (*host_dup)(int); Index: src/lib/librumphijack/hijack.c diff -u src/lib/librumphijack/hijack.c:1.106 src/lib/librumphijack/hijack.c:1.107 --- src/lib/librumphijack/hijack.c:1.106 Tue Sep 10 16:53:06 2013 +++ src/lib/librumphijack/hijack.c Wed Apr 2 17:09:23 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: hijack.c,v 1.106 2013/09/10 16:53:06 pooka Exp $ */ +/* $NetBSD: hijack.c,v 1.107 2014/04/02 17:09:23 justin Exp $ */ /*- * Copyright (c) 2011 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ #include rump/rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: hijack.c,v 1.106 2013/09/10 16:53:06 pooka Exp $); +__RCSID($NetBSD: hijack.c,v 1.107 2014/04/02 17:09:23 justin Exp $); #endif #include sys/param.h @@ -38,10 +38,13 @@ __RCSID($NetBSD: hijack.c,v 1.106 2013/ #include sys/mount.h #include sys/socket.h #include sys/stat.h -#include sys/statvfs.h #include sys/time.h #include sys/uio.h +#ifdef PLATFORM_HAS_NBVFSSTAT +#include sys/statvfs.h +#endif + #ifdef PLATFORM_HAS_KQUEUE #include sys/event.h #endif Index: src/lib/librumpuser/rumpuser_dl.c diff -u src/lib/librumpuser/rumpuser_dl.c:1.27 src/lib/librumpuser/rumpuser_dl.c:1.28 --- src/lib/librumpuser/rumpuser_dl.c:1.27 Fri Mar 14 01:18:39 2014 +++ src/lib/librumpuser/rumpuser_dl.c Wed Apr 2 17:09:23 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_dl.c,v 1.27 2014/03/14 01:18:39 justin Exp $ */ +/* $NetBSD: rumpuser_dl.c,v 1.28 2014/04/02 17:09:23 justin Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -40,7 +40,7 @@ #include rumpuser_port.h #if !defined(lint) -__RCSID($NetBSD: rumpuser_dl.c,v 1.27 2014/03/14 01:18:39 justin Exp $); +__RCSID($NetBSD: rumpuser_dl.c,v 1.28 2014/04/02 17:09:23 justin Exp $); #endif /* !lint */ #include sys/types.h @@ -59,8 +59,8 @@ __RCSID($NetBSD: rumpuser_dl.c,v 1.27 2 #include rump/rumpuser.h #if defined(__ELF__) (defined(__NetBSD__) || defined(__FreeBSD__) \ -|| (defined(__sun__) defined(__svr4__))) || defined(__linux__) \ -|| defined(__DragonFly__) +|| (defined(__sun__) defined(__svr4__))) || defined(__DragonFly__) \ +|| (defined(__linux__) !defined(__ANDROID__)) #include elf.h #include link.h Index: src/lib/librumpuser/rumpuser_port.h diff -u src/lib/librumpuser/rumpuser_port.h:1.31 src/lib/librumpuser/rumpuser_port.h:1.32 --- src/lib/librumpuser/rumpuser_port.h:1.31 Fri Mar 21 16:03:35 2014 +++ src/lib/librumpuser/rumpuser_port.h Wed Apr 2 17:09:23 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_port.h,v 1.31 2014/03/21 16:03:35 pooka Exp $ */ +/* $NetBSD: rumpuser_port.h,v 1.32 2014/04/02 17:09:23 justin Exp $ */ /* *
CVS commit: src/sys/kern
Module Name:src Committed By: matt Date: Wed Apr 2 17:19:49 UTC 2014 Modified Files: src/sys/kern: core_elf32.c Log Message: If we are writing PN_XNUM or more phdrs, include one section header and encode the real # of sections in its sh_info. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/kern/core_elf32.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/core_elf32.c diff -u src/sys/kern/core_elf32.c:1.44 src/sys/kern/core_elf32.c:1.45 --- src/sys/kern/core_elf32.c:1.44 Sun Jan 5 09:13:18 2014 +++ src/sys/kern/core_elf32.c Wed Apr 2 17:19:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: core_elf32.c,v 1.44 2014/01/05 09:13:18 dsl Exp $ */ +/* $NetBSD: core_elf32.c,v 1.45 2014/04/02 17:19:49 matt Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.44 2014/01/05 09:13:18 dsl Exp $); +__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.45 2014/04/02 17:19:49 matt Exp $); #ifdef _KERNEL_OPT #include opt_coredump.h @@ -106,6 +106,7 @@ int ELFNAMEEND(coredump)(struct lwp *l, struct coredump_iostate *cookie) { Elf_Ehdr ehdr; + Elf_Shdr shdr; Elf_Phdr *psections; size_t psectionssize; int npsections; @@ -165,14 +166,22 @@ ELFNAMEEND(coredump)(struct lwp *l, stru ehdr.e_machine = ELFDEFNNAME(MACHDEP_ID); ehdr.e_version = EV_CURRENT; ehdr.e_entry = 0; - ehdr.e_phoff = sizeof(ehdr); - ehdr.e_shoff = 0; ehdr.e_flags = 0; ehdr.e_ehsize = sizeof(ehdr); ehdr.e_phentsize = sizeof(Elf_Phdr); - ehdr.e_phnum = npsections; - ehdr.e_shentsize = 0; - ehdr.e_shnum = 0; + if (npsections PN_XNUM) { + ehdr.e_phnum = npsections; + ehdr.e_shentsize = 0; + ehdr.e_shnum = 0; + ehdr.e_shoff = 0; + ehdr.e_phoff = sizeof(ehdr); + } else { + ehdr.e_phnum = PN_XNUM; + ehdr.e_shentsize = sizeof(Elf_Shdr); + ehdr.e_shnum = 1; + ehdr.e_shoff = sizeof(ehdr); + ehdr.e_phoff = sizeof(ehdr) + sizeof(shdr); + } ehdr.e_shstrndx = 0; #ifdef ELF_MD_COREDUMP_SETUP @@ -184,8 +193,19 @@ ELFNAMEEND(coredump)(struct lwp *l, stru if (error) goto out; + /* Write out sections, if needed */ + if (npsections = PN_XNUM) { + memset(shdr, 0, sizeof(shdr)); + shdr.sh_type = SHT_NULL; + shdr.sh_info = npsections; + error = coredump_write(cookie, UIO_SYSSPACE, shdr, + sizeof(shdr)); + if (error) + goto out; + } + psectionssize = npsections * sizeof(*psections); - notestart = sizeof(ehdr) + psectionssize; + notestart = ehdr.e_phoff + psectionssize; psections = kmem_zalloc(psectionssize, KM_SLEEP);
CVS commit: [matt-nb5-mips64] src/sys
Module Name:src Committed By: matt Date: Wed Apr 2 17:34:51 UTC 2014 Modified Files: src/sys/kern [matt-nb5-mips64]: core_elf32.c src/sys/sys [matt-nb5-mips64]: exec_elf.h Log Message: Support coredumps with = 65535 psections. To generate a diff of this commit: cvs rdiff -u -r1.32.16.2 -r1.32.16.3 src/sys/kern/core_elf32.c cvs rdiff -u -r1.95 -r1.95.14.1 src/sys/sys/exec_elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/core_elf32.c diff -u src/sys/kern/core_elf32.c:1.32.16.2 src/sys/kern/core_elf32.c:1.32.16.3 --- src/sys/kern/core_elf32.c:1.32.16.2 Sun Aug 23 03:38:19 2009 +++ src/sys/kern/core_elf32.c Wed Apr 2 17:34:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: core_elf32.c,v 1.32.16.2 2009/08/23 03:38:19 matt Exp $ */ +/* $NetBSD: core_elf32.c,v 1.32.16.3 2014/04/02 17:34:51 matt Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -40,7 +40,11 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.32.16.2 2009/08/23 03:38:19 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: core_elf32.c,v 1.32.16.3 2014/04/02 17:34:51 matt Exp $); + +#ifdef _KERNEL_OPT +#include opt_coredump.h +#endif /* If not included by core_elf64.c, ELFSIZE won't be defined. */ #ifndef ELFSIZE @@ -98,7 +102,8 @@ ELFNAMEEND(coredump)(struct lwp *l, void { struct proc *p; Elf_Ehdr ehdr; - Elf_Phdr phdr, *psections; + Elf_Shdr shdr; + Elf_Phdr *psections; struct countsegs_state cs; struct writesegs_state ws; off_t notestart, secstart, offset; @@ -151,14 +156,22 @@ ELFNAMEEND(coredump)(struct lwp *l, void ehdr.e_machine = ELFDEFNNAME(MACHDEP_ID); ehdr.e_version = EV_CURRENT; ehdr.e_entry = 0; - ehdr.e_phoff = sizeof(ehdr); - ehdr.e_shoff = 0; ehdr.e_flags = 0; ehdr.e_ehsize = sizeof(ehdr); ehdr.e_phentsize = sizeof(Elf_Phdr); - ehdr.e_phnum = cs.npsections; - ehdr.e_shentsize = 0; - ehdr.e_shnum = 0; + if (cs.npsections PN_XNUM) { + ehdr.e_phnum = cs.npsections; + ehdr.e_shentsize = 0; + ehdr.e_shnum = 0; + ehdr.e_shoff = 0; + ehdr.e_phoff = sizeof(ehdr); + } else { + ehdr.e_phnum = PN_XNUM; + ehdr.e_shentsize = sizeof(Elf_Shdr); + ehdr.e_shnum = 1; + ehdr.e_shoff = sizeof(ehdr); + ehdr.e_phoff = sizeof(ehdr) + sizeof(shdr); + } ehdr.e_shstrndx = 0; #ifdef ELF_MD_COREDUMP_SETUP @@ -170,9 +183,20 @@ ELFNAMEEND(coredump)(struct lwp *l, void if (error) goto out; - offset = sizeof(ehdr); + /* Write out sections, if needed */ + if (cs.npsections = PN_XNUM) { + memset(shdr, 0, sizeof(shdr)); + shdr.sh_type = SHT_NULL; + shdr.sh_info = cs.npsections; + error = coredump_write(cookie, UIO_SYSSPACE, shdr, + sizeof(shdr)); + if (error) + goto out; + } + + offset = ehdr.e_phoff; - notestart = offset + sizeof(phdr) * cs.npsections; + notestart = offset + sizeof(Elf_Phdr) * cs.npsections; secstart = notestart + notesize; psections = malloc(cs.npsections * sizeof(Elf_Phdr), Index: src/sys/sys/exec_elf.h diff -u src/sys/sys/exec_elf.h:1.95 src/sys/sys/exec_elf.h:1.95.14.1 --- src/sys/sys/exec_elf.h:1.95 Mon Apr 28 20:24:10 2008 +++ src/sys/sys/exec_elf.h Wed Apr 2 17:34:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.h,v 1.95 2008/04/28 20:24:10 martin Exp $ */ +/* $NetBSD: exec_elf.h,v 1.95.14.1 2014/04/02 17:34:51 matt Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -343,6 +343,9 @@ typedef struct { #define PF_MASKOS 0x0ff0 /* Operating system specific values */ #define PF_MASKPROC 0xf000 /* Processor-specific values */ +/* Extended program header index. */ +#define PN_XNUM 0x + /* * Section Headers */
CVS commit: src/sys/arch/cats
Module Name:src Committed By: skrll Date: Wed Apr 2 17:36:05 UTC 2014 Modified Files: src/sys/arch/cats/cats: cats_machdep.c src/sys/arch/cats/conf: files.cats Log Message: Convert cats to the new world order, i.e. arm32_{bootmem,kernel_vm}_init To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/arch/cats/cats/cats_machdep.c cvs rdiff -u -r1.35 -r1.36 src/sys/arch/cats/conf/files.cats Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cats/cats/cats_machdep.c diff -u src/sys/arch/cats/cats/cats_machdep.c:1.78 src/sys/arch/cats/cats/cats_machdep.c:1.79 --- src/sys/arch/cats/cats/cats_machdep.c:1.78 Wed Apr 2 11:36:50 2014 +++ src/sys/arch/cats/cats/cats_machdep.c Wed Apr 2 17:36:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cats_machdep.c,v 1.78 2014/04/02 11:36:50 matt Exp $ */ +/* $NetBSD: cats_machdep.c,v 1.79 2014/04/02 17:36:05 skrll Exp $ */ /* * Copyright (c) 1997,1998 Mark Brinicombe. @@ -40,7 +40,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cats_machdep.c,v 1.78 2014/04/02 11:36:50 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: cats_machdep.c,v 1.79 2014/04/02 17:36:05 skrll Exp $); #include opt_ddb.h #include opt_modular.h @@ -74,6 +74,8 @@ __KERNEL_RCSID(0, $NetBSD: cats_machdep #include arm/locore.h #include arm/undefined.h #include arm/arm32/machdep.h + +#include machine/pmap.h #include machine/cyclone_boot.h #include arm/footbridge/dc21285mem.h @@ -116,30 +118,11 @@ static char bootargs[MAX_BOOT_STRING + 1 char *boot_args = NULL; char *boot_file = NULL; -vm_offset_t physical_start; -vm_offset_t physical_freestart; -vm_offset_t physical_freeend; -vm_offset_t physical_end; -u_int free_pages; -vm_offset_t pagetables_start; - -vm_offset_t msgbufphys; #ifdef PMAP_DEBUG extern int pmap_debug_level; #endif -#define KERNEL_PT_SYS 0 /* L2 table for mapping zero page */ -#define KERNEL_PT_KERNEL 1 /* L2 table for mapping kernel */ -#define KERNEL_PT_KERNEL_NUM 2 - -/* now this could move into something more generic */ - /* L2 tables for mapping kernel VM */ -#define KERNEL_PT_VMDATA (KERNEL_PT_KERNEL + KERNEL_PT_KERNEL_NUM) -#define KERNEL_PT_VMDATA_NUM 4 /* 16MB kernel VM !*/ -#define NUM_KERNEL_PTS (KERNEL_PT_VMDATA + KERNEL_PT_VMDATA_NUM) - -pv_addr_t kernel_pt_table[NUM_KERNEL_PTS]; /* Prototypes */ @@ -190,88 +173,7 @@ extern void configure(void); int comcnspeed = CONSPEED; int comcnmode = CONMODE; - -/* - * void cpu_reboot(int howto, char *bootstr) - * - * Reboots the system - * - * Deal with any syncing, unmounting, dumping and shutdown hooks, - * then reset the CPU. - */ - -void -cpu_reboot(int howto, char *bootstr) -{ -#ifdef DIAGNOSTIC - /* info */ - printf(boot: howto=%08x curlwp=%p\n, howto, curlwp); -#endif - - /* - * If we are still cold then hit the air brakes - * and crash to earth fast - */ - if (cold) { - doshutdownhooks(); - pmf_system_shutdown(boothowto); - printf(The operating system has halted.\n); - printf(Please press any key to reboot.\n\n); - cngetc(); - printf(rebooting...\n); - cpu_reset(); - /*NOTREACHED*/ - } - - /* Disable console buffering */ -/* cnpollc(1);*/ - - /* - * If RB_NOSYNC was not specified sync the discs. - * Note: Unless cold is set to 1 here, syslogd will die during the unmount. - * It looks like syslogd is getting woken up only to find that it cannot - * page part of the binary in as the filesystem has been unmounted. - */ - if (!(howto RB_NOSYNC)) - bootsync(); - - /* Say NO to interrupts */ - splhigh(); - - /* Do a dump if requested. */ - if ((howto (RB_DUMP | RB_HALT)) == RB_DUMP) - dumpsys(); - - /* Run any shutdown hooks */ - doshutdownhooks(); - - pmf_system_shutdown(boothowto); - - /* Make sure IRQ's are disabled */ - IRQdisable; - - if (howto RB_HALT) { - printf(The operating system has halted.\n); - printf(Please press any key to reboot.\n\n); - cngetc(); - } - - printf(rebooting...\n); - cpu_reset(); - /*NOTREACHED*/ -} - -/* - * Mapping table for core kernel memory. This memory is mapped at init - * time with section mappings. - */ -struct l1_sec_map { - vm_offset_t va; - vm_offset_t pa; - vm_size_t size; - vm_prot_t prot; - int cache; -} l1_sec_table[] = { +static const struct pmap_devmap cats_devmap[] = { /* Map 1MB for CSR space */ { DC21285_ARMCSR_VBASE, DC21285_ARMCSR_BASE, DC21285_ARMCSR_VSIZE, VM_PROT_READ|VM_PROT_WRITE, @@ -310,6 +212,14 @@ struct l1_sec_map { { 0, 0, 0, 0, 0 } }; +#define MAX_PHYSMEM 4 +static struct boot_physmem cats_physmem[MAX_PHYSMEM]; +int ncats_physmem = 0; + +extern struct bus_space footbridge_pci_io_bs_tag; +extern struct bus_space footbridge_pci_mem_bs_tag; +void footbridge_pci_bs_tag_init(void); + /* * u_int initarm(struct ebsaboot *bootinfo) * @@ -328,9 +238,6 @@ u_int initarm(void *arm_bootargs) { struct ebsaboot *bootinfo = arm_bootargs; - int loop; - int
CVS commit: src/sys/kern
Module Name:src Committed By: para Date: Wed Apr 2 18:09:10 UTC 2014 Modified Files: src/sys/kern: subr_vmem.c Log Message: make condition for ENOMEM consistent with allocation requirement To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/kern/subr_vmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_vmem.c diff -u src/sys/kern/subr_vmem.c:1.91 src/sys/kern/subr_vmem.c:1.92 --- src/sys/kern/subr_vmem.c:1.91 Wed Apr 2 16:14:50 2014 +++ src/sys/kern/subr_vmem.c Wed Apr 2 18:09:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_vmem.c,v 1.91 2014/04/02 16:14:50 para Exp $ */ +/* $NetBSD: subr_vmem.c,v 1.92 2014/04/02 18:09:10 para Exp $ */ /*- * Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi, @@ -46,7 +46,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.91 2014/04/02 16:14:50 para Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_vmem.c,v 1.92 2014/04/02 18:09:10 para Exp $); #if defined(_KERNEL) #include opt_ddb.h @@ -262,7 +262,7 @@ bt_refill(vmem_t *vm, vm_flag_t flags) vm-vm_nfreetags++; } - if (vm-vm_nfreetags == 0) { + if (vm-vm_nfreetags = BT_MINRESERVE) { VMEM_UNLOCK(vm); return ENOMEM; }
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Wed Apr 2 19:37:17 UTC 2014 Modified Files: src/sys/rump/kern: Makefile.rumpkerncomp src/sys/rump/kern/lib: Makefile src/sys/rump/kern/lib/libtime: Makefile time_component.c src/sys/rump/librump/rumpkern: Makefile.rumpkern rump.c Log Message: Put nanosleep() and folks in librump instead of maintaining them in the separate rumpkern_time component. Keeping time-related routines elsewhere lead to some illogical behavior if you didn't think of linking in rumpkern_time (hands up everyone who checks the return value of nanosleep()). Add warnings if rumpkern_time is linked or used. I'll remove it in a month or two instead of now since it was part of a buildrump.sh snapshot and it's nicer if trying to use it gives a warning instead of an error in the next snapshot. everything should be as modular as possible, but no more modular than that To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/rump/kern/Makefile.rumpkerncomp cvs rdiff -u -r1.4 -r1.5 src/sys/rump/kern/lib/Makefile cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libtime/Makefile \ src/sys/rump/kern/lib/libtime/time_component.c cvs rdiff -u -r1.141 -r1.142 src/sys/rump/librump/rumpkern/Makefile.rumpkern cvs rdiff -u -r1.291 -r1.292 src/sys/rump/librump/rumpkern/rump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/Makefile.rumpkerncomp diff -u src/sys/rump/kern/Makefile.rumpkerncomp:1.9 src/sys/rump/kern/Makefile.rumpkerncomp:1.10 --- src/sys/rump/kern/Makefile.rumpkerncomp:1.9 Fri Mar 14 01:02:34 2014 +++ src/sys/rump/kern/Makefile.rumpkerncomp Wed Apr 2 19:37:17 2014 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.rumpkerncomp,v 1.9 2014/03/14 01:02:34 pooka Exp $ +# $NetBSD: Makefile.rumpkerncomp,v 1.10 2014/04/02 19:37:17 pooka Exp $ # .include bsd.own.mk -RUMPKERNCOMPS= crypto time tty z +RUMPKERNCOMPS= crypto tty z .if ${MKSLJIT} != no RUMPKERNCOMPS+= sljit Index: src/sys/rump/kern/lib/Makefile diff -u src/sys/rump/kern/lib/Makefile:1.4 src/sys/rump/kern/lib/Makefile:1.5 --- src/sys/rump/kern/lib/Makefile:1.4 Sun Dec 5 16:27:42 2010 +++ src/sys/rump/kern/lib/Makefile Wed Apr 2 19:37:17 2014 @@ -1,8 +1,11 @@ -# $NetBSD: Makefile,v 1.4 2010/12/05 16:27:42 pooka Exp $ +# $NetBSD: Makefile,v 1.5 2014/04/02 19:37:17 pooka Exp $ # .include ${.CURDIR}/../Makefile.rumpkerncomp SUBDIR+= ${RUMPKERNLIBS} +# obsolete and going away soon +SUBDIR+= libtime + .include bsd.subdir.mk Index: src/sys/rump/kern/lib/libtime/Makefile diff -u src/sys/rump/kern/lib/libtime/Makefile:1.1 src/sys/rump/kern/lib/libtime/Makefile:1.2 --- src/sys/rump/kern/lib/libtime/Makefile:1.1 Fri Mar 14 01:02:34 2014 +++ src/sys/rump/kern/lib/libtime/Makefile Wed Apr 2 19:37:17 2014 @@ -1,11 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2014/03/14 01:02:34 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/04/02 19:37:17 pooka Exp $ # .PATH: ${.CURDIR}/../../../../kern LIB= rumpkern_time -SRCS+= kern_time.c SRCS+= time_component.c CPPFLAGS+= -I${RUMPTOP}/librump/rumpkern Index: src/sys/rump/kern/lib/libtime/time_component.c diff -u src/sys/rump/kern/lib/libtime/time_component.c:1.1 src/sys/rump/kern/lib/libtime/time_component.c:1.2 --- src/sys/rump/kern/lib/libtime/time_component.c:1.1 Fri Mar 14 01:02:34 2014 +++ src/sys/rump/kern/lib/libtime/time_component.c Wed Apr 2 19:37:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: time_component.c,v 1.1 2014/03/14 01:02:34 pooka Exp $ */ +/* $NetBSD: time_component.c,v 1.2 2014/04/02 19:37:17 pooka Exp $ */ /* * Copyright (c) 2014 Antti Kantee. All Rights Reserved. @@ -26,16 +26,17 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: time_component.c,v 1.1 2014/03/14 01:02:34 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: time_component.c,v 1.2 2014/04/02 19:37:17 pooka Exp $); #include sys/param.h #include sys/timevar.h #include rump_private.h +void rumpkern_time_is_obsolete(void); + RUMP_COMPONENT(RUMP_COMPONENT_KERN) { - time_init(); - time_init2(); + rumpkern_time_is_obsolete(); } Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.141 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.142 --- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.141 Sat Mar 15 15:22:42 2014 +++ src/sys/rump/librump/rumpkern/Makefile.rumpkern Wed Apr 2 19:37:17 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.rumpkern,v 1.141 2014/03/15 15:22:42 pooka Exp $ +# $NetBSD: Makefile.rumpkern,v 1.142 2014/04/02 19:37:17 pooka Exp $ # .include ${RUMPTOP}/Makefile.rump @@ -92,6 +92,7 @@ SRCS+= init_sysctl_base.c \ kern_syscall.c \ kern_sysctl.c \ kern_tc.c \ + kern_time.c \ kern_timeout.c \ kern_uidinfo.c \ kern_xxx.c \ Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.291
CVS commit: src/sys/rump/net/lib/libvirtif
Module Name:src Committed By: pooka Date: Wed Apr 2 19:44:15 UTC 2014 Modified Files: src/sys/rump/net/lib/libvirtif: if_virt.c Log Message: use if_initname() instead of homegrown sprintf To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/rump/net/lib/libvirtif/if_virt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libvirtif/if_virt.c diff -u src/sys/rump/net/lib/libvirtif/if_virt.c:1.46 src/sys/rump/net/lib/libvirtif/if_virt.c:1.47 --- src/sys/rump/net/lib/libvirtif/if_virt.c:1.46 Thu Mar 20 20:42:08 2014 +++ src/sys/rump/net/lib/libvirtif/if_virt.c Wed Apr 2 19:44:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_virt.c,v 1.46 2014/03/20 20:42:08 christos Exp $ */ +/* $NetBSD: if_virt.c,v 1.47 2014/04/02 19:44:15 pooka Exp $ */ /* * Copyright (c) 2008, 2013 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_virt.c,v 1.46 2014/03/20 20:42:08 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: if_virt.c,v 1.47 2014/04/02 19:44:15 pooka Exp $); #include sys/param.h #include sys/kernel.h @@ -109,7 +109,8 @@ virtif_clone(struct if_clone *ifc, int n sc = kmem_zalloc(sizeof(*sc), KM_SLEEP); sc-sc_num = num; ifp = sc-sc_ec.ec_if; - snprintf(ifp-if_xname, sizeof(ifp-if_xname), %s%d, VIF_NAME, num); + + if_initname(ifp, VIF_NAME, num); ifp-if_softc = sc; ifp-if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
CVS commit: src/bin/ls
Module Name:src Committed By: wiz Date: Wed Apr 2 19:54:30 UTC 2014 Modified Files: src/bin/ls: ls.1 Log Message: Wording improvement for previous. From jmc@OpenBSD via Igor Sobrado. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/bin/ls/ls.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ls/ls.1 diff -u src/bin/ls/ls.1:1.76 src/bin/ls/ls.1:1.77 --- src/bin/ls/ls.1:1.76 Wed Apr 2 10:55:47 2014 +++ src/bin/ls/ls.1 Wed Apr 2 19:54:30 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: ls.1,v 1.76 2014/04/02 10:55:47 wiz Exp $ +.\ $NetBSD: ls.1,v 1.77 2014/04/02 19:54:30 wiz Exp $ .\ .\ Copyright (c) 1980, 1990, 1991, 1993, 1994 .\ The Regents of the University of California. All rights reserved. @@ -127,7 +127,7 @@ after each that is a .Tn FIFO . .It Fl f Output is not sorted. -This option turns on +This option implies .Fl a . .It Fl g The same as
CVS commit: src/crypto/external/bsd/openssl/dist/crypto
Module Name:src Committed By: tron Date: Wed Apr 2 20:27:28 UTC 2014 Modified Files: src/crypto/external/bsd/openssl/dist/crypto/bn: bn.h bn_lib.c src/crypto/external/bsd/openssl/dist/crypto/ec: ec2_mult.c Log Message: Add fix for CVE-2014-0076 taken from OpenSSL GIT repository: Fix for the attack described in the paper Recovering OpenSSL ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack by Yuval Yarom and Naomi Benger. Details can be obtained from: http://eprint.iacr.org/2014/140 To generate a diff of this commit: cvs rdiff -u -r1.1.1.3 -r1.2 \ src/crypto/external/bsd/openssl/dist/crypto/bn/bn.h cvs rdiff -u -r1.1.1.2 -r1.2 \ src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lib.c cvs rdiff -u -r1.1.1.3 -r1.2 \ src/crypto/external/bsd/openssl/dist/crypto/ec/ec2_mult.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/dist/crypto/bn/bn.h diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/bn.h:1.1.1.3 src/crypto/external/bsd/openssl/dist/crypto/bn/bn.h:1.2 --- src/crypto/external/bsd/openssl/dist/crypto/bn/bn.h:1.1.1.3 Thu Jul 26 15:00:10 2012 +++ src/crypto/external/bsd/openssl/dist/crypto/bn/bn.h Wed Apr 2 20:27:28 2014 @@ -538,6 +538,8 @@ BIGNUM *BN_mod_inverse(BIGNUM *ret, BIGNUM *BN_mod_sqrt(BIGNUM *ret, const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx); +void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords); + /* Deprecated versions */ #ifndef OPENSSL_NO_DEPRECATED BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe, @@ -774,11 +776,20 @@ int RAND_pseudo_bytes(unsigned char *buf #define bn_fix_top(a) bn_check_top(a) +#define bn_check_size(bn, bits) bn_wcheck_size(bn, ((bits+BN_BITS2-1))/BN_BITS2) +#define bn_wcheck_size(bn, words) \ + do { \ + const BIGNUM *_bnum2 = (bn); \ + assert(words = (_bnum2)-dmax words = (_bnum2)-top); \ + } while(0) + #else /* !BN_DEBUG */ #define bn_pollute(a) #define bn_check_top(a) #define bn_fix_top(a) bn_correct_top(a) +#define bn_check_size(bn, bits) +#define bn_wcheck_size(bn, words) #endif Index: src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lib.c diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lib.c:1.1.1.2 src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lib.c:1.2 --- src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lib.c:1.1.1.2 Sun Jun 5 14:57:56 2011 +++ src/crypto/external/bsd/openssl/dist/crypto/bn/bn_lib.c Wed Apr 2 20:27:28 2014 @@ -824,3 +824,55 @@ int bn_cmp_part_words(const BN_ULONG *a, } return bn_cmp_words(a,b,cl); } + +/* + * Constant-time conditional swap of a and b. + * a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set. + * nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b, + * and that no more than nwords are used by either a or b. + * a and b cannot be the same number + */ +void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords) + { + BN_ULONG t; + int i; + + bn_wcheck_size(a, nwords); + bn_wcheck_size(b, nwords); + + assert(a != b); + assert((condition (condition - 1)) == 0); + assert(sizeof(BN_ULONG) = sizeof(int)); + + condition = ((condition - 1) (BN_BITS2 - 1)) - 1; + + t = (a-top^b-top) condition; + a-top ^= t; + b-top ^= t; + +#define BN_CONSTTIME_SWAP(ind) \ + do { \ + t = (a-d[ind] ^ b-d[ind]) condition; \ + a-d[ind] ^= t; \ + b-d[ind] ^= t; \ + } while (0) + + + switch (nwords) { + default: + for (i = 10; i nwords; i++) + BN_CONSTTIME_SWAP(i); + /* Fallthrough */ + case 10: BN_CONSTTIME_SWAP(9); /* Fallthrough */ + case 9: BN_CONSTTIME_SWAP(8); /* Fallthrough */ + case 8: BN_CONSTTIME_SWAP(7); /* Fallthrough */ + case 7: BN_CONSTTIME_SWAP(6); /* Fallthrough */ + case 6: BN_CONSTTIME_SWAP(5); /* Fallthrough */ + case 5: BN_CONSTTIME_SWAP(4); /* Fallthrough */ + case 4: BN_CONSTTIME_SWAP(3); /* Fallthrough */ + case 3: BN_CONSTTIME_SWAP(2); /* Fallthrough */ + case 2: BN_CONSTTIME_SWAP(1); /* Fallthrough */ + case 1: BN_CONSTTIME_SWAP(0); + } +#undef BN_CONSTTIME_SWAP +} Index: src/crypto/external/bsd/openssl/dist/crypto/ec/ec2_mult.c diff -u src/crypto/external/bsd/openssl/dist/crypto/ec/ec2_mult.c:1.1.1.3 src/crypto/external/bsd/openssl/dist/crypto/ec/ec2_mult.c:1.2 --- src/crypto/external/bsd/openssl/dist/crypto/ec/ec2_mult.c:1.1.1.3 Thu Jul 26 15:01:20 2012 +++ src/crypto/external/bsd/openssl/dist/crypto/ec/ec2_mult.c Wed Apr 2 20:27:28 2014 @@ -208,11 +208,15 @@ static int gf2m_Mxy(const EC_GROUP *grou return ret; } + /* Computes scalar*point and stores the result in r. * point can not equal r. - * Uses algorithm 2P of + * Uses a modified algorithm 2P of * Lopez, J. and Dahab, R. Fast multiplication on elliptic curves over * GF(2^m) without precomputation (CHES '99, LNCS 1717). + * + * To protect against
CVS commit: src/sys/lib/libunwind
Module Name:src Committed By: joerg Date: Wed Apr 2 22:22:37 UTC 2014 Modified Files: src/sys/lib/libunwind: AddressSpace.hpp Log Message: SH3 uses unaligned data in the .eh_frame section, so use memcpy. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libunwind/AddressSpace.hpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libunwind/AddressSpace.hpp diff -u src/sys/lib/libunwind/AddressSpace.hpp:1.3 src/sys/lib/libunwind/AddressSpace.hpp:1.4 --- src/sys/lib/libunwind/AddressSpace.hpp:1.3 Wed Mar 12 22:50:59 2014 +++ src/sys/lib/libunwind/AddressSpace.hpp Wed Apr 2 22:22:37 2014 @@ -69,13 +69,29 @@ public: pthread_rwlock_init(fdeTreeLock, NULL); } - uint8_t get8(pint_t addr) { return *((uint8_t *)addr); } + uint8_t get8(pint_t addr) { +uint8_t val; +memcpy(val, (void *)addr, sizeof(val)); +return val; + } - uint16_t get16(pint_t addr) { return *((uint16_t *)addr); } + uint16_t get16(pint_t addr) { +uint16_t val; +memcpy(val, (void *)addr, sizeof(val)); +return val; + } - uint32_t get32(pint_t addr) { return *((uint32_t *)addr); } + uint32_t get32(pint_t addr) { +uint32_t val; +memcpy(val, (void *)addr, sizeof(val)); +return val; + } - uint64_t get64(pint_t addr) { return *((uint64_t *)addr); } + uint64_t get64(pint_t addr) { +uint64_t val; +memcpy(val, (void *)addr, sizeof(val)); +return val; + } uintptr_t getP(pint_t addr) { if (sizeof(uintptr_t) == sizeof(uint32_t))
CVS commit: src
Module Name:src Committed By: joerg Date: Wed Apr 2 22:34:29 UTC 2014 Modified Files: src/share/mk: bsd.own.mk src/sys/lib/libunwind: Registers.hpp libunwind.cxx unwind_registers.S Log Message: Support SH3 in our unwinder. To generate a diff of this commit: cvs rdiff -u -r1.792 -r1.793 src/share/mk/bsd.own.mk cvs rdiff -u -r1.7 -r1.8 src/sys/lib/libunwind/Registers.hpp \ src/sys/lib/libunwind/unwind_registers.S cvs rdiff -u -r1.6 -r1.7 src/sys/lib/libunwind/libunwind.cxx Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.792 src/share/mk/bsd.own.mk:1.793 --- src/share/mk/bsd.own.mk:1.792 Tue Mar 25 09:52:55 2014 +++ src/share/mk/bsd.own.mk Wed Apr 2 22:34:29 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.792 2014/03/25 09:52:55 ozaki-r Exp $ +# $NetBSD: bsd.own.mk,v 1.793 2014/04/02 22:34:29 joerg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -101,6 +101,8 @@ HAVE_LIBGCC?= yes _LIBC_UNWIND_SUPPORT.i386= yes _LIBC_UNWIND_SUPPORT.m68k= yes _LIBC_UNWIND_SUPPORT.powerpc= yes +_LIBC_UNWIND_SUPPORT.sh3el= yes +_LIBC_UNWIND_SUPPORT.sh3eb= yes _LIBC_UNWIND_SUPPORT.vax= yes _LIBC_UNWIND_SUPPORT.x86_64= yes .if ${MKLLVM:Uno} == yes ${_LIBC_UNWIND_SUPPORT.${MACHINE_ARCH}:Uno} == yes Index: src/sys/lib/libunwind/Registers.hpp diff -u src/sys/lib/libunwind/Registers.hpp:1.7 src/sys/lib/libunwind/Registers.hpp:1.8 --- src/sys/lib/libunwind/Registers.hpp:1.7 Tue Mar 25 00:00:55 2014 +++ src/sys/lib/libunwind/Registers.hpp Wed Apr 2 22:34:29 2014 @@ -454,6 +454,70 @@ private: fpreg_t fpreg[8]; }; +enum { + DWARF_SH3_R0 = 0, + DWARF_SH3_R15 = 15, + DWARF_SH3_PC = 16, + DWARF_SH3_PR = 17, + + REGNO_SH3_R0 = 0, + REGNO_SH3_R15 = 15, + REGNO_SH3_PC = 16, + REGNO_SH3_PR = 17, +}; + +class Registers_SH3 { +public: + enum { +LAST_REGISTER = REGNO_SH3_PR, +LAST_RESTORE_REG = REGNO_SH3_PR, +RETURN_REG = REGNO_SH3_PR, + }; + + __dso_hidden Registers_SH3(); + + static int dwarf2regno(int num) { +if (num = DWARF_SH3_R0 num = DWARF_SH3_R15) + return REGNO_SH3_R0 + (num - DWARF_SH3_R0); +if (num == DWARF_SH3_PC) + return REGNO_SH3_PC; +if (num == DWARF_SH3_PR) + return REGNO_SH3_PR; +return LAST_REGISTER + 1; + } + + bool validRegister(int num) const { +return num = 0 num = REGNO_SH3_PR; + } + + uint64_t getRegister(int num) const { +assert(validRegister(num)); +return reg[num]; + } + + void setRegister(int num, uint64_t value) { +assert(validRegister(num)); +reg[num] = value; + } + + uint64_t getIP() const { return reg[REGNO_SH3_PC]; } + + void setIP(uint64_t value) { reg[REGNO_SH3_PC] = value; } + + uint64_t getSP() const { return reg[REGNO_SH3_R15]; } + + void setSP(uint64_t value) { reg[REGNO_SH3_R15] = value; } + + bool validFloatVectorRegister(int num) const { return false; } + + void copyFloatVectorRegister(int num, uint64_t addr_) {} + + __dso_hidden void jumpto() const __dead; + +private: + uint32_t reg[REGNO_SH3_PR + 1]; +}; + } // namespace _Unwind #endif // __REGISTERS_HPP__ Index: src/sys/lib/libunwind/unwind_registers.S diff -u src/sys/lib/libunwind/unwind_registers.S:1.7 src/sys/lib/libunwind/unwind_registers.S:1.8 --- src/sys/lib/libunwind/unwind_registers.S:1.7 Tue Mar 25 00:00:55 2014 +++ src/sys/lib/libunwind/unwind_registers.S Wed Apr 2 22:34:29 2014 @@ -364,3 +364,60 @@ ENTRY(_ZNK7_Unwind14Registers_M68K6jumpt rts END(_ZNK7_Unwind14Registers_M68K6jumptoEv) #endif + +#if defined(__sh3__) + .hidden _ZN7_Unwind13Registers_SH3C1Ev +ENTRY(_ZN7_Unwind13Registers_SH3C1Ev) + add #64, r4 + mov.l r8, @-r15 + sts.l pr, @-r15 + mov.l @r15+, r8 + mov.l r8, @r4 + mov.l @r15+, r8 + + mov.l r15, @-r4 + mov.l r14, @-r4 + mov.l r13, @-r4 + mov.l r12, @-r4 + mov.l r11, @-r4 + mov.l r10, @-r4 + mov.l r9, @-r4 + mov.l r8, @-r4 + mov.l r7, @-r4 + mov.l r6, @-r4 + mov.l r5, @-r4 + add #-4, r4 + mov.l r3, @-r4 + mov.l r2, @-r4 + mov.l r1, @-r4 + mov.l r0, @-r4 + rts + mov.l r4, @(16,r4) +SET_ENTRY_SIZE(_ZN7_Unwind13Registers_SH3C1Ev) + + .hidden _ZNK7_Unwind13Registers_SH36jumptoEv +ENTRY(_ZNK7_Unwind13Registers_SH36jumptoEv) + mov r4, r0 + add #4, r0 + mov.l @r0+, r1 + mov.l @r0+, r2 + mov.l @r0+, r3 + mov.l @r0+, r4 + mov.l @r0+, r5 + mov.l @r0+, r6 + mov.l @r0+, r7 + mov.l @r0+, r8 + mov.l @r0+, r9 + mov.l @r0+, r10 + mov.l @r0+, r11 + mov.l @r0+, r12 + mov.l @r0+, r13 + mov.l @(12, r0), r14 + lds r14, pr + mov.l @r0+, r14 + mov.l @r0+, r15 + mov.l @r0, r0 + jmp @r0 + nop +SET_ENTRY_SIZE(_ZNK7_Unwind13Registers_SH36jumptoEv) +#endif Index: src/sys/lib/libunwind/libunwind.cxx diff -u src/sys/lib/libunwind/libunwind.cxx:1.6 src/sys/lib/libunwind/libunwind.cxx:1.7 --- src/sys/lib/libunwind/libunwind.cxx:1.6 Mon Mar 24 21:25:03 2014 +++ src/sys/lib/libunwind/libunwind.cxx Wed Apr 2 22:34:29 2014
CVS commit: src/distrib/utils/embedded/conf
Module Name:src Committed By: ozaki-r Date: Thu Apr 3 01:36:20 UTC 2014 Modified Files: src/distrib/utils/embedded/conf: rpi_inst.conf Log Message: Include evbarm.conf as same as other conf files evbarm.conf ensures ${mnt}/boot exists so that it avoids the error: /home/builds/ab/HEAD/src/distrib/utils/embedded/mkimage: cannot create \ /tmp/mkimage.2a/mnt/boot/cmdline.txt: directory nonexistent To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/distrib/utils/embedded/conf/rpi_inst.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/embedded/conf/rpi_inst.conf diff -u src/distrib/utils/embedded/conf/rpi_inst.conf:1.4 src/distrib/utils/embedded/conf/rpi_inst.conf:1.5 --- src/distrib/utils/embedded/conf/rpi_inst.conf:1.4 Mon Sep 16 15:23:57 2013 +++ src/distrib/utils/embedded/conf/rpi_inst.conf Thu Apr 3 01:36:20 2014 @@ -1,10 +1,12 @@ -# $NetBSD: rpi_inst.conf,v 1.4 2013/09/16 15:23:57 ast Exp $ +# $NetBSD: rpi_inst.conf,v 1.5 2014/04/03 01:36:20 ozaki-r Exp $ # Raspberry Pi customization script used by mkimage # board=rpi_inst kernel=$src/sys/arch/evbarm/compile/RPI/netbsd-RPI_INSTALL.bin +. ${DIR}/conf/evbarm.conf + image=$HOME/${board}.img specialdirs=/kern /proc
CVS commit: src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg
Module Name:src Committed By: riastradh Date: Thu Apr 3 02:40:45 UTC 2014 Modified Files: src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg: Makefile Log Message: Link Xorg with -lpthread on x86. This will be needed by the new xf86-video-intel, which uses pthreads in SNA (SandyBridge New Acceleration). It shouldn't hurt, but is not needed, on any other architecture. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile:1.5 src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile:1.6 --- src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile:1.5 Wed Oct 3 21:50:14 2012 +++ src/external/mit/xorg/server/xorg-server/hw/xfree86/Xorg/Makefile Thu Apr 3 02:40:45 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2012/10/03 21:50:14 gsutre Exp $ +# $NetBSD: Makefile,v 1.6 2014/04/03 02:40:45 riastradh Exp $ .include bsd.own.mk @@ -77,6 +77,12 @@ LDADD+= -lalpha DPADD+= ${LIBALPHA} .endif +.if ${MACHINE_ARCH} == i386 || ${MACHINE_ARCH} == x86_64 +# Needed by current xf86-video-intel for SNA. +LDADD+= -lpthread +DPADD+= ${LIBPTHREAD} +.endif + LDADD+= -lm DPADD+= ${DPADD.dix} \
CVS commit: xsrc/external/mit/xf86-video-intel/dist
Module Name:xsrc Committed By: riastradh Date: Thu Apr 3 02:50:30 UTC 2014 Modified Files: xsrc/external/mit/xf86-video-intel/dist/src/legacy/i810: i810_dri.c Removed Files: xsrc/external/mit/xf86-video-intel/dist: acinclude.m4 xsrc/external/mit/xf86-video-intel/dist/src: brw_defines.h brw_structs.h common.h drmmode_display.c exa_sf.g4a exa_sf.g4b exa_sf_mask.g4a exa_sf_mask.g4b exa_wm.g4i exa_wm_affine.g4i exa_wm_ca.g4a exa_wm_ca.g4b exa_wm_ca_srcalpha.g4a exa_wm_ca_srcalpha.g4b exa_wm_mask_affine.g4a exa_wm_mask_affine.g4b exa_wm_mask_projective.g4a exa_wm_mask_projective.g4b exa_wm_mask_sample_a.g4a exa_wm_mask_sample_a.g4b exa_wm_mask_sample_argb.g4a exa_wm_mask_sample_argb.g4b exa_wm_noca.g4a exa_wm_noca.g4b exa_wm_projective.g4i exa_wm_src_affine.g4a exa_wm_src_affine.g4b exa_wm_src_projective.g4a exa_wm_src_projective.g4b exa_wm_src_sample_a.g4a exa_wm_src_sample_a.g4b exa_wm_src_sample_argb.g4a exa_wm_src_sample_argb.g4b exa_wm_src_sample_planar.g4a exa_wm_src_sample_planar.g4b exa_wm_write.g4a exa_wm_write.g4b exa_wm_xy.g4a exa_wm_xy.g4b exa_wm_yuv_rgb.g4a exa_wm_yuv_rgb.g4b i2c_vid.h i810.h i810_accel.c i810_common.h i810_cursor.c i810_dga.c i810_dri.c i810_dri.h i810_driver.c i810_hwmc.c i810_io.c i810_memory.c i810_reg.h i810_ring.h i810_video.c i810_wmark.c i830.h i830_3d.c i830_accel.c i830_batchbuffer.c i830_batchbuffer.h i830_bios.c i830_bios.h i830_common.h i830_crt.c i830_cursor.c i830_debug.c i830_debug.h i830_display.c i830_display.h i830_dri.c i830_dri.h i830_driver.c i830_dvo.c i830_exa.c i830_hdmi.c i830_hwmc.c i830_hwmc.h i830_i2c.c i830_io.c i830_lvds.c i830_memory.c i830_modes.c i830_quirks.c i830_reg.h i830_render.c i830_ring.h i830_sdvo.c i830_sdvo.h i830_sdvo_regs.h i830_tv.c i830_video.c i830_video.h i830_xaa.c i915_3d.c i915_3d.h i915_hwmc.c i915_hwmc.h i915_reg.h i915_render.c i915_video.c i965_hwmc.c i965_hwmc.h i965_render.c i965_video.c local_xf86Rename.h packed_yuv_sf.g4a packed_yuv_sf.g4b packed_yuv_wm.g4a packed_yuv_wm.g4b xsrc/external/mit/xf86-video-intel/dist/src/bios_reader: Makefile.am Makefile.in bios_dumper.c bios_reader.c swf_dumper.c xsrc/external/mit/xf86-video-intel/dist/src/ch7017: Makefile.am Makefile.in ch7017.c ch7017_module.c ch7017_reg.h xsrc/external/mit/xf86-video-intel/dist/src/ch7xxx: Makefile.am Makefile.in ch7xxx.c ch7xxx.h ch7xxx_module.c ch7xxx_reg.h xsrc/external/mit/xf86-video-intel/dist/src/ivch: Makefile.am Makefile.in ivch.c ivch_module.c ivch_reg.h xsrc/external/mit/xf86-video-intel/dist/src/modes: xf86Crtc.c xf86Crtc.h xf86Cursors.c xf86DiDGA.c xf86EdidModes.c xf86Modes.c xf86Modes.h xf86RandR12.c xf86RandR12.h xf86Rename.h xf86Rotate.c xf86cvt.c xsrc/external/mit/xf86-video-intel/dist/src/parser: xf86Optrec.h xf86Parser.h xsrc/external/mit/xf86-video-intel/dist/src/reg_dumper: Makefile.am Makefile.in gtt.c hotplug.c idle.c main.c reg_dumper.h statuspage.c stepping.c util.c xprintf.c xsrc/external/mit/xf86-video-intel/dist/src/sil164: Makefile.am Makefile.in sil164.c sil164.h sil164_module.c sil164_reg.h xsrc/external/mit/xf86-video-intel/dist/src/tfp410: Makefile.am Makefile.in tfp410.c tfp410.h tfp410_module.c tfp410_reg.h xsrc/external/mit/xf86-video-intel/dist/src/xvmc: I810XvMC.c I810XvMC.h Makefile.am Makefile.in addidct.g4i block_clear.g4i dual_prime.g4a dual_prime.g4b dual_prime_igd.g4a dual_prime_igd.g4b field_backward.g4a field_backward.g4b field_backward_igd.g4a field_backward_igd.g4b field_f_b.g4a field_f_b.g4b field_f_b_igd.g4a field_f_b_igd.g4b field_forward.g4a field_forward.g4b field_forward_igd.g4a field_forward_igd.g4b frame_backward.g4a frame_backward.g4b frame_backward_igd.g4a frame_backward_igd.g4b frame_f_b.g4a frame_f_b.g4b frame_f_b_igd.g4a frame_f_b_igd.g4b frame_forward.g4a frame_forward.g4b frame_forward_igd.g4a frame_forward_igd.g4b i915_program.h i915_structs.h i915_xvmc.c i915_xvmc.h i965_xvmc.c i965_xvmc.h intel_batchbuffer.c intel_batchbuffer.h intel_xvmc.c intel_xvmc.h intel_xvmc_dump.c ipicture.g4a ipicture.g4b motion_field_uv.g4i motion_field_y.g4i motion_frame_uv.g4i motion_frame_y.g4i null.g4a null.g4b read_field_x0y0_uv.g4i read_field_x0y0_uv_igd.g4i read_field_x0y0_y.g4i read_field_x0y0_y_igd.g4i
CVS commit: src
Module Name:src Committed By: riastradh Date: Thu Apr 3 02:51:20 UTC 2014 Modified Files: src/distrib/sets/lists/xdebug: md.amd64 md.i386 src/distrib/sets/lists/xserver: md.amd64 md.i386 src/external/mit/xorg/lib/libI810XvMC: Makefile src/external/mit/xorg/lib/libIntelXvMC: Makefile src/external/mit/xorg/server/drivers/xf86-video-intel: Makefile Log Message: Update reachover makefiles and set lists for xf86-video-intel 2.21.15. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/xdebug/md.amd64 \ src/distrib/sets/lists/xdebug/md.i386 cvs rdiff -u -r1.72 -r1.73 src/distrib/sets/lists/xserver/md.amd64 cvs rdiff -u -r1.91 -r1.92 src/distrib/sets/lists/xserver/md.i386 cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/lib/libI810XvMC/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/lib/libIntelXvMC/Makefile cvs rdiff -u -r1.11 -r1.12 \ src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/xdebug/md.amd64 diff -u src/distrib/sets/lists/xdebug/md.amd64:1.5 src/distrib/sets/lists/xdebug/md.amd64:1.6 --- src/distrib/sets/lists/xdebug/md.amd64:1.5 Wed Jun 5 06:27:51 2013 +++ src/distrib/sets/lists/xdebug/md.amd64 Thu Apr 3 02:51:19 2014 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.5 2013/06/05 06:27:51 mrg Exp $ +# $NetBSD: md.amd64,v 1.6 2014/04/03 02:51:19 riastradh Exp $ ./usr/X11R7/lib/libI810XvMC_g.a-unknown- debuglib,xorg ./usr/X11R7/lib/libIntelXvMC_g.a -unknown- debuglib,xorg ./usr/X11R7/lib/libchromeXvMCPro_g.a -unknown- debuglib,xorg @@ -82,8 +82,8 @@ ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ark_drv.so.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ast_drv.so.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ati_drv.so.6.debug -unknown- xorg,debug -./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7017_drv.so.2.debug -unknown- xorg,debug -./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7xxx_drv.so.2.debug -unknown- xorg,debug +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7017_drv.so.2.debug -unknown- xorg,debug,obsolete +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ch7xxx_drv.so.2.debug -unknown- xorg,debug,obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/chips_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/cirrus_alpine.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/cirrus_drv.so.1.debug -unknown- xorg,debug @@ -92,7 +92,7 @@ ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/i128_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/i740_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/intel_drv.so.2.debug -unknown- xorg,debug -./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ivch_drv.so.2.debug -unknown- xorg,debug +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ivch_drv.so.2.debug -unknown- xorg,debug,obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/kbd_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libapm_drv.so.1.debug obsolete xorg,obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libark_drv.so.0.debug obsolete xorg,obsolete @@ -150,11 +150,11 @@ ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/s3_drv.so.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/s3virge_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/savage_drv.so.2.debug -unknown- xorg,debug -./usr/libdata/debug/usr/X11R7/lib/modules/drivers/sil164_drv.so.2.debug -unknown- xorg,debug +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/sil164_drv.so.2.debug -unknown- xorg,debug,obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/siliconmotion_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/sis_drv.so.0.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tdfx_drv.so.1.debug -unknown- xorg,debug -./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tfp410_drv.so.2.debug -unknown- xorg,debug +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tfp410_drv.so.2.debug -unknown- xorg,debug,obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tga_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/trident_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/tseng_drv.so.1.debug -unknown- xorg,debug Index: src/distrib/sets/lists/xdebug/md.i386 diff -u src/distrib/sets/lists/xdebug/md.i386:1.5 src/distrib/sets/lists/xdebug/md.i386:1.6 --- src/distrib/sets/lists/xdebug/md.i386:1.5 Wed Jun 5 06:27:51 2013 +++
CVS commit: xsrc/external/mit/xf86-video-intel/dist/src/sna
Module Name:xsrc Committed By: riastradh Date: Thu Apr 3 03:59:19 UTC 2014 Modified Files: xsrc/external/mit/xf86-video-intel/dist/src/sna: kgem.c Log Message: Use drmMap rather than mmap directly, to invoke the ioctl on NetBSD. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c diff -u xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c:1.1.1.1 xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c:1.2 --- xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c:1.1.1.1 Fri Mar 21 22:42:41 2014 +++ xsrc/external/mit/xf86-video-intel/dist/src/sna/kgem.c Thu Apr 3 03:59:19 2014 @@ -322,6 +322,7 @@ static void *__kgem_bo_map__gtt(struct k { struct drm_i915_gem_mmap_gtt mmap_arg; void *ptr; + int err; DBG((%s(handle=%d, size=%d)\n, __FUNCTION__, bo-handle, bytes(bo))); @@ -333,7 +334,7 @@ retry_gtt: VG_CLEAR(mmap_arg); mmap_arg.handle = bo-handle; if (drmIoctl(kgem-fd, DRM_IOCTL_I915_GEM_MMAP_GTT, mmap_arg)) { - int err = errno; + err = errno; assert(err != EINVAL); @@ -352,11 +353,8 @@ retry_gtt: } retry_mmap: - ptr = mmap(0, bytes(bo), PROT_READ | PROT_WRITE, MAP_SHARED, - kgem-fd, mmap_arg.offset); - if (ptr == MAP_FAILED) { - int err = errno; - + err = -drmMap(kgem-fd, mmap_arg.offset, bytes(bo), ptr); + if (err) { assert(err != EINVAL); if (__kgem_throttle_retire(kgem, 0))
CVS commit: src/sys/external/bsd/drm2
Module Name:src Committed By: riastradh Date: Thu Apr 3 05:48:02 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm: drm_bufs.c src/sys/external/bsd/drm2/drm: drm_fops.c Log Message: Fix up removal of _DRM_SHM mappings and the hardware lock. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/dist/drm/drm_bufs.c cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/drm/drm_fops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/drm_bufs.c diff -u src/sys/external/bsd/drm2/dist/drm/drm_bufs.c:1.2 src/sys/external/bsd/drm2/dist/drm/drm_bufs.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/drm_bufs.c:1.2 Tue Mar 18 18:20:42 2014 +++ src/sys/external/bsd/drm2/dist/drm/drm_bufs.c Thu Apr 3 05:48:02 2014 @@ -496,7 +496,7 @@ int drm_rmmap_locked(struct drm_device * } break; case _DRM_SHM: - if (master) { + if (master (map-flags _DRM_CONTAINS_LOCK)) { spin_lock(master-lock.spinlock); /* * If we successfully removed this mapping, Index: src/sys/external/bsd/drm2/drm/drm_fops.c diff -u src/sys/external/bsd/drm2/drm/drm_fops.c:1.2 src/sys/external/bsd/drm2/drm/drm_fops.c:1.3 --- src/sys/external/bsd/drm2/drm/drm_fops.c:1.2 Tue Mar 18 18:20:42 2014 +++ src/sys/external/bsd/drm2/drm/drm_fops.c Thu Apr 3 05:48:02 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_fops.c,v 1.2 2014/03/18 18:20:42 riastradh Exp $ */ +/* $NetBSD: drm_fops.c,v 1.3 2014/04/03 05:48:02 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: drm_fops.c,v 1.2 2014/03/18 18:20:42 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: drm_fops.c,v 1.3 2014/04/03 05:48:02 riastradh Exp $); #include drm/drmP.h @@ -315,7 +315,6 @@ drm_close_file_master(struct drm_file *f mutex_lock(dev-struct_mutex); if (file-is_master) { - struct drm_master *const master = file-master; struct drm_file *other_file; list_for_each_entry(other_file, dev-filelist, lhead) { @@ -328,18 +327,6 @@ drm_close_file_master(struct drm_file *f other_file-authenticated = 0; } - spin_lock(master-lock.spinlock); - if (master-lock.hw_lock) { - /* XXX There is copypasta of this in drm_bufs.c. */ - if (dev-sigdata.lock == master-lock.hw_lock) -dev-sigdata.lock = NULL; - master-lock.hw_lock = NULL; - master-lock.file_priv = NULL; - DRM_SPIN_WAKEUP_ALL(master-lock.lock_queue, - master-lock.spinlock); - } - spin_unlock(master-lock.spinlock); - if (file-minor-master == file-master) { if (dev-driver-master_drop) (*dev-driver-master_drop)(dev, file, true);