Re: svn commit: r229416 - head/sys/dev/tws
on 03/01/2012 22:17 Xin LI said the following: > Author: delphij > Date: Tue Jan 3 20:17:35 2012 > New Revision: 229416 > URL: http://svn.freebsd.org/changeset/base/229416 > > Log: > Don't forget to release queue lock when allocation of memory failed. > > Submitted by: Sascha Wildner > Obtained from: DragonFly > MFC after: 2 weeks > > Modified: > head/sys/dev/tws/tws.c > > Modified: head/sys/dev/tws/tws.c > == > --- head/sys/dev/tws/tws.cTue Jan 3 19:47:32 2012(r229415) > +++ head/sys/dev/tws/tws.cTue Jan 3 20:17:35 2012(r229416) > @@ -685,6 +685,7 @@ tws_init_reqs(struct tws_softc *sc, u_in > { > if (bus_dmamap_create(sc->data_tag, 0, &sc->reqs[i].dma_map)) { > /* log a ENOMEM failure msg here */ > + mtx_unlock(&sc->q_lock); At least here it looks like the new line has inconsistent whitespace indentation. > return(FAILURE); > } > sc->reqs[i].cmd_pkt = &cmd_buf[i]; -- Andriy Gapon ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229805 - in head/sys: netinet netinet6
Author: tuexen Date: Sun Jan 8 09:56:24 2012 New Revision: 229805 URL: http://svn.freebsd.org/changeset/base/229805 Log: Add an SCTP sysctl "blackhole", similar to the one for TCP. If set to 1, no ABORT is sent back in response to an incoming INIT. If set to 2, no ABORT is sent back in response to an out of the blue packet. If set to 0 (the default), ABORTs are sent. Discussed with rrs@. MFC after: 1 month. Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h head/sys/netinet/sctputil.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_input.c == --- head/sys/netinet/sctp_input.c Sun Jan 8 07:51:40 2012 (r229804) +++ head/sys/netinet/sctp_input.c Sun Jan 8 09:56:24 2012 (r229805) @@ -170,8 +170,9 @@ sctp_handle_init(struct mbuf *m, int iph * accepts(). The App just looses and should NOT be in this * state :-) */ - sctp_abort_association(inp, stcb, m, iphlen, sh, NULL, - vrf_id, port); + if (SCTP_BASE_SYSCTL(sctp_blackhole) == 0) { + sctp_send_abort(m, iphlen, sh, 0, NULL, vrf_id, port); + } goto outnow; } if ((stcb != NULL) && @@ -5927,8 +5928,13 @@ sctp_skip_csum_4: if (ch->chunk_type == SCTP_SHUTDOWN_COMPLETE) { goto bad; } - if (ch->chunk_type != SCTP_ABORT_ASSOCIATION) - sctp_send_abort(m, iphlen, sh, 0, NULL, vrf_id, port); + if (ch->chunk_type != SCTP_ABORT_ASSOCIATION) { + if ((SCTP_BASE_SYSCTL(sctp_blackhole) == 0) || + ((SCTP_BASE_SYSCTL(sctp_blackhole) == 1) && + (ch->chunk_type != SCTP_INIT))) { + sctp_send_abort(m, iphlen, sh, 0, NULL, vrf_id, port); + } + } goto bad; } else if (stcb == NULL) { refcount_up = 1; Modified: head/sys/netinet/sctp_sysctl.c == --- head/sys/netinet/sctp_sysctl.c Sun Jan 8 07:51:40 2012 (r229804) +++ head/sys/netinet/sctp_sysctl.c Sun Jan 8 09:56:24 2012 (r229805) @@ -117,6 +117,7 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_rttvar_eqret) = SCTPCTL_RTTVAR_EQRET_DEFAULT; SCTP_BASE_SYSCTL(sctp_steady_step) = SCTPCTL_RTTVAR_STEADYS_DEFAULT; SCTP_BASE_SYSCTL(sctp_use_dccc_ecn) = SCTPCTL_RTTVAR_DCCCECN_DEFAULT; + SCTP_BASE_SYSCTL(sctp_blackhole) = SCTPCTL_BLACKHOLE_DEFAULT; #if defined(SCTP_LOCAL_TRACE_BUF) memset(&SCTP_BASE_SYSCTL(sctp_log), 0, sizeof(struct sctp_log)); @@ -665,6 +666,7 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS) RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), SCTPCTL_MOBILITY_FASTHANDOFF_MIN, SCTPCTL_MOBILITY_FASTHANDOFF_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_enable_sack_immediately), SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN, SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX); RANGECHK(SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly), SCTPCTL_NAT_FRIENDLY_INITS_MIN, SCTPCTL_NAT_FRIENDLY_INITS_MAX); + RANGECHK(SCTP_BASE_SYSCTL(sctp_blackhole), SCTPCTL_BLACKHOLE_MIN, SCTPCTL_BLACKHOLE_MAX); #ifdef SCTP_DEBUG RANGECHK(SCTP_BASE_SYSCTL(sctp_debug_on), SCTPCTL_DEBUG_MIN, SCTPCTL_DEBUG_MAX); @@ -1123,6 +1125,10 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUT &SCTP_BASE_SYSCTL(sctp_use_dccc_ecn), 0, sysctl_sctp_check, "IU", SCTPCTL_RTTVAR_DCCCECN_DESC); +SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, blackhole, CTLTYPE_UINT | CTLFLAG_RW, +&SCTP_BASE_SYSCTL(sctp_blackhole), 0, sysctl_sctp_check, "IU", +SCTPCTL_BLACKHOLE_DESC); + #ifdef SCTP_DEBUG SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, debug, CTLTYPE_UINT | CTLFLAG_RW, &SCTP_BASE_SYSCTL(sctp_debug_on), 0, sysctl_sctp_check, "IU", Modified: head/sys/netinet/sctp_sysctl.h == --- head/sys/netinet/sctp_sysctl.h Sun Jan 8 07:51:40 2012 (r229804) +++ head/sys/netinet/sctp_sysctl.h Sun Jan 8 09:56:24 2012 (r229805) @@ -114,6 +114,7 @@ struct sctp_sysctl { uint32_t sctp_vtag_time_wait; uint32_t sctp_buffer_splitting; uint32_t sctp_initial_cwnd; + uint32_t sctp_blackhole; #if defined(SCTP_DEBUG) uint32_t sctp_debug_on; #endif @@ -519,6 +520,11 @@ struct sctp_sysctl { #define SCTPCTL_RTTVAR_DCCCECN_MAX 1 #define SCTPCTL_RTTVAR_DCCCECN_DEFAULT 1 /* 0 means disable feature */ +#define SCTPCTL_BLACKHOLE_DESC "Enable SCTP blackholing" +#define SCTPCTL_BLACKHOLE_MIN 0 +#define SCT
Re: svn commit: r229794 - head/usr.bin/hexdump
Log: - Fix how hexdump parses escape strings From the NetBSD bug: The way how hexdump(1) parses escape sequences has some bugs. It shows up when an escape sequence is used as the non-last character of a format string. PR:bin/144722 Submitted by: gcooper Approved by: rpaulo Obtained from: NetBSD MFC after: 1 week This has lots of style bugs. Modified: head/usr.bin/hexdump/parse.c == --- head/usr.bin/hexdump/parse.cSat Jan 7 22:29:46 2012 (r229793) +++ head/usr.bin/hexdump/parse.cSat Jan 7 23:15:21 2012 (r229794) @@ -255,7 +255,9 @@ rewrite(FS *fs) sokay = NOTOKAY; } - p2 = p1 + 1;/* Set end pointer. */ + p2 = *p1 ? p1 + 1 : p1; /* Set end pointer -- make sure +* that it's non-NUL/-NULL first +* though. */ cs[0] = *p1;/* Set conversion string. */ cs[1] = '\0'; Comments to the right of code should be used less than was already done here. Large comments should never be to the right of code. They cause formatting problems, as the above shows. The "it" in the comment doesn't match its subject. Its subject is the end pointer, but "it" is meant to refer to the first byte of the string. Perhaps contractions like "it's" should be avoided in comments for the same reason as in man pages (they are harder to parse for non-native speakers). And parsing this one shows that the "it" is wrong. The comment doesn't match the code. The code doesn't have any NULL pointer check. And a null pointer check makes no sense, since the old code derefences p1 without checking for that, and the new code adds another dereference. The test of *p1 is a boolean test in non-boolean context. But nearby code has the same style bug, in the much more non-idiomatic form `!*p'. Fixing these style bugs gives something like: %%% /* * Set end pointer. First make sure that p1 is not * the empty string.. */ p2 = *p1 == '\0' ? p1 + p1 + 1; /* Set conversion string. */ cs[0] = *p1; cs[1] = '\0'; %%% Possible furthe improvements: - some programmers can't would add unnecessary parentheses for the ?: operator. Even I might add them. - it might be clearer to set the conversion string first and then use cs[0] instead of *p1 twice. @@ -449,13 +451,21 @@ escape(char *p1) char *p2; /* alphabetic escape sequences have to be done in place */ - for (p2 = p1;; ++p1, ++p2) { - if (!*p1) { - *p2 = *p1; - break; - } - if (*p1 == '\\') - switch(*++p1) { + for (p2 = p1; *p1; p1++, p2++) { + /* +* Let's take a peak at the next item and see whether or not +* we need to escape the value... +*/ This comment is very verbose, starting with the noise words "Let's". This comment mispells "peek". "Peek" is another chatty word. The keyboard has excessive repeat on its "." key. There is no reason to use an ellipsis here. + if (*p1 == '\\') { + + p1++; + The keyboard also dribbles newlines. 2 instances here. + switch(*p1) { + /* A standalone `\' */ + case '\0': Previous comment is misplaced and misindented. It should be here. It should be terminated by a ".". Perhaps the backslash in it should be quoted. + *p2 = '\\'; + *++p2 = '\0'; It's not clear why this doesn't give a buffer overrun. It writes past the end of a string. This is only safe if the caller allocated space beyond the end of the string. cs[] is allocated locally, and it is clear that it has space for just 1 byte of expansion. + break; case 'a': /* *p2 = '\a'; */ *p2 = '\007'; @@ -482,7 +492,12 @@ escape(char *p1) *p2 = *p1; break; } + + } else + *p2 = *p1; + 2 more extra newline. } + 1 more extra newline. } void Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r229794 - head/usr.bin/hexdump
On Sun, 8 Jan 2012, Bruce Evans wrote: ... Fixing these style bugs gives something like: %%% /* * Set end pointer. First make sure that p1 is not * the empty string.. */ p2 = *p1 == '\0' ? p1 + p1 + 1; Grr, typo. One of the `+'s should be `:'. I hope I inverted the logic of this expression correctly. /* Set conversion string. */ cs[0] = *p1; cs[1] = '\0'; %%% Possible furthe improvements: - some programmers can't would add unnecessary parentheses for the ?: operator. Even I might add them. Since I changed `*p1' to `*p1 == `\0'' and inverted the logic, it has an extra operator so it needs the parentheses more than before: p2 = (*p1 == '\0' ? p1 : p1 + 1); Not: p2 = (*p1 == '\0') ? p1 : p1 + 1; (since this adds parentheses where they are least needed), or p2 = ((*p1 == '\0') ? p1 : p1 + 1); (since this adds layers of parentheses which must be parsed to see where they actually are). Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r229800 - head/sys/conf
On Sun, Jan 08, 2012 at 12:55:22AM +, Adrian Chadd wrote: > Author: adrian > Date: Sun Jan 8 00:55:22 2012 > New Revision: 229800 > URL: http://svn.freebsd.org/changeset/base/229800 > > Log: > Make these two files conditionally build on UFS_ACL, as it doesn't > seem to be used elsewhere. > > Since UFS_ACL is enabled by default for GENERIC kernels, this shouldn't > break anything - but please beat me to fix things if it does. If someone is actually using GENERIC kernel. This change will break all my system next time I upgrade. Adding UFS_ACL option to the kernel config to make ZFS kernel module to work doesn't sound very intuitive. I understand what you are trying to accomplish, but we really need to find better way to do this. Until then, could you back it out? > This reduces the footprint of the kernel on small embedded systems > (think <1MB flash for the compressed kernel image) just enough to > actually fit. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpUARkgwvlkF.pgp Description: PGP signature
svn commit: r229806 - in head/lib/libc: powerpc/gen powerpc64/gen
Author: andreast Date: Sun Jan 8 11:57:38 2012 New Revision: 229806 URL: http://svn.freebsd.org/changeset/base/229806 Log: Two other places where we can use WEAK_ALIAS. Modified: head/lib/libc/powerpc/gen/setjmp.S head/lib/libc/powerpc64/gen/setjmp.S Modified: head/lib/libc/powerpc/gen/setjmp.S == --- head/lib/libc/powerpc/gen/setjmp.S Sun Jan 8 09:56:24 2012 (r229805) +++ head/lib/libc/powerpc/gen/setjmp.S Sun Jan 8 11:57:38 2012 (r229806) @@ -69,8 +69,7 @@ ENTRY(setjmp) li %r3,0 /* return (0) */ blr - .weak CNAME(longjmp) - .set CNAME(longjmp),CNAME(__longjmp) + WEAK_ALIAS(longjmp, __longjmp) ENTRY(__longjmp) lmw %r9,20(%r3) /* restore regs */ mr %r6,%r4 /* save val param */ Modified: head/lib/libc/powerpc64/gen/setjmp.S == --- head/lib/libc/powerpc64/gen/setjmp.SSun Jan 8 09:56:24 2012 (r229805) +++ head/lib/libc/powerpc64/gen/setjmp.SSun Jan 8 11:57:38 2012 (r229806) @@ -93,10 +93,7 @@ ENTRY(setjmp) li %r3,0 /* return (0) */ blr - .weak CNAME(longjmp) - .set CNAME(longjmp),CNAME(__longjmp) - .weak CNAME(.longjmp) - .set CNAME(.longjmp),CNAME(.__longjmp) + WEAK_ALIAS(longjmp, __longjmp) ENTRY(__longjmp) ld %r9,40 + 0*8(%r3) ld %r10,40 + 1*8(%r3) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229807 - head/include
Author: ed Date: Sun Jan 8 12:03:46 2012 New Revision: 229807 URL: http://svn.freebsd.org/changeset/base/229807 Log: Fix spelling of C11 and sort functions by name. Modified: head/include/stdlib.h Modified: head/include/stdlib.h == --- head/include/stdlib.h Sun Jan 8 11:57:38 2012(r229806) +++ head/include/stdlib.h Sun Jan 8 12:03:46 2012(r229807) @@ -149,12 +149,12 @@ _Noreturn void _Exit(int); #endif /* __ISO_C_VISIBLE >= 1999 */ /* - * If we're in a mode greater than C99, expose C1x functions. + * If we're in a mode greater than C99, expose C11 functions. */ #if __ISO_C_VISIBLE >= 2011 +intat_quick_exit(void (*)(void)); _Noreturn void quick_exit(int); -intat_quick_exit(void (*)(void)); #endif /* __ISO_C_VISIBLE >= 2011 */ /* * Extensions made by POSIX relative to C. We don't know yet which edition ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229808 - head/lib/libc/stdlib
Author: ed Date: Sun Jan 8 12:04:22 2012 New Revision: 229808 URL: http://svn.freebsd.org/changeset/base/229808 Log: Properly sort functions by name. Modified: head/lib/libc/stdlib/Symbol.map Modified: head/lib/libc/stdlib/Symbol.map == --- head/lib/libc/stdlib/Symbol.map Sun Jan 8 12:03:46 2012 (r229807) +++ head/lib/libc/stdlib/Symbol.map Sun Jan 8 12:04:22 2012 (r229808) @@ -93,18 +93,18 @@ FBSD_1.0 { }; FBSD_1.3 { + at_quick_exit; atof_l; atoi_l; atol_l; atoll_l; - at_quick_exit; quick_exit; strtod_l; - strtol_l; - strtoll_l; strtof_l; strtoimax_l; + strtol_l; strtold_l; + strtoll_l; strtoq_l; strtoul_l; strtoull_l; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229809 - head/gnu/usr.bin/cvs/lib
Author: ed Date: Sun Jan 8 12:38:41 2012 New Revision: 229809 URL: http://svn.freebsd.org/changeset/base/229809 Log: Don't include . Including this header file causes a compilation warning. The code builds perfectly fine without this header file. Modified: head/gnu/usr.bin/cvs/lib/config.h.proto Modified: head/gnu/usr.bin/cvs/lib/config.h.proto == --- head/gnu/usr.bin/cvs/lib/config.h.proto Sun Jan 8 12:04:22 2012 (r229808) +++ head/gnu/usr.bin/cvs/lib/config.h.proto Sun Jan 8 12:38:41 2012 (r229809) @@ -324,7 +324,7 @@ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMEB_H 1 +/* #undef HAVE_SYS_TIMEB_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229810 - in head/sys: net netinet
Author: glebius Date: Sun Jan 8 13:34:00 2012 New Revision: 229810 URL: http://svn.freebsd.org/changeset/base/229810 Log: Move arprequest() declaration to if_ether.h. Modified: head/sys/net/if_llatbl.c head/sys/netinet/if_ether.c head/sys/netinet/if_ether.h Modified: head/sys/net/if_llatbl.c == --- head/sys/net/if_llatbl.cSun Jan 8 12:38:41 2012(r229809) +++ head/sys/net/if_llatbl.cSun Jan 8 13:34:00 2012(r229810) @@ -65,9 +65,6 @@ MALLOC_DEFINE(M_LLTABLE, "lltable", "lin static VNET_DEFINE(SLIST_HEAD(, lltable), lltables); #defineV_lltables VNET(lltables) -extern void arprequest(struct ifnet *, struct in_addr *, struct in_addr *, - u_char *); - static void vnet_lltable_init(void); struct rwlock lltable_rwlock; Modified: head/sys/netinet/if_ether.c == --- head/sys/netinet/if_ether.c Sun Jan 8 12:38:41 2012(r229809) +++ head/sys/netinet/if_ether.c Sun Jan 8 13:34:00 2012(r229810) @@ -123,8 +123,6 @@ SYSCTL_VNET_INT(_net_link_ether_inet, OI "Number of packets to hold per ARP entry"); static voidarp_init(void); -void arprequest(struct ifnet *, - struct in_addr *, struct in_addr *, u_char *); static voidarpintr(struct mbuf *); static voidarptimer(void *); #ifdef INET Modified: head/sys/netinet/if_ether.h == --- head/sys/netinet/if_ether.h Sun Jan 8 12:38:41 2012(r229809) +++ head/sys/netinet/if_ether.h Sun Jan 8 13:34:00 2012(r229810) @@ -115,6 +115,8 @@ struct ifaddr; intarpresolve(struct ifnet *ifp, struct rtentry *rt, struct mbuf *m, struct sockaddr *dst, u_char *desten, struct llentry **lle); +void arprequest(struct ifnet *, struct in_addr *, struct in_addr *, + u_char *); void arp_ifinit(struct ifnet *, struct ifaddr *); void arp_ifinit2(struct ifnet *, struct ifaddr *, u_char *); void arp_ifscrub(struct ifnet *, uint32_t); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229811 - stable/9/contrib/less
Author: dim Date: Sun Jan 8 13:51:09 2012 New Revision: 229811 URL: http://svn.freebsd.org/changeset/base/229811 Log: MFC r229196: Redo r228645, but instead of casting away const conversion warnings in contrib/less, add a few const qualifiers in the right places. Suggested by: das Modified: stable/9/contrib/less/command.c stable/9/contrib/less/prompt.c Directory Properties: stable/9/contrib/less/ (props changed) Modified: stable/9/contrib/less/command.c == --- stable/9/contrib/less/command.c Sun Jan 8 13:34:00 2012 (r229810) +++ stable/9/contrib/less/command.c Sun Jan 8 13:51:09 2012 (r229811) @@ -105,7 +105,7 @@ cmd_exec() start_mca(action, prompt, mlist, cmdflags) int action; char *prompt; - void *mlist; + void constant *mlist; int cmdflags; { mca = action; @@ -686,7 +686,7 @@ make_display() static void prompt() { - register char *p; + register char constant *p; if (ungot != NULL) { Modified: stable/9/contrib/less/prompt.c == --- stable/9/contrib/less/prompt.c Sun Jan 8 13:34:00 2012 (r229810) +++ stable/9/contrib/less/prompt.c Sun Jan 8 13:51:09 2012 (r229811) @@ -394,9 +394,9 @@ protochar(c, where, iseditproto) * where to resume parsing the string. * We must keep track of nested IFs and skip them properly. */ - static char * + static char constant * skipcond(p) - register char *p; + register char constant *p; { register int iflevel; @@ -452,9 +452,9 @@ skipcond(p) /* * Decode a char that represents a position on the screen. */ - static char * + static char constant * wherechar(p, wp) - char *p; + char constant *p; int *wp; { switch (*p) @@ -478,10 +478,10 @@ wherechar(p, wp) */ public char * pr_expand(proto, maxwidth) - char *proto; + char constant *proto; int maxwidth; { - register char *p; + register char constant *p; register int c; int where; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229812 - stable/9/release/doc/en_US.ISO8859-1/relnotes
Author: hrs Date: Sun Jan 8 13:54:08 2012 New Revision: 229812 URL: http://svn.freebsd.org/changeset/base/229812 Log: Add relnotes items: igb(4) Intel I350 GbE support, re(4) TX IP checksum disabled on RTL8168C-based cards, cc(9) TCP congestion control algorithm framework added, gpart(8) various aliases and bios-boot GUID added, FFS SU+J added, more kern.features.* for UFS-related features, hastd(8) drops root privilege in worker processes, newsyslog(8) xz compression support added, ppp(8) iface name and iface description commands added, sh(1) arithmetic expression handling updated, ISC BIND to 9.8.1-P1, and tzdata2011a. Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 8 13:51:09 2012(r229811) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 8 13:54:08 2012(r229812) @@ -218,6 +218,9 @@ could make AR8152-based network interfaces stop working has been fixed. + The &man.igb.4; driver now supports + Intel I350 PCIe Gigabit Ethernet controller. + The &man.ixgbe.4; driver has been updated to version 2.3.8. @@ -265,9 +268,12 @@ disabled by default because broken frames can be sent under certain conditions. - The &man.re.4; driver now supports - enabling TX and/or RX checksum offloading independently - from each other. + The &man.re.4; driver now + supports enabling TX and/or RX checksum offloading + independently from each other. Note that TX IP checksum + is disabled on some RTL8168C-based network interfaces + because it can generate an wrong IP checksum when the + packet contains IP options. A bug in the &man.re.4; driver has been fixed. It could cause a panic when receiving a jumbo @@ -315,11 +321,39 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile been fixed. The source address selection could not being performed when multicast options were present but without an interface being specified. + + + &os; TCP/IP network stack now supports &man.cc.9; pluggable + congestion control framework. This allows TCP congestion + control algorithms to be implemented as dynamically loadable + kernel modules. The following kernel modules are available + as of &release.current;: &man.cc.chd.4; for + CAIA-Hamilton-Delay algorithm, &man.cc.cubic.4; for CUBIC + algorithm, &man.cc.hd.4; for Hamilton-Delay algorithm, + &man.cc.htcp.4; for H-TCP algorithm, &man.cc.newreno.4; for + NewReno algorithm, and &man.cc.vegas.4; for Vegas algorithm. + The default algorithm can be set by a new &man.sysctl.8; + variable net.inet.tcp.cc.algorithm. The + value must be set to one of the names listed by the + net.inet.tcp.cc.available, and + newreno is set at boot time. For more + detail, see &man.cc.9; manual page. Disks and Storage + The &man.gpart.8; GEOM class now + supports the following aliases for the MBR and EBR schemes: + fat32, ebr, + linux-data, + linux-raid, and + linux-swap. + + The &man.gpart.8; GEOM class now + supports bios-boot GUID for the GPT + scheme which is used in GRUB 2 loader. + The &man.md.4; memory-backed pseudo disk device driver now supports a &man.sysctl.8; variable vm.md_malloc_wait to specify whether a @@ -338,6 +372,17 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile File Systems + The &os; Fast File System now supports + softupdates journaling. It introduces a intent log into a + softupdates-enabled file system which eliminates the need + for background &man.fsck.8; even on unclean shutdown. This + can be enabled in a per-filesystem basis by using a + -j flag in the &man.newfs.8; utility or a + -j enable option in the &man.tunefs.8; + utility. Note that the &release.current; installer + automatically enables the softupdates journaling for + newly-created UFS file systems. + The &os; Fast File System now supports TRIM command when freeing data blocks. A new flag -t in the &man.newfs.8; and @@ -347,8 +392,22 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile block. The TRIM command is specified as Data Set Management Command in ATA8-ACS2 standard to carry the information related to deleted data blocks to device, - e
svn commit: r229813 - stable/8/sys/kern
Author: kib Date: Sun Jan 8 16:47:37 2012 New Revision: 229813 URL: http://svn.freebsd.org/changeset/base/229813 Log: MFC r229185: Avoid double-unlock or double unreference for ndp->ni_dvp when the vnode dp lock upgrade right after the 'success' label fails. Modified: stable/8/sys/kern/vfs_lookup.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/vfs_lookup.c == --- stable/8/sys/kern/vfs_lookup.c Sun Jan 8 13:54:08 2012 (r229812) +++ stable/8/sys/kern/vfs_lookup.c Sun Jan 8 16:47:37 2012 (r229813) @@ -470,12 +470,14 @@ lookup(struct nameidata *ndp) int dvfslocked; /* VFS Giant state for parent */ int tvfslocked; int lkflags_save; + int ni_dvp_unlocked; /* * Setup: break out flag bits into variables. */ dvfslocked = (ndp->ni_cnd.cn_flags & GIANTHELD) != 0; vfslocked = 0; + ni_dvp_unlocked = 0; ndp->ni_cnd.cn_flags &= ~GIANTHELD; wantparent = cnp->cn_flags & (LOCKPARENT | WANTPARENT); KASSERT(cnp->cn_nameiop == LOOKUP || wantparent, @@ -812,8 +814,10 @@ unionlookup: /* * Symlink code always expects an unlocked dvp. */ - if (ndp->ni_dvp != ndp->ni_vp) + if (ndp->ni_dvp != ndp->ni_vp) { VOP_UNLOCK(ndp->ni_dvp, 0); + ni_dvp_unlocked = 1; + } goto success; } @@ -860,14 +864,17 @@ nextname: VREF(ndp->ni_startdir); } if (!wantparent) { + ni_dvp_unlocked = 2; if (ndp->ni_dvp != dp) vput(ndp->ni_dvp); else vrele(ndp->ni_dvp); VFS_UNLOCK_GIANT(dvfslocked); dvfslocked = 0; - } else if ((cnp->cn_flags & LOCKPARENT) == 0 && ndp->ni_dvp != dp) + } else if ((cnp->cn_flags & LOCKPARENT) == 0 && ndp->ni_dvp != dp) { VOP_UNLOCK(ndp->ni_dvp, 0); + ni_dvp_unlocked = 1; + } if (cnp->cn_flags & AUDITVNODE1) AUDIT_ARG_VNODE1(dp); @@ -896,10 +903,12 @@ success: return (0); bad2: - if (dp != ndp->ni_dvp) - vput(ndp->ni_dvp); - else - vrele(ndp->ni_dvp); + if (ni_dvp_unlocked != 2) { + if (dp != ndp->ni_dvp && !ni_dvp_unlocked) + vput(ndp->ni_dvp); + else + vrele(ndp->ni_dvp); + } bad: if (!dpunlocked) vput(dp); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229814 - head/sys/net
Author: glebius Date: Sun Jan 8 17:11:53 2012 New Revision: 229814 URL: http://svn.freebsd.org/changeset/base/229814 Log: Copy ifa->if_data to ifam->ifam_data. This was forgotten in r228571. Submitted by: bz Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c == --- head/sys/net/rtsock.c Sun Jan 8 16:47:37 2012(r229813) +++ head/sys/net/rtsock.c Sun Jan 8 17:11:53 2012(r229814) @@ -1606,6 +1606,7 @@ sysctl_iflist(int af, struct walkarg *w) ifam->ifam_flags = ifa->ifa_flags; ifam->ifam_metric = ifa->ifa_metric; ifam->ifam_addrs = info.rti_addrs; + ifam->ifam_data = ifa->if_data; if (carp_get_vhid_p != NULL) ifam->ifam_data.ifi_vhid = (*carp_get_vhid_p)(ifa); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229815 - head/sys/netinet
Author: glebius Date: Sun Jan 8 17:20:29 2012 New Revision: 229815 URL: http://svn.freebsd.org/changeset/base/229815 Log: Provide IA_MASKSIN() macro similar to IA_SIN() and IA_DSTSIN(). Modified: head/sys/netinet/in_var.h Modified: head/sys/netinet/in_var.h == --- head/sys/netinet/in_var.h Sun Jan 8 17:11:53 2012(r229814) +++ head/sys/netinet/in_var.h Sun Jan 8 17:20:29 2012(r229815) @@ -85,6 +85,7 @@ structin_aliasreq { */ #define IA_SIN(ia)(&(((struct in_ifaddr *)(ia))->ia_addr)) #define IA_DSTSIN(ia) (&(((struct in_ifaddr *)(ia))->ia_dstaddr)) +#define IA_MASKSIN(ia) (&(((struct in_ifaddr *)(ia))->ia_sockmask)) #define IN_LNAOF(in, ifa) \ ((ntohl((in).s_addr) & ~((struct in_ifaddr *)(ifa)->ia_subnetmask)) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229816 - head/sys/netinet
Author: glebius Date: Sun Jan 8 17:25:15 2012 New Revision: 229816 URL: http://svn.freebsd.org/changeset/base/229816 Log: Make it possible to use alternative source hardware address in the ARP datagram generated by arprequest(). If caller doesn't supply the address, then it is either picked from CARP or hardware address of the interface is taken. While here, make several minor fixes: - Hold IF_ADDR_RLOCK(ifp) while traversing address list. - Remove not true comment. - Access internet address and mask via in_ifaddr fields, rather than ifaddr. Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c == --- head/sys/netinet/if_ether.c Sun Jan 8 17:20:29 2012(r229815) +++ head/sys/netinet/if_ether.c Sun Jan 8 17:25:15 2012(r229816) @@ -211,29 +211,41 @@ arprequest(struct ifnet *ifp, struct in_ struct mbuf *m; struct arphdr *ah; struct sockaddr sa; + u_char *carpaddr = NULL; if (sip == NULL) { - /* XXX don't believe this can happen (or explain why) */ /* * The caller did not supply a source address, try to find * a compatible one among those assigned to this interface. */ struct ifaddr *ifa; + IF_ADDR_RLOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (!ifa->ifa_addr || - ifa->ifa_addr->sa_family != AF_INET) + if (ifa->ifa_addr->sa_family != AF_INET) continue; - sip = &SIN(ifa->ifa_addr)->sin_addr; + + if (ifa->ifa_carp) { + if ((*carp_iamatch_p)(ifa, &carpaddr) == 0) + continue; + sip = &IA_SIN(ifa)->sin_addr; + } else { + carpaddr = NULL; + sip = &IA_SIN(ifa)->sin_addr; + } + if (0 == ((sip->s_addr ^ tip->s_addr) & - SIN(ifa->ifa_netmask)->sin_addr.s_addr) ) + IA_MASKSIN(ifa)->sin_addr.s_addr)) break; /* found it. */ } + IF_ADDR_RUNLOCK(ifp); if (sip == NULL) { printf("%s: cannot find matching address\n", __func__); return; } } + if (enaddr == NULL) + enaddr = carpaddr ? carpaddr : (u_char *)IF_LLADDR(ifp); if ((m = m_gethdr(M_DONTWAIT, MT_DATA)) == NULL) return; @@ -328,9 +340,7 @@ retry: */ if (!(la->la_flags & LLE_STATIC) && time_uptime + la->la_preempt > la->la_expire) { - arprequest(ifp, NULL, - &SIN(dst)->sin_addr, IF_LLADDR(ifp)); - + arprequest(ifp, NULL, &SIN(dst)->sin_addr, NULL); la->la_preempt--; } @@ -406,8 +416,7 @@ retry: LLE_REMREF(la); la->la_asked++; LLE_WUNLOCK(la); - arprequest(ifp, NULL, &SIN(dst)->sin_addr, - IF_LLADDR(ifp)); + arprequest(ifp, NULL, &SIN(dst)->sin_addr, NULL); return (error); } done: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229817 - stable/9/release/doc/en_US.ISO8859-1/relnotes
Author: hrs Date: Sun Jan 8 17:40:10 2012 New Revision: 229817 URL: http://svn.freebsd.org/changeset/base/229817 Log: Add relnotes items: cxgbe(4) for Chelsio T4 added, dc(4) PAE support on FreeBSD/i386, re(4) RTL8401E support added, IPsec HMAC-SHA-256/384/512 authenticator hash size fix, cc(4) TCP_CONGESTION socket option, Citrus iconv imported (but disabled by default), utxrm(8) utility added, GNU binutils to 2.17.50, LLVM/Clang 3.0 imported, xz to 5.0.1, bsdinstall(8) added as the default installer. Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 8 17:25:15 2012(r229816) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 8 17:40:10 2012(r229817) @@ -218,6 +218,14 @@ could make AR8152-based network interfaces stop working has been fixed. + A &man.cxgbe.4; driver for Chelsio + T4 (Terminator 4) based 10Gb/1Gb adapters has been + added. + + The &man.dc.4; driver + now works correctly in the kernel with + PAE option. + The &man.igb.4; driver now supports Intel I350 PCIe Gigabit Ethernet controller. @@ -239,8 +247,9 @@ A rdcphy(4) driver for RDC Semiconductor R6040 10/100 PHY has been added. - The &man.re.4; driver now supports - RTL8168E/8111E-VL PCIe Gigabit Ethernet controllers. + The &man.re.4; driver now supports + RTL8168E/8111E-VL PCIe Gigabit Ethernet controllers and + RTL8401E PCIe Fast Ethernet controller. The &man.re.4; driver now supports TX interrupt moderation on RTL810xE PCIe Fast Ethernet @@ -317,6 +326,16 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile Network Protocols + &os; &man.ipsec.4; support now uses a + half of the hash size as the authenticator hash size in + Hashed Message Authentication Mode (HMAC-SHA-256, + HMAC-SHA-384, and HMAC-SHA-512) as described in RFC 4868. + This was 96-bit fixed length in prior releases because the + implementation was based on an old Internet draft + draft-ietf-ipsec-ciph-sha-256-00. Note that this means + &release.current; and later are no longer interoperable with + the older &os; releases. + A bug in &os; TCP/IP network stack has been fixed. The source address selection could not being performed when multicast options were present but without an @@ -336,8 +355,15 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile variable net.inet.tcp.cc.algorithm. The value must be set to one of the names listed by the net.inet.tcp.cc.available, and - newreno is set at boot time. For more - detail, see &man.cc.9; manual page. + newreno is set at boot time. + For more + detail, see &man.cc.4; and &man.cc.9; manual pages. + + A new &man.tcp.4; socket option + TCP_CONGESTION has been added. This + allows to select or query a congestion control algorithm + that the TCP/IP network stack will use for connections on + the socket. @@ -372,7 +398,7 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile File Systems - The &os; Fast File System now supports + The &os; Fast File System now supports softupdates journaling. It introduces a intent log into a softupdates-enabled file system which eliminates the need for background &man.fsck.8; even on unclean shutdown. This @@ -429,6 +455,17 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile root privileges of the worker processes to hast user. + An implementation of + iconv() API libraries and utilities which + are standardized in Single UNIX Specification have been + imported. These are based on NetBSD's Citrus implementation. + Note that these are not built nor installed by default. To + build and install them, specify + WITH_ICONV=yes in + /etc/src.conf and rebuild the base system + as described in &os Handbook (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html";>). + The &man.ifconfig.8; utility now supports fdx, flow, hdx, and loop keywords @@ -516,6 +553,12 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile && and || around an arithmetic expression has been fixed. + A &man.utxrm.8; utility has been added. + This allows one to remove an entry from the + utmpx database by hand. This is useful + when a login daemon crashes or fails to remove the
svn commit: r229818 - head/sys/kern
Author: hrs Date: Sun Jan 8 18:48:36 2012 New Revision: 229818 URL: http://svn.freebsd.org/changeset/base/229818 Log: Fix a typo. (s/nessesary/necessary/) Modified: head/sys/kern/kern_prot.c Modified: head/sys/kern/kern_prot.c == --- head/sys/kern/kern_prot.c Sun Jan 8 17:40:10 2012(r229817) +++ head/sys/kern/kern_prot.c Sun Jan 8 18:48:36 2012(r229818) @@ -73,7 +73,7 @@ __FBSDID("$FreeBSD$"); #ifdef REGRESSION FEATURE(regression, -"Kernel support for interfaces nessesary for regression testing (SECURITY RISK!)"); +"Kernel support for interfaces necessary for regression testing (SECURITY RISK!)"); #endif #if defined(INET) || defined(INET6) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229819 - stable/9/release/doc/en_US.ISO8859-1/relnotes
Author: hrs Date: Sun Jan 8 19:24:08 2012 New Revision: 229819 URL: http://svn.freebsd.org/changeset/base/229819 Log: Add relnotes items: add descriptions about kern.features.*, new NFS implementation (newnfs) is now compiled in by default, add some descriptions about NFSv4 configuration, and document a workaround for the kern.geom.part.check_integrity issue. Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 8 18:48:36 2012(r229818) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 8 19:24:08 2012(r229819) @@ -192,6 +192,315 @@ PT_GNU_STACK for the specified ABIs (e.g. elf32 for 32-bit ABI). + The following &man.sysctl.8; variables + for showing availability of various kernel features: + + + + + + + + &man.sysctl.8; variable name + Description + + + + + + kern.features.ufs_acl + ACL (Access Control List) support in UFS + + + + kern.features.ufs_gjournal + journaling support through &man.gjournal.8; for + UFS + + + + kern.features.ufs_quota + UFS disk quotas support + + + + kern.features.ufs_quota64 + 64-bit UFS disk quotas support + + + + kern.features.softupdates + FFS soft-updates support + + + + kern.features.ffs_snapshot + FFS snapshot support + + + + kern.features.nfsclient + NFS client (old implementation) + + + + kern.features.nfscl + NFS client (new implementation) + + + + kern.features.nfsserver + NFS server (old implementation) + + + + kern.features.nfsd + NFS server (new implementation) + + + + kern.features.kdtrace_hooks + Kernel DTrace hooks which are required to load + DTrace kernel modules + + + + kern.features.ktr + Kernel support for KTR kernel tracing facility + + + + kern.features.ktrace + Kernel support for system call tracing + + + + kern.features.hwpmc_hooks + Kernel support for HW PMC + + + + kern.features.sysv_msg + System V message queues support + + + + kern.features.sysv_sem + System V semaphores support + + + + kern.features.p1003_1b_mqueue + POSIX P1003.1B message queues support + + + + kern.features.p1003_1b_semaphores + POSIX P1003.1B semaphores support + + + + kern.features.kposix_priority_scheduling + POSIX P1003.1B real-time extensions + + + + kern.features.stack + Support for capturing kernel stack + + + + kern.features.sysv_shm + System V shared memory segments support + + + + kern.features.pps_sync + Support usage of external PPS signal by kernel PLL + + + + kern.features.regression + Kernel support for interfaces necessary for + regression testing + + + + kern.features.invariant_support + Support for modules compiled with INVARIANTS option + + + + kern.features.zero_copy_sockets + Zero copy sockets support + + + + kern.features.libmchain + mchain library + + + + kern.features.scbus + SCSI devices support + + + + kern.features.mac + Mandatory Access Control Framework support + + + + kern.features.audit + BSM audit support + + + + kern.features.geom_gate + GEOM Gate module + + + + kern.features.geom_uzip + GEOM uzip read-only compressed disks support + + + + kern.features.geom_cache + GEOM cache module + + + + kern.
svn commit: r229820 - stable/9/release/doc/en_US.ISO8859-1/relnotes
Author: hrs Date: Sun Jan 8 19:52:56 2012 New Revision: 229820 URL: http://svn.freebsd.org/changeset/base/229820 Log: Add relnotes items: Capsicum Capability Mode, ng_one2many(4) XMIT_FAILOVER support added, kern.geom.confxml sysctl now support and , and ZFS SPA version 28. Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 8 19:24:08 2012(r229819) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 8 19:52:56 2012(r229820) @@ -184,6 +184,16 @@ Kernel Changes + &os; kernel now supports Capsicum + Capability Mode. Capsicum is a set of features for sandboxing + support, using a capability model in which the capabilities + are file descriptors. Two new kernel options + CAPABILITIES and + CAPABILITY_MODE have been added to + GENERIC kernel. For more information + about Capsicum, see http://www.cl.cam.ac.uk/research/security/capsicum/";>. + &os; ELF image activator now supports PT_GNU_STACK program header. This is disabled by default. New &man.sysctl.8; @@ -673,6 +683,12 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile allows to select or query a congestion control algorithm that the TCP/IP network stack will use for connections on the socket. + + The &man.ng.one2many.4; + &man.netgraph.4; node now supports + XMIT_FAILOVER transmit algorithm. This + makes packets deliver out the first active + many hook. @@ -689,6 +705,12 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile supports bios-boot GUID for the GPT scheme which is used in GRUB 2 loader. + The &man.sysctl.8; variable + kern.geom.confxml now contains + information about disk identification in an + ident tag and disk model string in a + descr tag. + The &man.md.4; memory-backed pseudo disk device driver now supports a &man.sysctl.8; variable vm.md_malloc_wait to specify whether a @@ -702,7 +724,14 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile A bug in the &man.mmc.4; driver that could fail in device detection has been fixed. - + + ZFS subsystem has been updated to the + SPA (Storage Pool Allocator, also known as zpool) version + 28. It now supports data deduplication, triple parity RAIDZ + (raidz3), snapshot holds, log device removal, zfs diff, + zpool split, zpool import -F, and read-only + zpool import. + File Systems ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229821 - in head/sys: fs/tmpfs kern
Author: alc Date: Sun Jan 8 20:09:26 2012 New Revision: 229821 URL: http://svn.freebsd.org/changeset/base/229821 Log: Correct an error of omission in the implementation of the truncation operation on POSIX shared memory objects and tmpfs. Previously, neither of these modules correctly handled the case in which the new size of the object or file was not a multiple of the page size. Specifically, they did not handle partial page truncation of data stored on swap. As a result, stale data might later be returned to an application. Interestingly, a data inconsistency was less likely to occur under tmpfs than POSIX shared memory objects. The reason being that a different mistake by the tmpfs truncation operation helped avoid a data inconsistency. If the data was still resident in memory in a PG_CACHED page, then the tmpfs truncation operation would reactivate that page, zero the truncated portion, and leave the page pinned in memory. More precisely, the benevolent error was that the truncation operation didn't add the reactivated page to any of the paging queues, effectively pinning the page. This page would remain pinned until the file was destroyed or the page was read or written. With this change, the page is now added to the inactive queue. Discussed with: jhb Reviewed by: kib (an earlier version) MFC after:3 weeks Modified: head/sys/fs/tmpfs/tmpfs_subr.c head/sys/kern/uipc_shm.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c == --- head/sys/fs/tmpfs/tmpfs_subr.c Sun Jan 8 19:52:56 2012 (r229820) +++ head/sys/fs/tmpfs/tmpfs_subr.c Sun Jan 8 20:09:26 2012 (r229821) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -886,10 +887,10 @@ tmpfs_reg_resize(struct vnode *vp, off_t struct tmpfs_mount *tmp; struct tmpfs_node *node; vm_object_t uobj; - vm_page_t m; - vm_pindex_t newpages, oldpages; + vm_page_t m, ma[1]; + vm_pindex_t idx, newpages, oldpages; off_t oldsize; - size_t zerolen; + int base, rv; MPASS(vp->v_type == VREG); MPASS(newsize >= 0); @@ -912,15 +913,57 @@ tmpfs_reg_resize(struct vnode *vp, off_t newpages - oldpages > TMPFS_PAGES_AVAIL(tmp)) return (ENOSPC); - TMPFS_LOCK(tmp); - tmp->tm_pages_used += (newpages - oldpages); - TMPFS_UNLOCK(tmp); - - node->tn_size = newsize; - vnode_pager_setsize(vp, newsize); VM_OBJECT_LOCK(uobj); if (newsize < oldsize) { /* +* Zero the truncated part of the last page. +*/ + base = newsize & PAGE_MASK; + if (base != 0) { + idx = OFF_TO_IDX(newsize); +retry: + m = vm_page_lookup(uobj, idx); + if (m != NULL) { + if ((m->oflags & VPO_BUSY) != 0 || + m->busy != 0) { + vm_page_sleep(m, "tmfssz"); + goto retry; + } + } else if (vm_pager_has_page(uobj, idx, NULL, NULL)) { + m = vm_page_alloc(uobj, idx, VM_ALLOC_NORMAL); + if (m == NULL) { + VM_OBJECT_UNLOCK(uobj); + VM_WAIT; + VM_OBJECT_LOCK(uobj); + goto retry; + } else if (m->valid != VM_PAGE_BITS_ALL) { + ma[0] = m; + rv = vm_pager_get_pages(uobj, ma, 1, 0); + m = vm_page_lookup(uobj, idx); + } else + /* A cached page was reactivated. */ + rv = VM_PAGER_OK; + vm_page_lock(m); + if (rv == VM_PAGER_OK) { + vm_page_deactivate(m); + vm_page_unlock(m); + vm_page_wakeup(m); + } else { + vm_page_free(m); + vm_page_unlock(m); + VM_OBJECT_UNLOCK(uobj); + return (EIO); + } + } + if (m != NULL) { + pmap_zero_page_area(m, base, PAGE_SIZE - base); + MPASS(m->valid == VM_PAGE_BITS_ALL); +
svn commit: r229822 - in head/etc: . rc.d
Author: dougb Date: Sun Jan 8 20:25:29 2012 New Revision: 229822 URL: http://svn.freebsd.org/changeset/base/229822 Log: There is no longer a need to abstract ${rcvar_manpage} as we are not attempting to maintain compatibility with NetBSD for some years now. Modified: head/etc/rc.d/hostname head/etc/rc.subr Modified: head/etc/rc.d/hostname == --- head/etc/rc.d/hostname Sun Jan 8 20:09:26 2012(r229821) +++ head/etc/rc.d/hostname Sun Jan 8 20:25:29 2012(r229822) @@ -65,7 +65,7 @@ hostname_start() # Null hostname is probably OK if DHCP is in use. # if [ -z "`list_net_interfaces dhcp`" ]; then - warn "\$hostname is not set -- see ${rcvar_manpage}." + warn "\$hostname is not set -- see rc.conf(5)." fi return fi Modified: head/etc/rc.subr == --- head/etc/rc.subrSun Jan 8 20:09:26 2012(r229821) +++ head/etc/rc.subrSun Jan 8 20:25:29 2012(r229822) @@ -32,7 +32,6 @@ # functions used by various rc scripts # -: ${rcvar_manpage:='rc.conf(5)'} : ${RC_PID:=$$}; export RC_PID # @@ -152,7 +151,7 @@ checkyesno() return 1 ;; *) - warn "\$${1} is not set properly - see ${rcvar_manpage}." + warn "\$${1} is not set properly - see rc.conf(5)." return 1 ;; esac ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r228985 - head/sys/boot/forth
On 8 January 2012 00:03, Dimitry Andric wrote: > On 2011-12-30 07:24, Sergey Kandaurov wrote: >> >> Author: pluknet >> Date: Fri Dec 30 06:24:59 2011 >> New Revision: 228985 >> URL: http://svn.freebsd.org/changeset/base/228985 >> >> Log: >> Unset the environment variables associated with individual menu items >> before invoking the kernel. > > > When I did a single-user mode boot to install a new world, I saw the > following warning on the (serial) console during boot: > > /boot.config: -D -S115200 > Consoles: internal video/keyboard serial port > BIOS drive A: is disk0 > BIOS drive C: is disk1 > BIOS 638kB/3143616kB available memory > > FreeBSD/x86 bootstrap loader, Revision 1.1 > (d...@vm-freebsd10-amd64.home.andric.com, Sat Jan 7 01:05:07 CET 2012) > Loading /boot/defaults/loader.conf > /boot/kernel/kernel data=0xb73530 data=0x11dbe0+0x2b4db8 > syms=[0x8+0xfd620+0x8+0xec6b6] > - > Hit [Enter] to boot immediately, or any other key for command prompt. > > > Type '?' for a list of commands, 'help' for more detailed help. > OK boot -s > menu-unset not found <<-- what's this? > GDB: no debug ports present > KDB: debugger backends: ddb > KDB: current backend: ddb > [...kernel boots...] > > E.g, it always gives a 'menu-unset not found' warning (or maybe it's an > error, it's not clear). This was not the case before r228985. > > I have almost no knowledge about forth, but it looks like this might be > caused by the new try-menu-unset subroutine. > > My loader.conf is just this: > > beastie_disable="YES" > comconsole_speed="115200" > console="comconsole vidconsole" > kern.hz="100" So, the problem arise when beastie_disable is set. In this case menu.rc is not evaluated and consequently menu-unset does not have a body yet. This results in the ficl warning "not found" when try-menu-unset calls menu-unset. The warning cannot be handled with catch as seen with the code in head. Otherwise, when beastie is enabled, all works as it should. To "fix" the problem I replaced 'catch' with 'sfind', so that we can conditionally call menu-unset only when the definition is present. Please try the following patch. I tested it with enabled/disabled beastie and loader_color over serial console. I would also like to get a review from Devin Teske to see if this change is acceptable. %%% Index: sys/boot/forth/loader.4th === --- sys/boot/forth/loader.4th (revision 229670) +++ sys/boot/forth/loader.4th (working copy) @@ -45,8 +45,10 @@ : try-menu-unset s" menu-unset" - ['] evaluate catch if -2drop + sfind if +execute + else +drop then ; %%% [ It could be simplified with one-liner: s" menu-unset" sfind drop execute but ficl doesn't like this in a freestanding environment.] -- wbr, pluknet ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229823 - in stable/9: include lib/libc/gen
Author: eadler (ports committer) Date: Sun Jan 8 21:00:37 2012 New Revision: 229823 URL: http://svn.freebsd.org/changeset/base/229823 Log: MFC r228754: - Add restrict keyword to glob(3) PR: kern/161958 Approved by: jilles Modified: stable/9/include/glob.h stable/9/lib/libc/gen/glob.3 stable/9/lib/libc/gen/glob.c Directory Properties: stable/9/include/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/include/glob.h == --- stable/9/include/glob.h Sun Jan 8 20:25:29 2012(r229822) +++ stable/9/include/glob.h Sun Jan 8 21:00:37 2012(r229823) @@ -98,7 +98,8 @@ typedef struct { #endif /* __BSD_VISIBLE */ __BEGIN_DECLS -intglob(const char *, int, int (*)(const char *, int), glob_t *); +intglob(const char * __restrict, int, + int (*)(const char *, int), glob_t * __restrict); void globfree(glob_t *); __END_DECLS Modified: stable/9/lib/libc/gen/glob.3 == --- stable/9/lib/libc/gen/glob.3Sun Jan 8 20:25:29 2012 (r229822) +++ stable/9/lib/libc/gen/glob.3Sun Jan 8 21:00:37 2012 (r229823) @@ -30,7 +30,7 @@ .\" @(#)glob.3 8.3 (Berkeley) 4/16/94 .\" $FreeBSD$ .\" -.Dd February 15, 2011 +.Dd December 20, 2011 .Dt GLOB 3 .Os .Sh NAME @@ -42,7 +42,7 @@ .Sh SYNOPSIS .In glob.h .Ft int -.Fn glob "const char *pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t *pglob" +.Fn glob "const char * restrict pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t * restrict pglob" .Ft void .Fn globfree "glob_t *pglob" .Sh DESCRIPTION Modified: stable/9/lib/libc/gen/glob.c == --- stable/9/lib/libc/gen/glob.cSun Jan 8 20:25:29 2012 (r229822) +++ stable/9/lib/libc/gen/glob.cSun Jan 8 21:00:37 2012 (r229823) @@ -163,7 +163,8 @@ static void qprintf(const char *, Char #endif int -glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob) +glob(const char * __restrict pattern, int flags, +int (*errfunc)(const char *, int), glob_t * __restrict pglob) { const char *patnext; size_t limit; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229824 - in stable/8: include lib/libc/gen
Author: eadler (ports committer) Date: Sun Jan 8 21:01:21 2012 New Revision: 229824 URL: http://svn.freebsd.org/changeset/base/229824 Log: MFC r228754: - Add restrict keyword to glob(3) PR: kern/161958 Approved by: jilles Modified: stable/8/include/glob.h stable/8/lib/libc/gen/glob.c Directory Properties: stable/8/include/ (props changed) stable/8/lib/libc/ (props changed) Modified: stable/8/include/glob.h == --- stable/8/include/glob.h Sun Jan 8 21:00:37 2012(r229823) +++ stable/8/include/glob.h Sun Jan 8 21:01:21 2012(r229824) @@ -102,7 +102,8 @@ typedef struct { #endif /* __BSD_VISIBLE */ __BEGIN_DECLS -intglob(const char *, int, int (*)(const char *, int), glob_t *); +intglob(const char * __restrict, int, + int (*)(const char *, int), glob_t * __restrict); void globfree(glob_t *); __END_DECLS Modified: stable/8/lib/libc/gen/glob.c == --- stable/8/lib/libc/gen/glob.cSun Jan 8 21:00:37 2012 (r229823) +++ stable/8/lib/libc/gen/glob.cSun Jan 8 21:01:21 2012 (r229824) @@ -163,7 +163,8 @@ static void qprintf(const char *, Char #endif int -glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob) +glob(const char * __restrict pattern, int flags, +int (*errfunc)(const char *, int), glob_t * __restrict pglob) { const char *patnext; size_t limit; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229825 - in stable/7: include lib/libc/gen
Author: eadler (ports committer) Date: Sun Jan 8 21:01:51 2012 New Revision: 229825 URL: http://svn.freebsd.org/changeset/base/229825 Log: MFC r228754: - Add restrict keyword to glob(3) PR: kern/161958 Approved by: jilles Modified: stable/7/include/glob.h stable/7/lib/libc/gen/glob.c Directory Properties: stable/7/include/ (props changed) stable/7/lib/libc/ (props changed) Modified: stable/7/include/glob.h == --- stable/7/include/glob.h Sun Jan 8 21:01:21 2012(r229824) +++ stable/7/include/glob.h Sun Jan 8 21:01:51 2012(r229825) @@ -102,7 +102,8 @@ typedef struct { #endif /* __BSD_VISIBLE */ __BEGIN_DECLS -intglob(const char *, int, int (*)(const char *, int), glob_t *); +intglob(const char * __restrict, int, + int (*)(const char *, int), glob_t * __restrict); void globfree(glob_t *); __END_DECLS Modified: stable/7/lib/libc/gen/glob.c == --- stable/7/lib/libc/gen/glob.cSun Jan 8 21:01:21 2012 (r229824) +++ stable/7/lib/libc/gen/glob.cSun Jan 8 21:01:51 2012 (r229825) @@ -163,7 +163,8 @@ static void qprintf(const char *, Char #endif int -glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob) +glob(const char * __restrict pattern, int flags, +int (*errfunc)(const char *, int), glob_t * __restrict pglob) { const char *patnext; size_t limit; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229826 - stable/9/release/doc/en_US.ISO8859-1/relnotes
Author: hrs Date: Sun Jan 8 22:23:19 2012 New Revision: 229826 URL: http://svn.freebsd.org/changeset/base/229826 Log: Add relnotes items: {get,set}loginclass(2) added, machdep.disable_tsc tunable added, ng_netflow(4) now supports NetFlow v9, cexp(3) and cexpf(3) added, gpart(8) show -p flag added, hashd(8) checksum algo selection in a resource section, hashd(8) compression algo selection in a resource section, ps(1) -o class added, gdtoa to 20110304, tzdata2011c. Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 8 21:01:51 2012(r229825) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 8 22:23:19 2012(r229826) @@ -202,6 +202,13 @@ PT_GNU_STACK for the specified ABIs (e.g. elf32 for 32-bit ABI). + Two new system calls + setloginclass(2) and + getloginclass(2) have been added. This + makes it possible for the kernel to track login class the + process is assigned to, which is required for RCTL + framework. + The following &man.sysctl.8; variables for showing availability of various kernel features: @@ -524,6 +531,13 @@ supports Sony Playstation 3 using the OtherOS feature available on firmwares 3.15 and earlier. + A new &man.loader.8; tunable + machdep.disable_tsc has been added. + Setting this to a non-zero value disables use of TSC (Time + Stamp Counter) by turning off boot-time CPU frequency + calibration, DELAY(9) with TSC, and using TSC as a CPU + ticker. + Multimedia Support @@ -689,6 +703,12 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile XMIT_FAILOVER transmit algorithm. This makes packets deliver out the first active many hook. + + The &man.ng.netflow.4; + &man.netgraph.4; node now supports NetFlow version 9. A new + export9 hook has been added for NetFlow + v9 data. Note that the data export can be done + simultaneously in both version 5 and version 9. @@ -793,6 +813,10 @@ nfsuserd_enable="YES" Userland Changes + Complex exponential functions + &man.cexp.3; and &man.cexpf.3; have been added to + libm. + The &man.cpuset.1; utility now supports a -C flag to create a new cpuset and assign an existing process into that set, and an @@ -804,10 +828,29 @@ nfsuserd_enable="YES" could prevent STAT FTP command from working properly has been fixed. + The &man.gpart.8; utility now supports a + -p flag to show + subcommand. This allows to show provider's names of + partitions instead of partition's indexes. + The &man.hastd.8; utility now drops root privileges of the worker processes to hast user. + The &man.hastd.8; utility now supports + checksum keyword to specify checksum + algorithm in a resource section. As of + &release.current;, none, + sha256, and crc32 are + supported. + + The &man.hastd.8; utility now supports + compression keyword to specify compression + algorithm in a resource section. As of + &release.current;, none, + hole and lzf are + supported. + An implementation of iconv() API libraries and utilities which are standardized in Single UNIX Specification have been @@ -851,6 +894,10 @@ nfsuserd_enable="YES" and description subcommands in the &man.ifconfig.8; utility. + The &man.ps.1; utility now supports an + -o class option to display login class + information of each process. + The &man.rtld.1; runtime linker now supports shared objects as filters in ELF shared libraries. Both standard and auxiliary filtering have been supported. The @@ -935,6 +982,11 @@ nfsuserd_enable="YES" dialog has been updated to version 1.1-20110707. + gdtoa, a set + of binary from/to decimal number conversion routines used in + &os; libc library has been updated + to a snapshot as of 4 March, 2011. + The LLVM compiler infrastructure and the clang, a C language family @@ -946,9 +998,9 @@ nfsuserd_enable="YES" CPP &man.make.1; variables, respectively. - The timezone + The timezone database has been updated to the - tzdata2011a release. + tzdata2011c release. &man.unifdef.1; utility has been updated to version 2.5.6. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman
Re: svn commit: r229817 - stable/9/release/doc/en_US.ISO8859-1/relnotes
Hello Hiroki, * Hiroki Sato , 20120108 18:40: > + A &man.utxrm.8; utility has been added. > + This allows one to remove an entry from the > + utmpx database by hand. This is useful > + when a login daemon crashes or fails to remove the entry > + during shutdown. We shouldn't forget to document the addition of utmpx as well. Any comments on the following? Index: article.sgml === --- article.sgml(revision 229826) +++ article.sgml(working copy) @@ -953,6 +953,13 @@ && and || around an arithmetic expression has been fixed. + The &man.utmp.5; user accounting database + has been replaced by &man.utmpx.3;. User accounting utilities + will now use utmpx database files + exclusively. The &man.wtmpcvt.1; utility can be used to convert + wtmp files to the new format, making it + possible to read them using the updated utilities. + A &man.utxrm.8; utility has been added. This allows one to remove an entry from the utmpx database by hand. This is useful -- Ed Schouten WWW: http://80386.nl/ pgp6lhDqK4xAH.pgp Description: PGP signature
Re: svn commit: r229812 - stable/9/release/doc/en_US.ISO8859-1/relnotes
Hi Hiroki-san, On 01/09/12 00:54, Hiroki Sato wrote: Author: hrs Date: Sun Jan 8 13:54:08 2012 New Revision: 229812 URL: http://svn.freebsd.org/changeset/base/229812 Log: Add relnotes items: igb(4) Intel I350 GbE support, re(4) TX IP checksum disabled on RTL8168C-based cards, cc(9) TCP congestion control algorithm framework added, gpart(8) various aliases and bios-boot GUID added, FFS SU+J added, more kern.features.* for UFS-related features, hastd(8) drops root privilege in worker processes, newsyslog(8) xz compression support added, ppp(8) iface name and iface description commands added, sh(1) arithmetic expression handling updated, ISC BIND to 9.8.1-P1, and tzdata2011a. Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml == [snip] cc(4) and cc(9) were renamed to mod_cc(4) and mod_cc(9) in r225583 to avoid overlap with the cc(1) GCC man page. Would you mind correcting the references in the entry below? @@ -315,11 +321,39 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile been fixed. The source address selection could not being performed when multicast options were present but without an interface being specified. + + + &os; TCP/IP network stack now supports&man.cc.9; pluggable + congestion control framework. This allows TCP congestion + control algorithms to be implemented as dynamically loadable + kernel modules. The following kernel modules are available + as of&release.current;:&man.cc.chd.4; for + CAIA-Hamilton-Delay algorithm,&man.cc.cubic.4; for CUBIC + algorithm,&man.cc.hd.4; for Hamilton-Delay algorithm, + &man.cc.htcp.4; for H-TCP algorithm,&man.cc.newreno.4; for + NewReno algorithm, and&man.cc.vegas.4; for Vegas algorithm. + The default algorithm can be set by a new&man.sysctl.8; + variablenet.inet.tcp.cc.algorithm. The + value must be set to one of the names listed by the + net.inet.tcp.cc.available, and + newreno is set at boot time. For more + detail, see&man.cc.9; manual page. Thanks for once again doing the release notes. Cheers, Lawrence ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r229800 - head/sys/conf
On 8 January 2012 02:43, Pawel Jakub Dawidek wrote: > If someone is actually using GENERIC kernel. This change will break all > my system next time I upgrade. Adding UFS_ACL option to the kernel > config to make ZFS kernel module to work doesn't sound very intuitive. > > I understand what you are trying to accomplish, but we really need to > find better way to do this. Until then, could you back it out? I'd rather find a cleaner solution - it's pulling in code which just isn't being used if you aren't using UFS_ACL or ZFS. How about wrapping those two up in a module which zfs can register a dependency on? Adrian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229827 - stable/9/sys/fs/nfsserver
Author: rmacklem Date: Sun Jan 8 23:05:36 2012 New Revision: 229827 URL: http://svn.freebsd.org/changeset/base/229827 Log: MFC: r228560 Patch the new NFS server in a manner analagous to r228520 for the old NFS server, so that it correctly handles a count == 0 argument for Commit. Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c == --- stable/9/sys/fs/nfsserver/nfs_nfsdport.cSun Jan 8 22:23:19 2012 (r229826) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.cSun Jan 8 23:05:36 2012 (r229827) @@ -1254,7 +1254,13 @@ nfsvno_fsync(struct vnode *vp, u_int64_t { int error = 0; - if (cnt > MAX_COMMIT_COUNT) { + /* +* RFC 1813 3.3.21: if count is 0, a flush from offset to the end of +* file is done. At this time VOP_FSYNC does not accept offset and +* byte count parameters so call VOP_FSYNC the whole file for now. +* The same is true for NFSv4: RFC 3530 Sec. 14.2.3. +*/ + if (cnt == 0 || cnt > MAX_COMMIT_COUNT) { /* * Give up and do the whole thing */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229828 - in head/sys: kern ufs/ufs
Author: kib Date: Sun Jan 8 23:06:53 2012 New Revision: 229828 URL: http://svn.freebsd.org/changeset/base/229828 Log: Avoid LOR between vfs_busy() lock and covered vnode lock on quotaon(). The vfs_busy() is after covered vnode lock in the global lock order, but since quotaon() does recursive VFS call to open quota file, we usually end up locking covered vnode after mp is busied in sys_quotactl(). Change the interface of VFS_QUOTACTL(), requiring that mp was unbusied by fs code, and do not try to pick up vfs_busy() reference in ufs quotaon, esp. if vfs_busy cannot succeed due to unmount being performed. Reported and tested by: pho MFC after:1 week Modified: head/sys/kern/vfs_syscalls.c head/sys/ufs/ufs/ufs_quota.c Modified: head/sys/kern/vfs_syscalls.c == --- head/sys/kern/vfs_syscalls.cSun Jan 8 23:05:36 2012 (r229827) +++ head/sys/kern/vfs_syscalls.cSun Jan 8 23:06:53 2012 (r229828) @@ -86,6 +86,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + static MALLOC_DEFINE(M_FADVISE, "fadvise", "posix_fadvise(2) information"); SDT_PROVIDER_DEFINE(vfs); @@ -212,7 +214,20 @@ sys_quotactl(td, uap) return (error); } error = VFS_QUOTACTL(mp, uap->cmd, uap->uid, uap->arg); - vfs_unbusy(mp); + + /* +* Since quota on operation typically needs to open quota +* file, the Q_QUOTAON handler needs to unbusy the mount point +* before calling into namei. Otherwise, unmount might be +* started between two vfs_busy() invocations (first is our, +* second is from mount point cross-walk code in lookup()), +* causing deadlock. +* +* Require that Q_QUOTAON handles the vfs_busy() reference on +* its own, always returning with ubusied mount point. +*/ + if ((uap->cmd >> SUBCMDSHIFT) != Q_QUOTAON) + vfs_unbusy(mp); VFS_UNLOCK_GIANT(vfslocked); return (error); } Modified: head/sys/ufs/ufs/ufs_quota.c == --- head/sys/ufs/ufs/ufs_quota.cSun Jan 8 23:05:36 2012 (r229827) +++ head/sys/ufs/ufs/ufs_quota.cSun Jan 8 23:06:53 2012 (r229828) @@ -512,17 +512,29 @@ quotaon(struct thread *td, struct mount NDINIT(&nd, LOOKUP, FOLLOW | MPSAFE, UIO_USERSPACE, fname, td); flags = FREAD | FWRITE; + vfs_ref(mp); + vfs_unbusy(mp); error = vn_open(&nd, &flags, 0, NULL); - if (error) + if (error != 0) { + vfs_rel(mp); return (error); + } vfslocked = NDHASGIANT(&nd); NDFREE(&nd, NDF_ONLY_PNBUF); vp = nd.ni_vp; - if (vp->v_type != VREG) { + error = vfs_busy(mp, MBF_NOWAIT); + vfs_rel(mp); + if (error == 0) { + if (vp->v_type != VREG) { + error = EACCES; + vfs_unbusy(mp); + } + } + if (error != 0) { VOP_UNLOCK(vp, 0); (void) vn_close(vp, FREAD|FWRITE, td->td_ucred, td); VFS_UNLOCK_GIANT(vfslocked); - return (EACCES); + return (error); } UFS_LOCK(ump); @@ -531,6 +543,7 @@ quotaon(struct thread *td, struct mount VOP_UNLOCK(vp, 0); (void) vn_close(vp, FREAD|FWRITE, td->td_ucred, td); VFS_UNLOCK_GIANT(vfslocked); + vfs_unbusy(mp); return (EALREADY); } ump->um_qflags[type] |= QTF_OPENING|QTF_CLOSING; @@ -542,6 +555,7 @@ quotaon(struct thread *td, struct mount UFS_UNLOCK(ump); (void) vn_close(vp, FREAD|FWRITE, td->td_ucred, td); VFS_UNLOCK_GIANT(vfslocked); + vfs_unbusy(mp); return (error); } VOP_UNLOCK(vp, 0); @@ -619,6 +633,7 @@ again: ("quotaon: leaking flags")); UFS_UNLOCK(ump); + vfs_unbusy(mp); return (error); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229829 - stable/9/release/doc/en_US.ISO8859-1/relnotes
Author: hrs Date: Sun Jan 8 23:11:03 2012 New Revision: 229829 URL: http://svn.freebsd.org/changeset/base/229829 Log: Add relnotes items: DTrace systrace support for freebsd32 and linux32 on am64, loader(8) pre-boot virtual memory support on ia64, bxe(4) for BCM57710, BCM57711, BCM57711E added, cbrtl(3) (cube root) added, pam_group(8) ruser and luser options, tzdata2011d. Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 8 23:06:53 2012(r229828) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Jan 8 23:11:03 2012(r229829) @@ -194,6 +194,17 @@ about Capsicum, see http://www.cl.cam.ac.uk/research/security/capsicum/";>. + The &os; + &man.dtrace.1; framework now supports + systrace for system calls of + linux32 and freebsd32 on + &os;/&arch.amd64;. Two new + systrace_linux32 and + systrace_freebsd32 kernel modules provide + support for tracing compat system calls in addition to native + system call tracing provided by the + systrace module. + &os; ELF image activator now supports PT_GNU_STACK program header. This is disabled by default. New &man.sysctl.8; @@ -521,8 +532,13 @@ Boot Loader Changes - - + The &man.loader.8; loader + now supports PBVM (Pre-Boot Virtual Memory). This allows to + link the kernel at a fixed virtual address without having to + make any assumptions about the physical memory layout. The + PBVM also allows fine control of the address where the + kernel and its modules to be loaded. + Hardware Support @@ -551,6 +567,10 @@ could make AR8152-based network interfaces stop working has been fixed. + bxe(4) driver for Broadcom NetXtreme + II 10GbE controller (BCM57710, BCM57711, BCM57711E) has + been added. + A &man.cxgbe.4; driver for Chelsio T4 (Terminator 4) based 10Gb/1Gb adapters has been added. @@ -813,8 +833,9 @@ nfsuserd_enable="YES" Userland Changes - Complex exponential functions - &man.cexp.3; and &man.cexpf.3; have been added to + Complex exponential functions + &man.cexp.3; and &man.cexpf.3;, and cube root function + &man.cbrtl.3; have been added to libm. The &man.cpuset.1; utility now supports @@ -881,6 +902,15 @@ nfsuserd_enable="YES" in the optional field has been added to specify the compression. + The &man.pam.group.8; module now + supports ruser and luser + options. The ruser make it accept or reject + based on the supplicant's group membership and this is the + default behavior. The luser checks the + target user's group membership instead of the supplicant's + one. If neither option was specified, &man.pam.group.8; + assumes ruser and issues a warning. + A &man.poweroff.8; utility has been added. This is equivalent to: @@ -998,9 +1028,9 @@ nfsuserd_enable="YES" CPP &man.make.1; variables, respectively. - The timezone + The timezone database has been updated to the - tzdata2011c release. + tzdata2011d release. &man.unifdef.1; utility has been updated to version 2.5.6. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r229800 - head/sys/conf
On Sun, Jan 08, 2012 at 02:58:56PM -0800, Adrian Chadd wrote: > On 8 January 2012 02:43, Pawel Jakub Dawidek wrote: > > If someone is actually using GENERIC kernel. This change will break all > > my system next time I upgrade. Adding UFS_ACL option to the kernel > > config to make ZFS kernel module to work doesn't sound very intuitive. > > > > I understand what you are trying to accomplish, but we really need to > > find better way to do this. Until then, could you back it out? > > I'd rather find a cleaner solution - it's pulling in code which just > isn't being used if you aren't using UFS_ACL or ZFS. > > How about wrapping those two up in a module which zfs can register a > dependency on? This would be one weird module, but let's see:) -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpjQ3xTgjkva.pgp Description: PGP signature
svn commit: r229830 - stable/8/sys/fs/nfsserver
Author: rmacklem Date: Sun Jan 8 23:30:23 2012 New Revision: 229830 URL: http://svn.freebsd.org/changeset/base/229830 Log: MFC: r228560 Patch the new NFS server in a manner analagous to r228520 for the old NFS server, so that it correctly handles a count == 0 argument for Commit. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c == --- stable/8/sys/fs/nfsserver/nfs_nfsdport.cSun Jan 8 23:11:03 2012 (r229829) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.cSun Jan 8 23:30:23 2012 (r229830) @@ -1249,7 +1249,13 @@ nfsvno_fsync(struct vnode *vp, u_int64_t { int error = 0; - if (cnt > MAX_COMMIT_COUNT) { + /* +* RFC 1813 3.3.21: if count is 0, a flush from offset to the end of +* file is done. At this time VOP_FSYNC does not accept offset and +* byte count parameters so call VOP_FSYNC the whole file for now. +* The same is true for NFSv4: RFC 3530 Sec. 14.2.3. +*/ + if (cnt == 0 || cnt > MAX_COMMIT_COUNT) { /* * Give up and do the whole thing */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229831 - in head: lib/libopie share/examples/diskless share/examples/ppp share/examples/printing tools/tools/nanobsd/pcengines/Files/root usr.sbin/pkg_install/add
Author: eadler (ports committer) Date: Mon Jan 9 00:48:19 2012 New Revision: 229831 URL: http://svn.freebsd.org/changeset/base/229831 Log: X11BASE has been deprecated for a long time and will die soon Approved by: x11 (eadler) Approved by: brucec MFC after:1 week Modified: head/lib/libopie/config.h head/share/examples/diskless/README.TEMPLATING head/share/examples/ppp/ppp.linkdown.sample head/share/examples/printing/hpvf head/tools/tools/nanobsd/pcengines/Files/root/.cshrc head/usr.sbin/pkg_install/add/main.c Modified: head/lib/libopie/config.h == --- head/lib/libopie/config.h Sun Jan 8 23:30:23 2012(r229830) +++ head/lib/libopie/config.h Mon Jan 9 00:48:19 2012(r229831) @@ -54,7 +54,7 @@ /* #undef DOANONYMOUS */ /* The default value of the PATH environment variable */ -#define DEFAULT_PATH "/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin" +#define DEFAULT_PATH "/usr/bin:/bin:/usr/sbin:/sbin" /* Defined if the file /etc/default/login exists (and, presumably, should be looked at by login) */ Modified: head/share/examples/diskless/README.TEMPLATING == --- head/share/examples/diskless/README.TEMPLATING Sun Jan 8 23:30:23 2012(r229830) +++ head/share/examples/diskless/README.TEMPLATING Mon Jan 9 00:48:19 2012(r229831) @@ -94,8 +94,8 @@ be useful to set up clients and server f /usr/ports ( note 5 ) /usr/src( note 5 ) /usr/local/crack ( note 5 ) - /usr/X11R6/lib/X11/xdm/xdm-errors ( note 6 ) - /usr/X11R6/lib/X11/xdm/xdm-pid( note 6 ) + /usr/local/lib/X11/xdm/xdm-errors ( note 6 ) + /usr/local/lib/X11/xdm/xdm-pid( note 6 ) /usr/local/etc/ssh_host_key ( note 6 ) /usr/local/etc/ssh_host_key.pub ( note 6 ) /usr/local/etc/ssh_random_seed( note 6 ) @@ -120,7 +120,7 @@ be useful to set up clients and server f do not want to template such directories. note 6: Note that you can solve the problem of xdm and sshd creating - files in /usr. With xdm, edit /usr/X11R6/lib/xdm/xdm-config + files in /usr. With xdm, edit /usr/local/lib/xdm/xdm-config and change the errorLogFile and pidFile config lines. With sshd, add 'HostKey' and 'RandomSeed' directives to specify Modified: head/share/examples/ppp/ppp.linkdown.sample == --- head/share/examples/ppp/ppp.linkdown.sample Sun Jan 8 23:30:23 2012 (r229830) +++ head/share/examples/ppp/ppp.linkdown.sample Mon Jan 9 00:48:19 2012 (r229831) @@ -23,7 +23,7 @@ # ``auplay'' (assuming NAS is installed and configured). # MYADDR: - !bg /usr/X11R6/bin/auplay /etc/ppp/linkdown.au + !bg /usr/local/bin/auplay /etc/ppp/linkdown.au # If you're running ``ppp -auto -nat dynamic-nat-auto'', and are # assigned a dynamic IP number by the peer, this may be worth while Modified: head/share/examples/printing/hpvf == --- head/share/examples/printing/hpvf Sun Jan 8 23:30:23 2012 (r229830) +++ head/share/examples/printing/hpvf Mon Jan 9 00:48:19 2012 (r229831) @@ -1,10 +1,10 @@ #!/bin/sh # +# $FreeBSD$ +# # hpvf - Convert GIF files into HP/PCL, then print # Installed in /usr/local/libexec/hpvf -PATH=/usr/X11R6/bin:$PATH; export PATH - giftopnm | ppmtopgm | pgmtopbm | pbmtolj -resolution 300 \ && exit 0 \ || exit 2 Modified: head/tools/tools/nanobsd/pcengines/Files/root/.cshrc == --- head/tools/tools/nanobsd/pcengines/Files/root/.cshrcSun Jan 8 23:30:23 2012(r229830) +++ head/tools/tools/nanobsd/pcengines/Files/root/.cshrcMon Jan 9 00:48:19 2012(r229831) @@ -14,7 +14,7 @@ alias ll ls -lA # A righteous umask umask 22 -set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin) +set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin) setenv EDITOR vi setenv PAGER more Modified: head/usr.sbin/pkg_install/add/main.c == --- head/usr.sbin/pkg_install/add/main.cSun Jan 8 23:30:23 2012 (r229830) +++ head/usr.sbin/pkg_install/add/main.cMon Jan 9 00:48:19 2012 (r229831) @@ -285,7 +285,7 @@ main(int argc, char **argv) } /* Make sure the sub-execs we invoke get found */ setenv("PATH", - "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin", + "/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/u
svn commit: r229832 - stable/9/sys/kern
Author: eadler (ports committer) Date: Mon Jan 9 01:02:37 2012 New Revision: 229832 URL: http://svn.freebsd.org/changeset/base/229832 Log: MFC r228233: - Fix typos s/(more|less) then|\1 than/ Approved by: brucec Modified: stable/9/sys/kern/subr_blist.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_blist.c == --- stable/9/sys/kern/subr_blist.c Mon Jan 9 00:48:19 2012 (r229831) +++ stable/9/sys/kern/subr_blist.c Mon Jan 9 01:02:37 2012 (r229832) @@ -29,7 +29,7 @@ * * This module implements a general bitmap allocator/deallocator. The * allocator eats around 2 bits per 'block'. The module does not - * try to interpret the meaning of a 'block' other then to return + * try to interpret the meaning of a 'block' other than to return * SWAPBLK_NONE on an allocation failure. * * A radix tree is used to maintain the bitmap. Two radix constants are @@ -57,7 +57,7 @@ * the memory subsystem. In contrast, the rlist code may allocate memory * on an rlist_free() call. The non-blocking features of the blist code * are used to great advantage in the swap code (vm/nswap_pager.c). The - * rlist code uses a little less overall memory then the blist code (but + * rlist code uses a little less overall memory than the blist code (but * due to swap interleaving not all that much less), but the blist code * scales much, much better. * @@ -72,7 +72,7 @@ * to cover the number of blocks requested at creation time even if it * must be encompassed in larger root-node radix. * - * NOTE: the allocator cannot currently allocate more then + * NOTE: the allocator cannot currently allocate more than * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too * large' if you try. This is an area that could use improvement. The * radix is large enough that this restriction does not effect the swap @@ -152,7 +152,7 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Sw * blist_create() - create a blist capable of handling up to the specified * number of blocks * - * blocks - must be greater then 0 + * blocks - must be greater than 0 * flags - malloc flags * * The smallest blist consists of a single leaf node capable of @@ -841,7 +841,7 @@ blst_meta_fill( * * Initialize our meta structures and bitmaps and calculate the exact * amount of space required to manage 'count' blocks - this space may - * be considerably less then the calculated radix due to the large + * be considerably less than the calculated radix due to the large * RADIX values we use. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229833 - stable/9/sys/conf
Author: gjb (doc committer) Date: Mon Jan 9 01:59:17 2012 New Revision: 229833 URL: http://svn.freebsd.org/changeset/base/229833 Log: MFC r229353: - Trivial standardization to a few comments in kern.pre.mk. Modified: stable/9/sys/conf/kern.pre.mk Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/kern.pre.mk == --- stable/9/sys/conf/kern.pre.mk Mon Jan 9 01:02:37 2012 (r229832) +++ stable/9/sys/conf/kern.pre.mk Mon Jan 9 01:59:17 2012 (r229833) @@ -71,10 +71,10 @@ INCLUDES+= -I$S/dev/ath -I$S/dev/ath/ath # ... and the same for the NgATM stuff INCLUDES+= -I$S/contrib/ngatm -# .. and the same for twa +# ... and the same for twa INCLUDES+= -I$S/dev/twa -# ... and XFS +# ... and the same for XFS INCLUDES+= -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs # ... and the same for cxgb and cxgbe ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229834 - stable/8/sys/conf
Author: gjb (doc committer) Date: Mon Jan 9 01:59:50 2012 New Revision: 229834 URL: http://svn.freebsd.org/changeset/base/229834 Log: MFC r229353: - Trivial standardization to a few comments in kern.pre.mk. Modified: stable/8/sys/conf/kern.pre.mk Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/conf/kern.pre.mk == --- stable/8/sys/conf/kern.pre.mk Mon Jan 9 01:59:17 2012 (r229833) +++ stable/8/sys/conf/kern.pre.mk Mon Jan 9 01:59:50 2012 (r229834) @@ -73,10 +73,10 @@ INCLUDES+= -I$S/dev/ath -I$S/dev/ath/ath # ... and the same for the NgATM stuff INCLUDES+= -I$S/contrib/ngatm -# .. and the same for twa +# ... and the same for twa INCLUDES+= -I$S/dev/twa -# ... and XFS +# ... and the same for XFS INCLUDES+= -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs # ... and the same for cxgb and cxgbe ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229835 - stable/7/sys/conf
Author: gjb (doc committer) Date: Mon Jan 9 02:00:31 2012 New Revision: 229835 URL: http://svn.freebsd.org/changeset/base/229835 Log: MFC r229353: - Trivial standardization to a few comments in kern.pre.mk. Modified: stable/7/sys/conf/kern.pre.mk Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/conf/kern.pre.mk == --- stable/7/sys/conf/kern.pre.mk Mon Jan 9 01:59:50 2012 (r229834) +++ stable/7/sys/conf/kern.pre.mk Mon Jan 9 02:00:31 2012 (r229835) @@ -71,10 +71,10 @@ INCLUDES+= -I$S/dev/ath -I$S/dev/ath/ath # ... and the same for the NgATM stuff INCLUDES+= -I$S/contrib/ngatm -# .. and the same for twa +# ... and the same for twa INCLUDES+= -I$S/dev/twa -# ... and XFS +# ... and the same for XFS INCLUDES+= -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs # ... and the same for cxgb ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r228985 - head/sys/boot/forth
On Jan 8, 2012, at 12:35 PM, Sergey Kandaurov wrote: > On 8 January 2012 00:03, Dimitry Andric wrote: >> On 2011-12-30 07:24, Sergey Kandaurov wrote: >>> >>> Author: pluknet >>> Date: Fri Dec 30 06:24:59 2011 >>> New Revision: 228985 >>> URL: http://svn.freebsd.org/changeset/base/228985 >>> >>> Log: >>> Unset the environment variables associated with individual menu items >>> before invoking the kernel. >> >> >> When I did a single-user mode boot to install a new world, I saw the >> following warning on the (serial) console during boot: >> >> /boot.config: -D -S115200 >> Consoles: internal video/keyboard serial port >> BIOS drive A: is disk0 >> BIOS drive C: is disk1 >> BIOS 638kB/3143616kB available memory >> >> FreeBSD/x86 bootstrap loader, Revision 1.1 >> (d...@vm-freebsd10-amd64.home.andric.com, Sat Jan 7 01:05:07 CET 2012) >> Loading /boot/defaults/loader.conf >> /boot/kernel/kernel data=0xb73530 data=0x11dbe0+0x2b4db8 >> syms=[0x8+0xfd620+0x8+0xec6b6] >> - >> Hit [Enter] to boot immediately, or any other key for command prompt. >> >> >> Type '?' for a list of commands, 'help' for more detailed help. >> OK boot -s >> menu-unset not found <<-- what's this? >> GDB: no debug ports present >> KDB: debugger backends: ddb >> KDB: current backend: ddb >> [...kernel boots...] >> >> E.g, it always gives a 'menu-unset not found' warning (or maybe it's an >> error, it's not clear). This was not the case before r228985. >> >> I have almost no knowledge about forth, but it looks like this might be >> caused by the new try-menu-unset subroutine. >> >> My loader.conf is just this: >> >> beastie_disable="YES" >> comconsole_speed="115200" >> console="comconsole vidconsole" >> kern.hz="100" > > So, the problem arise when beastie_disable is set. > > In this case menu.rc is not evaluated and consequently menu-unset does > not have a body yet. This results in the ficl warning "not found" when > try-menu-unset calls menu-unset. The warning cannot be handled with catch > as seen with the code in head. > Otherwise, when beastie is enabled, all works as it should. > > To "fix" the problem I replaced 'catch' with 'sfind', so that we can > conditionally call menu-unset only when the definition is present. > > Please try the following patch. I tested it with enabled/disabled beastie > and loader_color over serial console. I would also like to get a review > from Devin Teske to see if this change is acceptable. > > %%% > Index: sys/boot/forth/loader.4th > === > --- sys/boot/forth/loader.4th (revision 229670) > +++ sys/boot/forth/loader.4th (working copy) > @@ -45,8 +45,10 @@ > > : try-menu-unset > s" menu-unset" > - ['] evaluate catch if > -2drop > + sfind if > +execute > + else > +drop > then > ; > > %%% > I've reviewed the patch, but also submitted my solution as PR amd64/163938. However, I love your use of sfind -- it's perfect. Nice job! I'm incorporating your patch into my patch for PR amd64/163938 for posterity measures and historical archiving. Please review in a few moments after submission of my followup. > [ It could be simplified with one-liner: > s" menu-unset" sfind drop execute > but ficl doesn't like this in a freestanding environment.] > Nah, multi-line is perfectly fine. -- Devin _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229836 - stable/8/sys/kern
Author: eadler (ports committer) Date: Mon Jan 9 03:03:43 2012 New Revision: 229836 URL: http://svn.freebsd.org/changeset/base/229836 Log: MFC r228233: - Fix typos s/(more|less) then|\1 than/ Approved by: brucec Modified: stable/8/sys/kern/subr_blist.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/subr_blist.c == --- stable/8/sys/kern/subr_blist.c Mon Jan 9 02:00:31 2012 (r229835) +++ stable/8/sys/kern/subr_blist.c Mon Jan 9 03:03:43 2012 (r229836) @@ -29,7 +29,7 @@ * * This module implements a general bitmap allocator/deallocator. The * allocator eats around 2 bits per 'block'. The module does not - * try to interpret the meaning of a 'block' other then to return + * try to interpret the meaning of a 'block' other than to return * SWAPBLK_NONE on an allocation failure. * * A radix tree is used to maintain the bitmap. Two radix constants are @@ -57,7 +57,7 @@ * the memory subsystem. In contrast, the rlist code may allocate memory * on an rlist_free() call. The non-blocking features of the blist code * are used to great advantage in the swap code (vm/nswap_pager.c). The - * rlist code uses a little less overall memory then the blist code (but + * rlist code uses a little less overall memory than the blist code (but * due to swap interleaving not all that much less), but the blist code * scales much, much better. * @@ -72,7 +72,7 @@ * to cover the number of blocks requested at creation time even if it * must be encompassed in larger root-node radix. * - * NOTE: the allocator cannot currently allocate more then + * NOTE: the allocator cannot currently allocate more than * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too * large' if you try. This is an area that could use improvement. The * radix is large enough that this restriction does not effect the swap @@ -152,7 +152,7 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Sw * blist_create() - create a blist capable of handling up to the specified * number of blocks * - * blocks - must be greater then 0 + * blocks - must be greater than 0 * flags - malloc flags * * The smallest blist consists of a single leaf node capable of @@ -841,7 +841,7 @@ blst_meta_fill( * * Initialize our meta structures and bitmaps and calculate the exact * amount of space required to manage 'count' blocks - this space may - * be considerably less then the calculated radix due to the large + * be considerably less than the calculated radix due to the large * RADIX values we use. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229837 - stable/7/sys/kern
Author: eadler (ports committer) Date: Mon Jan 9 03:03:43 2012 New Revision: 229837 URL: http://svn.freebsd.org/changeset/base/229837 Log: MFC r228233: - Fix typos s/(more|less) then|\1 than/ Approved by: brucec Modified: stable/7/sys/kern/subr_blist.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/kern/subr_blist.c == --- stable/7/sys/kern/subr_blist.c Mon Jan 9 03:03:43 2012 (r229836) +++ stable/7/sys/kern/subr_blist.c Mon Jan 9 03:03:43 2012 (r229837) @@ -29,7 +29,7 @@ * * This module implements a general bitmap allocator/deallocator. The * allocator eats around 2 bits per 'block'. The module does not - * try to interpret the meaning of a 'block' other then to return + * try to interpret the meaning of a 'block' other than to return * SWAPBLK_NONE on an allocation failure. * * A radix tree is used to maintain the bitmap. Two radix constants are @@ -57,7 +57,7 @@ * the memory subsystem. In contrast, the rlist code may allocate memory * on an rlist_free() call. The non-blocking features of the blist code * are used to great advantage in the swap code (vm/nswap_pager.c). The - * rlist code uses a little less overall memory then the blist code (but + * rlist code uses a little less overall memory than the blist code (but * due to swap interleaving not all that much less), but the blist code * scales much, much better. * @@ -72,7 +72,7 @@ * to cover the number of blocks requested at creation time even if it * must be encompassed in larger root-node radix. * - * NOTE: the allocator cannot currently allocate more then + * NOTE: the allocator cannot currently allocate more than * BLIST_BMAP_RADIX blocks per call. It will panic with 'allocation too * large' if you try. This is an area that could use improvement. The * radix is large enough that this restriction does not effect the swap @@ -152,7 +152,7 @@ static MALLOC_DEFINE(M_SWAP, "SWAP", "Sw * blist_create() - create a blist capable of handling up to the specified * number of blocks * - * blocks - must be greater then 0 + * blocks - must be greater than 0 * flags - malloc flags * * The smallest blist consists of a single leaf node capable of @@ -841,7 +841,7 @@ blst_meta_fill( * * Initialize our meta structures and bitmaps and calculate the exact * amount of space required to manage 'count' blocks - this space may - * be considerably less then the calculated radix due to the large + * be considerably less than the calculated radix due to the large * RADIX values we use. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229838 - head/sbin/geom/class/part
Author: wblock (doc committer) Date: Mon Jan 9 04:27:32 2012 New Revision: 229838 URL: http://svn.freebsd.org/changeset/base/229838 Log: Clarity improvements. Approved by: gjb (mentor) MFC after:3 days Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 == --- head/sbin/geom/class/part/gpart.8 Mon Jan 9 03:03:43 2012 (r229837) +++ head/sbin/geom/class/part/gpart.8 Mon Jan 9 04:27:32 2012 (r229838) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 21, 2011 +.Dd January 8, 2012 .Dt GPART 8 .Os .Sh NAME @@ -33,7 +33,7 @@ .Sh SYNOPSIS To add support for the disk partitioning GEOM class, place one or more of the following -lines in your kernel configuration file: +lines in the kernel configuration file: .Bd -ragged -offset indent .Cd "options GEOM_PART_APM" .Cd "options GEOM_PART_BSD" @@ -410,13 +410,13 @@ about its use. .El .\" RESTORE .It Cm restore -Restore the partition table from backup previously created by +Restore the partition table from a backup previously created by the .Cm backup -action and given from standard input. -Only partition table may be restored. -This action does not affect content of partitions. -This mean that you should copy your data from backup after restoring -partition table and write bootcode again if it is needed. +action and read from standard input. +Only the partition table is restored. +This action does not affect the content of partitions. +After restoring the partition table and writing bootcode if needed, +user data must be restored from backup. .Pp Additional options include: .Bl -tag -width 10n ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229839 - stable/9/lib/msun/src
Author: das Date: Mon Jan 9 04:55:52 2012 New Revision: 229839 URL: http://svn.freebsd.org/changeset/base/229839 Log: MFC various fma{,f,l} improvements: r226245 - refactoring r226371 - fix double-rounding bug r226373 - new math_private.h macros r226601 - fix nit in r226371 Modified: stable/9/lib/msun/src/math_private.h stable/9/lib/msun/src/s_fma.c stable/9/lib/msun/src/s_fmaf.c stable/9/lib/msun/src/s_fmal.c Directory Properties: stable/9/lib/msun/ (props changed) Modified: stable/9/lib/msun/src/math_private.h == --- stable/9/lib/msun/src/math_private.hMon Jan 9 04:27:32 2012 (r229838) +++ stable/9/lib/msun/src/math_private.hMon Jan 9 04:55:52 2012 (r229839) @@ -58,6 +58,10 @@ typedef union u_int32_t msw; u_int32_t lsw; } parts; + struct + { +u_int64_t w; + } xparts; } ieee_double_shape_type; #endif @@ -72,6 +76,10 @@ typedef union u_int32_t lsw; u_int32_t msw; } parts; + struct + { +u_int64_t w; + } xparts; } ieee_double_shape_type; #endif @@ -86,6 +94,14 @@ do { \ (ix1) = ew_u.parts.lsw; \ } while (0) +/* Get a 64-bit int from a double. */ +#define EXTRACT_WORD64(ix,d) \ +do { \ + ieee_double_shape_type ew_u; \ + ew_u.value = (d);\ + (ix) = ew_u.xparts.w;\ +} while (0) + /* Get the more significant 32 bit int from a double. */ #define GET_HIGH_WORD(i,d) \ @@ -114,6 +130,14 @@ do { \ (d) = iw_u.value;\ } while (0) +/* Set a double from a 64-bit int. */ +#define INSERT_WORD64(d,ix)\ +do { \ + ieee_double_shape_type iw_u; \ + iw_u.xparts.w = (ix);\ + (d) = iw_u.value;\ +} while (0) + /* Set the more significant 32 bits of a double from an int. */ #define SET_HIGH_WORD(d,v) \ Modified: stable/9/lib/msun/src/s_fma.c == --- stable/9/lib/msun/src/s_fma.c Mon Jan 9 04:27:32 2012 (r229838) +++ stable/9/lib/msun/src/s_fma.c Mon Jan 9 04:55:52 2012 (r229839) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 David Schultz + * Copyright (c) 2005-2011 David Schultz * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +31,132 @@ __FBSDID("$FreeBSD$"); #include #include +#include "math_private.h" + +/* + * A struct dd represents a floating-point number with twice the precision + * of a double. We maintain the invariant that "hi" stores the 53 high-order + * bits of the result. + */ +struct dd { + double hi; + double lo; +}; + +/* + * Compute a+b exactly, returning the exact result in a struct dd. We assume + * that both a and b are finite, but make no assumptions about their relative + * magnitudes. + */ +static inline struct dd +dd_add(double a, double b) +{ + struct dd ret; + double s; + + ret.hi = a + b; + s = ret.hi - a; + ret.lo = (a - (ret.hi - s)) + (b - s); + return (ret); +} + +/* + * Compute a+b, with a small tweak: The least significant bit of the + * result is adjusted into a sticky bit summarizing all the bits that + * were lost to rounding. This adjustment negates the effects of double + * rounding when the result is added to another number with a higher + * exponent. For an explanation of round and sticky bits, see any reference + * on FPU design, e.g., + * + * J. Coonen. An Implementation Guide to a Proposed Standard for + * Floating-Point Arithmetic. Computer, vol. 13, no. 1, Jan 1980. + */ +static inline double +add_adjusted(double a, double b) +{ + struct dd sum; + uint64_t hibits, lobits; + + sum = dd_add(a, b); + if (sum.lo != 0) { + EXTRACT_WORD64(hibits, sum.hi); + if ((hibits & 1) == 0) { + /* hibits += (int)copysign(1.0, sum.hi * sum.lo) */ + EXTRACT_WORD64(lobits, sum.lo); + hibits += 1 - ((hibits ^ lobits) >> 62); + INSERT_WORD64(sum.hi, hibits); + } + } + return (sum.hi); +} + +/* + * Compute ldexp(a+b, scale) with a single rounding error. It is assumed + * that the result will be subnormal, and care
svn commit: r229840 - stable/8/lib/msun/src
Author: das Date: Mon Jan 9 04:55:55 2012 New Revision: 229840 URL: http://svn.freebsd.org/changeset/base/229840 Log: MFC various fma{,f,l} improvements: r226245 - refactoring r226371 - fix double-rounding bug r226373 - new math_private.h macros r226601 - fix nit in r226371 Modified: stable/8/lib/msun/src/math_private.h stable/8/lib/msun/src/s_fma.c stable/8/lib/msun/src/s_fmaf.c stable/8/lib/msun/src/s_fmal.c Directory Properties: stable/8/lib/msun/ (props changed) Modified: stable/8/lib/msun/src/math_private.h == --- stable/8/lib/msun/src/math_private.hMon Jan 9 04:55:52 2012 (r229839) +++ stable/8/lib/msun/src/math_private.hMon Jan 9 04:55:55 2012 (r229840) @@ -58,6 +58,10 @@ typedef union u_int32_t msw; u_int32_t lsw; } parts; + struct + { +u_int64_t w; + } xparts; } ieee_double_shape_type; #endif @@ -72,6 +76,10 @@ typedef union u_int32_t lsw; u_int32_t msw; } parts; + struct + { +u_int64_t w; + } xparts; } ieee_double_shape_type; #endif @@ -86,6 +94,14 @@ do { \ (ix1) = ew_u.parts.lsw; \ } while (0) +/* Get a 64-bit int from a double. */ +#define EXTRACT_WORD64(ix,d) \ +do { \ + ieee_double_shape_type ew_u; \ + ew_u.value = (d);\ + (ix) = ew_u.xparts.w;\ +} while (0) + /* Get the more significant 32 bit int from a double. */ #define GET_HIGH_WORD(i,d) \ @@ -114,6 +130,14 @@ do { \ (d) = iw_u.value;\ } while (0) +/* Set a double from a 64-bit int. */ +#define INSERT_WORD64(d,ix)\ +do { \ + ieee_double_shape_type iw_u; \ + iw_u.xparts.w = (ix);\ + (d) = iw_u.value;\ +} while (0) + /* Set the more significant 32 bits of a double from an int. */ #define SET_HIGH_WORD(d,v) \ Modified: stable/8/lib/msun/src/s_fma.c == --- stable/8/lib/msun/src/s_fma.c Mon Jan 9 04:55:52 2012 (r229839) +++ stable/8/lib/msun/src/s_fma.c Mon Jan 9 04:55:55 2012 (r229840) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2005 David Schultz + * Copyright (c) 2005-2011 David Schultz * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +31,132 @@ __FBSDID("$FreeBSD$"); #include #include +#include "math_private.h" + +/* + * A struct dd represents a floating-point number with twice the precision + * of a double. We maintain the invariant that "hi" stores the 53 high-order + * bits of the result. + */ +struct dd { + double hi; + double lo; +}; + +/* + * Compute a+b exactly, returning the exact result in a struct dd. We assume + * that both a and b are finite, but make no assumptions about their relative + * magnitudes. + */ +static inline struct dd +dd_add(double a, double b) +{ + struct dd ret; + double s; + + ret.hi = a + b; + s = ret.hi - a; + ret.lo = (a - (ret.hi - s)) + (b - s); + return (ret); +} + +/* + * Compute a+b, with a small tweak: The least significant bit of the + * result is adjusted into a sticky bit summarizing all the bits that + * were lost to rounding. This adjustment negates the effects of double + * rounding when the result is added to another number with a higher + * exponent. For an explanation of round and sticky bits, see any reference + * on FPU design, e.g., + * + * J. Coonen. An Implementation Guide to a Proposed Standard for + * Floating-Point Arithmetic. Computer, vol. 13, no. 1, Jan 1980. + */ +static inline double +add_adjusted(double a, double b) +{ + struct dd sum; + uint64_t hibits, lobits; + + sum = dd_add(a, b); + if (sum.lo != 0) { + EXTRACT_WORD64(hibits, sum.hi); + if ((hibits & 1) == 0) { + /* hibits += (int)copysign(1.0, sum.hi * sum.lo) */ + EXTRACT_WORD64(lobits, sum.lo); + hibits += 1 - ((hibits ^ lobits) >> 62); + INSERT_WORD64(sum.hi, hibits); + } + } + return (sum.hi); +} + +/* + * Compute ldexp(a+b, scale) with a single rounding error. It is assumed + * that the result will be subnormal, and care
svn commit: r229841 - in stable/9/lib/msun: amd64 i387
Author: das Date: Mon Jan 9 04:57:06 2012 New Revision: 229841 URL: http://svn.freebsd.org/changeset/base/229841 Log: MFC r226594: Bugfix: feenableexcept() and fedisableexcept() should just return the old exception mask, not mask | ~FE_ALL_EXCEPT. Modified: stable/9/lib/msun/amd64/fenv.c stable/9/lib/msun/i387/fenv.c Directory Properties: stable/9/lib/msun/ (props changed) Modified: stable/9/lib/msun/amd64/fenv.c == --- stable/9/lib/msun/amd64/fenv.c Mon Jan 9 04:55:55 2012 (r229840) +++ stable/9/lib/msun/amd64/fenv.c Mon Jan 9 04:57:06 2012 (r229841) @@ -120,12 +120,12 @@ __feenableexcept(int mask) mask &= FE_ALL_EXCEPT; __fnstcw(&control); __stmxcsr(&mxcsr); - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control &= ~mask; __fldcw(control); mxcsr &= ~(mask << _SSE_EMASK_SHIFT); __ldmxcsr(mxcsr); - return (~omask); + return (omask); } int @@ -137,12 +137,12 @@ __fedisableexcept(int mask) mask &= FE_ALL_EXCEPT; __fnstcw(&control); __stmxcsr(&mxcsr); - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control |= mask; __fldcw(control); mxcsr |= mask << _SSE_EMASK_SHIFT; __ldmxcsr(mxcsr); - return (~omask); + return (omask); } __weak_reference(__feenableexcept, feenableexcept); Modified: stable/9/lib/msun/i387/fenv.c == --- stable/9/lib/msun/i387/fenv.c Mon Jan 9 04:55:55 2012 (r229840) +++ stable/9/lib/msun/i387/fenv.c Mon Jan 9 04:57:06 2012 (r229841) @@ -177,14 +177,14 @@ __feenableexcept(int mask) __stmxcsr(&mxcsr); else mxcsr = 0; - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control &= ~mask; __fldcw(control); if (__HAS_SSE()) { mxcsr &= ~(mask << _SSE_EMASK_SHIFT); __ldmxcsr(mxcsr); } - return (~omask); + return (omask); } int @@ -199,14 +199,14 @@ __fedisableexcept(int mask) __stmxcsr(&mxcsr); else mxcsr = 0; - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control |= mask; __fldcw(control); if (__HAS_SSE()) { mxcsr |= mask << _SSE_EMASK_SHIFT; __ldmxcsr(mxcsr); } - return (~omask); + return (omask); } __weak_reference(__feenableexcept, feenableexcept); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229842 - in stable/8/lib/msun: amd64 i387
Author: das Date: Mon Jan 9 04:57:09 2012 New Revision: 229842 URL: http://svn.freebsd.org/changeset/base/229842 Log: MFC r226594: Bugfix: feenableexcept() and fedisableexcept() should just return the old exception mask, not mask | ~FE_ALL_EXCEPT. Modified: stable/8/lib/msun/amd64/fenv.c stable/8/lib/msun/i387/fenv.c Directory Properties: stable/8/lib/msun/ (props changed) Modified: stable/8/lib/msun/amd64/fenv.c == --- stable/8/lib/msun/amd64/fenv.c Mon Jan 9 04:57:06 2012 (r229841) +++ stable/8/lib/msun/amd64/fenv.c Mon Jan 9 04:57:09 2012 (r229842) @@ -120,12 +120,12 @@ __feenableexcept(int mask) mask &= FE_ALL_EXCEPT; __fnstcw(&control); __stmxcsr(&mxcsr); - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control &= ~mask; __fldcw(control); mxcsr &= ~(mask << _SSE_EMASK_SHIFT); __ldmxcsr(mxcsr); - return (~omask); + return (omask); } int @@ -137,12 +137,12 @@ __fedisableexcept(int mask) mask &= FE_ALL_EXCEPT; __fnstcw(&control); __stmxcsr(&mxcsr); - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control |= mask; __fldcw(control); mxcsr |= mask << _SSE_EMASK_SHIFT; __ldmxcsr(mxcsr); - return (~omask); + return (omask); } __weak_reference(__feenableexcept, feenableexcept); Modified: stable/8/lib/msun/i387/fenv.c == --- stable/8/lib/msun/i387/fenv.c Mon Jan 9 04:57:06 2012 (r229841) +++ stable/8/lib/msun/i387/fenv.c Mon Jan 9 04:57:09 2012 (r229842) @@ -177,14 +177,14 @@ __feenableexcept(int mask) __stmxcsr(&mxcsr); else mxcsr = 0; - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control &= ~mask; __fldcw(control); if (__HAS_SSE()) { mxcsr &= ~(mask << _SSE_EMASK_SHIFT); __ldmxcsr(mxcsr); } - return (~omask); + return (omask); } int @@ -199,14 +199,14 @@ __fedisableexcept(int mask) __stmxcsr(&mxcsr); else mxcsr = 0; - omask = (control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; + omask = ~(control | mxcsr >> _SSE_EMASK_SHIFT) & FE_ALL_EXCEPT; control |= mask; __fldcw(control); if (__HAS_SSE()) { mxcsr |= mask << _SSE_EMASK_SHIFT; __ldmxcsr(mxcsr); } - return (~omask); + return (omask); } __weak_reference(__feenableexcept, feenableexcept); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229843 - stable/9/lib/msun/src
Author: das Date: Mon Jan 9 04:57:59 2012 New Revision: 229843 URL: http://svn.freebsd.org/changeset/base/229843 Log: MFC r226595: Per IEEE754r, pow(1, y) is 1 even if y is NaN, and pow(-1, +-Inf) is 1. Modified: stable/9/lib/msun/src/e_pow.c stable/9/lib/msun/src/e_powf.c Directory Properties: stable/9/lib/msun/ (props changed) Modified: stable/9/lib/msun/src/e_pow.c == --- stable/9/lib/msun/src/e_pow.c Mon Jan 9 04:57:09 2012 (r229842) +++ stable/9/lib/msun/src/e_pow.c Mon Jan 9 04:57:59 2012 (r229843) @@ -109,6 +109,9 @@ __ieee754_pow(double x, double y) /* y==zero: x**0 = 1 */ if((iy|ly)==0) return one; +/* x==1: 1**y = 1, even if y is NaN */ + if (hx==0x3ff0 && lx == 0) return one; + /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7ff0 || ((ix==0x7ff0)&&(lx!=0)) || iy > 0x7ff0 || ((iy==0x7ff0)&&(ly!=0))) @@ -138,7 +141,7 @@ __ieee754_pow(double x, double y) if(ly==0) { if (iy==0x7ff0) { /* y is +-inf */ if(((ix-0x3ff0)|lx)==0) - return y - y; /* inf**+-1 is NaN */ + return one;/* (-1)**+-inf is NaN */ else if (ix >= 0x3ff0)/* (|x|>1)**+-inf = inf,0 */ return (hy>=0)? y: zero; else/* (|x|<1)**-,+inf = inf,0 */ Modified: stable/9/lib/msun/src/e_powf.c == --- stable/9/lib/msun/src/e_powf.c Mon Jan 9 04:57:09 2012 (r229842) +++ stable/9/lib/msun/src/e_powf.c Mon Jan 9 04:57:59 2012 (r229843) @@ -67,6 +67,9 @@ __ieee754_powf(float x, float y) /* y==zero: x**0 = 1 */ if(iy==0) return one; +/* x==1: 1**y = 1, even if y is NaN */ + if (hx==0x3f80) return one; + /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7f80 || iy > 0x7f80) @@ -90,7 +93,7 @@ __ieee754_powf(float x, float y) /* special value of y */ if (iy==0x7f80) { /* y is +-inf */ if (ix==0x3f80) - return y - y; /* inf**+-1 is NaN */ + return one;/* (-1)**+-inf is NaN */ else if (ix > 0x3f80)/* (|x|>1)**+-inf = inf,0 */ return (hy>=0)? y: zero; else/* (|x|<1)**-,+inf = inf,0 */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229844 - stable/8/lib/msun/src
Author: das Date: Mon Jan 9 04:58:02 2012 New Revision: 229844 URL: http://svn.freebsd.org/changeset/base/229844 Log: MFC r226595: Per IEEE754r, pow(1, y) is 1 even if y is NaN, and pow(-1, +-Inf) is 1. Modified: stable/8/lib/msun/src/e_pow.c stable/8/lib/msun/src/e_powf.c Directory Properties: stable/8/lib/msun/ (props changed) Modified: stable/8/lib/msun/src/e_pow.c == --- stable/8/lib/msun/src/e_pow.c Mon Jan 9 04:57:59 2012 (r229843) +++ stable/8/lib/msun/src/e_pow.c Mon Jan 9 04:58:02 2012 (r229844) @@ -109,6 +109,9 @@ __ieee754_pow(double x, double y) /* y==zero: x**0 = 1 */ if((iy|ly)==0) return one; +/* x==1: 1**y = 1, even if y is NaN */ + if (hx==0x3ff0 && lx == 0) return one; + /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7ff0 || ((ix==0x7ff0)&&(lx!=0)) || iy > 0x7ff0 || ((iy==0x7ff0)&&(ly!=0))) @@ -138,7 +141,7 @@ __ieee754_pow(double x, double y) if(ly==0) { if (iy==0x7ff0) { /* y is +-inf */ if(((ix-0x3ff0)|lx)==0) - return y - y; /* inf**+-1 is NaN */ + return one;/* (-1)**+-inf is NaN */ else if (ix >= 0x3ff0)/* (|x|>1)**+-inf = inf,0 */ return (hy>=0)? y: zero; else/* (|x|<1)**-,+inf = inf,0 */ Modified: stable/8/lib/msun/src/e_powf.c == --- stable/8/lib/msun/src/e_powf.c Mon Jan 9 04:57:59 2012 (r229843) +++ stable/8/lib/msun/src/e_powf.c Mon Jan 9 04:58:02 2012 (r229844) @@ -67,6 +67,9 @@ __ieee754_powf(float x, float y) /* y==zero: x**0 = 1 */ if(iy==0) return one; +/* x==1: 1**y = 1, even if y is NaN */ + if (hx==0x3f80) return one; + /* y!=zero: result is NaN if either arg is NaN */ if(ix > 0x7f80 || iy > 0x7f80) @@ -90,7 +93,7 @@ __ieee754_powf(float x, float y) /* special value of y */ if (iy==0x7f80) { /* y is +-inf */ if (ix==0x3f80) - return y - y; /* inf**+-1 is NaN */ + return one;/* (-1)**+-inf is NaN */ else if (ix > 0x3f80)/* (|x|>1)**+-inf = inf,0 */ return (hy>=0)? y: zero; else/* (|x|<1)**-,+inf = inf,0 */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229845 - stable/9/lib/libc/stdio
Author: das Date: Mon Jan 9 04:59:44 2012 New Revision: 229845 URL: http://svn.freebsd.org/changeset/base/229845 Log: MFC r226604: Add support for the 'x' mode option in fopen() as specified in the C1X draft standard. The option is equivalent to O_EXCL. Modified: stable/9/lib/libc/stdio/flags.c stable/9/lib/libc/stdio/fopen.3 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdio/flags.c == --- stable/9/lib/libc/stdio/flags.c Mon Jan 9 04:58:02 2012 (r229844) +++ stable/9/lib/libc/stdio/flags.c Mon Jan 9 04:59:44 2012 (r229845) @@ -80,11 +80,30 @@ __sflags(mode, optr) return (0); } - /* [rwa]\+ or [rwa]b\+ means read and write */ - if (*mode == '+' || (*mode == 'b' && mode[1] == '+')) { + /* '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') { + if (m == O_RDONLY) { + errno = EINVAL; + return (0); + } + o |= O_EXCL; + } + *optr = m | o; return (ret); } Modified: stable/9/lib/libc/stdio/fopen.3 == --- stable/9/lib/libc/stdio/fopen.3 Mon Jan 9 04:58:02 2012 (r229844) +++ stable/9/lib/libc/stdio/fopen.3 Mon Jan 9 04:59:44 2012 (r229845) @@ -32,7 +32,7 @@ .\" @(#)fopen.38.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 26, 2003 +.Dd October 17, 2011 .Dt FOPEN 3 .Os .Sh NAME @@ -60,45 +60,51 @@ and associates a stream with it. .Pp The argument .Fa mode -points to a string beginning with one of the following -sequences (Additional characters may follow these sequences.): +points to a string beginning with one of the following letters: .Bl -tag -width indent .It Dq Li r -Open text file for reading. -The stream is positioned at the beginning of the file. -.It Dq Li r+ -Open for reading and writing. +Open for reading. The stream is positioned at the beginning of the file. +Fail if the file does not exist. .It Dq Li w -Truncate to zero length or create text file for writing. -The stream is positioned at the beginning of the file. -.It Dq Li w+ -Open for reading and writing. -The file is created if it does not exist, otherwise it is truncated. +Open for writing. The stream is positioned at the beginning of the file. +Create the file if it does not exist. .It Dq Li a Open for writing. -The file is created if it does not exist. -The stream is positioned at the end of the file. -Subsequent writes to the file will always end up at the then current -end of file, irrespective of any intervening -.Xr fseek 3 -or similar. -.It Dq Li a+ -Open for reading and writing. -The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening .Xr fseek 3 or similar. +Create the file if it does not exist. .El .Pp +An optional +.Dq Li + +following +.Dq Li r , +.Dq Li w , +or +.Dq Li a +opens the file for both reading and writing. +An optional +.Dq Li x +following +.Dq Li w +or +.Dq Li w+ +causes the +.Fn fopen +call to fail if the file already exists. +.Pp The .Fa mode -string can also include the letter ``b'' either as last character or -as a character between the characters in any of the two-character strings -described above. +string can also include the letter +.Dq Li b +after either the +.Dq Li + +or the first letter. This is strictly for compatibility with .St -isoC and has no effect; the ``b'' is ignored. @@ -135,6 +141,9 @@ function associates a stream with the ex .Fa fildes . The mode of the stream must be compatible with the mode of the file descriptor. +The +.Dq Li x +mode option is ignored. When the stream is closed via .Xr fclose 3 , .Fa fildes @@ -165,29 +174,12 @@ attempts to re-open the file associated with a new mode. The new mode must be compatible with the mode that the stream was originally opened with: -.Bl -bullet -offset indent -.It -Streams originally opened with mode -.Dq Li r -can only be reopened with that same mode. -.It -Streams originally opened with mode -.Dq Li a -can be reopened with the same mode, or mode -.Dq Li w . -.It -Streams originally opened with mode -.Dq Li w -can be reopened with the same mode, or mode -.Dq Li a . -.It -Streams originally opened with mode -.Dq Li r+ , -.Dq Li w+ , -or -.Dq Li a+ -can be
svn commit: r229846 - stable/8/lib/libc/stdio
Author: das Date: Mon Jan 9 04:59:47 2012 New Revision: 229846 URL: http://svn.freebsd.org/changeset/base/229846 Log: MFC r226604: Add support for the 'x' mode option in fopen() as specified in the C1X draft standard. The option is equivalent to O_EXCL. Also merge doc improvements r197045 and r207942. Modified: stable/8/lib/libc/stdio/flags.c stable/8/lib/libc/stdio/fopen.3 Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/stdio/flags.c == --- stable/8/lib/libc/stdio/flags.c Mon Jan 9 04:59:44 2012 (r229845) +++ stable/8/lib/libc/stdio/flags.c Mon Jan 9 04:59:47 2012 (r229846) @@ -80,11 +80,30 @@ __sflags(mode, optr) return (0); } - /* [rwa]\+ or [rwa]b\+ means read and write */ - if (*mode == '+' || (*mode == 'b' && mode[1] == '+')) { + /* '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') { + if (m == O_RDONLY) { + errno = EINVAL; + return (0); + } + o |= O_EXCL; + } + *optr = m | o; return (ret); } Modified: stable/8/lib/libc/stdio/fopen.3 == --- stable/8/lib/libc/stdio/fopen.3 Mon Jan 9 04:59:44 2012 (r229845) +++ stable/8/lib/libc/stdio/fopen.3 Mon Jan 9 04:59:47 2012 (r229846) @@ -32,7 +32,7 @@ .\" @(#)fopen.38.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 26, 2003 +.Dd October 17, 2011 .Dt FOPEN 3 .Os .Sh NAME @@ -60,51 +60,57 @@ and associates a stream with it. .Pp The argument .Fa mode -points to a string beginning with one of the following -sequences (Additional characters may follow these sequences.): +points to a string beginning with one of the following letters: .Bl -tag -width indent .It Dq Li r -Open text file for reading. -The stream is positioned at the beginning of the file. -.It Dq Li r+ -Open for reading and writing. +Open for reading. The stream is positioned at the beginning of the file. +Fail if the file does not exist. .It Dq Li w -Truncate to zero length or create text file for writing. -The stream is positioned at the beginning of the file. -.It Dq Li w+ -Open for reading and writing. -The file is created if it does not exist, otherwise it is truncated. +Open for writing. The stream is positioned at the beginning of the file. +Create the file if it does not exist. .It Dq Li a Open for writing. -The file is created if it does not exist. -The stream is positioned at the end of the file. -Subsequent writes to the file will always end up at the then current -end of file, irrespective of any intervening -.Xr fseek 3 -or similar. -.It Dq Li a+ -Open for reading and writing. -The file is created if it does not exist. The stream is positioned at the end of the file. Subsequent writes to the file will always end up at the then current end of file, irrespective of any intervening .Xr fseek 3 or similar. +Create the file if it does not exist. .El .Pp +An optional +.Dq Li + +following +.Dq Li r , +.Dq Li w , +or +.Dq Li a +opens the file for both reading and writing. +An optional +.Dq Li x +following +.Dq Li w +or +.Dq Li w+ +causes the +.Fn fopen +call to fail if the file already exists. +.Pp The .Fa mode -string can also include the letter ``b'' either as a third character or -as a character between the characters in any of the two-character strings -described above. +string can also include the letter +.Dq Li b +after either the +.Dq Li + +or the first letter. This is strictly for compatibility with .St -isoC and has no effect; the ``b'' is ignored. .Pp Any created files will have mode -.Pf \\*q Dv S_IRUSR +.Do Dv S_IRUSR \&| .Dv S_IWUSR \&| @@ -114,7 +120,7 @@ Any created files will have mode \&| .Dv S_IROTH \&| -.Dv S_IWOTH Ns \\*q +.Dv S_IWOTH Dc .Pq Li 0666 , as modified by the process' umask value (see @@ -135,6 +141,9 @@ function associates a stream with the ex .Fa fildes . The mode of the stream must be compatible with the mode of the file descriptor. +The +.Dq Li x +mode option is ignored. When the stream is closed via .Xr fclose 3 , .Fa fildes @@ -165,29 +174,12 @@ attempts to re-open the file associated with a new mode. The new mode must be compatible with the mode that the stream was originally opened with: -.Bl -bullet -offset indent -.It -Streams originally opened with mode -.Dq Li r -can only be reopened
svn commit: r229847 - head/sbin/geom/class/part
Author: wblock (doc committer) Date: Mon Jan 9 05:51:33 2012 New Revision: 229847 URL: http://svn.freebsd.org/changeset/base/229847 Log: Whitespace-only fix. Translators, please feel free to ignore. Approved by: gjb (mentor) MFC after:3 days X-MFC-with: r227774, r22, r227800 Modified: head/sbin/geom/class/part/gpart.8 Modified: head/sbin/geom/class/part/gpart.8 == --- head/sbin/geom/class/part/gpart.8 Mon Jan 9 04:59:47 2012 (r229846) +++ head/sbin/geom/class/part/gpart.8 Mon Jan 9 05:51:33 2012 (r229847) @@ -48,7 +48,8 @@ lines in the kernel configuration file: These options provide support for the various types of partitioning schemes supported by the .Ns Nm -utility. See +utility. +See .Sx "PARTITIONING SCHEMES" below for more details. .Pp @@ -502,8 +503,8 @@ Traditional BSD disklabel, usually used .Po This scheme can also be used as the sole partitioning method, without an MBR. -Partition editing tools from other operating systems often do not -understand the bare disklabel partition layout, so this is sometimes +Partition editing tools from other operating systems often do not +understand the bare disklabel partition layout, so this is sometimes called .Dq dangerously dedicated . .Pc ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r229848 - in head: include lib/libc/stdlib
Author: ed Date: Mon Jan 9 06:36:28 2012 New Revision: 229848 URL: http://svn.freebsd.org/changeset/base/229848 Log: Add aligned_alloc(3). The C11 folks reinvented the wheel by introducing an aligned version of malloc(3) called aligned_alloc(3), instead of posix_memalign(3). Instead of returning the allocation by reference, it returns the address, just like malloc(3). Reviewed by: jasone@ Added: head/lib/libc/stdlib/aligned_alloc.3 - copied, changed from r229786, head/lib/libc/stdlib/posix_memalign.3 Deleted: head/lib/libc/stdlib/posix_memalign.3 Modified: head/include/stdlib.h head/lib/libc/stdlib/Makefile.inc head/lib/libc/stdlib/Symbol.map head/lib/libc/stdlib/malloc.c Modified: head/include/stdlib.h == --- head/include/stdlib.h Mon Jan 9 05:51:33 2012(r229847) +++ head/include/stdlib.h Mon Jan 9 06:36:28 2012(r229848) @@ -152,6 +152,7 @@ _Noreturn void _Exit(int); * If we're in a mode greater than C99, expose C11 functions. */ #if __ISO_C_VISIBLE >= 2011 +void * aligned_alloc(size_t, size_t); intat_quick_exit(void (*)(void)); _Noreturn void quick_exit(int); Modified: head/lib/libc/stdlib/Makefile.inc == --- head/lib/libc/stdlib/Makefile.inc Mon Jan 9 05:51:33 2012 (r229847) +++ head/lib/libc/stdlib/Makefile.inc Mon Jan 9 06:36:28 2012 (r229848) @@ -18,17 +18,18 @@ SYM_MAPS+= ${.CURDIR}/stdlib/Symbol.map # machine-dependent stdlib sources .sinclude "${.CURDIR}/${LIBC_ARCH}/stdlib/Makefile.inc" -MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 \ - at_quick_exit.3 bsearch.3 \ +MAN+= a64l.3 abort.3 abs.3 aligned_alloc.3 alloca.3 atexit.3 atof.3 \ + atoi.3 atol.3 at_quick_exit.3 bsearch.3 \ div.3 exit.3 getenv.3 getopt.3 getopt_long.3 getsubopt.3 \ hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 \ - lsearch.3 malloc.3 memory.3 posix_memalign.3 ptsname.3 qsort.3 \ + lsearch.3 malloc.3 memory.3 ptsname.3 qsort.3 \ quick_exit.3 \ radixsort.3 rand.3 random.3 \ realpath.3 strfmon.3 strtod.3 strtol.3 strtonum.3 strtoul.3 system.3 \ tsearch.3 MLINKS+=a64l.3 l64a.3 a64l.3 l64a_r.3 +MLINKS+=aligned_alloc.3 posix_memalign.3 MLINKS+=atol.3 atoll.3 MLINKS+=exit.3 _Exit.3 MLINKS+=getenv.3 putenv.3 getenv.3 setenv.3 getenv.3 unsetenv.3 Modified: head/lib/libc/stdlib/Symbol.map == --- head/lib/libc/stdlib/Symbol.map Mon Jan 9 05:51:33 2012 (r229847) +++ head/lib/libc/stdlib/Symbol.map Mon Jan 9 06:36:28 2012 (r229848) @@ -93,6 +93,7 @@ FBSD_1.0 { }; FBSD_1.3 { + aligned_alloc; at_quick_exit; atof_l; atoi_l; Copied and modified: head/lib/libc/stdlib/aligned_alloc.3 (from r229786, head/lib/libc/stdlib/posix_memalign.3) == --- head/lib/libc/stdlib/posix_memalign.3 Sat Jan 7 16:16:13 2012 (r229786, copy source) +++ head/lib/libc/stdlib/aligned_alloc.3Mon Jan 9 06:36:28 2012 (r229848) @@ -27,26 +27,35 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2006 -.Dt POSIX_MEMALIGN 3 +.Dd January 7, 2011 +.Dt ALIGNED_ALLOC 3 .Os .Sh NAME +.Nm aligned_alloc , .Nm posix_memalign .Nd aligned memory allocation .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In stdlib.h +.Ft void * +.Fn aligned_alloc "size_t alignment" "size_t size" .Ft int .Fn posix_memalign "void **ptr" "size_t alignment" "size_t size" .Sh DESCRIPTION The +.Fn aligned_alloc +and .Fn posix_memalign -function allocates +functions allocate .Fa size bytes of memory such that the allocation's base address is an even multiple of -.Fa alignment , -and returns the allocation in the value pointed to by +.Fa alignment . +The +.Fn aligned_alloc +function returns the allocation, while the +.Fn posix_memalign +function stores the allocation in the value pointed to by .Fa ptr . .Pp The requested @@ -55,6 +64,8 @@ must be a power of 2 at least as large a .Fn sizeof "void *" . .Pp Memory that is allocated via +.Fn aligned_alloc +and .Fn posix_memalign can be used as an argument in subsequent calls to .Xr realloc 3 , @@ -63,12 +74,21 @@ and .Xr free 3 . .Sh RETURN VALUES The +.Fn aligned_alloc +function returns a pointer to the allocation if successful; otherwise a +NULL pointer is returned and +.Va errno +is set to an error value. +.Pp +The .Fn posix_memalign function returns the value 0 if successful; otherwise it returns an error value. .Sh ERRORS The +.Fn aligned_alloc +and .Fn posix_memalign -function will fail if: +functions will fail if: .Bl -tag -width Er .It Bq Er EINVAL The @@ -86,6 +106,11 @@ Memory allocation error. .Xr valloc 3