Re: svn commit: r363178 - head/contrib/mandoc
On Tue, 14 Jul 2020 at 12:47, Rodney W. Grimes wrote: > > > Author: gbe (doc committer) > > Date: Tue Jul 14 12:02:30 2020 > > New Revision: 363178 > > URL: https://svnweb.freebsd.org/changeset/base/363178 > > > > Log: > > Revert r362809: Mention FreeBSD in the HISTORY sections of apropos(1) and > > makewhatis(8). > > Thank you This seems like a regression - information about when a certain utility (or a different implementation thereof) appeared in FreeBSD seems like useful and relevant information. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363210 - head/sys/fs/nfsclient
Author: rmacklem Date: Wed Jul 15 01:26:28 2020 New Revision: 363210 URL: https://svnweb.freebsd.org/changeset/base/363210 Log: Fix the pNFS flexible file layout client for servers with small write size. The code in nfscl_dofflayout() loops when a flexible file layout server provides a small write data limit (no extant server is known to do this). If/when it looped, it erroneously reused the "drpc" argument for the mirror worker thread, corrupting it. This patch fixes the problem by only using the calling thread after the first loop iteration. Found during testing by simulating a server with a small write size. Since no extant pNFS server is known to provide a small write size, this fix it not needed in practice at this time. MFC after:2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c == --- head/sys/fs/nfsclient/nfs_clrpcops.cWed Jul 15 00:13:15 2020 (r363209) +++ head/sys/fs/nfsclient/nfs_clrpcops.cWed Jul 15 01:26:28 2020 (r363210) @@ -6248,10 +6248,17 @@ nfscl_dofflayoutio(vnode_t vp, struct uio *uiop, int * NFSCL_DEBUG(4, "mcopy reloff=%d xfer=%jd\n", rel_off, (uintmax_t)xfer); /* -* Do last write to a mirrored DS with this +* Do the writes after the first loop iteration +* and the write for the last mirror via this * thread. +* This loop only iterates for small values +* of nfsdi_wsize, which may never occur in +* practice. However, the drpc is completely +* used by the first iteration and, as such, +* cannot be used after that. */ - if (mirror < flp->nfsfl_mirrorcnt - 1) + if (mirror < flp->nfsfl_mirrorcnt - 1 && + rel_off == 0) error = nfsio_writedsmir(vp, iomode, must_commit, stateidp, *dspp, off, xfer, fhp, m, dp->nfsdi_vers, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363209 - head
Author: jkim Date: Wed Jul 15 00:13:15 2020 New Revision: 363209 URL: https://svnweb.freebsd.org/changeset/base/363209 Log: Remove obsolete files after byacc 20200330 import (r363171). Reported by: lwhsu Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Tue Jul 14 23:59:00 2020(r363208) +++ head/ObsoleteFiles.inc Wed Jul 15 00:13:15 2020(r363209) @@ -36,6 +36,21 @@ # xargs -n1 | sort | uniq -d; # done +# 20200714: update byacc to 20200330 +OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_calc1.y +OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_demo.y +OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_destroy1.y +OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_destroy2.y +OLD_FILES+=usr/tests/usr.bin/yacc/btyacc_destroy3.y +OLD_FILES+=usr/tests/usr.bin/yacc/err_inherit1.y +OLD_FILES+=usr/tests/usr.bin/yacc/err_inherit2.y +OLD_FILES+=usr/tests/usr.bin/yacc/err_inherit3.y +OLD_FILES+=usr/tests/usr.bin/yacc/err_inherit4.y +OLD_FILES+=usr/tests/usr.bin/yacc/err_inherit5.y +OLD_FILES+=usr/tests/usr.bin/yacc/inherit0.y +OLD_FILES+=usr/tests/usr.bin/yacc/inherit1.y +OLD_FILES+=usr/tests/usr.bin/yacc/inherit2.y + # 20200706: update of sglist(9), r360574 OLD_FILES+=usr/share/man/man9/sglist_append_ext_pgs.9.gz OLD_FILES+=usr/share/man/man9/sglist_append_mb_ext_pgs.9.gz ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363208 - head/contrib/byacc/test
Author: jkim Date: Tue Jul 14 23:59:00 2020 New Revision: 363208 URL: https://svnweb.freebsd.org/changeset/base/363208 Log: Remove a redundant file from test directory to unbreak yacc regression test. It looks like the obsolete file from old regression test was accidentally re-added between version 20170709 and 20180510. Reported by: lwhsu Deleted: head/contrib/byacc/test/calc.tab.c ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363207 - head/usr.bin/top
Author: yuripv Date: Tue Jul 14 22:43:40 2020 New Revision: 363207 URL: https://svnweb.freebsd.org/changeset/base/363207 Log: top: VIS_SAFE turned out to be unsafe Unset VIS_SAFE flag as it turned out to be actually unsafe for continuos top display as it's passing through sequences resulting cursor movement (backspace, tab, carriage-return), and explicitly set VIS_TAB for the same reason. Reported by: Mark Millard , swills Tested by:Mark Millard , swills Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Tue Jul 14 22:25:06 2020(r363206) +++ head/usr.bin/top/machine.c Tue Jul 14 22:43:40 2020(r363207) @@ -1016,7 +1016,7 @@ format_next_process(struct handle * xhandle, char *(*g len = (argbuflen - (dst - argbuf) - 1) / 4; strvisx(dst, src, MIN(strlen(src), len), - VIS_NL | VIS_CSTYLE | VIS_OCTAL | VIS_SAFE); + VIS_NL | VIS_TAB | VIS_CSTYLE | VIS_OCTAL); while (*dst != '\0') dst++; if ((argbuflen - (dst - argbuf) - 1) / 4 > 0) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363206 - in head/sys: dev/coretemp dev/hwpmc x86/include
Author: freqlabs Date: Tue Jul 14 22:25:06 2020 New Revision: 363206 URL: https://svnweb.freebsd.org/changeset/base/363206 Log: hwpmc: Always set pmc_cpuid to something pmc_cpuid was uninitialized for most AMD processor families. We can still populate this string for unimplemented families. Also added a CPUID_TO_STEPPING macro and converted existing code to use it. Reviewed by: mav MFC after:2 weeks Sponsored by: iXsystems, Inc. Differential Revision:https://reviews.freebsd.org/D25673 Modified: head/sys/dev/coretemp/coretemp.c head/sys/dev/hwpmc/hwpmc_amd.c head/sys/dev/hwpmc/hwpmc_intel.c head/sys/x86/include/specialreg.h Modified: head/sys/dev/coretemp/coretemp.c == --- head/sys/dev/coretemp/coretemp.cTue Jul 14 21:56:59 2020 (r363205) +++ head/sys/dev/coretemp/coretemp.cTue Jul 14 22:25:06 2020 (r363206) @@ -166,7 +166,7 @@ coretemp_attach(device_t dev) sc->sc_dev = dev; pdev = device_get_parent(dev); cpu_model = CPUID_TO_MODEL(cpu_id); - cpu_stepping = cpu_id & CPUID_STEPPING; + cpu_stepping = CPUID_TO_STEPPING(cpu_id); /* * Some CPUs, namely the PIII, don't have thermal sensors, but Modified: head/sys/dev/hwpmc/hwpmc_amd.c == --- head/sys/dev/hwpmc/hwpmc_amd.c Tue Jul 14 21:56:59 2020 (r363205) +++ head/sys/dev/hwpmc/hwpmc_amd.c Tue Jul 14 22:25:06 2020 (r363206) @@ -1073,7 +1073,7 @@ pmc_amd_initialize(void) enum pmc_cputype cputype; struct pmc_mdep *pmc_mdep; enum pmc_class class; - int model, stepping; + int family, model, stepping; char *name; /* @@ -1085,14 +1085,16 @@ pmc_amd_initialize(void) */ name = NULL; - model = ((cpu_id & 0xF) >> 12) | ((cpu_id & 0xF0) >> 4); - stepping = cpu_id & 0xF; - if (CPUID_TO_FAMILY(cpu_id) == 0x17) - snprintf(pmc_cpuid, sizeof(pmc_cpuid), "AuthenticAMD-%d-%02X-%X", -CPUID_TO_FAMILY(cpu_id), model, stepping); - if (CPUID_TO_FAMILY(cpu_id) == 0x18) + family = CPUID_TO_FAMILY(cpu_id); + model = CPUID_TO_MODEL(cpu_id); + stepping = CPUID_TO_STEPPING(cpu_id); + + if (family == 0x18) snprintf(pmc_cpuid, sizeof(pmc_cpuid), "HygonGenuine-%d-%02X-%X", -CPUID_TO_FAMILY(cpu_id), model, stepping); + family, model, stepping); + else + snprintf(pmc_cpuid, sizeof(pmc_cpuid), "AuthenticAMD-%d-%02X-%X", + family, model, stepping); switch (cpu_id & 0xF00) { #ifdefined(__i386__) Modified: head/sys/dev/hwpmc/hwpmc_intel.c == --- head/sys/dev/hwpmc/hwpmc_intel.cTue Jul 14 21:56:59 2020 (r363205) +++ head/sys/dev/hwpmc/hwpmc_intel.cTue Jul 14 22:25:06 2020 (r363206) @@ -80,7 +80,7 @@ pmc_intel_initialize(void) { struct pmc_mdep *pmc_mdep; enum pmc_cputype cputype; - int error, model, nclasses, ncpus, stepping, verov; + int error, family, model, nclasses, ncpus, stepping, verov; KASSERT(cpu_vendor_id == CPU_VENDOR_INTEL, ("[intel,%d] Initializing non-intel processor", __LINE__)); @@ -91,11 +91,13 @@ pmc_intel_initialize(void) nclasses = 2; error = 0; verov = 0; - model = ((cpu_id & 0xF) >> 12) | ((cpu_id & 0xF0) >> 4); - stepping = cpu_id & 0xF; + family = CPUID_TO_FAMILY(cpu_id); + model = CPUID_TO_MODEL(cpu_id); + stepping = CPUID_TO_STEPPING(cpu_id); snprintf(pmc_cpuid, sizeof(pmc_cpuid), "GenuineIntel-%d-%02X-%X", -(cpu_id & 0xF00) >> 8, model, stepping); + family, model, stepping); + switch (cpu_id & 0xF00) { case 0x600: /* Pentium Pro, Celeron, Pentium II & III */ switch (model) { Modified: head/sys/x86/include/specialreg.h == --- head/sys/x86/include/specialreg.h Tue Jul 14 21:56:59 2020 (r363205) +++ head/sys/x86/include/specialreg.h Tue Jul 14 22:25:06 2020 (r363206) @@ -280,6 +280,7 @@ id) & CPUID_FAMILY) >> 8) + \ (((id) & CPUID_EXT_FAMILY) >> 20)) #endif +#define CPUID_TO_STEPPING(id) ((id) & CPUID_STEPPING) /* * CPUID instruction 1 ebx info ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r363170 - in head: contrib/byacc contrib/byacc/package contrib/byacc/package/debian contrib/byacc/package/pkgsrc contrib/byacc/test contrib/byacc/test/btyacc contrib/byacc/test/yacc us
On Wed, Jul 15, 2020 at 6:14 AM Li-Wen Hsu wrote: > > On Tue, Jul 14, 2020 at 9:54 AM Jung-uk Kim wrote: > > > > Author: jkim > > Date: Tue Jul 14 01:54:24 2020 > > New Revision: 363170 > > URL: https://svnweb.freebsd.org/changeset/base/363170 > > > > Log: > > MFV: r362513 > > > > Update byacc to 20200330. > > Hello Jung-uk, > > There are some things I haven't figured out, but currently there is > one yacc test case in our CI is failing. > > Please check the output of usr.bin.yacc.yacc_tests.main at > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/15843/testReport/junit/usr.bin.yacc/yacc_tests/main/ > > The yacc processed result of /usr/tests/usr.bin/yacc/calc.y is > different than the reference, > /usr/tests/usr.bin/yacc/yacc/calc.tab.c > > And checking the files under contrib/byacc/ , there are > (1) ./test/calc.tab.c > (2) ./test/btyacc/calc.tab.c > (3) ./test/yacc/calc.tab.c > > (3) is what we want, and that was the source of > /usr/tests/usr.bin/yacc/yacc/calc.tab.c before this import. It was > updated in the new byacc release and matches the behavior of new yacc. > However, currently we install (1) as /usr/tests/usr.bin/yacc/calc.y , Sorry, I mean currently we install (1) as /usr/tests/usr.bin/yacc/yacc/calc.tab.c > the content looks generated by a very old yacc > > The thing I still don't know is why the source of calc.tab.c is > changed as there is no related change in usr.bin/yacc/tests/Makefile . > Surprisingly, removing (1) can restore the old behavior of using (3) > as the source. I haven't checked why that file appears in the upstream > distfile but it did not exist in our old version of byacc, 20170201. > > I'm not sure what's the best way to fix this. The fastest way is just > removing contrib/byacc/test/calc.tab.c , and the following task is > checking with upstream for the intention of adding that file. We may > also want to fix the Makefile or .mk files to make the source of > /usr/tests/usr.bin/yacc/yacc/calc.tab.c not affected by the file with > the same name under different directories. > > BTW, there are some entries need to be added to the ObsoleteFiles.inc, like > /usr/tests/usr.bin/yacc/err_inherit1.y which is > > Please help check this test issue of the new yacc. > > Thanks, > Li-Wen ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r363170 - in head: contrib/byacc contrib/byacc/package contrib/byacc/package/debian contrib/byacc/package/pkgsrc contrib/byacc/test contrib/byacc/test/btyacc contrib/byacc/test/yacc us
On Tue, Jul 14, 2020 at 9:54 AM Jung-uk Kim wrote: > > Author: jkim > Date: Tue Jul 14 01:54:24 2020 > New Revision: 363170 > URL: https://svnweb.freebsd.org/changeset/base/363170 > > Log: > MFV: r362513 > > Update byacc to 20200330. Hello Jung-uk, There are some things I haven't figured out, but currently there is one yacc test case in our CI is failing. Please check the output of usr.bin.yacc.yacc_tests.main at https://ci.freebsd.org/job/FreeBSD-head-amd64-test/15843/testReport/junit/usr.bin.yacc/yacc_tests/main/ The yacc processed result of /usr/tests/usr.bin/yacc/calc.y is different than the reference, /usr/tests/usr.bin/yacc/yacc/calc.tab.c And checking the files under contrib/byacc/ , there are (1) ./test/calc.tab.c (2) ./test/btyacc/calc.tab.c (3) ./test/yacc/calc.tab.c (3) is what we want, and that was the source of /usr/tests/usr.bin/yacc/yacc/calc.tab.c before this import. It was updated in the new byacc release and matches the behavior of new yacc. However, currently we install (1) as /usr/tests/usr.bin/yacc/calc.y , the content looks generated by a very old yacc The thing I still don't know is why the source of calc.tab.c is changed as there is no related change in usr.bin/yacc/tests/Makefile . Surprisingly, removing (1) can restore the old behavior of using (3) as the source. I haven't checked why that file appears in the upstream distfile but it did not exist in our old version of byacc, 20170201. I'm not sure what's the best way to fix this. The fastest way is just removing contrib/byacc/test/calc.tab.c , and the following task is checking with upstream for the intention of adding that file. We may also want to fix the Makefile or .mk files to make the source of /usr/tests/usr.bin/yacc/yacc/calc.tab.c not affected by the file with the same name under different directories. BTW, there are some entries need to be added to the ObsoleteFiles.inc, like /usr/tests/usr.bin/yacc/err_inherit1.y which is Please help check this test issue of the new yacc. Thanks, Li-Wen ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363205 - head/sys/compat/linuxkpi/common/include/linux
Author: wulf Date: Tue Jul 14 21:56:59 2020 New Revision: 363205 URL: https://svnweb.freebsd.org/changeset/base/363205 Log: linuxkpi: Ignore NULL pointers passed to string parameter of kstr(n)dup That follows Linux and fixes related drm-kmod-5.3 panic. Reviewed by: imp, hselasky MFC after:1 week Differential Revision:https://reviews.freebsd.org/D25657 Modified: head/sys/compat/linuxkpi/common/include/linux/string.h Modified: head/sys/compat/linuxkpi/common/include/linux/string.h == --- head/sys/compat/linuxkpi/common/include/linux/string.h Tue Jul 14 21:43:57 2020(r363204) +++ head/sys/compat/linuxkpi/common/include/linux/string.h Tue Jul 14 21:56:59 2020(r363205) @@ -103,6 +103,8 @@ kstrdup(const char *string, gfp_t gfp) char *retval; size_t len; + if (string == NULL) + return (NULL); len = strlen(string) + 1; retval = kmalloc(len, gfp); if (retval != NULL) @@ -115,6 +117,8 @@ kstrndup(const char *string, size_t len, gfp_t gfp) { char *retval; + if (string == NULL) + return (NULL); retval = kmalloc(len + 1, gfp); if (retval != NULL) strncpy(retval, string, len); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r363144 - head/lib/libpmc/pmu-events/arch/x86
indeed it works, thanks On 7/14/20, Alexander Motin wrote: > On 14.07.2020 11:33, Mateusz Guzik wrote: >> On 7/13/20, Alexander Motin wrote: >>> Author: mav >>> Date: Mon Jul 13 14:25:25 2020 >>> New Revision: 363144 >>> URL: https://svnweb.freebsd.org/changeset/base/363144 >>> >>> Log: >>> Minor textual fixes. >>> >>> MFC after:1 week >>> >>> Modified: >>> head/lib/libpmc/pmu-events/arch/x86/mapfile.csv > >>> -GenuineIntel-6-55,v1,skylakex,core >>> +GenuineIntel-6-55-[01234],v1,skylakex,core >> >> This breaks hwpmc for me as it no longer recognizes the cpu. >> kern.hwpmc.cpuid: GenuineIntel-6-55 > > Thank you for the report. It should be fixed with r363188. > > -- > Alexander Motin > -- Mateusz Guzik ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363202 - head/sys/kern
Author: mjg Date: Tue Jul 14 21:19:33 2020 New Revision: 363202 URL: https://svnweb.freebsd.org/changeset/base/363202 Log: cache: make negative shrinker round robin on all lists every time Previously it would check 4, 3, 2, 1 lists. In practice by the time it is getting called all lists have some elements and consequently this does not result in new evictions. Nonetheless, the code is clearer. Tested by:pho Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Tue Jul 14 21:17:46 2020(r363201) +++ head/sys/kern/vfs_cache.c Tue Jul 14 21:19:33 2020(r363202) @@ -262,7 +262,6 @@ static u_int __read_mostly ncsize; /* the size as comp struct nchstatsnchstats; /* cache effectiveness statistics */ static struct mtx __exclusive_cache_line ncneg_shrink_lock; -static int shrink_list_turn; struct neglist { struct mtx nl_lock; @@ -815,18 +814,18 @@ cache_negative_remove(struct namecache *ncp) } static void -cache_negative_shrink_select(int start, struct namecache **ncpp, +cache_negative_shrink_select(struct namecache **ncpp, struct neglist **neglistpp) { struct neglist *neglist; struct namecache *ncp; - int i; + static u_int cycle; + u_int i; *ncpp = ncp = NULL; - neglist = NULL; - for (i = start; i < numneglists; i++) { - neglist = [i]; + for (i = 0; i < numneglists; i++) { + neglist = [(cycle + i) % numneglists]; if (TAILQ_FIRST(>nl_list) == NULL) continue; mtx_lock(>nl_lock); @@ -838,6 +837,7 @@ cache_negative_shrink_select(int start, struct namecac *neglistpp = neglist; *ncpp = ncp; + cycle++; } static void @@ -870,12 +870,8 @@ cache_negative_zap_one(void) } mtx_unlock(_hot.nl_lock); - cache_negative_shrink_select(shrink_list_turn, , ); - shrink_list_turn++; - if (shrink_list_turn == numneglists) - shrink_list_turn = 0; - if (ncp == NULL && shrink_list_turn == 0) - cache_negative_shrink_select(shrink_list_turn, , ); + cache_negative_shrink_select(, ); + mtx_unlock(_shrink_lock); if (ncp == NULL) return; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363201 - head/sys/kern
Author: mjg Date: Tue Jul 14 21:17:46 2020 New Revision: 363201 URL: https://svnweb.freebsd.org/changeset/base/363201 Log: cache: remove numcalls The counter is not very useful and if necessary the value can be found by summing up other counters. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Tue Jul 14 21:17:08 2020(r363200) +++ head/sys/kern/vfs_cache.c Tue Jul 14 21:17:46 2020(r363201) @@ -407,7 +407,6 @@ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW | STATNODE_ULONG(numneg, "Number of negative cache entries"); STATNODE_ULONG(numcache, "Number of cache entries"); STATNODE_COUNTER(numcachehv, "Number of namecache entries with vnodes held"); -STATNODE_COUNTER(numcalls, "Number of cache lookups"); STATNODE_COUNTER(numdrops, "Number of dropped entries due to reaching the limit"); STATNODE_COUNTER(dothits, "Number of '.' hits"); STATNODE_COUNTER(dotdothits, "Number of '..' hits"); @@ -1384,8 +1383,6 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st return (0); } #endif - - counter_u64_add(numcalls, 1); if (__predict_false(cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.')) return (cache_lookup_dot(dvp, vpp, cnp, tsp, ticksp)); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363199 - head/sys/kern
Author: mjg Date: Tue Jul 14 21:16:48 2020 New Revision: 363199 URL: https://svnweb.freebsd.org/changeset/base/363199 Log: cache: remove neg_locked argument from cache_zap_locked Tested by:pho Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Tue Jul 14 21:16:07 2020(r363198) +++ head/sys/kern/vfs_cache.c Tue Jul 14 21:16:48 2020(r363199) @@ -441,7 +441,7 @@ STATNODE_COUNTER(numneg_evicted, STATNODE_COUNTER(shrinking_skipped, "Number of times shrinking was already in progress"); -static void cache_zap_locked(struct namecache *ncp, bool neg_locked); +static void cache_zap_locked(struct namecache *ncp); static int vn_fullpath_hardlink(struct thread *td, struct nameidata *ndp, char **retbuf, char **freebuf, size_t *buflen); static int vn_fullpath_any(struct thread *td, struct vnode *vp, struct vnode *rdir, @@ -778,7 +778,7 @@ cache_negative_insert(struct namecache *ncp) } static void -cache_negative_remove(struct namecache *ncp, bool neg_locked) +cache_negative_remove(struct namecache *ncp) { struct neglist *neglist; struct negstate *negstate; @@ -788,18 +788,16 @@ cache_negative_remove(struct namecache *ncp, bool neg_ cache_assert_bucket_locked(ncp, RA_WLOCKED); neglist = NCP2NEGLIST(ncp); negstate = NCP2NEGSTATE(ncp); - if (!neg_locked) { - if ((negstate->neg_flag & NEG_HOT) != 0) { - hot_locked = true; - mtx_lock(_hot.nl_lock); - if ((negstate->neg_flag & NEG_HOT) == 0) { - list_locked = true; - mtx_lock(>nl_lock); - } - } else { + if ((negstate->neg_flag & NEG_HOT) != 0) { + hot_locked = true; + mtx_lock(_hot.nl_lock); + if ((negstate->neg_flag & NEG_HOT) == 0) { list_locked = true; mtx_lock(>nl_lock); } + } else { + list_locked = true; + mtx_lock(>nl_lock); } if ((negstate->neg_flag & NEG_HOT) != 0) { mtx_assert(_hot.nl_lock, MA_OWNED); @@ -888,19 +886,24 @@ cache_negative_zap_one(void) mtx_unlock(>nl_lock); mtx_lock(dvlp); rw_wlock(blp); - mtx_lock(>nl_lock); + /* +* Enter SMR to safely check the negative list. +* Even if the found pointer matches, the entry may now be reallocated +* and used by a different vnode. +*/ + vfs_smr_enter(); ncp2 = TAILQ_FIRST(>nl_list); if (ncp != ncp2 || dvlp != VP2VNODELOCK(ncp2->nc_dvp) || - blp != NCP2BUCKETLOCK(ncp2) || !(ncp2->nc_flag & NCF_NEGATIVE)) { + blp != NCP2BUCKETLOCK(ncp2)) { + vfs_smr_exit(); ncp = NULL; } else { + vfs_smr_exit(); SDT_PROBE2(vfs, namecache, shrink_negative, done, ncp->nc_dvp, ncp->nc_name); - - cache_zap_locked(ncp, true); + cache_zap_locked(ncp); counter_u64_add(numneg_evicted, 1); } - mtx_unlock(>nl_lock); rw_wunlock(blp); mtx_unlock(dvlp); cache_free(ncp); @@ -913,7 +916,7 @@ cache_negative_zap_one(void) * pointer to a vnode or if it is just a negative cache entry. */ static void -cache_zap_locked(struct namecache *ncp, bool neg_locked) +cache_zap_locked(struct namecache *ncp) { if (!(ncp->nc_flag & NCF_NEGATIVE)) @@ -936,7 +939,7 @@ cache_zap_locked(struct namecache *ncp, bool neg_locke } else { SDT_PROBE2(vfs, namecache, zap_negative, done, ncp->nc_dvp, ncp->nc_name); - cache_negative_remove(ncp, neg_locked); + cache_negative_remove(ncp); } if (ncp->nc_flag & NCF_ISDOTDOT) { if (ncp == ncp->nc_dvp->v_cache_dd) @@ -962,7 +965,7 @@ cache_zap_negative_locked_vnode_kl(struct namecache *n blp = NCP2BUCKETLOCK(ncp); rw_wlock(blp); - cache_zap_locked(ncp, false); + cache_zap_locked(ncp); rw_wunlock(blp); } @@ -1009,7 +1012,7 @@ cache_zap_locked_vnode_kl2(struct namecache *ncp, stru } } rw_wlock(blp); - cache_zap_locked(ncp, false); + cache_zap_locked(ncp); rw_wunlock(blp); if (to_unlock != NULL) mtx_unlock(to_unlock); @@ -1055,7 +1058,7 @@ cache_zap_locked_vnode(struct namecache *ncp, struct v to_unlock = vlp1; } rw_wlock(blp); - cache_zap_locked(ncp, false); + cache_zap_locked(ncp); rw_wunlock(blp); mtx_unlock(to_unlock); out: @@ -1086,7 +1089,7 @@ cache_zap_unlocked_bucket(struct namecache
svn commit: r363200 - head/sys/kern
Author: mjg Date: Tue Jul 14 21:17:08 2020 New Revision: 363200 URL: https://svnweb.freebsd.org/changeset/base/363200 Log: cache: count dropped entries Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Tue Jul 14 21:16:48 2020(r363199) +++ head/sys/kern/vfs_cache.c Tue Jul 14 21:17:08 2020(r363200) @@ -408,6 +408,7 @@ STATNODE_ULONG(numneg, "Number of negative cache entri STATNODE_ULONG(numcache, "Number of cache entries"); STATNODE_COUNTER(numcachehv, "Number of namecache entries with vnodes held"); STATNODE_COUNTER(numcalls, "Number of cache lookups"); +STATNODE_COUNTER(numdrops, "Number of dropped entries due to reaching the limit"); STATNODE_COUNTER(dothits, "Number of '.' hits"); STATNODE_COUNTER(dotdothits, "Number of '..' hits"); STATNODE_COUNTER(numchecks, "Number of checks in lookup"); @@ -1853,6 +1854,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, lnumcache = atomic_fetchadd_long(, 1) + 1; if (__predict_false(lnumcache >= ncsize)) { atomic_add_long(, -1); + counter_u64_add(numdrops, 1); return; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363198 - head/sys/kern
Author: mjg Date: Tue Jul 14 21:16:07 2020 New Revision: 363198 URL: https://svnweb.freebsd.org/changeset/base/363198 Log: cache: remove a useless argument from cache_negative_insert Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Tue Jul 14 21:15:16 2020(r363197) +++ head/sys/kern/vfs_cache.c Tue Jul 14 21:16:07 2020(r363198) @@ -764,21 +764,16 @@ cache_negative_hit(struct namecache *ncp) } static void -cache_negative_insert(struct namecache *ncp, bool neg_locked) +cache_negative_insert(struct namecache *ncp) { struct neglist *neglist; MPASS(ncp->nc_flag & NCF_NEGATIVE); cache_assert_bucket_locked(ncp, RA_WLOCKED); neglist = NCP2NEGLIST(ncp); - if (!neg_locked) { - mtx_lock(>nl_lock); - } else { - mtx_assert(>nl_lock, MA_OWNED); - } + mtx_lock(>nl_lock); TAILQ_INSERT_TAIL(>nl_list, ncp, nc_dst); - if (!neg_locked) - mtx_unlock(>nl_lock); + mtx_unlock(>nl_lock); atomic_add_rel_long(, 1); } @@ -1965,7 +1960,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, } else { if (cnp->cn_flags & ISWHITEOUT) ncp->nc_flag |= NCF_WHITE; - cache_negative_insert(ncp, false); + cache_negative_insert(ncp); SDT_PROBE2(vfs, namecache, enter_negative, done, dvp, ncp->nc_name); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363197 - head/stand
Author: mhorne Date: Tue Jul 14 21:15:16 2020 New Revision: 363197 URL: https://svnweb.freebsd.org/changeset/base/363197 Log: Really fix cleandir after r362973 I made an attempt to fix this in r362978, but all it really did was confine the issue to the $MACHINE_CPUARCH == "riscv" case. The real problem is that LINKER_FEATURES is not defined here, so bsd.linker.mk needs to be included. This error with cleandir only occurs when META_MODE is disabled, which explains why it was missed by both CI and myself. Note that this effectively reverts r362978. Reported by: mjg Reviewed by: imp, kevans (in IRC) Modified: head/stand/defs.mk Modified: head/stand/defs.mk == --- head/stand/defs.mk Tue Jul 14 21:14:59 2020(r363196) +++ head/stand/defs.mk Tue Jul 14 21:15:16 2020(r363197) @@ -17,6 +17,7 @@ INTERNALLIB= .endif .include +.include WARNS?=1 @@ -151,7 +152,7 @@ CFLAGS+=-fPIC # Some RISC-V linkers have support for relaxations, while some (lld) do not # yet. If this is the case we inhibit the compiler from emitting relaxations. -.if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == "" +.if ${LINKER_FEATURES:Mriscv-relaxations} == "" CFLAGS+= -mno-relax .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363196 - head/sys/kern
Author: mjg Date: Tue Jul 14 21:14:59 2020 New Revision: 363196 URL: https://svnweb.freebsd.org/changeset/base/363196 Log: cache: create a dedicate struct for negative entries .. and stuff if into the unused target vnode field This gets rid of concurrent nc_flag modifications racing with the shrinker and consequently fixes a bug where such a change could have been missed when cache_ncp_invalidate was being issued.. Reported by: zeising Tested by:pho, zeising Fixes:r362828 ("cache: lockless forward lookup with smr") Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Tue Jul 14 20:37:50 2020(r363195) +++ head/sys/kern/vfs_cache.c Tue Jul 14 21:14:59 2020(r363196) @@ -104,6 +104,11 @@ SDT_PROBE_DEFINE2(vfs, namecache, shrink_negative, don * This structure describes the elements in the cache of recent * names looked up by namei. */ +struct negstate { + u_char neg_flag; +}; +_Static_assert(sizeof(struct negstate) <= sizeof(struct vnode *), +"the state must fit in a union with a pointer without growing it"); struct namecache { CK_LIST_ENTRY(namecache) nc_hash;/* hash chain */ @@ -112,6 +117,7 @@ struct namecache { struct vnode *nc_dvp; /* vnode of parent of name */ union { struct vnode *nu_vp; /* vnode the name refers to */ + struct negstate nu_neg;/* negative entry state */ } n_un; u_char nc_flag;/* flag bits */ u_char nc_nlen;/* length of name */ @@ -134,6 +140,7 @@ struct namecache_ts { }; #definenc_vp n_un.nu_vp +#definenc_neg n_un.nu_neg /* * Flags in namecache.nc_flag @@ -144,10 +151,14 @@ structnamecache_ts { #defineNCF_DTS 0x08 #defineNCF_DVDROP 0x10 #defineNCF_NEGATIVE0x20 -#defineNCF_HOTNEGATIVE 0x40 -#define NCF_INVALID0x80 +#defineNCF_INVALID 0x40 /* + * Flags in negstate.neg_flag + */ +#define NEG_HOT0x01 + +/* * Mark an entry as invalid. * * This is called before it starts getting deconstructed. @@ -271,6 +282,14 @@ NCP2NEGLIST(struct namecache *ncp) return ([(((uintptr_t)(ncp) >> 8) & ncneghash)]); } +static inline struct negstate * +NCP2NEGSTATE(struct namecache *ncp) +{ + + MPASS(ncp->nc_flag & NCF_NEGATIVE); + return (>nc_neg); +} + #definenumbucketlocks (ncbuckethash + 1) static u_int __read_mostly ncbuckethash; static struct rwlock_padalign __read_mostly *bucketlocks; @@ -713,21 +732,32 @@ SYSCTL_PROC(_debug_hashstat, OID_AUTO, nchash, CTLTYPE * round-robin manner. */ static void +cache_negative_init(struct namecache *ncp) +{ + struct negstate *negstate; + + ncp->nc_flag |= NCF_NEGATIVE; + negstate = NCP2NEGSTATE(ncp); + negstate->neg_flag = 0; +} + +static void cache_negative_hit(struct namecache *ncp) { struct neglist *neglist; + struct negstate *negstate; - MPASS(ncp->nc_flag & NCF_NEGATIVE); - if (ncp->nc_flag & NCF_HOTNEGATIVE) + negstate = NCP2NEGSTATE(ncp); + if ((negstate->neg_flag & NEG_HOT) != 0) return; neglist = NCP2NEGLIST(ncp); mtx_lock(_hot.nl_lock); mtx_lock(>nl_lock); - if (!(ncp->nc_flag & NCF_HOTNEGATIVE)) { + if ((negstate->neg_flag & NEG_HOT) == 0) { numhotneg++; TAILQ_REMOVE(>nl_list, ncp, nc_dst); TAILQ_INSERT_TAIL(_hot.nl_list, ncp, nc_dst); - ncp->nc_flag |= NCF_HOTNEGATIVE; + negstate->neg_flag |= NEG_HOT; } mtx_unlock(>nl_lock); mtx_unlock(_hot.nl_lock); @@ -756,17 +786,18 @@ static void cache_negative_remove(struct namecache *ncp, bool neg_locked) { struct neglist *neglist; + struct negstate *negstate; bool hot_locked = false; bool list_locked = false; - MPASS(ncp->nc_flag & NCF_NEGATIVE); cache_assert_bucket_locked(ncp, RA_WLOCKED); neglist = NCP2NEGLIST(ncp); + negstate = NCP2NEGSTATE(ncp); if (!neg_locked) { - if (ncp->nc_flag & NCF_HOTNEGATIVE) { + if ((negstate->neg_flag & NEG_HOT) != 0) { hot_locked = true; mtx_lock(_hot.nl_lock); - if (!(ncp->nc_flag & NCF_HOTNEGATIVE)) { + if ((negstate->neg_flag & NEG_HOT) == 0) { list_locked = true; mtx_lock(>nl_lock); } @@ -775,7 +806,7 @@ cache_negative_remove(struct namecache *ncp, bool neg_ mtx_lock(>nl_lock); } } - if (ncp->nc_flag & NCF_HOTNEGATIVE) { +
svn commit: r363195 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include x86/include x86/x86 x86/xen
Author: kib Date: Tue Jul 14 20:37:50 2020 New Revision: 363195 URL: https://svnweb.freebsd.org/changeset/base/363195 Log: amd64: allow parallel shootdown IPIs Stop using smp_ipi_mtx to protect global shootdown state, and move/multiply the global state into pcpu. Now each CPU can initiate shootdown IPI independently from other CPUs. Initiator enters critical section, then fills its local PCPU shootdown info (pc_smp_tlb_XXX), then clears scoreboard generation at location (cpu, my_cpuid) for each target cpu. After that IPI is sent to all targets which scan for zeroed scoreboard generation words. Upon finding such word the shootdown data is read from corresponding cpu' pcpu, and generation is set. Meantime initiator loops waiting for all zeroed generations in scoreboard to update. Initiator does not disable interrupts, which should allow non-invalidation IPIs from deadlocking, it only needs to disable preemption to pin itself to the instance of the pcpu smp_tlb data. The generation is set before the actual invalidation is performed in handler. It is safe because target CPU cannot return to userspace before handler finishes. In principle only NMI can preempt the handler, but NMI would see the kernel handler frame and not touch not-invalidated user page table. Handlers loop until they do not see zeroed scoreboard generations. This, together with hardware keeping one pending IPI in LAPIC IRR should prevent lost shootdowns. Notes. 1. The code does protect writes to LAPIC ICR with exclusion. I believe this is fine because we in fact do not send IPIs from interrupt handlers. More for !x2APIC mode where ICR access for write requires two registers write, we disable interrupts around it. If considered incorrect, I can add per-cpu spinlock around ipi_send(). 2. Scoreboard lines owned by given target CPU can be padded to the cache line, to reduce ping-pong. Reviewed by: markj (previous version) Discussed with: alc Tested by:pho Sponsored by: The FreeBSD Foundation MFC after:3 weeks Differential revision:https://reviews.freebsd.org/D25510 Modified: head/sys/amd64/amd64/apic_vector.S head/sys/amd64/amd64/db_interface.c head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/pcpu.h head/sys/amd64/include/smp.h head/sys/i386/i386/mp_machdep.c head/sys/i386/include/smp.h head/sys/x86/include/apicvar.h head/sys/x86/include/x86_smp.h head/sys/x86/x86/mp_x86.c head/sys/x86/xen/xen_apic.c Modified: head/sys/amd64/amd64/apic_vector.S == --- head/sys/amd64/amd64/apic_vector.S Tue Jul 14 20:32:50 2020 (r363194) +++ head/sys/amd64/amd64/apic_vector.S Tue Jul 14 20:37:50 2020 (r363195) @@ -171,63 +171,13 @@ IDTVEC(spuriousint) .text SUPERALIGN_TEXT -invltlb_ret: - callas_lapic_eoi - jmp ld_regs - - SUPERALIGN_TEXT - INTR_HANDLER invltlb - callinvltlb_handler - jmp invltlb_ret - - INTR_HANDLER invltlb_pcid - callinvltlb_pcid_handler - jmp invltlb_ret - - INTR_HANDLER invltlb_invpcid_nopti - callinvltlb_invpcid_handler - jmp invltlb_ret - - INTR_HANDLER invltlb_invpcid_pti - callinvltlb_invpcid_pti_handler - jmp invltlb_ret - /* - * Single page TLB shootdown + * IPI handler for cache and TLB shootdown */ - INTR_HANDLER invlpg - callinvlpg_handler - jmp invltlb_ret - - INTR_HANDLER invlpg_invpcid - callinvlpg_invpcid_handler - jmp invltlb_ret - - INTR_HANDLER invlpg_pcid - callinvlpg_pcid_handler - jmp invltlb_ret - -/* - * Page range TLB shootdown. - */ - INTR_HANDLER invlrng - callinvlrng_handler - jmp invltlb_ret - - INTR_HANDLER invlrng_invpcid - callinvlrng_invpcid_handler - jmp invltlb_ret - - INTR_HANDLER invlrng_pcid - callinvlrng_pcid_handler - jmp invltlb_ret - -/* - * Invalidate cache. - */ - INTR_HANDLER invlcache - callinvlcache_handler - jmp invltlb_ret + INTR_HANDLER invlop + callinvlop_handler + callas_lapic_eoi + jmp ld_regs /* * Handler for IPIs sent via the per-cpu IPI bitmap. Modified: head/sys/amd64/amd64/db_interface.c == --- head/sys/amd64/amd64/db_interface.c Tue Jul 14 20:32:50 2020 (r363194) +++ head/sys/amd64/amd64/db_interface.c Tue Jul 14 20:37:50 2020 (r363195) @@ -107,5 +107,4 @@ db_show_mdpcpu(struct pcpu *pc) db_printf("gs32p= %p\n", pc->pc_gs32p); db_printf("ldt = %p\n", pc->pc_ldt); db_printf("tss = %p\n",
svn commit: r363194 - head/sys/netinet
Author: tuexen Date: Tue Jul 14 20:32:50 2020 New Revision: 363194 URL: https://svnweb.freebsd.org/changeset/base/363194 Log: Improve the error handling in generating ASCONF chunks. In case of errors, the cleanup was not consistent. Thanks to Felix Weinrank for fuzzing the userland stack and making me aware of the issue. MFC after:1 week Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_asconf.c == --- head/sys/netinet/sctp_asconf.c Tue Jul 14 20:23:27 2020 (r363193) +++ head/sys/netinet/sctp_asconf.c Tue Jul 14 20:32:50 2020 (r363194) @@ -2587,14 +2587,14 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen if (m_asconf_chk == NULL) { /* no mbuf's */ SCTPDBG(SCTP_DEBUG_ASCONF1, - "compose_asconf: couldn't get chunk mbuf!\n"); + "sctp_compose_asconf: couldn't get chunk mbuf!\n"); return (NULL); } m_asconf = sctp_get_mbuf_for_msg(MCLBYTES, 0, M_NOWAIT, 1, MT_DATA); if (m_asconf == NULL) { /* no mbuf's */ SCTPDBG(SCTP_DEBUG_ASCONF1, - "compose_asconf: couldn't get mbuf!\n"); + "sctp_compose_asconf: couldn't get mbuf!\n"); sctp_m_freem(m_asconf_chk); return (NULL); } @@ -2719,10 +2719,12 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen break; #endif default: - p_size = 0; - addr_size = 0; - addr_ptr = NULL; - break; + SCTPDBG(SCTP_DEBUG_ASCONF1, + "sctp_compose_asconf: no usable lookup addr (family = %d)!\n", + found_addr->sa_family); + sctp_m_freem(m_asconf_chk); + sctp_m_freem(m_asconf); + return (NULL); } lookup->ph.param_length = htons(SCTP_SIZE32(p_size)); memcpy(lookup->addr, addr_ptr, addr_size); @@ -2730,12 +2732,10 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen } else { /* uh oh... don't have any address?? */ SCTPDBG(SCTP_DEBUG_ASCONF1, - "compose_asconf: no lookup addr!\n"); - /* XXX for now, we send a IPv4 address of 0.0.0.0 */ - lookup->ph.param_type = htons(SCTP_IPV4_ADDRESS); - lookup->ph.param_length = htons(SCTP_SIZE32(sizeof(struct sctp_ipv4addr_param))); - memset(lookup->addr, 0, sizeof(struct in_addr)); - SCTP_BUF_LEN(m_asconf_chk) += SCTP_SIZE32(sizeof(struct sctp_ipv4addr_param)); + "sctp_compose_asconf: no lookup addr!\n"); + sctp_m_freem(m_asconf_chk); + sctp_m_freem(m_asconf); + return (NULL); } } /* chain it all together */ @@ -3261,10 +3261,9 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb *inp, struct so } void -sctp_asconf_send_nat_state_update(struct sctp_tcb *stcb, -struct sctp_nets *net) +sctp_asconf_send_nat_state_update(struct sctp_tcb *stcb, struct sctp_nets *net) { - struct sctp_asconf_addr *aa; + struct sctp_asconf_addr *aa_vtag, *aa_add, *aa_del; struct sctp_ifa *sctp_ifap; struct sctp_asconf_tag_param *vtag; #ifdef INET @@ -3273,6 +3272,7 @@ sctp_asconf_send_nat_state_update(struct sctp_tcb *stc #ifdef INET6 struct sockaddr_in6 *to6; #endif + if (net == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "sctp_asconf_send_nat_state_update: Missing net\n"); return; @@ -3282,105 +3282,81 @@ sctp_asconf_send_nat_state_update(struct sctp_tcb *stc return; } /* -* Need to have in the asconf: - vtagparam(my_vtag/peer_vtag) - -* add(0.0.0.0) - del(0.0.0.0) - Any global addresses add(addr) +* Need to have in the ASCONF: - VTAG(my_vtag/peer_vtag) - +* ADD(wildcard) - DEL(wildcard) - ADD(Any global addresses) */ - SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), - SCTP_M_ASC_ADDR); - if (aa == NULL) { - /* didn't get memory */ - SCTPDBG(SCTP_DEBUG_ASCONF1, - "sctp_asconf_send_nat_state_update: failed to get memory!\n"); + SCTP_MALLOC(aa_vtag, struct sctp_asconf_addr *, sizeof(struct sctp_asconf_addr), SCTP_M_ASC_ADDR); + SCTP_MALLOC(aa_add, struct sctp_asconf_addr *, sizeof(struct
svn commit: r363193 - in head: include sys/sys
Author: kib Date: Tue Jul 14 20:23:27 2020 New Revision: 363193 URL: https://svnweb.freebsd.org/changeset/base/363193 Log: Make CLOCK_REALTIME and TIMER_ABSTIME available for XOPEN_SOURCE >= 500. Reported by: jbeich PR: 247701 Reviewed by: jilles Sponsored by: The FreeBSD Foundation MFC after:1 week Differential revision:https://reviews.freebsd.org/D25554 Modified: head/include/time.h head/sys/sys/time.h Modified: head/include/time.h == --- head/include/time.h Tue Jul 14 18:57:31 2020(r363192) +++ head/include/time.h Tue Jul 14 20:23:27 2020(r363193) @@ -98,12 +98,14 @@ typedef __pid_t pid_t; #endif /* These macros are also in sys/time.h. */ -#if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 +#if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 199506 #define CLOCK_REALTIME 0 -#ifdef __BSD_VISIBLE +#endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 199506 */ +#if !defined(CLOCK_VIRTUAL) && __BSD_VISIBLE #define CLOCK_VIRTUAL 1 #define CLOCK_PROF 2 -#endif +#endif /* !defined(CLOCK_VIRTUAL) && __BSD_VISIBLE */ +#if !defined(CLOCK_MONOTONIC) && __POSIX_VISIBLE >= 200112 #define CLOCK_MONOTONIC4 #define CLOCK_UPTIME 5 /* FreeBSD-specific. */ #define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */ @@ -115,14 +117,14 @@ typedef __pid_t pid_t; #define CLOCK_SECOND 13 /* FreeBSD-specific. */ #define CLOCK_THREAD_CPUTIME_ID14 #defineCLOCK_PROCESS_CPUTIME_ID15 -#endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */ +#endif /* !defined(CLOCK_MONOTONIC) && __POSIX_VISIBLE >= 200112 */ -#if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 #if __BSD_VISIBLE #define TIMER_RELTIME 0x0 /* relative timer */ #endif +#if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 199506 #define TIMER_ABSTIME 0x1 /* absolute timer */ -#endif /* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 */ +#endif /* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 199506 */ struct tm { int tm_sec; /* seconds after the minute [0-60] */ Modified: head/sys/sys/time.h == --- head/sys/sys/time.h Tue Jul 14 18:57:31 2020(r363192) +++ head/sys/sys/time.h Tue Jul 14 20:23:27 2020(r363193) @@ -463,8 +463,12 @@ struct clockinfo { /* These macros are also in time.h. */ #ifndef CLOCK_REALTIME #defineCLOCK_REALTIME 0 +#endif +#ifndef CLOCK_VIRTUAL #defineCLOCK_VIRTUAL 1 #defineCLOCK_PROF 2 +#endif +#ifndef CLOCK_MONOTONIC #defineCLOCK_MONOTONIC 4 #defineCLOCK_UPTIME5 /* FreeBSD-specific. */ #defineCLOCK_UPTIME_PRECISE7 /* FreeBSD-specific. */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r363172 - head/contrib/bc/src
Am 14.07.20 um 19:31 schrieb Brooks Davis: > On Tue, Jul 14, 2020 at 05:02:18AM +, Adrian Chadd wrote: >> Author: adrian >> Date: Tue Jul 14 05:02:18 2020 >> New Revision: 363172 >> URL: https://svnweb.freebsd.org/changeset/base/363172 >> >> Log: >> [bc] Fix a "maybe uninitialized" compiler warning under mips-gcc-6.3.0. >> >> I guess this didn't like the case statements.. ? But this does quieten >> the compiler error. > > IMO it would be better to disable this warning for this (old) compiler > on this file rather than making a change here (in general we should be > removing these sorts of changes). That being said, we need to write > down some guidance on this so we have a clear set of principles and we > can figure out how we decided which compilers are on which side of the > line. I fully agree and have notified the "upstream". He may want to apply the change, but I do not expect him to tag a new release for this minor change. Since this is contributed software, I'd really appreciate, if a solution was only applied to the local build tree of the person affected by this local problem - a generally applicable solution can then be discussed and applied, if found to be necessary. Regards, STefan signature.asc Description: OpenPGP digital signature
svn commit: r363192 - in head: bin/ps sys/sys
Author: mckusick Date: Tue Jul 14 18:57:31 2020 New Revision: 363192 URL: https://svnweb.freebsd.org/changeset/base/363192 Log: Update to D25266, bin/ps: Make the rtprio option actually show realtime priorities The current `ps -axO rtprio' show threads running at interrupt priority such as the [intr] thread as '1:48' and threads running at kernel priority such as [pagedaemon] as normal:4294967260. This change shows [intr] as intr:48 and [pagedaemon] as kernel:4. Reviewed by:kib MFC after:1 week (together with -r362369) Differential Revision: https://reviews.freebsd.org/D25660 Modified: head/bin/ps/print.c head/sys/sys/rtprio.h Modified: head/bin/ps/print.c == --- head/bin/ps/print.c Tue Jul 14 18:50:48 2020(r363191) +++ head/bin/ps/print.c Tue Jul 14 18:57:31 2020(r363192) @@ -723,11 +723,18 @@ priorityr(KINFO *k, VARENT *ve __unused) break; case RTP_PRIO_NORMAL: /* alias for PRI_TIMESHARE */ - asprintf(, "normal:%u", level - PRI_MIN_TIMESHARE); + if (level >= PRI_MIN_TIMESHARE) + asprintf(, "normal:%u", level - PRI_MIN_TIMESHARE); + else + asprintf(, "kernel:%u", level - PRI_MIN_KERN); break; case RTP_PRIO_IDLE: /* alias for PRI_IDLE */ asprintf(, "idle:%u", level - PRI_MIN_IDLE); + break; + case RTP_PRIO_ITHD: + /* alias for PRI_ITHD */ + asprintf(, "intr:%u", level - PRI_MIN_ITHD); break; default: asprintf(, "%u:%u", class, level); Modified: head/sys/sys/rtprio.h == --- head/sys/sys/rtprio.h Tue Jul 14 18:50:48 2020(r363191) +++ head/sys/sys/rtprio.h Tue Jul 14 18:57:31 2020(r363192) @@ -44,6 +44,7 @@ /* priority types. Start at 1 to catch uninitialized fields. */ +#define RTP_PRIO_ITHD PRI_ITHD/* Interrupt thread. */ #define RTP_PRIO_REALTIME PRI_REALTIME/* real time process */ #define RTP_PRIO_NORMALPRI_TIMESHARE /* time sharing process */ #define RTP_PRIO_IDLE PRI_IDLE/* idle process */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363191 - head/sys/arm64/arm64
Author: andrew Date: Tue Jul 14 18:50:48 2020 New Revision: 363191 URL: https://svnweb.freebsd.org/changeset/base/363191 Log: Print the arm64 registers in more exception handling panics It can be useful to get a dump of all registers when investigating why we received an exception that we are unable to handle. In these cases we already call panic, however we don't always print the registers. Add calls to print_registers and print esr and far when applicable. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c == --- head/sys/arm64/arm64/trap.c Tue Jul 14 18:31:15 2020(r363190) +++ head/sys/arm64/arm64/trap.c Tue Jul 14 18:50:48 2020(r363191) @@ -170,8 +170,12 @@ static void align_abort(struct thread *td, struct trapframe *frame, uint64_t esr, uint64_t far, int lower) { - if (!lower) + if (!lower) { + print_registers(frame); + printf(" far: %16lx\n", far); + printf(" esr: %.8lx\n", esr); panic("Misaligned access from kernel space!"); + } call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_elr); userret(td, frame); @@ -361,6 +365,7 @@ do_el1h_sync(struct thread *td, struct trapframe *fram } else { print_registers(frame); printf(" far: %16lx\n", far); + printf(" esr: %.8lx\n", esr); panic("Unhandled EL1 %s abort: %x", exception == EXCP_INSN_ABORT ? "instruction" : "data", dfsc); @@ -397,6 +402,7 @@ do_el1h_sync(struct thread *td, struct trapframe *fram /* FALLTHROUGH */ default: print_registers(frame); + printf(" far: %16lx\n", READ_SPECIALREG(far_el1)); panic("Unknown kernel exception %x esr_el1 %lx\n", exception, esr); } @@ -466,10 +472,14 @@ do_el0_sync(struct thread *td, struct trapframe *frame if (dfsc < nitems(abort_handlers) && abort_handlers[dfsc] != NULL) abort_handlers[dfsc](td, frame, esr, far, 1); - else + else { + print_registers(frame); + printf(" far: %16lx\n", far); + printf(" esr: %.8lx\n", esr); panic("Unhandled EL0 %s abort: %x", exception == EXCP_INSN_ABORT_L ? "instruction" : "data", dfsc); + } break; case EXCP_UNKNOWN: if (!undef_insn(0, frame)) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r363144 - head/lib/libpmc/pmu-events/arch/x86
On 14.07.2020 11:33, Mateusz Guzik wrote: > On 7/13/20, Alexander Motin wrote: >> Author: mav >> Date: Mon Jul 13 14:25:25 2020 >> New Revision: 363144 >> URL: https://svnweb.freebsd.org/changeset/base/363144 >> >> Log: >> Minor textual fixes. >> >> MFC after: 1 week >> >> Modified: >> head/lib/libpmc/pmu-events/arch/x86/mapfile.csv >> -GenuineIntel-6-55,v1,skylakex,core >> +GenuineIntel-6-55-[01234],v1,skylakex,core > > This breaks hwpmc for me as it no longer recognizes the cpu. > kern.hwpmc.cpuid: GenuineIntel-6-55 Thank you for the report. It should be fixed with r363188. -- Alexander Motin ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363188 - in head: lib/libpmc sys/dev/hwpmc
Author: mav Date: Tue Jul 14 18:11:05 2020 New Revision: 363188 URL: https://svnweb.freebsd.org/changeset/base/363188 Log: Add stepping to the kern.hwpmc.cpuid string on x86. It follows the equivalent Linux change to be able to differentiate skylakex and cascadelakex, sharing the same model but not stepping. This fixes skylakex handling broken by r363144. MFC after:6 days Modified: head/lib/libpmc/libpmc_pmu_util.c head/sys/dev/hwpmc/hwpmc_amd.c head/sys/dev/hwpmc/hwpmc_intel.c Modified: head/lib/libpmc/libpmc_pmu_util.c == --- head/lib/libpmc/libpmc_pmu_util.c Tue Jul 14 18:02:24 2020 (r363187) +++ head/lib/libpmc/libpmc_pmu_util.c Tue Jul 14 18:11:05 2020 (r363188) @@ -169,7 +169,7 @@ pmu_events_map_get(const char *cpuid) { regex_t re; regmatch_t pmatch[1]; - size_t s, len; + size_t s; char buf[64]; int match; const struct pmu_events_map *pme; @@ -193,8 +193,8 @@ pmu_events_map_get(const char *cpuid) match = regexec(, buf, 1, pmatch, 0); regfree(); if (match == 0) { - len = pmatch[0].rm_eo - pmatch[0].rm_so; - if(len == strlen(buf)) + if (pmatch[0].rm_so == 0 && (buf[pmatch[0].rm_eo] == 0 + || buf[pmatch[0].rm_eo] == '-')) return (pme); } } Modified: head/sys/dev/hwpmc/hwpmc_amd.c == --- head/sys/dev/hwpmc/hwpmc_amd.c Tue Jul 14 18:02:24 2020 (r363187) +++ head/sys/dev/hwpmc/hwpmc_amd.c Tue Jul 14 18:11:05 2020 (r363188) @@ -1073,7 +1073,7 @@ pmc_amd_initialize(void) enum pmc_cputype cputype; struct pmc_mdep *pmc_mdep; enum pmc_class class; - int model; + int model, stepping; char *name; /* @@ -1086,12 +1086,13 @@ pmc_amd_initialize(void) name = NULL; model = ((cpu_id & 0xF) >> 12) | ((cpu_id & 0xF0) >> 4); + stepping = cpu_id & 0xF; if (CPUID_TO_FAMILY(cpu_id) == 0x17) - snprintf(pmc_cpuid, sizeof(pmc_cpuid), "AuthenticAMD-%d-%02X", -CPUID_TO_FAMILY(cpu_id), model); + snprintf(pmc_cpuid, sizeof(pmc_cpuid), "AuthenticAMD-%d-%02X-%X", +CPUID_TO_FAMILY(cpu_id), model, stepping); if (CPUID_TO_FAMILY(cpu_id) == 0x18) - snprintf(pmc_cpuid, sizeof(pmc_cpuid), "HygonGenuine-%d-%02X", -CPUID_TO_FAMILY(cpu_id), model); + snprintf(pmc_cpuid, sizeof(pmc_cpuid), "HygonGenuine-%d-%02X-%X", +CPUID_TO_FAMILY(cpu_id), model, stepping); switch (cpu_id & 0xF00) { #ifdefined(__i386__) Modified: head/sys/dev/hwpmc/hwpmc_intel.c == --- head/sys/dev/hwpmc/hwpmc_intel.cTue Jul 14 18:02:24 2020 (r363187) +++ head/sys/dev/hwpmc/hwpmc_intel.cTue Jul 14 18:11:05 2020 (r363188) @@ -94,8 +94,8 @@ pmc_intel_initialize(void) model = ((cpu_id & 0xF) >> 12) | ((cpu_id & 0xF0) >> 4); stepping = cpu_id & 0xF; - snprintf(pmc_cpuid, sizeof(pmc_cpuid), "GenuineIntel-%d-%02X", -(cpu_id & 0xF00) >> 8, model); + snprintf(pmc_cpuid, sizeof(pmc_cpuid), "GenuineIntel-%d-%02X-%X", +(cpu_id & 0xF00) >> 8, model, stepping); switch (cpu_id & 0xF00) { case 0x600: /* Pentium Pro, Celeron, Pentium II & III */ switch (model) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363187 - head/release/tools
Author: gonzo Date: Tue Jul 14 18:02:24 2020 New Revision: 363187 URL: https://svnweb.freebsd.org/changeset/base/363187 Log: Enable EFI system partition on amd64 and i386 VM images EFI support is a hard requirement for generating Hyper-V Gen2 VM images. Reviewed by: gjb MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D25655 Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr == --- head/release/tools/vmimage.subr Tue Jul 14 17:46:40 2020 (r363186) +++ head/release/tools/vmimage.subr Tue Jul 14 18:02:24 2020 (r363187) @@ -24,12 +24,17 @@ write_partition_layout() { case "${TARGET}:${TARGET_ARCH}" in amd64:amd64 | i386:i386) + # Create an ESP + espfilename=$(mktemp /tmp/efiboot.XX) + make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi mkimg -s gpt -f ${VMFORMAT} \ -b ${BOOTFILES}/i386/pmbr/pmbr \ -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ + -p efi:=${espfilename} \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} + rm ${espfilename} ;; arm64:aarch64) # Create an ESP ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r363172 - head/contrib/bc/src
On Tue, Jul 14, 2020 at 05:02:18AM +, Adrian Chadd wrote: > Author: adrian > Date: Tue Jul 14 05:02:18 2020 > New Revision: 363172 > URL: https://svnweb.freebsd.org/changeset/base/363172 > > Log: > [bc] Fix a "maybe uninitialized" compiler warning under mips-gcc-6.3.0. > > I guess this didn't like the case statements.. ? But this does quieten > the compiler error. IMO it would be better to disable this warning for this (old) compiler on this file rather than making a change here (in general we should be removing these sorts of changes). That being said, we need to write down some guidance on this so we have a clear set of principles and we can figure out how we decided which compilers are on which side of the line. -- Brooks signature.asc Description: PGP signature
Re: svn commit: r363178 - head/contrib/mandoc
> Author: gbe (doc committer) > Date: Tue Jul 14 12:02:30 2020 > New Revision: 363178 > URL: https://svnweb.freebsd.org/changeset/base/363178 > > Log: > Revert r362809: Mention FreeBSD in the HISTORY sections of apropos(1) and > makewhatis(8). > Thank you > We don't mention the first appearance of a utility in FreeBSD, when it first > appeared in a BSD version that predates FreeBSD. > > PR: 223520, 223521 > Reported by:rgrimes, imp > Reviewed by:bcr (mentor) > Approved by:bcr (mentor) > Differential Revision: https://reviews.freebsd.org/D25521 > > Modified: > head/contrib/mandoc/apropos.1 > head/contrib/mandoc/makewhatis.8 > > Modified: head/contrib/mandoc/apropos.1 > == > --- head/contrib/mandoc/apropos.1 Tue Jul 14 10:55:19 2020 > (r363177) > +++ head/contrib/mandoc/apropos.1 Tue Jul 14 12:02:30 2020 > (r363178) > @@ -15,7 +15,7 @@ > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > .\" > -.Dd $Mdocdate: June 30 2020 $ > +.Dd $Mdocdate: November 22 2018 $ > .Dt APROPOS 1 > .Os > .Sh NAME > @@ -493,12 +493,6 @@ The options > .Fl acfhIKklOTWw > appeared in > .Ox 5.7 . > -.Pp > -The > -.Nm > -utility was integrated into > -.Fx 11.1 > -as part of the switch to mandoc. > .Sh AUTHORS > .An -nosplit > .An Bill Joy > > Modified: head/contrib/mandoc/makewhatis.8 > == > --- head/contrib/mandoc/makewhatis.8 Tue Jul 14 10:55:19 2020 > (r363177) > +++ head/contrib/mandoc/makewhatis.8 Tue Jul 14 12:02:30 2020 > (r363178) > @@ -15,7 +15,7 @@ > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > .\" > -.Dd $Mdocdate: June 30 2020 $ > +.Dd $Mdocdate: May 17 2017 $ > .Dt MAKEWHATIS 8 > .Os > .Sh NAME > @@ -211,12 +211,6 @@ and the options > .Fl aCDnQT > in > .Ox 5.6 . > -.Pp > -The > -.Nm > -utility was integrated into > -.Fx 11.1 > -as part of the switch to mandoc. > .Sh AUTHORS > .An -nosplit > .An Bill Joy > -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r363144 - head/lib/libpmc/pmu-events/arch/x86
On 7/13/20, Alexander Motin wrote: > Author: mav > Date: Mon Jul 13 14:25:25 2020 > New Revision: 363144 > URL: https://svnweb.freebsd.org/changeset/base/363144 > > Log: > Minor textual fixes. > > MFC after: 1 week > > Modified: > head/lib/libpmc/pmu-events/arch/x86/mapfile.csv > > Modified: head/lib/libpmc/pmu-events/arch/x86/mapfile.csv > == > --- head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Mon Jul 13 13:58:21 > 2020 (r363143) > +++ head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Mon Jul 13 14:25:25 > 2020 (r363144) > @@ -24,19 +24,15 @@ GenuineIntel-6-1E,v2,nehalemep,core > GenuineIntel-6-1F,v2,nehalemep,core > GenuineIntel-6-1A,v2,nehalemep,core > GenuineIntel-6-2E,v2,nehalemex,core > -GenuineIntel-6-4E,v24,skylake,core > -GenuineIntel-6-5E,v24,skylake,core > -GenuineIntel-6-8E,v24,skylake,core > -GenuineIntel-6-9E,v24,skylake,core > +GenuineIntel-6-[4589]E,v24,skylake,core > GenuineIntel-6-37,v13,silvermont,core > GenuineIntel-6-4D,v13,silvermont,core > GenuineIntel-6-4C,v13,silvermont,core > GenuineIntel-6-2A,v15,sandybridge,core > GenuineIntel-6-2C,v2,westmereep-dp,core > -GenuineIntel-6-2C,v2,westmereep-dp,core > GenuineIntel-6-25,v2,westmereep-sp,core > GenuineIntel-6-2F,v2,westmereex,core > -GenuineIntel-6-55,v1,skylakex,core > +GenuineIntel-6-55-[01234],v1,skylakex,core This breaks hwpmc for me as it no longer recognizes the cpu. kern.hwpmc.cpuid: GenuineIntel-6-55 > GenuineIntel-6-55-[56789ABCDEF],v1,cascadelakex,core > GenuineIntel-6-7D,v1,icelake,core > GenuineIntel-6-7E,v1,icelake,core > -- Mateusz Guzik ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r363171 - head/contrib/flex/src
Hi! On Tue, 14 Jul 2020 at 08:00, Jung-uk Kim wrote: > On 20. 7. 14., Adrian Chadd wrote: > > Author: adrian > > Date: Tue Jul 14 05:00:08 2020 > > New Revision: 363171 > > URL: https://svnweb.freebsd.org/changeset/base/363171 > > > > Log: > > [flex] Fix compilation issue under mips-gcc-6.4 > > > > This was triggering a pointer-losing-constness error. > > It was discussed in this ML. > > https://lists.freebsd.org/pipermail/svn-src-head/2020-June/137432.html > > kevans even filed an upstream pull request. > > https://github.com/westes/flex/pull/449 Oh good! > > > Why did you commit it without asking us? > Oh I'm sorry! I didn't realise you were already doing the work to get it fixed upstream. I just saw things broken when building my test wifi setups here at home and saw they were small fixes that could be submitted upstream. I'm personally not a huge fan of sitting on patches that fix builds/functionality whilst waiting for upstream - this was one of the many reasons for migrating from CVS to SVN in the long distant past! - so I figured it would be easy to commit. I'll make sure I ask around a little more next time! -adrian > Jung-uk Kim > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r363172 - head/contrib/bc/src
On Tue, 14 Jul 2020 at 06:42, Warner Losh wrote: > Did you intend to commit to contrib software that has an active upstream? > This is going to cause conflicts in the future. Maybe you can submit it to > the new upstream instead? > i was going to do both, for the changes to both flex and bc. -adrian > > Warner > > On Mon, Jul 13, 2020 at 11:02 PM Adrian Chadd wrote: > >> Author: adrian >> Date: Tue Jul 14 05:02:18 2020 >> New Revision: 363172 >> URL: https://svnweb.freebsd.org/changeset/base/363172 >> >> Log: >> [bc] Fix a "maybe uninitialized" compiler warning under mips-gcc-6.3.0. >> >> I guess this didn't like the case statements.. ? But this does quieten >> the compiler error. >> >> Modified: >> head/contrib/bc/src/program.c >> >> Modified: head/contrib/bc/src/program.c >> >> == >> --- head/contrib/bc/src/program.c Tue Jul 14 05:00:08 2020 >> (r363171) >> +++ head/contrib/bc/src/program.c Tue Jul 14 05:02:18 2020 >> (r363172) >> @@ -180,7 +180,7 @@ static inline BcVec* bc_program_vec(const BcProgram *p >> >> static BcNum* bc_program_num(BcProgram *p, BcResult *r) { >> >> - BcNum *n; >> + BcNum *n = NULL; >> >> switch (r->t) { >> >> ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363183 - head
Author: markj Date: Tue Jul 14 15:05:38 2020 New Revision: 363183 URL: https://svnweb.freebsd.org/changeset/base/363183 Log: Add a RELNOTES entry for safexcel(4). Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/RELNOTES Modified: head/RELNOTES == --- head/RELNOTES Tue Jul 14 15:05:24 2020(r363182) +++ head/RELNOTES Tue Jul 14 15:05:38 2020(r363183) @@ -10,6 +10,9 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +r363180: + The safexcel(4) crypto offload driver has been added. + r363084: nc(1) now implements SCTP mode, enabled by specifying the --sctp option. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363182 - head/sys/dev/safexcel
Author: markj Date: Tue Jul 14 15:05:24 2020 New Revision: 363182 URL: https://svnweb.freebsd.org/changeset/base/363182 Log: safexcel(4): Fix the INVARIANTS build after a last-second change. Reported by: Jenkins MFC with: r363180 Modified: head/sys/dev/safexcel/safexcel.c Modified: head/sys/dev/safexcel/safexcel.c == --- head/sys/dev/safexcel/safexcel.cTue Jul 14 14:11:54 2020 (r363181) +++ head/sys/dev/safexcel/safexcel.cTue Jul 14 15:05:24 2020 (r363182) @@ -1896,8 +1896,8 @@ safexcel_cmd_descr_add(struct safexcel_ring *ring, boo struct safexcel_cmd_descr *cdesc; struct safexcel_cmd_descr_ring *cring; - KASSERT(full_data_len <= SAFEXCEL_MAX_REQUEST_SIZE, - ("%s: request length %u too long", __func__, full_data_len)); + KASSERT(reqlen <= SAFEXCEL_MAX_REQUEST_SIZE, + ("%s: request length %u too long", __func__, reqlen)); mtx_assert(>mtx, MA_OWNED); cring = >cdr; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r363171 - head/contrib/flex/src
On 20. 7. 14., Adrian Chadd wrote: > Author: adrian > Date: Tue Jul 14 05:00:08 2020 > New Revision: 363171 > URL: https://svnweb.freebsd.org/changeset/base/363171 > > Log: > [flex] Fix compilation issue under mips-gcc-6.4 > > This was triggering a pointer-losing-constness error. > > Modified: > head/contrib/flex/src/main.c > > Modified: head/contrib/flex/src/main.c > == > --- head/contrib/flex/src/main.c Tue Jul 14 01:54:24 2020 > (r363170) > +++ head/contrib/flex/src/main.c Tue Jul 14 05:00:08 2020 > (r363171) > @@ -342,7 +342,7 @@ void check_options (void) > /* Setup the filter chain. */ > output_chain = filter_create_int(NULL, filter_tee_header, > headerfilename); > if ( !(m4 = getenv("M4"))) { > - char *slash; > + const char *slash; > m4 = M4; > if ((slash = strrchr(M4, '/')) != NULL) { > m4 = slash+1; > It was discussed in this ML. https://lists.freebsd.org/pipermail/svn-src-head/2020-June/137432.html kevans even filed an upstream pull request. https://github.com/westes/flex/pull/449 Why did you commit it without asking us? Jung-uk Kim ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363181 - head/tests/sys/opencrypto
Author: markj Date: Tue Jul 14 14:11:54 2020 New Revision: 363181 URL: https://svnweb.freebsd.org/changeset/base/363181 Log: Add safexcel(4) to cryptotest. MFC after:1 week Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/tests/sys/opencrypto/cryptotest.py Modified: head/tests/sys/opencrypto/cryptotest.py == --- head/tests/sys/opencrypto/cryptotest.py Tue Jul 14 14:09:29 2020 (r363180) +++ head/tests/sys/opencrypto/cryptotest.py Tue Jul 14 14:11:54 2020 (r363181) @@ -50,8 +50,8 @@ def katg(base, glob): raise unittest.SkipTest("Missing %s test vectors" % (base)) return iglob(os.path.join(katdir, base, glob)) -aesmodules = [ 'cryptosoft0', 'aesni0', 'armv8crypto0', 'ccr0', 'ccp0' ] -shamodules = [ 'cryptosoft0', 'aesni0', 'armv8crypto0', 'ccr0', 'ccp0' ] +aesmodules = [ 'cryptosoft0', 'aesni0', 'armv8crypto0', 'ccr0', 'ccp0', 'safexcel0' ] +shamodules = [ 'cryptosoft0', 'aesni0', 'armv8crypto0', 'ccr0', 'ccp0', 'safexcel0' ] def GenTestCase(cname): try: @@ -456,6 +456,7 @@ aesni = GenTestCase('aesni0') armv8crypto = GenTestCase('armv8crypto0') ccr = GenTestCase('ccr0') ccp = GenTestCase('ccp0') +safexcel = GenTestCase('safexcel0') if __name__ == '__main__': unittest.main() ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363180 - in head: share/man/man4 sys/arm64/conf sys/conf sys/dev/safexcel sys/modules sys/modules/safexcel
Author: markj Date: Tue Jul 14 14:09:29 2020 New Revision: 363180 URL: https://svnweb.freebsd.org/changeset/base/363180 Log: Add a driver for the SafeXcel EIP-97. The EIP-97 is a packet processing module found on the ESPRESSObin. This commit adds a crypto(9) driver for the crypto and hash engine in this device. An initial skeleton driver that could attach and submit requests was written by loos and others at Netgate, and the driver was finished by me. Support for separate AAD and output buffers will be added in a separate commit, to simplify merging to stable/12 (where those features don't exist). Reviewed by: gnn, jhb Feedback from:andrew, cem, manu MFC after:1 week Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision:https://reviews.freebsd.org/D25417 Added: head/share/man/man4/safexcel.4 (contents, props changed) head/sys/dev/safexcel/ head/sys/dev/safexcel/safexcel.c (contents, props changed) head/sys/dev/safexcel/safexcel_reg.h (contents, props changed) head/sys/dev/safexcel/safexcel_var.h (contents, props changed) head/sys/modules/safexcel/ head/sys/modules/safexcel/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 head/sys/modules/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileTue Jul 14 13:21:09 2020 (r363179) +++ head/share/man/man4/MakefileTue Jul 14 14:09:29 2020 (r363180) @@ -449,6 +449,7 @@ MAN=aac.4 \ rue.4 \ sa.4 \ safe.4 \ + safexcel.4 \ sbp.4 \ sbp_targ.4 \ scc.4 \ Added: head/share/man/man4/safexcel.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/safexcel.4 Tue Jul 14 14:09:29 2020 (r363180) @@ -0,0 +1,84 @@ +.\"- +.\" Copyright (c) 2020 Rubicon Communications, LLC (Netgate) +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 23, 2020 +.Dt SAFEXCEL 4 +.Os +.Sh NAME +.Nm safexcel +.Nd Inside Secure SafeXcel-IP-97 security packet engine +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device crypto" +.Cd "device cryptodev" +.Cd "device safexcel" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +safexcel_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver implements +.Xr crypto 4 +support for the cryptographic acceleration functions of the EIP-97 device +found on some Marvell systems-on-chip. +The driver can accelerate the following AES modes: +.Pp +.Bl -bullet -compact +.It +AES-CBC +.It +AES-CTR +.It +AES-XTS +.It +AES-GCM +.It +AES-CCM +.El +.Pp +.Nm +also implements SHA1 and SHA2 transforms, and can combine AES-CBC and AES-CTR +with SHA1-HMAC and SHA2-HMAC for encrypt-then-authenticate operations. +.Sh SEE ALSO +.Xr crypto 4 , +.Xr ipsec 4 , +.Xr random 4 , +.Xr geli 8 , +.Xr crypto 9 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 13.0 . Modified: head/sys/arm64/conf/GENERIC == --- head/sys/arm64/conf/GENERIC Tue Jul 14 13:21:09 2020(r363179) +++ head/sys/arm64/conf/GENERIC Tue Jul 14 14:09:29 2020(r363180) @@ -283,6 +283,9 @@ device mv_ap806_sei# Marvell
Re: svn commit: r363172 - head/contrib/bc/src
Did you intend to commit to contrib software that has an active upstream? This is going to cause conflicts in the future. Maybe you can submit it to the new upstream instead? Warner On Mon, Jul 13, 2020 at 11:02 PM Adrian Chadd wrote: > Author: adrian > Date: Tue Jul 14 05:02:18 2020 > New Revision: 363172 > URL: https://svnweb.freebsd.org/changeset/base/363172 > > Log: > [bc] Fix a "maybe uninitialized" compiler warning under mips-gcc-6.3.0. > > I guess this didn't like the case statements.. ? But this does quieten > the compiler error. > > Modified: > head/contrib/bc/src/program.c > > Modified: head/contrib/bc/src/program.c > > == > --- head/contrib/bc/src/program.c Tue Jul 14 05:00:08 2020 > (r363171) > +++ head/contrib/bc/src/program.c Tue Jul 14 05:02:18 2020 > (r363172) > @@ -180,7 +180,7 @@ static inline BcVec* bc_program_vec(const BcProgram *p > > static BcNum* bc_program_num(BcProgram *p, BcResult *r) { > > - BcNum *n; > + BcNum *n = NULL; > > switch (r->t) { > > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r353283 - in head: lib lib/libstats share/man/man3 share/mk sys/amd64/conf sys/conf sys/kern sys/sys tools/build/options
On Mon, Oct 7, 2019 at 2:05 PM Edward Tomasz Napierala wrote: > > Author: trasz > Date: Mon Oct 7 19:05:05 2019 > New Revision: 353283 > URL: https://svnweb.freebsd.org/changeset/base/353283 > > Log: > Introduce stats(3), a flexible statistics gathering API. > > This provides a framework to define a template describing > a set of "variables of interest" and the intended way for > the framework to maintain them (for example the maximum, sum, > t-digest, or a combination thereof). Afterwards the user > code feeds in the raw data, and the framework maintains > these variables inside a user-provided, opaque stats blobs. > The framework also provides a way to selectively extract the > stats from the blobs. The stats(3) framework can be used in > both userspace and the kernel. > > See the stats(3) manual page for details. > > This will be used by the upcoming TCP statistics gathering code, > https://reviews.freebsd.org/D20655. > > The stats(3) framework is disabled by default for now, except > in the NOTES kernel (for QA); it is expected to be enabled > in amd64 GENERIC after a cool down period. > > Reviewed by: sef (earlier version) > Obtained from:Netflix > Relnotes: yes > Sponsored by: Klara Inc, Netflix > Differential Revision:https://reviews.freebsd.org/D20477 > > Added: > head/lib/libstats/ > head/lib/libstats/Makefile (contents, props changed) > head/share/man/man3/stats.3 (contents, props changed) > head/sys/kern/subr_stats.c (contents, props changed) > head/sys/sys/stats.h (contents, props changed) > head/tools/build/options/WITHOUT_STATS (contents, props changed) > head/tools/build/options/WITH_STATS (contents, props changed) > Modified: > head/lib/Makefile > head/share/man/man3/Makefile > head/share/man/man3/arb.3 > head/share/mk/bsd.libnames.mk > head/share/mk/src.libnames.mk > head/share/mk/src.opts.mk > head/sys/amd64/conf/NOTES > head/sys/conf/files > head/sys/conf/options > head/sys/sys/arb.h > > Modified: head/lib/Makefile > == > --- head/lib/Makefile Mon Oct 7 18:55:40 2019(r353282) > +++ head/lib/Makefile Mon Oct 7 19:05:05 2019(r353283) > @@ -152,6 +152,7 @@ SUBDIR.${MK_GSSAPI}+= libgssapi librpcsec_gss > SUBDIR.${MK_ICONV}+= libiconv_modules > SUBDIR.${MK_KERBEROS_SUPPORT}+=libcom_err > SUBDIR.${MK_LDNS}+=libldns > +SUBDIR.${MK_STATS}+= libstats > > # The libraries under libclang_rt can only be built by clang, and only make > # sense to build when clang is enabled at all. Furthermore, they can only be > > Added: head/lib/libstats/Makefile > == > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libstats/Makefile Mon Oct 7 19:05:05 2019(r353283) > @@ -0,0 +1,14 @@ > +# $FreeBSD$ > + > +LIB= stats > +SHLIBDIR?= /lib > +SHLIB_MAJOR= 0 > +SRCS= subr_stats.c > + > +# To debug, comment WITHOUT_ASSERT_DEBUG= and uncomment CFLAGS:= > +WITHOUT_ASSERT_DEBUG= > +#CFLAGS:=${CFLAGS:C/-O[0-9]/-O0 -g3/} -DDIAGNOSTIC > + Hi, What exactly is going on here? mjg pointed this out when we were looking at some runtime assertion related stuff. This looks like it's imposing an opinion of how it should be built and circumvent the normal way of doing things. Ideally, this would something more like with the following patch to just make sure that the CFLAGS manipulations properly happen when ASSERT_DEBUG is flipped on, and interested parties that don't want the assertions should turn ASSERT_DEBUG off. If there's a really really solid reason for libstats having its own knob, that should be considered as a formal knob rather than the ad-hockery that appears above. I'm not sure that the following patch is entirely correct, though; -DDIAGNOSTIC seems to be needed for assertions, but the -O$n replacement with -O0 -g3 looks like it should perhaps be split out to a different knob or.. something. diff --git a/lib/libstats/Makefile b/lib/libstats/Makefile index 89e10aa64c5..12345d1a61f 100644 --- a/lib/libstats/Makefile +++ b/lib/libstats/Makefile @@ -1,13 +1,16 @@ # $FreeBSD$ +.include + LIB= stats SHLIBDIR?= /lib SHLIB_MAJOR= 0 SRCS= subr_stats.c tcp_stats.c # To debug, comment WITHOUT_ASSERT_DEBUG= and uncomment CFLAGS:= -WITHOUT_ASSERT_DEBUG= -#CFLAGS:=${CFLAGS:C/-O[0-9]/-O0 -g3/} -DDIAGNOSTIC +.if ${MK_ASSERT_DEBUG} != "no" +CFLAGS:=${CFLAGS:C/-O[0-9]/-O0 -g3/} -DDIAGNOSTIC +.endif .PATH: ${.CURDIR}/../../sys/kern ${.CURDIR}/../../sys/netinet ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363178 - head/contrib/mandoc
Author: gbe (doc committer) Date: Tue Jul 14 12:02:30 2020 New Revision: 363178 URL: https://svnweb.freebsd.org/changeset/base/363178 Log: Revert r362809: Mention FreeBSD in the HISTORY sections of apropos(1) and makewhatis(8). We don't mention the first appearance of a utility in FreeBSD, when it first appeared in a BSD version that predates FreeBSD. PR: 223520, 223521 Reported by: rgrimes, imp Reviewed by: bcr (mentor) Approved by: bcr (mentor) Differential Revision:https://reviews.freebsd.org/D25521 Modified: head/contrib/mandoc/apropos.1 head/contrib/mandoc/makewhatis.8 Modified: head/contrib/mandoc/apropos.1 == --- head/contrib/mandoc/apropos.1 Tue Jul 14 10:55:19 2020 (r363177) +++ head/contrib/mandoc/apropos.1 Tue Jul 14 12:02:30 2020 (r363178) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 30 2020 $ +.Dd $Mdocdate: November 22 2018 $ .Dt APROPOS 1 .Os .Sh NAME @@ -493,12 +493,6 @@ The options .Fl acfhIKklOTWw appeared in .Ox 5.7 . -.Pp -The -.Nm -utility was integrated into -.Fx 11.1 -as part of the switch to mandoc. .Sh AUTHORS .An -nosplit .An Bill Joy Modified: head/contrib/mandoc/makewhatis.8 == --- head/contrib/mandoc/makewhatis.8Tue Jul 14 10:55:19 2020 (r363177) +++ head/contrib/mandoc/makewhatis.8Tue Jul 14 12:02:30 2020 (r363178) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 30 2020 $ +.Dd $Mdocdate: May 17 2017 $ .Dt MAKEWHATIS 8 .Os .Sh NAME @@ -211,12 +211,6 @@ and the options .Fl aCDnQT in .Ox 5.6 . -.Pp -The -.Nm -utility was integrated into -.Fx 11.1 -as part of the switch to mandoc. .Sh AUTHORS .An -nosplit .An Bill Joy ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r363177 - in head/sys: sys x86/iommu
Author: br Date: Tue Jul 14 10:55:19 2020 New Revision: 363177 URL: https://svnweb.freebsd.org/changeset/base/363177 Log: Start splitting-out the Intel DMAR busdma backend to a generic place, so it can be used on other IOMMU systems. Provide MI iommu_unit, iommu_domain and iommu_ctx structs in sys/iommu.h; use them as a first member of MD dmar_unit, dmar_domain and dmar_ctx. Change the namespace in DMAR backend: use iommu_ prefix instead of dmar_. Move some macroses and function prototypes to sys/iommu.h. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D25574 Added: head/sys/sys/iommu.h (contents, props changed) Modified: head/sys/x86/iommu/busdma_dmar.c head/sys/x86/iommu/busdma_dmar.h head/sys/x86/iommu/intel_ctx.c head/sys/x86/iommu/intel_dmar.h head/sys/x86/iommu/intel_drv.c head/sys/x86/iommu/intel_fault.c head/sys/x86/iommu/intel_gas.c head/sys/x86/iommu/intel_idpgtbl.c head/sys/x86/iommu/intel_intrmap.c head/sys/x86/iommu/intel_qi.c head/sys/x86/iommu/intel_quirks.c head/sys/x86/iommu/intel_utils.c Added: head/sys/sys/iommu.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/iommu.hTue Jul 14 10:55:19 2020(r363177) @@ -0,0 +1,155 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2013 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_IOMMU_H_ +#define _SYS_IOMMU_H_ + +#include +#include +#include + +/* Host or physical memory address, after translation. */ +typedef uint64_t iommu_haddr_t; +/* Guest or bus address, before translation. */ +typedef uint64_t iommu_gaddr_t; + +struct iommu_map_entry; +TAILQ_HEAD(iommu_map_entries_tailq, iommu_map_entry); + +struct iommu_qi_genseq { + u_int gen; + uint32_t seq; +}; + +struct iommu_map_entry { + iommu_gaddr_t start; + iommu_gaddr_t end; + iommu_gaddr_t first;/* Least start in subtree */ + iommu_gaddr_t last; /* Greatest end in subtree */ + iommu_gaddr_t free_down;/* Max free space below the + current R/B tree node */ + u_int flags; + TAILQ_ENTRY(iommu_map_entry) dmamap_link; /* Link for dmamap entries */ + RB_ENTRY(iommu_map_entry) rb_entry; /* Links for domain entries */ + TAILQ_ENTRY(iommu_map_entry) unroll_link; /* Link for unroll after + dmamap_load failure */ + struct iommu_domain *domain; + struct iommu_qi_genseq gseq; +}; + +#defineIOMMU_MAP_ENTRY_PLACE 0x0001 /* Fake entry */ +#defineIOMMU_MAP_ENTRY_RMRR0x0002 /* Permanent, not linked by + dmamap_link */ +#defineIOMMU_MAP_ENTRY_MAP 0x0004 /* Busdma created, linked by + dmamap_link */ +#defineIOMMU_MAP_ENTRY_UNMAPPED0x0010 /* No backing pages */ +#defineIOMMU_MAP_ENTRY_QI_NF 0x0020 /* qi task, do not free entry */ +#defineIOMMU_MAP_ENTRY_READ0x1000 /* Read permitted */ +#defineIOMMU_MAP_ENTRY_WRITE 0x2000 /* Write permitted */ +#defineIOMMU_MAP_ENTRY_SNOOP 0x4000 /* Snoop */ +#defineIOMMU_MAP_ENTRY_TM 0x8000 /* Transient */ + +struct iommu_unit { + struct mtx lock; + int unit; + + int
Re: svn commit: r363176 - head/usr.sbin
Adrian Chadd wrote: Author: adrian Date: Tue Jul 14 05:33:23 2020 New Revision: 363176 URL: https://svnweb.freebsd.org/changeset/base/363176 Log: [pmc] whoops, remove spurious #'s pointed out by gonzo@, thanks! Modified: head/usr.sbin/Makefile Now after r363174 and r363176: $ svn diff -r 363173:363176 usr.sbin/Makefile (empty) Did you mean to do something else here? ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"