svn commit: r230102 - head/tools/regression/lib/msun
Author: das Date: Sat Jan 14 08:11:40 2012 New Revision: 230102 URL: http://svn.freebsd.org/changeset/base/230102 Log: Fix a test that doesn't work on architectures where long double is no wider than double. Thanks to Ian Lepore for catching the bug. Modified: head/tools/regression/lib/msun/test-next.c Modified: head/tools/regression/lib/msun/test-next.c == --- head/tools/regression/lib/msun/test-next.c Sat Jan 14 07:26:16 2012 (r230101) +++ head/tools/regression/lib/msun/test-next.c Sat Jan 14 08:11:40 2012 (r230102) @@ -211,7 +211,9 @@ main(int argc, char *argv[]) test(idd(nextafter(DBL_MAX, INFINITY)), INFINITY, ex_over); test(idd(nextafter(INFINITY, 0.0)), DBL_MAX, 0); test(idd(nexttoward(DBL_MAX, DBL_MAX * 2.0L)), INFINITY, ex_over); +#if LDBL_MANT_DIG > 53 test(idd(nexttoward(INFINITY, DBL_MAX * 2.0L)), DBL_MAX, 0); +#endif testf(idf(nextafterf(FLT_MAX, INFINITY)), INFINITY, ex_over); testf(idf(nextafterf(INFINITY, 0.0)), FLT_MAX, 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: r230103 - head/etc
Author: dougb Date: Sat Jan 14 08:59:02 2012 New Revision: 230103 URL: http://svn.freebsd.org/changeset/base/230103 Log: Now that its callers have been udpated, remove set_rcvar(). The concept of set_rcvar() was nice in theory, but the forks it creates are a drag on the startup process, which is especially noticeable on slower systems, such as embedded ones. Modified: head/etc/rc.subr Modified: head/etc/rc.subr == --- head/etc/rc.subrSat Jan 14 08:11:40 2012(r230102) +++ head/etc/rc.subrSat Jan 14 08:59:02 2012(r230103) @@ -54,47 +54,6 @@ JID=`$PS -p $$ -o jid=` # functions # - -# set_rcvar [var] [defval] [desc] -# -# Echo or define a rc.conf(5) variable name. Global variable -# $rcvars is used. -# -# If no argument is specified, echo "${name}_enable". -# -# If only a var is specified, echo "${var}_enable". -# -# If var and defval are specified, the ${var} is defined as -# rc.conf(5) variable and the default value is ${defvar}. An -# optional argument $desc can also be specified to add a -# description for that. -# -set_rcvar() -{ - case $# in - 0) - echo ${name}_enable - ;; - 1) - echo ${1}_enable - ;; - *) - debug "rcvar_define: \$$1=$2 is added" \ - " as a rc.conf(5) variable." - - local _var - _var=$1 - rcvars="${rcvars# } $_var" - eval ${_var}_defval=\"$2\" - shift 2 - # encode multiple lines of _desc - for l in "$@"; do - eval ${_var}_desc=\"\${${_var}_desc#^^}^^$l\" - done - eval ${_var}_desc=\"\${${_var}_desc#^^}\" - ;; - esac -} - # set_rcvar_obsolete oldvar [newvar] [msg] # Define obsolete variable. # Global variable $rcvars_obsolete is used. @@ -856,8 +815,8 @@ $command $rc_flags $command_args" echo "" fi echo "#" - # Get unique vars in $rcvar $rcvars - for _v in $rcvar $rcvars; do + # Get unique vars in $rcvar + for _v in $rcvar; do case $v in $_v\ *|\ *$_v|*\ $_v\ *) ;; *) v="${v# } $_v" ;; @@ -1003,7 +962,7 @@ run_rc_script() unset name command command_args command_interpreter \ extra_commands pidfile procname \ - rcvar rcvars rcvars_obsolete required_dirs required_files \ + rcvar rcvars_obsolete required_dirs required_files \ required_vars eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd @@ -1035,7 +994,7 @@ run_rc_script() # load_rc_config() { - local _name _var _defval _v _msg _new + local _name _rcvar_val _var _defval _v _msg _new _name=$1 if [ -z "$_name" ]; then err 3 'USAGE: load_rc_config name' @@ -1060,7 +1019,7 @@ load_rc_config() fi # Set defaults if defined. - for _var in $rcvar $rcvars; do + for _var in $rcvar; do eval _defval=\$${_var}_defval if [ -n "$_defval" ]; then eval : \${$_var:=\$${_var}_defval} ___ 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: r230104 - head/sys/netinet
Author: tuexen Date: Sat Jan 14 09:10:20 2012 New Revision: 230104 URL: http://svn.freebsd.org/changeset/base/230104 Log: Fix two bugs, which result in a panic when calling getsockopt() using SCTP_RECVINFO or SCTP_NXTINFO. Reported by Clement Lecigne and forwarded to us by zi@. MFC after: 3 days. Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c == --- head/sys/netinet/sctp_usrreq.c Sat Jan 14 08:59:02 2012 (r230103) +++ head/sys/netinet/sctp_usrreq.c Sat Jan 14 09:10:20 2012 (r230104) @@ -3019,7 +3019,7 @@ flags_out: SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } else { - SCTP_INP_RUNLOCK(inp); + SCTP_INP_RLOCK(inp); onoff = sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVRCVINFO); SCTP_INP_RUNLOCK(inp); } @@ -3038,7 +3038,7 @@ flags_out: SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; } else { - SCTP_INP_RUNLOCK(inp); + SCTP_INP_RLOCK(inp); onoff = sctp_is_feature_on(inp, SCTP_PCB_FLAGS_RECVNXTINFO); SCTP_INP_RUNLOCK(inp); } ___ 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: r230103 - head/etc
on 14/01/2012 10:59 Doug Barton said the following: > Author: dougb > Date: Sat Jan 14 08:59:02 2012 > New Revision: 230103 > URL: http://svn.freebsd.org/changeset/base/230103 > > Log: > Now that its callers have been udpated, remove set_rcvar(). > > The concept of set_rcvar() was nice in theory, but the forks > it creates are a drag on the startup process, which is especially > noticeable on slower systems, such as embedded ones. Will this break ports that install rc.d scripts? -- 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"
Re: svn commit: r230103 - head/etc
On 01/14/2012 01:10, Andriy Gapon wrote: > on 14/01/2012 10:59 Doug Barton said the following: >> Author: dougb >> Date: Sat Jan 14 08:59:02 2012 >> New Revision: 230103 >> URL: http://svn.freebsd.org/changeset/base/230103 >> >> Log: >> Now that its callers have been udpated, remove set_rcvar(). >> >> The concept of set_rcvar() was nice in theory, but the forks >> it creates are a drag on the startup process, which is especially >> noticeable on slower systems, such as embedded ones. > > Will this break ports that install rc.d scripts? Please see my HEADS UP message to -current. -- You can observe a lot just by watching. -- Yogi Berra Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ 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: r230103 - head/etc
on 14/01/2012 11:17 Doug Barton said the following: > On 01/14/2012 01:10, Andriy Gapon wrote: >> on 14/01/2012 10:59 Doug Barton said the following: >>> Author: dougb >>> Date: Sat Jan 14 08:59:02 2012 >>> New Revision: 230103 >>> URL: http://svn.freebsd.org/changeset/base/230103 >>> >>> Log: >>> Now that its callers have been udpated, remove set_rcvar(). >>> >>> The concept of set_rcvar() was nice in theory, but the forks >>> it creates are a drag on the startup process, which is especially >>> noticeable on slower systems, such as embedded ones. >> >> Will this break ports that install rc.d scripts? > > Please see my HEADS UP message to -current. Thank you. -- 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"
Re: svn commit: r230103 - head/etc
On Jan 14, 2012, at 1:18 AM, Andriy Gapon wrote: > on 14/01/2012 11:17 Doug Barton said the following: >> On 01/14/2012 01:10, Andriy Gapon wrote: >>> on 14/01/2012 10:59 Doug Barton said the following: Author: dougb Date: Sat Jan 14 08:59:02 2012 New Revision: 230103 URL: http://svn.freebsd.org/changeset/base/230103 Log: Now that its callers have been udpated, remove set_rcvar(). The concept of set_rcvar() was nice in theory, but the forks it creates are a drag on the startup process, which is especially noticeable on slower systems, such as embedded ones. >>> >>> Will this break ports that install rc.d scripts? >> >> Please see my HEADS UP message to -current. > > Thank you. Adding an entry to UPDATING would be appreciated though… Thanks, -Garrett___ 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: r230103 - head/etc
On 01/14/2012 01:26, Garrett Cooper wrote: > Adding an entry to UPDATING would be appreciated though… Good point. It's done now. :) Doug -- You can observe a lot just by watching. -- Yogi Berra Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ 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: r230105 - head
Author: dougb Date: Sat Jan 14 09:32:58 2012 New Revision: 230105 URL: http://svn.freebsd.org/changeset/base/230105 Log: Add an entry detailing the removal of set_rcvar() from /etc/rc.subr Requested by: Garrett Cooper Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Sat Jan 14 09:10:20 2012(r230104) +++ head/UPDATING Sat Jan 14 09:32:58 2012(r230105) @@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20120114: + The set_rcvar() function has been removed from /etc/rc.subr. All + base and ports rc.d scripts have been updated, so if you have a + port installed with a script in /usr/local/etc/rc.d you can either + hand-edit the rcvar= line, or reinstall the port. + 20120109: panic(9) now stops other CPUs in the SMP systems, disables interrupts on the current CPU and prevents other threads from running. ___ 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: r230016 - head/lib/libutil
On Thu, 12 Jan 2012, Guy Helmer wrote: Log: Fix disorder in MAN and MLINKS lists. Requested by bde. Thanks. This completes fixing all the old style bugs that I noticed in libutil.h and the Makefile. I noticed some new ones... 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"
svn commit: r230106 - head/release
Author: glebius Date: Sat Jan 14 09:57:13 2012 New Revision: 230106 URL: http://svn.freebsd.org/changeset/base/230106 Log: - Add possibility to build release from a certain revision, supplied via -r. - To ease adding new features, roll out a getopt loop here. Reviewed by: nwhitehorn Modified: head/release/generate-release.sh Modified: head/release/generate-release.sh == --- head/release/generate-release.shSat Jan 14 09:32:58 2012 (r230105) +++ head/release/generate-release.shSat Jan 14 09:57:13 2012 (r230106) @@ -3,7 +3,7 @@ # generate-release.sh: check out source trees, and build release components with # totally clean, fresh trees. # -# Usage: generate-release.sh svn-branch scratch-dir +# Usage: generate-release.sh [-r revision] svn-branch scratch-dir # # Environment variables: # CVSUP_HOST: Host of a cvsup server to obtain the ports and documentation @@ -21,10 +21,38 @@ # $FreeBSD$ # +usage() +{ + echo "Usage: $0 [-r revision] svn-branch scratch-dir" + exit 1 +} + +args=`getopt r: $*` +if [ $? -ne 0 ]; then + usage +fi +set -- $args +REVISION= +while true; do + case "$1" in + -r) + REVISION="-r $2" + shift; shift + ;; + --) + shift; break + ;; + esac +done + +if [ $# -lt 2 ]; then + usage +fi + mkdir -p $2/usr/src set -e # Everything must succeed -svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src +svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src $REVISION if [ ! -z $CVSUP_HOST ]; then cat > $2/docports-supfile << EOF *default host=$CVSUP_HOST ___ 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: r230037 - head/lib/libutil
On Thu, 12 Jan 2012, Guy Helmer wrote: Log: Move struct pidfh definition into pidfile.c, and leave a forward declaration for pidfh in libutil.h in its place. This allows us to hide the contents of the pidfh structure, and also allowed removal of the "#ifdef _SYS_PARAM_H" guard from around the pidfile_* function prototypes. Suggested by pjd. This has some new style bugs, and I noticed some more old ones: Modified: head/lib/libutil/libutil.h == --- head/lib/libutil/libutil.h Thu Jan 12 22:30:41 2012(r230036) +++ head/lib/libutil/libutil.h Thu Jan 12 22:49:36 2012(r230037) @@ -48,6 +48,11 @@ typedef __gid_t gid_t; #define _GID_T_DECLARED #endif +#ifndef _MODE_T_DECLARED +typedef __mode_t mode_t; +#define _MODE_T_DECLARED +#endif + It's good to declare mode_t, since pidfile_open() uses it and we want to remove the dependency on . However, this definition doesn't follow KNF or the style of all the other typedef declarations in the file, since all the others follow KNF and thus have a space instead of a tab after #define and also after typedef. There are many other misfomatted spaces after #define's in this file: - for the defines for the property API (PROPERTY*). This API is ugly. I think it was mainly for sysinstall. Maybe it can be removed. Other bugs in it include its man page source being named property.3 but calling itself properties(3). There is no link from property(3), so properties(3) doesn't exist. - for the defines of UU*. These have secondary style bugs: - space instead of tab[s] after the macro name. This is worse, since it results in the macro bodies not being lined up. - bogus parentheses around macro bodies. Such parentheses are ugly enough when they are necessary, but they are not necessary for 2 of 9 cases here, since the macro body consists of a single token. - there is no comment before the UU* defines, unlike for all other groups of defines in the file. - for the defines of UU*. These have secondary style bugs: - bogus parentheses around macro bodies. As above, but worse since none of the 4 macro bodies needs them. - for the defines of PWSCAN*. - for the defines of HN*. The grouping for the 2 HN* sections is unclear The comment for the first group applies to both groups, while the comment for the second group is just unclear). This is described clearly in the man page: the 2 groups are for 2 parameters. In the header file, one of the parameters is misnamed and the other is not named. - the defines for the idempotency ifdef and for FPARSELN* and HD* are actually formatted normally. The section headers for flags definitions could be more uniform and complete. I like the style "/* Flags for : */". No need to mention the function name if the parameter name is unique and/or if the macro names indicate the function or API name like they should. -#ifdef _SYS_PARAM_H_ -/* for pidfile.c */ -struct pidfh { - int pf_fd; - charpf_path[MAXPATHLEN + 1]; - __dev_t pf_dev; - ino_t pf_ino; -}; -#endif After moving this to pidfile.c, the man page seems to be bogus. It still says that is a prerequisite, but I think that header was only needed for MAXPATHLEN here. I checked that still compiles by itself (you had to add this typedef for that), and that most or all of its manpages except pidfile(3) only say to include it. properties(3) still says that is a prerequisite, but that hasn't been the case for 9 years or more, since other typedefs like the one for mode_t were added in 2002. realhostname(3) still says that and are prerequisites, buf obviously they aren't, since compiles by itself. was also cleaned up in 2002, so is not a prerequisite for it. realhostname() uses struct in_addr, but this doesn't make a prerequsite for using realhostname(), since you can always use it with a null pointer, or more usefully, with a pointer constructed somewhere else that knows the complete struct in_addr. pw_*(3) and PWSCAN* seem to be undocumented. Almost everything else in libutil.h is documented. - /* Avoid pulling in all the include files for no need */ struct in_addr; struct kinfo_file; struct kinfo_proc; struct kinfo_vmentry; The last 3 declarations are bogus. The kinfo* structs aren't used in parameter lists. Thus forward-declaring them has no effect. +struct pidfh; struct pidfh is a return type for one of the prototypes. Unfortunately, alphabetical ordering results other prototypes being declared first. Thus this forward declaration is needed. @@ -174,14 +170,12 @@ struct group int gr_tmp(int _mdf); #endif -#ifdef _SYS_PARAM_H_ int pidfile_close(struct pidfh *_pfh); int pidfile_fileno(const struct pidfh *_pfh); struct pidfh * pidfile_open(const char *_path, mode_t _mode, pid_t *_pidptr); int pidfile_remove(struct pidfh *_pfh); int
Re: svn commit: r230103 - head/etc
On 14 January 2012 12:59, Doug Barton wrote: > Author: dougb > Date: Sat Jan 14 08:59:02 2012 > New Revision: 230103 > URL: http://svn.freebsd.org/changeset/base/230103 > > Log: > Now that its callers have been udpated, remove set_rcvar(). > > The concept of set_rcvar() was nice in theory, but the forks > it creates are a drag on the startup process, which is especially > noticeable on slower systems, such as embedded ones. > > Modified: > head/etc/rc.subr > Hi, rc(8) and rc.subr(8) still reference this function. Also, it would be fine to have some adoption to the new set_rcvar-less order like printing The Big Warning and still doing its job in Y.x branch and stop doing anything in the next Y+1.x branch. -- 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: r230107 - head/release
Author: glebius Date: Sat Jan 14 14:43:22 2012 New Revision: 230107 URL: http://svn.freebsd.org/changeset/base/230107 Log: Autoguess number of make jobs based on hw.ncpu. MAKE_FLAGS can override this. While here move 'mkdir' down below 'set -e'. Modified: head/release/generate-release.sh Modified: head/release/generate-release.sh == --- head/release/generate-release.shSat Jan 14 09:57:13 2012 (r230106) +++ head/release/generate-release.shSat Jan 14 14:43:22 2012 (r230107) @@ -49,9 +49,18 @@ if [ $# -lt 2 ]; then usage fi -mkdir -p $2/usr/src set -e # Everything must succeed +case $MAKE_FLAGS in + *-j*) + ;; + *) + MAKE_FLAGS="$MAKE_FLAGS -j "$(sysctl -n hw.ncpu) + ;; +esac + +mkdir -p $2/usr/src + svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src $REVISION if [ ! -z $CVSUP_HOST ]; then cat > $2/docports-supfile << EOF ___ 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: r230108 - head/sys/net
Author: eadler (ports committer) Date: Sat Jan 14 17:07:52 2012 New Revision: 230108 URL: http://svn.freebsd.org/changeset/base/230108 Log: - Fix trivial typo Approved by: nwhitehorn MFC after:3 days Modified: head/sys/net/bpf_buffer.c head/sys/net/bpf_buffer.h head/sys/net/bpf_zerocopy.c head/sys/net/bpf_zerocopy.h Modified: head/sys/net/bpf_buffer.c == --- head/sys/net/bpf_buffer.c Sat Jan 14 14:43:22 2012(r230107) +++ head/sys/net/bpf_buffer.c Sat Jan 14 17:07:52 2012(r230108) @@ -2,7 +2,7 @@ * Copyright (c) 2007 Seccuris Inc. * All rights reserved. * - * This sofware was developed by Robert N. M. Watson under contract to + * This software was developed by Robert N. M. Watson under contract to * Seccuris Inc. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/net/bpf_buffer.h == --- head/sys/net/bpf_buffer.h Sat Jan 14 14:43:22 2012(r230107) +++ head/sys/net/bpf_buffer.h Sat Jan 14 17:07:52 2012(r230108) @@ -2,7 +2,7 @@ * Copyright (c) 2007 Seccuris Inc. * All rights reserved. * - * This sofware was developed by Robert N. M. Watson under contract to + * This software was developed by Robert N. M. Watson under contract to * Seccuris Inc. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/net/bpf_zerocopy.c == --- head/sys/net/bpf_zerocopy.c Sat Jan 14 14:43:22 2012(r230107) +++ head/sys/net/bpf_zerocopy.c Sat Jan 14 17:07:52 2012(r230108) @@ -2,7 +2,7 @@ * Copyright (c) 2007 Seccuris Inc. * All rights reserved. * - * This sofware was developed by Robert N. M. Watson under contract to + * This software was developed by Robert N. M. Watson under contract to * Seccuris Inc. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/net/bpf_zerocopy.h == --- head/sys/net/bpf_zerocopy.h Sat Jan 14 14:43:22 2012(r230107) +++ head/sys/net/bpf_zerocopy.h Sat Jan 14 17:07:52 2012(r230108) @@ -2,7 +2,7 @@ * Copyright (c) 2007 Seccuris Inc. * All rights reserved. * - * This sofware was developed by Robert N. M. Watson under contract to + * This software was developed by Robert N. M. Watson under contract to * Seccuris Inc. * * Redistribution and use in source and binary forms, with or without ___ 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: r230109 - head/sys/boot/forth
Author: eadler (ports committer) Date: Sat Jan 14 17:34:32 2012 New Revision: 230109 URL: http://svn.freebsd.org/changeset/base/230109 Log: - Document TheDraw splash screens in the default loader.conf Submitted by: Jason Hellenthal Approved by: glebius MFC after:3 days Modified: head/sys/boot/forth/loader.conf Modified: head/sys/boot/forth/loader.conf == --- head/sys/boot/forth/loader.conf Sat Jan 14 17:07:52 2012 (r230108) +++ head/sys/boot/forth/loader.conf Sat Jan 14 17:34:32 2012 (r230109) @@ -31,9 +31,10 @@ verbose_loading="NO" # Set to YES for v splash_bmp_load="NO" # Set this to YES for bmp splash screen! splash_pcx_load="NO" # Set this to YES for pcx splash screen! +splash_txt_load="NO" # Set this to YES for TheDraw splash screen! vesa_load="NO" # Set this to YES to load the vesa module bitmap_load="NO" # Set this to YES if you want splash screen! -bitmap_name="splash.bmp" # Set this to the name of the bmp or pcx file +bitmap_name="splash.bmp" # Set this to the name of the file bitmap_type="splash_image_data" # and place it on the module_path ___ 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: r230110 - head/share/man/man7
Author: glebius Date: Sat Jan 14 18:16:10 2012 New Revision: 230110 URL: http://svn.freebsd.org/changeset/base/230110 Log: No need to run buildworld before generate-release.sh. Modified: head/share/man/man7/release.7 Modified: head/share/man/man7/release.7 == --- head/share/man/man7/release.7 Sat Jan 14 17:34:32 2012 (r230109) +++ head/share/man/man7/release.7 Sat Jan 14 18:16:10 2012 (r230110) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2011 +.Dd January 14, 2012 .Dt RELEASE 7 .Os .Sh NAME @@ -316,9 +316,7 @@ The following sequence of commands can b .Dq "-CURRENT snapshot" in a clean environment, including ports and documentation: .Bd -literal -offset indent -cd /usr/src -make buildworld -cd release +cd /usr/src/release export CVSUP_HOST=cvsupN.freebsd.org sh generate-release.sh head /local3/release .Ed ___ 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: r230037 - head/lib/libutil
On Sat, Jan 14, 2012 at 09:59:27PM +1100, Bruce Evans wrote: > On Thu, 12 Jan 2012, Guy Helmer wrote: > > > Log: > > Move struct pidfh definition into pidfile.c, and leave a forward > > declaration > > for pidfh in libutil.h in its place. > > This allows us to hide the contents of the pidfh structure, and also > > allowed removal of the "#ifdef _SYS_PARAM_H" guard from around the > > pidfile_* function prototypes. > > > > Suggested by pjd. > > This has some new style bugs, and I noticed some more old ones: > > > Modified: head/lib/libutil/libutil.h > > == > > --- head/lib/libutil/libutil.h Thu Jan 12 22:30:41 2012 > > (r230036) > > +++ head/lib/libutil/libutil.h Thu Jan 12 22:49:36 2012 > > (r230037) > > @@ -48,6 +48,11 @@ typedef __gid_t gid_t; > > #define _GID_T_DECLARED > > #endif > > > > +#ifndef _MODE_T_DECLARED > > +typedef __mode_t mode_t; > > +#define _MODE_T_DECLARED > > +#endif > > + > > It's good to declare mode_t, since pidfile_open() uses it and we want > to remove the dependency on . However, this definition > doesn't follow KNF or the style of all the other typedef declarations > in the file, since all the others follow KNF and thus have a space > instead of a tab after #define and also after typedef. I think you mixed space with tab. All the others have a tab after #define and typedef. I fully agree this should be consistent. > > -#ifdef _SYS_PARAM_H_ > > -/* for pidfile.c */ > > -struct pidfh { > > - int pf_fd; > > - charpf_path[MAXPATHLEN + 1]; > > - __dev_t pf_dev; > > - ino_t pf_ino; > > -}; > > -#endif > > After moving this to pidfile.c, the man page seems to be bogus. It > still says that is a prerequisite, but I think that > header was only needed for MAXPATHLEN here. I checked that > still compiles by itself (you had to add this typedef for that), and > that most or all of its manpages except pidfile(3) only say to include > it. I already pointed that out to Guy and also introduced him to concept of pre-commit reviews:) > > @@ -174,14 +170,12 @@ struct group > > int gr_tmp(int _mdf); > > #endif > > > > -#ifdef _SYS_PARAM_H_ > > int pidfile_close(struct pidfh *_pfh); > > int pidfile_fileno(const struct pidfh *_pfh); > > struct pidfh * > > pidfile_open(const char *_path, mode_t _mode, pid_t *_pidptr); > > int pidfile_remove(struct pidfh *_pfh); > > int pidfile_write(struct pidfh *_pfh); > > -#endif > > Now these are unsorted, since a separate section to hold them is not > needed. It was used just to make the ifdef easier to read (we don't > want to split up the main list with blank lines around each ifdef, and > without such blank lines the ifdefs are harder to read). I'd prefer not to change that. All those functions are part of pidfile(3) API and it would be better, IMHO, to keep them together here too. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpy9R6zScj8o.pgp Description: PGP signature
svn commit: r230111 - in stable/9: lib/libc/net sbin/route
Author: ume Date: Sat Jan 14 19:08:39 2012 New Revision: 230111 URL: http://svn.freebsd.org/changeset/base/230111 Log: MFC r229766: Handle the internal scope address representation of the KAME IPv6 stack for the node-local multicast address. Modified: stable/9/lib/libc/net/getaddrinfo.c stable/9/sbin/route/route.c Directory Properties: stable/9/lib/libc/ (props changed) stable/9/sbin/route/ (props changed) Modified: stable/9/lib/libc/net/getaddrinfo.c == --- stable/9/lib/libc/net/getaddrinfo.c Sat Jan 14 18:16:10 2012 (r230110) +++ stable/9/lib/libc/net/getaddrinfo.c Sat Jan 14 19:08:39 2012 (r230111) @@ -1576,7 +1576,8 @@ ip6_str2scopeid(char *scope, struct sock if (*scope == '\0') return -1; - if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) { + if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6) || + IN6_IS_ADDR_MC_NODELOCAL(a6)) { /* * We currently assume a one-to-one mapping between links * and interfaces, so we simply use interface indices for Modified: stable/9/sbin/route/route.c == --- stable/9/sbin/route/route.c Sat Jan 14 18:16:10 2012(r230110) +++ stable/9/sbin/route/route.c Sat Jan 14 19:08:39 2012(r230111) @@ -375,7 +375,8 @@ routename(struct sockaddr *sa) #ifdef __KAME__ if (sa->sa_len == sizeof(struct sockaddr_in6) && (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) || -IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr)) && +IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) || +IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr)) && sin6.sin6_scope_id == 0) { sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); @@ -500,7 +501,8 @@ netname(struct sockaddr *sa) #ifdef __KAME__ if (sa->sa_len == sizeof(struct sockaddr_in6) && (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) || -IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr)) && +IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) || +IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr)) && sin6.sin6_scope_id == 0) { sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); @@ -1002,7 +1004,8 @@ getaddr(int which, char *str, struct hos memcpy(&su->sin6, res->ai_addr, sizeof(su->sin6)); #ifdef __KAME__ if ((IN6_IS_ADDR_LINKLOCAL(&su->sin6.sin6_addr) || -IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr)) && +IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr) || +IN6_IS_ADDR_MC_NODELOCAL(&su->sin6.sin6_addr)) && su->sin6.sin6_scope_id) { *(u_int16_t *)&su->sin6.sin6_addr.s6_addr[2] = htons(su->sin6.sin6_scope_id); ___ 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: r230112 - in stable/8: lib/libc/net sbin/route
Author: ume Date: Sat Jan 14 19:22:45 2012 New Revision: 230112 URL: http://svn.freebsd.org/changeset/base/230112 Log: MFC r229766: Handle the internal scope address representation of the KAME IPv6 stack for the node-local multicast address. Modified: stable/8/lib/libc/net/getaddrinfo.c stable/8/sbin/route/route.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/sbin/route/ (props changed) Modified: stable/8/lib/libc/net/getaddrinfo.c == --- stable/8/lib/libc/net/getaddrinfo.c Sat Jan 14 19:08:39 2012 (r230111) +++ stable/8/lib/libc/net/getaddrinfo.c Sat Jan 14 19:22:45 2012 (r230112) @@ -1576,7 +1576,8 @@ ip6_str2scopeid(char *scope, struct sock if (*scope == '\0') return -1; - if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) { + if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6) || + IN6_IS_ADDR_MC_NODELOCAL(a6)) { /* * We currently assume a one-to-one mapping between links * and interfaces, so we simply use interface indices for Modified: stable/8/sbin/route/route.c == --- stable/8/sbin/route/route.c Sat Jan 14 19:08:39 2012(r230111) +++ stable/8/sbin/route/route.c Sat Jan 14 19:22:45 2012(r230112) @@ -375,7 +375,8 @@ routename(struct sockaddr *sa) #ifdef __KAME__ if (sa->sa_len == sizeof(struct sockaddr_in6) && (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) || -IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr)) && +IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) || +IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr)) && sin6.sin6_scope_id == 0) { sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); @@ -500,7 +501,8 @@ netname(struct sockaddr *sa) #ifdef __KAME__ if (sa->sa_len == sizeof(struct sockaddr_in6) && (IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr) || -IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr)) && +IN6_IS_ADDR_MC_LINKLOCAL(&sin6.sin6_addr) || +IN6_IS_ADDR_MC_NODELOCAL(&sin6.sin6_addr)) && sin6.sin6_scope_id == 0) { sin6.sin6_scope_id = ntohs(*(u_int16_t *)&sin6.sin6_addr.s6_addr[2]); @@ -1002,7 +1004,8 @@ getaddr(int which, char *str, struct hos memcpy(&su->sin6, res->ai_addr, sizeof(su->sin6)); #ifdef __KAME__ if ((IN6_IS_ADDR_LINKLOCAL(&su->sin6.sin6_addr) || -IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr)) && +IN6_IS_ADDR_MC_LINKLOCAL(&su->sin6.sin6_addr) || +IN6_IS_ADDR_MC_NODELOCAL(&su->sin6.sin6_addr)) && su->sin6.sin6_scope_id) { *(u_int16_t *)&su->sin6.sin6_addr.s6_addr[2] = htons(su->sin6.sin6_scope_id); ___ 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: r230113 - in stable/9/kerberos5: . lib/libhdb
Author: ume Date: Sat Jan 14 19:38:24 2012 New Revision: 230113 URL: http://svn.freebsd.org/changeset/base/230113 Log: MFC r228284, r228308: - Make heimdal buildable with WITH_OPENLDAP defined, again. - Our heimdal uses the deprecated OpenLDAP functions. - Don't support OpenLDAP during lib32 build. Modified: stable/9/kerberos5/Makefile.inc stable/9/kerberos5/lib/libhdb/Makefile Directory Properties: stable/9/kerberos5/ (props changed) Modified: stable/9/kerberos5/Makefile.inc == --- stable/9/kerberos5/Makefile.inc Sat Jan 14 19:22:45 2012 (r230112) +++ stable/9/kerberos5/Makefile.inc Sat Jan 14 19:38:24 2012 (r230113) @@ -6,11 +6,11 @@ KRB5DIR= ${.CURDIR}/../../../crypto/heim CFLAGS+= -DHAVE_CONFIG_H -I${.CURDIR}/../../include -.if defined(WITH_OPENLDAP) +.if defined(WITH_OPENLDAP) && !defined(COMPAT_32BIT) OPENLDAPBASE?= /usr/local LDAPLDADD= -lldap -llber LDAPDPADD= ${LDAPLDADD:C;^-l(.*)$;${OPENLDAPBASE}/lib/lib\1.a;} -LDAPCFLAGS=-I${OPENLDAPBASE}/include -DOPENLDAP=1 +LDAPCFLAGS=-I${OPENLDAPBASE}/include -DOPENLDAP=1 -DLDAP_DEPRECATED=1 LDAPLDFLAGS= -L${OPENLDAPBASE}/lib -Wl,-rpath,${OPENLDAPBASE}/lib .endif Modified: stable/9/kerberos5/lib/libhdb/Makefile == --- stable/9/kerberos5/lib/libhdb/Makefile Sat Jan 14 19:22:45 2012 (r230112) +++ stable/9/kerberos5/lib/libhdb/Makefile Sat Jan 14 19:38:24 2012 (r230113) @@ -1,9 +1,9 @@ # $FreeBSD$ LIB= hdb -LDFLAGS= -Wl,--no-undefined -LDADD= -lasn1 -lcom_err -lkrb5 -lroken -DPADD= ${LIBASN1} ${LIBCOM_ERR} ${LIBKRB5} ${LIBROKEN} +LDFLAGS= -Wl,--no-undefined ${LDAPLDFLAGS} +LDADD= -lasn1 -lcom_err -lkrb5 -lroken ${LDAPLDADD} +DPADD= ${LIBASN1} ${LIBCOM_ERR} ${LIBKRB5} ${LIBROKEN} ${LDAPDPADD} INCS= hdb-private.h \ hdb-protos.h \ ___ 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: r230037 - head/lib/libutil
On Sat, 14 Jan 2012, Pawel Jakub Dawidek wrote: On Sat, Jan 14, 2012 at 09:59:27PM +1100, Bruce Evans wrote: ... It's good to declare mode_t, since pidfile_open() uses it and we want to remove the dependency on . However, this definition doesn't follow KNF or the style of all the other typedef declarations in the file, since all the others follow KNF and thus have a space instead of a tab after #define and also after typedef. I think you mixed space with tab. All the others have a tab after #define and typedef. I fully agree this should be consistent. Oops. -#ifdef _SYS_PARAM_H_ int pidfile_close(struct pidfh *_pfh); int pidfile_fileno(const struct pidfh *_pfh); struct pidfh * pidfile_open(const char *_path, mode_t _mode, pid_t *_pidptr); int pidfile_remove(struct pidfh *_pfh); int pidfile_write(struct pidfh *_pfh); -#endif Now these are unsorted, since a separate section to hold them is not needed. It was used just to make the ifdef easier to read (we don't want to split up the main list with blank lines around each ifdef, and without such blank lines the ifdefs are harder to read). I'd prefer not to change that. All those functions are part of pidfile(3) API and it would be better, IMHO, to keep them together here too. The functions have a unique prefix, so they are grouped nicely when sorted into a long list. While I'm here, I'll complain about the verboseness of that prefix :-). Other APIs in the file mostly use short prefixes: - kinfo_. Should have been ki_ like its struct member names. pidfile uses a good prefix for its struct member names too. - properties_/property_. Bad, like the rest of the API. - uu_. A weird nondescriptive name for serial device locking protocol. Is it from uucp? But its weirdness makes it memorable, unlike a generic English word like `property'. Better yet, I don't have to quote it here. - f. Stdio's prefix meaning `file'. To fit indentifiers in 8 characters, it can't even have an underscore. - pw_. Old prefix/abbrieviation for `password'. It's more readable than `password' once you are used to it. - gr_. Newer prefix for `group'. More verbose than the g in gid. - quota_. At least the English word is short. Just noticed some more disorder: the groups of the defines at the end are in random (mostly historical) order (U*, HO*, F*, PW*, HN* (for the last parameter of humanize_number()), HN* (for the second last parameter...), HD*. If the pidfile API had defines and if the API is kept in its own section, its defines should be in that section. Most of the other APIs that have a man page are large enough to deserve the same treatment if it is done for pidfile. Some like dehumanize^Wscientificize^W humanize_number() are larger although they have fewer functions, since they have lots of defines. 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"
svn commit: r230114 - head/tools/regression/lib/libc/stdio
Author: das Date: Sat Jan 14 21:09:54 2012 New Revision: 230114 URL: http://svn.freebsd.org/changeset/base/230114 Log: Update the tests for arm and other ports where long double is the same as double, similar to r178141. Modified: head/tools/regression/lib/libc/stdio/test-printfloat.c Modified: head/tools/regression/lib/libc/stdio/test-printfloat.c == --- head/tools/regression/lib/libc/stdio/test-printfloat.c Sat Jan 14 19:38:24 2012(r230113) +++ head/tools/regression/lib/libc/stdio/test-printfloat.c Sat Jan 14 21:09:54 2012(r230114) @@ -266,9 +266,9 @@ main(int argc, char *argv[]) testfmt("0x1p-16494", "%La", 0x1p-16494L); testfmt("0x1.2345p-16384", "%La", 0x1.2345p-16384L); #else - testfmt("0xc.90fdaa22168cp-2", "%La", 0x3.243f6a8885a31p0L); - testfmt("0x8p-1077", "%La", 0x1p-1074L); - testfmt("0x9.8765p-1024", "%La", 0x9.8765p-1024L); + testfmt("0x1.921fb54442d18p+1", "%La", 0x3.243f6a8885a31p0L); + testfmt("0x1p-1074", "%La", 0x1p-1074L); + testfmt("0x1.30ecap-1021", "%La", 0x9.8765p-1024L); #endif printf("ok 10 - printfloat\n"); ___ 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: r230115 - head/tools/regression/lib/libc/stdio
Author: das Date: Sat Jan 14 21:38:31 2012 New Revision: 230115 URL: http://svn.freebsd.org/changeset/base/230115 Log: Add .t files for tests, missed in prior checkins, so that prove(1) works in this directory. Added: head/tools/regression/lib/libc/stdio/test-getdelim.t - copied unchanged from r230114, head/tools/regression/lib/libc/stdio/test-printfloat.t head/tools/regression/lib/libc/stdio/test-print-positional.t - copied unchanged from r230114, head/tools/regression/lib/libc/stdio/test-printfloat.t head/tools/regression/lib/libc/stdio/test-printbasic.t - copied unchanged from r230114, head/tools/regression/lib/libc/stdio/test-printfloat.t Copied: head/tools/regression/lib/libc/stdio/test-getdelim.t (from r230114, head/tools/regression/lib/libc/stdio/test-printfloat.t) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/libc/stdio/test-getdelim.tSat Jan 14 21:38:31 2012(r230115, copy of r230114, head/tools/regression/lib/libc/stdio/test-printfloat.t) @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +cd `dirname $0` + +executable=`basename $0 .t` + +make $executable 2>&1 > /dev/null + +exec ./$executable Copied: head/tools/regression/lib/libc/stdio/test-print-positional.t (from r230114, head/tools/regression/lib/libc/stdio/test-printfloat.t) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/libc/stdio/test-print-positional.tSat Jan 14 21:38:31 2012(r230115, copy of r230114, head/tools/regression/lib/libc/stdio/test-printfloat.t) @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +cd `dirname $0` + +executable=`basename $0 .t` + +make $executable 2>&1 > /dev/null + +exec ./$executable Copied: head/tools/regression/lib/libc/stdio/test-printbasic.t (from r230114, head/tools/regression/lib/libc/stdio/test-printfloat.t) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/lib/libc/stdio/test-printbasic.t Sat Jan 14 21:38:31 2012(r230115, copy of r230114, head/tools/regression/lib/libc/stdio/test-printfloat.t) @@ -0,0 +1,10 @@ +#!/bin/sh +# $FreeBSD$ + +cd `dirname $0` + +executable=`basename $0 .t` + +make $executable 2>&1 > /dev/null + +exec ./$executable ___ 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: r229693 - in head/lib/libc: powerpc powerpc64
On Fri, 6 Jan 2012, Andreas Tobler wrote: Sorry for the delay. Hi Bruce, thank you for the feedback. I wasn't aware about the fine details. I try to understand and implement what you suggest. It may take several iterations until I match everything. OK. The easiest way to fix this is to remove WEAK_ALIAS() and add an asm API WEAK_REFERENCE(). Unfortunately, ALIAS is a better name than REFERENCE. __weak_reference() is not so easy to change since it is used extensively So, I started with a WEAK_REFERENCE macro in sys/powerpc/asm.h It is like the WEAK_ALIAS but with reversed arguments: +#define WEAK_REFERENCE(sym, alias) \ + .weak alias;\ + alias = sym + Here I do not have a preference for the "=" implementation, is it "=" or is it .set . I prefer .equ, since it is what is ised for weak_reference() and it has minor syntactial advantages. Anyway, This is much easier to change than uses of the macro. If we find a final version I'll be able to delete the WEAK_ALIAS. Yes, delete it before it is used much. The only thing to worry about is use of it in ports. I checked a 2005 version of NetBSD. It has separate sys/cdefs files for aout and elf, and spells things completely backwards relative to FreeBSD there: - __asm is spelled __asm__ - the order is reversed in all macros: (alias,sym). The misformatting of no space after the comma in this to support aout is preserved in cdefs_elf.h. - #alias and #sym are not used rawly, even for elf. They are surrounded by _C_LABEL() or _C_LABEL_STRING(). For elf, this usually makes no difference, but there is an option to add an underscore for elf too. OTOH, K&R is not supported, so there are no additional files, ifdefs or macro obfuscations to support it (FreeBSD still has ifdefs for it, but doesn't support aout). - it has __strong_alias() there, but no __strong_reference() - it has __weak_alias() there, but no __weak_reference() - it has __weak_extern() (expands to a plain .weak) - it has __warn_references(). This is the only one that needs much magic (.stabs declarations). - it "=" instead of ".equ" or ".set" - it uses single-line asms instead of multi-line ones, except for the ones with .stabs. This gives additional ugliness from string concatenation and explicit newlines or semicolons to separate the statements (newlines are used, which makes the output more readable, but tabs are not used). One feature of K&R is that this feature is unavailable, so FreeBSD couldn't use it in the K&R part of the ifdef and it may as well not use it in the STDC part. In summary, unportability to NetBSD couldn't be implemented much better if done intentionally. To preserve this intentionally, we shouldn't define __weak_alias(), but should keep __weak_reference() with its args reversed. Similarly for STRONG_ALIAS() and __strong_reference(), except STRONG_REFERENCE() doesn't exist for most arches and __strong_reference() didn't exist until this week, so neither is used extensively. I didn't check what NetBSD does for asm macros. ... If I get the above right, the snippet from above should look like this, right? @@ -51,20 +51,17 @@ ld %r0,16(%r1);\ mtlr%r0;\ blr;\ -ENTRY(__CONCAT(__sys_,x)); \ - .weak CNAME(x); \ - .setCNAME(x),CNAME(__CONCAT(__sys_,x)); \ - .weak CNAME(__CONCAT(_,x)); \ - .setCNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ +ENTRY(__CONCAT(__sys_, x));\ + WEAK_REFERENCE(__CONCAT(__sys_, x), x); \ + WEAK_REFERENCE(__CONCAT(__sys_, x), __CONCAT(_, x));\ _SYSCALL(x);\ bso 2b Yes, assuming the args are in the right order. I would also change `x' to a meaningful name. At least on i386, uses x in most places, but csym and asmsym in 2 places, while uses meaningul parameter names in most places. If we want to stay with WEAK_ALIAS I can at least fix the style bugs. It is the arg order that I care about most, and with __weak_alias() or WEAK_ALIAS() we should remain compatible with the opposite order in NetBSD. 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"
svn commit: r230116 - head/share/man/man8
Author: dougb Date: Sat Jan 14 21:51:44 2012 New Revision: 230116 URL: http://svn.freebsd.org/changeset/base/230116 Log: Remove documentation for set_rcvar() now that it has been removed. Modified: head/share/man/man8/rc.8 head/share/man/man8/rc.subr.8 Modified: head/share/man/man8/rc.8 == --- head/share/man/man8/rc.8Sat Jan 14 21:38:31 2012(r230115) +++ head/share/man/man8/rc.8Sat Jan 14 21:51:44 2012(r230116) @@ -35,7 +35,7 @@ .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd November 17, 2009 +.Dd January 14, 2012 .Dt RC 8 .Os .Sh NAME @@ -485,7 +485,7 @@ Most scripts require little more than th \&. /etc/rc.subr name="foo" -rcvar=`set_rcvar` +rcvar=foo_enable command="/usr/local/bin/foo" load_rc_config $name @@ -506,7 +506,7 @@ The script may list and define as many c \&. /etc/rc.subr name="foo" -rcvar=`set_rcvar` +rcvar=foo_enable command="/usr/local/bin/foo" extra_commands="nop hello" hello_cmd="echo Hello World." Modified: head/share/man/man8/rc.subr.8 == --- head/share/man/man8/rc.subr.8 Sat Jan 14 21:38:31 2012 (r230115) +++ head/share/man/man8/rc.subr.8 Sat Jan 14 21:51:44 2012 (r230116) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 18, 2007 +.Dd January 14, 2012 .Dt RC.SUBR 8 .Os .Sh NAME @@ -73,8 +73,6 @@ .It .Ic run_rc_script Ar file Ar argument .It -.Ic set_rcvar Op Ar base -.It .Ic wait_for_pids Op Ar pid ... .It .Ic warn Ar message @@ -832,32 +830,6 @@ signal is sent to the parent process, which is assumed to be .Xr rc 8 . Otherwise, the shell exits with a non-zero status. -.It Ic set_rcvar Op Ar base -Set the variable name required to start a service. -In -.Fx -a daemon is usually controlled by an -.Xr rc.conf 5 -variable consisting of a daemon's name postfixed by the string -.Dq Li "_enable" . -This is not the case in -.Nx . -When the following line is included in a script: -.Pp -.Dl "rcvar=`set_rcvar`" -.Pp -this function will use the value of the -.Va $name -variable, which should be defined by the calling script, -to construct the appropriate -.Xr rc.conf 5 -knob. -If the -.Ar base -argument is set it will use -.Ar base -instead of -.Va $name . .It Ic wait_for_pids Op Ar pid ... Wait until all of the provided .Ar pids ___ 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: r230117 - head/bin/sh
Author: jilles Date: Sat Jan 14 21:54:12 2012 New Revision: 230117 URL: http://svn.freebsd.org/changeset/base/230117 Log: sh: Fix out of bounds array access when trap is used with an invalid signal. MFC after:1 week Modified: head/bin/sh/trap.c Modified: head/bin/sh/trap.c == --- head/bin/sh/trap.c Sat Jan 14 21:51:44 2012(r230116) +++ head/bin/sh/trap.c Sat Jan 14 21:54:12 2012(r230117) @@ -191,10 +191,11 @@ trapcmd(int argc, char **argv) argv++; } } - while (*argv) { + for (; *argv; argv++) { if ((signo = sigstring_to_signum(*argv)) == -1) { warning("bad signal %s", *argv); errors = 1; + continue; } INTOFF; if (action) @@ -205,7 +206,6 @@ trapcmd(int argc, char **argv) if (signo != 0) setsignal(signo); INTON; - argv++; } return errors; } ___ 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: r230103 - head/etc
On 01/14/2012 04:11, Sergey Kandaurov wrote: > On 14 January 2012 12:59, Doug Barton wrote: >> Author: dougb >> Date: Sat Jan 14 08:59:02 2012 >> New Revision: 230103 >> URL: http://svn.freebsd.org/changeset/base/230103 >> >> Log: >> Now that its callers have been udpated, remove set_rcvar(). >> >> The concept of set_rcvar() was nice in theory, but the forks >> it creates are a drag on the startup process, which is especially >> noticeable on slower systems, such as embedded ones. >> >> Modified: >> head/etc/rc.subr >> > > Hi, > > rc(8) and rc.subr(8) still reference this function. Not any more. :) I ran out of steam last night, and so I'm finishing up the doc stuff today. But thanks for the reminder. > Also, it would be fine to have some adoption to the new > set_rcvar-less order like printing The Big Warning and > still doing its job in Y.x branch and stop doing anything > in the next Y+1.x branch. If that becomes necessary, we can certainly do it. This is early enough in the 10-current cycle that I think we should be able to catch all the stragglers well before 10-release, and I personally have no plans to MFC the removal of set_rcvar from rc.subr. But, you know what they say about the best-laid plans Doug -- You can observe a lot just by watching. -- Yogi Berra Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ 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: r230118 - head/bin/sh
Author: jilles Date: Sat Jan 14 22:46:18 2012 New Revision: 230118 URL: http://svn.freebsd.org/changeset/base/230118 Log: sh: Change input buffer size from 1023 to 1024. PR: bin/161756 Modified: head/bin/sh/input.c Modified: head/bin/sh/input.c == --- head/bin/sh/input.c Sat Jan 14 21:54:12 2012(r230117) +++ head/bin/sh/input.c Sat Jan 14 22:46:18 2012(r230118) @@ -97,7 +97,7 @@ int parsenleft; /* copy of parsefile-> MKINIT int parselleft; /* copy of parsefile->lleft */ char *parsenextc; /* copy of parsefile->nextc */ MKINIT struct parsefile basepf;/* top level input file */ -char basebuf[BUFSIZ]; /* buffer for top level input file */ +char basebuf[BUFSIZ + 1]; /* buffer for top level input file */ static struct parsefile *parsefile = &basepf; /* current input file */ int init_editline = 0; /* editline library initialized? */ int whichprompt; /* 1 == PS1, 2 == PS2 */ @@ -189,8 +189,8 @@ retry: nr = 0; else { nr = el_len; - if (nr > BUFSIZ - 1) - nr = BUFSIZ - 1; + if (nr > BUFSIZ) + nr = BUFSIZ; memcpy(parsenextc, rl_cp, nr); if (nr != el_len) { el_len -= nr; @@ -200,7 +200,7 @@ retry: } } else #endif - nr = read(parsefile->fd, parsenextc, BUFSIZ - 1); + nr = read(parsefile->fd, parsenextc, BUFSIZ); if (nr <= 0) { if (nr < 0) { @@ -428,13 +428,13 @@ setinputfd(int fd, int push) (void)fcntl(fd, F_SETFD, FD_CLOEXEC); if (push) { pushfile(); - parsefile->buf = ckmalloc(BUFSIZ); + parsefile->buf = ckmalloc(BUFSIZ + 1); } if (parsefile->fd > 0) close(parsefile->fd); parsefile->fd = fd; if (parsefile->buf == NULL) - parsefile->buf = ckmalloc(BUFSIZ); + parsefile->buf = ckmalloc(BUFSIZ + 1); parselleft = parsenleft = 0; plinno = 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: r230119 - head/sys/contrib/pf/net
Author: csjp Date: Sat Jan 14 22:51:34 2012 New Revision: 230119 URL: http://svn.freebsd.org/changeset/base/230119 Log: Revert to the old behavior of allocating table/table entries using M_NOWAIT. Currently, the code allows for sleeping in the ioctl path to guarantee allocation. However code also handles ENOMEM gracefully, so propagate this error back to user-space, rather than sleeping while holding the global pf mutex. Reviewed by: glebius Discussed with: bz Modified: head/sys/contrib/pf/net/pf_table.c Modified: head/sys/contrib/pf/net/pf_table.c == --- head/sys/contrib/pf/net/pf_table.c Sat Jan 14 22:46:18 2012 (r230118) +++ head/sys/contrib/pf/net/pf_table.c Sat Jan 14 22:51:34 2012 (r230119) @@ -927,16 +927,12 @@ pfr_create_kentry(struct pfr_addr *ad, i { struct pfr_kentry *ke; - if (intr) #ifdef __FreeBSD__ - ke = pool_get(&V_pfr_kentry_pl, PR_NOWAIT | PR_ZERO); + ke = pool_get(&V_pfr_kentry_pl, PR_NOWAIT | PR_ZERO); #else + if (intr) ke = pool_get(&pfr_kentry_pl, PR_NOWAIT | PR_ZERO); -#endif else -#ifdef __FreeBSD__ - ke = pool_get(&V_pfr_kentry_pl, PR_WAITOK|PR_ZERO); -#else ke = pool_get(&pfr_kentry_pl, PR_WAITOK|PR_ZERO|PR_LIMITFAIL); #endif if (ke == NULL) @@ -2081,16 +2077,12 @@ pfr_create_ktable(struct pfr_table *tbl, struct pfr_ktable *kt; struct pf_ruleset *rs; - if (intr) #ifdef __FreeBSD__ - kt = pool_get(&V_pfr_ktable_pl, PR_NOWAIT|PR_ZERO); + kt = pool_get(&V_pfr_ktable_pl, PR_NOWAIT|PR_ZERO); #else + if (intr) kt = pool_get(&pfr_ktable_pl, PR_NOWAIT|PR_ZERO|PR_LIMITFAIL); -#endif else -#ifdef __FreeBSD__ - kt = pool_get(&V_pfr_ktable_pl, PR_WAITOK|PR_ZERO); -#else kt = pool_get(&pfr_ktable_pl, PR_WAITOK|PR_ZERO|PR_LIMITFAIL); #endif if (kt == NULL) ___ 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: r230120 - head/sys/fs/tmpfs
Author: alc Date: Sat Jan 14 23:04:27 2012 New Revision: 230120 URL: http://svn.freebsd.org/changeset/base/230120 Log: Neither tmpfs_nocacheread() nor tmpfs_mappedwrite() needs to call vm_object_pip_{add,subtract}() on the swap object because the swap object can't be destroyed while the vnode is exclusively locked. Moreover, even if the swap object could have been destroyed during tmpfs_nocacheread() and tmpfs_mappedwrite() this code is broken because vm_object_pip_subtract() does not wake up the sleeping thread that is trying to destroy the swap object. Free invalid pages after an I/O error. There is no virtue in keeping them around in the swap object creating more work for the page daemon. (I believe that any non-busy page in the swap object will now always be valid.) vm_pager_get_pages() does not return a standard errno, so its return value should not be returned by tmpfs without translation to an errno value. There is no reason for the wakeup on vpg in tmpfs_mappedwrite() to occur with the swap object locked. Eliminate printf()s from tmpfs_nocacheread() and tmpfs_mappedwrite(). (The swap pager already spam your console if data corruption is imminent.) Reviewed by: kib MFC after:3 weeks Modified: head/sys/fs/tmpfs/tmpfs_subr.c head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c == --- head/sys/fs/tmpfs/tmpfs_subr.c Sat Jan 14 22:51:34 2012 (r230119) +++ head/sys/fs/tmpfs/tmpfs_subr.c Sat Jan 14 23:04:27 2012 (r230120) @@ -929,6 +929,7 @@ retry: vm_page_sleep(m, "tmfssz"); goto retry; } + MPASS(m->valid == VM_PAGE_BITS_ALL); } else if (vm_pager_has_page(uobj, idx, NULL, NULL)) { m = vm_page_alloc(uobj, idx, VM_ALLOC_NORMAL); if (m == NULL) { @@ -957,7 +958,6 @@ retry: } if (m != NULL) { pmap_zero_page_area(m, base, PAGE_SIZE - base); - MPASS(m->valid == VM_PAGE_BITS_ALL); vm_page_dirty(m); vm_pager_page_unswapped(m); } Modified: head/sys/fs/tmpfs/tmpfs_vnops.c == --- head/sys/fs/tmpfs/tmpfs_vnops.c Sat Jan 14 22:51:34 2012 (r230119) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Sat Jan 14 23:04:27 2012 (r230120) @@ -437,18 +437,20 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p vm_offset_t offset, size_t tlen, struct uio *uio) { vm_page_t m; - int error; + int error, rv; VM_OBJECT_LOCK(tobj); - vm_object_pip_add(tobj, 1); m = vm_page_grab(tobj, idx, VM_ALLOC_WIRED | VM_ALLOC_NORMAL | VM_ALLOC_RETRY); if (m->valid != VM_PAGE_BITS_ALL) { if (vm_pager_has_page(tobj, idx, NULL, NULL)) { - error = vm_pager_get_pages(tobj, &m, 1, 0); - if (error != 0) { - printf("tmpfs get pages from pager error [read]\n"); - goto out; + rv = vm_pager_get_pages(tobj, &m, 1, 0); + if (rv != VM_PAGER_OK) { + vm_page_lock(m); + vm_page_free(m); + vm_page_unlock(m); + VM_OBJECT_UNLOCK(tobj); + return (EIO); } } else vm_page_zero_invalid(m, TRUE); @@ -456,12 +458,10 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p VM_OBJECT_UNLOCK(tobj); error = uiomove_fromphys(&m, offset, tlen, uio); VM_OBJECT_LOCK(tobj); -out: vm_page_lock(m); vm_page_unwire(m, TRUE); vm_page_unlock(m); vm_page_wakeup(m); - vm_object_pip_subtract(tobj, 1); VM_OBJECT_UNLOCK(tobj); return (error); @@ -624,7 +624,7 @@ tmpfs_mappedwrite(vm_object_t vobj, vm_o vm_offset_t offset; off_t addr; size_t tlen; - int error; + int error, rv; error = 0; @@ -664,14 +664,16 @@ lookupvpg: } nocache: VM_OBJECT_LOCK(tobj); - vm_object_pip_add(tobj, 1); tpg = vm_page_grab(tobj, idx, VM_ALLOC_WIRED | VM_ALLOC_NORMAL | VM_ALLOC_RETRY); if (tpg->valid != VM_PAGE_BITS_ALL) { if (vm_pager_has_page(tobj, idx, NULL, NULL)) { - error = vm_pager_get_pages(tobj, &tpg
svn commit: r230121 - head/tools/regression/bin/sh/expansion
Author: jilles Date: Sat Jan 14 23:10:18 2012 New Revision: 230121 URL: http://svn.freebsd.org/changeset/base/230121 Log: sh: Add testcases that should not be broken by future optimizations. Added: head/tools/regression/bin/sh/expansion/cmdsubst12.0 (contents, props changed) head/tools/regression/bin/sh/expansion/cmdsubst13.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/cmdsubst12.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/cmdsubst12.0 Sat Jan 14 23:10:18 2012(r230121) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +f() { + echo x$(printf foo >&2)y +} +[ "$(f 2>&1)" = "fooxy" ] Added: head/tools/regression/bin/sh/expansion/cmdsubst13.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/cmdsubst13.0 Sat Jan 14 23:10:18 2012(r230121) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +x=1 y=2 +[ "$( + case $((x+=1)) in + ($((y+=1))) echo bad1 ;; + ($((y-1))) echo $x.$y ;; + ($((y=2))) echo bad2 ;; + (*) echo bad3 ;; + esac +)" = "2.3" ] || echo "Error at $LINENO" +[ "$x.$y" = "1.2" ] || echo "Error at $LINENO" ___ 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: r230122 - head
Author: dougb Date: Sat Jan 14 23:19:10 2012 New Revision: 230122 URL: http://svn.freebsd.org/changeset/base/230122 Log: For the mass rc.d changes, add a command line to make the update easier Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Sat Jan 14 23:10:18 2012(r230121) +++ head/UPDATING Sat Jan 14 23:19:10 2012(r230122) @@ -28,6 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 port installed with a script in /usr/local/etc/rc.d you can either hand-edit the rcvar= line, or reinstall the port. + An easy way to handle the mass-update of /etc/rc.d: + rm /etc/rc.d/* && mergemaster -i + 20120109: panic(9) now stops other CPUs in the SMP systems, disables interrupts on the current CPU and prevents other threads from running. ___ 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: r230123 - in head/sys/powerpc: aim include powerpc
Author: nwhitehorn Date: Sun Jan 15 00:08:14 2012 New Revision: 230123 URL: http://svn.freebsd.org/changeset/base/230123 Log: Rework SLB trap handling so that double-faults into an SLB trap handler are possible, and double faults within an SLB trap handler are not. The result is that it possible to take an SLB fault at any time, on any address, for any reason, at any point in the kernel. This lets us do two important things. First, it removes the (soft) 16 GB RAM ceiling on PPC64 as well as any architectural limitations on KVA space. Second, it lets the kernel tolerate poorly designed hypervisors that have a tendency to fail to restore the SLB properly after a hypervisor context switch. MFC after:6 weeks Modified: head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/slb.c head/sys/powerpc/aim/trap.c head/sys/powerpc/aim/trap_subr64.S head/sys/powerpc/include/pcpu.h head/sys/powerpc/powerpc/genassym.c Modified: head/sys/powerpc/aim/machdep.c == --- head/sys/powerpc/aim/machdep.c Sat Jan 14 23:19:10 2012 (r230122) +++ head/sys/powerpc/aim/machdep.c Sun Jan 15 00:08:14 2012 (r230123) @@ -238,6 +238,7 @@ extern void *trapcode64; extern void*rstcode, *rstsize; #endif extern void*trapcode, *trapsize; +extern void*slbtrap, *slbtrapsize; extern void*alitrap, *alisize; extern void*dsitrap, *dsisize; extern void*decrint, *decrsize; @@ -490,8 +491,8 @@ powerpc_init(vm_offset_t startkernel, vm bcopy(&dsitrap, (void *)(EXC_DSI + trap_offset), (size_t)&dsisize); bcopy(generictrap, (void *)EXC_ISI, (size_t)&trapsize); #ifdef __powerpc64__ - bcopy(generictrap, (void *)EXC_DSE, (size_t)&trapsize); - bcopy(generictrap, (void *)EXC_ISE, (size_t)&trapsize); + bcopy(&slbtrap, (void *)EXC_DSE, (size_t)&slbtrapsize); + bcopy(&slbtrap, (void *)EXC_ISE, (size_t)&slbtrapsize); #endif bcopy(generictrap, (void *)EXC_EXI, (size_t)&trapsize); bcopy(generictrap, (void *)EXC_FPU, (size_t)&trapsize); Modified: head/sys/powerpc/aim/slb.c == --- head/sys/powerpc/aim/slb.c Sat Jan 14 23:19:10 2012(r230122) +++ head/sys/powerpc/aim/slb.c Sun Jan 15 00:08:14 2012(r230123) @@ -409,15 +409,11 @@ slb_alloc_tree(void) /* Lock entries mapping kernel text and stacks */ -#define SLB_SPILLABLE(slbe) \ - (((slbe & SLBE_ESID_MASK) < VM_MIN_KERNEL_ADDRESS && \ - (slbe & SLBE_ESID_MASK) > 16*SEGMENT_LENGTH) || \ - (slbe & SLBE_ESID_MASK) > VM_MAX_KERNEL_ADDRESS) void slb_insert_kernel(uint64_t slbe, uint64_t slbv) { struct slb *slbcache; - int i, j; + int i; /* We don't want to be preempted while modifying the kernel map */ critical_enter(); @@ -437,15 +433,9 @@ slb_insert_kernel(uint64_t slbe, uint64_ slbcache[USER_SLB_SLOT].slbe = 1; } - for (i = mftb() % n_slbs, j = 0; j < n_slbs; j++, i = (i+1) % n_slbs) { - if (i == USER_SLB_SLOT) - continue; - - if (SLB_SPILLABLE(slbcache[i].slbe)) - break; - } - - KASSERT(j < n_slbs, ("All kernel SLB slots locked!")); + i = mftb() % n_slbs; + if (i == USER_SLB_SLOT) + i = (i+1) % n_slbs; fillkernslb: KASSERT(i != USER_SLB_SLOT, Modified: head/sys/powerpc/aim/trap.c == --- head/sys/powerpc/aim/trap.c Sat Jan 14 23:19:10 2012(r230122) +++ head/sys/powerpc/aim/trap.c Sun Jan 15 00:08:14 2012(r230123) @@ -88,7 +88,9 @@ static inthandle_onfault(struct trapfra static voidsyscall(struct trapframe *frame); #ifdef __powerpc64__ -static int handle_slb_spill(pmap_t pm, vm_offset_t addr); + voidhandle_kernel_slb_spill(int, register_t, register_t); +static int handle_user_slb_spill(pmap_t pm, vm_offset_t addr); +extern int n_slbs; #endif intsetfault(faultbuf); /* defined in locore.S */ @@ -191,7 +193,7 @@ trap(struct trapframe *frame) #ifdef __powerpc64__ case EXC_ISE: case EXC_DSE: - if (handle_slb_spill(&p->p_vmspace->vm_pmap, + if (handle_user_slb_spill(&p->p_vmspace->vm_pmap, (type == EXC_ISE) ? frame->srr0 : frame->cpu.aim.dar) != 0) sig = SIGSEGV; @@ -259,27 +261,20 @@ trap(struct trapframe *frame) KASSERT(cold || td->td_ucred != NULL, ("kernel trap doesn't have ucred")); switch (type) { - case EXC_DSI: - if (trap_pfault(frame, 0) == 0) -
svn commit: r230124 - in stable/9/sys: kern ufs/ufs
Author: kib Date: Sun Jan 15 00:46:29 2012 New Revision: 230124 URL: http://svn.freebsd.org/changeset/base/230124 Log: MFC r229828: Avoid LOR between vfs_busy() lock and covered vnode lock on quotaon(). Modified: stable/9/sys/kern/vfs_syscalls.c stable/9/sys/ufs/ufs/ufs_quota.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_syscalls.c == --- stable/9/sys/kern/vfs_syscalls.cSun Jan 15 00:08:14 2012 (r230123) +++ stable/9/sys/kern/vfs_syscalls.cSun Jan 15 00:46:29 2012 (r230124) @@ -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: stable/9/sys/ufs/ufs/ufs_quota.c == --- stable/9/sys/ufs/ufs/ufs_quota.cSun Jan 15 00:08:14 2012 (r230123) +++ stable/9/sys/ufs/ufs/ufs_quota.cSun Jan 15 00:46:29 2012 (r230124) @@ -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"
Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexe
On Sat, Dec 24, 2011 at 02:26:20AM -0800, Xin LI wrote: > chroot(2) can create legitimate and secure environment where dlopen(2) > is safe and necessary. It seems it is internal contradiction in your argumentation: 1) You state that chroot(2) can create legitimate environment. 2) For ftpd's you disable .so loading in any case, i.e. even for legitimate environment too and you want to do so intentionally refusing passing responsibility to chroot(2) environment creator. In that situation the only suggestion of something like public interface is setting enviroment variable like "LD_SO_DISABLE" which prevents .so loading in libc. This is more clear than your stopgap. And please don't say that enviroment variable can be overwritten by the user inside ftpd itself, it is not so. And for case when some ftpd allows to call _any_ external program, it could do anything, like with your stopgap too. -- http://ache.vniz.net/ ___ 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: r230118 - head/bin/sh
On Sat, Jan 14, 2012 at 5:46 PM, Jilles Tjoelker wrote: > Author: jilles > Date: Sat Jan 14 22:46:18 2012 > New Revision: 230118 > URL: http://svn.freebsd.org/changeset/base/230118 > > Log: > sh: Change input buffer size from 1023 to 1024. > > PR: bin/161756 On Wed Oct 19 22:33:38 UTC 2011 you said in the PR: Although this change looks like an improvement, it does not seem fully satisfying. I would like to see performance numbers for the change on your slow embedded platform. Also, why use 1023 or 1024? Another buffer size may be better. But the PR does not seem to answer the question. Can you explain why you decided to act on the PR now? -- Eitan Adler ___ 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: r230125 - head/sys/kern
Author: eadler (ports committer) Date: Sun Jan 15 07:09:18 2012 New Revision: 230125 URL: http://svn.freebsd.org/changeset/base/230125 Log: - Fix undefined behavior when device_get_name is null - Make error message more informative PR: kern/149800 Submitted by: olgeni Approved by: cperciva MFC after:1 week Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c == --- head/sys/kern/subr_bus.cSun Jan 15 00:46:29 2012(r230124) +++ head/sys/kern/subr_bus.cSun Jan 15 07:09:18 2012(r230125) @@ -2020,9 +2020,15 @@ device_probe_child(device_t dev, device_ if (!hasclass) { if (device_set_devclass(child, dl->driver->name) != 0) { + char const * devname = + device_get_name(child); + if (devname == NULL) + devname = "(unknown)"; printf("driver bug: Unable to set " - "devclass (devname: %s)\n", - device_get_name(child)); + "devclass (class: %s " + "devname: %s)\n", + dl->driver->name, + devname); (void)device_set_driver(child, NULL); continue; } ___ 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: r230126 - stable/9/release/doc/en_US.ISO8859-1/errata
Author: hrs Date: Sun Jan 15 07:48:12 2012 New Revision: 230126 URL: http://svn.freebsd.org/changeset/base/230126 Log: Document ugen devctl event change. Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/9/release/doc/en_US.ISO8859-1/errata/article.sgml == --- stable/9/release/doc/en_US.ISO8859-1/errata/article.sgmlSun Jan 15 07:09:18 2012(r230125) +++ stable/9/release/doc/en_US.ISO8859-1/errata/article.sgmlSun Jan 15 07:48:12 2012(r230126) @@ -242,6 +242,27 @@ boot /boot/loader.conf: debug.acpi.disabled="hostres" + +A &man.devctl.4; event upon arrival of a &man.ugen.4; device + has been changed. The event now includes + ugen and cdev variables + instead of device-name. This change can + prevent the following &man.devd.8; rule which worked in a + previous releases from working: + +attach 0 { + match "device-name" "ugen[0-9]+.[0-9]+"; + action "/path/to/script /dev/$device-name"; +} + +This should be updated to the following: + +attach 0 { + match "subsystem" "DEVICE"; + match "type" "ATTACH"; + match "cdev" "ugen[0-9]+.[0-9]+"; + action "/path/to/script /dev/$cdev"; +} ___ 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"