svn commit: r359769 - stable/12/stand/liblua
Author: sjg Date: Fri Apr 10 05:13:15 2020 New Revision: 359769 URL: https://svnweb.freebsd.org/changeset/base/359769 Log: veloader use vectx API for kernel and modules The vectx API, computes the hash for verifying a file as it is read. This avoids the overhead of reading files twice - once to verify, then again to load. For doing an install via loader, avoiding the need to rewind large files is critical. This API is only used for modules, kernel and mdimage as these are the biggest files read by the loader. The reduction in boot time depends on how expensive the I/O is on any given platform. On a fast VM we see 6% improvement. For install via loader the first file to be verified is likely to be the kernel, so some of the prep work (finding manifest etc) done by verify_file() needs to be factored so it can be reused for vectx_open(). For missing or unrecognized fingerprint entries, we fail in vectx_open() unless verifying is disabled. Otherwise fingerprint check happens in vectx_close() and since this API is only used for files which must be verified (VE_MUST) we panic if we get an incorrect hash. MFC of r358811 Reviewed by: imp,tsoome Sponsored by: Juniper Networks Differential Revision:https://reviews.freebsd.org//D23827 Modified: stable/12/stand/liblua/lstd.c Modified: stable/12/stand/liblua/lstd.c == --- stable/12/stand/liblua/lstd.c Fri Apr 10 01:37:00 2020 (r359768) +++ stable/12/stand/liblua/lstd.c Fri Apr 10 05:13:15 2020 (r359769) @@ -83,7 +83,7 @@ fopen(const char *filename, const char *mode) #ifdef LOADER_VERIEXEC /* only regular files and only reading makes sense */ if (S_ISREG(st.st_mode) && !(m & O_WRONLY)) { - if (verify_file(fd, filename, 0, VE_GUESS) < 0) { + if (verify_file(fd, filename, 0, VE_GUESS, __func__) < 0) { free(f); close(fd); return (NULL); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359768 - stable/12/usr.bin/xargs
Author: markj Date: Fri Apr 10 01:37:00 2020 New Revision: 359768 URL: https://svnweb.freebsd.org/changeset/base/359768 Log: MFC r359596: xargs: Fix exit status expression when a child process fails to exec. PR: 244327 Modified: stable/12/usr.bin/xargs/xargs.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/xargs/xargs.c == --- stable/12/usr.bin/xargs/xargs.c Fri Apr 10 01:28:47 2020 (r359767) +++ stable/12/usr.bin/xargs/xargs.c Fri Apr 10 01:37:00 2020 (r359768) @@ -650,7 +650,7 @@ waitchildren(const char *name, int waitall) if (childerr != 0 && cause_exit == 0) { errno = childerr; waitall = 1; - cause_exit = ENOENT ? 127 : 126; + cause_exit = errno == ENOENT ? 127 : 126; warn("%s", name); } else if (WIFSIGNALED(status)) { waitall = cause_exit = 1; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r359346 - in head/sys: amd64/vmm/amd contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/components/debugger contrib/dev/acpica/components/dispa
On Thu, Mar 26, 2020 at 7:32 PM Jung-uk Kim wrote: > > Author: jkim > Date: Fri Mar 27 00:29:33 2020 > New Revision: 359346 > URL: https://svnweb.freebsd.org/changeset/base/359346 > > Log: > Merge ACPICA 20200326. > Hello! Any projection on if/when this will get merged back to stable/12 (and 11, but it looks like it's not getting ACPICA updates anymore)? Below is, in particular, the subset of the diff I care about as it resolves -fno-common issues. Thanks, Kyle Evans universe12a% svn diff sys/contrib Index: sys/contrib/dev/acpica/compiler/aslcompiler.l === --- sys/contrib/dev/acpica/compiler/aslcompiler.l (revision 359763) +++ sys/contrib/dev/acpica/compiler/aslcompiler.l (working copy) @@ -156,7 +156,6 @@ #include #include -YYSTYPE AslCompilerlval; /* * Generation: Use the following command line: Index: sys/contrib/dev/acpica/compiler/dtcompiler.h === --- sys/contrib/dev/acpica/compiler/dtcompiler.h (revision 359763) +++ sys/contrib/dev/acpica/compiler/dtcompiler.h (working copy) @@ -461,7 +461,6 @@ /* dtparser - lex/yacc files */ -UINT64 DtCompilerParserResult; /* Expression return value */ int DtCompilerParserparse ( void); Index: sys/contrib/dev/acpica/compiler/dtcompilerparser.y === --- sys/contrib/dev/acpica/compiler/dtcompilerparser.y (revision 359763) +++ sys/contrib/dev/acpica/compiler/dtcompilerparser.y (working copy) @@ -170,7 +170,6 @@ extern DT_FIELD *AslGbl_CurrentField; extern int DtLabelByteOffset; -extern UINT64 DtCompilerParserResult; /* Expression return value */ extern UINT64 DtCompilerParserlineno; /* Current line number */ extern UINT32 DtTokenFirstLine; Index: sys/contrib/dev/acpica/compiler/dtparser.l === --- sys/contrib/dev/acpica/compiler/dtparser.l (revision 359763) +++ sys/contrib/dev/acpica/compiler/dtparser.l (working copy) @@ -208,7 +208,7 @@ /* * Local support functions */ -YY_BUFFER_STATE LexBuffer; +static YY_BUFFER_STATE LexBuffer; /** * Index: sys/contrib/dev/acpica/compiler/prparser.l === --- sys/contrib/dev/acpica/compiler/prparser.l (revision 359763) +++ sys/contrib/dev/acpica/compiler/prparser.l (working copy) @@ -224,7 +224,7 @@ /* * Local support functions */ -YY_BUFFER_STATE LexBuffer; +static YY_BUFFER_STATE LexBuffer; /** ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359767 - head/sys/kern
Author: kib Date: Fri Apr 10 01:28:47 2020 New Revision: 359767 URL: https://svnweb.freebsd.org/changeset/base/359767 Log: Do not pass bogus page to mbufs. This is a bug in r359473. Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c == --- head/sys/kern/kern_sendfile.c Fri Apr 10 01:24:16 2020 (r359766) +++ head/sys/kern/kern_sendfile.c Fri Apr 10 01:28:47 2020 (r359767) @@ -649,6 +649,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *h struct file *sock_fp; struct vnode *vp; struct vm_object *obj; + vm_page_t pga; struct socket *so; #ifdef KERN_TLS struct ktls_session *tls; @@ -948,6 +949,9 @@ retry_space: softerr = EBUSY; break; } + pga = pa[i]; + if (pga == bogus_page) + pga = vm_page_relookup(obj, sfio->pindex0 + i); if (use_ext_pgs) { off_t xfs; @@ -997,7 +1001,7 @@ retry_space: ext_pgs->nrdy++; } - ext_pgs->pa[ext_pgs_idx] = VM_PAGE_TO_PHYS(pa[i]); + ext_pgs->pa[ext_pgs_idx] = VM_PAGE_TO_PHYS(pga); ext_pgs->npgs++; xfs = xfsize(i, npages, off, space); ext_pgs->last_pg_len = xfs; @@ -1016,7 +1020,7 @@ retry_space: * threads might exhaust the buffers and then * deadlock. */ - sf = sf_buf_alloc(pa[i], + sf = sf_buf_alloc(pga, m != NULL ? SFB_NOWAIT : SFB_CATCH); if (sf == NULL) { SFSTAT_INC(sf_allocfail); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359766 - head/sys/ufs/ffs
Author: kib Date: Fri Apr 10 01:24:16 2020 New Revision: 359766 URL: https://svnweb.freebsd.org/changeset/base/359766 Log: ufs: apply suspension for non-forced rw unmounts. Forced rw unmounts and remounts from rw to ro already suspend filesystem, which closes races with writers instantiating new vnodes while unmount flushes the queue. Original intent of not including non-forced unmounts into this regime was to allow such unmounts to fail if writer was active, but this did not worked well. Similar change, but causing all unmount, even involving only ro filesystem, were proposed in D24088, but I believe that suspending ro is undesirable, and definitely spends CPU time. Reported by: markj Discussed with: chs, mckusick Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c == --- head/sys/ufs/ffs/ffs_vfsops.c Fri Apr 10 01:23:06 2020 (r359765) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Apr 10 01:24:16 2020 (r359766) @@ -1247,11 +1247,9 @@ ffs_unmount(mp, mntflags) flags = 0; td = curthread; fs = ump->um_fs; - susp = 0; - if (mntflags & MNT_FORCE) { + if (mntflags & MNT_FORCE) flags |= FORCECLOSE; - susp = fs->fs_ronly == 0; - } + susp = fs->fs_ronly == 0; #ifdef UFS_EXTATTR if ((error = ufs_extattr_stop(mp, td))) { if (error != EOPNOTSUPP) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359765 - stable/12/sys/geom/journal
Author: markj Date: Fri Apr 10 01:23:06 2020 New Revision: 359765 URL: https://svnweb.freebsd.org/changeset/base/359765 Log: MFC r359595: geom_journal: Only stop the switcher process if one was started. PR: 243196 Modified: stable/12/sys/geom/journal/g_journal.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/geom/journal/g_journal.c == --- stable/12/sys/geom/journal/g_journal.c Fri Apr 10 00:31:52 2020 (r359764) +++ stable/12/sys/geom/journal/g_journal.c Fri Apr 10 01:23:06 2020 (r359765) @@ -2749,7 +2749,8 @@ g_journal_fini(struct g_class *mp) } if (g_journal_event_lowmem != NULL) EVENTHANDLER_DEREGISTER(vm_lowmem, g_journal_event_lowmem); - g_journal_stop_switcher(); + if (g_journal_switcher_proc != NULL) + g_journal_stop_switcher(); } DECLARE_GEOM_CLASS(g_journal_class, g_journal); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359764 - head/share/misc
Author: rscheff Date: Fri Apr 10 00:31:52 2020 New Revision: 359764 URL: https://svnweb.freebsd.org/changeset/base/359764 Log: add myself (rscheff) as a src committer. Reviewed by: rgrimes (mentor), tuexen (mentor) Approved by: rgrimes (mentor), tuexen (mentor) MFC after:3 days Sponsored by: NetApp, Inc. Differential Revision:https://reviews.freebsd.org/D24318 Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Fri Apr 10 00:27:19 2020 (r359763) +++ head/share/misc/committers-src.dot Fri Apr 10 00:31:52 2020 (r359764) @@ -312,6 +312,7 @@ royger [label="Roger Pau Monne\nroy...@freebsd.org\n20 rpaulo [label="Rui Paulo\nrpa...@freebsd.org\n2007/09/25"] rpokala [label="Ravi Pokala\nrpok...@freebsd.org\n2015/11/19"] rrs [label="Randall R Stewart\n...@freebsd.org\n2007/02/08"] +rscheff [label="Richard Scheffenegger\nrsch...@freebsd.org\n2020/04/06"] rse [label="Ralf S. Engelschall\n...@freebsd.org\n1997/07/31"] rstone [label="Ryan Stone\nrst...@freebsd.org\n2010/04/19"] ru [label="Ruslan Ermilov\n...@freebsd.org\n1999/05/27"] @@ -792,6 +793,7 @@ pjd -> smh pjd -> trociny rgrimes -> markm +rgrimes -> rscheff rmacklem -> jwd @@ -882,6 +884,8 @@ thompsa -> eri trasz -> jh trasz -> mjg + +tuexen -> rscheff ume -> jinmei ume -> suz ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359763 - in stable: 11/usr.bin/gprof 11/usr.bin/mail 11/usr.bin/tip/tip 12/usr.bin/gprof 12/usr.bin/mail 12/usr.bin/tip/tip
Author: kevans Date: Fri Apr 10 00:27:19 2020 New Revision: 359763 URL: https://svnweb.freebsd.org/changeset/base/359763 Log: MFC r359680: mail/gprof/tip: tap with the ugly stick The ugly stick here is this bit in the respective headers: #ifndef EXTERN #define EXTERN extern #endif with a follow-up #define EXTERN in a single .c file to push all of their definitions into one spot. A pass should be made over these three later to push these definitions into the correct files instead, but this will suffice for now and at a more leisurely pace. Modified: stable/11/usr.bin/gprof/gprof.c stable/11/usr.bin/gprof/gprof.h stable/11/usr.bin/mail/glob.h stable/11/usr.bin/mail/main.c stable/11/usr.bin/mail/strings.c stable/11/usr.bin/tip/tip/tip.c stable/11/usr.bin/tip/tip/tip.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.bin/gprof/gprof.c stable/12/usr.bin/gprof/gprof.h stable/12/usr.bin/mail/glob.h stable/12/usr.bin/mail/main.c stable/12/usr.bin/mail/strings.c stable/12/usr.bin/tip/tip/tip.c stable/12/usr.bin/tip/tip/tip.h Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.bin/gprof/gprof.c == --- stable/11/usr.bin/gprof/gprof.c Fri Apr 10 00:25:14 2020 (r359762) +++ stable/11/usr.bin/gprof/gprof.c Fri Apr 10 00:27:19 2020 (r359763) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#defineEXTERN #include "gprof.h" static int valcmp(const void *, const void *); Modified: stable/11/usr.bin/gprof/gprof.h == --- stable/11/usr.bin/gprof/gprof.h Fri Apr 10 00:25:14 2020 (r359762) +++ stable/11/usr.bin/gprof/gprof.h Fri Apr 10 00:27:19 2020 (r359763) @@ -70,18 +70,22 @@ typedef int bool; */ #defineHISTORICAL_SCALE_2 2 +#ifndef EXTERN +#defineEXTERN extern +#endif + /* * ticks per second */ -long hz; +EXTERN longhz; -size_t histcounter_size; -inthistcounter_type; +EXTERN size_t histcounter_size; +EXTERN int histcounter_type; -char *a_outname; +EXTERN char*a_outname; #defineA_OUTNAME "a.out" -char *gmonname; +EXTERN char*gmonname; #defineGMONSUM "gmon.sum" /* @@ -141,9 +145,9 @@ struct nl { }; typedef struct nl nltype; -nltype *nl;/* the whole namelist */ -nltype *npe; /* the virtual end of the namelist */ -intnname; /* the number of function names */ +EXTERN nltype *nl;/* the whole namelist */ +EXTERN nltype *npe; /* the virtual end of the namelist */ +EXTERN int nname; /* the number of function names */ #defineHASCYCLEXIT 0x08/* node has arc exiting from cycle */ #defineCYCLEHEAD 0x10/* node marked as head of a cycle */ @@ -162,9 +166,9 @@ struct cl { }; typedef struct cl cltype; -arctype*archead; /* the head of arcs in current cycle list */ -cltype *cyclehead; /* the head of the list */ -intcyclecnt; /* the number of cycles found */ +EXTERN arctype *archead; /* the head of arcs in current cycle list */ +EXTERN cltype *cyclehead; /* the head of the list */ +EXTERN int cyclecnt; /* the number of cycles found */ #defineCYCLEMAX100 /* maximum cycles before cutting one of them */ /* @@ -178,8 +182,8 @@ int cyclecnt; /* the number of cycles found */ * namelist entries for cycle headers. * the number of discovered cycles. */ -nltype *cyclenl; /* cycle header namelist */ -intncycle; /* number of cycles discovered */ +EXTERN nltype *cyclenl; /* cycle header namelist */ +EXTERN int ncycle; /* number of cycles discovered */ /* * The header on the gmon.out file. @@ -195,43 +199,46 @@ struct ophdr { intncnt; }; -intdebug; +EXTERN int debug; /* * Each discretized pc sample has * a count of the number of samples in its range */ -double *samples; +EXTERN double *samples; -unsigned long s_lowpc;/* lowpc from the profile file */ -unsigned long s_highpc; /* highpc from the profile file */ -unsigned long lowpc, highpc; /* range profiled, in historical units */ -unsigned sampbytes;/* number of bytes of samples */ -intnsamples; /* number of samples */ -double actime; /* accumulated time thus far for putprofline */ -double totime; /* total time for all routines */ -double printtime; /* total of t
svn commit: r359763 - in stable: 11/usr.bin/gprof 11/usr.bin/mail 11/usr.bin/tip/tip 12/usr.bin/gprof 12/usr.bin/mail 12/usr.bin/tip/tip
Author: kevans Date: Fri Apr 10 00:27:19 2020 New Revision: 359763 URL: https://svnweb.freebsd.org/changeset/base/359763 Log: MFC r359680: mail/gprof/tip: tap with the ugly stick The ugly stick here is this bit in the respective headers: #ifndef EXTERN #define EXTERN extern #endif with a follow-up #define EXTERN in a single .c file to push all of their definitions into one spot. A pass should be made over these three later to push these definitions into the correct files instead, but this will suffice for now and at a more leisurely pace. Modified: stable/12/usr.bin/gprof/gprof.c stable/12/usr.bin/gprof/gprof.h stable/12/usr.bin/mail/glob.h stable/12/usr.bin/mail/main.c stable/12/usr.bin/mail/strings.c stable/12/usr.bin/tip/tip/tip.c stable/12/usr.bin/tip/tip/tip.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.bin/gprof/gprof.c stable/11/usr.bin/gprof/gprof.h stable/11/usr.bin/mail/glob.h stable/11/usr.bin/mail/main.c stable/11/usr.bin/mail/strings.c stable/11/usr.bin/tip/tip/tip.c stable/11/usr.bin/tip/tip/tip.h Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.bin/gprof/gprof.c == --- stable/12/usr.bin/gprof/gprof.c Fri Apr 10 00:25:14 2020 (r359762) +++ stable/12/usr.bin/gprof/gprof.c Fri Apr 10 00:27:19 2020 (r359763) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#defineEXTERN #include "gprof.h" static int valcmp(const void *, const void *); Modified: stable/12/usr.bin/gprof/gprof.h == --- stable/12/usr.bin/gprof/gprof.h Fri Apr 10 00:25:14 2020 (r359762) +++ stable/12/usr.bin/gprof/gprof.h Fri Apr 10 00:27:19 2020 (r359763) @@ -72,18 +72,22 @@ typedef int bool; */ #defineHISTORICAL_SCALE_2 2 +#ifndef EXTERN +#defineEXTERN extern +#endif + /* * ticks per second */ -long hz; +EXTERN longhz; -size_t histcounter_size; -inthistcounter_type; +EXTERN size_t histcounter_size; +EXTERN int histcounter_type; -char *a_outname; +EXTERN char*a_outname; #defineA_OUTNAME "a.out" -char *gmonname; +EXTERN char*gmonname; #defineGMONSUM "gmon.sum" /* @@ -143,9 +147,9 @@ struct nl { }; typedef struct nl nltype; -nltype *nl;/* the whole namelist */ -nltype *npe; /* the virtual end of the namelist */ -intnname; /* the number of function names */ +EXTERN nltype *nl;/* the whole namelist */ +EXTERN nltype *npe; /* the virtual end of the namelist */ +EXTERN int nname; /* the number of function names */ #defineHASCYCLEXIT 0x08/* node has arc exiting from cycle */ #defineCYCLEHEAD 0x10/* node marked as head of a cycle */ @@ -164,9 +168,9 @@ struct cl { }; typedef struct cl cltype; -arctype*archead; /* the head of arcs in current cycle list */ -cltype *cyclehead; /* the head of the list */ -intcyclecnt; /* the number of cycles found */ +EXTERN arctype *archead; /* the head of arcs in current cycle list */ +EXTERN cltype *cyclehead; /* the head of the list */ +EXTERN int cyclecnt; /* the number of cycles found */ #defineCYCLEMAX100 /* maximum cycles before cutting one of them */ /* @@ -180,8 +184,8 @@ int cyclecnt; /* the number of cycles found */ * namelist entries for cycle headers. * the number of discovered cycles. */ -nltype *cyclenl; /* cycle header namelist */ -intncycle; /* number of cycles discovered */ +EXTERN nltype *cyclenl; /* cycle header namelist */ +EXTERN int ncycle; /* number of cycles discovered */ /* * The header on the gmon.out file. @@ -197,43 +201,46 @@ struct ophdr { intncnt; }; -intdebug; +EXTERN int debug; /* * Each discretized pc sample has * a count of the number of samples in its range */ -double *samples; +EXTERN double *samples; -unsigned long s_lowpc;/* lowpc from the profile file */ -unsigned long s_highpc; /* highpc from the profile file */ -unsigned long lowpc, highpc; /* range profiled, in historical units */ -unsigned sampbytes;/* number of bytes of samples */ -intnsamples; /* number of samples */ -double actime; /* accumulated time thus far for putprofline */ -double totime; /* total time for all routines */ -double printtime; /* total of t
svn commit: r359762 - in stable: 11/usr.sbin/config 12/usr.sbin/config
Author: kevans Date: Fri Apr 10 00:25:14 2020 New Revision: 359762 URL: https://svnweb.freebsd.org/changeset/base/359762 Log: MFC r359689: config(8): "fix" a couple of buffer overflows Recently added/changed lines in various kernel configs have caused some buffer overflows that went undetected. These were detected with a config built using -fno-common as these line buffers smashed one of our arrays, then further triaged with ASAN. Double the sizes; this is really not a great fix, but addresses the immediate need until someone rewrites config. While here, add some bounds checking so that we don't need to detect this by random bus errors or other weird failures. Modified: stable/12/usr.sbin/config/main.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/config/main.c Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.sbin/config/main.c == --- stable/12/usr.sbin/config/main.cFri Apr 10 00:23:34 2020 (r359761) +++ stable/12/usr.sbin/config/main.cFri Apr 10 00:25:14 2020 (r359762) @@ -313,7 +313,7 @@ usage(void) char * get_word(FILE *fp) { - static char line[80]; + static char line[160]; int ch; char *cp; int escaped_nl = 0; @@ -343,11 +343,17 @@ begin: *cp = 0; return (line); } - while ((ch = getc(fp)) != EOF) { + while ((ch = getc(fp)) != EOF && cp < line + sizeof(line)) { if (isspace(ch)) break; *cp++ = ch; } + if (cp >= line + sizeof(line)) { + line[sizeof(line) - 1] = '\0'; + fprintf(stderr, "config: attempted overflow, partial line: `%s'", + line); + exit(2); + } *cp = 0; if (ch == EOF) return ((char *)EOF); @@ -363,7 +369,7 @@ begin: char * get_quoted_word(FILE *fp) { - static char line[256]; + static char line[512]; int ch; char *cp; int escaped_nl = 0; @@ -406,15 +412,29 @@ begin: } if (ch != quote && escaped_nl) *cp++ = '\\'; + if (cp >= line + sizeof(line)) { + line[sizeof(line) - 1] = '\0'; + printf( + "config: line buffer overflow reading partial line `%s'\n", + line); + exit(2); + } *cp++ = ch; escaped_nl = 0; } } else { *cp++ = ch; - while ((ch = getc(fp)) != EOF) { + while ((ch = getc(fp)) != EOF && cp < line + sizeof(line)) { if (isspace(ch)) break; *cp++ = ch; + } + if (cp >= line + sizeof(line)) { + line[sizeof(line) - 1] = '\0'; + printf( + "config: line buffer overflow reading partial line `%s'\n", + line); + exit(2); } if (ch != EOF) (void) ungetc(ch, fp); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359762 - in stable: 11/usr.sbin/config 12/usr.sbin/config
Author: kevans Date: Fri Apr 10 00:25:14 2020 New Revision: 359762 URL: https://svnweb.freebsd.org/changeset/base/359762 Log: MFC r359689: config(8): "fix" a couple of buffer overflows Recently added/changed lines in various kernel configs have caused some buffer overflows that went undetected. These were detected with a config built using -fno-common as these line buffers smashed one of our arrays, then further triaged with ASAN. Double the sizes; this is really not a great fix, but addresses the immediate need until someone rewrites config. While here, add some bounds checking so that we don't need to detect this by random bus errors or other weird failures. Modified: stable/11/usr.sbin/config/main.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.sbin/config/main.c Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.sbin/config/main.c == --- stable/11/usr.sbin/config/main.cFri Apr 10 00:23:34 2020 (r359761) +++ stable/11/usr.sbin/config/main.cFri Apr 10 00:25:14 2020 (r359762) @@ -311,7 +311,7 @@ usage(void) char * get_word(FILE *fp) { - static char line[80]; + static char line[160]; int ch; char *cp; int escaped_nl = 0; @@ -341,11 +341,17 @@ begin: *cp = 0; return (line); } - while ((ch = getc(fp)) != EOF) { + while ((ch = getc(fp)) != EOF && cp < line + sizeof(line)) { if (isspace(ch)) break; *cp++ = ch; } + if (cp >= line + sizeof(line)) { + line[sizeof(line) - 1] = '\0'; + fprintf(stderr, "config: attempted overflow, partial line: `%s'", + line); + exit(2); + } *cp = 0; if (ch == EOF) return ((char *)EOF); @@ -361,7 +367,7 @@ begin: char * get_quoted_word(FILE *fp) { - static char line[256]; + static char line[512]; int ch; char *cp; int escaped_nl = 0; @@ -404,15 +410,29 @@ begin: } if (ch != quote && escaped_nl) *cp++ = '\\'; + if (cp >= line + sizeof(line)) { + line[sizeof(line) - 1] = '\0'; + printf( + "config: line buffer overflow reading partial line `%s'\n", + line); + exit(2); + } *cp++ = ch; escaped_nl = 0; } } else { *cp++ = ch; - while ((ch = getc(fp)) != EOF) { + while ((ch = getc(fp)) != EOF && cp < line + sizeof(line)) { if (isspace(ch)) break; *cp++ = ch; + } + if (cp >= line + sizeof(line)) { + line[sizeof(line) - 1] = '\0'; + printf( + "config: line buffer overflow reading partial line `%s'\n", + line); + exit(2); } if (ch != EOF) (void) ungetc(ch, fp); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359761 - in stable: 11/stand/mips/beri/loader 11/stand/powerpc/ofw 11/stand/uboot/lib 12/stand/mips/beri/loader 12/stand/powerpc/ofw 12/stand/uboot/lib
Author: kevans Date: Fri Apr 10 00:23:34 2020 New Revision: 359761 URL: https://svnweb.freebsd.org/changeset/base/359761 Log: MFC r359688: stand: -fno-common fixes for !x86 loaders - beriloader: archsw is declared extern and defined elsewhere - ofwloader: ofw_elf{,64} are defined in elf_freebsd.c and ppc64_elf_freebsd.c respectively - ubldr: syscall_ptr is defined in start.S for whichever ubldr platform is building -fno-common will become the default in GCC10/LLVM11. Modified: stable/11/stand/mips/beri/loader/main.c stable/11/stand/powerpc/ofw/conf.c stable/11/stand/uboot/lib/glue.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/stand/mips/beri/loader/main.c stable/12/stand/powerpc/ofw/conf.c stable/12/stand/uboot/lib/glue.h Directory Properties: stable/12/ (props changed) Modified: stable/11/stand/mips/beri/loader/main.c == --- stable/11/stand/mips/beri/loader/main.c Thu Apr 9 23:51:18 2020 (r359760) +++ stable/11/stand/mips/beri/loader/main.c Fri Apr 10 00:23:34 2020 (r359761) @@ -59,8 +59,6 @@ struct devsw *devsw[] = { NULL }; -struct arch_switch archsw; - struct file_format *file_formats[] = { &beri_elf, NULL Modified: stable/11/stand/powerpc/ofw/conf.c == --- stable/11/stand/powerpc/ofw/conf.c Thu Apr 9 23:51:18 2020 (r359760) +++ stable/11/stand/powerpc/ofw/conf.c Fri Apr 10 00:23:34 2020 (r359761) @@ -97,8 +97,8 @@ struct netif_driver *netif_drivers[] = { * rather than reading the file go first. */ -struct file_format ofw_elf; -struct file_format ofw_elf64; +extern struct file_format ofw_elf; +extern struct file_format ofw_elf64; struct file_format *file_formats[] = { &ofw_elf, Modified: stable/11/stand/uboot/lib/glue.h == --- stable/11/stand/uboot/lib/glue.hThu Apr 9 23:51:18 2020 (r359760) +++ stable/11/stand/uboot/lib/glue.hFri Apr 10 00:23:34 2020 (r359761) @@ -56,7 +56,7 @@ #endif int syscall(int, int *, ...); -void *syscall_ptr; +extern void *syscall_ptr; int api_parse_cmdline_sig(int argc, char **argv, struct api_signature **sig); int api_search_sig(struct api_signature **sig); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359761 - in stable: 11/stand/mips/beri/loader 11/stand/powerpc/ofw 11/stand/uboot/lib 12/stand/mips/beri/loader 12/stand/powerpc/ofw 12/stand/uboot/lib
Author: kevans Date: Fri Apr 10 00:23:34 2020 New Revision: 359761 URL: https://svnweb.freebsd.org/changeset/base/359761 Log: MFC r359688: stand: -fno-common fixes for !x86 loaders - beriloader: archsw is declared extern and defined elsewhere - ofwloader: ofw_elf{,64} are defined in elf_freebsd.c and ppc64_elf_freebsd.c respectively - ubldr: syscall_ptr is defined in start.S for whichever ubldr platform is building -fno-common will become the default in GCC10/LLVM11. Modified: stable/12/stand/mips/beri/loader/main.c stable/12/stand/powerpc/ofw/conf.c stable/12/stand/uboot/lib/glue.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/stand/mips/beri/loader/main.c stable/11/stand/powerpc/ofw/conf.c stable/11/stand/uboot/lib/glue.h Directory Properties: stable/11/ (props changed) Modified: stable/12/stand/mips/beri/loader/main.c == --- stable/12/stand/mips/beri/loader/main.c Thu Apr 9 23:51:18 2020 (r359760) +++ stable/12/stand/mips/beri/loader/main.c Fri Apr 10 00:23:34 2020 (r359761) @@ -59,8 +59,6 @@ struct devsw *devsw[] = { NULL }; -struct arch_switch archsw; - struct file_format *file_formats[] = { &beri_elf, NULL Modified: stable/12/stand/powerpc/ofw/conf.c == --- stable/12/stand/powerpc/ofw/conf.c Thu Apr 9 23:51:18 2020 (r359760) +++ stable/12/stand/powerpc/ofw/conf.c Fri Apr 10 00:23:34 2020 (r359761) @@ -97,8 +97,8 @@ struct netif_driver *netif_drivers[] = { * rather than reading the file go first. */ -struct file_format ofw_elf; -struct file_format ofw_elf64; +extern struct file_format ofw_elf; +extern struct file_format ofw_elf64; struct file_format *file_formats[] = { &ofw_elf, Modified: stable/12/stand/uboot/lib/glue.h == --- stable/12/stand/uboot/lib/glue.hThu Apr 9 23:51:18 2020 (r359760) +++ stable/12/stand/uboot/lib/glue.hFri Apr 10 00:23:34 2020 (r359761) @@ -56,7 +56,7 @@ #endif int syscall(int, int *, ...); -void *syscall_ptr; +extern void *syscall_ptr; int api_parse_cmdline_sig(int argc, char **argv, struct api_signature **sig); int api_search_sig(struct api_signature **sig); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359760 - head/sys/ufs/ffs
Author: mckusick Date: Thu Apr 9 23:51:18 2020 New Revision: 359760 URL: https://svnweb.freebsd.org/changeset/base/359760 Log: Fixing the soft update macros in -r359612 triggered a previously hidden bug in the file truncation code. Until that bug is tracked down and fixed, revert to the old behavior. Reported by: Peter Holm Reviewed by: kib, Chuck Silvers Modified: head/sys/ufs/ffs/ffs_inode.c Modified: head/sys/ufs/ffs/ffs_inode.c == --- head/sys/ufs/ffs/ffs_inode.cThu Apr 9 23:42:13 2020 (r359759) +++ head/sys/ufs/ffs/ffs_inode.cThu Apr 9 23:51:18 2020 (r359760) @@ -244,6 +244,7 @@ ffs_truncate(vp, length, flags, cred) needextclean = 0; softdeptrunc = 0; journaltrunc = DOINGSUJ(vp); + journaltrunc = 0; /* XXX temp patch until bug found */ if (journaltrunc == 0 && DOINGSOFTDEP(vp) && length == 0) softdeptrunc = !softdep_slowdown(vp); extblocks = 0; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359759 - head/sys/kern
Author: mckusick Date: Thu Apr 9 23:42:13 2020 New Revision: 359759 URL: https://svnweb.freebsd.org/changeset/base/359759 Log: When running with a kernel compiled with DEBUG_LOCKS, before panic'ing for recusing on a non-recursive lock, print out the kernel stack where the lock was originally acquired. Modified: head/sys/kern/kern_lock.c Modified: head/sys/kern/kern_lock.c == --- head/sys/kern/kern_lock.c Thu Apr 9 23:22:35 2020(r359758) +++ head/sys/kern/kern_lock.c Thu Apr 9 23:42:13 2020(r359759) @@ -732,6 +732,7 @@ lockmgr_xlock_hard(struct lock *lk, u_int flags, struc class = LOCK_CLASS(ilk); class->lc_unlock(ilk); } + STACK_PRINT(lk); panic("%s: recursing on non recursive lockmgr %p " "@ %s:%d\n", __func__, lk, file, line); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r359685 - in head: . etc lib/libc/gen share/mk share/termcap usr.bin/login usr.bin/vgrind usr.sbin/services_mkdb
On Thu, 2020-04-09 at 16:16 -0700, Rodney W. Grimes wrote: > > Well, how many FreeBSD builds have you run in the last year, Rodney, > > personally to care about 0.1s slowdown that it might have caused? We've run > > at least a 1,000 here, probably 3x more. > > That is a non technical personal attack. > > > So yes, the cost is there, the > > cost is well understood and found negligible versus the benefit of having a > > slightly more extensible build system that is slightly easier to understand > > and integrate into bigger projects. > > I do not see how moving 5 values adds any extensibility or any ease of use, > or intergratability. It added an ease of editing the values to one file, > values that *should not be edited inplace*. > > If these values need overridden it should always be done on the make command > line, especially by projects external to FreeBSD. Your "extensible build > system" > is reaching into internal project build infustructure in a non-supportable way > if it requires this types of change. > You did not look at the changes carefully enough. This doesn't just gather some values into one place, it replaces instances of hard-coded tool names with variables. To do so, those variables need to be defined somewhere. A new src.tools.mk is a good sensible place for that. Now that you have them all in once place, it doesn't make sense to still have duplicate definitions in other places, everything should refer to the one new source. You have focused in on that last sentence and started complaining about it as if it were the entire change. It's just a minor cleanup which is the natural thing to do given the rest of the change. And the rest of the change is useful in exactly the ways Maxim is saying (I say that as someone who also maintains a large proprietary source base that uses the freebsd build infrastructure). -- Ian ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359758 - head/lib/libc/sys
Author: kib Date: Thu Apr 9 23:22:35 2020 New Revision: 359758 URL: https://svnweb.freebsd.org/changeset/base/359758 Log: libc: Fix possible overflow in binuptime(). This is an application of the kernel overflow fix from r357948 to userspace, based on the algorithm developed by Bruce Evans. To keep the ABI of the vds_timekeep stable, instead of adding the large_delta member, MSB of both multipliers are added to quickly estimate the overflow. Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/lib/libc/sys/__vdso_gettimeofday.c Modified: head/lib/libc/sys/__vdso_gettimeofday.c == --- head/lib/libc/sys/__vdso_gettimeofday.c Thu Apr 9 23:11:19 2020 (r359757) +++ head/lib/libc/sys/__vdso_gettimeofday.c Thu Apr 9 23:22:35 2020 (r359758) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include "libc_private.h" @@ -62,7 +63,8 @@ binuptime(struct bintime *bt, struct vdso_timekeep *tk { struct vdso_timehands *th; uint32_t curr, gen; - u_int delta; + uint64_t scale, x; + u_int delta, scale_bits; int error; do { @@ -78,7 +80,19 @@ binuptime(struct bintime *bt, struct vdso_timekeep *tk continue; if (error != 0) return (error); - bintime_addx(bt, th->th_scale * delta); + scale = th->th_scale; +#ifdef _LP64 + scale_bits = ffsl(scale); +#else + scale_bits = ffsll(scale); +#endif + if (__predict_false(scale_bits + fls(delta) > 63)) { + x = (scale >> 32) * delta; + scale &= 0x; + bt->sec += x >> 32; + bintime_addx(bt, x << 32); + } + bintime_addx(bt, scale * delta); if (abs) bintime_add(bt, &th->th_boottime); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r359685 - in head: . etc lib/libc/gen share/mk share/termcap usr.bin/login usr.bin/vgrind usr.sbin/services_mkdb
> Well, how many FreeBSD builds have you run in the last year, Rodney, > personally to care about 0.1s slowdown that it might have caused? We've run > at least a 1,000 here, probably 3x more. That is a non technical personal attack. > So yes, the cost is there, the > cost is well understood and found negligible versus the benefit of having a > slightly more extensible build system that is slightly easier to understand > and integrate into bigger projects. I do not see how moving 5 values adds any extensibility or any ease of use, or intergratability. It added an ease of editing the values to one file, values that *should not be edited inplace*. If these values need overridden it should always be done on the make command line, especially by projects external to FreeBSD. Your "extensible build system" is reaching into internal project build infustructure in a non-supportable way if it requires this types of change. > > -Max > > On Wed, Apr 8, 2020 at 5:12 PM Rodney W. Grimes > wrote: > > > > On Tue, Apr 7, 2020 at 3:37 AM Rodney W. Grimes < > > free...@gndrsh.dnsmgr.net> > > > wrote: > > > > > > > > Author: sobomax > > > > > Date: Tue Apr 7 02:46:22 2020 > > > > > New Revision: 359685 > > > > > URL: https://svnweb.freebsd.org/changeset/base/359685 > > > > > > > > > > Log: > > > > > Normalize deployment tools usage and definitions by putting into > > one > > > > place > > > > > instead of sprinkling them out over many disjoint files. This is a > > > > follow-up > > > > > to achieve the same goal in an incomplete rev.348521. > > > > > > > > I have concerns that this factoring out of 5 values that have not > > changed > > > > in 25 years is a pessimization, it is one more file that make has to > > > > open on each invocation. > > > > > > > > > > Well, luckily enough the cost of opening a file has been exponentially > > > declining over those 25 years, so we are probably many-orders of > > magnitude > > > faster than we used to be back in 1995. Or so I've heard. :) > > > > I believe we are pretty much just on par and no more than 1 > > order of magnitude on time completion of make world. > > > > > > > > Having those variables defined in a centralized manner allows us here for > > > example to convert the result of what would be > > > installworld/installkernel/distribution action into a self-extracting > > > archive (optionally signed) with automatically generated script, which > > does > > > the action in question. As such, we can now build in a completely > > sandboxed > > > environment with 0 privileges (potentially even on something completely > > > alien like GNU/Linux) and then deploy it to as many systems as we need or > > > use to create VM images / Jails. > > > > > > > > https://github.com/sobomax/sysmaker/blob/master/makeargs/distribution.sub > > > > > https://github.com/sobomax/sysmaker/blob/master/makeargs/installkernel.sub > > > > > https://github.com/sobomax/sysmaker/blob/master/makeargs/installworld.sub > > > > I do not see anything in that set of files that requires this change, > > am I missing something? > > > > All of the existing values should of been overridable from the make > > command line invocation, and it does not mater if they are in 1 > > file or 50 files. > > > > > I have very few reasons to believe that our needs to be unique in this, I > > > am pretty sure others will find some interesting use for this as well > > (e.g. > > > signing binaries being installed, etc). > > > > I do not see that your needs require this change. > > > > > > > > -Max > > > > -- > > Rod Grimes > > rgri...@freebsd.org > > > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359757 - head/sys/fs/nfs
Author: rmacklem Date: Thu Apr 9 23:11:19 2020 New Revision: 359757 URL: https://svnweb.freebsd.org/changeset/base/359757 Log: Replace mbuf macros with the code they would generate in the NFS code. When the code was ported to Mac OS/X, mbuf handling functions were converted to using the Mac OS/X accessor functions. For FreeBSD, they are a simple set of macros in sys/fs/nfs/nfskpiport.h. Since porting to Mac OS/X is no longer a consideration, replacement of these macros with the code generated by them makes the code more readable. When support for external page mbufs is added as needed by the KERN_TLS, the patch becomes simpler if done without the macros. This patch should not result in any semantic change. This conversion will be committed one file at a time. Modified: head/sys/fs/nfs/nfs_commonsubs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c == --- head/sys/fs/nfs/nfs_commonsubs.cThu Apr 9 21:24:17 2020 (r359756) +++ head/sys/fs/nfs/nfs_commonsubs.cThu Apr 9 23:11:19 2020 (r359757) @@ -360,9 +360,9 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, NFSMCLGET(mb, M_WAITOK); else NFSMGET(mb); - mbuf_setlen(mb, 0); + mb->m_len = 0; nd->nd_mreq = nd->nd_mb = mb; - nd->nd_bpos = NFSMTOD(mb, caddr_t); + nd->nd_bpos = mtod(mb, caddr_t); /* * And fill the first file handle into the request. @@ -617,7 +617,7 @@ nfsm_mbufuio(struct nfsrv_descript *nd, struct uio *ui mp = nd->nd_md; mbufcp = nd->nd_dpos; - len = NFSMTOD(mp, caddr_t) + mbuf_len(mp) - mbufcp; + len = mtod(mp, caddr_t) + mp->m_len - mbufcp; rem = NFSM_RNDUP(siz) - siz; while (siz > 0) { if (uiop->uio_iovcnt <= 0 || uiop->uio_iov == NULL) { @@ -631,13 +631,13 @@ nfsm_mbufuio(struct nfsrv_descript *nd, struct uio *ui uiosiz = left; while (left > 0) { while (len == 0) { - mp = mbuf_next(mp); + mp = mp->m_next; if (mp == NULL) { error = EBADRPC; goto out; } - mbufcp = NFSMTOD(mp, caddr_t); - len = mbuf_len(mp); + mbufcp = mtod(mp, caddr_t); + len = mp->m_len; KASSERT(len >= 0, ("len %d, corrupted mbuf?", len)); } @@ -701,18 +701,18 @@ nfsm_dissct(struct nfsrv_descript *nd, int siz, int ho caddr_t retp; retp = NULL; - left = NFSMTOD(nd->nd_md, caddr_t) + mbuf_len(nd->nd_md) - nd->nd_dpos; + left = mtod(nd->nd_md, caddr_t) + nd->nd_md->m_len - nd->nd_dpos; while (left == 0) { - nd->nd_md = mbuf_next(nd->nd_md); + nd->nd_md = nd->nd_md->m_next; if (nd->nd_md == NULL) return (retp); - left = mbuf_len(nd->nd_md); - nd->nd_dpos = NFSMTOD(nd->nd_md, caddr_t); + left = nd->nd_md->m_len; + nd->nd_dpos = mtod(nd->nd_md, caddr_t); } if (left >= siz) { retp = nd->nd_dpos; nd->nd_dpos += siz; - } else if (mbuf_next(nd->nd_md) == NULL) { + } else if (nd->nd_md->m_next == NULL) { return (retp); } else if (siz > ncl_mbuf_mhlen) { panic("nfs S too big"); @@ -720,33 +720,33 @@ nfsm_dissct(struct nfsrv_descript *nd, int siz, int ho MGET(mp2, MT_DATA, how); if (mp2 == NULL) return (NULL); - mbuf_setnext(mp2, mbuf_next(nd->nd_md)); - mbuf_setnext(nd->nd_md, mp2); - mbuf_setlen(nd->nd_md, mbuf_len(nd->nd_md) - left); + mp2->m_next = nd->nd_md->m_next; + nd->nd_md->m_next = mp2; + nd->nd_md->m_len -= left; nd->nd_md = mp2; - retp = p = NFSMTOD(mp2, caddr_t); + retp = p = mtod(mp2, caddr_t); NFSBCOPY(nd->nd_dpos, p, left); /* Copy what was left */ siz2 = siz - left; p += left; - mp2 = mbuf_next(mp2); + mp2 = mp2->m_next; /* Loop around copying up the siz2 bytes */ while (siz2 > 0) { if (mp2 == NULL) return (NULL); - xfer = (siz2 > mbuf_len(mp2)) ? mbuf_len(mp2) : siz2; + xfer = (siz2 > mp2->m_len) ? mp2->m_len : siz2; if (xfer > 0) { -
svn commit: r359756 - head/sys/dev/mii
Author: jhibbits Date: Thu Apr 9 21:24:17 2020 New Revision: 359756 URL: https://svnweb.freebsd.org/changeset/base/359756 Log: Add support for BCM54618SE PHY MFC after:3 days Sponsored by: Juniper Networks, Inc Modified: head/sys/dev/mii/brgphy.c head/sys/dev/mii/miidevs Modified: head/sys/dev/mii/brgphy.c == --- head/sys/dev/mii/brgphy.c Thu Apr 9 20:49:01 2020(r359755) +++ head/sys/dev/mii/brgphy.c Thu Apr 9 21:24:17 2020(r359756) @@ -152,6 +152,7 @@ static const struct mii_phydesc brgphys[] = { #ifdef notyet /* better handled by ukphy(4) until WARs are implemented */ MII_PHY_DESC(BROADCOM2, BCM5785), #endif + MII_PHY_DESC(BROADCOM3, BCM54618SE), MII_PHY_DESC(BROADCOM3, BCM5717C), MII_PHY_DESC(BROADCOM3, BCM5719C), MII_PHY_DESC(BROADCOM3, BCM5720C), Modified: head/sys/dev/mii/miidevs == --- head/sys/dev/mii/miidevsThu Apr 9 20:49:01 2020(r359755) +++ head/sys/dev/mii/miidevsThu Apr 9 21:24:17 2020(r359756) @@ -190,6 +190,7 @@ model BROADCOM2 BCM5784 0x003a BCM5784 10/100/1000bas model BROADCOM2 BCM5709C 0x003c BCM5709 10/100/1000baseT PHY model BROADCOM2 BCM57610x003d BCM5761 10/100/1000baseT PHY model BROADCOM2 BCM5709S 0x003f BCM5709S/5720S 1000/2500baseSX PHY +model BROADCOM3 BCM54618SE 0x000d BCM54618SE 10/100/1000BASE-T PHY model BROADCOM3 BCM57780 0x0019 BCM57780 1000BASE-T media interface model BROADCOM3 BCM5717C 0x0020 BCM5717C 1000BASE-T media interface model BROADCOM3 BCM5719C 0x0022 BCM5719C 1000BASE-T media interface ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359755 - in stable: 11/contrib/binutils/gas 12/contrib/binutils/gas
Author: kevans Date: Thu Apr 9 20:49:01 2020 New Revision: 359755 URL: https://svnweb.freebsd.org/changeset/base/359755 Log: gas: mark dwarf2_loc_mark_labels as extern Compiling with -fno-common complains as this header's included in multiple compilation units. In fact, the proper definition of dwarf2_loc_mark_labels already exists in dwarf2dbg.c, so simply mark this declaration with extern. Modified: stable/11/contrib/binutils/gas/dwarf2dbg.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/binutils/gas/dwarf2dbg.h Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/binutils/gas/dwarf2dbg.h == --- stable/11/contrib/binutils/gas/dwarf2dbg.h Thu Apr 9 20:38:36 2020 (r359754) +++ stable/11/contrib/binutils/gas/dwarf2dbg.h Thu Apr 9 20:49:01 2020 (r359755) @@ -78,7 +78,7 @@ extern void dwarf2_emit_label (symbolS *); /* True when we're supposed to set the basic block mark whenever a label is seen. Unless the target is doing Something Weird, just call dwarf2_emit_label. */ -bfd_boolean dwarf2_loc_mark_labels; +extern bfd_boolean dwarf2_loc_mark_labels; extern void dwarf2_finish (void); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359755 - in stable: 11/contrib/binutils/gas 12/contrib/binutils/gas
Author: kevans Date: Thu Apr 9 20:49:01 2020 New Revision: 359755 URL: https://svnweb.freebsd.org/changeset/base/359755 Log: gas: mark dwarf2_loc_mark_labels as extern Compiling with -fno-common complains as this header's included in multiple compilation units. In fact, the proper definition of dwarf2_loc_mark_labels already exists in dwarf2dbg.c, so simply mark this declaration with extern. Modified: stable/12/contrib/binutils/gas/dwarf2dbg.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/binutils/gas/dwarf2dbg.h Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/binutils/gas/dwarf2dbg.h == --- stable/12/contrib/binutils/gas/dwarf2dbg.h Thu Apr 9 20:38:36 2020 (r359754) +++ stable/12/contrib/binutils/gas/dwarf2dbg.h Thu Apr 9 20:49:01 2020 (r359755) @@ -78,7 +78,7 @@ extern void dwarf2_emit_label (symbolS *); /* True when we're supposed to set the basic block mark whenever a label is seen. Unless the target is doing Something Weird, just call dwarf2_emit_label. */ -bfd_boolean dwarf2_loc_mark_labels; +extern bfd_boolean dwarf2_loc_mark_labels; extern void dwarf2_finish (void); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359754 - in stable/11: bin/sh cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool contrib/bmake contrib/ipfilter contrib/ipfilter/tools contrib/ntp/include contrib/ntp/...
Author: kevans Date: Thu Apr 9 20:38:36 2020 New Revision: 359754 URL: https://svnweb.freebsd.org/changeset/base/359754 Log: MFC -fno-common fixes: r359389, r359394, r359397-r359399, r359403-r359404, r359406, r359413-r359416, r359425, r359427, r359432-r359433, r359443, r359675-r359677 Note: this is not necessarily a complete fix to get these programs to build with -fno-common applied. r359389: config(8): fixes for -fno-common Move this handful of definitions into main.c, properly declare these as extern in config.h. This fixes the config(8) build with -fno-common. Unexplained in my previous commit to gas, -fno-common will become the default in GCC10 and LLVM11, so it's worth addressing these in advance. r359394: MFV r359393: tcsh: import 6974bc35a5cd This removes an extra variable definition that causes the -fno-common build to fail, which will be a new default in GCC10/LLVM11. r359397: zfs: fix -fno-common issues A similar (or identical?) fix has already landed in OpenZFS. -fno-common will become the default in GCC10/LLVM11. r359398: sh: remove duplicate el definition el is declared extern in myhistedit.h and defined in histedit.c. Remove the duplicate definition in input.c to appease the -fno-common build. -fno-common will become the default in GCC10/LLVM11. r359399: telnet: remove some duplicate definitions, mark terminaltype extern Most of these were already properly declared and defined elsewhere, this is effectively just a minor cleanup that fixes the -fno-common build. -fno-common will become the default in GCC10/LLVM11. r359403: Revert 359399: telnet -fno-common bits There was a large misfire from my local diff that I need to investigate, and this version committed did not build. r359404: Re-apply r359399: telnet -fno-common fix line and auth_level's redefinitions are just extraneous telnetd will #define extern and then include ext.h to allocate storage for all of these extern'd vars; however, two of them are actually defined in libtelnet instead. Instead of doing an #ifdef extern dance around those function pointers, just add an EXTERN macro to make it easier to differentiate by sight which ones will get allocated in globals.c and which ones are defined elsewhere. r359406: telnet: kill off remaining duplicate definition r359413: ipfilter: remove duplicate definition of 'thishost' thishost is already defined in lib/initparse.c; no need for this one. This fixes the ipfilter build with -fno-common. -fno-common will become the default in GCC10/LLVM11. r359414: iscontrol: move definition of vflag/iscsidev to iscontrol.c Mark the declaration extern as these are used elsewhere; this fixes the build with -fno-common. r359415: userboot: mark host_fsops as extern This is already defined elsewhere; mark this declaration extern to the fix the -fno-common build. r359416: systat: remove redundant definition of kd kd is already properly declared in extern.h and defined in main.c, rendering this definition useless. This fixes the -fno-common build. r359425: locate: fix -fno-common build Just a single variable declaration to extern and define elsewhere here, myctype. -fno-common will become a default in GCC10/LLVM11. r359427: fsck_ffs/fsdb: fix -fno-common build This one is also a small list: - 3x duplicate definition (ufs2_zino, returntosingle, nflag) - 5x 'needs extern', 3/5 of which are referenced in fsdb -fno-common will become the default in GCC10/LLVM11. r359432: gdb: compile with -fcommon explicitly As described in the comment, gdb relies on some of the linker magic that happens with -fcommon. I suspect the life expectancy of gdb-in-base is low enough that this isn't worth spending much time addressing, especially given the vintage. Hit it with the -fcommon hammer so that it continues to just work. r359433: bmake: fix -fno-common build debug was declared extern, but debug_file was not; correct this and define debug_file in main.c (as debug is) to fix the -fno-common build. -fno-common will become the default with GCC10/LLVM11. r359443: MFV r359442: bmake: import -fno-common fix build back from upstream sjg@ committed the local patch previously committed upstream; pull it in to vendor/ to ease any potential stress of future imports. r359675: kqueue tests: fix -fno-common build vnode_fd and kqfd are both shared among multiple CU; define them exactly once. In the case of vnode_fd, it was simply the declaration that needed correction. -fno-common will become the default in GCC10/LLVM11. r359676: ntpd: fix build with -fno-common Only a small nit here: psl should be declared extern and defined exactly once. -fno-common will become the default in GCC10/LLVM11.
svn commit: r359753 - in stable/12: bin/sh cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool contrib/bmake contrib/ipfilter contrib/ipfilter/tools contrib/ntp/include contrib/ntp/...
Author: kevans Date: Thu Apr 9 20:35:35 2020 New Revision: 359753 URL: https://svnweb.freebsd.org/changeset/base/359753 Log: MFC -fno-common fixes: r359389, r359394, r359397-r359399, r359403-r359404, r359406, r359413-r359416, r359424-r359425, r359427, r359432-r359433, r359443, r359675-r359678 Note: this is not necessarily a complete fix to get these programs to build with -fno-common applied; further work may be needed in this branch. r359389: config(8): fixes for -fno-common Move this handful of definitions into main.c, properly declare these as extern in config.h. This fixes the config(8) build with -fno-common. Unexplained in my previous commit to gas, -fno-common will become the default in GCC10 and LLVM11, so it's worth addressing these in advance. r359394: MFV r359393: tcsh: import 6974bc35a5cd This removes an extra variable definition that causes the -fno-common build to fail, which will be a new default in GCC10/LLVM11. r359397: zfs: fix -fno-common issues A similar (or identical?) fix has already landed in OpenZFS. -fno-common will become the default in GCC10/LLVM11. r359398: sh: remove duplicate el definition el is declared extern in myhistedit.h and defined in histedit.c. Remove the duplicate definition in input.c to appease the -fno-common build. -fno-common will become the default in GCC10/LLVM11. r359399: telnet: remove some duplicate definitions, mark terminaltype extern Most of these were already properly declared and defined elsewhere, this is effectively just a minor cleanup that fixes the -fno-common build. -fno-common will become the default in GCC10/LLVM11. r359403: Revert 359399: telnet -fno-common bits There was a large misfire from my local diff that I need to investigate, and this version committed did not build. r359404: Re-apply r359399: telnet -fno-common fix line and auth_level's redefinitions are just extraneous telnetd will #define extern and then include ext.h to allocate storage for all of these extern'd vars; however, two of them are actually defined in libtelnet instead. Instead of doing an #ifdef extern dance around those function pointers, just add an EXTERN macro to make it easier to differentiate by sight which ones will get allocated in globals.c and which ones are defined elsewhere. r359406: telnet: kill off remaining duplicate definition r359413: ipfilter: remove duplicate definition of 'thishost' thishost is already defined in lib/initparse.c; no need for this one. This fixes the ipfilter build with -fno-common. -fno-common will become the default in GCC10/LLVM11. r359414: iscontrol: move definition of vflag/iscsidev to iscontrol.c Mark the declaration extern as these are used elsewhere; this fixes the build with -fno-common. r359415: userboot: mark host_fsops as extern This is already defined elsewhere; mark this declaration extern to the fix the -fno-common build. r359416: systat: remove redundant definition of kd kd is already properly declared in extern.h and defined in main.c, rendering this definition useless. This fixes the -fno-common build. r359424: openssh: -fno-common fix from upstream f47d72ddad This is currently staged in vendor/ as part of the 8.0p1 import, which isn't quite ready to land. Given that this is a simple one-line fix, apply it now as the fallout will be pretty minimal. -fno-common will become the default in GCC10/LLVM11. r359425: locate: fix -fno-common build Just a single variable declaration to extern and define elsewhere here, myctype. -fno-common will become a default in GCC10/LLVM11. r359427: fsck_ffs/fsdb: fix -fno-common build This one is also a small list: - 3x duplicate definition (ufs2_zino, returntosingle, nflag) - 5x 'needs extern', 3/5 of which are referenced in fsdb -fno-common will become the default in GCC10/LLVM11. r359432: gdb: compile with -fcommon explicitly As described in the comment, gdb relies on some of the linker magic that happens with -fcommon. I suspect the life expectancy of gdb-in-base is low enough that this isn't worth spending much time addressing, especially given the vintage. Hit it with the -fcommon hammer so that it continues to just work. r359433: bmake: fix -fno-common build debug was declared extern, but debug_file was not; correct this and define debug_file in main.c (as debug is) to fix the -fno-common build. -fno-common will become the default with GCC10/LLVM11. r359443: MFV r359442: bmake: import -fno-common fix build back from upstream sjg@ committed the local patch previously committed upstream; pull it in to vendor/ to ease any potential stress of future imports. r359675: kqueue tests: fix -fno-common build vnode_fd and kqfd are both shared among multipl
Re: svn commit: r359685 - in head: . etc lib/libc/gen share/mk share/termcap usr.bin/login usr.bin/vgrind usr.sbin/services_mkdb
Well, how many FreeBSD builds have you run in the last year, Rodney, personally to care about 0.1s slowdown that it might have caused? We've run at least a 1,000 here, probably 3x more. So yes, the cost is there, the cost is well understood and found negligible versus the benefit of having a slightly more extensible build system that is slightly easier to understand and integrate into bigger projects. -Max On Wed, Apr 8, 2020 at 5:12 PM Rodney W. Grimes wrote: > > On Tue, Apr 7, 2020 at 3:37 AM Rodney W. Grimes < > free...@gndrsh.dnsmgr.net> > > wrote: > > > > > > Author: sobomax > > > > Date: Tue Apr 7 02:46:22 2020 > > > > New Revision: 359685 > > > > URL: https://svnweb.freebsd.org/changeset/base/359685 > > > > > > > > Log: > > > > Normalize deployment tools usage and definitions by putting into > one > > > place > > > > instead of sprinkling them out over many disjoint files. This is a > > > follow-up > > > > to achieve the same goal in an incomplete rev.348521. > > > > > > I have concerns that this factoring out of 5 values that have not > changed > > > in 25 years is a pessimization, it is one more file that make has to > > > open on each invocation. > > > > > > > Well, luckily enough the cost of opening a file has been exponentially > > declining over those 25 years, so we are probably many-orders of > magnitude > > faster than we used to be back in 1995. Or so I've heard. :) > > I believe we are pretty much just on par and no more than 1 > order of magnitude on time completion of make world. > > > > > Having those variables defined in a centralized manner allows us here for > > example to convert the result of what would be > > installworld/installkernel/distribution action into a self-extracting > > archive (optionally signed) with automatically generated script, which > does > > the action in question. As such, we can now build in a completely > sandboxed > > environment with 0 privileges (potentially even on something completely > > alien like GNU/Linux) and then deploy it to as many systems as we need or > > use to create VM images / Jails. > > > > > https://github.com/sobomax/sysmaker/blob/master/makeargs/distribution.sub > > > https://github.com/sobomax/sysmaker/blob/master/makeargs/installkernel.sub > > > https://github.com/sobomax/sysmaker/blob/master/makeargs/installworld.sub > > I do not see anything in that set of files that requires this change, > am I missing something? > > All of the existing values should of been overridable from the make > command line invocation, and it does not mater if they are in 1 > file or 50 files. > > > I have very few reasons to believe that our needs to be unique in this, I > > am pretty sure others will find some interesting use for this as well > (e.g. > > signing binaries being installed, etc). > > I do not see that your needs require this change. > > > > > -Max > > -- > Rod Grimes > rgri...@freebsd.org > > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359752 - head/sys/kern
Author: kib Date: Thu Apr 9 18:38:00 2020 New Revision: 359752 URL: https://svnweb.freebsd.org/changeset/base/359752 Log: Remove extra call to vfs_op_exit() from vfs_write_suspend() when VFS_SYNC() fails. The vfs_write_resume() handler already does vfs_op_exit() for us. Reported by: pho Reviewed by: mckusick Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c == --- head/sys/kern/vfs_vnops.c Thu Apr 9 18:17:07 2020(r359751) +++ head/sys/kern/vfs_vnops.c Thu Apr 9 18:38:00 2020(r359752) @@ -1902,7 +1902,7 @@ vfs_write_suspend(struct mount *mp, int flags) MNT_IUNLOCK(mp); if ((error = VFS_SYNC(mp, MNT_SUSPEND)) != 0) { vfs_write_resume(mp, 0); - vfs_op_exit(mp); + /* vfs_write_resume does vfs_op_exit() for us */ } return (error); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359751 - in stable/12/sbin/nvmecontrol: . modules/wdc
Author: dab Date: Thu Apr 9 18:17:07 2020 New Revision: 359751 URL: https://svnweb.freebsd.org/changeset/base/359751 Log: MFC r359562: Fix various Coverity-detected errors in nvmecontrol This fixes several Coverity-detected errors in nvmecontrol. While in here, a couple additional errors with shift/mask confusion that were not diagnosed by Coverity are also fixed. CIDs addressed: 1040299, 1040300, 1403972, 1403973, 1403985, 1403988, 1403990, 1404374, 1404427, 1404469, 1404510, 1404534, 1418118 CID 1403657 (resource leak of shared library handle) was marked "intentional" in the Coverity scan database. Sponsored by: Dell EMC Isilon Modified: stable/12/sbin/nvmecontrol/firmware.c stable/12/sbin/nvmecontrol/identify.c stable/12/sbin/nvmecontrol/logpage.c stable/12/sbin/nvmecontrol/modules/wdc/wdc.c stable/12/sbin/nvmecontrol/nsid.c stable/12/sbin/nvmecontrol/passthru.c stable/12/sbin/nvmecontrol/power.c stable/12/sbin/nvmecontrol/reset.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/nvmecontrol/firmware.c == --- stable/12/sbin/nvmecontrol/firmware.c Thu Apr 9 16:24:57 2020 (r359750) +++ stable/12/sbin/nvmecontrol/firmware.c Thu Apr 9 18:17:07 2020 (r359751) @@ -151,6 +151,7 @@ read_image_file(const char *path, void **buf, int32_t errx(1, "error reading '%s' (read %d bytes, requested %d bytes)", path, *size, filesize); + close(fd); } static void @@ -188,6 +189,7 @@ update_firmware(int fd, uint8_t *payload, int32_t payl resid -= size; off += size; } + free(chunk); } static int Modified: stable/12/sbin/nvmecontrol/identify.c == --- stable/12/sbin/nvmecontrol/identify.c Thu Apr 9 16:24:57 2020 (r359750) +++ stable/12/sbin/nvmecontrol/identify.c Thu Apr 9 18:17:07 2020 (r359751) @@ -94,7 +94,7 @@ print_namespace(struct nvme_namespace_data *nsdata) NVME_NS_DATA_DPC_PIT3_MASK) ? "Type 3, " : "", ((nsdata->dpc >> NVME_NS_DATA_DPC_PIT2_SHIFT) & NVME_NS_DATA_DPC_PIT2_MASK) ? "Type 2, " : "", - ((nsdata->dpc >> NVME_NS_DATA_DPC_PIT2_MASK) & + ((nsdata->dpc >> NVME_NS_DATA_DPC_PIT1_SHIFT) & NVME_NS_DATA_DPC_PIT1_MASK) ? "Type 1" : ""); printf("Data Protection Settings:"); ptype = (nsdata->dps >> NVME_NS_DATA_DPS_PIT_SHIFT) & @@ -238,7 +238,8 @@ identify(const struct cmd *f, int argc, char *argv[]) int fd; uint32_tnsid; - arg_parse(argc, argv, f); + if (arg_parse(argc, argv, f)) + return; open_dev(opt.dev, &fd, 1, 1); get_nsid(fd, &path, &nsid); Modified: stable/12/sbin/nvmecontrol/logpage.c == --- stable/12/sbin/nvmecontrol/logpage.cThu Apr 9 16:24:57 2020 (r359750) +++ stable/12/sbin/nvmecontrol/logpage.cThu Apr 9 18:17:07 2020 (r359751) @@ -570,11 +570,11 @@ print_log_sanitize_status(const struct nvme_controller printf("Unknown"); break; } - p = (ss->sstat & NVME_SS_PAGE_SSTAT_PASSES_SHIFT) >> + p = (ss->sstat >> NVME_SS_PAGE_SSTAT_PASSES_SHIFT) & NVME_SS_PAGE_SSTAT_PASSES_MASK; if (p > 0) printf(", %d passes", p); - if ((ss->sstat & NVME_SS_PAGE_SSTAT_GDE_SHIFT) >> + if ((ss->sstat >> NVME_SS_PAGE_SSTAT_GDE_SHIFT) & NVME_SS_PAGE_SSTAT_GDE_MASK) printf(", Global Data Erased"); printf("\n"); Modified: stable/12/sbin/nvmecontrol/modules/wdc/wdc.c == --- stable/12/sbin/nvmecontrol/modules/wdc/wdc.cThu Apr 9 16:24:57 2020(r359750) +++ stable/12/sbin/nvmecontrol/modules/wdc/wdc.cThu Apr 9 18:17:07 2020(r359751) @@ -275,7 +275,7 @@ print_hgst_info_subpage_gen(void *buf, uint16_t subtyp wsp++; /* Flags, just ignore */ plen = *wsp++; param = 0; - for (i = 0; i < plen; i++) + for (i = 0; i < plen && wsp < esp; i++) param |= (uint64_t)*wsp++ << (i * 8); printf(" %-30s: %jd\n", kv_lookup(kv, kv_count, ptype), (uintmax_t)param); } Modified: stable/12/sbin/nvmecontrol/nsid.c == --- stable/12/sbin/nvmecontrol/nsid.c Thu Apr 9 16:24:57 2020 (r359750) +++ stable/12/sbin/nvmecontrol/nsid.c Thu Apr 9 18:17:07 2020 (r359751) @@ -70,7 +70,8 @@ gnsid(const struct cmd *f,
svn commit: r359750 - in stable: 11/share/man/man5 12/share/man/man5
Author: kevans Date: Thu Apr 9 16:24:57 2020 New Revision: 359750 URL: https://svnweb.freebsd.org/changeset/base/359750 Log: MFC (effectively) r359645: src.conf(5): re-roll after LLVM_ASSERTIONS On stable/12, this ends up including just a couple other things that src.conf(5) hadn't been regenerated for. Modified: stable/12/share/man/man5/src.conf.5 Directory Properties: stable/12/ (props changed) stable/12/contrib/llvm-project/clang/ (props changed) stable/12/contrib/llvm-project/compiler-rt/ (props changed) stable/12/contrib/llvm-project/libcxx/ (props changed) stable/12/contrib/llvm-project/libunwind/ (props changed) stable/12/contrib/llvm-project/lld/ (props changed) stable/12/contrib/llvm-project/lldb/ (props changed) stable/12/contrib/llvm-project/llvm/ (props changed) stable/12/contrib/llvm-project/openmp/ (props changed) Changes in other areas also in this revision: Modified: stable/11/share/man/man5/src.conf.5 Directory Properties: stable/11/ (props changed) Modified: stable/12/share/man/man5/src.conf.5 == --- stable/12/share/man/man5/src.conf.5 Thu Apr 9 16:02:20 2020 (r359749) +++ stable/12/share/man/man5/src.conf.5 Thu Apr 9 16:24:57 2020 (r359750) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd March 8, 2020 +.Dd April 9, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -159,6 +159,10 @@ is set explicitly) (unless .Va WITHOUT_LOADER_VERIEXEC is set explicitly) +.It Va WITH_LOADER_VERIEXEC_VECTX +(unless +.Va WITHOUT_LOADER_VERIEXEC_VECTX +is set explicitly) .It Va WITH_VERIEXEC (unless .Va WITHOUT_VERIEXEC @@ -452,9 +456,15 @@ When set, it enforces these options: .It .Va WITHOUT_KERBEROS .It +.Va WITHOUT_LDNS +.It +.Va WITHOUT_LDNS_UTILS +.It .Va WITHOUT_OPENSSH .It .Va WITHOUT_OPENSSL +.It +.Va WITHOUT_UNBOUND .El .Pp When set, these options are also in effect: @@ -1040,6 +1050,8 @@ Set to use LLVM's LLD as the system linker, instead of .Pp This is a default setting on amd64/amd64, arm/armv7, arm64/aarch64 and i386/i386. +.It Va WITH_LLVM_ASSERTIONS +Set to enable debugging assertions in LLVM. .It Va WITHOUT_LLVM_COV Set to not build the .Xr llvm-cov 1 @@ -1251,6 +1263,10 @@ When set, these options are also in effect: (unless .Va WITHOUT_LOADER_EFI_SECUREBOOT is set explicitly) +.It Va WITH_LOADER_VERIEXEC_VECTX +(unless +.Va WITHOUT_LOADER_VERIEXEC_VECTX +is set explicitly) .El .It Va WITH_LOADER_VERIEXEC_PASS_MANIFEST Enable building @@ -1508,7 +1524,13 @@ When set, it enforces these options: .It .Va WITHOUT_KERBEROS .It +.Va WITHOUT_LDNS +.It +.Va WITHOUT_LDNS_UTILS +.It .Va WITHOUT_OPENSSH +.It +.Va WITHOUT_UNBOUND .El .Pp When set, these options are also in effect: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359750 - in stable: 11/share/man/man5 12/share/man/man5
Author: kevans Date: Thu Apr 9 16:24:57 2020 New Revision: 359750 URL: https://svnweb.freebsd.org/changeset/base/359750 Log: MFC (effectively) r359645: src.conf(5): re-roll after LLVM_ASSERTIONS On stable/12, this ends up including just a couple other things that src.conf(5) hadn't been regenerated for. Modified: stable/11/share/man/man5/src.conf.5 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/share/man/man5/src.conf.5 Directory Properties: stable/12/ (props changed) stable/12/contrib/llvm-project/clang/ (props changed) stable/12/contrib/llvm-project/compiler-rt/ (props changed) stable/12/contrib/llvm-project/libcxx/ (props changed) stable/12/contrib/llvm-project/libunwind/ (props changed) stable/12/contrib/llvm-project/lld/ (props changed) stable/12/contrib/llvm-project/lldb/ (props changed) stable/12/contrib/llvm-project/llvm/ (props changed) stable/12/contrib/llvm-project/openmp/ (props changed) Modified: stable/11/share/man/man5/src.conf.5 == --- stable/11/share/man/man5/src.conf.5 Thu Apr 9 16:02:20 2020 (r359749) +++ stable/11/share/man/man5/src.conf.5 Thu Apr 9 16:24:57 2020 (r359750) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd October 28, 2019 +.Dd April 9, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -991,6 +991,8 @@ Set to use LLVM's LLD as the system linker, instead of .Pp This is a default setting on arm64/aarch64. +.It Va WITH_LLVM_ASSERTIONS +Set to enable debugging assertions in LLVM. .It Va WITHOUT_LLVM_COV Set to not build the .Xr llvm-cov 1 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359749 - in stable: 11/contrib/openbsm/bin/auditreduce 12/contrib/openbsm/bin/auditreduce
Author: kevans Date: Thu Apr 9 16:02:20 2020 New Revision: 359749 URL: https://svnweb.freebsd.org/changeset/base/359749 Log: MFV r359401: OpenBSM: import ee79d73e8df5: auditreduce: add a zone filter This allows one to select audit records that match a -z zone glob. Modified: stable/12/contrib/openbsm/bin/auditreduce/auditreduce.1 stable/12/contrib/openbsm/bin/auditreduce/auditreduce.c stable/12/contrib/openbsm/bin/auditreduce/auditreduce.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/openbsm/bin/auditreduce/auditreduce.1 stable/11/contrib/openbsm/bin/auditreduce/auditreduce.c stable/11/contrib/openbsm/bin/auditreduce/auditreduce.h Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/openbsm/bin/auditreduce/auditreduce.1 == --- stable/12/contrib/openbsm/bin/auditreduce/auditreduce.1 Thu Apr 9 15:58:06 2020(r359748) +++ stable/12/contrib/openbsm/bin/auditreduce/auditreduce.1 Thu Apr 9 16:02:20 2020(r359749) @@ -25,7 +25,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 24, 2004 +.Dd February 20, 2020 .Dt AUDITREDUCE 1 .Os .Sh NAME @@ -47,6 +47,7 @@ .Op Fl r Ar ruid .Op Fl u Ar auid .Op Fl v +.Op Fl z Ar zone .Op Ar .Sh DESCRIPTION The @@ -129,6 +130,10 @@ Select records with the given real user ID or name. Select records with the given audit ID. .It Fl v Invert sense of matching, to select records that do not match. +.It Fl z Ar zone +Select records from the given zone(s). +.Ar zone +is a glob for zones to match. .El .Sh EXAMPLES To select all records associated with effective user ID root from the audit Modified: stable/12/contrib/openbsm/bin/auditreduce/auditreduce.c == --- stable/12/contrib/openbsm/bin/auditreduce/auditreduce.c Thu Apr 9 15:58:06 2020(r359748) +++ stable/12/contrib/openbsm/bin/auditreduce/auditreduce.c Thu Apr 9 16:02:20 2020(r359749) @@ -62,6 +62,7 @@ #include #include +#include #include #include #include @@ -94,6 +95,7 @@ static int p_egid;/* Effective group id. */ static int p_rgid;/* Real group id. */ static int p_ruid;/* Real user id. */ static int p_subid; /* Subject id. */ +static const char *p_zone;/* Zone. */ /* * Maintain a dynamically sized array of events for -m @@ -114,6 +116,8 @@ static char *p_sockobj = NULL; static uint32_t opttochk = 0; +static int select_zone(const char *zone, uint32_t *optchkd); + static void parse_regexp(char *re_string) { @@ -186,6 +190,7 @@ usage(const char *msg) fprintf(stderr, "\t-r : real user\n"); fprintf(stderr, "\t-u : audit user\n"); fprintf(stderr, "\t-v : select non-matching records\n"); + fprintf(stderr, "\t-z : zone name\n"); exit(EX_USAGE); } @@ -493,6 +498,21 @@ select_subj32(tokenstr_t tok, uint32_t *optchkd) } /* + * Check if the given zone matches the selection criteria. + */ +static int +select_zone(const char *zone, uint32_t *optchkd) +{ + + SETOPT((*optchkd), OPT_z); + if (ISOPTSET(opttochk, OPT_z) && p_zone != NULL) { + if (fnmatch(p_zone, zone, FNM_PATHNAME) != 0) + return (0); + } + return (1); +} + +/* * Read each record from the audit trail. Check if it is selected after * passing through each of the options */ @@ -559,6 +579,10 @@ select_records(FILE *fp) tok_hdr32_copy, &optchkd); break; + case AUT_ZONENAME: + selected = select_zone(tok.tt.zonename.zonename, &optchkd); + break; + default: break; } @@ -629,7 +653,7 @@ main(int argc, char **argv) converr = NULL; - while ((ch = getopt(argc, argv, "Aa:b:c:d:e:f:g:j:m:o:r:u:v")) != -1) { + while ((ch = getopt(argc, argv, "Aa:b:c:d:e:f:g:j:m:o:r:u:vz:")) != -1) { switch(ch) { case 'A': SETOPT(opttochk, OPT_A); @@ -781,6 +805,11 @@ main(int argc, char **argv) case 'v': SETOPT(opttochk, OPT_v); + break; + + case 'z': + p_zone = optarg; + SETOPT(opttochk, OPT_z); break; case '?': Modified: stable/12/contrib/openbsm/bin/auditreduce/auditreduce.h == --- stable/12/contri
svn commit: r359749 - in stable: 11/contrib/openbsm/bin/auditreduce 12/contrib/openbsm/bin/auditreduce
Author: kevans Date: Thu Apr 9 16:02:20 2020 New Revision: 359749 URL: https://svnweb.freebsd.org/changeset/base/359749 Log: MFV r359401: OpenBSM: import ee79d73e8df5: auditreduce: add a zone filter This allows one to select audit records that match a -z zone glob. Modified: stable/11/contrib/openbsm/bin/auditreduce/auditreduce.1 stable/11/contrib/openbsm/bin/auditreduce/auditreduce.c stable/11/contrib/openbsm/bin/auditreduce/auditreduce.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/openbsm/bin/auditreduce/auditreduce.1 stable/12/contrib/openbsm/bin/auditreduce/auditreduce.c stable/12/contrib/openbsm/bin/auditreduce/auditreduce.h Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/openbsm/bin/auditreduce/auditreduce.1 == --- stable/11/contrib/openbsm/bin/auditreduce/auditreduce.1 Thu Apr 9 15:58:06 2020(r359748) +++ stable/11/contrib/openbsm/bin/auditreduce/auditreduce.1 Thu Apr 9 16:02:20 2020(r359749) @@ -25,7 +25,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 24, 2004 +.Dd February 20, 2020 .Dt AUDITREDUCE 1 .Os .Sh NAME @@ -47,6 +47,7 @@ .Op Fl r Ar ruid .Op Fl u Ar auid .Op Fl v +.Op Fl z Ar zone .Op Ar .Sh DESCRIPTION The @@ -129,6 +130,10 @@ Select records with the given real user ID or name. Select records with the given audit ID. .It Fl v Invert sense of matching, to select records that do not match. +.It Fl z Ar zone +Select records from the given zone(s). +.Ar zone +is a glob for zones to match. .El .Sh EXAMPLES To select all records associated with effective user ID root from the audit Modified: stable/11/contrib/openbsm/bin/auditreduce/auditreduce.c == --- stable/11/contrib/openbsm/bin/auditreduce/auditreduce.c Thu Apr 9 15:58:06 2020(r359748) +++ stable/11/contrib/openbsm/bin/auditreduce/auditreduce.c Thu Apr 9 16:02:20 2020(r359749) @@ -51,6 +51,7 @@ #include #include +#include #include #include #include @@ -83,6 +84,7 @@ static int p_egid;/* Effective group id. */ static int p_rgid;/* Real group id. */ static int p_ruid;/* Real user id. */ static int p_subid; /* Subject id. */ +static const char *p_zone;/* Zone. */ /* * Maintain a dynamically sized array of events for -m @@ -103,6 +105,8 @@ static char *p_sockobj = NULL; static uint32_t opttochk = 0; +static int select_zone(const char *zone, uint32_t *optchkd); + static void parse_regexp(char *re_string) { @@ -175,6 +179,7 @@ usage(const char *msg) fprintf(stderr, "\t-r : real user\n"); fprintf(stderr, "\t-u : audit user\n"); fprintf(stderr, "\t-v : select non-matching records\n"); + fprintf(stderr, "\t-z : zone name\n"); exit(EX_USAGE); } @@ -482,6 +487,21 @@ select_subj32(tokenstr_t tok, uint32_t *optchkd) } /* + * Check if the given zone matches the selection criteria. + */ +static int +select_zone(const char *zone, uint32_t *optchkd) +{ + + SETOPT((*optchkd), OPT_z); + if (ISOPTSET(opttochk, OPT_z) && p_zone != NULL) { + if (fnmatch(p_zone, zone, FNM_PATHNAME) != 0) + return (0); + } + return (1); +} + +/* * Read each record from the audit trail. Check if it is selected after * passing through each of the options */ @@ -548,6 +568,10 @@ select_records(FILE *fp) tok_hdr32_copy, &optchkd); break; + case AUT_ZONENAME: + selected = select_zone(tok.tt.zonename.zonename, &optchkd); + break; + default: break; } @@ -614,7 +638,7 @@ main(int argc, char **argv) converr = NULL; - while ((ch = getopt(argc, argv, "Aa:b:c:d:e:f:g:j:m:o:r:u:v")) != -1) { + while ((ch = getopt(argc, argv, "Aa:b:c:d:e:f:g:j:m:o:r:u:vz:")) != -1) { switch(ch) { case 'A': SETOPT(opttochk, OPT_A); @@ -766,6 +790,11 @@ main(int argc, char **argv) case 'v': SETOPT(opttochk, OPT_v); + break; + + case 'z': + p_zone = optarg; + SETOPT(opttochk, OPT_z); break; case '?': Modified: stable/11/contrib/openbsm/bin/auditreduce/auditreduce.h == --- stable/11/contri
svn commit: r359748 - in stable: 11/lib/clang 11/share/mk 11/tools/build/options 12/lib/clang 12/share/mk 12/tools/build/options
Author: kevans Date: Thu Apr 9 15:58:06 2020 New Revision: 359748 URL: https://svnweb.freebsd.org/changeset/base/359748 Log: MFC r359644: llvm: add a build knob for enabling assertions For head/, this will remain eternally default-on to maintain the status quo. For stable/ branches, it should be flipped to default-off to maintain the status quo. There's value in being able to flip it one way or the other easily on head or stable branches, whether you want to gain some performance back on head/ (for machines there's little chance you'll actually hit an assertion) or potentially diagnose a problem with the version of llvm on an older branch. Currently, stable branches get the CFLAGS+= -ndebug line uncommented; going forward, they will instead have the default of LLVM_ASSERTIONS flipped. [MFC note: that last comment just happened for these two branches] Added: stable/11/tools/build/options/WITHOUT_LLVM_ASSERTIONS - copied unchanged from r359644, head/tools/build/options/WITHOUT_LLVM_ASSERTIONS stable/11/tools/build/options/WITH_LLVM_ASSERTIONS - copied unchanged from r359644, head/tools/build/options/WITH_LLVM_ASSERTIONS Modified: stable/11/lib/clang/llvm.build.mk stable/11/share/mk/src.opts.mk Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Added: stable/12/tools/build/options/WITHOUT_LLVM_ASSERTIONS - copied unchanged from r359644, head/tools/build/options/WITHOUT_LLVM_ASSERTIONS stable/12/tools/build/options/WITH_LLVM_ASSERTIONS - copied unchanged from r359644, head/tools/build/options/WITH_LLVM_ASSERTIONS Modified: stable/12/lib/clang/llvm.build.mk stable/12/share/mk/src.opts.mk Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/clang/llvm.build.mk == --- stable/11/lib/clang/llvm.build.mk Thu Apr 9 15:33:13 2020 (r359747) +++ stable/11/lib/clang/llvm.build.mk Thu Apr 9 15:58:06 2020 (r359748) @@ -17,7 +17,9 @@ CFLAGS+= -I${LLVM_SRCS}/include CFLAGS+= -DLLVM_BUILD_GLOBAL_ISEL CFLAGS+= -D__STDC_LIMIT_MACROS CFLAGS+= -D__STDC_CONSTANT_MACROS +.if ${MK_LLVM_ASSERTIONS} == "no" CFLAGS+= -DNDEBUG +.endif TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} Modified: stable/11/share/mk/src.opts.mk == --- stable/11/share/mk/src.opts.mk Thu Apr 9 15:33:13 2020 (r359747) +++ stable/11/share/mk/src.opts.mk Thu Apr 9 15:58:06 2020 (r359748) @@ -197,6 +197,7 @@ __DEFAULT_NO_OPTIONS = \ HESIOD \ LIBSOFT \ LINT \ +LLVM_ASSERTIONS \ LOADER_FIREWIRE \ LOADER_FORCE_LE \ LOADER_VERBOSE \ Copied: stable/11/tools/build/options/WITHOUT_LLVM_ASSERTIONS (from r359644, head/tools/build/options/WITHOUT_LLVM_ASSERTIONS) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITHOUT_LLVM_ASSERTIONS Thu Apr 9 15:58:06 2020(r359748, copy of r359644, head/tools/build/options/WITHOUT_LLVM_ASSERTIONS) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to disable debugging assertions in LLVM. Copied: stable/11/tools/build/options/WITH_LLVM_ASSERTIONS (from r359644, head/tools/build/options/WITH_LLVM_ASSERTIONS) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITH_LLVM_ASSERTIONS Thu Apr 9 15:58:06 2020(r359748, copy of r359644, head/tools/build/options/WITH_LLVM_ASSERTIONS) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to enable debugging assertions in LLVM. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359748 - in stable: 11/lib/clang 11/share/mk 11/tools/build/options 12/lib/clang 12/share/mk 12/tools/build/options
Author: kevans Date: Thu Apr 9 15:58:06 2020 New Revision: 359748 URL: https://svnweb.freebsd.org/changeset/base/359748 Log: MFC r359644: llvm: add a build knob for enabling assertions For head/, this will remain eternally default-on to maintain the status quo. For stable/ branches, it should be flipped to default-off to maintain the status quo. There's value in being able to flip it one way or the other easily on head or stable branches, whether you want to gain some performance back on head/ (for machines there's little chance you'll actually hit an assertion) or potentially diagnose a problem with the version of llvm on an older branch. Currently, stable branches get the CFLAGS+= -ndebug line uncommented; going forward, they will instead have the default of LLVM_ASSERTIONS flipped. [MFC note: that last comment just happened for these two branches] Added: stable/12/tools/build/options/WITHOUT_LLVM_ASSERTIONS - copied unchanged from r359644, head/tools/build/options/WITHOUT_LLVM_ASSERTIONS stable/12/tools/build/options/WITH_LLVM_ASSERTIONS - copied unchanged from r359644, head/tools/build/options/WITH_LLVM_ASSERTIONS Modified: stable/12/lib/clang/llvm.build.mk stable/12/share/mk/src.opts.mk Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/tools/build/options/WITHOUT_LLVM_ASSERTIONS - copied unchanged from r359644, head/tools/build/options/WITHOUT_LLVM_ASSERTIONS stable/11/tools/build/options/WITH_LLVM_ASSERTIONS - copied unchanged from r359644, head/tools/build/options/WITH_LLVM_ASSERTIONS Modified: stable/11/lib/clang/llvm.build.mk stable/11/share/mk/src.opts.mk Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/clang/llvm.build.mk == --- stable/12/lib/clang/llvm.build.mk Thu Apr 9 15:33:13 2020 (r359747) +++ stable/12/lib/clang/llvm.build.mk Thu Apr 9 15:58:06 2020 (r359748) @@ -22,7 +22,9 @@ CFLAGS+= -D__STDC_CONSTANT_MACROS CFLAGS+= -D__STDC_FORMAT_MACROS CFLAGS+= -D__STDC_LIMIT_MACROS CFLAGS+= -DHAVE_VCS_VERSION_INC +.if ${MK_LLVM_ASSERTIONS} == "no" CFLAGS+= -DNDEBUG +.endif TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} Modified: stable/12/share/mk/src.opts.mk == --- stable/12/share/mk/src.opts.mk Thu Apr 9 15:33:13 2020 (r359747) +++ stable/12/share/mk/src.opts.mk Thu Apr 9 15:58:06 2020 (r359748) @@ -202,6 +202,7 @@ __DEFAULT_NO_OPTIONS = \ GNU_GREP_COMPAT \ HESIOD \ LIBSOFT \ +LLVM_ASSERTIONS \ LOADER_FIREWIRE \ LOADER_FORCE_LE \ LOADER_VERIEXEC_PASS_MANIFEST \ Copied: stable/12/tools/build/options/WITHOUT_LLVM_ASSERTIONS (from r359644, head/tools/build/options/WITHOUT_LLVM_ASSERTIONS) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/tools/build/options/WITHOUT_LLVM_ASSERTIONS Thu Apr 9 15:58:06 2020(r359748, copy of r359644, head/tools/build/options/WITHOUT_LLVM_ASSERTIONS) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to disable debugging assertions in LLVM. Copied: stable/12/tools/build/options/WITH_LLVM_ASSERTIONS (from r359644, head/tools/build/options/WITH_LLVM_ASSERTIONS) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/tools/build/options/WITH_LLVM_ASSERTIONS Thu Apr 9 15:58:06 2020(r359748, copy of r359644, head/tools/build/options/WITH_LLVM_ASSERTIONS) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to enable debugging assertions in LLVM. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359747 - head/sys/sys
Author: rmacklem Date: Thu Apr 9 15:33:13 2020 New Revision: 359747 URL: https://svnweb.freebsd.org/changeset/base/359747 Log: Bump version for r359745, since it removed a field from "struct proc" and that changed the offsets of fields within it. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hThu Apr 9 15:30:21 2020(r359746) +++ head/sys/sys/param.hThu Apr 9 15:33:13 2020(r359747) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300089 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300090 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359746 - stable/11/sys/net80211
Author: eugen Date: Thu Apr 9 15:30:21 2020 New Revision: 359746 URL: https://svnweb.freebsd.org/changeset/base/359746 Log: net80211: fix another possible panic for some drivers This change fixes another case for panic missed in r343035 and seen with run(4)-based system. This is direct commit to stable/11 because r306591 could not be merged due to differences in KPI. Note that stable/12 has this problem fixed already. Modified: stable/11/sys/net80211/ieee80211_amrr.c Modified: stable/11/sys/net80211/ieee80211_amrr.c == --- stable/11/sys/net80211/ieee80211_amrr.c Thu Apr 9 14:44:46 2020 (r359745) +++ stable/11/sys/net80211/ieee80211_amrr.c Thu Apr 9 15:30:21 2020 (r359746) @@ -409,6 +409,9 @@ amrr_tx_update(const struct ieee80211vap *vap, const s struct ieee80211_amrr_node *amn = ni->ni_rctls; int txcnt = *(int *)arg1, success = *(int *)arg2, retrycnt = *(int *)arg3; + if (!amn) + return; + amn->amn_txcnt = txcnt; amn->amn_success = success; amn->amn_retrycnt = retrycnt; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359745 - in head/sys: conf fs/nfs fs/nfsclient fs/nfsserver kern modules modules/nfslock nfs nlm sys
Author: rmacklem Date: Thu Apr 9 14:44:46 2020 New Revision: 359745 URL: https://svnweb.freebsd.org/changeset/base/359745 Log: Remove the old NFS lock device driver that uses Giant. This NFS lock device driver was replaced by the kernel NLM around FreeBSD7 and has not normally been used since then. To use it, the kernel had to be built without "options NFSLOCKD" and the nfslockd.ko had to be deleted as well. Since it uses Giant and is no longer used, this patch removes it. With this device driver removed, there is now a lot of unused code in the userland rpc.lockd. That will be removed on a future commit. Reviewed by: kib Differential Revision:https://reviews.freebsd.org/D22933 Deleted: head/sys/modules/nfslock/ head/sys/nfs/nfs_lock.c Modified: head/sys/conf/files head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/kern/kern_exit.c head/sys/kern/kern_thread.c head/sys/modules/Makefile head/sys/nlm/nlm_prot_impl.c head/sys/sys/proc.h Modified: head/sys/conf/files == --- head/sys/conf/files Thu Apr 9 08:34:27 2020(r359744) +++ head/sys/conf/files Thu Apr 9 14:44:46 2020(r359745) @@ -3489,10 +3489,10 @@ fs/msdosfs/msdosfs_iconv.c optional msdosfs_iconv fs/msdosfs/msdosfs_lookup.coptional msdosfs fs/msdosfs/msdosfs_vfsops.coptional msdosfs fs/msdosfs/msdosfs_vnops.c optional msdosfs -fs/nfs/nfs_commonkrpc.coptional nfscl | nfsd -fs/nfs/nfs_commonsubs.coptional nfscl | nfsd -fs/nfs/nfs_commonport.coptional nfscl | nfsd -fs/nfs/nfs_commonacl.c optional nfscl | nfsd +fs/nfs/nfs_commonkrpc.coptional nfscl | nfslockd | nfsd +fs/nfs/nfs_commonsubs.coptional nfscl | nfslockd | nfsd +fs/nfs/nfs_commonport.coptional nfscl | nfslockd | nfsd +fs/nfs/nfs_commonacl.c optional nfscl | nfslockd | nfsd fs/nfsclient/nfs_clcomsubs.c optional nfscl fs/nfsclient/nfs_clsubs.c optional nfscl fs/nfsclient/nfs_clstate.c optional nfscl @@ -4434,8 +4434,7 @@ nfs/bootp_subr.c optional bootp nfscl nfs/krpc_subr.coptional bootp nfscl nfs/nfs_diskless.c optional nfscl nfs_root nfs/nfs_fha.c optional nfsd -nfs/nfs_lock.c optional nfscl | nfslockd | nfsd -nfs/nfs_nfssvc.c optional nfscl | nfsd +nfs/nfs_nfssvc.c optional nfscl | nfslockd | nfsd nlm/nlm_advlock.c optional nfslockd | nfsd nlm/nlm_prot_clnt.coptional nfslockd | nfsd nlm/nlm_prot_impl.coptional nfslockd | nfsd Modified: head/sys/fs/nfs/nfs_commonport.c == --- head/sys/fs/nfs/nfs_commonport.cThu Apr 9 08:34:27 2020 (r359744) +++ head/sys/fs/nfs/nfs_commonport.cThu Apr 9 14:44:46 2020 (r359745) @@ -74,6 +74,8 @@ struct nfsdevicehead nfsrv_devidhead; volatile int nfsrv_devidcnt = 0; void (*nfsd_call_servertimer)(void) = NULL; void (*ncl_call_invalcaches)(struct vnode *) = NULL; +vop_advlock_t *nfs_advlock_p = NULL; +vop_reclaim_t *nfs_reclaim_p = NULL; int nfs_pnfsio(task_fn_t *, void *); Modified: head/sys/fs/nfsclient/nfs_clport.c == --- head/sys/fs/nfsclient/nfs_clport.c Thu Apr 9 08:34:27 2020 (r359744) +++ head/sys/fs/nfsclient/nfs_clport.c Thu Apr 9 14:44:46 2020 (r359745) @@ -1412,5 +1412,4 @@ MODULE_VERSION(nfscl, 1); MODULE_DEPEND(nfscl, nfscommon, 1, 1, 1); MODULE_DEPEND(nfscl, krpc, 1, 1, 1); MODULE_DEPEND(nfscl, nfssvc, 1, 1, 1); -MODULE_DEPEND(nfscl, nfslock, 1, 1, 1); Modified: head/sys/fs/nfsclient/nfs_clvfsops.c == --- head/sys/fs/nfsclient/nfs_clvfsops.cThu Apr 9 08:34:27 2020 (r359744) +++ head/sys/fs/nfsclient/nfs_clvfsops.cThu Apr 9 14:44:46 2020 (r359745) @@ -152,7 +152,6 @@ MODULE_VERSION(nfs, 1); MODULE_DEPEND(nfs, nfscommon, 1, 1, 1); MODULE_DEPEND(nfs, krpc, 1, 1, 1); MODULE_DEPEND(nfs, nfssvc, 1, 1, 1); -MODULE_DEPEND(nfs, nfslock, 1, 1, 1); /* * This structure is now defined in sys/nfs/nfs_diskless.c so that it Modified: head/sys/fs/nfsserver/nfs_nfsdport.c == --- head/sys/fs/nfsserver/nfs_nfsdport.cThu Apr 9 08:34:27 2020 (r359744) +++ head/sys/fs/nfsserver/nfs_nfsdport.cThu Apr 9 14:44:46 2020 (r359745) @@ -6443,7 +6443,6 @@ DECLARE_MODULE(nfsd, nfsd_mod, SI_SUB_VFS, SI_ORDER_AN /* So that loader and kldload(2) can find us, wherever we are.. */ MODULE_VERSION(nfsd, 1); MOD
Re: svn commit: r359689 - head/usr.sbin/config
On Wed, Apr 8, 2020 at 1:28 PM Enji Cooper wrote: > > > > On Apr 7, 2020, at 7:14 AM, Kyle Evans wrote: > > > > Author: kevans > > Date: Tue Apr 7 14:14:59 2020 > > New Revision: 359689 > > URL: https://svnweb.freebsd.org/changeset/base/359689 > > > > Log: > > config(8): "fix" a couple of buffer overflows > > > > Recently added/changed lines in various kernel configs have caused some > > buffer overflows that went undetected. These were detected with a config > > built using -fno-common as these line buffers smashed one of our arrays, > > then further triaged with ASAN. > > > > Double the sizes; this is really not a great fix, but addresses the > > immediate need until someone rewrites config. While here, add some bounds > > checking so that we don't need to detect this by random bus errors or other > > weird failures. > > Good catch! This seems like it deserves a follow up PR in Bugzilla. I waffled a bit, then came to my senses and created one[0], as this really does need an actual fix or for someone to be motivated to rewrite config(8). [0] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245476 ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r359740 - stable/11/usr.sbin/syslogd
Author: ae Date: Thu Apr 9 07:15:27 2020 New Revision: 359740 URL: https://svnweb.freebsd.org/changeset/base/359740 Log: MFC r359327,359328: Add property-based filters for syslogd. Property-based filters allow substring and regular expressions (see re_format(7)) matching against various message attributes. Filter specification starts with '#:' or ':' followed by three comma-separated fields property, operator, "value". Value must be double-quoted. A double quote and backslash must be escaped by a blackslash. Following properties are supported as test value: o msg - body of the message received; o programname - program name sent the message; o hostname - hostname of message's originator; o source - an alias for hostname. Supported operators: o contains - true if filter value is found as a substring of property; o isequal - true if filter value is equal to property; o startswith - true if property starts with filter value; o regex - true if property matches basic regular expression defined in filter value; o ereregex - true if property matches extended regular expression defined in filter value; Operator may be prefixed by '!' to invert compare logic or by 'icase_' to make comparison function case insensitive. Submitted by: Boris N. Lytochkin Relnotes: yes Differential Revision: https://reviews.freebsd.org/D23468 Modified: stable/11/usr.sbin/syslogd/syslog.conf.5 stable/11/usr.sbin/syslogd/syslogd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/syslogd/syslog.conf.5 == --- stable/11/usr.sbin/syslogd/syslog.conf.5Thu Apr 9 07:11:59 2020 (r359739) +++ stable/11/usr.sbin/syslogd/syslog.conf.5Thu Apr 9 07:15:27 2020 (r359740) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd November 1, 2016 +.Dd March 26, 2020 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -44,9 +44,10 @@ file is the configuration file for the program. It consists of blocks of lines separated by -.Em program -and +.Em program , .Em hostname +or +.Em property-based filter specifications (separations appear alone on their lines), with each line containing two fields: the .Em selector @@ -154,14 +155,16 @@ values specified to the library routine. .Pp Each block of lines is separated from the previous block by a -.Em program -or +.Em program , .Em hostname +or +.Em property-based filter specification. A block will only log messages corresponding to the most recent -.Em program -and +.Em program , .Em hostname +and +.Em property-based filter specifications given. Thus, with a block which selects .Ql ppp @@ -236,11 +239,24 @@ As for program specifications, multiple comma-separate values may be specified for hostname specifications. .Pp A -.Em program +.Em property-based filter +specification is a line beginning with +.Ql #: or +.Ql \&: +and the following blocks will be applied only when filter value +matches given filter propertie's value. See +.Sx PROPERTY-BASED FILTERS +section for more details. +.Pp +A +.Em program , .Em hostname -specification may be reset by giving the program or hostname as -.Ql * . +or +.Em property-based filter +specification may be reset by giving +.Ql * +as an argument. .Pp See .Xr syslog 3 @@ -434,6 +450,78 @@ in this case preceding is removed and .Ql # is treated as an ordinary character. +.Sh PROPERTY-BASED FILTERS +.Em program , +.Em hostname +specifications performs exact match filtering against explicit field only. +.Em Property-based filters +feature substring and regular expressions (see +.Xr re_format 7 ) +matching against various message attributes. +Filter specification starts with +.Ql #: +or +.Ql \&: +followed by three comma-separated fields +.Em property , operator , \&"value\&" . +Value must be double-quoted. A double quote and backslash must be escaped by +a backslash. +.Pp +Following +.Em properties +are supported as test value: +.Pp +.Bl -bullet -compact +.It +.Ql msg +- body of the message received. +.It +.Ql programname +- program name sent the message +.It +.Ql hostname +- hostname of message's originator +.It +.Ql source +- an alias for hostname +.El +.Pp +Operator specifies a comparison function between +.Em propertie's + value against filter's value. +Possible operators: +.Pp +.Bl -bullet -compact +.It +.Ql contains +- true if filter value is found as a substring of +.Em property +.It +.Ql isequal +- true if filter value is equal to +.Em property +.It +.Ql startswith +- true if property starts with filter value +.It +.Ql regex +- true if property matches basic regular expression defined in filter value +.It +.Ql ereregex +- true if property matches extended regular expression defined in filter value +.El +.Pp +Operator may be prefixed by +.Pp +.Bl -bullet -
svn commit: r359739 - stable/12/usr.sbin/syslogd
Author: ae Date: Thu Apr 9 07:11:59 2020 New Revision: 359739 URL: https://svnweb.freebsd.org/changeset/base/359739 Log: MFC r359327,359328: Add property-based filters for syslogd. Property-based filters allow substring and regular expressions (see re_format(7)) matching against various message attributes. Filter specification starts with '#:' or ':' followed by three comma-separated fields property, operator, "value". Value must be double-quoted. A double quote and backslash must be escaped by a backslash. Following properties are supported as test value: o msg - body of the message received; o programname - program name sent the message; o hostname - hostname of message's originator; o source - an alias for hostname. Supported operators: o contains - true if filter value is found as a substring of property; o isequal - true if filter value is equal to property; o startswith - true if property starts with filter value; o regex - true if property matches basic regular expression defined in filter value; o ereregex - true if property matches extended regular expression defined in filter value; Operator may be prefixed by '!' to invert compare logic or by 'icase_' to make comparison function case insensitive. Submitted by: Boris N. Lytochkin Relnotes: yes Differential Revision: https://reviews.freebsd.org/D23468 Modified: stable/12/usr.sbin/syslogd/syslog.conf.5 stable/12/usr.sbin/syslogd/syslogd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/syslogd/syslog.conf.5 == --- stable/12/usr.sbin/syslogd/syslog.conf.5Thu Apr 9 06:35:50 2020 (r359738) +++ stable/12/usr.sbin/syslogd/syslog.conf.5Thu Apr 9 07:11:59 2020 (r359739) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd November 1, 2016 +.Dd March 26, 2020 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -44,9 +44,10 @@ file is the configuration file for the program. It consists of blocks of lines separated by -.Em program -and +.Em program , .Em hostname +or +.Em property-based filter specifications (separations appear alone on their lines), with each line containing two fields: the .Em selector @@ -154,14 +155,16 @@ values specified to the library routine. .Pp Each block of lines is separated from the previous block by a -.Em program -or +.Em program , .Em hostname +or +.Em property-based filter specification. A block will only log messages corresponding to the most recent -.Em program -and +.Em program , .Em hostname +and +.Em property-based filter specifications given. Thus, with a block which selects .Ql ppp @@ -236,11 +239,24 @@ As for program specifications, multiple comma-separate values may be specified for hostname specifications. .Pp A -.Em program +.Em property-based filter +specification is a line beginning with +.Ql #: or +.Ql \&: +and the following blocks will be applied only when filter value +matches given filter propertie's value. See +.Sx PROPERTY-BASED FILTERS +section for more details. +.Pp +A +.Em program , .Em hostname -specification may be reset by giving the program or hostname as -.Ql * . +or +.Em property-based filter +specification may be reset by giving +.Ql * +as an argument. .Pp See .Xr syslog 3 @@ -434,6 +450,78 @@ in this case preceding is removed and .Ql # is treated as an ordinary character. +.Sh PROPERTY-BASED FILTERS +.Em program , +.Em hostname +specifications performs exact match filtering against explicit field only. +.Em Property-based filters +feature substring and regular expressions (see +.Xr re_format 7 ) +matching against various message attributes. +Filter specification starts with +.Ql #: +or +.Ql \&: +followed by three comma-separated fields +.Em property , operator , \&"value\&" . +Value must be double-quoted. A double quote and backslash must be escaped by +a backslash. +.Pp +Following +.Em properties +are supported as test value: +.Pp +.Bl -bullet -compact +.It +.Ql msg +- body of the message received. +.It +.Ql programname +- program name sent the message +.It +.Ql hostname +- hostname of message's originator +.It +.Ql source +- an alias for hostname +.El +.Pp +Operator specifies a comparison function between +.Em propertie's + value against filter's value. +Possible operators: +.Pp +.Bl -bullet -compact +.It +.Ql contains +- true if filter value is found as a substring of +.Em property +.It +.Ql isequal +- true if filter value is equal to +.Em property +.It +.Ql startswith +- true if property starts with filter value +.It +.Ql regex +- true if property matches basic regular expression defined in filter value +.It +.Ql ereregex +- true if property matches extended regular expression defined in filter value +.El +.Pp +Operator may be prefixed by +.Pp +.Bl -bullet -c