svn commit: r357798 - head/lib/libcompiler_rt
Author: imp Date: Wed Feb 12 06:56:04 2020 New Revision: 357798 URL: https://svnweb.freebsd.org/changeset/base/357798 Log: Remove sparc64 specific inclusion of bswap32 built-ins. Modified: head/lib/libcompiler_rt/Makefile.inc Modified: head/lib/libcompiler_rt/Makefile.inc == --- head/lib/libcompiler_rt/Makefile.incWed Feb 12 06:54:34 2020 (r357797) +++ head/lib/libcompiler_rt/Makefile.incWed Feb 12 06:56:04 2020 (r357798) @@ -244,8 +244,7 @@ SRCS+= sync_synchronize.S .endif # On some archs GCC-6.3 requires bswap32 built-in. -.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" || \ -${MACHINE_CPUARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" SRCS+= bswapdi2.c SRCS+= bswapsi2.c .endif ___ 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: r357796 - head/lib
Author: imp Date: Wed Feb 12 06:54:28 2020 New Revision: 357796 URL: https://svnweb.freebsd.org/changeset/base/357796 Log: Remove excluding libproc and librtld_db on sparc64. Modified: head/lib/Makefile Modified: head/lib/Makefile == --- head/lib/Makefile Wed Feb 12 06:53:29 2020(r357795) +++ head/lib/Makefile Wed Feb 12 06:54:28 2020(r357796) @@ -72,13 +72,13 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libpathconv \ libpcap \ libpjdlog \ - ${_libproc} \ + libproc \ libprocstat \ libregex \ librpcsvc \ librss \ librt \ - ${_librtld_db} \ + librtld_db \ libsbuf \ libsmb \ libsqlite3 \ @@ -193,11 +193,6 @@ SUBDIR.${MK_PMC}+= libopencsd .if ${MACHINE_CPUARCH} == "amd64" SUBDIR.${MK_PMC}+= libipt SUBDIR.${MK_BHYVE}+= libvmmapi -.endif - -.if ${MACHINE_CPUARCH} != "sparc64" -_libproc= libproc -_librtld_db= librtld_db .endif .if ${MACHINE_ARCH} != "powerpc" ___ 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: r357797 - head/lib/libarchive
Author: imp Date: Wed Feb 12 06:54:34 2020 New Revision: 357797 URL: https://svnweb.freebsd.org/changeset/base/357797 Log: Remove sparc64 specific warning suppression. Modified: head/lib/libarchive/Makefile Modified: head/lib/libarchive/Makefile == --- head/lib/libarchive/MakefileWed Feb 12 06:54:28 2020 (r357796) +++ head/lib/libarchive/MakefileWed Feb 12 06:54:34 2020 (r357797) @@ -31,7 +31,7 @@ SHARED_CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICON .endif .if ${MACHINE_ARCH:Marm*} != "" || ${MACHINE_ARCH:Mmips*} != "" || \ - ${MACHINE_ARCH:Msparc64*} != "" || ${MACHINE_ARCH:Mpowerpc*} != "" + ${MACHINE_ARCH:Mpowerpc*} != "" NO_WCAST_ALIGN=yes .if ${MACHINE_ARCH:M*64*} == "" CFLAGS+= -DPPMD_32BIT ___ 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: r357795 - head/lib/libkvm
Author: imp Date: Wed Feb 12 06:53:29 2020 New Revision: 357795 URL: https://svnweb.freebsd.org/changeset/base/357795 Log: Remove sparc64 files These were disconnected from the build when the kernel was removed. Since they depend on removed parts of the kernel, remove them completely. Deleted: head/lib/libkvm/kvm_sparc64.c head/lib/libkvm/kvm_sparc64.h ___ 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: r357794 - in head/share/man: man4 man4/man4.sparc64 man9
Author: imp Date: Wed Feb 12 06:52:22 2020 New Revision: 357794 URL: https://svnweb.freebsd.org/changeset/base/357794 Log: Remove sparc64 specific bits of the man pages. Deleted: head/share/man/man4/man4.sparc64/Makefile head/share/man/man4/man4.sparc64/Makefile.depend head/share/man/man4/man4.sparc64/auxio.4 head/share/man/man4/man4.sparc64/central.4 head/share/man/man4/man4.sparc64/clkbrd.4 head/share/man/man4/man4.sparc64/creator.4 head/share/man/man4/man4.sparc64/ebus.4 head/share/man/man4/man4.sparc64/eeprom.4 head/share/man/man4/man4.sparc64/fhc.4 head/share/man/man4/man4.sparc64/machfb.4 head/share/man/man4/man4.sparc64/ofw_console.4 head/share/man/man4/man4.sparc64/openfirm.4 head/share/man/man4/man4.sparc64/openprom.4 head/share/man/man4/man4.sparc64/rtc.4 head/share/man/man4/man4.sparc64/sbus.4 head/share/man/man4/man4.sparc64/snd_audiocs.4 Modified: head/share/man/man4/cas.4 head/share/man/man4/dc.4 head/share/man/man4/ddb.4 head/share/man/man4/gem.4 head/share/man/man4/hme.4 head/share/man/man4/le.4 head/share/man/man4/pcm.4 head/share/man/man4/smp.4 head/share/man/man9/bus_dma.9 Modified: head/share/man/man4/cas.4 == --- head/share/man/man4/cas.4 Wed Feb 12 02:55:06 2020(r357793) +++ head/share/man/man4/cas.4 Wed Feb 12 06:52:22 2020(r357794) @@ -105,29 +105,6 @@ Sun Quad GigaSwift Ethernet UTP (QGE) Sun Quad GigaSwift Ethernet PCI-X (QGE-X) (part no.\& 501-6738) .El -.Sh NOTES -On sparc64 the -.Nm -driver respects the -.Va local-mac-address? -system configuration variable which can be set in the Open Firmware boot -monitor using the -.Ic setenv -command or by -.Xr eeprom 8 . -If set to -.Dq Li false -(the default), the -.Nm -driver will use the system's default MAC address for all of its devices. -If set to -.Dq Li true , -the unique MAC address of each interface is used if present rather than -the system's default MAC address. -.Pp -Supported interfaces having their own MAC address include on-board -versions on boards equipped with more than one Ethernet interface and -all add-on cards. .Sh SEE ALSO .Xr altq 4 , .Xr miibus 4 , Modified: head/share/man/man4/dc.4 == --- head/share/man/man4/dc.4Wed Feb 12 02:55:06 2020(r357793) +++ head/share/man/man4/dc.4Wed Feb 12 06:52:22 2020(r357794) @@ -262,28 +262,6 @@ Xircom Cardbus Ethernet 10/100 .It Xircom Cardbus Ethernet II 10/100 .El -.Sh NOTES -On sparc64 the -.Nm -driver respects the -.Va local-mac-address? -system configuration variable for the built in Sun DMFE 10/100 Mbps Ethernet -interfaces on Sun Netra X1 and Sun Fire V100. -This system configuration variable can be set in the Open Firmware boot -monitor using the -.Ic setenv -command or by -.Xr eeprom 8 . -If set to -.Dq Li false -(the default), the -.Nm -driver will use the system's default MAC address for both of the built in -devices. -If set to -.Dq Li true , -the unique MAC address of each interface is used rather than the system's -default MAC address. .Sh DIAGNOSTICS .Bl -diag .It "dc%d: couldn't map ports/memory" Modified: head/share/man/man4/ddb.4 == --- head/share/man/man4/ddb.4 Wed Feb 12 02:55:06 2020(r357793) +++ head/share/man/man4/ddb.4 Wed Feb 12 06:52:22 2020(r357794) @@ -1477,9 +1477,6 @@ event. .It Va kdb.enter.panic .Xr panic 9 was called. -.It Va kdb.enter.powerfail -The kernel debugger was entered as a result of a powerfail NMI on the sparc64 -platform. .It Va kdb.enter.powerpc The kernel debugger was entered as a result of an unimplemented interrupt type on the powerpc platform. @@ -1487,9 +1484,6 @@ type on the powerpc platform. The kernel debugger was entered as a result of the .Va debug.kdb.enter sysctl being set. -.It Va kdb.enter.trapsig -The kernel debugger was entered as a result of a trapsig event on the sparc64 -platform. .It Va kdb.enter.unionfs The kernel debugger was entered as a result of an assertion failure in the union file system. Modified: head/share/man/man4/gem.4 == --- head/share/man/man4/gem.4 Wed Feb 12 02:55:06 2020(r357793) +++ head/share/man/man4/gem.4 Wed Feb 12 06:52:22 2020(r357794) @@ -87,29 +87,6 @@ Sun Gigabit Ethernet PCI 2.0/3.0 (GBE/P) Sun Gigabit Ethernet SBus 2.0/3.0 (GBE/S) (part no.\& 501-4375) .El -.Sh NOTES -On sparc64 the -.Nm -driver respects the -.Va local-mac-address? -system configuration variable which can be set in the Open Firmware boot -monitor using the -.Ic setenv -command or by -.Xr eeprom 8 . -If set to -.Dq Li false -(the default), the -.Nm -driver will use the system's default MAC address for all of its devices. -If set to -.Dq Li true , -the
svn commit: r357793 - in head/sys: conf dev/cxgbe/firmware modules/cxgbe/t4_firmware modules/cxgbe/t5_firmware modules/cxgbe/t6_firmware
Author: np Date: Wed Feb 12 02:55:06 2020 New Revision: 357793 URL: https://svnweb.freebsd.org/changeset/base/357793 Log: cxgbe(4): Update T4/5/6 firmwares to 1.24.12.0. Obtained from:Chelsio Communications MFC after:1 month Sponsored by: Chelsio Communications Added: head/sys/dev/cxgbe/firmware/t4fw-1.24.12.0.bin (contents, props changed) head/sys/dev/cxgbe/firmware/t5fw-1.24.12.0.bin (contents, props changed) head/sys/dev/cxgbe/firmware/t6fw-1.24.12.0.bin (contents, props changed) Deleted: head/sys/dev/cxgbe/firmware/t4fw-1.24.11.0.bin head/sys/dev/cxgbe/firmware/t5fw-1.24.11.0.bin head/sys/dev/cxgbe/firmware/t6fw-1.24.11.0.bin Modified: head/sys/conf/files head/sys/dev/cxgbe/firmware/t4fw_interface.h head/sys/modules/cxgbe/t4_firmware/Makefile head/sys/modules/cxgbe/t5_firmware/Makefile head/sys/modules/cxgbe/t6_firmware/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Wed Feb 12 02:17:20 2020(r357792) +++ head/sys/conf/files Wed Feb 12 02:55:06 2020(r357793) @@ -1473,7 +1473,7 @@ t4fw.fwo optional cxgbe \ no-implicit-rule\ clean "t4fw.fwo" t4fw.fwoptional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t4fw-1.24.11.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t4fw-1.24.12.0.bin" \ compile-with"${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw.fw" @@ -1507,7 +1507,7 @@ t5fw.fwo optional cxgbe \ no-implicit-rule\ clean "t5fw.fwo" t5fw.fwoptional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t5fw-1.24.11.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t5fw-1.24.12.0.bin" \ compile-with"${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw.fw" @@ -1541,7 +1541,7 @@ t6fw.fwo optional cxgbe \ no-implicit-rule\ clean "t6fw.fwo" t6fw.fwoptional cxgbe \ - dependency "$S/dev/cxgbe/firmware/t6fw-1.24.11.0.bin" \ + dependency "$S/dev/cxgbe/firmware/t6fw-1.24.12.0.bin" \ compile-with"${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw.fw" Added: head/sys/dev/cxgbe/firmware/t4fw-1.24.12.0.bin == Binary file. No diff available. Modified: head/sys/dev/cxgbe/firmware/t4fw_interface.h == --- head/sys/dev/cxgbe/firmware/t4fw_interface.hWed Feb 12 02:17:20 2020(r357792) +++ head/sys/dev/cxgbe/firmware/t4fw_interface.hWed Feb 12 02:55:06 2020(r357793) @@ -9940,17 +9940,17 @@ enum fw_hdr_chip { enum { T4FW_VERSION_MAJOR = 1, T4FW_VERSION_MINOR = 24, - T4FW_VERSION_MICRO = 11, + T4FW_VERSION_MICRO = 12, T4FW_VERSION_BUILD = 0, T5FW_VERSION_MAJOR = 1, T5FW_VERSION_MINOR = 24, - T5FW_VERSION_MICRO = 11, + T5FW_VERSION_MICRO = 12, T5FW_VERSION_BUILD = 0, T6FW_VERSION_MAJOR = 1, T6FW_VERSION_MINOR = 24, - T6FW_VERSION_MICRO = 11, + T6FW_VERSION_MICRO = 12, T6FW_VERSION_BUILD = 0, }; Added: head/sys/dev/cxgbe/firmware/t5fw-1.24.12.0.bin == Binary file. No diff available. Added: head/sys/dev/cxgbe/firmware/t6fw-1.24.12.0.bin == Binary file. No diff available. Modified: head/sys/modules/cxgbe/t4_firmware/Makefile == --- head/sys/modules/cxgbe/t4_firmware/Makefile Wed Feb 12 02:17:20 2020 (r357792) +++ head/sys/modules/cxgbe/t4_firmware/Makefile Wed Feb 12 02:55:06 2020 (r357793) @@ -17,7 +17,7 @@ FIRMWS+= ${F}:${F:C/.txt//}:1.0.0.0 .endif .endfor -T4FW_VER= 1.24.11.0 +T4FW_VER= 1.24.12.0 FIRMWS+= t4fw-${T4FW_VER}.bin:t4fw:${T4FW_VER} .include Modified:
svn commit: r357792 - in stable: 11/sys/geom/eli 12/sys/geom/eli
Author: kevans Date: Wed Feb 12 02:17:20 2020 New Revision: 357792 URL: https://svnweb.freebsd.org/changeset/base/357792 Log: MFC r357665: geli taste: allow GELIBOOT tagged providers as well Currently the installer will tag geliboot partitions with both BOOT and GELIBOOT; the former allows the kernel to taste it at boot, while the latter is what loaders keys off of. However, it seems reasonable to assume that if a provider's been tagged with GELIBOOT that the kernel should also take that as a hint to taste/attach at boot. This would allow us to stop tagging GELIBOOT partitions with BOOT in bsdinstall, but I'm not sure that there's a compelling reason to do so any time soon. Modified: stable/12/sys/geom/eli/g_eli.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/geom/eli/g_eli.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/geom/eli/g_eli.c == --- stable/12/sys/geom/eli/g_eli.c Wed Feb 12 02:09:12 2020 (r357791) +++ stable/12/sys/geom/eli/g_eli.c Wed Feb 12 02:17:20 2020 (r357792) @@ -1081,7 +1081,8 @@ g_eli_taste(struct g_class *mp, struct g_provider *pp, if (md.md_provsize != pp->mediasize) return (NULL); /* Should we attach it on boot? */ - if (!(md.md_flags & G_ELI_FLAG_BOOT)) + if (!(md.md_flags & G_ELI_FLAG_BOOT) && + !(md.md_flags & G_ELI_FLAG_GELIBOOT)) return (NULL); if (md.md_keys == 0x00) { G_ELI_DEBUG(0, "No valid keys on %s.", pp->name); ___ 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: r357792 - in stable: 11/sys/geom/eli 12/sys/geom/eli
Author: kevans Date: Wed Feb 12 02:17:20 2020 New Revision: 357792 URL: https://svnweb.freebsd.org/changeset/base/357792 Log: MFC r357665: geli taste: allow GELIBOOT tagged providers as well Currently the installer will tag geliboot partitions with both BOOT and GELIBOOT; the former allows the kernel to taste it at boot, while the latter is what loaders keys off of. However, it seems reasonable to assume that if a provider's been tagged with GELIBOOT that the kernel should also take that as a hint to taste/attach at boot. This would allow us to stop tagging GELIBOOT partitions with BOOT in bsdinstall, but I'm not sure that there's a compelling reason to do so any time soon. Modified: stable/11/sys/geom/eli/g_eli.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/geom/eli/g_eli.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/geom/eli/g_eli.c == --- stable/11/sys/geom/eli/g_eli.c Wed Feb 12 02:09:12 2020 (r357791) +++ stable/11/sys/geom/eli/g_eli.c Wed Feb 12 02:17:20 2020 (r357792) @@ -1080,7 +1080,8 @@ g_eli_taste(struct g_class *mp, struct g_provider *pp, if (md.md_provsize != pp->mediasize) return (NULL); /* Should we attach it on boot? */ - if (!(md.md_flags & G_ELI_FLAG_BOOT)) + if (!(md.md_flags & G_ELI_FLAG_BOOT) && + !(md.md_flags & G_ELI_FLAG_GELIBOOT)) return (NULL); if (md.md_keys == 0x00) { G_ELI_DEBUG(0, "No valid keys on %s.", pp->name); ___ 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: r357791 - in stable: 11/usr.bin/env 12/usr.bin/env
Author: kevans Date: Wed Feb 12 02:09:12 2020 New Revision: 357791 URL: https://svnweb.freebsd.org/changeset/base/357791 Log: MFC r357563: env(1): grow -L user/class and -U user/class options This allows one to set the environment of the specified user either from login.conf alone (-L) or both login.conf and ~/.login_conf if present (-U). This is a supporting feature to allow service(8) to pull in the environment of the "daemon" class before invoking the rc script. Modified: stable/11/usr.bin/env/Makefile stable/11/usr.bin/env/env.1 stable/11/usr.bin/env/env.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.bin/env/Makefile stable/12/usr.bin/env/env.1 stable/12/usr.bin/env/env.c Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.bin/env/Makefile == --- stable/11/usr.bin/env/Makefile Wed Feb 12 02:07:37 2020 (r357790) +++ stable/11/usr.bin/env/Makefile Wed Feb 12 02:09:12 2020 (r357791) @@ -4,4 +4,6 @@ PROG= env SRCS= env.c envopts.c +LIBADD=util + .include Modified: stable/11/usr.bin/env/env.1 == --- stable/11/usr.bin/env/env.1 Wed Feb 12 02:07:37 2020(r357790) +++ stable/11/usr.bin/env/env.1 Wed Feb 12 02:09:12 2020(r357791) @@ -31,7 +31,7 @@ .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" $FreeBSD$ .\" -.Dd November 7, 2019 +.Dd January 19, 2020 .Dt ENV 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Sh SYNOPSIS .Nm .Op Fl 0iv +.Op Fl L Ns | Ns Fl U Ar user Ns Op / Ns Ar class .Op Fl P Ar altpath .Op Fl S Ar string .Op Fl u Ar name @@ -76,6 +77,28 @@ The environment inherited by .Nm is ignored completely. +.\"-L | -U +.It Fl L | Fl U Ar user Ns Op / Ns Ar class +Add the environment variable definitions from +.Xr login.conf 5 +for the specified user and login class to the environment, after +processing any +.Fl i +or +.Fl u +options, but before processing any +.Ar name Ns = Ns Ar value +options. +If +.Fl L +is used, only the system-wide +.Pa /etc/login.conf.db +file is read; if +.Fl U +is used, then the specified user's +.Pa ~/.login_conf +is read as well. +The user may be specified by name or by uid. .\"-P .It Fl P Ar altpath Search the set of directories as specified by @@ -450,6 +473,7 @@ option as a synonym for .Xr printenv 1 , .Xr sh 1 , .Xr execvp 3 , +.Xr login.conf 5 , .Xr environ 7 .Sh STANDARDS The @@ -457,7 +481,7 @@ The utility conforms to .St -p1003.1-2001 . The -.Fl P , S , u +.Fl 0 , L , P , S , U , u and .Fl v options are non-standard extensions supported by @@ -474,6 +498,12 @@ and .Fl v options were added in .Fx 6.0 . +The +.Fl 0 , L +and +.Fl U +options were added in +.Fx 13.0 . .Sh BUGS The .Nm Modified: stable/11/usr.bin/env/env.c == --- stable/11/usr.bin/env/env.c Wed Feb 12 02:07:37 2020(r357790) +++ stable/11/usr.bin/env/env.c Wed Feb 12 02:09:12 2020(r357791) @@ -42,11 +42,16 @@ static char sccsid[] = "@(#)env.c 8.3 (Berkeley) 4/2/9 #include __FBSDID("$FreeBSD$"); +#include + #include #include +#include +#include +#include #include -#include #include +#include #include #include "envopts.h" @@ -69,13 +74,23 @@ main(int argc, char **argv) { char *altpath, **ep, *p, **parg, term; char *cleanenv[1]; + char *login_class, *login_name; + struct passwd *pw; + login_cap_t *lc; + bool login_as_user; + uid_t uid; int ch, want_clear; int rtrn; altpath = NULL; + login_class = NULL; + login_name = NULL; + pw = NULL; + lc = NULL; + login_as_user = false; want_clear = 0; term = '\n'; - while ((ch = getopt(argc, argv, "-0iP:S:u:v")) != -1) + while ((ch = getopt(argc, argv, "-0iL:P:S:U:u:v")) != -1) switch(ch) { case '-': case 'i': @@ -84,6 +99,12 @@ main(int argc, char **argv) case '0': term = '\0'; break; + case 'U': + login_as_user = true; + /* FALLTHROUGH */ + case 'L': + login_name = optarg; + break; case 'P': altpath = strdup(optarg); break; @@ -117,6 +138,48 @@ main(int argc, char **argv) if (env_verbosity) fprintf(stderr, "#env clearing environ\n"); } + if (login_name != NULL) { + login_class = strchr(login_name, '/'); + if (login_class) +
svn commit: r357791 - in stable: 11/usr.bin/env 12/usr.bin/env
Author: kevans Date: Wed Feb 12 02:09:12 2020 New Revision: 357791 URL: https://svnweb.freebsd.org/changeset/base/357791 Log: MFC r357563: env(1): grow -L user/class and -U user/class options This allows one to set the environment of the specified user either from login.conf alone (-L) or both login.conf and ~/.login_conf if present (-U). This is a supporting feature to allow service(8) to pull in the environment of the "daemon" class before invoking the rc script. Modified: stable/12/usr.bin/env/Makefile stable/12/usr.bin/env/env.1 stable/12/usr.bin/env/env.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.bin/env/Makefile stable/11/usr.bin/env/env.1 stable/11/usr.bin/env/env.c Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.bin/env/Makefile == --- stable/12/usr.bin/env/Makefile Wed Feb 12 02:07:37 2020 (r357790) +++ stable/12/usr.bin/env/Makefile Wed Feb 12 02:09:12 2020 (r357791) @@ -4,4 +4,6 @@ PROG= env SRCS= env.c envopts.c +LIBADD=util + .include Modified: stable/12/usr.bin/env/env.1 == --- stable/12/usr.bin/env/env.1 Wed Feb 12 02:07:37 2020(r357790) +++ stable/12/usr.bin/env/env.1 Wed Feb 12 02:09:12 2020(r357791) @@ -31,7 +31,7 @@ .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" $FreeBSD$ .\" -.Dd November 7, 2019 +.Dd January 19, 2020 .Dt ENV 1 .Os .Sh NAME @@ -40,6 +40,7 @@ .Sh SYNOPSIS .Nm .Op Fl 0iv +.Op Fl L Ns | Ns Fl U Ar user Ns Op / Ns Ar class .Op Fl P Ar altpath .Op Fl S Ar string .Op Fl u Ar name @@ -76,6 +77,28 @@ The environment inherited by .Nm is ignored completely. +.\"-L | -U +.It Fl L | Fl U Ar user Ns Op / Ns Ar class +Add the environment variable definitions from +.Xr login.conf 5 +for the specified user and login class to the environment, after +processing any +.Fl i +or +.Fl u +options, but before processing any +.Ar name Ns = Ns Ar value +options. +If +.Fl L +is used, only the system-wide +.Pa /etc/login.conf.db +file is read; if +.Fl U +is used, then the specified user's +.Pa ~/.login_conf +is read as well. +The user may be specified by name or by uid. .\"-P .It Fl P Ar altpath Search the set of directories as specified by @@ -450,6 +473,7 @@ option as a synonym for .Xr printenv 1 , .Xr sh 1 , .Xr execvp 3 , +.Xr login.conf 5 , .Xr environ 7 .Sh STANDARDS The @@ -457,7 +481,7 @@ The utility conforms to .St -p1003.1-2001 . The -.Fl P , S , u +.Fl 0 , L , P , S , U , u and .Fl v options are non-standard extensions supported by @@ -474,6 +498,12 @@ and .Fl v options were added in .Fx 6.0 . +The +.Fl 0 , L +and +.Fl U +options were added in +.Fx 13.0 . .Sh BUGS The .Nm Modified: stable/12/usr.bin/env/env.c == --- stable/12/usr.bin/env/env.c Wed Feb 12 02:07:37 2020(r357790) +++ stable/12/usr.bin/env/env.c Wed Feb 12 02:09:12 2020(r357791) @@ -44,11 +44,16 @@ static char sccsid[] = "@(#)env.c 8.3 (Berkeley) 4/2/9 #include __FBSDID("$FreeBSD$"); +#include + #include #include +#include +#include +#include #include -#include #include +#include #include #include "envopts.h" @@ -71,13 +76,23 @@ main(int argc, char **argv) { char *altpath, **ep, *p, **parg, term; char *cleanenv[1]; + char *login_class, *login_name; + struct passwd *pw; + login_cap_t *lc; + bool login_as_user; + uid_t uid; int ch, want_clear; int rtrn; altpath = NULL; + login_class = NULL; + login_name = NULL; + pw = NULL; + lc = NULL; + login_as_user = false; want_clear = 0; term = '\n'; - while ((ch = getopt(argc, argv, "-0iP:S:u:v")) != -1) + while ((ch = getopt(argc, argv, "-0iL:P:S:U:u:v")) != -1) switch(ch) { case '-': case 'i': @@ -86,6 +101,12 @@ main(int argc, char **argv) case '0': term = '\0'; break; + case 'U': + login_as_user = true; + /* FALLTHROUGH */ + case 'L': + login_name = optarg; + break; case 'P': altpath = strdup(optarg); break; @@ -119,6 +140,48 @@ main(int argc, char **argv) if (env_verbosity) fprintf(stderr, "#env clearing environ\n"); } + if (login_name != NULL) { + login_class = strchr(login_name, '/'); + if (login_class) +
svn commit: r357790 - in stable: 11/usr.bin/env 12/usr.bin/env
Author: kevans Date: Wed Feb 12 02:07:37 2020 New Revision: 357790 URL: https://svnweb.freebsd.org/changeset/base/357790 Log: MFC r354450: Add -0 option to ENV(1) With the -0 option added to ENV(1), some ports will no longer require genv from sysutils/coreutils. Modified: stable/12/usr.bin/env/env.1 stable/12/usr.bin/env/env.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.bin/env/env.1 stable/11/usr.bin/env/env.c Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.bin/env/env.1 == --- stable/12/usr.bin/env/env.1 Wed Feb 12 02:04:03 2020(r357789) +++ stable/12/usr.bin/env/env.1 Wed Feb 12 02:07:37 2020(r357790) @@ -31,7 +31,7 @@ .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" $FreeBSD$ .\" -.Dd April 17, 2008 +.Dd November 7, 2019 .Dt ENV 1 .Os .Sh NAME @@ -39,7 +39,7 @@ .Nd set environment and execute command, or print environment .Sh SYNOPSIS .Nm -.Op Fl iv +.Op Fl 0iv .Op Fl P Ar altpath .Op Fl S Ar string .Op Fl u Ar name @@ -64,6 +64,8 @@ is executed. .Pp The options are as follows: .Bl -tag -width indent +.It Fl 0 +End each output line with NUL, not newline. .It Fl i Execute the .Ar utility @@ -130,8 +132,15 @@ If no .Ar utility is specified, .Nm -prints out the names and values -of the variables in the environment, with one name/value pair per line. +prints out the names and values of the variables in the environment. +Each name/value pair is separated by a new line unless +.Fl 0 +is specified, in which case name/value pairs are separated by NUL. +Both +.Fl 0 +and +.Ar utility +may not be specified together. .\" .Ss Details of Fl S \ (split-string) processing The processing of the Modified: stable/12/usr.bin/env/env.c == --- stable/12/usr.bin/env/env.c Wed Feb 12 02:04:03 2020(r357789) +++ stable/12/usr.bin/env/env.c Wed Feb 12 02:07:37 2020(r357790) @@ -59,22 +59,33 @@ int env_verbosity; static void usage(void); +/* + * Exit codes. + */ +#define EXIT_CANCELED 125 /* Internal error prior to exec attempt. */ +#define EXIT_CANNOT_INVOKE 126 /* Program located, but not usable. */ +#define EXIT_ENOENT127 /* Could not find program to exec. */ + int main(int argc, char **argv) { - char *altpath, **ep, *p, **parg; + char *altpath, **ep, *p, **parg, term; char *cleanenv[1]; int ch, want_clear; int rtrn; altpath = NULL; want_clear = 0; - while ((ch = getopt(argc, argv, "-iP:S:u:v")) != -1) + term = '\n'; + while ((ch = getopt(argc, argv, "-0iP:S:u:v")) != -1) switch(ch) { case '-': case 'i': want_clear = 1; break; + case '0': + term = '\0'; + break; case 'P': altpath = strdup(optarg); break; @@ -118,6 +129,8 @@ main(int argc, char **argv) err(EXIT_FAILURE, "setenv %s", *argv); } if (*argv) { + if (term == '\0') + errx(EXIT_CANCELED, "cannot specify command with -0"); if (altpath) search_paths(altpath, argv); if (env_verbosity) { @@ -129,10 +142,11 @@ main(int argc, char **argv) sleep(1); } execvp(*argv, argv); - err(errno == ENOENT ? 127 : 126, "%s", *argv); + err(errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE, + "%s", *argv); } for (ep = environ; *ep; ep++) - (void)printf("%s\n", *ep); + (void)printf("%s%c", *ep, term); exit(0); } @@ -140,7 +154,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: env [-iv] [-P utilpath] [-S string] [-u name]\n" + "usage: env [-0iv] [-P utilpath] [-S string] [-u name]\n" " [name=value ...] [utility [argument ...]]\n"); 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"
svn commit: r357790 - in stable: 11/usr.bin/env 12/usr.bin/env
Author: kevans Date: Wed Feb 12 02:07:37 2020 New Revision: 357790 URL: https://svnweb.freebsd.org/changeset/base/357790 Log: MFC r354450: Add -0 option to ENV(1) With the -0 option added to ENV(1), some ports will no longer require genv from sysutils/coreutils. Modified: stable/11/usr.bin/env/env.1 stable/11/usr.bin/env/env.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.bin/env/env.1 stable/12/usr.bin/env/env.c Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.bin/env/env.1 == --- stable/11/usr.bin/env/env.1 Wed Feb 12 02:04:03 2020(r357789) +++ stable/11/usr.bin/env/env.1 Wed Feb 12 02:07:37 2020(r357790) @@ -31,7 +31,7 @@ .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" $FreeBSD$ .\" -.Dd April 17, 2008 +.Dd November 7, 2019 .Dt ENV 1 .Os .Sh NAME @@ -39,7 +39,7 @@ .Nd set environment and execute command, or print environment .Sh SYNOPSIS .Nm -.Op Fl iv +.Op Fl 0iv .Op Fl P Ar altpath .Op Fl S Ar string .Op Fl u Ar name @@ -64,6 +64,8 @@ is executed. .Pp The options are as follows: .Bl -tag -width indent +.It Fl 0 +End each output line with NUL, not newline. .It Fl i Execute the .Ar utility @@ -130,8 +132,15 @@ If no .Ar utility is specified, .Nm -prints out the names and values -of the variables in the environment, with one name/value pair per line. +prints out the names and values of the variables in the environment. +Each name/value pair is separated by a new line unless +.Fl 0 +is specified, in which case name/value pairs are separated by NUL. +Both +.Fl 0 +and +.Ar utility +may not be specified together. .\" .Ss Details of Fl S \ (split-string) processing The processing of the Modified: stable/11/usr.bin/env/env.c == --- stable/11/usr.bin/env/env.c Wed Feb 12 02:04:03 2020(r357789) +++ stable/11/usr.bin/env/env.c Wed Feb 12 02:07:37 2020(r357790) @@ -57,22 +57,33 @@ int env_verbosity; static void usage(void); +/* + * Exit codes. + */ +#define EXIT_CANCELED 125 /* Internal error prior to exec attempt. */ +#define EXIT_CANNOT_INVOKE 126 /* Program located, but not usable. */ +#define EXIT_ENOENT127 /* Could not find program to exec. */ + int main(int argc, char **argv) { - char *altpath, **ep, *p, **parg; + char *altpath, **ep, *p, **parg, term; char *cleanenv[1]; int ch, want_clear; int rtrn; altpath = NULL; want_clear = 0; - while ((ch = getopt(argc, argv, "-iP:S:u:v")) != -1) + term = '\n'; + while ((ch = getopt(argc, argv, "-0iP:S:u:v")) != -1) switch(ch) { case '-': case 'i': want_clear = 1; break; + case '0': + term = '\0'; + break; case 'P': altpath = strdup(optarg); break; @@ -116,6 +127,8 @@ main(int argc, char **argv) err(EXIT_FAILURE, "setenv %s", *argv); } if (*argv) { + if (term == '\0') + errx(EXIT_CANCELED, "cannot specify command with -0"); if (altpath) search_paths(altpath, argv); if (env_verbosity) { @@ -127,10 +140,11 @@ main(int argc, char **argv) sleep(1); } execvp(*argv, argv); - err(errno == ENOENT ? 127 : 126, "%s", *argv); + err(errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE, + "%s", *argv); } for (ep = environ; *ep; ep++) - (void)printf("%s\n", *ep); + (void)printf("%s%c", *ep, term); exit(0); } @@ -138,7 +152,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: env [-iv] [-P utilpath] [-S string] [-u name]\n" + "usage: env [-0iv] [-P utilpath] [-S string] [-u name]\n" " [name=value ...] [utility [argument ...]]\n"); 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"
svn commit: r357789 - in stable: 11/etc 11/lib/libutil 12/lib/libutil 12/usr.bin/login
Author: kevans Date: Wed Feb 12 02:04:03 2020 New Revision: 357789 URL: https://svnweb.freebsd.org/changeset/base/357789 Log: MFC r357560, r357707: login.conf(5) mail capability r357560: login.conf(5): split MAIL env var out into a "mail" capability This allows it to be easily suppressed in, e.g., the "daemon" class where it will not be properly expanded. This is a part of D21481. Submitted by: Andrew Gierth r357707: login.conf(5): update commented-out standard, too MAIL now has a mail capability, instead, as of r357560. Modified: stable/11/etc/login.conf stable/11/lib/libutil/login.conf.5 stable/11/lib/libutil/login_class.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libutil/login.conf.5 stable/12/lib/libutil/login_class.c stable/12/usr.bin/login/login.conf Directory Properties: stable/12/ (props changed) Modified: stable/11/etc/login.conf == --- stable/11/etc/login.confWed Feb 12 00:58:17 2020(r357788) +++ stable/11/etc/login.confWed Feb 12 02:04:03 2020(r357789) @@ -26,7 +26,8 @@ default:\ :passwd_format=sha512:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ - :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ + :setenv=BLOCKSIZE=K:\ + :mail=/var/mail/$:\ :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\ :nologin=/var/run/nologin:\ :cputime=unlimited:\ @@ -61,6 +62,7 @@ xuser:\ staff:\ :tc=default: daemon:\ + :mail@:\ :memorylocked=128M:\ :tc=default: news:\ @@ -121,7 +123,8 @@ russian|Russian Users Accounts:\ #standard:\ # :copyright=/etc/COPYRIGHT:\ # :welcome=/etc/motd:\ -# :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ +# :setenv=BLOCKSIZE=K:\ +# :mail=/var/mail/$:\ # :path=~/bin /bin /usr/bin /usr/local/bin:\ # :manpath=/usr/share/man /usr/local/man:\ # :nologin=/var/run/nologin:\ Modified: stable/11/lib/libutil/login.conf.5 == --- stable/11/lib/libutil/login.conf.5 Wed Feb 12 00:58:17 2020 (r357788) +++ stable/11/lib/libutil/login.conf.5 Wed Feb 12 02:04:03 2020 (r357789) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2011 +.Dd January 19, 2020 .Dt LOGIN.CONF 5 .Os .Sh NAME @@ -237,6 +237,7 @@ for details. .It "label string Default MAC policy; see" .Xr maclabel 7 . .It "lang string Set $LANG environment variable to the specified value." +.It "mail string Set $MAIL environment variable to the specified value." .It "manpath pathDefault search path for manpages." .It "nocheckmail boolfalse Display mail status at login." .It "nologin fileIf the file exists it will be displayed and" Modified: stable/11/lib/libutil/login_class.c == --- stable/11/lib/libutil/login_class.c Wed Feb 12 00:58:17 2020 (r357788) +++ stable/11/lib/libutil/login_class.c Wed Feb 12 02:04:03 2020 (r357789) @@ -132,6 +132,7 @@ static struct login_vars { }, envars[] = { { "lang", "LANG", NULL, 1}, { "charset","MM_CHARSET", NULL, 1}, +{ "mail", "MAIL", NULL, 1}, { "timezone", "TZ", NULL, 1}, { "term", "TERM", NULL, 0}, { NULL, NULL, NULL, 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: r357789 - in stable: 11/etc 11/lib/libutil 12/lib/libutil 12/usr.bin/login
Author: kevans Date: Wed Feb 12 02:04:03 2020 New Revision: 357789 URL: https://svnweb.freebsd.org/changeset/base/357789 Log: MFC r357560, r357707: login.conf(5) mail capability r357560: login.conf(5): split MAIL env var out into a "mail" capability This allows it to be easily suppressed in, e.g., the "daemon" class where it will not be properly expanded. This is a part of D21481. Submitted by: Andrew Gierth r357707: login.conf(5): update commented-out standard, too MAIL now has a mail capability, instead, as of r357560. Modified: stable/12/lib/libutil/login.conf.5 stable/12/lib/libutil/login_class.c stable/12/usr.bin/login/login.conf Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/etc/login.conf stable/11/lib/libutil/login.conf.5 stable/11/lib/libutil/login_class.c Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libutil/login.conf.5 == --- stable/12/lib/libutil/login.conf.5 Wed Feb 12 00:58:17 2020 (r357788) +++ stable/12/lib/libutil/login.conf.5 Wed Feb 12 02:04:03 2020 (r357789) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2011 +.Dd January 19, 2020 .Dt LOGIN.CONF 5 .Os .Sh NAME @@ -237,6 +237,7 @@ for details. .It "label string Default MAC policy; see" .Xr maclabel 7 . .It "lang string Set $LANG environment variable to the specified value." +.It "mail string Set $MAIL environment variable to the specified value." .It "manpath pathDefault search path for manpages." .It "nocheckmail boolfalse Display mail status at login." .It "nologin fileIf the file exists it will be displayed and" Modified: stable/12/lib/libutil/login_class.c == --- stable/12/lib/libutil/login_class.c Wed Feb 12 00:58:17 2020 (r357788) +++ stable/12/lib/libutil/login_class.c Wed Feb 12 02:04:03 2020 (r357789) @@ -132,6 +132,7 @@ static struct login_vars { }, envars[] = { { "lang", "LANG", NULL, 1}, { "charset","MM_CHARSET", NULL, 1}, +{ "mail", "MAIL", NULL, 1}, { "timezone", "TZ", NULL, 1}, { "term", "TERM", NULL, 0}, { NULL, NULL, NULL, 0} Modified: stable/12/usr.bin/login/login.conf == --- stable/12/usr.bin/login/login.conf Wed Feb 12 00:58:17 2020 (r357788) +++ stable/12/usr.bin/login/login.conf Wed Feb 12 02:04:03 2020 (r357789) @@ -26,7 +26,8 @@ default:\ :passwd_format=sha512:\ :copyright=/etc/COPYRIGHT:\ :welcome=/etc/motd:\ - :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ + :setenv=BLOCKSIZE=K:\ + :mail=/var/mail/$:\ :path=/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin ~/bin:\ :nologin=/var/run/nologin:\ :cputime=unlimited:\ @@ -61,6 +62,7 @@ xuser:\ staff:\ :tc=default: daemon:\ + :mail@:\ :memorylocked=128M:\ :tc=default: news:\ @@ -121,7 +123,8 @@ russian|Russian Users Accounts:\ #standard:\ # :copyright=/etc/COPYRIGHT:\ # :welcome=/etc/motd:\ -# :setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\ +# :setenv=BLOCKSIZE=K:\ +# :mail=/var/mail/$:\ # :path=~/bin /bin /usr/bin /usr/local/bin:\ # :manpath=/usr/share/man /usr/local/man:\ # :nologin=/var/run/nologin:\ ___ 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: r357788 - in head: share/man/man4 sys/dev/hme
Author: brooks Date: Wed Feb 12 00:58:17 2020 New Revision: 357788 URL: https://svnweb.freebsd.org/changeset/base/357788 Log: Mark hme(4) as deprecated. It was saved from the initial purge of drivers in fcp-101 due to being the onboard Ethernet device on a number of sparc64 machines. Now that sparc64 is gone, it serves little purpose (PCI cards exist, but are rare and are unlikely to have been deployed outside Sun systems). MFC after:3 days Modified: head/share/man/man4/hme.4 head/sys/dev/hme/if_hme.c Modified: head/share/man/man4/hme.4 == --- head/share/man/man4/hme.4 Wed Feb 12 00:46:33 2020(r357787) +++ head/share/man/man4/hme.4 Wed Feb 12 00:58:17 2020(r357788) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2009 +.Dd February 12, 2020 .Dt HME 4 .Os .Sh NAME @@ -50,6 +50,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_hme_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: head/sys/dev/hme/if_hme.c == --- head/sys/dev/hme/if_hme.c Wed Feb 12 00:46:33 2020(r357787) +++ head/sys/dev/hme/if_hme.c Wed Feb 12 00:58:17 2020(r357788) @@ -373,6 +373,8 @@ hme_config(struct hme_softc *sc) ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_HWCSUM; ifp->if_hwassist |= sc->sc_csum_features; ifp->if_capenable |= IFCAP_VLAN_MTU | IFCAP_HWCSUM; + + gone_in_dev(sc->sc_dev, 13, "10/100 NIC almost exclusively for sparc64"); return (0); fail_txdesc: ___ 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: r357787 - head/sbin/ipfw
Author: eugen Date: Wed Feb 12 00:46:33 2020 New Revision: 357787 URL: https://svnweb.freebsd.org/changeset/base/357787 Log: ipfw nat: add missing bits after r357092 (RFC 6598/Carrier Grade NAT) Submitted by: Neel Chauhan Reviewed by: Lutz Donnerhacke MFC after:1 week Differential Revision:https://reviews.freebsd.org/D23448 Modified: head/sbin/ipfw/nat.c Modified: head/sbin/ipfw/nat.c == --- head/sbin/ipfw/nat.cWed Feb 12 00:31:00 2020(r357786) +++ head/sbin/ipfw/nat.cWed Feb 12 00:46:33 2020(r357787) @@ -793,6 +793,7 @@ ipfw_config_nat(int ac, char **av) case TOK_SAME_PORTS: case TOK_SKIP_GLOBAL: case TOK_UNREG_ONLY: + case TOK_UNREG_CGN: case TOK_RESET_ADDR: case TOK_ALIAS_REV: case TOK_PROXY_ONLY: @@ -886,6 +887,9 @@ ipfw_config_nat(int ac, char **av) break; case TOK_UNREG_ONLY: n->mode |= PKT_ALIAS_UNREGISTERED_ONLY; + break; + case TOK_UNREG_CGN: + n->mode |= PKT_ALIAS_UNREGISTERED_CGN; break; case TOK_SKIP_GLOBAL: n->mode |= PKT_ALIAS_SKIP_GLOBAL; ___ 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: r357786 - head/sys/netgraph
Author: eugen Date: Wed Feb 12 00:31:00 2020 New Revision: 357786 URL: https://svnweb.freebsd.org/changeset/base/357786 Log: ng_nat: avoid panic if attached directly to ng_ether and got short packet From the beginning, ng_nat safely assumed cleansed traffic because of limited ways it could be attached to NETGRAPH: ng_ipfw or ng_ppp only. Now as it may be attached with ng_ether too, the assumption proven wrong. Add needed check to the ng_nat. Thanks for markj for debugging this. PR: 243096 Submitted by: Lutz Donnerhacke Reported by: Robert James Hernandez Reviewed by: markj and others MFC after:1 week Differential Revision:https://reviews.freebsd.org/D23091 Modified: head/sys/netgraph/ng_nat.c Modified: head/sys/netgraph/ng_nat.c == --- head/sys/netgraph/ng_nat.c Wed Feb 12 00:16:56 2020(r357785) +++ head/sys/netgraph/ng_nat.c Wed Feb 12 00:31:00 2020(r357786) @@ -806,11 +806,16 @@ ng_nat_rcvdata(hook_p hook, item_p item ) panic("Corrupted priv->dlt: %u", priv->dlt); } + if (m->m_pkthdr.len < ipofs + sizeof(struct ip)) + goto send; /* packet too short to hold IP */ + c = (char *)mtodo(m, ipofs); ip = (struct ip *)mtodo(m, ipofs); - KASSERT(m->m_pkthdr.len == ipofs + ntohs(ip->ip_len), - ("ng_nat: ip_len != m_pkthdr.len")); + if (ip->ip_v != IPVERSION) + goto send; /* other IP version, let it pass */ + if (m->m_pkthdr.len < ipofs + ntohs(ip->ip_len)) + goto send; /* packet too short (i.e. fragmented or broken) */ /* * We drop packet when: ___ 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: r357785 - in head: contrib/libarchive contrib/libarchive/cat contrib/libarchive/cat/test contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libar...
Author: mm Date: Wed Feb 12 00:16:56 2020 New Revision: 357785 URL: https://svnweb.freebsd.org/changeset/base/357785 Log: MFV r357783: Update libarchive to 3.4.2 Relevant vendor changes: PR #1289: atomic extraction support (bsdtar -x --safe-writes) PR #1308: big endian fix for UTF16 support in LHA reader PR #1326: reject RAR5 files that declare invalid header flags Issue #987: fix support 7z archive entries with Delta filter Issue #1317: fix compression output buffer handling in XAR writer Issue #1319: fix uname or gname longer than 32 characters in pax writer Issue #1325: fix use after free when archiving hardlinks in ISO9660 or XAR Use localtime_r() and gmtime_r() instead of localtime() and gmtime() X-MFC-With: r356212,r356365,r356416 MFC after:1 week Added: head/contrib/libarchive/libarchive/archive_write_set_format_private.h - copied unchanged from r357783, vendor/libarchive/dist/libarchive/archive_write_set_format_private.h head/contrib/libarchive/libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu - copied unchanged from r357783, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu - copied unchanged from r357783, vendor/libarchive/dist/libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu head/contrib/libarchive/libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu - copied unchanged from r357783, vendor/libarchive/dist/libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu head/contrib/libarchive/tar/test/test_option_safe_writes.c - copied unchanged from r357783, vendor/libarchive/dist/tar/test/test_option_safe_writes.c Modified: head/contrib/libarchive/NEWS head/contrib/libarchive/cat/bsdcat.h head/contrib/libarchive/cat/test/test_0.c head/contrib/libarchive/cpio/cpio.c head/contrib/libarchive/cpio/test/test_basic.c head/contrib/libarchive/cpio/test/test_format_newc.c head/contrib/libarchive/libarchive/archive.h head/contrib/libarchive/libarchive/archive_acl_private.h head/contrib/libarchive/libarchive/archive_blake2.h head/contrib/libarchive/libarchive/archive_blake2_impl.h head/contrib/libarchive/libarchive/archive_cmdline_private.h head/contrib/libarchive/libarchive/archive_crc32.h head/contrib/libarchive/libarchive/archive_cryptor_private.h head/contrib/libarchive/libarchive/archive_digest_private.h head/contrib/libarchive/libarchive/archive_endian.h head/contrib/libarchive/libarchive/archive_entry.c head/contrib/libarchive/libarchive/archive_entry.h head/contrib/libarchive/libarchive/archive_entry_locale.h head/contrib/libarchive/libarchive/archive_entry_private.h head/contrib/libarchive/libarchive/archive_getdate.c head/contrib/libarchive/libarchive/archive_getdate.h head/contrib/libarchive/libarchive/archive_hmac_private.h head/contrib/libarchive/libarchive/archive_openssl_evp_private.h head/contrib/libarchive/libarchive/archive_openssl_hmac_private.h head/contrib/libarchive/libarchive/archive_options_private.h head/contrib/libarchive/libarchive/archive_pack_dev.c head/contrib/libarchive/libarchive/archive_pack_dev.h head/contrib/libarchive/libarchive/archive_pathmatch.h head/contrib/libarchive/libarchive/archive_platform_acl.h head/contrib/libarchive/libarchive/archive_platform_xattr.h head/contrib/libarchive/libarchive/archive_ppmd7.c head/contrib/libarchive/libarchive/archive_ppmd7_private.h head/contrib/libarchive/libarchive/archive_ppmd8_private.h head/contrib/libarchive/libarchive/archive_ppmd_private.h head/contrib/libarchive/libarchive/archive_private.h head/contrib/libarchive/libarchive/archive_random_private.h head/contrib/libarchive/libarchive/archive_rb.h head/contrib/libarchive/libarchive/archive_read.c head/contrib/libarchive/libarchive/archive_read_disk_posix.c head/contrib/libarchive/libarchive/archive_read_disk_private.h head/contrib/libarchive/libarchive/archive_read_private.h head/contrib/libarchive/libarchive/archive_read_set_options.3 head/contrib/libarchive/libarchive/archive_read_support_filter_uu.c head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c head/contrib/libarchive/libarchive/archive_read_support_format_lha.c head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c head/contrib/libarchive/libarchive/archive_read_support_format_rar.c head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c head/contrib/libarchive/libarchive/archive_read_support_format_warc.c head/contrib/libarchive/libarchive/archive_read_support_format_xar.c head/contrib/libarchive/libarchive/archive_string.c head/contrib/libarchive/libarchive/archive_string.h head/contrib/libarchive/libarchive/archive_string_composition.h head/contrib/libarchive/libarchive/archive_util.c
svn commit: r357784 - vendor/libarchive/3.4.2
Author: mm Date: Tue Feb 11 23:49:55 2020 New Revision: 357784 URL: https://svnweb.freebsd.org/changeset/base/357784 Log: Tag vendor/libarchive 3.4.2 Added: vendor/libarchive/3.4.2/ - copied from r357783, vendor/libarchive/dist/ ___ 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: r357783 - in vendor/libarchive/dist: . .github/workflows build build/ci build/ci/github_actions build/cmake build/release cat cat/test contrib cpio cpio/test libarchive libarchive/test ...
Author: mm Date: Tue Feb 11 23:48:03 2020 New Revision: 357783 URL: https://svnweb.freebsd.org/changeset/base/357783 Log: Update vendor/libarchive/dist to git 3288ebb0353beb51dfb09d444dedbe9235ead53d Libarchive 3.4.2 Relevant vendor changes: PR #1289: atomic extraction support (bsdtar -x --safe-writes) PR #1308: big endian fix for UTF16 support in LHA reader PR #1326: reject RAR5 files that declare invalid header flags Issue #987: fix support 7z archive entries with Delta filter Issue #1317: fix compression output buffer handling in XAR writer Issue #1319: fix uname or gname longer than 32 characters in pax writer Issue #1325: fix use after free when archiving hardlinks in ISO9660 or XAR Use localtime_r() and gmtime_r() instead of localtime() and gmtime() Added: vendor/libarchive/dist/build/release/ vendor/libarchive/dist/build/release/Dockerfile vendor/libarchive/dist/build/release/release.sh (contents, props changed) vendor/libarchive/dist/libarchive/archive_write_set_format_private.h (contents, props changed) vendor/libarchive/dist/libarchive/test/test_read_format_7zip_delta4_lzma1.7z.uu vendor/libarchive/dist/libarchive/test/test_read_format_7zip_delta4_lzma2.7z.uu vendor/libarchive/dist/libarchive/test/test_read_format_rar5_block_size_is_too_small.rar.uu vendor/libarchive/dist/tar/test/test_option_safe_writes.c (contents, props changed) Modified: vendor/libarchive/dist/.github/workflows/ci.yml vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/NEWS vendor/libarchive/dist/build/ci/build.sh vendor/libarchive/dist/build/ci/github_actions/ci.cmd vendor/libarchive/dist/build/cmake/config.h.in vendor/libarchive/dist/build/version vendor/libarchive/dist/cat/bsdcat.h vendor/libarchive/dist/cat/test/test_0.c vendor/libarchive/dist/configure.ac vendor/libarchive/dist/contrib/archivetest.c vendor/libarchive/dist/cpio/cpio.c vendor/libarchive/dist/cpio/test/test_basic.c vendor/libarchive/dist/cpio/test/test_format_newc.c vendor/libarchive/dist/libarchive/CMakeLists.txt vendor/libarchive/dist/libarchive/archive.h vendor/libarchive/dist/libarchive/archive_acl_private.h vendor/libarchive/dist/libarchive/archive_blake2.h vendor/libarchive/dist/libarchive/archive_blake2_impl.h vendor/libarchive/dist/libarchive/archive_cmdline_private.h vendor/libarchive/dist/libarchive/archive_crc32.h vendor/libarchive/dist/libarchive/archive_cryptor_private.h vendor/libarchive/dist/libarchive/archive_digest_private.h vendor/libarchive/dist/libarchive/archive_endian.h vendor/libarchive/dist/libarchive/archive_entry.c vendor/libarchive/dist/libarchive/archive_entry_locale.h vendor/libarchive/dist/libarchive/archive_entry_private.h vendor/libarchive/dist/libarchive/archive_getdate.c vendor/libarchive/dist/libarchive/archive_getdate.h vendor/libarchive/dist/libarchive/archive_hmac_private.h vendor/libarchive/dist/libarchive/archive_openssl_evp_private.h vendor/libarchive/dist/libarchive/archive_openssl_hmac_private.h vendor/libarchive/dist/libarchive/archive_options_private.h vendor/libarchive/dist/libarchive/archive_pack_dev.c vendor/libarchive/dist/libarchive/archive_pack_dev.h vendor/libarchive/dist/libarchive/archive_pathmatch.h vendor/libarchive/dist/libarchive/archive_platform_acl.h vendor/libarchive/dist/libarchive/archive_platform_xattr.h vendor/libarchive/dist/libarchive/archive_ppmd7.c vendor/libarchive/dist/libarchive/archive_ppmd7_private.h vendor/libarchive/dist/libarchive/archive_ppmd8_private.h vendor/libarchive/dist/libarchive/archive_ppmd_private.h vendor/libarchive/dist/libarchive/archive_private.h vendor/libarchive/dist/libarchive/archive_random_private.h vendor/libarchive/dist/libarchive/archive_rb.h vendor/libarchive/dist/libarchive/archive_read.c vendor/libarchive/dist/libarchive/archive_read_disk_posix.c vendor/libarchive/dist/libarchive/archive_read_disk_private.h vendor/libarchive/dist/libarchive/archive_read_private.h vendor/libarchive/dist/libarchive/archive_read_set_options.3 vendor/libarchive/dist/libarchive/archive_read_support_filter_uu.c vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c vendor/libarchive/dist/libarchive/archive_read_support_format_rar.c vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c vendor/libarchive/dist/libarchive/archive_read_support_format_warc.c vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c vendor/libarchive/dist/libarchive/archive_string.c vendor/libarchive/dist/libarchive/archive_string.h vendor/libarchive/dist/libarchive/archive_string_composition.h vendor/libarchive/dist/libarchive/archive_util.c
svn commit: r357782 - head/tests/sys/kern
Author: lwhsu Date: Tue Feb 11 23:17:58 2020 New Revision: 357782 URL: https://svnweb.freebsd.org/changeset/base/357782 Log: Temporarily skip flakey test case sys.kern.ptrace_test.ptrace__parent_exits_before_child PR: 244056 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c == --- head/tests/sys/kern/ptrace_test.c Tue Feb 11 22:48:12 2020 (r357781) +++ head/tests/sys/kern/ptrace_test.c Tue Feb 11 23:17:58 2020 (r357782) @@ -469,6 +469,9 @@ ATF_TC_BODY(ptrace__parent_exits_before_child, tc) int cpipe1[2], cpipe2[2], gcpipe[2], status; pid_t child, gchild; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/244056;); + ATF_REQUIRE(pipe(cpipe1) == 0); ATF_REQUIRE(pipe(cpipe2) == 0); ATF_REQUIRE(pipe(gcpipe) == 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"
Re: svn commit: r357761 - head/sys/netinet
> On 11. Feb 2020, at 20:52, Gleb Smirnoff wrote: > > Michael, > > On Tue, Feb 11, 2020 at 08:38:21PM +0100, Michael Tuexen wrote: > M> I can revert it and get it working in a different way. However, the > M> networking code uses ints for booleans in a lot of places. I wasn't > M> aware that we need to use bool now. > > We don't need to use bool, but we should use it in any new code. > Some people may still drop ints into new code, and this can be > tolerable, but intentionally converting from bools to ints is a > move backwards and this isn't okay. Ahh, OK. Thanks for the clarification. Best regards Michael > > Thanks for redoing it with via ifdefs for legacy platforms. > > -- > Gleb Smirnoff ___ 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: r357781 - head/tests/sys/kern
Author: lwhsu Date: Tue Feb 11 22:48:12 2020 New Revision: 357781 URL: https://svnweb.freebsd.org/changeset/base/357781 Log: Temporarily skip failing test case sys.kern/ptrace_test/ptrace__parent_wait_after_attach PR: 244055 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/kern/ptrace_test.c Modified: head/tests/sys/kern/ptrace_test.c == --- head/tests/sys/kern/ptrace_test.c Tue Feb 11 22:21:22 2020 (r357780) +++ head/tests/sys/kern/ptrace_test.c Tue Feb 11 22:48:12 2020 (r357781) @@ -213,6 +213,9 @@ ATF_TC_BODY(ptrace__parent_wait_after_attach, tc) int cpipe[2], status; char c; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/244055;); + ATF_REQUIRE(pipe(cpipe) == 0); ATF_REQUIRE((child = fork()) != -1); if (child == 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: r357780 - head/tests/sys/geom/class/multipath
Author: lwhsu Date: Tue Feb 11 22:21:22 2020 New Revision: 357780 URL: https://svnweb.freebsd.org/changeset/base/357780 Log: Temporarily skip sys.geom.class.multipath.failloop.failloop in CI This case uses `dtrace -c` but it has some issues at the moment PR: 244053 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/geom/class/multipath/failloop.sh Modified: head/tests/sys/geom/class/multipath/failloop.sh == --- head/tests/sys/geom/class/multipath/failloop.sh Tue Feb 11 20:59:41 2020(r357779) +++ head/tests/sys/geom/class/multipath/failloop.sh Tue Feb 11 22:21:22 2020(r357780) @@ -36,6 +36,10 @@ failloop_head() } failloop_body() { + if [ "$(atf_config_get ci false)" = "true" ]; then + atf_skip "https://bugs.freebsd.org/244053; + fi + sysctl -n kern.geom.notaste > kern.geom.notaste.txt load_gnop load_gmultipath ___ 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: r357779 - head/sys/sys
Author: glebius Date: Tue Feb 11 20:59:41 2020 New Revision: 357779 URL: https://svnweb.freebsd.org/changeset/base/357779 Log: Remove assertion from TASK_INIT() macro, since some users of sys/taskqueue.h may not have includes that define MPASS. It was useful during testing of r357771, but can be omitted now. An invalid value of priority will yield only in potential priority inversion, not a crash. This fixes compilation of ports/x11/nvidia-driver. Modified: head/sys/sys/taskqueue.h Modified: head/sys/sys/taskqueue.h == --- head/sys/sys/taskqueue.hTue Feb 11 20:41:51 2020(r357778) +++ head/sys/sys/taskqueue.hTue Feb 11 20:59:41 2020(r357779) @@ -121,7 +121,6 @@ voidtaskqueue_thread_enqueue(void *context); * Initialise a task structure. */ #define TASK_INIT_FLAGS(task, priority, func, context, flags) do { \ - MPASS((priority) >= 0 && (priority) <= 255);\ (task)->ta_pending = 0; \ (task)->ta_priority = (priority); \ (task)->ta_flags = (flags); \ ___ 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: r357778 - head/tests/sys/mac/portacl
Author: lwhsu Date: Tue Feb 11 20:41:51 2020 New Revision: 357778 URL: https://svnweb.freebsd.org/changeset/base/357778 Log: Reduce nc timeout in sys.mac.portacl.* It is not necessary to wait that long for localhost. Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/mac/portacl/misc.sh Modified: head/tests/sys/mac/portacl/misc.sh == --- head/tests/sys/mac/portacl/misc.sh Tue Feb 11 20:15:49 2020 (r35) +++ head/tests/sys/mac/portacl/misc.sh Tue Feb 11 20:41:51 2020 (r357778) @@ -17,6 +17,7 @@ check_bind() { local host idtype name proto port udpflag host="127.0.0.1" + timeout=1 idtype=${1} name=${2} @@ -28,7 +29,7 @@ check_bind() { out=$( case "${idtype}" in uid|gid) - ( echo -n | su -m ${name} -c "nc ${udpflag} -l -w 10 $host $port" 2>&1 ) & + ( echo -n | su -m ${name} -c "nc ${udpflag} -l -w ${timeout} $host $port" 2>&1 ) & ;; jail) kill $$ @@ -37,7 +38,7 @@ check_bind() { kill $$ esac sleep 0.3 - echo | nc ${udpflag} -w 10 $host $port >/dev/null 2>&1 + echo | nc ${udpflag} -w ${timeout} $host $port >/dev/null 2>&1 wait ) case "${out}" in ___ 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: r357776 - head/sys/vm
On Tue, Feb 11, 2020 at 09:12:18PM +0100, O. Hartmann wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Am Tue, 11 Feb 2020 20:06:33 + (UTC) > Mark Johnston schrieb: > > > Author: markj > > Date: Tue Feb 11 20:06:33 2020 > > New Revision: 357776 > > URL: https://svnweb.freebsd.org/changeset/base/357776 > > > > Log: > > Reduce lock hold time in keg_drain(). > > > > Maintain a count of free slabs in the per-domain keg structure and use > > that to clear the free slab list in constant time for most cases. This > > helps minimize lock contention induced by reclamation, in preparation > > for proactive trimming of excesses of free memory. > > This commit breaks buildworld: Sorry, fixed by r35. ___ 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: r357777 - head/lib/libmemstat
Author: markj Date: Tue Feb 11 20:15:49 2020 New Revision: 35 URL: https://svnweb.freebsd.org/changeset/base/35 Log: libmemstat: Catch up with r357776. Reported by: O. Hartmann Modified: head/lib/libmemstat/memstat_uma.c Modified: head/lib/libmemstat/memstat_uma.c == --- head/lib/libmemstat/memstat_uma.c Tue Feb 11 20:06:33 2020 (r357776) +++ head/lib/libmemstat/memstat_uma.c Tue Feb 11 20:15:49 2020 (r35) @@ -476,7 +476,7 @@ skip_percpu: ret = kread(kvm, >uk_domain[i], , sizeof(ukd), 0); if (ret != 0) - kegfree += ukd.ud_free; + kegfree += ukd.ud_free_items; } mtp->mt_kegfree = kegfree; mtp->mt_free += mtp->mt_kegfree; ___ 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: r357776 - head/sys/vm
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Am Tue, 11 Feb 2020 20:06:33 + (UTC) Mark Johnston schrieb: > Author: markj > Date: Tue Feb 11 20:06:33 2020 > New Revision: 357776 > URL: https://svnweb.freebsd.org/changeset/base/357776 > > Log: > Reduce lock hold time in keg_drain(). > > Maintain a count of free slabs in the per-domain keg structure and use > that to clear the free slab list in constant time for most cases. This > helps minimize lock contention induced by reclamation, in preparation > for proactive trimming of excesses of free memory. > > Reviewed by:jeff, rlibby > Tested by: pho > Differential Revision: https://reviews.freebsd.org/D23532 > > Modified: > head/sys/vm/uma_core.c > head/sys/vm/uma_int.h > > Modified: head/sys/vm/uma_core.c > == > --- head/sys/vm/uma_core.cTue Feb 11 20:02:20 2020(r357775) > +++ head/sys/vm/uma_core.cTue Feb 11 20:06:33 2020(r357776) > @@ -1258,39 +1258,34 @@ keg_free_slab(uma_keg_t keg, uma_slab_t slab, int star > static void > keg_drain(uma_keg_t keg) > { > - struct slabhead freeslabs = { 0 }; > + struct slabhead freeslabs; > uma_domain_t dom; > uma_slab_t slab, tmp; > int i, n; > > - /* > - * We don't want to take pages from statically allocated kegs at this > - * time > - */ > if (keg->uk_flags & UMA_ZONE_NOFREE || keg->uk_freef == NULL) > return; > > for (i = 0; i < vm_ndomains; i++) { > CTR4(KTR_UMA, "keg_drain %s(%p) domain %d free items: %u", > - keg->uk_name, keg, i, dom->ud_free); > - n = 0; > + keg->uk_name, keg, i, dom->ud_free_items); > dom = >uk_domain[i]; > + LIST_INIT(); > + > KEG_LOCK(keg, i); > - LIST_FOREACH_SAFE(slab, >ud_free_slab, us_link, tmp) { > - if (keg->uk_flags & UMA_ZFLAG_HASH) > + if ((keg->uk_flags & UMA_ZFLAG_HASH) != 0) { > + LIST_FOREACH(slab, >ud_free_slab, us_link) > UMA_HASH_REMOVE(>uk_hash, slab); > - n++; > - LIST_REMOVE(slab, us_link); > - LIST_INSERT_HEAD(, slab, us_link); > } > + n = dom->ud_free_slabs; > + LIST_SWAP(, >ud_free_slab, uma_slab, us_link); > + dom->ud_free_slabs = 0; > + dom->ud_free_items -= n * keg->uk_ipers; > dom->ud_pages -= n * keg->uk_ppera; > - dom->ud_free -= n * keg->uk_ipers; > KEG_UNLOCK(keg, i); > - } > > - while ((slab = LIST_FIRST()) != NULL) { > - LIST_REMOVE(slab, us_link); > - keg_free_slab(keg, slab, keg->uk_ipers); > + LIST_FOREACH_SAFE(slab, , us_link, tmp) > + keg_free_slab(keg, slab, keg->uk_ipers); > } > } > > @@ -1458,7 +1453,7 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t zone, int dom > dom = >uk_domain[domain]; > LIST_INSERT_HEAD(>ud_part_slab, slab, us_link); > dom->ud_pages += keg->uk_ppera; > - dom->ud_free += keg->uk_ipers; > + dom->ud_free_items += keg->uk_ipers; > > return (slab); > > @@ -2286,7 +2281,7 @@ zone_alloc_sysctl(uma_zone_t zone, void *unused) > "pages", CTLFLAG_RD, >ud_pages, 0, > "Total pages currently allocated from VM"); > SYSCTL_ADD_U32(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, > - "free", CTLFLAG_RD, >ud_free, 0, > + "free_items", CTLFLAG_RD, >ud_free_items, 0, > "items free in the slab layer"); > } > } else > @@ -2572,7 +2567,7 @@ keg_dtor(void *arg, int size, void *udata) > keg = (uma_keg_t)arg; > free = pages = 0; > for (i = 0; i < vm_ndomains; i++) { > - free += keg->uk_domain[i].ud_free; > + free += keg->uk_domain[i].ud_free_items; > pages += keg->uk_domain[i].ud_pages; > KEG_LOCK_FINI(keg, i); > } > @@ -3386,11 +3381,11 @@ keg_first_slab(uma_keg_t keg, int domain, bool rr) > start = domain; > do { > dom = >uk_domain[domain]; > - if (!LIST_EMPTY(>ud_part_slab)) > - return (LIST_FIRST(>ud_part_slab)); > - if (!LIST_EMPTY(>ud_free_slab)) { > - slab = LIST_FIRST(>ud_free_slab); > + if ((slab = LIST_FIRST(>ud_part_slab)) != NULL) > + return (slab); > + if ((slab = LIST_FIRST(>ud_free_slab)) != NULL) { > LIST_REMOVE(slab, us_link); > + dom->ud_free_slabs--; > LIST_INSERT_HEAD(>ud_part_slab, slab, us_link); > return (slab);
Re: svn commit: r357771 - in head/sys: kern sys
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Am Tue, 11 Feb 2020 18:48:08 + (UTC) Gleb Smirnoff schrieb: > Author: glebius > Date: Tue Feb 11 18:48:07 2020 > New Revision: 357771 > URL: https://svnweb.freebsd.org/changeset/base/357771 > > Log: > Add flag to struct task to mark the task as requiring network epoch. > > When processing a taskqueue and a task has associated epoch, then > enter for duration of the task. If consecutive tasks belong to the > same epoch, batch them. Now we are talking about the network epoch > only. > > Shrink the ta_priority size to 8-bits. No current consumers use > a priority that won't fit into 8 bits. Also complexity of > taskqueue_enqueue() is a square of maximum value of priority, so > we unlikely ever want to go over UCHAR_MAX here. > > Reviewed by:hselasky > Differential Revision: https://reviews.freebsd.org/D23518 > > Modified: > head/sys/kern/subr_gtaskqueue.c > head/sys/kern/subr_taskqueue.c > head/sys/sys/_task.h > head/sys/sys/epoch.h > head/sys/sys/gtaskqueue.h > head/sys/sys/taskqueue.h > > Modified: head/sys/kern/subr_gtaskqueue.c > == > --- head/sys/kern/subr_gtaskqueue.c Tue Feb 11 18:19:56 2020 > (r357770) > +++ head/sys/kern/subr_gtaskqueue.c Tue Feb 11 18:48:07 2020 > (r357771) > @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -342,13 +343,16 @@ gtaskqueue_unblock(struct gtaskqueue *queue) > static void > gtaskqueue_run_locked(struct gtaskqueue *queue) > { > + struct epoch_tracker et; > struct gtaskqueue_busy tb; > struct gtask *gtask; > + bool in_net_epoch; > > KASSERT(queue != NULL, ("tq is NULL")); > TQ_ASSERT_LOCKED(queue); > tb.tb_running = NULL; > LIST_INSERT_HEAD(>tq_active, , tb_link); > + in_net_epoch = false; > > while ((gtask = STAILQ_FIRST(>tq_queue)) != NULL) { > STAILQ_REMOVE_HEAD(>tq_queue, ta_link); > @@ -358,11 +362,20 @@ gtaskqueue_run_locked(struct gtaskqueue *queue) > TQ_UNLOCK(queue); > > KASSERT(gtask->ta_func != NULL, ("task->ta_func is NULL")); > + if (!in_net_epoch && TASK_IS_NET(gtask)) { > + in_net_epoch = true; > + NET_EPOCH_ENTER(et); > + } else if (in_net_epoch && !TASK_IS_NET(gtask)) { > + NET_EPOCH_EXIT(et); > + in_net_epoch = false; > + } > gtask->ta_func(gtask->ta_context); > > TQ_LOCK(queue); > wakeup(gtask); > } > + if (in_net_epoch) > + NET_EPOCH_EXIT(et); > LIST_REMOVE(, tb_link); > } > > > Modified: head/sys/kern/subr_taskqueue.c > == > --- head/sys/kern/subr_taskqueue.cTue Feb 11 18:19:56 2020 > (r357770) > +++ head/sys/kern/subr_taskqueue.cTue Feb 11 18:48:07 2020 > (r357771) > @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -371,7 +372,7 @@ taskqueue_drain_tq_queue(struct taskqueue *queue) >* anyway) so just insert it at tail while we have the >* queue lock. >*/ > - TASK_INIT(_barrier, USHRT_MAX, taskqueue_task_nop_fn, _barrier); > + TASK_INIT(_barrier, UCHAR_MAX, taskqueue_task_nop_fn, _barrier); > STAILQ_INSERT_TAIL(>tq_queue, _barrier, ta_link); > queue->tq_hint = _barrier; > t_barrier.ta_pending = 1; > @@ -442,14 +443,17 @@ taskqueue_unblock(struct taskqueue *queue) > static void > taskqueue_run_locked(struct taskqueue *queue) > { > + struct epoch_tracker et; > struct taskqueue_busy tb; > struct task *task; > + bool in_net_epoch; > int pending; > > KASSERT(queue != NULL, ("tq is NULL")); > TQ_ASSERT_LOCKED(queue); > tb.tb_running = NULL; > LIST_INSERT_HEAD(>tq_active, , tb_link); > + in_net_epoch = false; > > while ((task = STAILQ_FIRST(>tq_queue)) != NULL) { > STAILQ_REMOVE_HEAD(>tq_queue, ta_link); > @@ -462,11 +466,20 @@ taskqueue_run_locked(struct taskqueue *queue) > TQ_UNLOCK(queue); > > KASSERT(task->ta_func != NULL, ("task->ta_func is NULL")); > + if (!in_net_epoch && TASK_IS_NET(task)) { > + in_net_epoch = true; > + NET_EPOCH_ENTER(et); > + } else if (in_net_epoch && !TASK_IS_NET(task)) { > + NET_EPOCH_EXIT(et); > + in_net_epoch = false; > + } > task->ta_func(task->ta_context, pending); > > TQ_LOCK(queue); > wakeup(task); > } > + if (in_net_epoch) > +
svn commit: r357776 - head/sys/vm
Author: markj Date: Tue Feb 11 20:06:33 2020 New Revision: 357776 URL: https://svnweb.freebsd.org/changeset/base/357776 Log: Reduce lock hold time in keg_drain(). Maintain a count of free slabs in the per-domain keg structure and use that to clear the free slab list in constant time for most cases. This helps minimize lock contention induced by reclamation, in preparation for proactive trimming of excesses of free memory. Reviewed by: jeff, rlibby Tested by:pho Differential Revision:https://reviews.freebsd.org/D23532 Modified: head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Tue Feb 11 20:02:20 2020(r357775) +++ head/sys/vm/uma_core.c Tue Feb 11 20:06:33 2020(r357776) @@ -1258,39 +1258,34 @@ keg_free_slab(uma_keg_t keg, uma_slab_t slab, int star static void keg_drain(uma_keg_t keg) { - struct slabhead freeslabs = { 0 }; + struct slabhead freeslabs; uma_domain_t dom; uma_slab_t slab, tmp; int i, n; - /* -* We don't want to take pages from statically allocated kegs at this -* time -*/ if (keg->uk_flags & UMA_ZONE_NOFREE || keg->uk_freef == NULL) return; for (i = 0; i < vm_ndomains; i++) { CTR4(KTR_UMA, "keg_drain %s(%p) domain %d free items: %u", - keg->uk_name, keg, i, dom->ud_free); - n = 0; + keg->uk_name, keg, i, dom->ud_free_items); dom = >uk_domain[i]; + LIST_INIT(); + KEG_LOCK(keg, i); - LIST_FOREACH_SAFE(slab, >ud_free_slab, us_link, tmp) { - if (keg->uk_flags & UMA_ZFLAG_HASH) + if ((keg->uk_flags & UMA_ZFLAG_HASH) != 0) { + LIST_FOREACH(slab, >ud_free_slab, us_link) UMA_HASH_REMOVE(>uk_hash, slab); - n++; - LIST_REMOVE(slab, us_link); - LIST_INSERT_HEAD(, slab, us_link); } + n = dom->ud_free_slabs; + LIST_SWAP(, >ud_free_slab, uma_slab, us_link); + dom->ud_free_slabs = 0; + dom->ud_free_items -= n * keg->uk_ipers; dom->ud_pages -= n * keg->uk_ppera; - dom->ud_free -= n * keg->uk_ipers; KEG_UNLOCK(keg, i); - } - while ((slab = LIST_FIRST()) != NULL) { - LIST_REMOVE(slab, us_link); - keg_free_slab(keg, slab, keg->uk_ipers); + LIST_FOREACH_SAFE(slab, , us_link, tmp) + keg_free_slab(keg, slab, keg->uk_ipers); } } @@ -1458,7 +1453,7 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t zone, int dom dom = >uk_domain[domain]; LIST_INSERT_HEAD(>ud_part_slab, slab, us_link); dom->ud_pages += keg->uk_ppera; - dom->ud_free += keg->uk_ipers; + dom->ud_free_items += keg->uk_ipers; return (slab); @@ -2286,7 +2281,7 @@ zone_alloc_sysctl(uma_zone_t zone, void *unused) "pages", CTLFLAG_RD, >ud_pages, 0, "Total pages currently allocated from VM"); SYSCTL_ADD_U32(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, - "free", CTLFLAG_RD, >ud_free, 0, + "free_items", CTLFLAG_RD, >ud_free_items, 0, "items free in the slab layer"); } } else @@ -2572,7 +2567,7 @@ keg_dtor(void *arg, int size, void *udata) keg = (uma_keg_t)arg; free = pages = 0; for (i = 0; i < vm_ndomains; i++) { - free += keg->uk_domain[i].ud_free; + free += keg->uk_domain[i].ud_free_items; pages += keg->uk_domain[i].ud_pages; KEG_LOCK_FINI(keg, i); } @@ -3386,11 +3381,11 @@ keg_first_slab(uma_keg_t keg, int domain, bool rr) start = domain; do { dom = >uk_domain[domain]; - if (!LIST_EMPTY(>ud_part_slab)) - return (LIST_FIRST(>ud_part_slab)); - if (!LIST_EMPTY(>ud_free_slab)) { - slab = LIST_FIRST(>ud_free_slab); + if ((slab = LIST_FIRST(>ud_part_slab)) != NULL) + return (slab); + if ((slab = LIST_FIRST(>ud_free_slab)) != NULL) { LIST_REMOVE(slab, us_link); + dom->ud_free_slabs--; LIST_INSERT_HEAD(>ud_part_slab, slab, us_link); return (slab); } @@ -3417,7 +3412,7 @@ keg_fetch_free_slab(uma_keg_t keg, int domain, bool rr KEG_LOCK(keg, domain); reserve = (flags & M_USE_RESERVE) != 0 ? 0 :
svn commit: r357775 - head/sys/netinet
Author: tuexen Date: Tue Feb 11 20:02:20 2020 New Revision: 357775 URL: https://svnweb.freebsd.org/changeset/base/357775 Log: Revert https://svnweb.freebsd.org/changeset/base/357761 This was suggested by cem@ Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_pcb.c == --- head/sys/netinet/sctp_pcb.c Tue Feb 11 19:39:59 2020(r357774) +++ head/sys/netinet/sctp_pcb.c Tue Feb 11 20:02:20 2020(r357775) @@ -4767,7 +4767,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc } } /* Now clean up any other timers */ - sctp_stop_association_timers(stcb, 0); + sctp_stop_association_timers(stcb, false); /* Now the read queue needs to be cleaned up (only once) */ if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_ABOUT_TO_BE_FREED); @@ -4935,7 +4935,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc /* * Now restop the timers to be sure this is paranoia at is finest! */ - sctp_stop_association_timers(stcb, 1); + sctp_stop_association_timers(stcb, true); /* * The chunk lists and such SHOULD be empty but we check them just Modified: head/sys/netinet/sctputil.c == --- head/sys/netinet/sctputil.c Tue Feb 11 19:39:59 2020(r357774) +++ head/sys/netinet/sctputil.c Tue Feb 11 20:02:20 2020(r357775) @@ -802,7 +802,7 @@ sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) } void -sctp_stop_association_timers(struct sctp_tcb *stcb, int stop_assoc_kill_timer) +sctp_stop_association_timers(struct sctp_tcb *stcb, bool stop_assoc_kill_timer) { struct sctp_inpcb *inp; struct sctp_nets *net; @@ -812,7 +812,7 @@ sctp_stop_association_timers(struct sctp_tcb *stcb, in SCTP_FROM_SCTPUTIL + SCTP_LOC_18); sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, inp, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_19); - if (stop_assoc_kill_timer != 0) { + if (stop_assoc_kill_timer) { sctp_timer_stop(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_20); } Modified: head/sys/netinet/sctputil.h == --- head/sys/netinet/sctputil.h Tue Feb 11 19:39:59 2020(r357774) +++ head/sys/netinet/sctputil.h Tue Feb 11 20:02:20 2020(r357775) @@ -165,7 +165,7 @@ sctp_pull_off_control_to_new_inp(struct sctp_inpcb *ol void sctp_stop_timers_for_shutdown(struct sctp_tcb *); /* Stop all timers for association and remote addresses. */ -void sctp_stop_association_timers(struct sctp_tcb *, int); +void sctp_stop_association_timers(struct sctp_tcb *, bool); void sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int ___ 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: r357761 - head/sys/netinet
Michael, On Tue, Feb 11, 2020 at 08:38:21PM +0100, Michael Tuexen wrote: M> I can revert it and get it working in a different way. However, the M> networking code uses ints for booleans in a lot of places. I wasn't M> aware that we need to use bool now. We don't need to use bool, but we should use it in any new code. Some people may still drop ints into new code, and this can be tolerable, but intentionally converting from bools to ints is a move backwards and this isn't okay. Thanks for redoing it with via ifdefs for legacy platforms. -- Gleb Smirnoff ___ 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: r357774 - head/tools/kerneldoc/subsys
Author: netchild Date: Tue Feb 11 19:39:59 2020 New Revision: 357774 URL: https://svnweb.freebsd.org/changeset/base/357774 Log: Fix duplicate target warning. Modified: head/tools/kerneldoc/subsys/Makefile Modified: head/tools/kerneldoc/subsys/Makefile == --- head/tools/kerneldoc/subsys/MakefileTue Feb 11 19:13:34 2020 (r357773) +++ head/tools/kerneldoc/subsys/MakefileTue Feb 11 19:39:59 2020 (r357774) @@ -10,7 +10,7 @@ TARGET_ARCH?= ${MACHINE_ARCH} S?=/usr/src/sys LOCALBASE?=/usr/local -MFILES!= find ${S} -name \*.m | sed -e 's:${S}/::g' +MFILES!= find ${S} -name \*.m | egrep '/(dev|libkern|kgssapi|opencrypto|isa|geom|kern|xen|net|${TARGET_ARCH})/' | sed -e 's:${S}/::g' HFILES=${MFILES:T:S/.m$/.h/} AWK?= awk ___ 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: r357761 - head/sys/netinet
> On 11. Feb 2020, at 19:18, Conrad Meyer wrote: > > Hi Michael, > > On Tue, Feb 11, 2020 at 6:00 AM Michael Tuexen wrote: >> >> Author: tuexen >> Date: Tue Feb 11 14:00:27 2020 >> New Revision: 357761 >> URL: https://svnweb.freebsd.org/changeset/base/357761 >> >> Log: >> Use an int instead of a bool variable, since bool is not supported >> on all platforms the stack is running on in userland. > > Maybe the platforms stuck in time before 1999 can be worked around > with something trivial like: > > #if __STDC_VERSION__ < 199901L > # warn Really really consider getting a new compiler > typedef unsigned char _Bool; > # define bool _Bool > # define true ((_Bool)1) > # define false ((_Bool)0) > #endif Hi Conrad, I can revert it and get it working in a different way. However, the networking code uses ints for booleans in a lot of places. I wasn't aware that we need to use bool now. > > Rather than inflicting the 80s on FreeBSD tree code? This commit > seems like a step in the wrong direction and just for example, > contravenes style(9). > > SCTP is already one of the buggiest areas of the kernel, and it can't > be touched by outsiders for fear of breaking compatibility with the > purported myriad other platforms it is also ported to. By transitive > property, it also prevents modifying _any_ APIs SCTP consumes that > happen to be implemented on other platforms. This hamstrings the Which API couldn't be changed because of SCTP? I don't remember that I experienced such a discussion. I definitely never objected. > kernel for what is obviously not functional code (throw a dart at a > syzkaller report and better than 90% odds it's a SCTP panic), much > less code a reasonable person would want to use in a > security-sensitive context. I'm not arguing that there are bugs. But most of the bug only show up if you actually use SCTP. Regarding the 90% chance: Where do you get this from: 1. Looking at http://syzkaller.backtrace.io:8080 you will find a lot of traces which involves SCTP. However, a lot of them will include sendfile() in it's trace. If I remember it correctly, there was in the past a change to the internals of sendfile. After that change sendfile support for SCTP seems to be broken. Whether it was working before that change was discussed with different views (I wasn't involved since I never worked on sendfile). Another set of panics involve calling listen and connect on the same socket. This is as far as I know also not related to SCTP, but to a recent change in the listen code to improve performance. All other issues I'm interested to fix. 2. Looking at https://syzkaller.appspot.com/freebsd I also see traces which involve SCTP, but definitely not they are definitely not the majority. 3. Looking at http://212.201.121.91:1 I also see SCTP related panic, but also TCP related ones. > > If SCTP is intended to be a port from some legacy platform, perhaps it > should live in ports rather than base? The SCTP is not a port from some other platform, but the code is also contained in a user land stack, which runs on a variety of platforms (the ones you build Browsers for). The code in the FreeBSD tree only has taken out some #ifdefed code, which is used only on other platforms. Best regards Michael > > Thanks, > Conrad ___ 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: r357773 - head/sys/dev/liquidio/base
Author: glebius Date: Tue Feb 11 19:13:34 2020 New Revision: 357773 URL: https://svnweb.freebsd.org/changeset/base/357773 Log: Mark lio taskqueue as requiring network epoch. Modified: head/sys/dev/liquidio/base/lio_droq.c Modified: head/sys/dev/liquidio/base/lio_droq.c == --- head/sys/dev/liquidio/base/lio_droq.c Tue Feb 11 18:57:07 2020 (r357772) +++ head/sys/dev/liquidio/base/lio_droq.c Tue Feb 11 19:13:34 2020 (r357773) @@ -329,7 +329,7 @@ lio_init_droq(struct octeon_device *oct, uint32_t q_no * output queue packet processing. */ lio_dev_dbg(oct, "Initializing droq%d taskqueue\n", q_no); - TASK_INIT(>droq_task, 0, lio_droq_bh, (void *)droq); + NET_TASK_INIT(>droq_task, 0, lio_droq_bh, (void *)droq); droq->droq_taskqueue = taskqueue_create_fast("lio_droq_task", M_NOWAIT, taskqueue_thread_enqueue, ___ 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: r357772 - in head/sys: dev/al_eth dev/alc dev/ale dev/ath dev/bge dev/bwn dev/bxe dev/cas dev/ena dev/malo dev/mwl dev/netmap dev/nfe dev/qlxgbe dev/re dev/rt dev/smc dev/virtio/network...
Author: glebius Date: Tue Feb 11 18:57:07 2020 New Revision: 357772 URL: https://svnweb.freebsd.org/changeset/base/357772 Log: Use NET_TASK_INIT() and NET_GROUPTASK_INIT() for drivers that process incoming packets in taskqueue context. Reviewed by: hselasky Differential Revision:https://reviews.freebsd.org/D23518 Modified: head/sys/dev/al_eth/al_eth.c head/sys/dev/alc/if_alc.c head/sys/dev/ale/if_ale.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_rx.c head/sys/dev/bge/if_bge.c head/sys/dev/bwn/if_bwn.c head/sys/dev/bxe/bxe.c head/sys/dev/cas/if_cas.c head/sys/dev/ena/ena.c head/sys/dev/malo/if_malo.c head/sys/dev/mwl/if_mwl.c head/sys/dev/netmap/if_ptnet.c head/sys/dev/nfe/if_nfe.c head/sys/dev/qlxgbe/ql_os.c head/sys/dev/re/if_re.c head/sys/dev/rt/if_rt.c head/sys/dev/smc/if_smc.c head/sys/dev/virtio/network/if_vtnet.c head/sys/dev/vnic/nicvf_queues.c head/sys/dev/vr/if_vr.c head/sys/dev/wtap/if_wtap.c head/sys/dev/xl/if_xl.c head/sys/net/iflib.c Modified: head/sys/dev/al_eth/al_eth.c == --- head/sys/dev/al_eth/al_eth.cTue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/al_eth/al_eth.cTue Feb 11 18:57:07 2020 (r357772) @@ -2512,7 +2512,7 @@ al_eth_setup_rx_resources(struct al_eth_adapter *adapt return (ENOMEM); /* Allocate taskqueues */ - TASK_INIT(_ring->enqueue_task, 0, al_eth_rx_recv_work, rx_ring); + NET_TASK_INIT(_ring->enqueue_task, 0, al_eth_rx_recv_work, rx_ring); rx_ring->enqueue_tq = taskqueue_create_fast("al_rx_enque", M_NOWAIT, taskqueue_thread_enqueue, _ring->enqueue_tq); taskqueue_start_threads(_ring->enqueue_tq, 1, PI_NET, "%s rxeq", Modified: head/sys/dev/alc/if_alc.c == --- head/sys/dev/alc/if_alc.c Tue Feb 11 18:48:07 2020(r357771) +++ head/sys/dev/alc/if_alc.c Tue Feb 11 18:57:07 2020(r357772) @@ -1387,7 +1387,7 @@ alc_attach(device_t dev) mtx_init(>alc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(>alc_tick_ch, >alc_mtx, 0); - TASK_INIT(>alc_int_task, 0, alc_int_task, sc); + NET_TASK_INIT(>alc_int_task, 0, alc_int_task, sc); sc->alc_ident = alc_find_ident(dev); /* Map the device. */ Modified: head/sys/dev/ale/if_ale.c == --- head/sys/dev/ale/if_ale.c Tue Feb 11 18:48:07 2020(r357771) +++ head/sys/dev/ale/if_ale.c Tue Feb 11 18:57:07 2020(r357772) @@ -467,7 +467,7 @@ ale_attach(device_t dev) mtx_init(>ale_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(>ale_tick_ch, >ale_mtx, 0); - TASK_INIT(>ale_int_task, 0, ale_int_task, sc); + NET_TASK_INIT(>ale_int_task, 0, ale_int_task, sc); /* Map the device. */ pci_enable_busmaster(dev); Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Tue Feb 11 18:48:07 2020(r357771) +++ head/sys/dev/ath/if_ath.c Tue Feb 11 18:57:07 2020(r357772) @@ -760,7 +760,7 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) taskqueue_start_threads(>sc_tq, 1, PI_NET, "%s taskq", device_get_nameunit(sc->sc_dev)); - TASK_INIT(>sc_rxtask, 0, sc->sc_rx.recv_tasklet, sc); + NET_TASK_INIT(>sc_rxtask, 0, sc->sc_rx.recv_tasklet, sc); TASK_INIT(>sc_bmisstask, 0, ath_bmiss_proc, sc); TASK_INIT(>sc_bstucktask,0, ath_bstuck_proc, sc); TASK_INIT(>sc_resettask,0, ath_reset_proc, sc); Modified: head/sys/dev/ath/if_ath_rx.c == --- head/sys/dev/ath/if_ath_rx.cTue Feb 11 18:48:07 2020 (r357771) +++ head/sys/dev/ath/if_ath_rx.cTue Feb 11 18:57:07 2020 (r357772) @@ -647,7 +647,6 @@ ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status uint64_t tsf, int nf, HAL_RX_QUEUE qtype, struct ath_buf *bf, struct mbuf *m) { - struct epoch_tracker et; uint64_t rstamp; /* XXX TODO: make this an mbuf tag? */ struct ieee80211_rx_stats rxs; @@ -942,7 +941,6 @@ rx_accept: rxs.c_nf_ext[i] = nf; } - NET_EPOCH_ENTER(et); if (ni != NULL) { /* * Only punt packets for ampdu reorder processing for @@ -988,7 +986,6 @@ rx_accept: type = ieee80211_input_mimo_all(ic, m); m = NULL; } - NET_EPOCH_EXIT(et); /* * At this point we have passed the frame up the stack; thus Modified: head/sys/dev/bge/if_bge.c
svn commit: r357771 - in head/sys: kern sys
Author: glebius Date: Tue Feb 11 18:48:07 2020 New Revision: 357771 URL: https://svnweb.freebsd.org/changeset/base/357771 Log: Add flag to struct task to mark the task as requiring network epoch. When processing a taskqueue and a task has associated epoch, then enter for duration of the task. If consecutive tasks belong to the same epoch, batch them. Now we are talking about the network epoch only. Shrink the ta_priority size to 8-bits. No current consumers use a priority that won't fit into 8 bits. Also complexity of taskqueue_enqueue() is a square of maximum value of priority, so we unlikely ever want to go over UCHAR_MAX here. Reviewed by: hselasky Differential Revision:https://reviews.freebsd.org/D23518 Modified: head/sys/kern/subr_gtaskqueue.c head/sys/kern/subr_taskqueue.c head/sys/sys/_task.h head/sys/sys/epoch.h head/sys/sys/gtaskqueue.h head/sys/sys/taskqueue.h Modified: head/sys/kern/subr_gtaskqueue.c == --- head/sys/kern/subr_gtaskqueue.c Tue Feb 11 18:19:56 2020 (r357770) +++ head/sys/kern/subr_gtaskqueue.c Tue Feb 11 18:48:07 2020 (r357771) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -342,13 +343,16 @@ gtaskqueue_unblock(struct gtaskqueue *queue) static void gtaskqueue_run_locked(struct gtaskqueue *queue) { + struct epoch_tracker et; struct gtaskqueue_busy tb; struct gtask *gtask; + bool in_net_epoch; KASSERT(queue != NULL, ("tq is NULL")); TQ_ASSERT_LOCKED(queue); tb.tb_running = NULL; LIST_INSERT_HEAD(>tq_active, , tb_link); + in_net_epoch = false; while ((gtask = STAILQ_FIRST(>tq_queue)) != NULL) { STAILQ_REMOVE_HEAD(>tq_queue, ta_link); @@ -358,11 +362,20 @@ gtaskqueue_run_locked(struct gtaskqueue *queue) TQ_UNLOCK(queue); KASSERT(gtask->ta_func != NULL, ("task->ta_func is NULL")); + if (!in_net_epoch && TASK_IS_NET(gtask)) { + in_net_epoch = true; + NET_EPOCH_ENTER(et); + } else if (in_net_epoch && !TASK_IS_NET(gtask)) { + NET_EPOCH_EXIT(et); + in_net_epoch = false; + } gtask->ta_func(gtask->ta_context); TQ_LOCK(queue); wakeup(gtask); } + if (in_net_epoch) + NET_EPOCH_EXIT(et); LIST_REMOVE(, tb_link); } Modified: head/sys/kern/subr_taskqueue.c == --- head/sys/kern/subr_taskqueue.c Tue Feb 11 18:19:56 2020 (r357770) +++ head/sys/kern/subr_taskqueue.c Tue Feb 11 18:48:07 2020 (r357771) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -371,7 +372,7 @@ taskqueue_drain_tq_queue(struct taskqueue *queue) * anyway) so just insert it at tail while we have the * queue lock. */ - TASK_INIT(_barrier, USHRT_MAX, taskqueue_task_nop_fn, _barrier); + TASK_INIT(_barrier, UCHAR_MAX, taskqueue_task_nop_fn, _barrier); STAILQ_INSERT_TAIL(>tq_queue, _barrier, ta_link); queue->tq_hint = _barrier; t_barrier.ta_pending = 1; @@ -442,14 +443,17 @@ taskqueue_unblock(struct taskqueue *queue) static void taskqueue_run_locked(struct taskqueue *queue) { + struct epoch_tracker et; struct taskqueue_busy tb; struct task *task; + bool in_net_epoch; int pending; KASSERT(queue != NULL, ("tq is NULL")); TQ_ASSERT_LOCKED(queue); tb.tb_running = NULL; LIST_INSERT_HEAD(>tq_active, , tb_link); + in_net_epoch = false; while ((task = STAILQ_FIRST(>tq_queue)) != NULL) { STAILQ_REMOVE_HEAD(>tq_queue, ta_link); @@ -462,11 +466,20 @@ taskqueue_run_locked(struct taskqueue *queue) TQ_UNLOCK(queue); KASSERT(task->ta_func != NULL, ("task->ta_func is NULL")); + if (!in_net_epoch && TASK_IS_NET(task)) { + in_net_epoch = true; + NET_EPOCH_ENTER(et); + } else if (in_net_epoch && !TASK_IS_NET(task)) { + NET_EPOCH_EXIT(et); + in_net_epoch = false; + } task->ta_func(task->ta_context, pending); TQ_LOCK(queue); wakeup(task); } + if (in_net_epoch) + NET_EPOCH_EXIT(et); LIST_REMOVE(, tb_link); } Modified: head/sys/sys/_task.h == --- head/sys/sys/_task.hTue Feb 11 18:19:56 2020(r357770) +++
svn commit: r357770 - head/sys/kern
Author: mjg Date: Tue Feb 11 18:19:56 2020 New Revision: 357770 URL: https://svnweb.freebsd.org/changeset/base/357770 Log: vfs: fix vhold race in mnt_vnode_next_lazy_relock vdrop can set the hold count to 0 and wait for the ->mnt_listmtx held by mnt_vnode_next_lazy_relock caller. The routine incorrectly asserted the count has to be > 0. Reported by: pho Tested by:pho Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cTue Feb 11 18:16:29 2020(r357769) +++ head/sys/kern/vfs_subr.cTue Feb 11 18:19:56 2020(r357770) @@ -6264,7 +6264,13 @@ mnt_vnode_next_lazy_relock(struct vnode *mvp, struct m TAILQ_REMOVE(>mnt_lazyvnodelist, mvp, v_lazylist); TAILQ_INSERT_BEFORE(vp, mvp, v_lazylist); - vholdnz(vp); + /* +* Note we may be racing against vdrop which transitioned the hold +* count to 0 and now waits for the ->mnt_listmtx lock. This is fine, +* if we are the only user after we get the interlock we will just +* vdrop. +*/ + vhold(vp); mtx_unlock(>mnt_listmtx); VI_LOCK(vp); if (VN_IS_DOOMED(vp)) { @@ -6273,8 +6279,7 @@ mnt_vnode_next_lazy_relock(struct vnode *mvp, struct m } VNPASS(vp->v_mflag & VMP_LAZYLIST, vp); /* -* Since we had a period with no locks held we may be the last -* remaining user, in which case there is nothing to do. +* There is nothing to do if we are the last user. */ if (!refcount_release_if_not_last(>v_holdcnt)) goto out_lost; ___ 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: r357761 - head/sys/netinet
Hi Michael, On Tue, Feb 11, 2020 at 6:00 AM Michael Tuexen wrote: > > Author: tuexen > Date: Tue Feb 11 14:00:27 2020 > New Revision: 357761 > URL: https://svnweb.freebsd.org/changeset/base/357761 > > Log: > Use an int instead of a bool variable, since bool is not supported > on all platforms the stack is running on in userland. Maybe the platforms stuck in time before 1999 can be worked around with something trivial like: #if __STDC_VERSION__ < 199901L # warn Really really consider getting a new compiler typedef unsigned char _Bool; # define bool _Bool # define true ((_Bool)1) # define false ((_Bool)0) #endif Rather than inflicting the 80s on FreeBSD tree code? This commit seems like a step in the wrong direction and just for example, contravenes style(9). SCTP is already one of the buggiest areas of the kernel, and it can't be touched by outsiders for fear of breaking compatibility with the purported myriad other platforms it is also ported to. By transitive property, it also prevents modifying _any_ APIs SCTP consumes that happen to be implemented on other platforms. This hamstrings the kernel for what is obviously not functional code (throw a dart at a syzkaller report and better than 90% odds it's a SCTP panic), much less code a reasonable person would want to use in a security-sensitive context. If SCTP is intended to be a port from some legacy platform, perhaps it should live in ports rather than base? Thanks, Conrad ___ 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: r357769 - head/sys/netpfil/ipfw
Author: hselasky Date: Tue Feb 11 18:16:29 2020 New Revision: 357769 URL: https://svnweb.freebsd.org/changeset/base/357769 Log: Add missing EPOCH(9) wrapper in ipfw(8). Backtrace: panic() ip_output() dyn_tick() softclock_call_cc() softclock() ithread_loop() Differential Revision:https://reviews.freebsd.org/D23599 Reviewed by: glebius@ and ae@ Found by: mmacy@ Reported by: jmd@ Sponsored by: Mellanox Technologies Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c Modified: head/sys/netpfil/ipfw/ip_fw_dynamic.c == --- head/sys/netpfil/ipfw/ip_fw_dynamic.c Tue Feb 11 18:15:57 2020 (r357768) +++ head/sys/netpfil/ipfw/ip_fw_dynamic.c Tue Feb 11 18:16:29 2020 (r357769) @@ -2718,6 +2718,7 @@ dyn_grow_hashtable(struct ip_fw_chain *chain, uint32_t static void dyn_tick(void *vnetx) { + struct epoch_tracker et; uint32_t buckets; CURVNET_SET((struct vnet *)vnetx); @@ -2740,10 +2741,12 @@ dyn_tick(void *vnetx) if (V_dyn_keepalive != 0 && V_dyn_keepalive_last + V_dyn_keepalive_period <= time_uptime) { V_dyn_keepalive_last = time_uptime; + NET_EPOCH_ENTER(et); dyn_send_keepalive_ipv4(_layer3_chain); #ifdef INET6 dyn_send_keepalive_ipv6(_layer3_chain); #endif + NET_EPOCH_EXIT(et); } /* * Check if we need to resize the hash: ___ 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: r357768 - head/sys/netinet
Author: tuexen Date: Tue Feb 11 18:15:57 2020 New Revision: 357768 URL: https://svnweb.freebsd.org/changeset/base/357768 Log: Don't start an SCTP timer using a net, which has been removed. Submitted by: Taylor Brandstetter MFC after:1 week Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_pcb.c == --- head/sys/netinet/sctp_pcb.c Tue Feb 11 18:15:23 2020(r357767) +++ head/sys/netinet/sctp_pcb.c Tue Feb 11 18:15:57 2020(r357768) @@ -4480,6 +4480,7 @@ out: SCTP_FROM_SCTP_PCB + SCTP_LOC_9); sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, SCTP_FROM_SCTP_PCB + SCTP_LOC_10); + net->dest_state |= SCTP_ADDR_BEING_DELETED; sctp_free_remote_addr(net); } Modified: head/sys/netinet/sctputil.c == --- head/sys/netinet/sctputil.c Tue Feb 11 18:15:23 2020(r357767) +++ head/sys/netinet/sctputil.c Tue Feb 11 18:15:57 2020(r357768) @@ -2050,6 +2050,10 @@ sctp_timer_start(int t_type, struct sctp_inpcb *inp, s if (stcb) { SCTP_TCB_LOCK_ASSERT(stcb); } + /* Don't restart timer on net that's been removed. */ + if (net != NULL && (net->dest_state & SCTP_ADDR_BEING_DELETED)) { + return; + } switch (t_type) { case SCTP_TIMER_TYPE_ADDR_WQ: /* Only 1 tick away :-) */ ___ 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: r357767 - head/sys/amd64/amd64
Author: mjg Date: Tue Feb 11 18:15:23 2020 New Revision: 357767 URL: https://svnweb.freebsd.org/changeset/base/357767 Log: amd64: remove redundant sa->code assignment from cpu_fetch_syscall_args_fallback It is already set in the only caller. Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c == --- head/sys/amd64/amd64/trap.c Tue Feb 11 18:13:53 2020(r357766) +++ head/sys/amd64/amd64/trap.c Tue Feb 11 18:15:23 2020(r357767) @@ -993,8 +993,6 @@ cpu_fetch_syscall_args_fallback(struct thread *td, str reg = 0; regcnt = NARGREGS; - sa->code = frame->tf_rax; - if (sa->code == SYS_syscall || sa->code == SYS___syscall) { sa->code = frame->tf_rdi; reg++; ___ 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: r357766 - in head/sys: kern sys
Author: mjg Date: Tue Feb 11 18:13:53 2020 New Revision: 357766 URL: https://svnweb.freebsd.org/changeset/base/357766 Log: capsicum: restore the cap_rights_contains symbol It is expected to be provided by libc. PR: 244033 Reported by: Jan Kokemueller Modified: head/sys/kern/subr_capability.c head/sys/sys/capsicum.h Modified: head/sys/kern/subr_capability.c == --- head/sys/kern/subr_capability.c Tue Feb 11 18:03:45 2020 (r357765) +++ head/sys/kern/subr_capability.c Tue Feb 11 18:13:53 2020 (r357766) @@ -394,3 +394,27 @@ cap_rights_remove(cap_rights_t *dst, const cap_rights_ return (dst); } + +#ifndef _KERNEL +bool +cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little) +{ + unsigned int i, n; + + assert(CAPVER(big) == CAP_RIGHTS_VERSION_00); + assert(CAPVER(little) == CAP_RIGHTS_VERSION_00); + assert(CAPVER(big) == CAPVER(little)); + + n = CAPARSIZE(big); + assert(n >= CAPARSIZE_MIN && n <= CAPARSIZE_MAX); + + for (i = 0; i < n; i++) { + if ((big->cr_rights[i] & little->cr_rights[i]) != + little->cr_rights[i]) { + return (false); + } + } + + return (true); +} +#endif Modified: head/sys/sys/capsicum.h == --- head/sys/sys/capsicum.h Tue Feb 11 18:03:45 2020(r357765) +++ head/sys/sys/capsicum.h Tue Feb 11 18:13:53 2020(r357766) @@ -344,7 +344,7 @@ cap_rights_t *cap_rights_merge(cap_rights_t *dst, cons cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); void __cap_rights_sysinit(void *arg); - +#ifdef _KERNEL /* * We only support one size to reduce branching. */ @@ -390,6 +390,9 @@ cap_check_inline_transient(const cap_rights_t *havep, return (1); return (0); } +#else +bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little); +#endif __END_DECLS struct cap_rights_init_args { ___ 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: r357765 - head/sys/net
Author: kib Date: Tue Feb 11 18:03:45 2020 New Revision: 357765 URL: https://svnweb.freebsd.org/changeset/base/357765 Log: if_media.h: Add 50G KR4 ethernet media type. Submitted by: Adam Peace Reviewed by: hselasky Differential revision:https://reviews.freebsd.org/D23620 Modified: head/sys/net/ieee8023ad_lacp.c head/sys/net/if_media.h Modified: head/sys/net/ieee8023ad_lacp.c == --- head/sys/net/ieee8023ad_lacp.c Tue Feb 11 17:45:01 2020 (r357764) +++ head/sys/net/ieee8023ad_lacp.c Tue Feb 11 18:03:45 2020 (r357765) @@ -1194,6 +1194,7 @@ lacp_compose_key(struct lacp_port *lp) case IFM_50G_PCIE: case IFM_50G_CR2: case IFM_50G_KR2: + case IFM_50G_KR4: case IFM_50G_SR2: case IFM_50G_LR2: case IFM_50G_LAUI2_AC: Modified: head/sys/net/if_media.h == --- head/sys/net/if_media.h Tue Feb 11 17:45:01 2020(r357764) +++ head/sys/net/if_media.h Tue Feb 11 18:03:45 2020(r357765) @@ -258,6 +258,7 @@ uint64_tifmedia_baudrate(int); #defineIFM_400G_DR4IFM_X(115) /* 400GBase-DR4 */ #defineIFM_400G_AUI8_AC IFM_X(116) /* 400G-AUI8 active copper/optical */ #defineIFM_400G_AUI8 IFM_X(117) /* 400G-AUI8 */ +#defineIFM_50G_KR4 IFM_X(118) /* 50GBase-KR4 */ /* * Please update ieee8023ad_lacp.c:lacp_compose_key() @@ -484,6 +485,7 @@ struct ifmedia_description { { IFM_25G_SR, "25GBase-SR" }, \ { IFM_50G_CR2, "50GBase-CR2" },\ { IFM_50G_KR2, "50GBase-KR2" },\ + { IFM_50G_KR4, "50GBase-KR4" },\ { IFM_25G_LR, "25GBase-LR" }, \ { IFM_10G_AOC, "10GBase-AOC" },\ { IFM_25G_ACC, "25GBase-ACC" },\ @@ -827,6 +829,7 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_25G_SR, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_50G_CR2, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_50G_KR2, IF_Gbps(50ULL) }, \ + { IFM_ETHER | IFM_50G_KR4, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_25G_LR, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_10G_AOC, IF_Gbps(10ULL) }, \ { IFM_ETHER | IFM_25G_ACC, IF_Gbps(25ULL) }, \ ___ 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: r357764 - head/sys/net
Author: kib Date: Tue Feb 11 17:45:01 2020 New Revision: 357764 URL: https://svnweb.freebsd.org/changeset/base/357764 Log: if_media.c: staticize and constify ifmedia description structures used under IFMEDIA_DEBUG. The reason for this change is to make it clear the scope of the in-kernel usage of IFM_TYPE_DESCRIPTIONS and IFM_SUBTYPE_ETHERNET_DESCRIPTIONS macros. Also it is somewhat better C. Reviewed by: hselasky Sponsored by: Mellanox Technologies Differential revision:https://reviews.freebsd.org/D23620 Modified: head/sys/net/if_media.c Modified: head/sys/net/if_media.c == --- head/sys/net/if_media.c Tue Feb 11 17:41:45 2020(r357763) +++ head/sys/net/if_media.c Tue Feb 11 17:45:01 2020(r357764) @@ -392,44 +392,47 @@ ifmedia_baudrate(int mword) } #ifdef IFMEDIA_DEBUG -struct ifmedia_description ifm_type_descriptions[] = +static const struct ifmedia_description ifm_type_descriptions[] = IFM_TYPE_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ethernet_descriptions[] = +static const struct ifmedia_description ifm_subtype_ethernet_descriptions[] = IFM_SUBTYPE_ETHERNET_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ethernet_option_descriptions[] = +static const struct ifmedia_description +ifm_subtype_ethernet_option_descriptions[] = IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ieee80211_descriptions[] = +static const struct ifmedia_description ifm_subtype_ieee80211_descriptions[] = IFM_SUBTYPE_IEEE80211_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ieee80211_option_descriptions[] = +static const struct ifmedia_description +ifm_subtype_ieee80211_option_descriptions[] = IFM_SUBTYPE_IEEE80211_OPTION_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ieee80211_mode_descriptions[] = +static const struct ifmedia_description +ifm_subtype_ieee80211_mode_descriptions[] = IFM_SUBTYPE_IEEE80211_MODE_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_atm_descriptions[] = +static const struct ifmedia_description ifm_subtype_atm_descriptions[] = IFM_SUBTYPE_ATM_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_atm_option_descriptions[] = +static const struct ifmedia_description ifm_subtype_atm_option_descriptions[] = IFM_SUBTYPE_ATM_OPTION_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_shared_descriptions[] = +static const struct ifmedia_description ifm_subtype_shared_descriptions[] = IFM_SUBTYPE_SHARED_DESCRIPTIONS; -struct ifmedia_description ifm_shared_option_descriptions[] = +static const struct ifmedia_description ifm_shared_option_descriptions[] = IFM_SHARED_OPTION_DESCRIPTIONS; struct ifmedia_type_to_subtype { - struct ifmedia_description *subtypes; - struct ifmedia_description *options; - struct ifmedia_description *modes; + const struct ifmedia_description *subtypes; + const struct ifmedia_description *options; + const struct ifmedia_description *modes; }; /* must be in the same order as IFM_TYPE_DESCRIPTIONS */ -struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { +static const struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { { _subtype_ethernet_descriptions[0], _subtype_ethernet_option_descriptions[0], @@ -454,8 +457,8 @@ static void ifmedia_printword(ifmw) int ifmw; { - struct ifmedia_description *desc; - struct ifmedia_type_to_subtype *ttos; + const struct ifmedia_description *desc; + const struct ifmedia_type_to_subtype *ttos; int seen_option = 0; /* Find the top-level interface type. */ ___ 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: r357763 - head/sys/net
Author: kib Date: Tue Feb 11 17:41:45 2020 New Revision: 357763 URL: https://svnweb.freebsd.org/changeset/base/357763 Log: if_media.c: use __FBSDID(). Reviewed by: hselasky Sponsored by: Mellanox Technologies Differential revision:https://reviews.freebsd.org/D23620 Modified: head/sys/net/if_media.c Modified: head/sys/net/if_media.c == --- head/sys/net/if_media.c Tue Feb 11 15:12:09 2020(r357762) +++ head/sys/net/if_media.c Tue Feb 11 17:41:45 2020(r357763) @@ -1,5 +1,4 @@ /* $NetBSD: if_media.c,v 1.1 1997/03/17 02:55:15 thorpej Exp $ */ -/* $FreeBSD$ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -47,6 +46,9 @@ * Many thanks to Matt Thomas for providing the information necessary * to implement this interface. */ + +#include +__FBSDID("$FreeBSD$"); #include "opt_ifmedia.h" ___ 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: r357361 - in head/sys: kern sys ufs/ufs vm
On 2/10/20 11:54 AM, Mateusz Guzik wrote: > On 2/3/20, John Baldwin wrote: >> On 1/31/20 10:46 PM, Mateusz Guzik wrote: >>> Author: mjg >>> Date: Sat Feb 1 06:46:55 2020 >>> New Revision: 357361 >>> URL: https://svnweb.freebsd.org/changeset/base/357361 >>> >>> Log: >>> vfs: replace VOP_MARKATIME with VOP_MMAPPED >>> >>> The routine is only provided by ufs and is only used on mmap and exec. >>> >>> Reviewed by: kib >>> Differential Revision:https://reviews.freebsd.org/D23422 >>> >>> Modified: >>> head/sys/kern/kern_exec.c >>> head/sys/kern/vfs_subr.c >>> head/sys/kern/vnode_if.src >>> head/sys/sys/vnode.h >>> head/sys/ufs/ufs/ufs_vnops.c >>> head/sys/vm/vm_mmap.c >>> >>> Modified: head/sys/ufs/ufs/ufs_vnops.c >>> == >>> --- head/sys/ufs/ufs/ufs_vnops.cSat Feb 1 06:41:44 2020 >>> (r357360) >>> +++ head/sys/ufs/ufs/ufs_vnops.cSat Feb 1 06:46:55 2020 >>> (r357361) >>> @@ -108,7 +108,7 @@ static vop_getattr_tufs_getattr; >>> static vop_ioctl_t ufs_ioctl; >>> static vop_link_t ufs_link; >>> static int ufs_makeinode(int mode, struct vnode *, struct vnode **, >>> struct componentname *, const char *); >>> -static vop_markatime_t ufs_markatime; >>> +static vop_mmapped_t ufs_mmapped; >>> static vop_mkdir_t ufs_mkdir; >>> static vop_mknod_t ufs_mknod; >>> static vop_open_t ufs_open; >>> @@ -676,19 +676,22 @@ out: >>> } >>> #endif /* UFS_ACL */ >>> >>> -/* >>> - * Mark this file's access time for update for vfs_mark_atime(). This >>> - * is called from execve() and mmap(). >>> - */ >> >> Why remove this comment rather than update it? It is largely still >> true and explains the purpose of the VOP (update the atime) which is >> now no longer obvious from the name. >> > > I don't think a fs-specific implementation of a VOP is the right place to > state where it is called from. I would argue the name could be better as > the execve bit is definitely not obvious, but interested parties can > always grep. This (always grep) is why comments matter. If we wanted people to just use grep and always UTSL, we wouldn't bother having any comments at all. One of the purposes of comments is to allow a human reader to understand the code in context without needing several different windows open to piece together what is happening. In particular, the comment gives a better hint as to _why_ we are updating the atime. The old name did a better job of this than the new one which is more bland, but presumably you have future changes to add that are beyond just changing the atime and that is why you renamed it? -- John Baldwin ___ 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: r357695 - in head: sys/kern sys/sys usr.bin/procstat
On 2/10/20 11:15 AM, Konstantin Belousov wrote: > On Mon, Feb 10, 2020 at 10:11:43AM -0800, John Baldwin wrote: >> On 2/9/20 4:10 AM, Konstantin Belousov wrote: >>> Author: kib >>> Date: Sun Feb 9 12:10:37 2020 >>> New Revision: 357695 >>> URL: https://svnweb.freebsd.org/changeset/base/357695 >>> >>> Log: >>> Add AT_BSDFLAGS auxv entry. >>> >>> The intent is to provide bsd-specific flags relevant to interpreter >>> and C runtime. I did not want to reuse AT_FLAGS which is common ELF >>> auxv entry. >>> >>> Use bsdflags to report kernel support for sigfastblock(2). This >>> allows rtld and libthr to safely infer the syscall presence without >>> SIGSYS. The tunable kern.elf{32,64}.sigfastblock blocks reporting. >>> >>> Tested by:pho >>> Disscussed with: cem, emaste, jilles >>> Sponsored by: The FreeBSD Foundation >>> Differential revision:https://reviews.freebsd.org/D12773 >> >> I find adding a new auxv type curious. The MIPS ABI doc says that >> "bits under the 0xff00 mask are reserved for system semantics". >> The powerpc and x86-64 docs don't define any bits at all. In >> practice I think we are free to use AT_FLAGS however we wish as no >> use cases of "standard" bits have arisen since AT_FLAGS was first >> defined. > > So you would prefer to have me used AT_FLAGS for sigfastblock indicator ? > I am feeling uncomfortable doing that. > > My reasoning, to reformulate it from what I wrote in the commit message, > is to not pollute neither compilation nor ABI namespace for bsd-specific > flags. AT_FLAGS was not touched by anybody and I do not want to open > it for use, since ABI group my finally find some use for it. I would bet money the ABI group will never use AT_FLAGS since they haven't found a use yet. That said, adding a new auxv vector isn't the end of the world. I'll work on a patch to GDB when I get some spare time. -- John Baldwin ___ 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: r357762 - in head/sys: arm64/conf conf dev/pci dev/pci/controller
Author: br Date: Tue Feb 11 15:12:09 2020 New Revision: 357762 URL: https://svnweb.freebsd.org/changeset/base/357762 Log: Add PCI Express driver for the ARM Neoverse N1 System Development Platform (N1SDP). Neoverse N1 is a high-performance ARM microarchitecture designed by the ARM Holdings for the server market. The PCI part on N1SDP was shipped untested and suffers from some integration issues. For instance accessing to not existing BDFs causes System Error (SError) exception. To mitigate this, the firmware scans the bus, catches SErrors and creates a table with valid BDFs. That allows us to filter-out accesses to invalid BDFs in this driver. Also the root complex config space (BDF == 0) has an unusual location in memory map, so remapping accesses to it is required. Finally, the config space is restricted to 32-bit accesses only. This was tested on the ARM boxes kindly provided by the ARM Ltd to the DARPA CHERI Project. In collaboration with:andrew Reviewed by: andrew Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D23349 Added: head/sys/dev/pci/controller/ head/sys/dev/pci/controller/pci_n1sdp.c (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 head/sys/dev/pci/pci_host_generic_acpi.c head/sys/dev/pci/pci_host_generic_acpi.h Modified: head/sys/arm64/conf/GENERIC == --- head/sys/arm64/conf/GENERIC Tue Feb 11 14:00:27 2020(r357761) +++ head/sys/arm64/conf/GENERIC Tue Feb 11 15:12:09 2020(r357762) @@ -147,6 +147,7 @@ device cpufreq # Bus drivers device pci +device pci_n1sdp # ARM Neoverse N1 SDP PCI device al_pci # Annapurna Alpine PCI-E optionsPCI_HP # PCI-Express native HotPlug optionsPCI_IOV # PCI SR-IOV support Modified: head/sys/conf/files.arm64 == --- head/sys/conf/files.arm64 Tue Feb 11 14:00:27 2020(r357761) +++ head/sys/conf/files.arm64 Tue Feb 11 15:12:09 2020(r357762) @@ -248,6 +248,7 @@ dev/neta/if_mvneta_fdt.coptionalneta fdt dev/neta/if_mvneta.c optionalneta mdio mii dev/ofw/ofw_cpu.c optionalfdt dev/ofw/ofwpci.c optionalfdt pci +dev/pci/controller/pci_n1sdp.c optionalpci_n1sdp acpi dev/pci/pci_host_generic.c optionalpci dev/pci/pci_host_generic_acpi.coptionalpci acpi dev/pci/pci_host_generic_fdt.c optionalpci fdt Added: head/sys/dev/pci/controller/pci_n1sdp.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pci/controller/pci_n1sdp.c Tue Feb 11 15:12:09 2020 (r357762) @@ -0,0 +1,350 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2019 Andrew Turner + * Copyright (c) 2019 Ruslan Bukin + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include
svn commit: r357761 - head/sys/netinet
Author: tuexen Date: Tue Feb 11 14:00:27 2020 New Revision: 357761 URL: https://svnweb.freebsd.org/changeset/base/357761 Log: Use an int instead of a bool variable, since bool is not supported on all platforms the stack is running on in userland. Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_pcb.c == --- head/sys/netinet/sctp_pcb.c Tue Feb 11 12:14:22 2020(r357760) +++ head/sys/netinet/sctp_pcb.c Tue Feb 11 14:00:27 2020(r357761) @@ -4766,7 +4766,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc } } /* Now clean up any other timers */ - sctp_stop_association_timers(stcb, false); + sctp_stop_association_timers(stcb, 0); /* Now the read queue needs to be cleaned up (only once) */ if ((stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_ABOUT_TO_BE_FREED); @@ -4934,7 +4934,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc /* * Now restop the timers to be sure this is paranoia at is finest! */ - sctp_stop_association_timers(stcb, true); + sctp_stop_association_timers(stcb, 1); /* * The chunk lists and such SHOULD be empty but we check them just Modified: head/sys/netinet/sctputil.c == --- head/sys/netinet/sctputil.c Tue Feb 11 12:14:22 2020(r357760) +++ head/sys/netinet/sctputil.c Tue Feb 11 14:00:27 2020(r357761) @@ -802,7 +802,7 @@ sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) } void -sctp_stop_association_timers(struct sctp_tcb *stcb, bool stop_assoc_kill_timer) +sctp_stop_association_timers(struct sctp_tcb *stcb, int stop_assoc_kill_timer) { struct sctp_inpcb *inp; struct sctp_nets *net; @@ -812,7 +812,7 @@ sctp_stop_association_timers(struct sctp_tcb *stcb, bo SCTP_FROM_SCTPUTIL + SCTP_LOC_18); sctp_timer_stop(SCTP_TIMER_TYPE_STRRESET, inp, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_19); - if (stop_assoc_kill_timer) { + if (stop_assoc_kill_timer != 0) { sctp_timer_stop(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL, SCTP_FROM_SCTPUTIL + SCTP_LOC_20); } Modified: head/sys/netinet/sctputil.h == --- head/sys/netinet/sctputil.h Tue Feb 11 12:14:22 2020(r357760) +++ head/sys/netinet/sctputil.h Tue Feb 11 14:00:27 2020(r357761) @@ -165,7 +165,7 @@ sctp_pull_off_control_to_new_inp(struct sctp_inpcb *ol void sctp_stop_timers_for_shutdown(struct sctp_tcb *); /* Stop all timers for association and remote addresses. */ -void sctp_stop_association_timers(struct sctp_tcb *, bool); +void sctp_stop_association_timers(struct sctp_tcb *, int); void sctp_report_all_outbound(struct sctp_tcb *, uint16_t, int, int ___ 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: r357760 - in stable/12/sys: cddl/compat/opensolaris/kern compat/cloudabi
Author: kib Date: Tue Feb 11 12:14:22 2020 New Revision: 357760 URL: https://svnweb.freebsd.org/changeset/base/357760 Log: MFC r357512: Add sys/systm.h to several places that use vm headers. Modified: stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c stable/12/sys/compat/cloudabi/cloudabi_vdso.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c == --- stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c Tue Feb 11 12:13:21 2020(r357759) +++ stable/12/sys/cddl/compat/opensolaris/kern/opensolaris_vm.c Tue Feb 11 12:14:22 2020(r357760) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include Modified: stable/12/sys/compat/cloudabi/cloudabi_vdso.c == --- stable/12/sys/compat/cloudabi/cloudabi_vdso.c Tue Feb 11 12:13:21 2020(r357759) +++ stable/12/sys/compat/cloudabi/cloudabi_vdso.c Tue Feb 11 12:14:22 2020(r357760) @@ -26,7 +26,8 @@ #include __FBSDID("$FreeBSD$"); -#include +#include +#include #include #include #include ___ 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: r357759 - stable/12/sys/fs/tmpfs
Author: kib Date: Tue Feb 11 12:13:21 2020 New Revision: 357759 URL: https://svnweb.freebsd.org/changeset/base/357759 Log: MFC r357511: tmpfs_mount update: simplify, cache the value of VFS_TO_TMPFS() calculation. Modified: stable/12/sys/fs/tmpfs/tmpfs_vfsops.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/tmpfs/tmpfs_vfsops.c == --- stable/12/sys/fs/tmpfs/tmpfs_vfsops.c Tue Feb 11 12:05:59 2020 (r357758) +++ stable/12/sys/fs/tmpfs/tmpfs_vfsops.c Tue Feb 11 12:13:21 2020 (r357759) @@ -344,6 +344,7 @@ tmpfs_mount(struct mount *mp) /* Only support update mounts for certain options. */ if (vfs_filteropt(mp->mnt_optnew, tmpfs_updateopts) != 0) return (EOPNOTSUPP); + tmp = VFS_TO_TMPFS(mp); if (vfs_getopt_size(mp->mnt_optnew, "size", _max) == 0) { /* * On-the-fly resizing is not supported (yet). We still @@ -352,17 +353,17 @@ tmpfs_mount(struct mount *mp) * parameter, say trying to change rw to ro or vice * versa, would cause vfs_filteropt() to bail. */ - if (size_max != VFS_TO_TMPFS(mp)->tm_size_max) + if (size_max != tmp->tm_size_max) return (EOPNOTSUPP); } if (vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && - !(VFS_TO_TMPFS(mp)->tm_ronly)) { + !tmp->tm_ronly) { /* RW -> RO */ return (tmpfs_rw_to_ro(mp)); } else if (!vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && - VFS_TO_TMPFS(mp)->tm_ronly) { + tmp->tm_ronly) { /* RO -> RW */ - VFS_TO_TMPFS(mp)->tm_ronly = 0; + tmp->tm_ronly = 0; MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_RDONLY; MNT_IUNLOCK(mp); ___ 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: r357758 - stable/12/sys/kern
Author: kib Date: Tue Feb 11 12:05:59 2020 New Revision: 357758 URL: https://svnweb.freebsd.org/changeset/base/357758 Log: MFC r357678: Correct the function name in the comment. Modified: stable/12/sys/kern/kern_thread.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_thread.c == --- stable/12/sys/kern/kern_thread.cTue Feb 11 07:02:48 2020 (r357757) +++ stable/12/sys/kern/kern_thread.cTue Feb 11 12:05:59 2020 (r357758) @@ -1055,7 +1055,7 @@ thread_suspend_check(int return_instead) * Typically, when retrying due to casueword(9) failure (rv == 1), we * should handle the stop requests there, with exception of cases when * the thread owns a kernel resource, for instance busied the umtx - * key, or when functions return immediately if casueword_check_susp() + * key, or when functions return immediately if thread_check_susp() * returned non-zero. On the other hand, retrying the whole lock * operation, we better not stop there but delegate the handling to * ast. ___ 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"