svn commit: r255294 - in head/lib/msun: . src
Author: theraven Date: Fri Sep 6 07:58:23 2013 New Revision: 255294 URL: http://svnweb.freebsd.org/changeset/base/255294 Log: Add stub implementations of the missing C++11 math functions. These are weak and so can be replaced by other versions in applications that choose to do so, and will give a linker warning when used so that applications that rely on the extra precision can avoid them. Note that since the C/C++ specs only guarantee that long double has precision equal to double, code that actually relies on these functions having greater precision is unportable at best and broken at worst. Added: head/lib/msun/src/imprecise.c (contents, props changed) Modified: head/lib/msun/Makefile head/lib/msun/Symbol.map Modified: head/lib/msun/Makefile == --- head/lib/msun/Makefile Fri Sep 6 05:58:10 2013(r255293) +++ head/lib/msun/Makefile Fri Sep 6 07:58:23 2013(r255294) @@ -53,6 +53,7 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c e_pow.c e_powf.c e_rem_pio2.c \ e_rem_pio2f.c e_remainder.c e_remainderf.c e_scalb.c e_scalbf.c \ e_sinh.c e_sinhf.c e_sqrt.c e_sqrtf.c fenv.c \ + imprecise.c \ k_cos.c k_cosf.c k_exp.c k_expf.c k_rem_pio2.c k_sin.c k_sinf.c \ k_tan.c k_tanf.c \ s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_carg.c s_cargf.c s_cargl.c \ Modified: head/lib/msun/Symbol.map == --- head/lib/msun/Symbol.mapFri Sep 6 05:58:10 2013(r255293) +++ head/lib/msun/Symbol.mapFri Sep 6 07:58:23 2013(r255294) @@ -270,4 +270,13 @@ FBSD_1.3 { log1pl; log2l; logl; + # Implemented as weak aliases for imprecise versions + coshl; + erfcl; + erfl; + lgammal; + powl; + sinhl; + tanhl; + tgammal; }; Added: head/lib/msun/src/imprecise.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/msun/src/imprecise.c Fri Sep 6 07:58:23 2013 (r255294) @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2013 David Chisnall + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include + +/* + * If long double is not the same size as double, then these will lose + * precision and we should emit a warning whenever something links against + * them. + */ +#if (LDBL_MANT_DIG > 53) +#define WARN_IMPRECISE(x) \ + __warn_references(x, # x " has lower than advertised precision"); +#else +#define WARN_IMPRECISE(x) +#endif +/* + * Declare the functions as weak variants so that other libraries providing + * real versions can override them. + */ +#defineDECLARE_WEAK(x)\ + __weak_reference(imprecise_## x, x);\ + WARN_IMPRECISE(x) + +long double +imprecise_powl(long double x, long double y) +{ + + return pow(x, y); +} +DECLARE_WEAK(powl); + +#define DECLARE_IMPRECISE(f) \ + long double imprecise_ ## f ## l(long double v) { return f(v); }\ + DECLARE_WEAK(f ## l) + +DECLARE_IMPRECISE(cosh); +DECLARE_IMPRECISE(erfc); +DECLARE_IMPRECISE(erf); +DECLARE_IMPRECISE(lgamma); +DECLARE_IMPRECISE(sinh); +DECLARE_IMPRECISE(tanh); +DECLARE_IMPRECISE(tgamma); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r254882 - head/sys/dev/pci
Le 03/09/2013 20:10, John Baldwin a écrit : Yes, orm0 is eating it. Try this along with using RF_SHAREABLE in your call to BUS_ALLOC_RESOURCE(): Index: x86/isa/orm.c (...) - res = bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, 0); + res = bus_alloc_resource_any(child, SYS_RES_MEMORY, &rid, + RF_SHAREABLE); I tried this patch + RF_SHAREABLE in vga_pci.c but without success. In the call to BUS_ALLOC_RESOURCE in vga_pci.c, I tried with various "parents"/"grand-parents" but it always returns NULL. -- Jean-Sébastien Pédron ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255273 - in head/sys/powerpc: aim include
On Thu, Sep 05, 2013 at 11:00:24PM +, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Thu Sep 5 23:00:24 2013 > New Revision: 255273 > URL: http://svnweb.freebsd.org/changeset/base/255273 > > Log: > Align stacks of kernel threads correctly at 16-byte boundaries rather than > making sure they are all misaligned at +8 bytes. This fixes clang builds > of powerpc64 kernels (aside from a required increase in KSTACK_PAGES which > will come later). > > This commit from FreeBSD/powerpc64 with a clang-built kernel. The increased KSTACK_PAGES is needed because the kernel you're using is built with O0. I suppose O2 kernel will be fine. Needs to be tested. Anyway, this is a great step forward and I believe PowerPC64 is basically ready to be compiled with clang instead of gcc :) Congrats! Roman ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255296 - head/lib/libc/sys
Author: jilles Date: Fri Sep 6 09:08:40 2013 New Revision: 255296 URL: http://svnweb.freebsd.org/changeset/base/255296 Log: Update some signal man pages for multithreading. Modified: head/lib/libc/sys/sigaction.2 head/lib/libc/sys/sigpending.2 head/lib/libc/sys/sigreturn.2 head/lib/libc/sys/sigwait.2 Modified: head/lib/libc/sys/sigaction.2 == --- head/lib/libc/sys/sigaction.2 Fri Sep 6 08:21:55 2013 (r255295) +++ head/lib/libc/sys/sigaction.2 Fri Sep 6 09:08:40 2013 (r255296) @@ -28,7 +28,7 @@ .\"From: @(#)sigaction.2 8.2 (Berkeley) 4/3/94 .\" $FreeBSD$ .\" -.Dd June 8, 2013 +.Dd September 6, 2013 .Dt SIGACTION 2 .Os .Sh NAME @@ -55,7 +55,7 @@ struct sigaction { .Sh DESCRIPTION The system defines a set of signals that may be delivered to a process. Signal delivery resembles the occurrence of a hardware interrupt: -the signal is normally blocked from further occurrence, the current process +the signal is normally blocked from further occurrence, the current thread context is saved, and a new one is built. A process may specify a .Em handler @@ -64,13 +64,14 @@ to which a signal is delivered, or speci A process may also specify that a default action is to be taken by the system when a signal occurs. A signal may also be -.Em blocked , -in which case its delivery is postponed until it is +.Em blocked +for a thread, +in which case it will not be delivered to that thread until it is .Em unblocked . The action to be taken on delivery is determined at the time of delivery. Normally, signal handlers execute on the current stack -of the process. +of the thread. This may be changed, on a per-handler basis, so that signals are taken on a special .Em "signal stack" . @@ -82,20 +83,30 @@ but other signals may yet occur. A global .Em "signal mask" defines the set of signals currently blocked from delivery -to a process. -The signal mask for a process is initialized +to a thread. +The signal mask for a thread is initialized from that of its parent (normally empty). It may be changed with a .Xr sigprocmask 2 -call, or when a signal is delivered to the process. +or +.Xr pthread_sigmask 3 +call, or when a signal is delivered to the thread. .Pp When a signal -condition arises for a process, the signal is added to a set of -signals pending for the process. -If the signal is not currently +condition arises for a process or thread, the signal is added to a set of +signals pending for the process or thread. +Whether the signal is directed at the process in general or at a specific +thread depends on how it is generated. +For signals directed at a specific thread, +if the signal is not currently .Em blocked -by the process then it is delivered to the process. -Signals may be delivered any time a process enters the operating system +by the thread then it is delivered to the thread. +For signals directed at the process, +if the signal is not currently +.Em blocked +by all threads then it is delivered to one thread that does not have it blocked +(the selection of which is unspecified). +Signals may be delivered any time a thread enters the operating system (e.g., during a system call, page fault or trap, or clock interrupt). If multiple signals are ready to be delivered at the same time, any signals that could be caused by traps are delivered first. @@ -106,17 +117,17 @@ The set of pending signals is returned b .Xr sigpending 2 system call. When a caught signal -is delivered, the current state of the process is saved, +is delivered, the current state of the thread is saved, a new signal mask is calculated (as described below), and the signal handler is invoked. The call to the handler is arranged so that if the signal handling routine returns -normally the process will resume execution in the context +normally the thread will resume execution in the context from before the signal's delivery. -If the process wishes to resume in a different context, then it +If the thread wishes to resume in a different context, then it must arrange to restore the previous context itself. .Pp -When a signal is delivered to a process a new signal mask is +When a signal is delivered to a thread a new signal mask is installed for the duration of the process' signal handler (or until a .Xr sigprocmask 2 @@ -218,7 +229,7 @@ to If this bit is set, the system will deliver the signal to the process on a .Em "signal stack" , -specified with +specified by each thread with .Xr sigaltstack 2 . .It Dv SA_NODEFER If this bit is set, further occurrences of the delivered signal are @@ -272,6 +283,11 @@ However, calls that have already committ but instead return a partial success (for example, a short read count). .Pp After a +.Xr pthread_create 3 +the signal mask is inherited by the new thread and +the set of pending signals and the signal stack for the new thread are empty. +.Pp +After
svn commit: r255297 - in head: include lib/libc/iconv lib/libiconv_modules
Author: theraven Date: Fri Sep 6 09:46:44 2013 New Revision: 255297 URL: http://svnweb.freebsd.org/changeset/base/255297 Log: Fix the namespace pollution caused by iconv.h including stdbool.h This broke any C89 ports that defined bool themselves, including things like gcc, gtk, and so on. Modified: head/include/iconv.h head/lib/libc/iconv/citrus_iconv_local.h head/lib/libiconv_modules/Makefile Modified: head/include/iconv.h == --- head/include/iconv.hFri Sep 6 09:08:40 2013(r255296) +++ head/include/iconv.hFri Sep 6 09:46:44 2013(r255297) @@ -35,7 +35,6 @@ #include #include -#include #include #include @@ -48,6 +47,13 @@ #define libiconv iconv #define libiconv_t iconv_t #endif +#ifdef __cplusplus +typedefbool__iconv_bool; +#elif __STDC_VERSION__ >= 199901L +typedef_Bool __iconv_bool; +#else +typedefint __iconv_bool; +#endif struct __tag_iconv_t; typedefstruct __tag_iconv_t*iconv_t; @@ -61,7 +67,7 @@ int iconv_close(iconv_t); /* * non-portable interfaces for iconv */ -int__iconv_get_list(char ***, size_t *, bool); +int__iconv_get_list(char ***, size_t *, __iconv_bool); void __iconv_free_list(char **, size_t); size_t __iconv(iconv_t, const char **, size_t *, char **, size_t *, __uint32_t, size_t *); Modified: head/lib/libc/iconv/citrus_iconv_local.h == --- head/lib/libc/iconv/citrus_iconv_local.hFri Sep 6 09:08:40 2013 (r255296) +++ head/lib/libc/iconv/citrus_iconv_local.hFri Sep 6 09:46:44 2013 (r255297) @@ -31,6 +31,7 @@ #define _CITRUS_ICONV_LOCAL_H_ #include +#include #define _CITRUS_ICONV_GETOPS_FUNC_BASE(_n_)\ int _n_(struct _citrus_iconv_ops *) Modified: head/lib/libiconv_modules/Makefile == --- head/lib/libiconv_modules/Makefile Fri Sep 6 09:08:40 2013 (r255296) +++ head/lib/libiconv_modules/Makefile Fri Sep 6 09:46:44 2013 (r255297) @@ -2,6 +2,9 @@ .include +CFLAGS+= -Dbool=_Bool +.export CFLAGS + SUBDIR=BIG5 DECHanyu EUC EUCTW GBK2K HZ ISO2022 JOHAB MSKanji UES UTF1632 \ UTF7 UTF8 VIQR ZW iconv_none iconv_std mapper_646 mapper_none \ mapper_parallel mapper_serial mapper_std mapper_zone ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255297 - in head: include lib/libc/iconv lib/libiconv_modules
On Fri, Sep 06, 2013 at 09:46:45AM +, David Chisnall wrote: > --- head/lib/libiconv_modules/MakefileFri Sep 6 09:08:40 2013 > (r255296) > +++ head/lib/libiconv_modules/MakefileFri Sep 6 09:46:44 2013 > (r255297) > @@ -2,6 +2,9 @@ > > .include > > +CFLAGS+= -Dbool=_Bool > +.export CFLAGS > + > SUBDIR= BIG5 DECHanyu EUC EUCTW GBK2K HZ ISO2022 JOHAB MSKanji UES > UTF1632 \ > UTF7 UTF8 VIQR ZW iconv_none iconv_std mapper_646 mapper_none \ > mapper_parallel mapper_serial mapper_std mapper_zone This is extremely rude. Such things are traditionally (and properly) done with Makefile.inc in our tree. Look at the very beginning of mk/bsd.init.mk. But the whole commit is hack. If you want to use C99 _Bool, use it directly instead of obfuscating the code through the build system. pgpsa13juBdOr.pgp Description: PGP signature
svn commit: r255298 - head/lib/libiconv_modules
Author: theraven Date: Fri Sep 6 10:40:38 2013 New Revision: 255298 URL: http://svnweb.freebsd.org/changeset/base/255298 Log: Use Makefile.inc instead of .export. Modified: head/lib/libiconv_modules/Makefile head/lib/libiconv_modules/Makefile.inc Modified: head/lib/libiconv_modules/Makefile == --- head/lib/libiconv_modules/Makefile Fri Sep 6 09:46:44 2013 (r255297) +++ head/lib/libiconv_modules/Makefile Fri Sep 6 10:40:38 2013 (r255298) @@ -2,9 +2,6 @@ .include -CFLAGS+= -Dbool=_Bool -.export CFLAGS - SUBDIR=BIG5 DECHanyu EUC EUCTW GBK2K HZ ISO2022 JOHAB MSKanji UES UTF1632 \ UTF7 UTF8 VIQR ZW iconv_none iconv_std mapper_646 mapper_none \ mapper_parallel mapper_serial mapper_std mapper_zone Modified: head/lib/libiconv_modules/Makefile.inc == --- head/lib/libiconv_modules/Makefile.inc Fri Sep 6 09:46:44 2013 (r255297) +++ head/lib/libiconv_modules/Makefile.inc Fri Sep 6 10:40:38 2013 (r255298) @@ -5,6 +5,9 @@ SHLIB_MAJOR= 4 WARNS?=6 CFLAGS+= -I${.CURDIR}/../../libc/iconv + +CFLAGS+= -Dbool=_Bool + .if !defined(COMPAT_32BIT) SHLIBDIR= /usr/lib/i18n .else ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255297 - in head: include lib/libc/iconv lib/libiconv_modules
On 6 Sep 2013, at 11:36, Konstantin Belousov wrote: > This is extremely rude. Such things are traditionally (and properly) > done with Makefile.inc in our tree. Look at the very beginning of > mk/bsd.init.mk. I was not aware of Makefile.inc, thank you. > But the whole commit is hack. If you want to use C99 _Bool, use it directly > instead of obfuscating the code through the build system. My intent was to minimise diffs from the citrus code. Our iconv.h leaks stdbool.h into c89 files that use it, which is currently breaking around a thousand ports (as would have been detected if there had been an exp run before it was enabled by default). Removing this from the header fixes the ports, but breaks the modules that expect bool to be defined. This was the minimal change that would allow it to continue to build. The more elegant fix would be to modify all of the modules to explicitly include stdbool.h if they wanted to use it, but this would then impose lots more work on whoever does the next import from upstream. David (Who is currently trying to get the ports tree into a useable state for 10.0) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255300 - head/sys/mips/atheros
Author: loos Date: Fri Sep 6 12:47:14 2013 New Revision: 255300 URL: http://svnweb.freebsd.org/changeset/base/255300 Log: Fix the leakage of dma tags on if_arge. The leak occur when arge_start() add some packet(s) to tx ring and arge_stop() is called before receive the sent packet interrupt from hardware. Fix arge_stop() to unload the in use dma tags and free the associated mbuf. PR: 178319, 163670 Approved by: adrian (mentor) Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c == --- head/sys/mips/atheros/if_arge.c Fri Sep 6 12:45:08 2013 (r255299) +++ head/sys/mips/atheros/if_arge.c Fri Sep 6 12:47:14 2013 (r255300) @@ -142,6 +142,7 @@ static int arge_resume(device_t); static int arge_rx_ring_init(struct arge_softc *); static void arge_rx_ring_free(struct arge_softc *sc); static int arge_tx_ring_init(struct arge_softc *); +static void arge_tx_ring_free(struct arge_softc *); #ifdef DEVICE_POLLING static int arge_poll(struct ifnet *, enum poll_cmd, int); #endif @@ -1278,6 +1279,7 @@ arge_stop(struct arge_softc *sc) /* Flush FIFO and free any existing mbufs */ arge_flush_ddr(sc); arge_rx_ring_free(sc); + arge_tx_ring_free(sc); } @@ -1708,6 +1710,30 @@ arge_tx_ring_init(struct arge_softc *sc) } /* + * Free the Tx ring, unload any pending dma transaction and free the mbuf. + */ +static void +arge_tx_ring_free(struct arge_softc *sc) +{ + struct arge_txdesc *txd; + int i; + + /* Free the Tx buffers. */ + for (i = 0; i < ARGE_TX_RING_COUNT; i++) { + txd = &sc->arge_cdata.arge_txdesc[i]; + if (txd->tx_dmamap) { + bus_dmamap_sync(sc->arge_cdata.arge_tx_tag, + txd->tx_dmamap, BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->arge_cdata.arge_tx_tag, + txd->tx_dmamap); + } + if (txd->tx_m) + m_freem(txd->tx_m); + txd->tx_m = NULL; + } +} + +/* * Initialize the RX descriptors and allocate mbufs for them. Note that * we arrange the descriptors in a closed ring, so that the last descriptor * points back to the first. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255301 - head/tools/regression/lib/libc/stdio
Author: jilles Date: Fri Sep 6 12:56:49 2013 New Revision: 255301 URL: http://svnweb.freebsd.org/changeset/base/255301 Log: libc/stdio: Provide proper TAP output for fmemopen/open_[w]memstream. A *.t file should provide Test Anything Protocol output so that it can be run using the Perl "prove" tool. Modified: head/tools/regression/lib/libc/stdio/test-fmemopen.t head/tools/regression/lib/libc/stdio/test-open_memstream.t head/tools/regression/lib/libc/stdio/test-open_wmemstream.t Modified: head/tools/regression/lib/libc/stdio/test-fmemopen.t == --- head/tools/regression/lib/libc/stdio/test-fmemopen.tFri Sep 6 12:47:14 2013(r255300) +++ head/tools/regression/lib/libc/stdio/test-fmemopen.tFri Sep 6 12:56:49 2013(r255301) @@ -7,4 +7,9 @@ executable=`basename $0 .t` make $executable 2>&1 > /dev/null -exec ./$executable +echo 1..1 +if ./$executable; then + echo ok 1 - $executable successful +else + echo not ok 1 - $executable failed +fi Modified: head/tools/regression/lib/libc/stdio/test-open_memstream.t == --- head/tools/regression/lib/libc/stdio/test-open_memstream.t Fri Sep 6 12:47:14 2013(r255300) +++ head/tools/regression/lib/libc/stdio/test-open_memstream.t Fri Sep 6 12:56:49 2013(r255301) @@ -7,4 +7,9 @@ executable=`basename $0 .t` make $executable 2>&1 > /dev/null -exec ./$executable +echo 1..1 +if ./$executable; then + echo ok 1 - $executable successful +else + echo not ok 1 - $executable failed +fi Modified: head/tools/regression/lib/libc/stdio/test-open_wmemstream.t == --- head/tools/regression/lib/libc/stdio/test-open_wmemstream.t Fri Sep 6 12:47:14 2013(r255300) +++ head/tools/regression/lib/libc/stdio/test-open_wmemstream.t Fri Sep 6 12:56:49 2013(r255301) @@ -7,4 +7,9 @@ executable=`basename $0 .t` make $executable 2>&1 > /dev/null -exec ./$executable +echo 1..1 +if ./$executable; then + echo ok 1 - $executable successful +else + echo not ok 1 - $executable failed +fi ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255302 - head/tools/regression/lib/libc/stdio
Author: jilles Date: Fri Sep 6 12:59:48 2013 New Revision: 255302 URL: http://svnweb.freebsd.org/changeset/base/255302 Log: libc/stdio: Run mkostemp test using prove. Added: head/tools/regression/lib/libc/stdio/test-mkostemp.t (contents, props changed) Added: head/tools/regression/lib/libc/stdio/test-mkostemp.t == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/libc/stdio/test-mkostemp.tFri Sep 6 12:59:48 2013(r255302) @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +cd `dirname $0` + +executable=`basename $0 .t` + +make $executable 2>&1 > /dev/null + +exec ./$executable ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255273 - in head/sys/powerpc: aim include
On 09/06/13 03:53, Roman Divacky wrote: On Thu, Sep 05, 2013 at 11:00:24PM +, Nathan Whitehorn wrote: Author: nwhitehorn Date: Thu Sep 5 23:00:24 2013 New Revision: 255273 URL: http://svnweb.freebsd.org/changeset/base/255273 Log: Align stacks of kernel threads correctly at 16-byte boundaries rather than making sure they are all misaligned at +8 bytes. This fixes clang builds of powerpc64 kernels (aside from a required increase in KSTACK_PAGES which will come later). This commit from FreeBSD/powerpc64 with a clang-built kernel. The increased KSTACK_PAGES is needed because the kernel you're using is built with O0. I suppose O2 kernel will be fine. Needs to be tested. Anyway, this is a great step forward and I believe PowerPC64 is basically ready to be compiled with clang instead of gcc :) Congrats! Roman I think you are the one who did all the hard work here, so thanks a great deal. As an update for the list, this is where we currently are for clang/ppc64: 1) We need to update the in-tree clang to a more recent version 2) Kernel and world both appear to work perfectly 3) We need a few minor updates to clang so that we can enable -integrated-as by default, which is important to work around some limitations of our ancient binutils (-g will break as otherwise) 4) KDB currently relies on a deprecated scheme of PPC64 ELF symbol declarations to provide stack traces. We either need to add it to clang or fix KDB to give meaningful output on panics with the default symbol emission strategy. 5) clang/ppc32 is not as advanced and we need to figure out a way to build /usr/lib32. This is a pretty short list of TODOs. Once (1) and (3) are done, we will start encouraging testing of WITH_CLANG_IS_CC (with WITHOUT_LIB32 due to #5). If we can figure out a solution to #5, and nothing untoward happens in testing, WITH_CLANG_IS_CC will become the default on ppc64. Thanks in particular to Roman for working very hard for a very long time to make this happen. -Nathan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255303 - in head: lib/libc/stdio tools/regression/lib/libc/stdio
Author: jilles Date: Fri Sep 6 13:47:16 2013 New Revision: 255303 URL: http://svnweb.freebsd.org/changeset/base/255303 Log: libc/stdio: Allow fopen/freopen modes in any order (except initial r/w/a). Austin Group issue #411 requires 'e' to be accepted before and after 'x', and encourages accepting the characters in any order, except the initial 'r', 'w' or 'a'. Given that glibc accepts the characters after r/w/a in any order and that diagnosing this problem may be hard, change our libc to behave that way as well. Added: head/tools/regression/lib/libc/stdio/test-fopen.c (contents, props changed) head/tools/regression/lib/libc/stdio/test-fopen.t - copied unchanged from r255302, head/tools/regression/lib/libc/stdio/test-mkostemp.t Modified: head/lib/libc/stdio/flags.c Modified: head/lib/libc/stdio/flags.c == --- head/lib/libc/stdio/flags.c Fri Sep 6 12:59:48 2013(r255302) +++ head/lib/libc/stdio/flags.c Fri Sep 6 13:47:16 2013(r255303) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); int __sflags(const char *mode, int *optr) { - int ret, m, o; + int ret, m, o, known; switch (*mode++) { @@ -78,34 +78,35 @@ __sflags(const char *mode, int *optr) return (0); } - /* 'b' (binary) is ignored */ - if (*mode == 'b') - mode++; - - /* [rwa][b]\+ means read and write */ - if (*mode == '+') { - mode++; - ret = __SRW; - m = O_RDWR; - } - - /* 'b' (binary) can appear here, too -- and is ignored again */ - if (*mode == 'b') - mode++; - - /* 'x' means exclusive (fail if the file exists) */ - if (*mode == 'x') { - mode++; - if (m == O_RDONLY) { - errno = EINVAL; - return (0); + do { + known = 1; + switch (*mode++) { + case 'b': + /* 'b' (binary) is ignored */ + break; + case '+': + /* [rwa][b]\+ means read and write */ + ret = __SRW; + m = O_RDWR; + break; + case 'x': + /* 'x' means exclusive (fail if the file exists) */ + o |= O_EXCL; + break; + case 'e': + /* set close-on-exec */ + o |= O_CLOEXEC; + break; + default: + known = 0; + break; } - o |= O_EXCL; - } + } while (known); - /* set close-on-exec */ - if (*mode == 'e') - o |= O_CLOEXEC; + if ((o & O_EXCL) != 0 && m == O_RDONLY) { + errno = EINVAL; + return (0); + } *optr = m | o; return (ret); Added: head/tools/regression/lib/libc/stdio/test-fopen.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/libc/stdio/test-fopen.c Fri Sep 6 13:47:16 2013(r255303) @@ -0,0 +1,113 @@ +/*- + * Copyright (c) 2013 Jilles Tjoelker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +/* + * O_ACCMODE is currently defined incorrectly. This is what it should be. + * Various code depends on the incorrect va
svn commit: r255304 - head/sys/cam/scsi
Author: mav Date: Fri Sep 6 14:31:52 2013 New Revision: 255304 URL: http://svnweb.freebsd.org/changeset/base/255304 Log: Fix kernel panic if cache->nelms is zero. MFC after:2 weeks Modified: head/sys/cam/scsi/scsi_enc_ses.c Modified: head/sys/cam/scsi/scsi_enc_ses.c == --- head/sys/cam/scsi/scsi_enc_ses.cFri Sep 6 13:47:16 2013 (r255303) +++ head/sys/cam/scsi/scsi_enc_ses.cFri Sep 6 14:31:52 2013 (r255304) @@ -567,8 +567,8 @@ ses_cache_free_elm_addlstatus(enc_softc_ return; for (cur_elm = cache->elm_map, -last_elm = &cache->elm_map[cache->nelms - 1]; -cur_elm <= last_elm; cur_elm++) { +last_elm = &cache->elm_map[cache->nelms]; +cur_elm != last_elm; cur_elm++) { ses_element_t *elmpriv; elmpriv = cur_elm->elm_private; @@ -598,8 +598,8 @@ ses_cache_free_elm_descs(enc_softc_t *en return; for (cur_elm = cache->elm_map, -last_elm = &cache->elm_map[cache->nelms - 1]; -cur_elm <= last_elm; cur_elm++) { +last_elm = &cache->elm_map[cache->nelms]; +cur_elm != last_elm; cur_elm++) { ses_element_t *elmpriv; elmpriv = cur_elm->elm_private; @@ -644,8 +644,8 @@ ses_cache_free_elm_map(enc_softc_t *enc, ses_cache_free_elm_descs(enc, cache); ses_cache_free_elm_addlstatus(enc, cache); for (cur_elm = cache->elm_map, -last_elm = &cache->elm_map[cache->nelms - 1]; -cur_elm <= last_elm; cur_elm++) { +last_elm = &cache->elm_map[cache->nelms]; +cur_elm != last_elm; cur_elm++) { ENC_FREE_AND_NULL(cur_elm->elm_private); } @@ -717,8 +717,8 @@ ses_cache_clone(enc_softc_t *enc, enc_ca dst->elm_map = ENC_MALLOCZ(dst->nelms * sizeof(enc_element_t)); memcpy(dst->elm_map, src->elm_map, dst->nelms * sizeof(enc_element_t)); for (dst_elm = dst->elm_map, src_elm = src->elm_map, -last_elm = &src->elm_map[src->nelms - 1]; -src_elm <= last_elm; src_elm++, dst_elm++) { +last_elm = &src->elm_map[src->nelms]; +src_elm != last_elm; src_elm++, dst_elm++) { dst_elm->elm_private = ENC_MALLOCZ(sizeof(ses_element_t)); memcpy(dst_elm->elm_private, src_elm->elm_private, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255305 - head/sys/sys
Author: pjd Date: Fri Sep 6 14:34:20 2013 New Revision: 255305 URL: http://svnweb.freebsd.org/changeset/base/255305 Log: Bump __FreeBSD_version to 153 after cap_rights_t change. Suggested by: danfe Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hFri Sep 6 14:31:52 2013(r255304) +++ head/sys/sys/param.hFri Sep 6 14:34:20 2013(r255305) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 152 /* Master, propagated to newvers */ +#define __FreeBSD_version 153 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensol
On Fri, Sep 06, 2013 at 04:43:54AM +, Alexey Dokuchaev wrote: > On Thu, Sep 05, 2013 at 12:09:57AM +, Pawel Jakub Dawidek wrote: > > Author: pjd > > Date: Thu Sep 5 00:09:56 2013 > > New Revision: 255219 > > URL: http://svnweb.freebsd.org/changeset/base/255219 > > > > Log: > > Change the cap_rights_t type from uint64_t to a structure that we can > > extend > > in the future in a backward compatible (API and ABI) way. > > > > The cap_rights_t represents capability rights. We used to use one bit to > > represent one right, but we are running out of spare bits. Currently the > > new > > structure provides place for 114 rights (so 50 more than the previous > > cap_rights_t), but it is possible to grow the structure to hold at least > > 285 > > rights, although we can make it even larger if 285 rights won't be enough. > > > > The structure definition looks like this: > > > > struct cap_rights { > > uint64_tcr_rights[CAP_RIGHTS_VERSION + 2]; > > }; > > I believe this commit broke nvidia-driver. Fix is trivial; however, I would > have to use OSVERSION from Sep 3rd, since you forgot to update sys/param.h. Bumped, thanks. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com pgpD7_iZrcFD2.pgp Description: PGP signature
svn commit: r255307 - in head: sbin/camcontrol sys/cam/scsi
Author: bryanv Date: Fri Sep 6 15:19:57 2013 New Revision: 255307 URL: http://svnweb.freebsd.org/changeset/base/255307 Log: Add camcontrol support for the SCSI sanitize command Reviewed by: ken, mjacob (eariler version) Sponsored by: Netapp Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_da.h Modified: head/sbin/camcontrol/camcontrol.8 == --- head/sbin/camcontrol/camcontrol.8 Fri Sep 6 15:17:25 2013 (r255306) +++ head/sbin/camcontrol/camcontrol.8 Fri Sep 6 15:19:57 2013 (r255307) @@ -207,6 +207,19 @@ .Op Fl w .Op Fl y .Nm +.Ic sanitize +.Op device id +.Op generic args +.Aq Fl a Ar overwrite | block | crypto | exitfailure +.Op Fl c Ar passes +.Op Fl I +.Op Fl P Ar pattern +.Op Fl q +.Op Fl U +.Op Fl r +.Op Fl w +.Op Fl y +.Nm .Ic idle .Op device id .Op generic args @@ -1088,6 +1101,116 @@ The user will not be asked about the timeout if a timeout is specified on the command line. .El +.It Ic sanitize +Issue the +.Tn SCSI +SANITIZE command to the named device. +.Pp +.Em WARNING! WARNING! WARNING! +.Pp +ALL data in the cache and on the disk will be destroyed or made inaccessible. +Recovery of the data is not possible. +Use extreme caution when issuing this command. +.Pp +The +.Sq sanitize +subcommand takes several arguments that modify its default behavior. +The +.Fl q +and +.Fl y +arguments can be useful for scripts. +.Bl -tag -width 6n +.It Fl a Ar operation +Specify the sanitize operation to perform. +.Bl -tag -width 16n +.It overwrite +Perform an overwrite operation by writing a user supplied +data pattern to the device one or more times. +The pattern is given by the +.Fl P +argument. +The number of times is given by the +.Fl c +argument. +.It block +Perform a block erase operation. +All the device's blocks are set to a vendor defined +value, typically zero. +.It crypto +Perform a cryptographic erase operation. +The encryption keys are changed to prevent the decryption +of the data. +.It exitfailure +Exits a previously failed sanitize operation. +A failed sanitize operation can only be exited if it was +run in the unrestricted completion mode, as provided by the +.Fl U +argument. +.El +.It Fl c Ar passes +The number of passes when performing an +.Sq overwrite +operation. +Valid values are between 1 and 31. The default is 1. +.It Fl I +When performing an +.Sq overwrite +operation, the pattern is inverted between consecutive passes. +.It Fl P Ar pattern +Path to the file containing the pattern to use when +performing an +.Sq overwrite +operation. +The pattern is repeated as needed to fill each block. +.It Fl q +Be quiet, do not print any status messages. +This option will not disable +the questions, however. +To disable questions, use the +.Fl y +argument, below. +.It Fl U +Perform the sanitize in the unrestricted completion mode. +If the operation fails, it can later be exited with the +.Sq exitfailure +operation. +.It Fl r +Run in +.Dq report only +mode. +This will report status on a sanitize that is already running on the drive. +.It Fl w +Issue a non-immediate sanitize command. +By default, +.Nm +issues the SANITIZE command with the immediate bit set. +This tells the +device to immediately return the sanitize command, before +the sanitize has actually completed. +Then, +.Nm +gathers +.Tn SCSI +sense information from the device every second to determine how far along +in the sanitize process it is. +If the +.Fl w +argument is specified, +.Nm +will issue a non-immediate sanitize command, and will be unable to print any +information to let the user know what percentage of the disk has been +sanitized. +.It Fl y +Do not ask any questions. +By default, +.Nm +will ask the user if he/she really wants to sanitize the disk in question, +and also if the default sanitize command timeout is acceptable. +The user +will not be asked about the timeout if a timeout is specified on the +command line. +.El .It Ic idle Put ATA device into IDLE state. Optional parameter .Pq Fl t Modified: head/sbin/camcontrol/camcontrol.c == --- head/sbin/camcontrol/camcontrol.c Fri Sep 6 15:17:25 2013 (r255306) +++ head/sbin/camcontrol/camcontrol.c Fri Sep 6 15:19:57 2013 (r255307) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -93,7 +94,8 @@ typedef enum { CAM_CMD_SMP_MANINFO = 0x001b, CAM_CMD_DOWNLOAD_FW = 0x001c, CAM_CMD_SECURITY= 0x001d, - CAM_CMD_HPA = 0x001e + CAM_CMD_HPA = 0x001e, + CAM_CMD_SANITIZE= 0x001f, } cam_cmdmask; typedef enum { @@ -209,6 +211,7 @@ static struct camcontrol_opts option_tab {"rate", CAM_CMD_RATE, CAM_ARG_NONE, negot
svn commit: r255310 - head/sbin/camcontrol
Author: bryanv Date: Fri Sep 6 16:34:09 2013 New Revision: 255310 URL: http://svnweb.freebsd.org/changeset/base/255310 Log: Add firmware downloading support for Samsung drives Tested on Samsung SM1625 SSDs. Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/fwdownload.c Modified: head/sbin/camcontrol/camcontrol.8 == --- head/sbin/camcontrol/camcontrol.8 Fri Sep 6 15:41:37 2013 (r255309) +++ head/sbin/camcontrol/camcontrol.8 Fri Sep 6 16:34:09 2013 (r255310) @@ -1423,6 +1423,8 @@ PLEXTOR .It QUANTUM .It +SAMSUNG +.It SEAGATE .El .Pp Modified: head/sbin/camcontrol/fwdownload.c == --- head/sbin/camcontrol/fwdownload.c Fri Sep 6 15:41:37 2013 (r255309) +++ head/sbin/camcontrol/fwdownload.c Fri Sep 6 16:34:09 2013 (r255310) @@ -77,6 +77,7 @@ typedef enum { VENDOR_PLEXTOR, VENDOR_QUALSTAR, VENDOR_QUANTUM, + VENDOR_SAMSUNG, VENDOR_SEAGATE, VENDOR_UNKNOWN } fw_vendor_t; @@ -98,6 +99,7 @@ static const struct fw_vendor vendors_li {VENDOR_PLEXTOR,"PLEXTOR", 0x2000, 0x04, 0x05, 0, 1}, {VENDOR_QUALSTAR, "QUALSTAR", 0x2030, 0x05, 0x05, 0, 0}, {VENDOR_QUANTUM,"QUANTUM", 0x2000, 0x04, 0x05, 0, 1}, + {VENDOR_SAMSUNG,"SAMSUNG", 0x8000, 0x07, 0x07, 0, 1}, {VENDOR_SEAGATE,"SEAGATE", 0x8000, 0x07, 0x07, 0, 1}, /* the next 2 are SATA disks going through SAS HBA */ {VENDOR_SEAGATE,"ATA ST", 0x8000, 0x07, 0x07, 0, 1}, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255318 - in head/sys: arm/include i386/include mips/include powerpc/include sparc64/include sys
Author: glebius Date: Fri Sep 6 17:44:13 2013 New Revision: 255318 URL: http://svnweb.freebsd.org/changeset/base/255318 Log: Fix build with gcc. Move sf_buf_alloc()/sf_buf_free() declarations to MD headers. Modified: head/sys/arm/include/sf_buf.h head/sys/i386/include/sf_buf.h head/sys/mips/include/sf_buf.h head/sys/powerpc/include/sf_buf.h head/sys/sparc64/include/sf_buf.h head/sys/sys/sf_buf.h Modified: head/sys/arm/include/sf_buf.h == --- head/sys/arm/include/sf_buf.h Fri Sep 6 17:42:12 2013 (r255317) +++ head/sys/arm/include/sf_buf.h Fri Sep 6 17:44:13 2013 (r255318) @@ -40,6 +40,8 @@ struct vm_page; struct sf_buf; +struct sf_buf *sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) Modified: head/sys/i386/include/sf_buf.h == --- head/sys/i386/include/sf_buf.h Fri Sep 6 17:42:12 2013 (r255317) +++ head/sys/i386/include/sf_buf.h Fri Sep 6 17:44:13 2013 (r255318) @@ -45,6 +45,9 @@ struct sf_buf { #endif }; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { Modified: head/sys/mips/include/sf_buf.h == --- head/sys/mips/include/sf_buf.h Fri Sep 6 17:42:12 2013 (r255317) +++ head/sys/mips/include/sf_buf.h Fri Sep 6 17:44:13 2013 (r255318) @@ -78,6 +78,9 @@ struct sf_buf { vm_offset_t kva;/* va of mapping */ }; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { Modified: head/sys/powerpc/include/sf_buf.h == --- head/sys/powerpc/include/sf_buf.h Fri Sep 6 17:42:12 2013 (r255317) +++ head/sys/powerpc/include/sf_buf.h Fri Sep 6 17:44:13 2013 (r255318) @@ -45,6 +45,9 @@ struct sf_buf { int ref_count; /* usage of this mapping */ }; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + /* * On 32-bit OEA, the only purpose for which sf_buf is used is to implement * an opaque pointer required by the machine-independent parts of the kernel. Modified: head/sys/sparc64/include/sf_buf.h == --- head/sys/sparc64/include/sf_buf.h Fri Sep 6 17:42:12 2013 (r255317) +++ head/sys/sparc64/include/sf_buf.h Fri Sep 6 17:44:13 2013 (r255318) @@ -39,6 +39,9 @@ struct sf_buf { vm_offset_t kva;/* va of mapping */ }; +struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); +void sf_buf_free(struct sf_buf *sf); + static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { Modified: head/sys/sys/sf_buf.h == --- head/sys/sys/sf_buf.h Fri Sep 6 17:42:12 2013(r255317) +++ head/sys/sys/sf_buf.h Fri Sep 6 17:44:13 2013(r255318) @@ -65,9 +65,6 @@ extern counter_u64_t sfstat[sizeof(struc #defineSFSTAT_INC(name)SFSTAT_ADD(name, 1) #endif /* _KERNEL */ -struct sf_buf * - sf_buf_alloc(struct vm_page *m, int flags); -void sf_buf_free(struct sf_buf *sf); intsf_buf_mext(struct mbuf *mb, void *addr, void *args); #endif /* !_SYS_SF_BUF_H_ */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255320 - head/sys/dev/hpt27xx
Author: delphij Date: Fri Sep 6 18:41:57 2013 New Revision: 255320 URL: http://svnweb.freebsd.org/changeset/base/255320 Log: Return BUS_PROBE_DEFAULT instead of BUS_PROBE_SPECIFIC. This change is a 9.2-RELEASE candidate. Approved by: HighPoint Technologies Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c == --- head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Sep 6 17:51:52 2013 (r255319) +++ head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Sep 6 18:41:57 2013 (r255320) @@ -52,7 +52,7 @@ static int hpt_probe(device_t dev) memset(hba, 0, sizeof(HBA)); hba->ext_type = EXT_TYPE_HBA; hba->ldm_adapter.him = him; - return 0; + return (BUS_PROBE_DEFAULT); } } } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options
On 09/06/13 15:23, David Chisnall wrote: > On 6 Sep 2013, at 21:11, Nathan Whitehorn wrote: > >> Don't you mean MACHINE here? Otherwise native builds on pc98 will fail >> due to: >> >>> +# The pc98 bootloader requires gcc to build and so we must leave gcc >>> enabled >>> +# for pc98 for now. >>> +.if ${__TT} == "pc98" >>> +__DEFAULT_NO_OPTIONS+=GNUCXX >>> +__DEFAULT_YES_OPTIONS+=GCC >>> +.else >>> +__DEFAULT_NO_OPTIONS+=GCC GNUCXX >>> +.endif >>> >> this section, where __TT will be "i386" when built natively on pc98 >> systems. >> -Nathan > Yes, I think you're right. Thank you. Fixed in 255322. > > David > > Thanks! I ran into one other issue with the patch: c++filt continues to be built, but will be removed by make delete-old, which I guess is not intentional. -Nathan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options
On 6 Sep 2013, at 21:25, Nathan Whitehorn wrote: > Thanks! I ran into one other issue with the patch: c++filt continues to > be built, but will be removed by make delete-old, which I guess is not > intentional. Hmm, no that's not intentional. Why is make delete-old deleting it? David ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255309 - head/sys/cam/scsi
Author: mav Date: Fri Sep 6 15:41:37 2013 New Revision: 255309 URL: http://svnweb.freebsd.org/changeset/base/255309 Log: Make SES driver adequately react on simple enclosure devices -- read Short Enclosure status to enclosure status field, clear previous state and exit. Modified: head/sys/cam/scsi/scsi_enc_ses.c Modified: head/sys/cam/scsi/scsi_enc_ses.c == --- head/sys/cam/scsi/scsi_enc_ses.cFri Sep 6 15:38:40 2013 (r255308) +++ head/sys/cam/scsi/scsi_enc_ses.cFri Sep 6 15:41:37 2013 (r255309) @@ -1555,6 +1555,18 @@ ses_process_status(enc_softc_t *enc, str ENC_VLOG(enc, "Enclosure Status Page Too Long\n"); goto out; } + + /* Check for simple enclosure reporting short enclosure status. */ + if (length >= 4 && page->hdr.page_code == SesShortStatus) { + ENC_DLOG(enc, "Got Short Enclosure Status page\n"); + ses->ses_flags &= ~(SES_FLAG_ADDLSTATUS | SES_FLAG_DESC); + ses_cache_free(enc, enc_cache); + enc_cache->enc_status = page->hdr.page_specific_flags; + enc_update_request(enc, SES_PUBLISH_CACHE); + err = 0; + goto out; + } + /* Make sure the length contains at least one header and status */ if (length < (sizeof(*page) + sizeof(*page->elements))) { ENC_VLOG(enc, "Enclosure Status Page Too Short\n"); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255311 - head/sys/amd64/amd64
Author: kib Date: Fri Sep 6 16:48:34 2013 New Revision: 255311 URL: http://svnweb.freebsd.org/changeset/base/255311 Log: In pmap_ts_referenced(), when restarting the loop due to pv list generation changed, do not drop and immediately relock the pv list. Suggested and reviewed by:alc Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Fri Sep 6 16:34:09 2013(r255310) +++ head/sys/amd64/amd64/pmap.c Fri Sep 6 16:48:34 2013(r255311) @@ -5086,8 +5086,8 @@ pmap_ts_referenced(vm_page_t m) lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); rtval = 0; -retry: rw_wlock(lock); +retry: if ((m->flags & PG_FICTITIOUS) != 0) goto small_mappings; TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, pvn) { @@ -5099,7 +5099,6 @@ retry: rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); goto retry; } } @@ -5154,7 +5153,6 @@ small_mappings: if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); goto retry; } } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255322 - head/share/mk
Author: theraven Date: Fri Sep 6 20:23:15 2013 New Revision: 255322 URL: http://svnweb.freebsd.org/changeset/base/255322 Log: Fix use of MACHINE_ARCH where MACHINE was intended for pc98 detection. Reported by: nwhitehorn Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkFri Sep 6 20:08:03 2013(r255321) +++ head/share/mk/bsd.own.mkFri Sep 6 20:23:15 2013(r255322) @@ -402,7 +402,7 @@ __T=${MACHINE_ARCH} .if defined(TARGET) __TT=${TARGET} .else -__TT=${MACHINE_ARCH} +__TT=${MACHINE} .endif # Clang is only for x86, powerpc and little-endian arm right now, by default. .if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255312 - head/sys/amd64/amd64
Author: kib Date: Fri Sep 6 16:53:48 2013 New Revision: 255312 URL: http://svnweb.freebsd.org/changeset/base/255312 Log: Only lock pvh_global_lock read-only for pmap_page_wired_mappings(), pmap_is_modified() and pmap_is_referenced(), same as it was done for pmap_ts_referenced(). Consolidate identical code for pmap_is_modified() and pmap_is_referenced() into helper pmap_page_test_mappings(). Reviewed by: alc Tested by:pho (previous version) Sponsored by: The FreeBSD Foundation Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Fri Sep 6 16:48:34 2013(r255311) +++ head/sys/amd64/amd64/pmap.c Fri Sep 6 16:53:48 2013(r255312) @@ -315,7 +315,6 @@ static void pmap_pv_promote_pde(pmap_t p static voidpmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va); static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va); -static int pmap_pvh_wired_mappings(struct md_page *pvh, int count); static int pmap_change_attr_locked(vm_offset_t va, vm_size_t size, int mode); static boolean_t pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); @@ -329,8 +328,6 @@ static vm_page_t pmap_enter_quick_locked vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); -static boolean_t pmap_is_modified_pvh(struct md_page *pvh); -static boolean_t pmap_is_referenced_pvh(struct md_page *pvh); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); @@ -4604,42 +4601,61 @@ pmap_page_exists_quick(pmap_t pmap, vm_p int pmap_page_wired_mappings(vm_page_t m) { - int count; - - count = 0; - if ((m->oflags & VPO_UNMANAGED) != 0) - return (count); - rw_wlock(&pvh_global_lock); - count = pmap_pvh_wired_mappings(&m->md, count); - if ((m->flags & PG_FICTITIOUS) == 0) { - count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), - count); - } - rw_wunlock(&pvh_global_lock); - return (count); -} - -/* - * pmap_pvh_wired_mappings: - * - * Return the updated number "count" of managed mappings that are wired. - */ -static int -pmap_pvh_wired_mappings(struct md_page *pvh, int count) -{ + struct rwlock *lock; + struct md_page *pvh; pmap_t pmap; pt_entry_t *pte; pv_entry_t pv; + int count, md_gen, pvh_gen; - rw_assert(&pvh_global_lock, RA_WLOCKED); - TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { + if ((m->oflags & VPO_UNMANAGED) != 0) + return (0); + rw_rlock(&pvh_global_lock); + lock = VM_PAGE_TO_PV_LIST_LOCK(m); + rw_rlock(lock); +restart: + count = 0; + TAILQ_FOREACH(pv, &m->md.pv_list, pv_next) { pmap = PV_PMAP(pv); - PMAP_LOCK(pmap); + if (!PMAP_TRYLOCK(pmap)) { + md_gen = m->md.pv_gen; + rw_runlock(lock); + PMAP_LOCK(pmap); + rw_rlock(lock); + if (md_gen != m->md.pv_gen) { + PMAP_UNLOCK(pmap); + goto restart; + } + } pte = pmap_pte(pmap, pv->pv_va); if ((*pte & PG_W) != 0) count++; PMAP_UNLOCK(pmap); } + if ((m->flags & PG_FICTITIOUS) == 0) { + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); + TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) { + pmap = PV_PMAP(pv); + if (!PMAP_TRYLOCK(pmap)) { + md_gen = m->md.pv_gen; + pvh_gen = pvh->pv_gen; + rw_runlock(lock); + PMAP_LOCK(pmap); + rw_rlock(lock); + if (md_gen != m->md.pv_gen || + pvh_gen != pvh->pv_gen) { + PMAP_UNLOCK(pmap); + goto restart; + } + } + pte = pmap_pde(pmap, pv->pv_va); + if ((*pte & PG_W) != 0) + count++; + PMAP_UNLOCK(pmap); + } + } + rw_runlock(lock); + rw_runlock(&pvh_global_lock); return (count); } @@ -4835,6 +4851,69 @@ pmap_remove_pages(pmap_t pmap) pmap_free_zero_pa
Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options
Will this break cross building on 9.x host? I hit this: c++ -O2 -pipe -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/include -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/tools/clang/include -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support -I. -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd10.0\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd10.0\" -DDEFAULT_SYSROOT=\"\" -I/tank/home/delphij/obj/tank/home/delphij/head/tmp/legacy/usr/include -Wno-c++11-extensions -fno-exceptions -fno-rtti -c /tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/APFloat.cpp -o APFloat.o cc1plus: error: unrecognized command line option "-Wno-c++11-extensions" On Fri, Sep 6, 2013 at 1:08 PM, David Chisnall wrote: > Author: theraven > Date: Fri Sep 6 20:08:03 2013 > New Revision: 255321 > URL: http://svnweb.freebsd.org/changeset/base/255321 > > Log: > On platforms where clang is the default compiler, don't build gcc or > libstdc++. > To enable them, set WITH_GCC and WITH_GNUCXX in src.conf. > Make clang default to using libc++ on FreeBSD 10. > Bumped __FreeBSD_version for the change. > > GCC is still enabled on PC98, because the PC98 bootloader requires GCC to > build > (or, at least, hard-codes the use of gcc into its build). > > Thanks to everyone who helped make the ports tree ready for this (and bapt > for coordinating them all). Also to imp for reviewing this and working on > the > forward-porting of the changes in our gcc so that we're getting to a much > better place with regard to external toolchains. > > Sorry to all of the people who helped who I forgot to mention by name. > > Reviewed by: bapt, imp, dim, ... > > Added: > head/tools/build/options/WITHOUT_GNUCXX (contents, props changed) > head/tools/build/options/WITH_GNUCXX (contents, props changed) > Modified: > head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp > head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h > head/gnu/lib/Makefile > head/gnu/usr.bin/cc/Makefile > head/share/mk/bsd.own.mk > head/sys/sys/param.h > > Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp > == > --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri Sep 6 > 18:41:57 2013(r255320) > +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri Sep 6 > 20:08:03 2013(r255321) > @@ -1851,6 +1851,38 @@ bool FreeBSD::UseSjLjExceptions() const >} > } > > +ToolChain::CXXStdlibType > +FreeBSD::GetCXXStdlibType(const ArgList &Args) const { > + if (Arg *A = Args.getLastArg(options::OPT_stdlib_EQ)) { > +StringRef Value = A->getValue(); > +if (Value == "libc++") > + return ToolChain::CST_Libcxx; > +if (Value == "libstdc++") > + return ToolChain::CST_Libstdcxx; > +getDriver().Diag(diag::err_drv_invalid_stdlib_name) > + << A->getAsString(Args); > + } > + > + return getTriple().getOSMajorVersion() >= 10 ? ToolChain::CST_Libcxx : > + ToolChain::CST_Libstdcxx; > +} > + > +void FreeBSD::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, > + ArgStringList &CC1Args) const { > + if (DriverArgs.hasArg(options::OPT_nostdlibinc) || > + DriverArgs.hasArg(options::OPT_nostdincxx)) > +return; > + > + if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) > +addSystemInclude(DriverArgs, CC1Args, > + getDriver().SysRoot + "/usr/include/c++/v1"); > + else > +addSystemInclude(DriverArgs, CC1Args, > + getDriver().SysRoot + "/usr/include/c++/4.2"); > + return; > + > +} > + > /// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly. > > NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList > &Args) > > Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h > == > --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri Sep 6 > 18:41:57 2013(r255320) > +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri Sep 6 > 20:08:03 2013(r255321) > @@ -458,9 +458,14 @@ class LLVM_LIBRARY_VISIBILITY FreeBSD : > public: >FreeBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); > > + virtual CXXStdlibType GetCXXStdlibType(const ArgList &Args) const; > + >virtual bool IsMathErrnoDefault() const { return false; } >virtual bool IsObjCNonFragileABIDefault() const { return true; } > > + virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, > +
Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options
On 09/06/13 22:08, David Chisnall wrote: > Author: theraven > Date: Fri Sep 6 20:08:03 2013 > New Revision: 255321 > URL: http://svnweb.freebsd.org/changeset/base/255321 > > Log: > On platforms where clang is the default compiler, don't build gcc or > libstdc++. > To enable them, set WITH_GCC and WITH_GNUCXX in src.conf. > Make clang default to using libc++ on FreeBSD 10. > Bumped __FreeBSD_version for the change. Please remember to regenerate src.conf(5), or let me know and I'll fix it. Regards! -- Niclas Zeising ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255324 - head/share/mk
Author: theraven Date: Fri Sep 6 20:42:14 2013 New Revision: 255324 URL: http://svnweb.freebsd.org/changeset/base/255324 Log: Only set -Wno-c++11-extensions if we're building with clang, so bootstrapping clang with gcc doesn't fail. Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk == --- head/share/mk/bsd.own.mkFri Sep 6 20:24:21 2013(r255323) +++ head/share/mk/bsd.own.mkFri Sep 6 20:42:14 2013(r255324) @@ -431,7 +431,10 @@ __DEFAULT_NO_OPTIONS+=GCC GNUCXX # suppression when building the base system to catch bugs in our headers. # Eventually we'll want to start building the base system C++ code as C++11, # but not yet. +_COMPVERSION!= ${CC} --version +.if ${_COMPVERSION:Mclang} CXXFLAGS+= -Wno-c++11-extensions +.endif .else # If clang is not cc, then build gcc by default __DEFAULT_NO_OPTIONS+=CLANG_IS_CC ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options
Thanks for the report. I've now bracketed the extra flag in a check that we're compiling with clang, which should fix it, so let me know if it still breaks for you. David On 6 Sep 2013, at 21:34, Xin LI wrote: > Will this break cross building on 9.x host? I hit this: > > c++ -O2 -pipe > -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/include > -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/tools/clang/include > -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support > -I. > -I/tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/../../lib/clang/include > -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS > -D__STDC_CONSTANT_MACROS -fno-strict-aliasing > -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd10.0\" > -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd10.0\" > -DDEFAULT_SYSROOT=\"\" > -I/tank/home/delphij/obj/tank/home/delphij/head/tmp/legacy/usr/include > -Wno-c++11-extensions -fno-exceptions -fno-rtti -c > /tank/home/delphij/head/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/APFloat.cpp > -o APFloat.o > cc1plus: error: unrecognized command line option "-Wno-c++11-extensions" > > On Fri, Sep 6, 2013 at 1:08 PM, David Chisnall wrote: >> Author: theraven >> Date: Fri Sep 6 20:08:03 2013 >> New Revision: 255321 >> URL: http://svnweb.freebsd.org/changeset/base/255321 >> >> Log: >> On platforms where clang is the default compiler, don't build gcc or >> libstdc++. >> To enable them, set WITH_GCC and WITH_GNUCXX in src.conf. >> Make clang default to using libc++ on FreeBSD 10. >> Bumped __FreeBSD_version for the change. >> >> GCC is still enabled on PC98, because the PC98 bootloader requires GCC to >> build >> (or, at least, hard-codes the use of gcc into its build). >> >> Thanks to everyone who helped make the ports tree ready for this (and bapt >> for coordinating them all). Also to imp for reviewing this and working on >> the >> forward-porting of the changes in our gcc so that we're getting to a much >> better place with regard to external toolchains. >> >> Sorry to all of the people who helped who I forgot to mention by name. >> >> Reviewed by: bapt, imp, dim, ... >> >> Added: >> head/tools/build/options/WITHOUT_GNUCXX (contents, props changed) >> head/tools/build/options/WITH_GNUCXX (contents, props changed) >> Modified: >> head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp >> head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h >> head/gnu/lib/Makefile >> head/gnu/usr.bin/cc/Makefile >> head/share/mk/bsd.own.mk >> head/sys/sys/param.h >> >> Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp >> == >> --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri Sep 6 >> 18:41:57 2013(r255320) >> +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri Sep 6 >> 20:08:03 2013(r255321) >> @@ -1851,6 +1851,38 @@ bool FreeBSD::UseSjLjExceptions() const >> } >> } >> >> +ToolChain::CXXStdlibType >> +FreeBSD::GetCXXStdlibType(const ArgList &Args) const { >> + if (Arg *A = Args.getLastArg(options::OPT_stdlib_EQ)) { >> +StringRef Value = A->getValue(); >> +if (Value == "libc++") >> + return ToolChain::CST_Libcxx; >> +if (Value == "libstdc++") >> + return ToolChain::CST_Libstdcxx; >> +getDriver().Diag(diag::err_drv_invalid_stdlib_name) >> + << A->getAsString(Args); >> + } >> + >> + return getTriple().getOSMajorVersion() >= 10 ? ToolChain::CST_Libcxx : >> + ToolChain::CST_Libstdcxx; >> +} >> + >> +void FreeBSD::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, >> + ArgStringList &CC1Args) const { >> + if (DriverArgs.hasArg(options::OPT_nostdlibinc) || >> + DriverArgs.hasArg(options::OPT_nostdincxx)) >> +return; >> + >> + if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) >> +addSystemInclude(DriverArgs, CC1Args, >> + getDriver().SysRoot + "/usr/include/c++/v1"); >> + else >> +addSystemInclude(DriverArgs, CC1Args, >> + getDriver().SysRoot + "/usr/include/c++/4.2"); >> + return; >> + >> +} >> + >> /// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly. >> >> NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList >> &Args) >> >> Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h >> == >> --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri Sep 6 >> 18:41:57 2013(r255320) >> +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri Sep 6 >> 20:08:03 2013(r255321) >> @@ -458,9 +458,14 @@ class LLVM_LIBRARY_VISIBILITY FreeBSD : >> public: >> FreeBSD(const Driver &D, const llvm::Triple& Triple, co
svn commit: r255325 - head/tools/build/mk
Author: theraven Date: Fri Sep 6 20:46:07 2013 New Revision: 255325 URL: http://svnweb.freebsd.org/changeset/base/255325 Log: Don't delete c++filt when doing a make delete-old if GCC is not built but C++ is. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Sep 6 20:42:14 2013(r255324) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Sep 6 20:46:07 2013(r255325) @@ -1546,7 +1546,9 @@ OLD_FILES+=usr/share/man/man8/unstr.8.gz .endif .if ${MK_GCC} == no +.if ${MK_CXX} == no OLD_FILES+=usr/bin/c++filt +.endif OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/bin/gcc OLD_FILES+=usr/bin/gcov ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options
On 6 Sep 2013, at 21:11, Nathan Whitehorn wrote: > Don't you mean MACHINE here? Otherwise native builds on pc98 will fail > due to: > >> +# The pc98 bootloader requires gcc to build and so we must leave gcc enabled >> +# for pc98 for now. >> +.if ${__TT} == "pc98" >> +__DEFAULT_NO_OPTIONS+=GNUCXX >> +__DEFAULT_YES_OPTIONS+=GCC >> +.else >> +__DEFAULT_NO_OPTIONS+=GCC GNUCXX >> +.endif >> > this section, where __TT will be "i386" when built natively on pc98 > systems. > -Nathan Yes, I think you're right. Thank you. Fixed in 255322. David ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255330 - head/sbin/camcontrol
Author: bryanv Date: Fri Sep 6 21:26:36 2013 New Revision: 255330 URL: http://svnweb.freebsd.org/changeset/base/255330 Log: Bump .Dd after r255307 and r255310 Requested by: joel Modified: head/sbin/camcontrol/camcontrol.8 Modified: head/sbin/camcontrol/camcontrol.8 == --- head/sbin/camcontrol/camcontrol.8 Fri Sep 6 21:02:43 2013 (r255329) +++ head/sbin/camcontrol/camcontrol.8 Fri Sep 6 21:26:36 2013 (r255330) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 24, 2013 +.Dd September 6, 2013 .Dt CAMCONTROL 8 .Os .Sh NAME ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255326 - head/tools/build/options
Author: zeising (doc,ports committer) Date: Fri Sep 6 20:49:48 2013 New Revision: 255326 URL: http://svnweb.freebsd.org/changeset/base/255326 Log: Add WITH_GCC alongside WITHOUT_GCC. Remove the comment from WITHOUT_GCC about this not working without an alternate toolchain, we have clang now. Added: head/tools/build/options/WITH_GCC - copied, changed from r255323, head/tools/build/options/WITHOUT_GCC Modified: head/tools/build/options/WITHOUT_GCC Modified: head/tools/build/options/WITHOUT_GCC == --- head/tools/build/options/WITHOUT_GCCFri Sep 6 20:46:07 2013 (r255325) +++ head/tools/build/options/WITHOUT_GCCFri Sep 6 20:49:48 2013 (r255326) @@ -1,6 +1,2 @@ .\" $FreeBSD$ -Set to not install gcc and g++. -.Bf -symbolic -The option does not generally work for build targets, unless some alternative -toolchain is enabled. -.Ef +Set to not build and install gcc and g++. Copied and modified: head/tools/build/options/WITH_GCC (from r255323, head/tools/build/options/WITHOUT_GCC) == --- head/tools/build/options/WITHOUT_GCCFri Sep 6 20:24:21 2013 (r255323, copy source) +++ head/tools/build/options/WITH_GCC Fri Sep 6 20:49:48 2013 (r255326) @@ -1,6 +1,2 @@ .\" $FreeBSD$ -Set to not install gcc and g++. -.Bf -symbolic -The option does not generally work for build targets, unless some alternative -toolchain is enabled. -.Ef +Set to build and install gcc and g++. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 09/06/13 13:43, David Chisnall wrote: > Thanks for the report. I've now bracketed the extra flag in a > check that we're compiling with clang, which should fix it, so let > me know if it still breaks for you. That's fast! Thanks, this is fixed now. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBCgAGBQJSKj+GAAoJEG80Jeu8UPuzq2UIAI550OLa2DRRqZ/LuS3BzElX m5J4iUqzbVfY8KSrDR3KcVHH83KVUmHRF2RzEMX+2bQDvIHj7vFrlVu6gtP2SkO9 zFGLwGwuqQ5uTOA979D4wvRvKJEBaKMxvfIUHOkQQYBPX+pPBdImNoE9k2QmulyQ C00mhsv1jc/BxQKoPyFI/jPHlFkSNC9Z+xQpxg3m76vqZ4aATiR0hkuDsOvyt3sL uInTVY60mCb3KNiEL2z9m70B02Ne8SPEdDe5upkVamRS1FE9yr+GCmpcZgkWBoA/ IRHc56N6Spj2MmLAzFz//Dxb+WofGhom00r0X/lwGLv6QWYmOa2x+gihmzslaj8= =y0sw -END PGP SIGNATURE- ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255327 - head/share/man/man5
Author: zeising (doc,ports committer) Date: Fri Sep 6 20:51:15 2013 New Revision: 255327 URL: http://svnweb.freebsd.org/changeset/base/255327 Log: Regenerate after unhooking gcc/g++ from the default build for some arches. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Fri Sep 6 20:49:48 2013 (r255326) +++ head/share/man/man5/src.conf.5 Fri Sep 6 20:51:15 2013 (r255327) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 253304 2013-07-12 23:08:44Z bapt .\" $FreeBSD$ -.Dd August 29, 2013 +.Dd September 6, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -471,12 +471,17 @@ Set to not build .\" from FreeBSD: head/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. .It Va WITHOUT_GCC -.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC 222090 2011-05-19 05:13:25Z imp -Set to not install gcc and g++. -.Bf -symbolic -The option does not generally work for build targets, unless some alternative -toolchain is enabled. -.Ef +.\" from FreeBSD: head/tools/build/options/WITHOUT_GCC 255326 2013-09-06 20:49:48Z zeising +Set to not build and install gcc and g++. +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armv6 and i386/i386. +.It Va WITH_GCC +.\" from FreeBSD: head/tools/build/options/WITH_GCC 255326 2013-09-06 20:49:48Z zeising +Set to build and install gcc and g++. +.Pp +It is a default setting on +arm/armeb, arm/armv6eb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCOV .\" from FreeBSD: head/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru Set to not build the @@ -500,6 +505,20 @@ When set, it also enforces the following .It .Va WITHOUT_GNU_SUPPORT .El +.It Va WITHOUT_GNUCXX +.\" from FreeBSD: head/tools/build/options/WITHOUT_GNUCXX 255321 2013-09-06 20:08:03Z theraven +Do not build the GNU C++ stack (g++, libstdc++). +This is the default on platforms where clang is the system compiler. +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armv6, i386/i386 and pc98/i386. +.It Va WITH_GNUCXX +.\" from FreeBSD: head/tools/build/options/WITH_GNUCXX 255321 2013-09-06 20:08:03Z theraven +Build the GNU C++ stack (g++, libstdc++). +This is the default on platforms where gcc is the system compiler. +.Pp +It is a default setting on +arm/armeb, arm/armv6eb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255316 - head/sys/kern
On 09/06/13 12:18, Gleb Smirnoff wrote: > On Fri, Sep 06, 2013 at 05:32:29PM +, Jamie Gritton wrote: > J> Author: jamie > J> Date: Fri Sep 6 17:32:29 2013 > J> New Revision: 255316 > J> URL: http://svnweb.freebsd.org/changeset/base/255316 > J> > J> Log: > J> Keep PRIV_KMEM_READ permitted inside jails as it is on the outside. > J> > J> Modified: > J> head/sys/kern/kern_jail.c > J> > J> Modified: head/sys/kern/kern_jail.c > J> > == > J> --- head/sys/kern/kern_jail.c Fri Sep 6 17:19:57 2013 > (r255315) > J> +++ head/sys/kern/kern_jail.c Fri Sep 6 17:32:29 2013 > (r255316) > J> @@ -3885,6 +3885,13 @@ prison_priv_check(struct ucred *cred, in > J>case PRIV_VFS_SETGID: > J>case PRIV_VFS_STAT: > J>case PRIV_VFS_STICKYFILE: > J> + > J> + /* > J> + * As in the non-jail case, non-root users are expected to be > J> + * able to read kernel/phyiscal memory (provided /dev/[k]mem > J> + * exists in the jail and they have permission to access it). > J> + */ > J> + case PRIV_KMEM_READ: > J>return (0); > J> > J>/* > > Was that discussed anywhere or reviewed by anyone? Yes, it was brought up by jase@ in src-committers last week, noting that my original PRIV_KMEM_* commit (r252841) broke existing jail behavior. The entire "discussion" was the mention of the problem and my mention of what it would take to fix it. There was no code review as such, but that seemed appropriate for an obvious one-liner. - Jamie ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options
Author: theraven Date: Fri Sep 6 20:08:03 2013 New Revision: 255321 URL: http://svnweb.freebsd.org/changeset/base/255321 Log: On platforms where clang is the default compiler, don't build gcc or libstdc++. To enable them, set WITH_GCC and WITH_GNUCXX in src.conf. Make clang default to using libc++ on FreeBSD 10. Bumped __FreeBSD_version for the change. GCC is still enabled on PC98, because the PC98 bootloader requires GCC to build (or, at least, hard-codes the use of gcc into its build). Thanks to everyone who helped make the ports tree ready for this (and bapt for coordinating them all). Also to imp for reviewing this and working on the forward-porting of the changes in our gcc so that we're getting to a much better place with regard to external toolchains. Sorry to all of the people who helped who I forgot to mention by name. Reviewed by: bapt, imp, dim, ... Added: head/tools/build/options/WITHOUT_GNUCXX (contents, props changed) head/tools/build/options/WITH_GNUCXX (contents, props changed) Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h head/gnu/lib/Makefile head/gnu/usr.bin/cc/Makefile head/share/mk/bsd.own.mk head/sys/sys/param.h Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp == --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri Sep 6 18:41:57 2013(r255320) +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp Fri Sep 6 20:08:03 2013(r255321) @@ -1851,6 +1851,38 @@ bool FreeBSD::UseSjLjExceptions() const } } +ToolChain::CXXStdlibType +FreeBSD::GetCXXStdlibType(const ArgList &Args) const { + if (Arg *A = Args.getLastArg(options::OPT_stdlib_EQ)) { +StringRef Value = A->getValue(); +if (Value == "libc++") + return ToolChain::CST_Libcxx; +if (Value == "libstdc++") + return ToolChain::CST_Libstdcxx; +getDriver().Diag(diag::err_drv_invalid_stdlib_name) + << A->getAsString(Args); + } + + return getTriple().getOSMajorVersion() >= 10 ? ToolChain::CST_Libcxx : + ToolChain::CST_Libstdcxx; +} + +void FreeBSD::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, + ArgStringList &CC1Args) const { + if (DriverArgs.hasArg(options::OPT_nostdlibinc) || + DriverArgs.hasArg(options::OPT_nostdincxx)) +return; + + if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) +addSystemInclude(DriverArgs, CC1Args, + getDriver().SysRoot + "/usr/include/c++/v1"); + else +addSystemInclude(DriverArgs, CC1Args, + getDriver().SysRoot + "/usr/include/c++/4.2"); + return; + +} + /// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly. NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h == --- head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri Sep 6 18:41:57 2013(r255320) +++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h Fri Sep 6 20:08:03 2013(r255321) @@ -458,9 +458,14 @@ class LLVM_LIBRARY_VISIBILITY FreeBSD : public: FreeBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); + virtual CXXStdlibType GetCXXStdlibType(const ArgList &Args) const; + virtual bool IsMathErrnoDefault() const { return false; } virtual bool IsObjCNonFragileABIDefault() const { return true; } + virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, +ArgStringList &CC1Args) const; + virtual bool UseSjLjExceptions() const; protected: virtual Tool *buildAssembler() const; Modified: head/gnu/lib/Makefile == --- head/gnu/lib/Makefile Fri Sep 6 18:41:57 2013(r255320) +++ head/gnu/lib/Makefile Fri Sep 6 20:08:03 2013(r255321) @@ -10,7 +10,7 @@ SUBDIR+= libssp # libsupc++ uses libstdc++ headers, although 'make includes' should # have taken care of that already. -.if ${MK_CXX} != "no" +.if ${MK_GNUCXX} != "no" SUBDIR+= libstdc++ libsupc++ .endif Modified: head/gnu/usr.bin/cc/Makefile == --- head/gnu/usr.bin/cc/MakefileFri Sep 6 18:41:57 2013 (r255320) +++ head/gnu/usr.bin/cc/MakefileFri Sep 6 20:08:03 2013 (r255321) @@ -12,7 +12,12 @@ SUBDIR+= cpp .endif .if ${MK_CXX} != "no" -SUBDIR+= cc1plus c++ c++filt +.if ${MK_GNUCXX} != "no" +SUBDIR+= cc1plus c++ +.endif +# This should be moved into the above block once c++filt from elftoolchain or +# similar is provided. +SUBDIR+= c++filt .endif
svn commit: r255328 - head/lib/libc/net
Author: jilles Date: Fri Sep 6 21:02:06 2013 New Revision: 255328 URL: http://svnweb.freebsd.org/changeset/base/255328 Log: libc: Use SOCK_CLOEXEC for various internal file descriptors. This change avoids undesirably passing some internal file descriptors to a process created (fork+exec) by another thread. Kernel support for SOCK_CLOEXEC was added in r248534, March 19, 2013. Modified: head/lib/libc/net/getaddrinfo.c head/lib/libc/net/if_nametoindex.c head/lib/libc/net/name6.c head/lib/libc/net/nscachedcli.c Modified: head/lib/libc/net/getaddrinfo.c == --- head/lib/libc/net/getaddrinfo.c Fri Sep 6 20:51:15 2013 (r255327) +++ head/lib/libc/net/getaddrinfo.c Fri Sep 6 21:02:06 2013 (r255328) @@ -831,7 +831,8 @@ set_source(struct ai_order *aio, struct get_port(&ai, "1", 0); /* open a socket to get the source address for the given dst */ - if ((s = _socket(ai.ai_family, ai.ai_socktype, ai.ai_protocol)) < 0) + if ((s = _socket(ai.ai_family, ai.ai_socktype | SOCK_CLOEXEC, + ai.ai_protocol)) < 0) return; /* give up */ if (_connect(s, ai.ai_addr, ai.ai_addrlen) < 0) goto cleanup; @@ -1131,7 +1132,7 @@ explore_null(const struct addrinfo *pai, * filter out AFs that are not supported by the kernel * XXX errno? */ - s = _socket(pai->ai_family, SOCK_DGRAM, 0); + s = _socket(pai->ai_family, SOCK_DGRAM | SOCK_CLOEXEC, 0); if (s < 0) { if (errno != EMFILE) return 0; @@ -1541,18 +1542,19 @@ addrconfig(struct addrinfo *pai) */ af = pai->ai_family; if (af == AF_UNSPEC) { - if ((s = _socket(AF_INET6, SOCK_DGRAM, 0)) < 0) + if ((s = _socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) af = AF_INET; else { _close(s); - if ((s = _socket(AF_INET, SOCK_DGRAM, 0)) < 0) + if ((s = _socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, + 0)) < 0) af = AF_INET6; else _close(s); } } if (af != AF_UNSPEC) { - if ((s = _socket(af, SOCK_DGRAM, 0)) < 0) + if ((s = _socket(af, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) return 0; _close(s); } Modified: head/lib/libc/net/if_nametoindex.c == --- head/lib/libc/net/if_nametoindex.c Fri Sep 6 20:51:15 2013 (r255327) +++ head/lib/libc/net/if_nametoindex.c Fri Sep 6 21:02:06 2013 (r255328) @@ -68,7 +68,7 @@ if_nametoindex(const char *ifname) struct ifaddrs *ifaddrs, *ifa; unsigned int ni; - s = _socket(AF_INET, SOCK_DGRAM, 0); + s = _socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0); if (s != -1) { #ifdef PURIFY memset(&ifr, 0, sizeof(ifr)); Modified: head/lib/libc/net/name6.c == --- head/lib/libc/net/name6.c Fri Sep 6 20:51:15 2013(r255327) +++ head/lib/libc/net/name6.c Fri Sep 6 21:02:06 2013(r255328) @@ -235,7 +235,7 @@ getipnodebyname(const char *name, int af if (flags & AI_ADDRCONFIG) { int s; - if ((s = _socket(af, SOCK_DGRAM, 0)) < 0) + if ((s = _socket(af, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) return NULL; /* * TODO: @@ -868,7 +868,8 @@ set_source(struct hp_order *aio, struct } /* open a socket to get the source address for the given dst */ - if ((s = _socket(ss.ss_family, SOCK_DGRAM, IPPROTO_UDP)) < 0) + if ((s = _socket(ss.ss_family, SOCK_DGRAM | SOCK_CLOEXEC, + IPPROTO_UDP)) < 0) return; /* give up */ if (_connect(s, (struct sockaddr *)&ss, ss.ss_len) < 0) goto cleanup; Modified: head/lib/libc/net/nscachedcli.c == --- head/lib/libc/net/nscachedcli.c Fri Sep 6 20:51:15 2013 (r255327) +++ head/lib/libc/net/nscachedcli.c Fri Sep 6 21:02:06 2013 (r255328) @@ -200,7 +200,7 @@ __open_cached_connection(struct cached_c assert(params != NULL); - client_socket = _socket(PF_LOCAL, SOCK_STREAM, 0); + client_socket = _socket(PF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0); client_address.sun_family = PF_LOCAL; strncpy(client_address.sun_path, params->socket_path, sizeof(client_address.sun_path)); ___ svn-src-head@freebsd
Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options
On 09/06/13 15:08, David Chisnall wrote: > Author: theraven > Date: Fri Sep 6 20:08:03 2013 > New Revision: 255321 > URL: http://svnweb.freebsd.org/changeset/base/255321 > > Log: > On platforms where clang is the default compiler, don't build gcc or > libstdc++. > To enable them, set WITH_GCC and WITH_GNUCXX in src.conf. > Make clang default to using libc++ on FreeBSD 10. > Bumped __FreeBSD_version for the change. > . > > Modified: head/share/mk/bsd.own.mk > == > --- head/share/mk/bsd.own.mk Fri Sep 6 18:41:57 2013(r255320) > +++ head/share/mk/bsd.own.mk Fri Sep 6 20:08:03 2013(r255321) > @@ -284,7 +284,6 @@ __DEFAULT_YES_OPTIONS = \ > FP_LIBC \ > FREEBSD_UPDATE \ > GAMES \ > -GCC \ > GCOV \ > GDB \ > GNU \ > @@ -400,6 +399,11 @@ __T=${TARGET_ARCH} > .else > __T=${MACHINE_ARCH} > .endif > +.if defined(TARGET) > +__TT=${TARGET} > +.else > +__TT=${MACHINE_ARCH} > +.endif Don't you mean MACHINE here? Otherwise native builds on pc98 will fail due to: > +# The pc98 bootloader requires gcc to build and so we must leave gcc enabled > +# for pc98 for now. > +.if ${__TT} == "pc98" > +__DEFAULT_NO_OPTIONS+=GNUCXX > +__DEFAULT_YES_OPTIONS+=GCC > +.else > +__DEFAULT_NO_OPTIONS+=GCC GNUCXX > +.endif > this section, where __TT will be "i386" when built natively on pc98 systems. -Nathan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255331 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include i386/xen x86/xen xen
Author: gibbs Date: Fri Sep 6 22:17:02 2013 New Revision: 255331 URL: http://svnweb.freebsd.org/changeset/base/255331 Log: Implement PV IPIs for PVHVM guests and further converge PV and HVM IPI implmementations. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Submitted by: gibbs (misc cleanup, table driven config) Reviewed by: gibbs MFC after: 2 weeks sys/amd64/include/cpufunc.h: sys/amd64/amd64/pmap.c: Move invltlb_globpcid() into cpufunc.h so that it can be used by the Xen HVM version of tlb shootdown IPI handlers. sys/x86/xen/xen_intr.c: sys/xen/xen_intr.h: Rename xen_intr_bind_ipi() to xen_intr_alloc_and_bind_ipi(), and remove the ipi vector parameter. This api allocates an event channel port that can be used for ipi services, but knows nothing of the actual ipi for which that port will be used. Removing the unused argument and cleaning up the comments surrounding its declaration helps clarify its actual role. sys/amd64/amd64/mp_machdep.c: sys/amd64/include/cpu.h: sys/i386/i386/mp_machdep.c: sys/i386/include/cpu.h: Implement a generic framework for amd64 and i386 that allows the implementation of certain CPU management functions to be selected at runtime. Currently this is only used for the ipi send function, which we optimize for Xen when running on a Xen hypervisor, but can easily be expanded to support more operations. sys/x86/xen/hvm.c: Implement Xen PV IPI handlers and operations, replacing native send IPI. sys/amd64/include/pcpu.h: sys/i386/include/pcpu.h: sys/i386/include/smp.h: Remove NR_VIRQS and NR_IPIS from FreeBSD headers. NR_VIRQS is defined already for us in the xen interface files. NR_IPIS is only needed in one file per Xen platform and is easily inferred by the IPI vector table that is defined in those files. sys/i386/xen/mp_machdep.c: Restructure to more closely match the HVM implementation by performing table driven IPI setup. Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/amd64/pmap.c head/sys/amd64/include/cpu.h head/sys/amd64/include/cpufunc.h head/sys/amd64/include/pcpu.h head/sys/i386/i386/mp_machdep.c head/sys/i386/include/cpu.h head/sys/i386/include/pcpu.h head/sys/i386/include/smp.h head/sys/i386/xen/mp_machdep.c head/sys/x86/xen/hvm.c head/sys/x86/xen/xen_intr.c head/sys/xen/xen_intr.h Modified: head/sys/amd64/amd64/mp_machdep.c == --- head/sys/amd64/amd64/mp_machdep.c Fri Sep 6 21:26:36 2013 (r255330) +++ head/sys/amd64/amd64/mp_machdep.c Fri Sep 6 22:17:02 2013 (r255331) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef XENHVM #include @@ -125,6 +126,11 @@ u_long *ipi_rendezvous_counts[MAXCPU]; static u_long *ipi_hardclock_counts[MAXCPU]; #endif +/* Default cpu_ops implementation. */ +struct cpu_ops cpu_ops = { + .ipi_vectored = lapic_ipi_vectored +}; + extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); extern int pmap_pcid_enabled; @@ -1125,7 +1131,7 @@ ipi_send_cpu(int cpu, u_int ipi) if (old_pending) return; } - lapic_ipi_vectored(ipi, cpu_apic_ids[cpu]); + cpu_ops.ipi_vectored(ipi, cpu_apic_ids[cpu]); } /* @@ -1395,7 +1401,7 @@ ipi_all_but_self(u_int ipi) CPU_OR_ATOMIC(&ipi_nmi_pending, &other_cpus); CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); + cpu_ops.ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } int Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Fri Sep 6 21:26:36 2013(r255330) +++ head/sys/amd64/amd64/pmap.c Fri Sep 6 22:17:02 2013(r255331) @@ -254,30 +254,6 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pcid_enab 0, "Is TLB Context ID enabled ?"); int invpcid_works = 0; -/* - * Perform the guaranteed invalidation of all TLB entries. This - * includes the global entries, and entries in all PCIDs, not only the - * current context. The function works both on non-PCID CPUs and CPUs - * with the PCID turned off or on. See IA-32 SDM Vol. 3a 4.10.4.1 - * Operations that Invalidate TLBs and Paging-Structure Caches. - */ -static __inline void -invltlb_globpcid(void) -{ - uint64_t cr4; - - cr4 = rcr4(); - load_cr4(cr4 & ~CR4_PGE); - /* -* Although preemption at this point could be detrimental to -* performance, it would not lead to an error. PG_G is simply -* ignored if CR4.PGE is clear. Moreover, in case this block -* is re-entered, the load_cr4() either above or below will
svn commit: r255329 - head/sys/net
Author: davide Date: Fri Sep 6 21:02:43 2013 New Revision: 255329 URL: http://svnweb.freebsd.org/changeset/base/255329 Log: Retire netisr.netisr_direct and netisr.netisr_direct_force sysctls. These were used to control/export dispatch policy but they're not anymore. This commit cannot be MFC'ed to 9 because old netstat(9) binary relies on such sysctl to work. On the other hand, there's no real reason to keep'em around in 10. Modified: head/sys/net/netisr.c Modified: head/sys/net/netisr.c == --- head/sys/net/netisr.c Fri Sep 6 21:02:06 2013(r255328) +++ head/sys/net/netisr.c Fri Sep 6 21:02:43 2013(r255329) @@ -154,19 +154,6 @@ SYSCTL_PROC(_net_isr, OID_AUTO, dispatch "netisr dispatch policy"); /* - * These sysctls were used in previous versions to control and export - * dispatch policy state. Now, we provide read-only export via them so that - * older netstat binaries work. At some point they can be garbage collected. - */ -static int netisr_direct_force; -SYSCTL_INT(_net_isr, OID_AUTO, direct_force, CTLFLAG_RD, -&netisr_direct_force, 0, "compat: force direct dispatch"); - -static int netisr_direct; -SYSCTL_INT(_net_isr, OID_AUTO, direct, CTLFLAG_RD, &netisr_direct, 0, -"compat: enable direct dispatch"); - -/* * Allow the administrator to limit the number of threads (CPUs) to use for * netisr. We don't check netisr_maxthreads before creating the thread for * CPU 0, so in practice we ignore values <= 1. This must be set at boot. @@ -338,32 +325,6 @@ netisr_dispatch_policy_from_str(const ch return (EINVAL); } -static void -netisr_dispatch_policy_compat(void) -{ - - switch (netisr_dispatch_policy) { - case NETISR_DISPATCH_DEFERRED: - netisr_direct_force = 0; - netisr_direct = 0; - break; - - case NETISR_DISPATCH_HYBRID: - netisr_direct_force = 0; - netisr_direct = 1; - break; - - case NETISR_DISPATCH_DIRECT: - netisr_direct_force = 1; - netisr_direct = 1; - break; - - default: - panic("%s: unknown policy %u", __func__, - netisr_dispatch_policy); - } -} - static int sysctl_netisr_dispatch_policy(SYSCTL_HANDLER_ARGS) { @@ -379,10 +340,8 @@ sysctl_netisr_dispatch_policy(SYSCTL_HAN &dispatch_policy); if (error == 0 && dispatch_policy == NETISR_DISPATCH_DEFAULT) error = EINVAL; - if (error == 0) { + if (error == 0) netisr_dispatch_policy = dispatch_policy; - netisr_dispatch_policy_compat(); - } } return (error); } @@ -1199,10 +1158,9 @@ netisr_init(void *arg) &dispatch_policy); if (error == 0 && dispatch_policy == NETISR_DISPATCH_DEFAULT) error = EINVAL; - if (error == 0) { + if (error == 0) netisr_dispatch_policy = dispatch_policy; - netisr_dispatch_policy_compat(); - } else + else printf( "%s: invalid dispatch policy %s, using default\n", __func__, tmp); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255329 - head/sys/net
On Fri, Sep 6, 2013 at 11:02 PM, Davide Italiano wrote: > Author: davide > Date: Fri Sep 6 21:02:43 2013 > New Revision: 255329 > URL: http://svnweb.freebsd.org/changeset/base/255329 > > Log: > Retire netisr.netisr_direct and netisr.netisr_direct_force sysctls. > These were used to control/export dispatch policy but they're not anymore. > This commit cannot be MFC'ed to 9 because old netstat(9) binary relies That should be read as netstat(1) obviously. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255323 - in head/sys: amd64/conf i386/conf
Author: bryanv Date: Fri Sep 6 20:24:21 2013 New Revision: 255323 URL: http://svnweb.freebsd.org/changeset/base/255323 Log: Add vmx device to the i386 and amd64 NOTES files Modified: head/sys/amd64/conf/NOTES head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/NOTES == --- head/sys/amd64/conf/NOTES Fri Sep 6 20:23:15 2013(r255322) +++ head/sys/amd64/conf/NOTES Fri Sep 6 20:24:21 2013(r255323) @@ -309,6 +309,7 @@ options DRM_DEBUG # Include debug print # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking # sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters +# vmx: VMware VMXNET3 Ethernet (BSD open source) # wpi: Intel 3945ABG Wireless LAN controller # Requires the wpi firmware module @@ -325,6 +326,7 @@ device mthca # Mellanox HCA InfiniBan device nfe # nVidia nForce MCP on-board Ethernet device nve # nVidia nForce MCP on-board Ethernet Networking device sfxge # Solarflare SFC9000 10Gb Ethernet +device vmx # VMware VMXNET3 Ethernet device wpi # Intel 3945ABG wireless NICs. # IEEE 802.11 adapter firmware modules Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESFri Sep 6 20:23:15 2013(r255322) +++ head/sys/i386/conf/NOTESFri Sep 6 20:24:21 2013(r255323) @@ -580,6 +580,7 @@ hint.mse.0.irq="5" # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking # sbni: Granch SBNI12-xx ISA and PCI adapters +# vmx: VMware VMXNET3 Ethernet (BSD open source) # wl: Lucent Wavelan (ISA card only). # wpi: Intel 3945ABG Wireless LAN controller # Requires the wpi firmware module @@ -629,6 +630,7 @@ hint.sbni.0.at="isa" hint.sbni.0.port="0x210" hint.sbni.0.irq="0xefdead" hint.sbni.0.flags="0" +device vmx # VMware VMXNET3 Ethernet device wl hint.wl.0.at="isa" hint.wl.0.port="0x300" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255243 - head/etc/mtree
On Thu, Sep 05, 2013 at 12:35:24PM +, Dag-Erling SmÞrgrav wrote: > Author: des > Date: Thu Sep 5 12:35:23 2013 > New Revision: 255243 > URL: http://svnweb.freebsd.org/changeset/base/255243 > > Log: > authpf needs /var/authpf to exist and be writable by group authpf. Thanks! -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255316 - head/sys/kern
Author: jamie Date: Fri Sep 6 17:32:29 2013 New Revision: 255316 URL: http://svnweb.freebsd.org/changeset/base/255316 Log: Keep PRIV_KMEM_READ permitted inside jails as it is on the outside. Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c == --- head/sys/kern/kern_jail.c Fri Sep 6 17:19:57 2013(r255315) +++ head/sys/kern/kern_jail.c Fri Sep 6 17:32:29 2013(r255316) @@ -3885,6 +3885,13 @@ prison_priv_check(struct ucred *cred, in case PRIV_VFS_SETGID: case PRIV_VFS_STAT: case PRIV_VFS_STICKYFILE: + + /* +* As in the non-jail case, non-root users are expected to be +* able to read kernel/phyiscal memory (provided /dev/[k]mem +* exists in the jail and they have permission to access it). +*/ + case PRIV_KMEM_READ: return (0); /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255333 - head/sys/nlm
Author: rmacklem Date: Fri Sep 6 23:14:31 2013 New Revision: 255333 URL: http://svnweb.freebsd.org/changeset/base/255333 Log: Intermittent crashes in the NLM (rpc.lockd) code during system shutdown was reporetd via email. The crashes occurred because the client side NLM would attempt to use its socket after it had been destroyed. Looking at the code, it would soclose() once the reference count on the socket handling structure went to 0. Unfortunately, nlm_host_get_rpc() will simply allocate a new socket handling structure when none exists and use the now soclose()d socket. Since there doesn't seem to be a safe way to determine when the socket is no longer needed, this patch modifies the code so that it never soclose()es the socket. Since there is only one socket ever created, this does not introduce a leak when the rpc.lockd is stopped/restarted. The patch also disables unloading of the nfslockd module, since it is not safe to do so (and has never been safe to do so, from what I can see). Reported by: mav Tested by:mav MFC after:2 weeks Modified: head/sys/nlm/nlm_prot_impl.c Modified: head/sys/nlm/nlm_prot_impl.c == --- head/sys/nlm/nlm_prot_impl.cFri Sep 6 23:11:19 2013 (r255332) +++ head/sys/nlm/nlm_prot_impl.cFri Sep 6 23:14:31 2013 (r255333) @@ -133,6 +133,11 @@ static time_t nlm_grace_threshold; static time_t nlm_next_idle_check; /* + * A flag to indicate the server is already running. + */ +static int nlm_is_running; + +/* * A socket to use for RPC - shared by all IPv4 RPC clients. */ static struct socket *nlm_socket; @@ -1526,51 +1531,51 @@ nlm_server_main(int addr_count, char **a struct nlm_waiting_lock *nw; vop_advlock_t *old_nfs_advlock; vop_reclaim_t *old_nfs_reclaim; - int v4_used; -#ifdef INET6 - int v6_used; -#endif - if (nlm_socket) { + if (nlm_is_running != 0) { NLM_ERR("NLM: can't start server - " "it appears to be running already\n"); return (EPERM); } - memset(&opt, 0, sizeof(opt)); + if (nlm_socket == NULL) { + memset(&opt, 0, sizeof(opt)); - nlm_socket = NULL; - error = socreate(AF_INET, &nlm_socket, SOCK_DGRAM, 0, - td->td_ucred, td); - if (error) { - NLM_ERR("NLM: can't create IPv4 socket - error %d\n", error); - return (error); - } - opt.sopt_dir = SOPT_SET; - opt.sopt_level = IPPROTO_IP; - opt.sopt_name = IP_PORTRANGE; - portlow = IP_PORTRANGE_LOW; - opt.sopt_val = &portlow; - opt.sopt_valsize = sizeof(portlow); - sosetopt(nlm_socket, &opt); + error = socreate(AF_INET, &nlm_socket, SOCK_DGRAM, 0, + td->td_ucred, td); + if (error) { + NLM_ERR("NLM: can't create IPv4 socket - error %d\n", + error); + return (error); + } + opt.sopt_dir = SOPT_SET; + opt.sopt_level = IPPROTO_IP; + opt.sopt_name = IP_PORTRANGE; + portlow = IP_PORTRANGE_LOW; + opt.sopt_val = &portlow; + opt.sopt_valsize = sizeof(portlow); + sosetopt(nlm_socket, &opt); #ifdef INET6 - nlm_socket6 = NULL; - error = socreate(AF_INET6, &nlm_socket6, SOCK_DGRAM, 0, - td->td_ucred, td); - if (error) { - NLM_ERR("NLM: can't create IPv6 socket - error %d\n", error); - goto out; - return (error); - } - opt.sopt_dir = SOPT_SET; - opt.sopt_level = IPPROTO_IPV6; - opt.sopt_name = IPV6_PORTRANGE; - portlow = IPV6_PORTRANGE_LOW; - opt.sopt_val = &portlow; - opt.sopt_valsize = sizeof(portlow); - sosetopt(nlm_socket6, &opt); + nlm_socket6 = NULL; + error = socreate(AF_INET6, &nlm_socket6, SOCK_DGRAM, 0, + td->td_ucred, td); + if (error) { + NLM_ERR("NLM: can't create IPv6 socket - error %d\n", + error); + soclose(nlm_socket); + nlm_socket = NULL; + return (error); + } + opt.sopt_dir = SOPT_SET; + opt.sopt_level = IPPROTO_IPV6; + opt.sopt_name = IPV6_PORTRANGE; + portlow = IPV6_PORTRANGE_LOW; + opt.sopt_val = &portlow; + opt.sopt_valsize = sizeof(portlow); + sosetopt(nlm_socket6, &opt); #endif + } nlm_auth = authunix_create(curthread->td_ucred); @@ -1622,6 +1627,7 @@ nlm_server_main(int addr_count, char **a error = EINVAL; goto out; } + nlm_is_run
svn commit: r255334 - in head/sys: arm/broadcom/bcm2835 mips/atheros
Author: loos Date: Fri Sep 6 23:39:56 2013 New Revision: 255334 URL: http://svnweb.freebsd.org/changeset/base/255334 Log: Fix an off-by-one bug in ar71xx_gpio and bcm2835_gpio which makes the last pin unavailable. Reported and tested by: sbruno (ar71xx) Approved by: adrian (mentor) Pointy hat to:loos Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c head/sys/mips/atheros/ar71xx_gpio.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c == --- head/sys/arm/broadcom/bcm2835/bcm2835_gpio.cFri Sep 6 23:14:31 2013(r255333) +++ head/sys/arm/broadcom/bcm2835/bcm2835_gpio.cFri Sep 6 23:39:56 2013(r255334) @@ -729,7 +729,7 @@ bcm_gpio_attach(device_t dev) goto fail; /* Initialize the software controlled pins. */ - for (i = 0, j = 0; j < BCM_GPIO_PINS - 1; j++) { + for (i = 0, j = 0; j < BCM_GPIO_PINS; j++) { if (bcm_gpio_pin_is_ro(sc, j)) continue; snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME, Modified: head/sys/mips/atheros/ar71xx_gpio.c == --- head/sys/mips/atheros/ar71xx_gpio.c Fri Sep 6 23:14:31 2013 (r255333) +++ head/sys/mips/atheros/ar71xx_gpio.c Fri Sep 6 23:39:56 2013 (r255334) @@ -418,7 +418,7 @@ ar71xx_gpio_attach(device_t dev) "pinon", &pinon) != 0) pinon = 0; device_printf(dev, "gpio pinmask=0x%x\n", mask); - for (i = 0, j = 0; j < maxpin; j++) { + for (i = 0, j = 0; j <= maxpin; j++) { if ((mask & (1 << j)) == 0) continue; snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255335 - head/sys/mips/atheros
Author: loos Date: Fri Sep 6 23:47:50 2013 New Revision: 255335 URL: http://svnweb.freebsd.org/changeset/base/255335 Log: Remove the hardcoded limit for the number of gpio_pins that can be used. Allocate it dynamically. Approved by: adrian (mentor) Modified: head/sys/mips/atheros/ar71xx_gpio.c head/sys/mips/atheros/ar71xx_gpiovar.h Modified: head/sys/mips/atheros/ar71xx_gpio.c == --- head/sys/mips/atheros/ar71xx_gpio.c Fri Sep 6 23:39:56 2013 (r255334) +++ head/sys/mips/atheros/ar71xx_gpio.c Fri Sep 6 23:47:50 2013 (r255335) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -418,6 +419,13 @@ ar71xx_gpio_attach(device_t dev) "pinon", &pinon) != 0) pinon = 0; device_printf(dev, "gpio pinmask=0x%x\n", mask); + for (j = 0; j <= maxpin; j++) { + if ((mask & (1 << j)) == 0) + continue; + sc->gpio_npins++; + } + sc->gpio_pins = malloc(sizeof(*sc->gpio_pins) * sc->gpio_npins, + M_DEVBUF, M_WAITOK | M_ZERO); for (i = 0, j = 0; j <= maxpin; j++) { if ((mask & (1 << j)) == 0) continue; @@ -429,7 +437,6 @@ ar71xx_gpio_attach(device_t dev) ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], DEFAULT_CAPS); i++; } - sc->gpio_npins = i; for (i = 0; i < sc->gpio_npins; i++) { j = sc->gpio_pins[i].gp_pin; if ((pinon & (1 << j)) != 0) @@ -455,6 +462,7 @@ ar71xx_gpio_detach(device_t dev) bus_release_resource(dev, SYS_RES_MEMORY, sc->gpio_mem_rid, sc->gpio_mem_res); + free(sc->gpio_pins, M_DEVBUF); mtx_destroy(&sc->gpio_mtx); return(0); Modified: head/sys/mips/atheros/ar71xx_gpiovar.h == --- head/sys/mips/atheros/ar71xx_gpiovar.h Fri Sep 6 23:39:56 2013 (r255334) +++ head/sys/mips/atheros/ar71xx_gpiovar.h Fri Sep 6 23:47:50 2013 (r255335) @@ -64,7 +64,7 @@ struct ar71xx_gpio_softc { intgpio_irq_rid; void *gpio_ih; int gpio_npins; - struct gpio_pin gpio_pins[AR71XX_GPIO_PINS]; + struct gpio_pin *gpio_pins; }; #endif /* __AR71XX_GPIOVAR_H__ */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255336 - head/lib/libc/resolv
Author: jilles Date: Fri Sep 6 23:49:54 2013 New Revision: 255336 URL: http://svnweb.freebsd.org/changeset/base/255336 Log: libc: Make resolver sockets close-on-exec (SOCK_CLOEXEC). Although the resolver's sockets are exposed to applications via res_state, I do not expect them to pass the sockets across execve(). Modified: head/lib/libc/resolv/res_send.c Modified: head/lib/libc/resolv/res_send.c == --- head/lib/libc/resolv/res_send.c Fri Sep 6 23:47:50 2013 (r255335) +++ head/lib/libc/resolv/res_send.c Fri Sep 6 23:49:54 2013 (r255336) @@ -660,7 +660,8 @@ send_vc(res_state statp, if (statp->_vcsock >= 0) res_nclose(statp); - statp->_vcsock = _socket(nsap->sa_family, SOCK_STREAM, 0); + statp->_vcsock = _socket(nsap->sa_family, SOCK_STREAM | + SOCK_CLOEXEC, 0); #if !defined(USE_POLL) && !defined(USE_KQUEUE) if (statp->_vcsock > highestFD) { res_nclose(statp); @@ -851,7 +852,7 @@ send_dg(res_state statp, nsaplen = get_salen(nsap); if (EXT(statp).nssocks[ns] == -1) { EXT(statp).nssocks[ns] = _socket(nsap->sa_family, - SOCK_DGRAM, 0); + SOCK_DGRAM | SOCK_CLOEXEC, 0); #if !defined(USE_POLL) && !defined(USE_KQUEUE) if (EXT(statp).nssocks[ns] > highestFD) { res_nclose(statp); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255316 - head/sys/kern
On Fri, Sep 06, 2013 at 05:32:29PM +, Jamie Gritton wrote: J> Author: jamie J> Date: Fri Sep 6 17:32:29 2013 J> New Revision: 255316 J> URL: http://svnweb.freebsd.org/changeset/base/255316 J> J> Log: J> Keep PRIV_KMEM_READ permitted inside jails as it is on the outside. J> J> Modified: J> head/sys/kern/kern_jail.c J> J> Modified: head/sys/kern/kern_jail.c J> == J> --- head/sys/kern/kern_jail.cFri Sep 6 17:19:57 2013 (r255315) J> +++ head/sys/kern/kern_jail.cFri Sep 6 17:32:29 2013 (r255316) J> @@ -3885,6 +3885,13 @@ prison_priv_check(struct ucred *cred, in J> case PRIV_VFS_SETGID: J> case PRIV_VFS_STAT: J> case PRIV_VFS_STICKYFILE: J> + J> +/* J> + * As in the non-jail case, non-root users are expected to be J> + * able to read kernel/phyiscal memory (provided /dev/[k]mem J> + * exists in the jail and they have permission to access it). J> + */ J> +case PRIV_KMEM_READ: J> return (0); J> J> /* Was that discussed anywhere or reviewed by anyone? -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255289 - in head/sys: amd64/amd64 amd64/include ia64/ia64 ia64/include mips/include mips/mips
On Fri, Sep 6, 2013 at 7:37 AM, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Sep 6 05:37:49 2013 > New Revision: 255289 > URL: http://svnweb.freebsd.org/changeset/base/255289 > > Log: > On those machines, where sf_bufs do not represent any real object, make > sf_buf_alloc()/sf_buf_free() inlines, to save two calls to an absolutely > empty functions. > this seems to break the build WITHOUT_CLANG: cc1: warnings being treated as errors In file included from /usr/home/luigi/FreeBSD/head/sys/dev/md/md.c:87: /usr/home/luigi/FreeBSD/head/sys/sys/sf_buf.h:69: warning: redundant redeclaration of 'sf_buf_alloc' ./machine/sf_buf.h:46: warning: previous definition of 'sf_buf_alloc' was here /usr/home/luigi/FreeBSD/head/sys/sys/sf_buf.h:70: warning: redundant redeclaration of 'sf_buf_free' ./machine/sf_buf.h:53: warning: previous definition of 'sf_buf_free' was here *** [md.o] Error code 1 I don't know what could be a good way to handle this, maybe make sf_buf_alloc/sf_buf_free/sf_buf_mext prototypes mandatory in machine/sf_buf.h, and use the prototypes here only in the !_KERNEL case ? (and btw do we need sf_buf_mext() in that case ?) cheers luigi I >> do >> here > > *** [md.o] Error code 1 > > > Reviewed by: alc, kib, scottl > Sponsored by: Nginx, Inc. > Sponsored by: Netflix > > Modified: > head/sys/amd64/amd64/vm_machdep.c > head/sys/amd64/include/sf_buf.h > head/sys/ia64/ia64/vm_machdep.c > head/sys/ia64/include/sf_buf.h > head/sys/mips/include/sf_buf.h > head/sys/mips/mips/vm_machdep.c > > Modified: head/sys/amd64/amd64/vm_machdep.c > > == > --- head/sys/amd64/amd64/vm_machdep.c Fri Sep 6 05:20:11 2013 > (r255288) > +++ head/sys/amd64/amd64/vm_machdep.c Fri Sep 6 05:37:49 2013 > (r255289) > @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > #include > #include > @@ -695,27 +694,6 @@ cpu_reset_real() > } > > /* > - * Allocate an sf_buf for the given vm_page. On this machine, however, > there > - * is no sf_buf object. Instead, an opaque pointer to the given vm_page > is > - * returned. > - */ > -struct sf_buf * > -sf_buf_alloc(struct vm_page *m, int pri) > -{ > - > - return ((struct sf_buf *)m); > -} > - > -/* > - * Free the sf_buf. In fact, do nothing because there are no resources > - * associated with the sf_buf. > - */ > -void > -sf_buf_free(struct sf_buf *sf) > -{ > -} > - > -/* > * Software interrupt handler for queued VM system processing. > */ > void > > Modified: head/sys/amd64/include/sf_buf.h > > == > --- head/sys/amd64/include/sf_buf.h Fri Sep 6 05:20:11 2013 > (r255288) > +++ head/sys/amd64/include/sf_buf.h Fri Sep 6 05:37:49 2013 > (r255289) > @@ -41,6 +41,18 @@ > */ > struct sf_buf; > > +static inline struct sf_buf * > +sf_buf_alloc(struct vm_page *m, int pri) > +{ > + > + return ((struct sf_buf *)m); > +} > + > +static inline void > +sf_buf_free(struct sf_buf *sf) > +{ > +} > + > static __inline vm_offset_t > sf_buf_kva(struct sf_buf *sf) > { > > Modified: head/sys/ia64/ia64/vm_machdep.c > > == > --- head/sys/ia64/ia64/vm_machdep.c Fri Sep 6 05:20:11 2013 > (r255288) > +++ head/sys/ia64/ia64/vm_machdep.c Fri Sep 6 05:37:49 2013 > (r255289) > @@ -79,7 +79,6 @@ > #include > #include > #include > -#include > #include > #include > > @@ -353,27 +352,6 @@ cpu_exit(struct thread *td) > } > > /* > - * Allocate an sf_buf for the given vm_page. On this machine, however, > there > - * is no sf_buf object. Instead, an opaque pointer to the given vm_page > is > - * returned. > - */ > -struct sf_buf * > -sf_buf_alloc(struct vm_page *m, int pri) > -{ > - > - return ((struct sf_buf *)m); > -} > - > -/* > - * Free the sf_buf. In fact, do nothing because there are no resources > - * associated with the sf_buf. > - */ > -void > -sf_buf_free(struct sf_buf *sf) > -{ > -} > - > -/* > * Software interrupt handler for queued VM system processing. > */ > void > > Modified: head/sys/ia64/include/sf_buf.h > > == > --- head/sys/ia64/include/sf_buf.h Fri Sep 6 05:20:11 2013 > (r255288) > +++ head/sys/ia64/include/sf_buf.h Fri Sep 6 05:37:49 2013 > (r255289) > @@ -41,6 +41,18 @@ > */ > struct sf_buf; > > +static inline struct sf_buf * > +sf_buf_alloc(struct vm_page *m, int pri) > +{ > + > + return ((struct sf_buf *)m); > +} > + > +static inline void > +sf_buf_free(struct sf_buf *sf) > +{ > +} > + > static __inline vm_page_t > sf_buf_page(struct sf_buf *sf) > { > > Modified: head/sys/mips/include/sf_buf.h > > == > --- head/sys/mips/include/sf_buf.
Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf
On Fri, Sep 6, 2013 at 3:24 PM, Bryan Venteicher wrote: > Author: bryanv > Date: Fri Sep 6 20:24:21 2013 > New Revision: 255323 > URL: http://svnweb.freebsd.org/changeset/base/255323 > > Log: > Add vmx device to the i386 and amd64 NOTES files > > FWIW - I'm on the fence about adding vmx to GENERIC for 10.0. IIRC, VMware's vmxnet3 driver returns BUS_PROBE_VENDOR so the two drivers should coexist. This is assuming VMware updates the driver for 10 ... which I'm guessing isn't likely and was a large reason I added this driver in the first place. LMK if anybody has strong thoughts either way. Modified: > head/sys/amd64/conf/NOTES > head/sys/i386/conf/NOTES > > Modified: head/sys/amd64/conf/NOTES > > == > --- head/sys/amd64/conf/NOTES Fri Sep 6 20:23:15 2013(r255322) > +++ head/sys/amd64/conf/NOTES Fri Sep 6 20:24:21 2013(r255323) > @@ -309,6 +309,7 @@ options DRM_DEBUG # Include debug print > # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) > # nve: nVidia nForce MCP on-board Ethernet Networking > # sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters > +# vmx: VMware VMXNET3 Ethernet (BSD open source) > # wpi: Intel 3945ABG Wireless LAN controller > # Requires the wpi firmware module > > @@ -325,6 +326,7 @@ device mthca # Mellanox HCA InfiniBan > device nfe # nVidia nForce MCP on-board Ethernet > device nve # nVidia nForce MCP on-board Ethernet > Networking > device sfxge # Solarflare SFC9000 10Gb Ethernet > +device vmx # VMware VMXNET3 Ethernet > device wpi # Intel 3945ABG wireless NICs. > > # IEEE 802.11 adapter firmware modules > > Modified: head/sys/i386/conf/NOTES > > == > --- head/sys/i386/conf/NOTESFri Sep 6 20:23:15 2013(r255322) > +++ head/sys/i386/conf/NOTESFri Sep 6 20:24:21 2013(r255323) > @@ -580,6 +580,7 @@ hint.mse.0.irq="5" > # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) > # nve: nVidia nForce MCP on-board Ethernet Networking > # sbni: Granch SBNI12-xx ISA and PCI adapters > +# vmx: VMware VMXNET3 Ethernet (BSD open source) > # wl: Lucent Wavelan (ISA card only). > # wpi: Intel 3945ABG Wireless LAN controller > # Requires the wpi firmware module > @@ -629,6 +630,7 @@ hint.sbni.0.at="isa" > hint.sbni.0.port="0x210" > hint.sbni.0.irq="0xefdead" > hint.sbni.0.flags="0" > +device vmx # VMware VMXNET3 Ethernet > device wl > hint.wl.0.at="isa" > hint.wl.0.port="0x300" > ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r255321 - in head: contrib/llvm/tools/clang/lib/Driver gnu/lib gnu/usr.bin/cc share/mk sys/sys tools/build/options
On 6 Sep 2013, at 21:26, David Chisnall wrote: > On 6 Sep 2013, at 21:25, Nathan Whitehorn wrote: > >> Thanks! I ran into one other issue with the patch: c++filt continues to >> be built, but will be removed by make delete-old, which I guess is not >> intentional. > > Hmm, no that's not intentional. Why is make delete-old deleting it? This should also be fixed now. David ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255313 - head/release/picobsd/build
Author: luigi Date: Fri Sep 6 17:16:33 2013 New Revision: 255313 URL: http://svnweb.freebsd.org/changeset/base/255313 Log: r253616 nuked BINMAKE so we need to adapt to the new definition Modified: head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/picobsd == --- head/release/picobsd/build/picobsd Fri Sep 6 16:53:48 2013 (r255312) +++ head/release/picobsd/build/picobsd Fri Sep 6 17:16:33 2013 (r255313) @@ -972,6 +972,8 @@ set_build_parameters() { #-- export MACHINE_ARCH=`uname -m` MACHINE=`uname -m` # export CWARNFLAGS="-Wextra -Wno-sign-compare -Wno-missing-field-initializers" eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\"" + [ "$BINMAKE" = "" ] && \ + eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V SUB_MAKE`\"" fi if [ "${o_init_src}" != "" ] ; then ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255315 - head/release/picobsd/build
Author: luigi Date: Fri Sep 6 17:19:57 2013 New Revision: 255315 URL: http://svnweb.freebsd.org/changeset/base/255315 Log: comment out some stale loader configurations. Modified: head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/picobsd == --- head/release/picobsd/build/picobsd Fri Sep 6 17:18:43 2013 (r255314) +++ head/release/picobsd/build/picobsd Fri Sep 6 17:19:57 2013 (r255315) @@ -885,9 +885,11 @@ fill_floppy_image() { mkdir -p ${dst}/boot/kernel # XXX loader.conf does not work unless we also load the .4th files -echo "hint.acpi.0.disabled=\"1\"" > ${dst}/boot/loader.conf -echo "console=\"comconsole\"" >> ${dst}/boot/loader.conf -cp -p /boot/loader ${dst}/boot/loader || fail $? no_space "copying bootloader" +# echo "hint.acpi.0.disabled=\"1\"" > ${dst}/boot/loader.conf +# echo "console=\"comconsole\"" >> ${dst}/boot/loader.conf +local blf="loader* *.4th" # loader.rc loader.4th support.4th" +(cd /boot; cp -p loader ${dst}/boot) || fail $? no_space "copying bootloader" +cp ${MY_TREE}/floppy.tree/boot/loader.conf ${dst}/boot || true gzip -c kernel > ${dst}/boot/kernel/kernel.gz || fail $? no_space "copying kernel" # now transfer the floppy tree. If it is already in mfs, dont bother. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255314 - head/release/picobsd/build
Author: luigi Date: Fri Sep 6 17:18:43 2013 New Revision: 255314 URL: http://svnweb.freebsd.org/changeset/base/255314 Log: generate multiple host keys and do that unconditionally Modified: head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/picobsd == --- head/release/picobsd/build/picobsd Fri Sep 6 17:16:33 2013 (r255313) +++ head/release/picobsd/build/picobsd Fri Sep 6 17:18:43 2013 (r255314) @@ -693,17 +693,22 @@ populate_mfs_tree() { # rm $a # do not remove! ) || fail $? crunch -if [ -f ${dst}/stand/sshd ] ; then - log "Setting up host key for sshd:" - if [ -f ${BUILDDIR}/floppy.tree/etc/ssh_host_key.gz ] ; then - log "Using existing host key" +log "Setting up host key for sshd:" +for K in rsa1 rsa dsa ; do + if [ $K = rsa1 ] ; then + i=ssh_host_key else - log "Generating new host key" - ssh-keygen -t rsa1 -f ${BUILDDIR}/floppy.tree/etc/ssh_host_key \ --N "" -C "root@picobsd" - gzip -9 ${BUILDDIR}/floppy.tree/etc/ssh_host_key* || true + i=ssh_host_${K}_key fi -fi + if [ -f ${BUILDDIR}/floppy.tree/etc/$i.gz ] ; then + log "Using existing host key $i" + else + log "Generating new host key $i" + ssh-keygen -t $K -f ${BUILDDIR}/floppy.tree/etc/$i \ +-N "" -C "root@picobsd" + gzip -9 ${BUILDDIR}/floppy.tree/etc/${i}* || true + fi +done log "Copy generic and site-specific MFS tree..." for MFS_TREE in ${PICO_TREE}/mfs_tree ${MY_TREE}/mfs_tree ; do ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255337 - head/sys/netinet
Author: tuexen Date: Sat Sep 7 00:45:24 2013 New Revision: 255337 URL: http://svnweb.freebsd.org/changeset/base/255337 Log: When computing the partial delivery point, take the receiver socket buffer size correctly into account. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c == --- head/sys/netinet/sctp_indata.c Fri Sep 6 23:49:54 2013 (r255336) +++ head/sys/netinet/sctp_indata.c Sat Sep 7 00:45:24 2013 (r255337) @@ -789,13 +789,12 @@ doit_again: * but should we? */ if (stcb->sctp_socket) { - pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket), + pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT, stcb->sctp_ep->partial_delivery_point); } else { pd_point = stcb->sctp_ep->partial_delivery_point; } if (sctp_is_all_msg_on_reasm(asoc, &tsize) || (tsize >= pd_point)) { - /* * Yes, we setup to start reception, by * backing down the TSN just in case we @@ -2491,7 +2490,7 @@ doit_again: * delivery queue and something can be delivered. */ if (stcb->sctp_socket) { - pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket), + pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT, stcb->sctp_ep->partial_delivery_point); } else { pd_point = stcb->sctp_ep->partial_delivery_point; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255338 - head/sys/fs/ext2fs
Author: pfg Date: Sat Sep 7 02:45:51 2013 New Revision: 255338 URL: http://svnweb.freebsd.org/changeset/base/255338 Log: ext2fs: temporarily disable htree directory index. Our code does not consider yet the case of hash collisions. This is a rather annoying situation where two or more files that happen to have the same hash value will not appear accessible. The situation is not difficult to work-around but given that things will just work without enabling htree we will save possible embarrassments for the next release. Reported by: Kevin Lo Modified: head/sys/fs/ext2fs/ext2_htree.c head/sys/fs/ext2fs/ext2_lookup.c Modified: head/sys/fs/ext2fs/ext2_htree.c == --- head/sys/fs/ext2fs/ext2_htree.c Sat Sep 7 00:45:24 2013 (r255337) +++ head/sys/fs/ext2fs/ext2_htree.c Sat Sep 7 02:45:51 2013 (r255338) @@ -89,10 +89,12 @@ static int ext2_htree_writebuf(struct ex int ext2_htree_has_idx(struct inode *ip) { +#ifdef EXT2FS_HTREE if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && ip->i_flags & EXT4_INDEX) return (1); else +#endif return (0); } Modified: head/sys/fs/ext2fs/ext2_lookup.c == --- head/sys/fs/ext2fs/ext2_lookup.cSat Sep 7 00:45:24 2013 (r255337) +++ head/sys/fs/ext2fs/ext2_lookup.cSat Sep 7 02:45:51 2013 (r255338) @@ -884,6 +884,7 @@ ext2_direnter(struct inode *ip, struct v bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1); newentrysize = EXT2_DIR_REC_LEN(newdir.e2d_namlen); +#ifdef EXT2FS_HTREE if (ext2_htree_has_idx(dp)) { error = ext2_htree_add_entry(dvp, &newdir, cnp); if (error) { @@ -904,6 +905,7 @@ ext2_direnter(struct inode *ip, struct v return ext2_htree_create_index(dvp, cnp, &newdir); } } +#endif /* EXT2FS_HTREE */ if (dp->i_count == 0) { /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255339 - head/sbin/newfs_msdos
Author: pfg Date: Sat Sep 7 03:10:12 2013 New Revision: 255339 URL: http://svnweb.freebsd.org/changeset/base/255339 Log: newfs_msdos: fix inaccurate comments. The fields from deMTime and deMDate in the DOS directory entry are actually the last-modified time/date. According to some online documentation these are the only timestamps available in FAT12/FAT16. MFC after:3 days Modified: head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/newfs_msdos.c == --- head/sbin/newfs_msdos/newfs_msdos.c Sat Sep 7 02:45:51 2013 (r255338) +++ head/sbin/newfs_msdos/newfs_msdos.c Sat Sep 7 03:10:12 2013 (r255339) @@ -139,8 +139,8 @@ struct de { u_int8_t deName[11]; /* name and extension */ u_int8_t deAttributes; /* attributes */ u_int8_t rsvd[10]; /* reserved */ -u_int8_t deMTime[2]; /* creation time */ -u_int8_t deMDate[2]; /* creation date */ +u_int8_t deMTime[2]; /* last-modified time */ +u_int8_t deMDate[2]; /* last-modified date */ u_int8_t deStartCluster[2];/* starting cluster */ u_int8_t deFileSize[4];/* size */ } __packed; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255340 - head/usr.sbin/bsdconfig/examples
Author: dteske Date: Sat Sep 7 03:24:22 2013 New Revision: 255340 URL: http://svnweb.freebsd.org/changeset/base/255340 Log: Long URLs don't always appear even with autosizing and other tricks. So, add some whitespace to put the URL on a line by itself, maximizing view. Modified: head/usr.sbin/bsdconfig/examples/browse_packages.sh Modified: head/usr.sbin/bsdconfig/examples/browse_packages.sh == --- head/usr.sbin/bsdconfig/examples/browse_packages.sh Sat Sep 7 03:10:12 2013(r255339) +++ head/usr.sbin/bsdconfig/examples/browse_packages.sh Sat Sep 7 03:24:22 2013(r255340) @@ -17,7 +17,7 @@ if [ ! -e "$TMPDIR/packages/INDEX" ]; th # For older releases, use ftp://ftp-archive.freebsd.org mediaSetFTP mediaOpen - f_show_info "Downloading packages/INDEX from %s" "$_ftpPath" + f_show_info "Downloading packages/INDEX from\n %s" "$_ftpPath" f_device_get media packages/INDEX > $TMPDIR/packages/INDEX mediaClose fi ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255341 - head/usr.sbin/bsdconfig/examples
Author: dteske Date: Sat Sep 7 03:27:13 2013 New Revision: 255341 URL: http://svnweb.freebsd.org/changeset/base/255341 Log: Remove unnecessary mediaClose (FTP operations are done with either ftp(1) or fetch(1), neither of which are stateful, compared to how sysinstall(8) did FTP operations, maintaining an open session until mediaClose). Modified: head/usr.sbin/bsdconfig/examples/browse_packages.sh Modified: head/usr.sbin/bsdconfig/examples/browse_packages.sh == --- head/usr.sbin/bsdconfig/examples/browse_packages.sh Sat Sep 7 03:24:22 2013(r255340) +++ head/usr.sbin/bsdconfig/examples/browse_packages.sh Sat Sep 7 03:27:13 2013(r255341) @@ -19,7 +19,6 @@ if [ ! -e "$TMPDIR/packages/INDEX" ]; th mediaOpen f_show_info "Downloading packages/INDEX from\n %s" "$_ftpPath" f_device_get media packages/INDEX > $TMPDIR/packages/INDEX - mediaClose fi _directoryPath=$TMPDIR mediaSetDirectory ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255342 - head/sys/amd64/vmm/io
Author: grehan Date: Sat Sep 7 03:33:36 2013 New Revision: 255342 URL: http://svnweb.freebsd.org/changeset/base/255342 Log: Mask off the vector from the MSI-x data word. Some o/s's set the trigger-mode level bit which results in an invalid vector and pass-thru interrupts not being delivered. Modified: head/sys/amd64/vmm/io/ppt.c Modified: head/sys/amd64/vmm/io/ppt.c == --- head/sys/amd64/vmm/io/ppt.c Sat Sep 7 03:27:13 2013(r255341) +++ head/sys/amd64/vmm/io/ppt.c Sat Sep 7 03:33:36 2013(r255342) @@ -568,7 +568,7 @@ ppt_setup_msix(struct vm *vm, int vcpu, return (ENXIO); ppt->msix.arg[idx].pptdev = ppt; - ppt->msix.arg[idx].vec = msg; + ppt->msix.arg[idx].vec = msg & 0xFF; ppt->msix.arg[idx].vcpu = (addr >> 12) & 0xFF; /* Setup the MSI-X interrupt */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255343 - head/sys/amd64/vmm/intel
Author: neel Date: Sat Sep 7 05:30:34 2013 New Revision: 255343 URL: http://svnweb.freebsd.org/changeset/base/255343 Log: Allocate VPIDs by using the unit number allocator to keep do the bookkeeping. Also deal with VPID exhaustion by allocating out of a reserved range as the last resort. Modified: head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/vmm/intel/vmx.c == --- head/sys/amd64/vmm/intel/vmx.c Sat Sep 7 03:33:36 2013 (r255342) +++ head/sys/amd64/vmm/intel/vmx.c Sat Sep 7 05:30:34 2013 (r255343) @@ -138,8 +138,6 @@ SYSCTL_ULONG(_hw_vmm_vmx, OID_AUTO, cr4_ SYSCTL_ULONG(_hw_vmm_vmx, OID_AUTO, cr4_zeros_mask, CTLFLAG_RD, &cr4_zeros_mask, 0, NULL); -static volatile u_int nextvpid; - static int vmx_no_patmsr; static int vmx_initialized; @@ -172,6 +170,11 @@ static int cap_monitor_trap; /* statistics */ static VMM_STAT_INTEL(VMEXIT_HLT_IGNORED, "number of times hlt was ignored"); +static struct unrhdr *vpid_unr; +static u_int vpid_alloc_failed; +SYSCTL_UINT(_hw_vmm_vmx, OID_AUTO, vpid_alloc_failed, CTLFLAG_RD, + &vpid_alloc_failed, 0, NULL); + #ifdef KTR static const char * exit_reason_to_str(int reason) @@ -382,6 +385,88 @@ vmx_fix_cr4(u_long cr4) } static void +vpid_free(int vpid) +{ + if (vpid < 0 || vpid > 0x) + panic("vpid_free: invalid vpid %d", vpid); + + /* +* VPIDs [0,VM_MAXCPU] are special and are not allocated from +* the unit number allocator. +*/ + + if (vpid > VM_MAXCPU) + free_unr(vpid_unr, vpid); +} + +static void +vpid_alloc(uint16_t *vpid, int num) +{ + int i, x; + + if (num <= 0 || num > VM_MAXCPU) + panic("invalid number of vpids requested: %d", num); + + /* +* If the "enable vpid" execution control is not enabled then the +* VPID is required to be 0 for all vcpus. +*/ + if ((procbased_ctls2 & PROCBASED2_ENABLE_VPID) == 0) { + for (i = 0; i < num; i++) + vpid[i] = 0; + return; + } + + /* +* Allocate a unique VPID for each vcpu from the unit number allocator. +*/ + for (i = 0; i < num; i++) { + x = alloc_unr(vpid_unr); + if (x == -1) + break; + else + vpid[i] = x; + } + + if (i < num) { + atomic_add_int(&vpid_alloc_failed, 1); + + /* +* If the unit number allocator does not have enough unique +* VPIDs then we need to allocate from the [1,VM_MAXCPU] range. +* +* These VPIDs are not be unique across VMs but this does not +* affect correctness because the combined mappings are also +* tagged with the EP4TA which is unique for each VM. +* +* It is still sub-optimal because the invvpid will invalidate +* combined mappings for a particular VPID across all EP4TAs. +*/ + while (i-- > 0) + vpid_free(vpid[i]); + + for (i = 0; i < num; i++) + vpid[i] = i + 1; + } +} + +static void +vpid_init(void) +{ + /* +* VPID 0 is required when the "enable VPID" execution control is +* disabled. +* +* VPIDs [1,VM_MAXCPU] are used as the "overflow namespace" when the +* unit number allocator does not have sufficient unique VPIDs to +* satisfy the allocation. +* +* The remaining VPIDs are managed by the unit number allocator. +*/ + vpid_unr = new_unrhdr(VM_MAXCPU + 1, 0x, NULL); +} + +static void msr_save_area_init(struct msr_entry *g_area, int *g_count) { int cnt; @@ -422,6 +507,11 @@ static int vmx_cleanup(void) { + if (vpid_unr != NULL) { + delete_unrhdr(vpid_unr); + vpid_unr = NULL; + } + smp_rendezvous(NULL, vmx_disable, NULL, NULL); return (0); @@ -607,6 +697,8 @@ vmx_init(void) cr4_ones_mask = fixed0 & fixed1; cr4_zeros_mask = ~fixed0 & ~fixed1; + vpid_init(); + /* enable VMX operation */ smp_rendezvous(NULL, vmx_enable, NULL, NULL); @@ -615,37 +707,6 @@ vmx_init(void) return (0); } -/* - * If this processor does not support VPIDs then simply return 0. - * - * Otherwise generate the next value of VPID to use. Any value is alright - * as long as it is non-zero. - * - * We always execute in VMX non-root context with EPT enabled. Thus all - * combined mappings are tagged with the (EP4TA, VPID, PCID) tuple. This - * in turn means that multiple VMs can share the same VPID as long as - * they have distinct EPT page tables. - * - * XXX - * We should optimize this so tha
svn commit: r255344 - head/sbin/camcontrol
Author: joel (doc committer) Date: Sat Sep 7 05:44:53 2013 New Revision: 255344 URL: http://svnweb.freebsd.org/changeset/base/255344 Log: - Begin sentence on a new line. - Minor language fixes. Modified: head/sbin/camcontrol/camcontrol.8 Modified: head/sbin/camcontrol/camcontrol.8 == --- head/sbin/camcontrol/camcontrol.8 Sat Sep 7 05:30:34 2013 (r255343) +++ head/sbin/camcontrol/camcontrol.8 Sat Sep 7 05:44:53 2013 (r255344) @@ -662,7 +662,8 @@ request and not expect CRC bytes to be r .Bl -tag -width 17n .It Fl r Ar len Ar fmt Op args This specifies the size of the SMP request, without the CRC bytes, and the -SMP request format. If the format is +SMP request format. +If the format is .Sq - , .Ar len bytes of data will be read from standard input and written as the SMP @@ -1152,7 +1153,8 @@ argument. The number of passes when performing an .Sq overwrite operation. -Valid values are between 1 and 31. The default is 1. +Valid values are between 1 and 31. +The default is 1. .It Fl I When performing an .Sq overwrite @@ -1212,15 +1214,20 @@ will not be asked about the timeout if a command line. .El .It Ic idle -Put ATA device into IDLE state. Optional parameter +Put ATA device into IDLE state. +Optional parameter .Pq Fl t -specifies automatic standby timer value in seconds. Value 0 disables timer. +specifies automatic standby timer value in seconds. +Value 0 disables timer. .It Ic standby -Put ATA device into STANDBY state. Optional parameter +Put ATA device into STANDBY state. +Optional parameter .Pq Fl t -specifies automatic standby timer value in seconds. Value 0 disables timer. +specifies automatic standby timer value in seconds. +Value 0 disables timer. .It Ic sleep -Put ATA device into SLEEP state. Note that the only way get device out of +Put ATA device into SLEEP state. +Note that the only way get device out of this state may be reset. .It Ic security Update or report security settings, using an ATA identify command (0xec). @@ -1246,7 +1253,8 @@ Issuing a secure erase will user data on the device and may take several hours to complete. .Pp When this command is used against an SSD drive all its cells will be marked as -empty, restoring it to factory default write performance. For SSD's this action +empty, restoring it to factory default write performance. +For SSD's this action usually takes just a few seconds. .It Fl f .Pp @@ -1276,8 +1284,10 @@ the devices configured security level. .Pp Specifies which security level to set when issuing a .Fl s Ar pwd -command. The security level determines device behavior when the master -password is used to unlock the device. When the security level is set to high +command. +The security level determines device behavior when the master +password is used to unlock the device. +When the security level is set to high the device requires the unlock command and the master password to unlock. When the security level is set to maximum the device requires a secure erase with the master password to unlock. @@ -1296,7 +1306,8 @@ argument, below. .It Fl s Ar pwd .Pp Password the device (enable security) using the given password for the selected -user. This option can be combined with other options such as +user. +This option can be combined with other options such as .Fl e Em pwd .Pp A master password may be set in a addition to the user password. The purpose of @@ -1335,7 +1346,7 @@ Confirm yes to dangerous options such as without prompting for confirmation. .Pp .El -If the password specified for any action commands doesn't match the configured +If the password specified for any action commands does not match the configured password for the specified user the command will fail. .Pp The password in all cases is limited to 32 characters, longer passwords will @@ -1392,7 +1403,7 @@ call can be made without a power-on rese .It Fl U Ar pwd .Pp Unlock the HPA configuration of the specified device using the given password. -If the password specified doesn't match the password configured via +If the password specified does not match the password configured via .Fl p Ar pwd the command will fail. .Pp @@ -1599,7 +1610,7 @@ This will .Em ERASE ALL data from the device, so backup your data before using! .Pp -This command can be used used against an SSD drive to restoring it to +This command can be used against an SSD drive to restoring it to factory default write performance. .Bd -literal -offset indent camcontrol hpa ada0 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r255347 - head/sys/dev/usb/controller
Author: hselasky Date: Sat Sep 7 06:53:59 2013 New Revision: 255347 URL: http://svnweb.freebsd.org/changeset/base/255347 Log: Disable USB 3.0 streams mode by default, hence not all XHCI chipsets implement it to avoid undefined behaviour. Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c == --- head/sys/dev/usb/controller/xhci.c Sat Sep 7 06:41:22 2013 (r255346) +++ head/sys/dev/usb/controller/xhci.c Sat Sep 7 06:53:59 2013 (r255347) @@ -87,12 +87,18 @@ ((struct xhci_softc *)(((uint8_t *)(bus)) - \ ((uint8_t *)&(((struct xhci_softc *)0)->sc_bus +static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI"); + +static int xhcistreams; +SYSCTL_INT(_hw_usb_xhci, OID_AUTO, streams, CTLFLAG_RW | CTLFLAG_TUN, +&xhcistreams, 0, "Set to enable streams mode support"); +TUNABLE_INT("hw.usb.xhci.streams", &xhcistreams); + #ifdef USB_DEBUG static int xhcidebug; static int xhciroute; static int xhcipolling; -static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI"); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &xhcidebug, 0, "Debug level"); TUNABLE_INT("hw.usb.xhci.debug", &xhcidebug); @@ -4127,7 +4133,8 @@ xhci_set_endpoint_mode(struct usb_device case USB_EP_MODE_DEFAULT: return (0); case USB_EP_MODE_STREAMS: - if ((ep->edesc->bmAttributes & UE_XFERTYPE) != UE_BULK || + if (xhcistreams == 0 || + (ep->edesc->bmAttributes & UE_XFERTYPE) != UE_BULK || udev->speed != USB_SPEED_SUPER) return (USB_ERR_INVAL); return (0); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"