Re: svn commit: r339971 - in head: libexec/rc share/man/man5 share/man/man8
On Wed, Oct 31, 2018 at 08:37:12PM +, Devin Teske wrote: > Author: dteske > Date: Wed Oct 31 20:37:12 2018 > New Revision: 339971 > URL: https://svnweb.freebsd.org/changeset/base/339971 > > Log: > Add new rc keywords: enable, disable, delete > > This adds new keywords to rc/service to enable/disable a service's > rc.conf(5) variable and "delete" to remove the variable. The enable command is just one typo away from enabled, so it's quite easy to enable rc-script instead of checking if it enabled. > When the "service_delete_empty" variable in rc.conf(5) is set to "YES" > (default is "NO") an rc.conf.d file (in /etc/ or /usr/local/etc) is > deleted if empty after modification using "service $foo delete". > > Submitted by: lme (modified) > Reviewed by:0mp (previous version), lme, bcr > Relnotes: yes > Sponsored by: Smule, Inc. > Differential Revision: https://reviews.freebsd.org/D17113 -- Alex ___ 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: r339982 - vendor-sys/acpica/20181031
Author: jkim Date: Thu Nov 1 02:10:55 2018 New Revision: 339982 URL: https://svnweb.freebsd.org/changeset/base/339982 Log: Tag ACPICA 20181031. Added: vendor-sys/acpica/20181031/ - copied from r339981, vendor-sys/acpica/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: r339981 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/debugger source/components/dispatcher source/components/namespace source/components/parser source/...
Author: jkim Date: Thu Nov 1 02:09:52 2018 New Revision: 339981 URL: https://svnweb.freebsd.org/changeset/base/339981 Log: Import ACPICA 20181031. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/common/dmtbdump3.c vendor-sys/acpica/dist/source/common/dmtbinfo3.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmessages.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslpredef.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/dttable2.c vendor-sys/acpica/dist/source/compiler/prscan.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actbinfo.h vendor-sys/acpica/dist/source/include/actbl3.h vendor-sys/acpica/dist/source/tools/acpidump/apmain.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c Modified: vendor-sys/acpica/dist/changes.txt == --- vendor-sys/acpica/dist/changes.txt Wed Oct 31 23:54:36 2018 (r339980) +++ vendor-sys/acpica/dist/changes.txt Thu Nov 1 02:09:52 2018 (r339981) @@ -1,4 +1,54 @@ +31 October 2018. Summary of changes for version 20181031: + +This release is available at https://acpica.org/downloads + + +An Operation Region regression was fixed by properly adding address +ranges to a global list during initialization. This allows OS to +accurately check for overlapping regions between native devices (such as +PCI) and Operation regions as well as checking for region conflicts +between two Operation Regions. + +Added support for the 2-byte extended opcodes in the code/feature that +attempts to continue parsing during the table load phase. Skip parsing +Device declarations (and other extended opcodes) when an error occurs +during parsing. Previously, only single-byte opcodes were supported. + +Cleanup: Simplified the module-level code support by eliminating a +useless global variable (AcpiGbl_GroupModuleLeveCode). + + +2) iASL Compiler/Disassembler and Tools: + +iASL/Preprocessor: Fixed a regression where an incorrect use of ACPI_FREE +could cause a fault in the preprocessor. This was an inadvertent side- +effect from moving more allocations/frees to the local cache/memory +mechanism. + +iASL: Enhanced error detection by validating that all NameSeg elements +within a NamePatch actually exist. The previous behavior was spotty at +best, and such errors could be improperly ignored at compiler time (never +at runtime, however. There are two new error messages, as shown in the +examples below: + +dsdt.asl 33: CreateByteField (.BXXX, 1, CBF1) +Error6161 - ^ One or more objects within +the Pathname do not exist (.BXXX) + +dsdt.asl 34: CreateByteField (BUF1, .INT1, .CBF1) +Error6160 -One or more prefix Scopes do not exist ^ +(.CBF1) + +iASL: Disassembler/table-compiler: Added support for the static data +table TPM2 revision 3 (an older version of TPM2). The support has been +added for the compiler and the disassembler. + +Fixed compilation of DOS format data table file on Unix/Linux systems. +iASL now properly detects line continuations (\) for DOS format data +table definition language files on when executing on Unix/Linux. + + 03 October 2018. Summary of changes for version 20181003: Modified: vendor-sys/acpica/dist/source/common/dmtbdump3.c == --- vendor-sys/acpica/dist/source/common/dmtbdump3.cWed Oct 31 23:54:36 2018(r339980) +++ vendor-sys/acpica/dist/source/common/dmtbdump3.cThu Nov 1 02:09:52 2018(r339981) @@ -497,7 +497,52 @@ AcpiDmDumpTcpa ( * DESCRIPTION: Format the contents of a TPM2. * **/ +static
svn commit: r339983 - head/sbin/clri
Author: mckusick Date: Thu Nov 1 03:38:57 2018 New Revision: 339983 URL: https://svnweb.freebsd.org/changeset/base/339983 Log: In preparation for adding inode check-hashes, convert the clri(8) program to use the libufs library interface. No functional change (as for now the libufs library does not do inode check-hashes). Reviewed by: kib Sponsored by: Netflix Modified: head/sbin/clri/clri.c Modified: head/sbin/clri/clri.c == --- head/sbin/clri/clri.c Thu Nov 1 02:10:55 2018(r339982) +++ head/sbin/clri/clri.c Thu Nov 1 03:38:57 2018(r339983) @@ -62,6 +62,11 @@ __FBSDID("$FreeBSD$"); #include #include +union dinodep { + struct ufs1_dinode *dp1; + struct ufs2_dinode *dp2; +}; + static void usage(void) { @@ -72,81 +77,51 @@ usage(void) int main(int argc, char *argv[]) { - struct fs *fs; - struct ufs1_dinode *dp1; - struct ufs2_dinode *dp2; - char *ibuf[MAXBSIZE]; - long generation, bsize; - off_t offset; - int fd, ret, inonum; + union dinodep dp; + struct uufsd disk; + long generation; + int inonum, exitval; char *fsname; - void *v = ibuf; if (argc < 3) usage(); - fsname = *++argv; - /* get the superblock. */ - if ((fd = open(fsname, O_RDWR, 0)) < 0) - err(1, "%s", fsname); - if ((ret = sbget(fd, &fs, -1)) != 0) { - switch (ret) { - case ENOENT: - warn("Cannot find file system superblock"); - return (1); - default: - warn("Unable to read file system superblock"); - return (1); - } + fsname = *++argv; + if (ufs_disk_fillout(&disk, fsname) == -1) { + printf("loading superblock: %s\n", disk.d_error); + exit (1); } - bsize = fs->fs_bsize; /* remaining arguments are inode numbers. */ + exitval = 0; while (*++argv) { /* get the inode number. */ - if ((inonum = atoi(*argv)) <= 0) - errx(1, "%s is not a valid inode number", *argv); + if ((inonum = atoi(*argv)) < UFS_ROOTINO) { + printf("%s is not a valid inode number", *argv); + exitval = 1; + continue; + } (void)printf("clearing %d\n", inonum); - /* read in the appropriate block. */ - offset = ino_to_fsba(fs, inonum); /* inode to fs blk */ - offset = fsbtodb(fs, offset); /* fs blk disk blk */ - offset *= DEV_BSIZE;/* disk blk to bytes */ - - /* seek and read the block */ - if (lseek(fd, offset, SEEK_SET) < 0) - err(1, "%s", fsname); - if (read(fd, ibuf, bsize) != bsize) - err(1, "%s", fsname); - - if (fs->fs_magic == FS_UFS2_MAGIC) { - /* get the inode within the block. */ - dp2 = &(((struct ufs2_dinode *)v) - [ino_to_fsbo(fs, inonum)]); - - /* clear the inode, and bump the generation count. */ - generation = dp2->di_gen + 1; - memset(dp2, 0, sizeof(*dp2)); - dp2->di_gen = generation; + if (getino(&disk, (void **)&dp, inonum, NULL) == -1) { + printf("getino: %s\n", disk.d_error); + exitval = 1; + continue; + } + /* clear the inode, and bump the generation count. */ + if (disk.d_fs.fs_magic == FS_UFS1_MAGIC) { + generation = dp.dp1->di_gen + 1; + memset(dp.dp1, 0, sizeof(*dp.dp1)); + dp.dp1->di_gen = generation; } else { - /* get the inode within the block. */ - dp1 = &(((struct ufs1_dinode *)v) - [ino_to_fsbo(fs, inonum)]); - - /* clear the inode, and bump the generation count. */ - generation = dp1->di_gen + 1; - memset(dp1, 0, sizeof(*dp1)); - dp1->di_gen = generation; + generation = dp.dp2->di_gen + 1; + memset(dp.dp2, 0, sizeof(*dp.dp2)); + dp.dp2->di_gen = generation; } - - /* backup and write the block */ - if (lseek(fd, (off_t)-bsize, SEEK_CUR) < 0) - err(1, "%s", fsname); - if (write(fd, ibuf, bsize) != bsize) - err(1, "%s",
svn commit: r339980 - stable/12/release
Author: gjb Date: Wed Oct 31 23:54:36 2018 New Revision: 339980 URL: https://svnweb.freebsd.org/changeset/base/339980 Log: MFC r339873: Set OPTIONS_UNSET in the argument list to env(1), and add AVAHI to the list. This fixes the textproc/docproj build seemingly following FLAVORS being added. Specifically, the problem with the dependency chain here is: - textproc/docproj depends on print/cups, which sets AVAHI=on by default; - net/avahi-app depends on devel/gobject-introspection, which requires python3+; - graphics/netpbm depends on graphics/mesa-libs, which can only be built with python2.7; - textproc/docproj depends on a number of graphics ports for font rendering, etc. MFC r339875: Pass _BRANCH in the reldoc target to ensure the correct src branch is used when generating the hardware.html page. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/12/release/Makefile stable/12/release/release.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/release/Makefile == --- stable/12/release/Makefile Wed Oct 31 23:17:00 2018(r339979) +++ stable/12/release/Makefile Wed Oct 31 23:54:36 2018(r339980) @@ -174,6 +174,7 @@ reldoc: cd ${DOCDIR}/en_US.ISO8859-1/htdocs/releases/${REVISION}R && \ env MAN4DIR=${WORLDDIR}/share/man/man4 \ SVN=${SVN} \ + _BRANCH=${BRANCH} \ ${MAKE} all install clean "FORMATS=html txt" \ INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc \ WEBDIR=${DOCDIR} DESTDIR=${.OBJDIR}/rdoc Modified: stable/12/release/release.sh == --- stable/12/release/release.shWed Oct 31 23:17:00 2018 (r339979) +++ stable/12/release/release.shWed Oct 31 23:54:36 2018 (r339980) @@ -287,9 +287,9 @@ extra_chroot_setup() { PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports" PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles" - chroot ${CHROOTDIR} env ${PBUILD_FLAGS} make -C \ + chroot ${CHROOTDIR} env ${PBUILD_FLAGS} \ + OPTIONS_UNSET="AVAHI FOP IGOR" make -C \ /usr/ports/textproc/docproj \ - OPTIONS_UNSET="FOP IGOR" \ FORCE_PKG_REGISTER=1 \ install clean distclean fi ___ 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: r339979 - in head/sys: amd64/amd64 amd64/include conf x86/pci
Author: kib Date: Wed Oct 31 23:17:00 2018 New Revision: 339979 URL: https://svnweb.freebsd.org/changeset/base/339979 Log: Add pci_early function to detect Intel stolen memory. On some Intel devices BIOS does not properly reserve memory (called "stolen memory") for the GPU. If the stolen memory is claimed by the OS, functions that depend on stolen memory (like frame buffer compression) can't be used. A function called pci_early_quirks that is called before the virtual memory system is started was added. In Linux, this PCI early quirks function iterates through all PCI slots to check for any device that require quirks. While this more generic solution is preferable I only ported the Intel graphics specific parts because I think my implementation would be too similar to Linux GPL'd solution after looking at the Linux code too much. The code regarding Intel graphics stolen memory was ported from Linux. In the case of Intel graphics stolen memory this pci_early_quirks will read the stolen memory base and size from north bridge registers. The values are stored in global variables that is later read by linuxkpi_gplv2. Linuxkpi stores these values in a Linux-specific structure that is read by the drm driver. Relevant linuxkpi code is here: https://github.com/FreeBSDDesktop/kms-drm/blob/drm-v4.16/linuxkpi/gplv2/src/linux_compat.c#L37 For now, only amd64 arch is suppor ted since that is the only arch supported by the new drm drivers. I was told that Intel GPUs are always located on 0:2:0 so these values are hard coded for now. Note that the structure and early execution of the detection code is not required in its current form, but we expect that the code will be added shortly which fixes the potential BIOS bugs by reserving the stolen range in phys_avail[]. This must be done as early as possible to avoid conflicts with the potential usage of the memory in kernel. Submitted by: Johannes Lundberg Reviewed by: bwidawsk, imp MFC after:1 week Differential revision:https://reviews.freebsd.org/D16719 Differential revision:https://reviews.freebsd.org/D17775 Added: head/sys/x86/pci/pci_early_quirks.c (contents, props changed) head/sys/x86/pci/pci_early_quirks.h (contents, props changed) Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/include/md_var.h head/sys/conf/files.amd64 Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Wed Oct 31 23:08:49 2018 (r339978) +++ head/sys/amd64/amd64/machdep.c Wed Oct 31 23:17:00 2018 (r339979) @@ -317,6 +317,12 @@ cpu_startup(dummy) printf("avail memory = %ju (%ju MB)\n", ptoa((uintmax_t)vm_free_count()), ptoa((uintmax_t)vm_free_count()) / 1048576); +#ifdef DEV_PCI + if (bootverbose && intel_graphics_stolen_base != 0) + printf("intel stolen mem: base %#jx size %ju MB\n", + (uintmax_t)intel_graphics_stolen_base, + (uintmax_t)intel_graphics_stolen_size / 1024 / 1024); +#endif /* * Set up buffers, so they can be used to read disk labels. @@ -1791,6 +1797,11 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) init_param2(physmem); /* now running on new page tables, configured,and u/iom is accessible */ + +#ifdef DEV_PCI +/* This call might adjust phys_avail[]. */ +pci_early_quirks(); +#endif if (late_console) cninit(); Modified: head/sys/amd64/include/md_var.h == --- head/sys/amd64/include/md_var.h Wed Oct 31 23:08:49 2018 (r339978) +++ head/sys/amd64/include/md_var.h Wed Oct 31 23:17:00 2018 (r339979) @@ -43,6 +43,9 @@ extern inthw_ssb_disable; extern int nmi_flush_l1d_sw; extern int syscall_ret_l1d_flush_mode; +extern vm_paddr_t intel_graphics_stolen_base; +extern vm_paddr_t intel_graphics_stolen_size; + /* * The file "conf/ldscript.amd64" defines the symbol "kernphys". Its * value is the physical address at which the kernel is loaded. @@ -79,5 +82,6 @@ void setidt(int idx, alias_for_inthand_t *func, int ty void sse2_pagezero(void *addr); struct savefpu *get_pcb_user_save_td(struct thread *td); struct savefpu *get_pcb_user_save_pcb(struct pcb *pcb); +void pci_early_quirks(void); #endif /* !_MACHINE_MD_VAR_H_ */ Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Wed Oct 31 23:08:49 2018(r339978) +++ head/sys/conf/files.amd64 Wed Oct 31 23:17:00 2018(r339979) @@ -721,6 +721,7 @@ x86/isa/isa_dma.c standard x86/isa/nmi.c standard x86/isa/orm.c optionalisa x86/pci/pc
svn commit: r339977 - stable/12/share/examples/jails
Author: dteske Date: Wed Oct 31 23:07:47 2018 New Revision: 339977 URL: https://svnweb.freebsd.org/changeset/base/339977 Log: MFC r339843: Fix jail examples in jib, jng, README Submitted by: Ryan Moeller Reported by: Ryan Moeller Approved by: re (gjb) Sponsored by: Smule, Inc. Differential Revision:https://reviews.freebsd.org/D17697 Modified: stable/12/share/examples/jails/README stable/12/share/examples/jails/jib stable/12/share/examples/jails/jng Directory Properties: stable/12/ (props changed) Modified: stable/12/share/examples/jails/README == --- stable/12/share/examples/jails/README Wed Oct 31 23:05:44 2018 (r339976) +++ stable/12/share/examples/jails/README Wed Oct 31 23:07:47 2018 (r339977) @@ -8,6 +8,16 @@ The below 4 samples require a VIMAGE enabled kernel: $ make KERNCONF=VIMAGE kernel $ reboot +FreeBSD 12 has VIMAGE enabled in GENERIC on amd64. +In that case, for jng simply load the ng_ether module first +(ng_bridge and ng_eiface will load on demand): + + # (as root) + # Load the ng_ether module at boot: + $ sysrc kld_list+=ng_ether + # Load ng_ether at once without rebooting: + $ kldload ng_ether + Sample 1: jail.conf(5) $ cp jib jng /usr/sbin/ Modified: stable/12/share/examples/jails/jib == --- stable/12/share/examples/jails/jib Wed Oct 31 23:05:44 2018 (r339976) +++ stable/12/share/examples/jails/jib Wed Oct 31 23:07:47 2018 (r339977) @@ -51,7 +51,7 @@ # # arguments given to `jib addm xxx' in exec.prestart value. # # # vnet; -# vnet.interface = "e0b_xxx e1b_xxx ..."; +# vnet.interface = e0b_xxx, e1b_xxx, ...; # # exec.clean; # exec.system_user = "root"; Modified: stable/12/share/examples/jails/jng == --- stable/12/share/examples/jails/jng Wed Oct 31 23:05:44 2018 (r339976) +++ stable/12/share/examples/jails/jng Wed Oct 31 23:07:47 2018 (r339977) @@ -51,7 +51,7 @@ # # arguments given to `jng bridge xxx' in exec.prestart value. # # # vnet; -# vnet.interface = "ng0_xxx ng1_xxx ..."; +# vnet.interface = ng0_xxx, ng1_xxx, ...; # # exec.clean; # exec.system_user = "root"; ___ 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: r339978 - in stable/12/stand: liblua lua
Author: kevans Date: Wed Oct 31 23:08:49 2018 New Revision: 339978 URL: https://svnweb.freebsd.org/changeset/base/339978 Log: MFC r339677-r339678, r339702, r339805: Lualoader Bugfixes r339677: lualoader: unload upon kernel change if a kernel was previously loaded In the majority of cases, a kernel is not loaded before we hit the menu. However, if a password is set, we'll trigger autoboot and have loadelf'd beforehand. We also need to take into account one dropping to the loader prompt and twiddling with things manually; if they try to toggle through kernels, we'll assume they mean it. r339678: menu.lua: Abort autoboot sequence on failed command Currently, a timeout in the menu autoboot sequence would effectively do nothing. We would return from the autoboot handling, then begin processing the menu without redrawing it. This change makes the behavior a little more friendly. Returning the user to the menu can't have any good effects, so abort the autoboot sequence and drop to the loader prompt. r339702: lualoader: Improve module loading diagnostics Some fixes: - Maintain historical behavior more accurately w.r.t verbose_loading; verbose_loading strictly prints "${module_name...}" and later "failed!" or "ok" based on load success - With or without verbose_loading, dump command_errbuf on load failure. This usually happens prior to ok/failed if we're verbose_loading r339805: lualoader: Always return a proper dictionary for blacklist If module_blacklist isn't specified, we have an empty blacklist; effectively the same as if module_blacklist="" were specified in loader.conf(5). This was reported when switching to a BE that predated the module_blacklist introduction, but the problem is valid all the same and likely to be tripped over in other scenarios. Approved by: re (kib) Modified: stable/12/stand/liblua/lutils.c stable/12/stand/lua/config.lua stable/12/stand/lua/menu.lua Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/liblua/lutils.c == --- stable/12/stand/liblua/lutils.c Wed Oct 31 23:07:47 2018 (r339977) +++ stable/12/stand/liblua/lutils.c Wed Oct 31 23:08:49 2018 (r339978) @@ -77,6 +77,14 @@ lua_perform(lua_State *L) return 1; } +static int +lua_command_error(lua_State *L) +{ + + lua_pushstring(L, command_errbuf); + return 1; +} + /* * Accepts a space-delimited loader command and runs it through the standard * loader parsing, as if it were executed at the loader prompt by the user. @@ -341,6 +349,7 @@ lua_writefile(lua_State *L) #define REG_SIMPLE(n) { #n, lua_ ## n } static const struct luaL_Reg loaderlib[] = { REG_SIMPLE(delay), + REG_SIMPLE(command_error), REG_SIMPLE(command), REG_SIMPLE(interpret), REG_SIMPLE(parse), Modified: stable/12/stand/lua/config.lua == --- stable/12/stand/lua/config.lua Wed Oct 31 23:07:47 2018 (r339977) +++ stable/12/stand/lua/config.lua Wed Oct 31 23:08:49 2018 (r339978) @@ -55,7 +55,6 @@ local MSG_XENKERNLOADING = "Loading Xen kernel..." local MSG_KERNLOADING = "Loading kernel..." local MSG_MODLOADING = "Loading configured modules..." local MSG_MODBLACKLIST = "Not loading blacklisted module '%s'" -local MSG_MODLOADFAIL = "Could not load one or more modules!" local MODULEEXPR = '([%w-_]+)' local QVALEXPR = "\"([%w%s%p]-)\"" @@ -267,12 +266,12 @@ local function isValidComment(line) end local function getBlacklist() + local blacklist = {} local blacklist_str = loader.getenv('module_blacklist') if blacklist_str == nil then - return nil + return blacklist end - local blacklist = {} for mod in blacklist_str:gmatch("[;, ]?([%w-_]+)[;, ]?") do blacklist[mod] = true end @@ -292,6 +291,9 @@ local function loadModule(mod, silent) end goto continue end + if not silent then + loader.printc(module_name .. "...") + end local str = "load " if v.type ~= nil then str = str .. "-t " .. v.type .. " " @@ -309,23 +311,29 @@ local function loadModule(mod, silent) end if cli_execute_unparsed(str) ~= 0 then + -- XXX Temporary shim: don't break the boot if + -- loader hadn't been recompiled with this + -- function exposed. + if loader.command_error then +
svn commit: r339976 - stable/11/sys/dev/ipw
Author: glebius Date: Wed Oct 31 23:05:44 2018 New Revision: 339976 URL: https://svnweb.freebsd.org/changeset/base/339976 Log: MFhead r339643: Fix ipw_start(), where logic was reverted in r287197. PR: 232554 Modified: stable/11/sys/dev/ipw/if_ipw.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ipw/if_ipw.c == --- stable/11/sys/dev/ipw/if_ipw.c Wed Oct 31 23:02:59 2018 (r339975) +++ stable/11/sys/dev/ipw/if_ipw.c Wed Oct 31 23:05:44 2018 (r339976) @@ -1728,7 +1728,7 @@ ipw_start(struct ipw_softc *sc) IPW_LOCK_ASSERT(sc); - while (sc->txfree < 1 + IPW_MAX_NSEG && + while (sc->txfree >= 1 + IPW_MAX_NSEG && (m = mbufq_dequeue(&sc->sc_snd)) != NULL) { ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; if (ipw_tx_start(sc, m, ni) != 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: r339975 - stable/12/sys/dev/ipw
Author: glebius Date: Wed Oct 31 23:02:59 2018 New Revision: 339975 URL: https://svnweb.freebsd.org/changeset/base/339975 Log: MFhead r339643: Fix ipw_start(), where logic was reverted in r287197. PR232554 Approved by: re (kib) Modified: stable/12/sys/dev/ipw/if_ipw.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ipw/if_ipw.c == --- stable/12/sys/dev/ipw/if_ipw.c Wed Oct 31 22:55:43 2018 (r339974) +++ stable/12/sys/dev/ipw/if_ipw.c Wed Oct 31 23:02:59 2018 (r339975) @@ -1732,7 +1732,7 @@ ipw_start(struct ipw_softc *sc) IPW_LOCK_ASSERT(sc); - while (sc->txfree < 1 + IPW_MAX_NSEG && + while (sc->txfree >= 1 + IPW_MAX_NSEG && (m = mbufq_dequeue(&sc->sc_snd)) != NULL) { ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; if (ipw_tx_start(sc, m, ni) != 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: r339974 - head/sys/i386/conf
Author: kevans Date: Wed Oct 31 22:55:43 2018 New Revision: 339974 URL: https://svnweb.freebsd.org/changeset/base/339974 Log: i386/MINIMAL: VERBOSE_SYSINIT=0 for consistency MFC after:never Modified: head/sys/i386/conf/MINIMAL Modified: head/sys/i386/conf/MINIMAL == --- head/sys/i386/conf/MINIMAL Wed Oct 31 22:38:19 2018(r339973) +++ head/sys/i386/conf/MINIMAL Wed Oct 31 22:55:43 2018(r339974) @@ -91,6 +91,7 @@ options INVARIANT_SUPPORT # Extra sanity checks of in optionsWITNESS # Enable checks to detect deadlocks and cycles optionsWITNESS_SKIPSPIN# Don't run witness on spinlocks for speed optionsMALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +optionsVERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Make an SMP-capable kernel by default optionsSMP # Symmetric MultiProcessor Kernel ___ 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: r339973 - in head/sys: amd64/conf arm/conf arm64/conf i386/conf powerpc/conf riscv/conf sparc64/conf
Author: kevans Date: Wed Oct 31 22:38:19 2018 New Revision: 339973 URL: https://svnweb.freebsd.org/changeset/base/339973 Log: Compile in VERBOSE_SYSINIT support by default, remain silent by default The loader tunable 'debug.verbose_sysinit' may be used to toggle verbosity. This is added to the debugging section of these kernconfs to be turned off in stable branches for clarity of intent. MFC after:never Modified: head/sys/amd64/conf/GENERIC head/sys/amd64/conf/MINIMAL head/sys/arm/conf/std.arm head/sys/arm/conf/std.armv6 head/sys/arm/conf/std.armv7 head/sys/arm64/conf/GENERIC head/sys/i386/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/riscv/conf/GENERIC head/sys/sparc64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Wed Oct 31 20:42:18 2018(r339972) +++ head/sys/amd64/conf/GENERIC Wed Oct 31 22:38:19 2018(r339973) @@ -99,6 +99,7 @@ options INVARIANT_SUPPORT # Extra sanity checks of in optionsWITNESS # Enable checks to detect deadlocks and cycles optionsWITNESS_SKIPSPIN# Don't run witness on spinlocks for speed optionsMALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +optionsVERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel dump features. optionsEKCD# Support for encrypted kernel dumps Modified: head/sys/amd64/conf/MINIMAL == --- head/sys/amd64/conf/MINIMAL Wed Oct 31 20:42:18 2018(r339972) +++ head/sys/amd64/conf/MINIMAL Wed Oct 31 22:38:19 2018(r339973) @@ -91,6 +91,7 @@ options INVARIANT_SUPPORT # Extra sanity checks of in optionsWITNESS # Enable checks to detect deadlocks and cycles optionsWITNESS_SKIPSPIN# Don't run witness on spinlocks for speed optionsMALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +optionsVERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Make an SMP-capable kernel by default optionsSMP # Symmetric MultiProcessor Kernel Modified: head/sys/arm/conf/std.arm == --- head/sys/arm/conf/std.arm Wed Oct 31 20:42:18 2018(r339972) +++ head/sys/arm/conf/std.arm Wed Oct 31 22:38:19 2018(r339973) @@ -20,6 +20,7 @@ options WITNESS_SKIPSPIN# Don't run witness on spinl #options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones optionsALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence optionsUSB_DEBUG # Enable usb debug support code +optionsVERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Optional extras, never enabled by default: #options BOOTVERBOSE @@ -31,7 +32,6 @@ options USB_DEBUG # Enable usb debug support code #options KTR_VERBOSE=0 #options USB_REQ_DEBUG #options USB_VERBOSE -#options VERBOSE_SYSINIT # Enable verbose sysinit messages Modified: head/sys/arm/conf/std.armv6 == --- head/sys/arm/conf/std.armv6 Wed Oct 31 20:42:18 2018(r339972) +++ head/sys/arm/conf/std.armv6 Wed Oct 31 22:38:19 2018(r339973) @@ -70,6 +70,7 @@ options WITNESS_SKIPSPIN# Don't run witness on spinl optionsMALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones optionsALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence optionsUSB_DEBUG # Enable usb debug support code +optionsVERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Optional extras, never enabled by default: #options BOOTVERBOSE @@ -81,5 +82,4 @@ options USB_DEBUG # Enable usb debug support code #options KTR_VERBOSE=0 #options USB_REQ_DEBUG #options USB_VERBOSE -#options VERBOSE_SYSINIT # Enable verbose sysinit messages Modified: head/sys/arm/conf/std.armv7 == --- head/sys/arm/conf/std.armv7 Wed Oct 31 20:42:18 2018(r339972) +++ head/sys/arm/conf/std.armv7 Wed Oct 31 22:38:19 2018(r339973) @@ -70,6 +70,7 @@ options WITNESS_SKIPSPIN# Don't run witness on spinl optionsMALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones optionsALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence optionsUSB_DEBUG # Enable usb debug support code +optionsVERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off
svn commit: r339972 - head/rescue/rescue
Author: kevans Date: Wed Oct 31 20:42:18 2018 New Revision: 339972 URL: https://svnweb.freebsd.org/changeset/base/339972 Log: rescue: Add bectl(8) Requested by: kevans, Shawn Webb MFC after:3 days Modified: head/rescue/rescue/Makefile Modified: head/rescue/rescue/Makefile == --- head/rescue/rescue/Makefile Wed Oct 31 20:37:12 2018(r339971) +++ head/rescue/rescue/Makefile Wed Oct 31 20:42:18 2018(r339972) @@ -116,6 +116,7 @@ CRUNCH_PROGS_sbin+= routed rtquery .endif .if ${MK_ZFS} != "no" +CRUNCH_PROGS_sbin+= bectl CRUNCH_PROGS_sbin+= zfs CRUNCH_PROGS_sbin+= zpool CRUNCH_PROGS_usr.sbin+= zdb @@ -127,6 +128,7 @@ CRUNCH_PROGS_usr.sbin+= zdb CRUNCH_LIBS+= -l80211 -lalias -lcam -lncursesw -ldevstat -lipsec -llzma .if ${MK_ZFS} != "no" CRUNCH_LIBS+= -lavl -lzpool -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem +CRUNCH_LIBS+= -lbe .else # liblzma needs pthread CRUNCH_LIBS+= -lpthread ___ 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: r339971 - in head: libexec/rc share/man/man5 share/man/man8
Author: dteske Date: Wed Oct 31 20:37:12 2018 New Revision: 339971 URL: https://svnweb.freebsd.org/changeset/base/339971 Log: Add new rc keywords: enable, disable, delete This adds new keywords to rc/service to enable/disable a service's rc.conf(5) variable and "delete" to remove the variable. When the "service_delete_empty" variable in rc.conf(5) is set to "YES" (default is "NO") an rc.conf.d file (in /etc/ or /usr/local/etc) is deleted if empty after modification using "service $foo delete". Submitted by: lme (modified) Reviewed by: 0mp (previous version), lme, bcr Relnotes: yes Sponsored by: Smule, Inc. Differential Revision:https://reviews.freebsd.org/D17113 Modified: head/libexec/rc/rc.conf head/libexec/rc/rc.subr head/share/man/man5/rc.conf.5 head/share/man/man8/rc.8 Modified: head/libexec/rc/rc.conf == --- head/libexec/rc/rc.conf Wed Oct 31 19:59:20 2018(r339970) +++ head/libexec/rc/rc.conf Wed Oct 31 20:37:12 2018(r339971) @@ -617,6 +617,7 @@ savecore_enable="YES" # Extract core from dump devices savecore_flags="-m 10" # Used if dumpdev is enabled above, and present. # By default, only the 10 most recent kernel dumps # are saved. +service_delete_empty="NO" # Have 'service delete' remove empty rc.conf.d files. crashinfo_enable="YES" # Automatically generate crash dump summary. crashinfo_program="/usr/sbin/crashinfo"# Script to generate crash dump summary. quota_enable="NO" # turn on quotas on startup (or NO). Modified: head/libexec/rc/rc.subr == --- head/libexec/rc/rc.subr Wed Oct 31 19:59:20 2018(r339970) +++ head/libexec/rc/rc.subr Wed Oct 31 20:37:12 2018(r339971) @@ -922,7 +922,7 @@ run_rc_command() eval _override_command=\$${name}_program command=${_override_command:-$command} - _keywords="start stop restart rcvar enabled describe extracommands $extra_commands" + _keywords="start stop restart rcvar enable disable delete enabled describe extracommands $extra_commands" rc_pid= _pidcmd= _procname=${procname:-${command}} @@ -977,12 +977,13 @@ run_rc_command() if [ "$_elem" != "$rc_arg" ]; then continue fi - # if ${rcvar} is set, $1 is not "rcvar" and not "describe" - # and ${rc_pid} is not set, then run + # if ${rcvar} is set, $1 is not "rcvar", "describe", + # "enable" or "delete", and ${rc_pid} is not set, run: # checkyesno ${rcvar} # and return if that failed # if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" \ + -a "$rc_arg" != "delete" -a "$rc_arg" != "enable" \ -a "$rc_arg" != "describe" ] || [ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then @@ -1028,6 +1029,31 @@ run_rc_command() extracommands) echo "$extra_commands" + ;; + + enable) + _out=$(/usr/sbin/sysrc -vs "$name" "$rcvar=YES") && + echo "$name enabled in ${_out%%:*}" + ;; + + disable) + _out=$(/usr/sbin/sysrc -vs "$name" "$rcvar=NO") && + echo "$name disabled in ${_out%%:*}" + ;; + + delete) + _files= + for _file in $(sysrc -lEs "$name"); do + _out=$(sysrc -Fif $_file "$rcvar") && _files="$_files $_file" + done + /usr/sbin/sysrc -x "$rcvar" && echo "$rcvar deleted in ${_files# }" + # delete file in rc.conf.d if desired and empty. + checkyesno service_delete_empty || _files= + for _file in $_files; do + [ "$_file" = "${_file#*/rc.conf.d/}" ] && continue + [ $(/usr/bin/stat -f%z $_file) -gt 0 ] && continue + /bin/rm "$_file" && echo "Empty file $_file removed" + done ;; status) Modified: head/share/man/man5/rc.conf.5 == --- head/share/man/man5/rc.conf.5 Wed Oct 31 19:59:20 2018
svn commit: r339970 - head/stand/libsa
Author: glebius Date: Wed Oct 31 19:59:20 2018 New Revision: 339970 URL: https://svnweb.freebsd.org/changeset/base/339970 Log: Remove unnecessary include from libstand. Modified: head/stand/libsa/ip.c head/stand/libsa/net.c head/stand/libsa/udp.c Modified: head/stand/libsa/ip.c == --- head/stand/libsa/ip.c Wed Oct 31 19:37:11 2018(r339969) +++ head/stand/libsa/ip.c Wed Oct 31 19:59:20 2018(r339970) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/stand/libsa/net.c == --- head/stand/libsa/net.c Wed Oct 31 19:37:11 2018(r339969) +++ head/stand/libsa/net.c Wed Oct 31 19:59:20 2018(r339970) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/stand/libsa/udp.c == --- head/stand/libsa/udp.c Wed Oct 31 19:37:11 2018(r339969) +++ head/stand/libsa/udp.c Wed Oct 31 19:59:20 2018(r339970) @@ -48,7 +48,6 @@ __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: r339969 - head/sys/sys
Author: glebius Date: Wed Oct 31 19:37:11 2018 New Revision: 339969 URL: https://svnweb.freebsd.org/changeset/base/339969 Log: Define QMD_SAVELINK() only for QUEUE_MACRO_DEBUG_TRASH case. Otherwise with QUEUE_MACRO_DEBUG_TRACE compilation fails due to unused variable. Modified: head/sys/sys/queue.h Modified: head/sys/sys/queue.h == --- head/sys/sys/queue.hWed Oct 31 19:28:05 2018(r339968) +++ head/sys/sys/queue.hWed Oct 31 19:37:11 2018(r339969) @@ -155,18 +155,14 @@ struct qm_trace { #endif /* QUEUE_MACRO_DEBUG_TRACE */ #ifdef QUEUE_MACRO_DEBUG_TRASH +#defineQMD_SAVELINK(name, link)void **name = (void *)&(link) #defineTRASHIT(x) do {(x) = (void *)-1;} while (0) #defineQMD_IS_TRASHED(x) ((x) == (void *)(intptr_t)-1) #else /* !QUEUE_MACRO_DEBUG_TRASH */ +#defineQMD_SAVELINK(name, link) #defineTRASHIT(x) #defineQMD_IS_TRASHED(x) 0 #endif /* QUEUE_MACRO_DEBUG_TRASH */ - -#if defined(QUEUE_MACRO_DEBUG_TRACE) || defined(QUEUE_MACRO_DEBUG_TRASH) -#defineQMD_SAVELINK(name, link)void **name = (void *)&(link) -#else /* !QUEUE_MACRO_DEBUG_TRACE && !QUEUE_MACRO_DEBUG_TRASH */ -#defineQMD_SAVELINK(name, link) -#endif /* QUEUE_MACRO_DEBUG_TRACE || QUEUE_MACRO_DEBUG_TRASH */ #ifdef __cplusplus /* ___ 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: r339968 - stable/12/sys/vm
Author: markj Date: Wed Oct 31 19:28:05 2018 New Revision: 339968 URL: https://svnweb.freebsd.org/changeset/base/339968 Log: MFC r339601, r339603: Swap in processes unless there's a global memory shortage. Approved by: re (gjb) Modified: stable/12/sys/vm/vm_glue.c stable/12/sys/vm/vm_swapout.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_glue.c == --- stable/12/sys/vm/vm_glue.c Wed Oct 31 19:19:13 2018(r339967) +++ stable/12/sys/vm/vm_glue.c Wed Oct 31 19:28:05 2018(r339968) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -298,7 +299,7 @@ vm_sync_icache(vm_map_t map, vm_offset_t va, vm_offset struct kstack_cache_entry *kstack_cache; static int kstack_cache_size = 128; -static int kstacks; +static int kstacks, kstack_domain_iter; static struct mtx kstack_cache_mtx; MTX_SYSINIT(kstack_cache, &kstack_cache_mtx, "kstkch", MTX_DEF); @@ -367,6 +368,17 @@ vm_thread_new(struct thread *td, int pages) printf("vm_thread_new: kstack allocation failed\n"); vm_object_deallocate(ksobj); return (0); + } + + /* +* Ensure that kstack objects can draw pages from any memory +* domain. Otherwise a local memory shortage can block a process +* swap-in. +*/ + if (vm_ndomains > 1) { + ksobj->domain.dr_policy = DOMAINSET_RR(); + ksobj->domain.dr_iterator = + atomic_fetchadd_int(&kstack_domain_iter, 1); } atomic_add_int(&kstacks, 1); Modified: stable/12/sys/vm/vm_swapout.c == --- stable/12/sys/vm/vm_swapout.c Wed Oct 31 19:19:13 2018 (r339967) +++ stable/12/sys/vm/vm_swapout.c Wed Oct 31 19:28:05 2018 (r339968) @@ -742,7 +742,8 @@ swapper_selector(bool wkilled_only) /* * Limit swapper to swap in one non-WKILLED process in MAXSLP/2 * interval, assuming that there is: - * - no memory shortage; + * - there exists at least one domain that is not suffering from a shortage of + * free memory; * - no parallel swap-ins; * - no other swap-ins in the current SWAPIN_INTERVAL. */ @@ -750,7 +751,7 @@ static bool swapper_wkilled_only(void) { - return (vm_page_count_min() || swap_inprogress > 0 || + return (vm_page_count_min_set(&all_domains) || swap_inprogress > 0 || (u_int)(ticks - last_swapin) < SWAPIN_INTERVAL); } ___ 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: r339967 - head/sys/dev/cxgbe
Author: np Date: Wed Oct 31 19:19:13 2018 New Revision: 339967 URL: https://svnweb.freebsd.org/changeset/base/339967 Log: cxgbe(4): Add rate limiting support for UDP. MFC after:1 month Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c == --- head/sys/dev/cxgbe/t4_sge.c Wed Oct 31 19:09:48 2018(r339966) +++ head/sys/dev/cxgbe/t4_sge.c Wed Oct 31 19:19:13 2018(r339967) @@ -5610,10 +5610,6 @@ write_ethofld_wr(struct cxgbe_snd_tag *cst, struct fw_ m0->m_pkthdr.l4hlen > 0, ("%s: ethofld mbuf %p is missing header lengths", __func__, m0)); - if (needs_udp_csum(m0)) { - CXGBE_UNIMPLEMENTED("UDP ethofld"); - } - len16 = mbuf_eo_len16(m0); nsegs = mbuf_eo_nsegs(m0); pktlen = m0->m_pkthdr.len; @@ -5628,37 +5624,52 @@ write_ethofld_wr(struct cxgbe_snd_tag *cst, struct fw_ wr->equiq_to_len16 = htobe32(V_FW_WR_LEN16(len16) | V_FW_WR_FLOWID(cst->etid)); wr->r3 = 0; - wr->u.tcpseg.type = FW_ETH_TX_EO_TYPE_TCPSEG; - wr->u.tcpseg.ethlen = m0->m_pkthdr.l2hlen; - wr->u.tcpseg.iplen = htobe16(m0->m_pkthdr.l3hlen); - wr->u.tcpseg.tcplen = m0->m_pkthdr.l4hlen; - wr->u.tcpseg.tsclk_tsoff = mbuf_eo_tsclk_tsoff(m0); - wr->u.tcpseg.r4 = 0; - wr->u.tcpseg.r5 = 0; - wr->u.tcpseg.plen = htobe32(pktlen - immhdrs); + if (needs_udp_csum(m0)) { + wr->u.udpseg.type = FW_ETH_TX_EO_TYPE_UDPSEG; + wr->u.udpseg.ethlen = m0->m_pkthdr.l2hlen; + wr->u.udpseg.iplen = htobe16(m0->m_pkthdr.l3hlen); + wr->u.udpseg.udplen = m0->m_pkthdr.l4hlen; + wr->u.udpseg.rtplen = 0; + wr->u.udpseg.r4 = 0; + wr->u.udpseg.mss = htobe16(pktlen - immhdrs); + wr->u.udpseg.schedpktsize = wr->u.udpseg.mss; + wr->u.udpseg.plen = htobe32(pktlen - immhdrs); + cpl = (void *)(wr + 1); + } else { + MPASS(needs_tcp_csum(m0)); + wr->u.tcpseg.type = FW_ETH_TX_EO_TYPE_TCPSEG; + wr->u.tcpseg.ethlen = m0->m_pkthdr.l2hlen; + wr->u.tcpseg.iplen = htobe16(m0->m_pkthdr.l3hlen); + wr->u.tcpseg.tcplen = m0->m_pkthdr.l4hlen; + wr->u.tcpseg.tsclk_tsoff = mbuf_eo_tsclk_tsoff(m0); + wr->u.tcpseg.r4 = 0; + wr->u.tcpseg.r5 = 0; + wr->u.tcpseg.plen = htobe32(pktlen - immhdrs); - if (needs_tso(m0)) { - struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1); + if (needs_tso(m0)) { + struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1); - wr->u.tcpseg.mss = htobe16(m0->m_pkthdr.tso_segsz); + wr->u.tcpseg.mss = htobe16(m0->m_pkthdr.tso_segsz); - ctrl = V_LSO_OPCODE(CPL_TX_PKT_LSO) | F_LSO_FIRST_SLICE | - F_LSO_LAST_SLICE | V_LSO_IPHDR_LEN(m0->m_pkthdr.l3hlen >> 2) - | V_LSO_TCPHDR_LEN(m0->m_pkthdr.l4hlen >> 2); - if (m0->m_pkthdr.l2hlen == sizeof(struct ether_vlan_header)) - ctrl |= V_LSO_ETHHDR_LEN(1); - if (m0->m_pkthdr.l3hlen == sizeof(struct ip6_hdr)) - ctrl |= F_LSO_IPV6; - lso->lso_ctrl = htobe32(ctrl); - lso->ipid_ofst = htobe16(0); - lso->mss = htobe16(m0->m_pkthdr.tso_segsz); - lso->seqno_offset = htobe32(0); - lso->len = htobe32(pktlen); + ctrl = V_LSO_OPCODE(CPL_TX_PKT_LSO) | + F_LSO_FIRST_SLICE | F_LSO_LAST_SLICE | + V_LSO_IPHDR_LEN(m0->m_pkthdr.l3hlen >> 2) | + V_LSO_TCPHDR_LEN(m0->m_pkthdr.l4hlen >> 2); + if (m0->m_pkthdr.l2hlen == sizeof(struct ether_vlan_header)) + ctrl |= V_LSO_ETHHDR_LEN(1); + if (m0->m_pkthdr.l3hlen == sizeof(struct ip6_hdr)) + ctrl |= F_LSO_IPV6; + lso->lso_ctrl = htobe32(ctrl); + lso->ipid_ofst = htobe16(0); + lso->mss = htobe16(m0->m_pkthdr.tso_segsz); + lso->seqno_offset = htobe32(0); + lso->len = htobe32(pktlen); - cpl = (void *)(lso + 1); - } else { - wr->u.tcpseg.mss = htobe16(0x); - cpl = (void *)(wr + 1); + cpl = (void *)(lso + 1); + } else { + wr->u.tcpseg.mss = htobe16(0x); + cpl = (void *)(wr + 1); + } } /* Checksum offload must be requested for ethofld. */ @@ -5677,7 +5688,7 @@ write_ethofld_wr(struct cxgb
svn commit: r339966 - stable/11/sys/conf
Author: markj Date: Wed Oct 31 19:09:48 2018 New Revision: 339966 URL: https://svnweb.freebsd.org/changeset/base/339966 Log: MFC r313557 (by bz): Allow Dtrace to be compiled into the kernel again after r313177. PR: 232825 Modified: stable/11/sys/conf/files Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files == --- stable/11/sys/conf/filesWed Oct 31 18:30:17 2018(r339965) +++ stable/11/sys/conf/filesWed Oct 31 19:09:48 2018(r339966) @@ -310,6 +310,7 @@ cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lzio.c # dtrace specific cddl/contrib/opensolaris/uts/common/dtrace/dtrace.coptional dtrace compile-with "${DTRACE_C}" \ warning "kernel contains CDDL licensed DTRACE" +cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/dtmalloc/dtmalloc.c optional dtmalloc| dtraceall compile-with "${CDDL_C}" cddl/dev/profile/profile.c optional dtrace_profile | dtraceall compile-with "${CDDL_C}" cddl/dev/sdt/sdt.c optional dtrace_sdt | dtraceall compile-with "${CDDL_C}" ___ 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: r339965 - head/sys/dev/cxgbe
Author: np Date: Wed Oct 31 18:30:17 2018 New Revision: 339965 URL: https://svnweb.freebsd.org/changeset/base/339965 Log: cxgbe(4): Report a reasonable non-zero if_hw_tsomaxsegsize to the kernel. This reverts an accidental change that snuck in with r339628. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cWed Oct 31 18:08:12 2018 (r339964) +++ head/sys/dev/cxgbe/t4_main.cWed Oct 31 18:30:17 2018 (r339965) @@ -1543,7 +1543,7 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_EO_TSO; #endif - ifp->if_hw_tsomaxsegsize = 0; + ifp->if_hw_tsomaxsegsize = 65536; ether_ifattach(ifp, vi->hw_addr); #ifdef DEV_NETMAP ___ 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: r339964 - head
Author: emaste Date: Wed Oct 31 18:08:12 2018 New Revision: 339964 URL: https://svnweb.freebsd.org/changeset/base/339964 Log: Avoid binutils test in cleandir/obj stages Further to r339946 skip the .error case for lack of in-tree binutils support when we haven't set the toolchain feature variables. Discussed with: arichardson Sponsored by: The FreeBSD Foundation Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Oct 31 18:01:02 2018(r339963) +++ head/Makefile.inc1 Wed Oct 31 18:08:12 2018(r339964) @@ -183,7 +183,7 @@ CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} # support the target architecture), provide a default cross-binutils prefix. # This allows riscv64 builds, for example, to automatically use the # riscv64-binutils port or package. -.if !make(showconfig) +.if !make(showconfig) && !defined(_NO_INCLUDE_COMPILERMK) .if !empty(BROKEN_OPTIONS:MBINUTILS_BOOTSTRAP) && \ ${MK_LLD_BOOTSTRAP} == "no" && \ !defined(CROSS_BINUTILS_PREFIX) ___ 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: r339963 - stable/12/sys/vm
Author: glebius Date: Wed Oct 31 18:01:02 2018 New Revision: 339963 URL: https://svnweb.freebsd.org/changeset/base/339963 Log: MFhead r339596: If we lost race or were migrated during bucket allocation for the per-CPU cache, then we put new bucket on generic bucket cache. However, code didn't honor UMA_ZONE_NOBUCKETCACHE flag, so potentially we could start a cache on a zone that clearly forbids that. Fix this. Approved by: re (gjb) Modified: stable/12/sys/vm/uma_core.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/uma_core.c == --- stable/12/sys/vm/uma_core.c Wed Oct 31 17:47:08 2018(r339962) +++ stable/12/sys/vm/uma_core.c Wed Oct 31 18:01:02 2018(r339963) @@ -2410,6 +2410,7 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags * the current cache; when we re-acquire the critical section, we * must detect and handle migration if it has occurred. */ +zalloc_restart: critical_enter(); cpu = curcpu; cache = &zone->uz_cpu[cpu]; @@ -2551,12 +2552,18 @@ zalloc_start: * initialized bucket to make this less likely or claim * the memory directly. */ - if (cache->uc_allocbucket != NULL || - (zone->uz_flags & UMA_ZONE_NUMA && - domain != PCPU_GET(domain))) - LIST_INSERT_HEAD(&zdom->uzd_buckets, bucket, ub_link); - else + if (cache->uc_allocbucket == NULL && + ((zone->uz_flags & UMA_ZONE_NUMA) == 0 || + domain == PCPU_GET(domain))) { cache->uc_allocbucket = bucket; + } else if ((zone->uz_flags & UMA_ZONE_NOBUCKETCACHE) != 0) { + critical_exit(); + ZONE_UNLOCK(zone); + bucket_drain(zone, bucket); + bucket_free(zone, bucket, udata); + goto zalloc_restart; + } else + LIST_INSERT_HEAD(&zdom->uzd_buckets, bucket, ub_link); ZONE_UNLOCK(zone); goto zalloc_start; } ___ 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: r339962 - head/bin/ps
Author: 0mp (ports committer) Date: Wed Oct 31 17:47:08 2018 New Revision: 339962 URL: https://svnweb.freebsd.org/changeset/base/339962 Log: ps(1): Pet mandoc and igor - Use Xr to reference other manual pages. - Reference execve(2) instead of exec(2) as exec(2) does not exist. - Remove the deprecated "Tn" macro. - Improve the formatting of the etime description. Reviewed by: bcr Approved by: krion (mentor, implicit), mat (mentor, implicit) MFC after:3 days Differential Revision:https://reviews.freebsd.org/D17780 Modified: head/bin/ps/ps.1 Modified: head/bin/ps/ps.1 == --- head/bin/ps/ps.1Wed Oct 31 17:41:53 2018(r339961) +++ head/bin/ps/ps.1Wed Oct 31 17:47:08 2018(r339962) @@ -346,7 +346,7 @@ the include file .It Dv "P_HWPMC" Ta No "0x80" Ta "Process is using HWPMCs" .It Dv "P_JAILED" Ta No "0x100" Ta "Process is in jail" .It Dv "P_TOTAL_STOP" Ta No "0x200" Ta "Stopped for system suspend" -.It Dv "P_INEXEC" Ta No "0x400" Ta "Process is in execve()" +.It Dv "P_INEXEC" Ta No "0x400" Ta Process is in Xr execve 2 .It Dv "P_STATCHILD" Ta No "0x800" Ta "Child process stopped or exited" .It Dv "P_INMEM" Ta No "0x1000" Ta "Loaded into memory" .It Dv "P_SWAPPINGOUT" Ta No "0x2000" Ta "Process is being swapped out" @@ -361,8 +361,8 @@ the include file .In sys/proc.h : .Bl -column P2_INHERIT_PROTECTED 0x0001 .It Dv "P2_INHERIT_PROTECTED" Ta No "0x0001" Ta "New children get P_PROTECTED" -.It Dv "P2_NOTRACE" Ta No "0x0002" Ta "No ptrace(2) attach or coredumps" -.It Dv "P2_NOTRACE_EXEC" Ta No "0x0004" Ta "Keep P2_NOPTRACE on exec(2)" +.It Dv "P2_NOTRACE" Ta No "0x0002" Ta "No" Xr ptrace 2 attach or coredumps +.It Dv "P2_NOTRACE_EXEC" Ta No "0x0004" Ta Keep P2_NOPTRACE on Xr execve 2 .It Dv "P2_AST_SU" Ta No "0x0008" Ta "Handles SU ast for kthreads" .It Dv "P2_PTRACE_FSTP" Ta No "0x0010" Ta "SIGSTOP from PT_ATTACH not yet handled" .El @@ -453,8 +453,7 @@ Marks a process which is in The hostname of the prison can be found in .Pa /proc/ Ns Ao Ar pid Ac Ns Pa /status . .It Li L -The process has pages locked in core (for example, for raw -.Tn I/O ) . +The process has pages locked in core (for example, for raw I/O). .It Li N The process has reduced CPU scheduling priority (see .Xr setpriority 2 ) . @@ -553,9 +552,11 @@ data size (in Kbytes) system-call emulation environment (ABI) .It Cm etime elapsed running time, format +.Do .Op days- Ns -.Op hours: Ns -minutes:seconds. +.Op hours\&: Ns +minutes:seconds +.Dc .It Cm etimes elapsed running time, in decimal integer seconds .It Cm fib ___ 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: r339961 - head/sys/arm64/arm64
Author: andrew Date: Wed Oct 31 17:41:53 2018 New Revision: 339961 URL: https://svnweb.freebsd.org/changeset/base/339961 Log: Always set the MP_QUIRK_CPULIST quirk under ACPI. This needs a run time check to only set it for emulators as the CPU list may be changed when the emulator starts. Until this is working just always set it. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c == --- head/sys/arm64/arm64/mp_machdep.c Wed Oct 31 17:37:54 2018 (r339960) +++ head/sys/arm64/arm64/mp_machdep.c Wed Oct 31 17:41:53 2018 (r339961) @@ -525,6 +525,7 @@ cpu_mp_start(void) switch(arm64_bus_method) { #ifdef DEV_ACPI case ARM64_BUS_ACPI: + mp_quirks = MP_QUIRK_CPULIST; KASSERT(cpu0 >= 0, ("Current CPU was not found")); cpu_init_acpi(); break; ___ 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: r339960 - head/usr.sbin/freebsd-update
Author: cem Date: Wed Oct 31 17:37:54 2018 New Revision: 339960 URL: https://svnweb.freebsd.org/changeset/base/339960 Log: freebsd-update: add a progress report for the "fetching files..." After patching step is done. PR: 232857 Submitted by: mat@ MFC after:a week Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh == --- head/usr.sbin/freebsd-update/freebsd-update.sh Wed Oct 31 16:42:40 2018(r339959) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Wed Oct 31 17:37:54 2018(r339960) @@ -1888,7 +1888,7 @@ fetch_files () { echo ${NDEBUG} "files... " lam -s "${FETCHDIR}/f/" - -s ".gz" < filelist | xargs ${XARGST} ${PHTTPGET} ${SERVERNAME} \ - 2>${QUIETREDIR} + 2>${STATSREDIR} | fetch_progress while read Y; do if ! [ -f ${Y}.gz ]; then ___ 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: r339936 - head/sys/amd64/vmm/amd
On Wed, Oct 31, 2018 at 06:50:53AM -0400, Ed Maste wrote: > On Wed, 31 Oct 2018 at 10:07, Shawn Webb wrote: > > > > Does this need a /* FALLTHROUGH */ comment to appease the Coverity > > Gods? > > No, successive case statements without intervening bodies is a widely > used idiom well understood by all reasonable tools. Good catch. Thanks for the clarification! -- Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal:+1 443-546-8752 Tor+XMPP+OTR:latt...@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE signature.asc Description: PGP signature
Re: svn commit: r339959 - head/stand/i386/libi386
I forgot to note imp, sorry… rgds, toomas > On 31 Oct 2018, at 18:42, Toomas Soome wrote: > > Author: tsoome > Date: Wed Oct 31 16:42:40 2018 > New Revision: 339959 > URL: https://svnweb.freebsd.org/changeset/base/339959 > > Log: > loader: issue edd probe before legacy ah=08 and detect no media > > while probing for drives, use int13 extended info before standard one and > provide workaround for case we are not getting needed information in case > of floppy drive. > > In case of INT13 errors, there are (at least) 3 error codes appearing in case > of missin media - 20h, 31h and 80h. Flag the no media and do not print an > error. > > Differential Revision: https://reviews.freebsd.org/D17667 > > Modified: > head/stand/i386/libi386/biosdisk.c > > Modified: head/stand/i386/libi386/biosdisk.c > == > --- head/stand/i386/libi386/biosdisk.cWed Oct 31 16:17:45 2018 > (r339958) > +++ head/stand/i386/libi386/biosdisk.cWed Oct 31 16:42:40 2018 > (r339959) > @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > > #include > #include > @@ -81,8 +80,10 @@ static struct bdinfo > #define BD_MODEINT130x > #define BD_MODEEDD1 0x0001 > #define BD_MODEEDD3 0x0002 > +#define BD_MODEEDD (BD_MODEEDD1 | BD_MODEEDD3) > #define BD_MODEMASK 0x0003 > #define BD_FLOPPY 0x0004 > +#define BD_NO_MEDIA 0x0008 > int bd_type;/* BIOS 'drive type' (floppy only) */ > uint16_tbd_sectorsize; /* Sector size */ > uint64_tbd_sectors; /* Disk size */ > @@ -188,60 +189,83 @@ bd_init(void) > } > > /* > - * Try to detect a device supported by the legacy int13 BIOS > + * Return EDD version or 0 if EDD is not supported on this drive. > */ > static int > -bd_int13probe(struct bdinfo *bd) > +bd_check_extensions(int unit) > { > - struct edd_params params; > - int ret = 1;/* assume success */ > + /* Determine if we can use EDD with this device. */ > + v86.ctl = V86_FLAGS; > + v86.addr = 0x13; > + v86.eax = 0x4100; > + v86.edx = unit; > + v86.ebx = 0x55aa; > + v86int(); > > + if (V86_CY(v86.efl) || /* carry set */ > + (v86.ebx & 0x) != 0xaa55) /* signature */ > + return (0); > + > + /* extended disk access functions (AH=42h-44h,47h,48h) supported */ > + if ((v86.ecx & EDD_INTERFACE_FIXED_DISK) == 0) > + return (0); > + > + return ((v86.eax >> 8) & 0xff); > +} > + > +static void > +bd_reset_disk(int unit) > +{ > + /* reset disk */ > v86.ctl = V86_FLAGS; > v86.addr = 0x13; > + v86.eax = 0; > + v86.edx = unit; > + v86int(); > +} > + > +/* > + * Read CHS info. Return 0 on success, error otherwise. > + */ > +static int > +bd_get_diskinfo_std(struct bdinfo *bd) > +{ > + bzero(&v86, sizeof(v86)); > + v86.ctl = V86_FLAGS; > + v86.addr = 0x13; > v86.eax = 0x800; > v86.edx = bd->bd_unit; > v86int(); > > - /* Don't error out if we get bad sector number, try EDD as well */ > - if (V86_CY(v86.efl) || /* carry set */ > - (v86.edx & 0xff) <= (unsigned)(bd->bd_unit & 0x7f)) /* unit # bad */ > - return (0); /* skip device */ > + if (V86_CY(v86.efl) && ((v86.eax & 0xff00) != 0)) > + return ((v86.eax & 0xff00) >> 8); > > - if ((v86.ecx & 0x3f) == 0) /* absurd sector number */ > - ret = 0;/* set error */ > + /* return custom error on absurd sector number */ > + if ((v86.ecx & 0x3f) == 0) > + return (0x60); > > - /* Convert max cyl # -> # of cylinders */ > bd->bd_cyl = ((v86.ecx & 0xc0) << 2) + ((v86.ecx & 0xff00) >> 8) + 1; > /* Convert max head # -> # of heads */ > bd->bd_hds = ((v86.edx & 0xff00) >> 8) + 1; > bd->bd_sec = v86.ecx & 0x3f; > - bd->bd_type = v86.ebx & 0xff; > - bd->bd_flags |= BD_MODEINT13; > + bd->bd_type = v86.ebx; > + bd->bd_sectors = (uint64_t)bd->bd_cyl * bd->bd_hds * bd->bd_sec; > > - /* Calculate sectors count from the geometry */ > - bd->bd_sectors = bd->bd_cyl * bd->bd_hds * bd->bd_sec; > - bd->bd_sectorsize = BIOSDISK_SECSIZE; > - DEBUG("unit 0x%x geometry %d/%d/%d", bd->bd_unit, bd->bd_cyl, > - bd->bd_hds, bd->bd_sec); > + return (0); > +} > > - /* Determine if we can use EDD with this device. */ > - v86.ctl = V86_FLAGS; > - v86.addr = 0x13; > - v86.eax = 0x4100; > - v86.edx = bd->bd_unit; > - v86.ebx = 0x55aa; > - v86int(); > - if (V86_CY(v86.efl) || /* carry set */ > - (v86.ebx & 0x) != 0xaa55 || /* signature */ > - (v86.ecx & EDD_INTERFACE_FIXED_DISK) == 0) > - return (ret); /* return code from int13 AH=08 */ > +/* > + * Read EDD info. Ret
svn commit: r339959 - head/stand/i386/libi386
Author: tsoome Date: Wed Oct 31 16:42:40 2018 New Revision: 339959 URL: https://svnweb.freebsd.org/changeset/base/339959 Log: loader: issue edd probe before legacy ah=08 and detect no media while probing for drives, use int13 extended info before standard one and provide workaround for case we are not getting needed information in case of floppy drive. In case of INT13 errors, there are (at least) 3 error codes appearing in case of missin media - 20h, 31h and 80h. Flag the no media and do not print an error. Differential Revision:https://reviews.freebsd.org/D17667 Modified: head/stand/i386/libi386/biosdisk.c Modified: head/stand/i386/libi386/biosdisk.c == --- head/stand/i386/libi386/biosdisk.c Wed Oct 31 16:17:45 2018 (r339958) +++ head/stand/i386/libi386/biosdisk.c Wed Oct 31 16:42:40 2018 (r339959) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -81,8 +80,10 @@ static struct bdinfo #defineBD_MODEINT130x #defineBD_MODEEDD1 0x0001 #defineBD_MODEEDD3 0x0002 +#defineBD_MODEEDD (BD_MODEEDD1 | BD_MODEEDD3) #defineBD_MODEMASK 0x0003 #defineBD_FLOPPY 0x0004 +#defineBD_NO_MEDIA 0x0008 int bd_type;/* BIOS 'drive type' (floppy only) */ uint16_tbd_sectorsize; /* Sector size */ uint64_tbd_sectors; /* Disk size */ @@ -188,60 +189,83 @@ bd_init(void) } /* - * Try to detect a device supported by the legacy int13 BIOS + * Return EDD version or 0 if EDD is not supported on this drive. */ static int -bd_int13probe(struct bdinfo *bd) +bd_check_extensions(int unit) { - struct edd_params params; - int ret = 1;/* assume success */ + /* Determine if we can use EDD with this device. */ + v86.ctl = V86_FLAGS; + v86.addr = 0x13; + v86.eax = 0x4100; + v86.edx = unit; + v86.ebx = 0x55aa; + v86int(); + if (V86_CY(v86.efl) || /* carry set */ + (v86.ebx & 0x) != 0xaa55) /* signature */ + return (0); + + /* extended disk access functions (AH=42h-44h,47h,48h) supported */ + if ((v86.ecx & EDD_INTERFACE_FIXED_DISK) == 0) + return (0); + + return ((v86.eax >> 8) & 0xff); +} + +static void +bd_reset_disk(int unit) +{ + /* reset disk */ v86.ctl = V86_FLAGS; v86.addr = 0x13; + v86.eax = 0; + v86.edx = unit; + v86int(); +} + +/* + * Read CHS info. Return 0 on success, error otherwise. + */ +static int +bd_get_diskinfo_std(struct bdinfo *bd) +{ + bzero(&v86, sizeof(v86)); + v86.ctl = V86_FLAGS; + v86.addr = 0x13; v86.eax = 0x800; v86.edx = bd->bd_unit; v86int(); - /* Don't error out if we get bad sector number, try EDD as well */ - if (V86_CY(v86.efl) || /* carry set */ - (v86.edx & 0xff) <= (unsigned)(bd->bd_unit & 0x7f)) /* unit # bad */ - return (0); /* skip device */ + if (V86_CY(v86.efl) && ((v86.eax & 0xff00) != 0)) + return ((v86.eax & 0xff00) >> 8); - if ((v86.ecx & 0x3f) == 0) /* absurd sector number */ - ret = 0;/* set error */ + /* return custom error on absurd sector number */ + if ((v86.ecx & 0x3f) == 0) + return (0x60); - /* Convert max cyl # -> # of cylinders */ bd->bd_cyl = ((v86.ecx & 0xc0) << 2) + ((v86.ecx & 0xff00) >> 8) + 1; /* Convert max head # -> # of heads */ bd->bd_hds = ((v86.edx & 0xff00) >> 8) + 1; bd->bd_sec = v86.ecx & 0x3f; - bd->bd_type = v86.ebx & 0xff; - bd->bd_flags |= BD_MODEINT13; + bd->bd_type = v86.ebx; + bd->bd_sectors = (uint64_t)bd->bd_cyl * bd->bd_hds * bd->bd_sec; - /* Calculate sectors count from the geometry */ - bd->bd_sectors = bd->bd_cyl * bd->bd_hds * bd->bd_sec; - bd->bd_sectorsize = BIOSDISK_SECSIZE; - DEBUG("unit 0x%x geometry %d/%d/%d", bd->bd_unit, bd->bd_cyl, - bd->bd_hds, bd->bd_sec); + return (0); +} - /* Determine if we can use EDD with this device. */ - v86.ctl = V86_FLAGS; - v86.addr = 0x13; - v86.eax = 0x4100; - v86.edx = bd->bd_unit; - v86.ebx = 0x55aa; - v86int(); - if (V86_CY(v86.efl) || /* carry set */ - (v86.ebx & 0x) != 0xaa55 || /* signature */ - (v86.ecx & EDD_INTERFACE_FIXED_DISK) == 0) - return (ret); /* return code from int13 AH=08 */ +/* + * Read EDD info. Return 0 on success, error otherwise. + */ +static int +bd_get_diskinfo_ext(struct bdinfo *bd) +{ + struct edd_params params; + uint64_t total; - /* EDD supported */ - bd->bd_flags |= BD_MODEED
svn commit: r339958 - head/sys/kern
Author: brooks Date: Wed Oct 31 16:17:45 2018 New Revision: 339958 URL: https://svnweb.freebsd.org/changeset/base/339958 Log: Reformat syscalls.master for better readability. This takes advantage of two recents changes to makesyscalls.sh: r328598: Permit a range of syscall numbers for UNIMPL r339624: Remove the need for backslashes in syscalls.master Syscall declerations are now split across multiple lines with the syscall name and variables each on seperate lines (with an exception for syscalls taking no arguments.) Reviewed by: imp Obtained from:CheriBSD Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D17706 Modified: head/sys/kern/syscalls.master Modified: head/sys/kern/syscalls.master == --- head/sys/kern/syscalls.master Wed Oct 31 16:10:04 2018 (r339957) +++ head/sys/kern/syscalls.master Wed Oct 31 16:17:45 2018 (r339958) @@ -84,314 +84,867 @@ ; redistributions should be placed in the reserved range at the end ; of the current calls. -0 AUE_NULLSTD { int nosys(void); } syscall nosys_args int -1 AUE_EXITSTD { void sys_exit(int rval); } exit \ - sys_exit_args void -2 AUE_FORKSTD { int fork(void); } -3 AUE_READSTD { ssize_t read(int fd, \ - _Out_writes_bytes_(nbyte) void *buf, \ - size_t nbyte); } -4 AUE_WRITE STD { ssize_t write(int fd, \ - _In_reads_bytes_(nbyte) const void *buf, \ - size_t nbyte); } -5 AUE_OPEN_RWTC STD { int open( \ - _In_z_ char *path, \ - int flags, \ - int mode); } +0 AUE_NULLSTD { + int nosys(void); + } syscall nosys_args int +1 AUE_EXITSTD { + void sys_exit( + int rval + ); + } exit sys_exit_args void +2 AUE_FORKSTD { + int fork(void); + } +3 AUE_READSTD { + ssize_t read( + int fd, + _Out_writes_bytes_(nbyte) void *buf, + size_t nbyte + ); + } +4 AUE_WRITE STD { + ssize_t write( + int fd, + _In_reads_bytes_(nbyte) const void *buf, + size_t nbyte + ); + } +5 AUE_OPEN_RWTC STD { + int open( + _In_z_ char *path, + int flags, + int mode + ); + } ; XXX should be{ int open(const char *path, int flags, ...); } ; but we're not ready for `const' or varargs. ; XXX man page says `mode_t mode'. -6 AUE_CLOSE STD { int close(int fd); } -7 AUE_WAIT4 STD { int wait4(int pid, \ - _Out_opt_ int *status, \ - int options, \ - _Out_opt_ struct rusage *rusage); } -8 AUE_CREAT COMPAT { int creat(_In_z_ char *path, int mode); } -9 AUE_LINKSTD { int link(_In_z_ char *path, \ - _In_z_ char *link); } -10 AUE_UNLINK STD { int unlink(_In_z_ char *path); } +6 AUE_CLOSE STD { + int close( + int fd + ); + } +7 AUE_WAIT4 STD { + int wait4( + int pid, + _Out_opt_ int *status, + int options, + _Out_opt_ struct rusage *rusage + ); + } +8 AUE_CREAT COMPAT { + int creat( + _In_z_ char *path, + int mode + ); + } +9 AUE_LINKSTD { + int link( + _In_z_ char *path, + _In_z_ char *link + ); + } +10 AUE_UNLINK STD { + int unlink( + _In_z_ char *path + ); + } 11 AUE_NULLOBSOL execv -12 AUE_CHDIR STD { int chdir(_In_z_ char *path); } -13 AUE_FCHDIR STD { int fchdir(int fd); } -14 AUE_MKNOD COMPAT11 { int mknod(_In_z_ char *path, int mode, \ - int dev); } -15 AUE_CHMOD STD { int chmod(_In_z_ char *path, int mode); } -16 AUE_CHOWN STD { int chown(_In_z_ char *path, \ - int uid, int gid); } -17 AUE_NULLSTD { caddr_t break(_In_ char *nsize); } -18 AUE_GETFSSTAT COMPAT4 { int getfs
svn commit: r339957 - head/bin/ps
Author: 0mp (ports committer) Date: Wed Oct 31 16:10:04 2018 New Revision: 339957 URL: https://svnweb.freebsd.org/changeset/base/339957 Log: ps(1): Add a standard exit status section Reviewed by: bcr, eadler Approved by: krion (mentor) MFC after: 3 days Differential Revision:https://reviews.freebsd.org/D17146 Modified: head/bin/ps/ps.1 Modified: head/bin/ps/ps.1 == --- head/bin/ps/ps.1Wed Oct 31 15:29:26 2018(r339956) +++ head/bin/ps/ps.1Wed Oct 31 16:10:04 2018(r339957) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 13, 2018 +.Dd October 31, 2018 .Dt PS 1 .Os .Sh NAME @@ -750,6 +750,8 @@ attempts to automatically determine the terminal width .It Pa /boot/kernel/kernel default system namelist .El +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES Display information on all system processes: .Pp ___ 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: r339956 - head/cddl/contrib/opensolaris/cmd/dtrace
Author: yuripv Date: Wed Oct 31 15:29:26 2018 New Revision: 339956 URL: https://svnweb.freebsd.org/changeset/base/339956 Log: dtrace(1): remove reference to dtruss that was removed from base system in r300226. PR: 211618 Reviewed by: gnn, markj, 0mp Approved by: kib (mentor, implicit) Differential Revision:https://reviews.freebsd.org/D17762 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 == --- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Wed Oct 31 15:04:41 2018(r339955) +++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Wed Oct 31 15:29:26 2018(r339956) @@ -20,7 +20,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 16, 2018 +.Dd October 30, 2018 .Dt DTRACE 1 .Os .Sh NAME @@ -778,7 +778,6 @@ Invalid command line options or arguments were specifi .El .Sh SEE ALSO .Xr cpp 1 , -.Xr dtruss 1 , .Xr elf 5 , .Xr SDT 9 .Rs ___ 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: r339955 - head/usr.bin/sed/tests/regress.multitest.out
Author: yuripv Date: Wed Oct 31 15:04:41 2018 New Revision: 339955 URL: https://svnweb.freebsd.org/changeset/base/339955 Log: usr.bin/sed/tests: fix one of the regression test cases by adding its results file to the build. Reviewed by: kevans Approved by: kib (mentor, implicit) Differential Revision:https://reviews.freebsd.org/D17776 Modified: head/usr.bin/sed/tests/regress.multitest.out/Makefile Modified: head/usr.bin/sed/tests/regress.multitest.out/Makefile == --- head/usr.bin/sed/tests/regress.multitest.out/Makefile Wed Oct 31 14:19:58 2018(r339954) +++ head/usr.bin/sed/tests/regress.multitest.out/Makefile Wed Oct 31 15:04:41 2018(r339955) @@ -38,6 +38,7 @@ ${PACKAGE}FILES+= 2.2 ${PACKAGE}FILES+= 2.20 ${PACKAGE}FILES+= 2.21 ${PACKAGE}FILES+= 2.22 +${PACKAGE}FILES+= 2.23 ${PACKAGE}FILES+= 2.3 ${PACKAGE}FILES+= 2.4 ${PACKAGE}FILES+= 2.5 ___ 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: r339936 - head/sys/amd64/vmm/amd
On Wed, 2018-10-31 at 10:06 -0400, Shawn Webb wrote: > On Wed, Oct 31, 2018 at 01:27:44AM +, Marcelo Araujo wrote: > > > > Author: araujo > > Date: Wed Oct 31 01:27:44 2018 > > New Revision: 339936 > > URL: https://svnweb.freebsd.org/changeset/base/339936 > > > > Log: > > Merge cases with upper block. > > This is a cosmetic change only to simplify code. > > > > Reported by: anish > > Sponsored by: iXsystems Inc. > > > > Modified: > > head/sys/amd64/vmm/amd/svm_msr.c > > > > Modified: head/sys/amd64/vmm/amd/svm_msr.c > > === > > === > > --- head/sys/amd64/vmm/amd/svm_msr.cTue Oct 30 23:09:04 > > 2018(r339935) > > +++ head/sys/amd64/vmm/amd/svm_msr.cWed Oct 31 01:27:44 > > 2018(r339936) > > @@ -122,11 +122,7 @@ svm_rdmsr(struct svm_softc *sc, int vcpu, > > u_int num, u > > case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: > > case MSR_MTRR64kBase: > > case MSR_SYSCFG: > > - *result = 0; > > - break; > > case MSR_AMDK8_IPM: > > - *result = 0; > > - break; > > case MSR_EXTFEATURES: > > *result = 0; > > break; > Does this need a /* FALLTHROUGH */ comment to appease the Coverity > Gods? > > Thanks, > I would hope not, stacking multiple case values together is a common technique that almost never indicates a coding accident. The fall- through warning should only get triggered when there is executable code without a break between the various case values. Good: case 1: case 2: code(); break; Warning: case 1: code(); case 2: morecode(); break; -- Ian ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339936 - head/sys/amd64/vmm/amd
On Wed, 31 Oct 2018 at 10:07, Shawn Webb wrote: > > Does this need a /* FALLTHROUGH */ comment to appease the Coverity > Gods? No, successive case statements without intervening bodies is a widely used idiom well understood by all reasonable tools. ___ 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: r339954 - head/lib/csu/common
Author: emaste Date: Wed Oct 31 14:19:58 2018 New Revision: 339954 URL: https://svnweb.freebsd.org/changeset/base/339954 Log: Add __used to __CTOR_LIST__ and __DTOR_LIST__ Enabling BSD_CRTBEGIN on amd64 resulted in error: unused variable '__CTOR_LIST__'. __CTOR_LIST__ is indeed unused in crtbegin.c; it marks the beginning of the .ctors array and is used in crtend.c. Annotate __DTOR_LIST__ as well for consistency. Discussed with: andrew MFC with: r339738 Sponsored by: The FreeBSD Foundation Modified: head/lib/csu/common/crtbegin.c Modified: head/lib/csu/common/crtbegin.c == --- head/lib/csu/common/crtbegin.c Wed Oct 31 14:03:48 2018 (r339953) +++ head/lib/csu/common/crtbegin.c Wed Oct 31 14:19:58 2018 (r339954) @@ -45,10 +45,10 @@ void *__dso_handle = 0; #ifdef HAVE_CTORS static void __do_global_dtors_aux(void) __used; -static crt_func __CTOR_LIST__[] __section(".ctors") = { +static crt_func __CTOR_LIST__[] __section(".ctors") __used = { (crt_func)-1 }; -static crt_func __DTOR_LIST__[] __section(".dtors") = { +static crt_func __DTOR_LIST__[] __section(".dtors") __used = { (crt_func)-1 }; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339936 - head/sys/amd64/vmm/amd
On Wed, Oct 31, 2018, 10:07 PM Shawn Webb wrote: > On Wed, Oct 31, 2018 at 01:27:44AM +, Marcelo Araujo wrote: > > Author: araujo > > Date: Wed Oct 31 01:27:44 2018 > > New Revision: 339936 > > URL: https://svnweb.freebsd.org/changeset/base/339936 > > > > Log: > > Merge cases with upper block. > > This is a cosmetic change only to simplify code. > > > > Reported by:anish > > Sponsored by: iXsystems Inc. > > > > Modified: > > head/sys/amd64/vmm/amd/svm_msr.c > > > > Modified: head/sys/amd64/vmm/amd/svm_msr.c > > > == > > --- head/sys/amd64/vmm/amd/svm_msr.c Tue Oct 30 23:09:04 2018 > (r339935) > > +++ head/sys/amd64/vmm/amd/svm_msr.c Wed Oct 31 01:27:44 2018 > (r339936) > > @@ -122,11 +122,7 @@ svm_rdmsr(struct svm_softc *sc, int vcpu, u_int > num, u > > case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: > > case MSR_MTRR64kBase: > > case MSR_SYSCFG: > > - *result = 0; > > - break; > > case MSR_AMDK8_IPM: > > - *result = 0; > > - break; > > case MSR_EXTFEATURES: > > *result = 0; > > break; > > Does this need a /* FALLTHROUGH */ comment to appease the Coverity > Gods? > Wow yeah, probably yes!!! I will check tomorrow! Thanks. > Thanks, > > -- > Shawn Webb > Cofounder and Security Engineer > HardenedBSD > > Tor-ified Signal:+1 443-546-8752 > Tor+XMPP+OTR:latt...@is.a.hacker.sx > GPG Key ID: 0x6A84658F52456EEE > GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE > ___ 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: r339936 - head/sys/amd64/vmm/amd
On Wed, Oct 31, 2018 at 01:27:44AM +, Marcelo Araujo wrote: > Author: araujo > Date: Wed Oct 31 01:27:44 2018 > New Revision: 339936 > URL: https://svnweb.freebsd.org/changeset/base/339936 > > Log: > Merge cases with upper block. > This is a cosmetic change only to simplify code. > > Reported by:anish > Sponsored by: iXsystems Inc. > > Modified: > head/sys/amd64/vmm/amd/svm_msr.c > > Modified: head/sys/amd64/vmm/amd/svm_msr.c > == > --- head/sys/amd64/vmm/amd/svm_msr.c Tue Oct 30 23:09:04 2018 > (r339935) > +++ head/sys/amd64/vmm/amd/svm_msr.c Wed Oct 31 01:27:44 2018 > (r339936) > @@ -122,11 +122,7 @@ svm_rdmsr(struct svm_softc *sc, int vcpu, u_int num, u > case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: > case MSR_MTRR64kBase: > case MSR_SYSCFG: > - *result = 0; > - break; > case MSR_AMDK8_IPM: > - *result = 0; > - break; > case MSR_EXTFEATURES: > *result = 0; > break; Does this need a /* FALLTHROUGH */ comment to appease the Coverity Gods? Thanks, -- Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal:+1 443-546-8752 Tor+XMPP+OTR:latt...@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE signature.asc Description: PGP signature
svn commit: r339953 - stable/12/sys/kern
Author: bz Date: Wed Oct 31 14:03:48 2018 New Revision: 339953 URL: https://svnweb.freebsd.org/changeset/base/339953 Log: MFC r339931,r339933: As a follow-up to r339930 (r339951 in stable/12) and various reports implement logging in case we fail during module load because the pcpu or vnet module sections are full. We did return a proper error but not leaving any indication to the user as to what the actual problem was. Even worse, on 12/13 currently we are seeing an unrelated error (ENOSYS instead of ENOSPC, which gets skipped over in kern_linker.c) to be printed which made problem diagnostics even harder. PR: 228854 Approved by: re (kib) Modified: stable/12/sys/kern/link_elf.c stable/12/sys/kern/link_elf_obj.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/link_elf.c == --- stable/12/sys/kern/link_elf.c Wed Oct 31 12:53:58 2018 (r339952) +++ stable/12/sys/kern/link_elf.c Wed Oct 31 14:03:48 2018 (r339953) @@ -637,8 +637,12 @@ parse_dpcpu(elf_file_t ef) * all per-cpu storage from that. */ ef->pcpu_base = (Elf_Addr)(uintptr_t)dpcpu_alloc(size); - if (ef->pcpu_base == 0) + if (ef->pcpu_base == 0) { + printf("%s: pcpu module space is out of space; " + "cannot allocate %d for %s\n", + __func__, size, ef->lf.pathname); return (ENOSPC); + } memcpy((void *)ef->pcpu_base, (void *)ef->pcpu_start, size); dpcpu_copy((void *)ef->pcpu_base, size); elf_set_add(&set_pcpu_list, ef->pcpu_start, ef->pcpu_stop, @@ -670,8 +674,12 @@ parse_vnet(elf_file_t ef) * all per-vnet storage from that. */ ef->vnet_base = (Elf_Addr)(uintptr_t)vnet_data_alloc(size); - if (ef->vnet_base == 0) + if (ef->vnet_base == 0) { + printf("%s: vnet module space is out of space; " + "cannot allocate %d for %s\n", + __func__, size, ef->lf.pathname); return (ENOSPC); + } memcpy((void *)ef->vnet_base, (void *)ef->vnet_start, size); vnet_data_copy((void *)ef->vnet_base, size); elf_set_add(&set_vnet_list, ef->vnet_start, ef->vnet_stop, Modified: stable/12/sys/kern/link_elf_obj.c == --- stable/12/sys/kern/link_elf_obj.c Wed Oct 31 12:53:58 2018 (r339952) +++ stable/12/sys/kern/link_elf_obj.c Wed Oct 31 14:03:48 2018 (r339953) @@ -368,6 +368,11 @@ link_elf_link_preload(linker_class_t cls, const char * dpcpu = dpcpu_alloc(shdr[i].sh_size); if (dpcpu == NULL) { + printf("%s: pcpu module space is out " + "of space; cannot allocate %#jx " + "for %s\n", __func__, + (uintmax_t)shdr[i].sh_size, + filename); error = ENOSPC; goto out; } @@ -382,6 +387,11 @@ link_elf_link_preload(linker_class_t cls, const char * vnet_data = vnet_data_alloc(shdr[i].sh_size); if (vnet_data == NULL) { + printf("%s: vnet module space is out " + "of space; cannot allocate %#jx " + "for %s\n", __func__, + (uintmax_t)shdr[i].sh_size, + filename); error = ENOSPC; goto out; } @@ -847,14 +857,30 @@ link_elf_load_file(linker_class_t cls, const char *fil else ef->progtab[pb].name = "<>"; if (ef->progtab[pb].name != NULL && - !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) + !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) { ef->progtab[pb].addr = dpcpu_alloc(shdr[i].sh_size); + if (ef->progtab[pb].addr == NULL) { + printf("%s: pcpu module space is out " + "of space; cannot allocate %#jx " + "for %s\n", __func__, + (uintmax_t)shdr[i].sh_size, + filena
svn commit: r339952 - head/share/man/man4
Author: 0mp (ports committer) Date: Wed Oct 31 12:53:58 2018 New Revision: 339952 URL: https://svnweb.freebsd.org/changeset/base/339952 Log: tpm(4): Add the STANDARDS and HISTORY sections Also, link to the homepage of the BSSSD project, which developed the original driver. Reviewed by: bcr, kevans Approved by: krion (mentor, implicit), mat (mentor, implicit) MFC after: 1 week Differential Revision:https://reviews.freebsd.org/D17608 Modified: head/share/man/man4/tpm.4 Modified: head/share/man/man4/tpm.4 == --- head/share/man/man4/tpm.4 Wed Oct 31 12:50:39 2018(r339951) +++ head/share/man/man4/tpm.4 Wed Oct 31 12:53:58 2018(r339952) @@ -15,7 +15,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 15, 2010 +.Dd October 31, 2018 .Dt TPM 4 .Os .Sh NAME @@ -76,6 +76,44 @@ interrupt vector in .Xr intro 4 , .Xr device.hints 5 , .Xr config 8 +.Pp +The homepage of the BSSSD project, which developed the original +.Nm +driver: +.Lk "http://bsssd.sourceforge.net/"; . +.Pp +TPM main specification can be found at: +.Lk "https://trustedcomputinggroup.org/resource/tpm-main-specification/"; . +.Sh STANDARDS +TPM Main Specification Level 2 Version 1.2: +.Bl -dash +.It +.Rs +.%A ISO/IEC +.%T 11889-1:2009, Information technology -- Trusted Platform Module -- Part 1: Overview +.%U "https://www.iso.org/standard/50970.html"; +.Re +.It +.Rs +.%A ISO/IEC +.%T 11889-2:2009, Information technology -- Trusted Platform Module -- Part 2: Design principles +.%U "https://www.iso.org/standard/50971.html"; +.Re +.It +.Rs +.%A ISO/IEC +.%T 11889-3:2009, Information technology -- Trusted Platform Module -- Part 3: Structures +.%U "https://www.iso.org/standard/50972.html"; +.Re +.El +.Sh HISTORY +The +.Nm +driver +first appeared in +.Fx 8.2 +and was later added to +.Ox 6.1 . .Sh AUTHORS .An -nosplit The ___ 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: r339951 - stable/12/sys/net
Author: bz Date: Wed Oct 31 12:50:39 2018 New Revision: 339951 URL: https://svnweb.freebsd.org/changeset/base/339951 Log: MFC r339930: With more excessive use of modules, more kernel parts working with VIMAGE, and feature richness and global state increasing the 8k of vnet module space are no longer sufficient for people and loading multiple modules, e.g., pf(4) and ipl(4) or ipsec(4) will fail on the second module. Increase the module space to 8 * PAGE_SIZE which should be enough to hold multiple firewalls, ipsec, multicast (as in the old days was a problem), epair, carp, and any kind of other vnet enabled modules. Sadly this is a global byte array part of the vnet_set, so we cannot dynamically change its size; otherwise a TUNABLE would have been a better solution. PR: 228854 Reported by: Ernie Luzar, Marek Zarychta Approved by: re (kib) Modified: stable/12/sys/net/vnet.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/vnet.c == --- stable/12/sys/net/vnet.cWed Oct 31 12:49:18 2018(r339950) +++ stable/12/sys/net/vnet.cWed Oct 31 12:50:39 2018(r339951) @@ -171,7 +171,7 @@ static MALLOC_DEFINE(M_VNET_DATA, "vnet_data", "VNET d * we want the virtualized global variable space to be page-sized, we may * have more space than that in practice. */ -#defineVNET_MODMIN 8192 +#defineVNET_MODMIN (8 * PAGE_SIZE) #defineVNET_SIZE roundup2(VNET_BYTES, PAGE_SIZE) /* ___ 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: r339950 - stable/12/sys/netinet6
Author: bz Date: Wed Oct 31 12:49:18 2018 New Revision: 339950 URL: https://svnweb.freebsd.org/changeset/base/339950 Log: MFC r339682: rip6_input() inp validation after epoch(9) After r335924 rip6_input() needs inp validation to avoid working on FREED inps. Apply the relevant bits from r335497,r335501 (rip_input() change) to the IPv6 counterpart. PR: 232194 Reviewed by:rgrimes, ae (,hps) Approved by: re (kib) Modified: stable/12/sys/netinet6/raw_ip6.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet6/raw_ip6.c == --- stable/12/sys/netinet6/raw_ip6.cWed Oct 31 12:05:45 2018 (r339949) +++ stable/12/sys/netinet6/raw_ip6.cWed Oct 31 12:49:18 2018 (r339950) @@ -187,6 +187,45 @@ rip6_input(struct mbuf **mp, int *offp, int proto) if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr) && !IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr, &ip6->ip6_src)) continue; + if (last != NULL) { + struct mbuf *n = m_copym(m, 0, M_COPYALL, M_NOWAIT); + +#if defined(IPSEC) || defined(IPSEC_SUPPORT) + /* +* Check AH/ESP integrity. +*/ + if (IPSEC_ENABLED(ipv6)) { + if (n != NULL && + IPSEC_CHECK_POLICY(ipv6, n, last) != 0) { + m_freem(n); + /* Do not inject data into pcb. */ + n = NULL; + } + } +#endif /* IPSEC */ + if (n) { + if (last->inp_flags & INP_CONTROLOPTS || + last->inp_socket->so_options & SO_TIMESTAMP) + ip6_savecontrol(last, n, &opts); + /* strip intermediate headers */ + m_adj(n, *offp); + if (sbappendaddr(&last->inp_socket->so_rcv, + (struct sockaddr *)&fromsa, +n, opts) == 0) { + m_freem(n); + if (opts) + m_freem(opts); + RIP6STAT_INC(rip6s_fullsock); + } else + sorwakeup(last->inp_socket); + opts = NULL; + } + INP_RUNLOCK(last); + last = NULL; + } + INP_RLOCK(in6p); + if (__predict_false(in6p->inp_flags2 & INP_FREED)) + goto skip_2; if (jailed_without_vnet(in6p->inp_cred)) { /* * Allow raw socket in jail to receive multicast; @@ -196,16 +235,14 @@ rip6_input(struct mbuf **mp, int *offp, int proto) if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) && prison_check_ip6(in6p->inp_cred, &ip6->ip6_dst) != 0) - continue; + goto skip_2; } - INP_RLOCK(in6p); if (in6p->in6p_cksum != -1) { RIP6STAT_INC(rip6s_isum); if (in6_cksum(m, proto, *offp, m->m_pkthdr.len - *offp)) { - INP_RUNLOCK(in6p); RIP6STAT_INC(rip6s_badsum); - continue; + goto skip_2; } } /* @@ -251,46 +288,13 @@ rip6_input(struct mbuf **mp, int *offp, int proto) } if (blocked != MCAST_PASS) { IP6STAT_INC(ip6s_notmember); - INP_RUNLOCK(in6p); - continue; + goto skip_2; } } - if (last != NULL) { - struct mbuf *n = m_copym(m, 0, M_COPYALL, M_NOWAIT); - -#if defined(IPSEC) || defined(IPSEC_SUPPORT) - /* -* Check AH/ESP integrity. -*/ - if (IPSEC_ENABLED(ipv6)) { - if (n != NULL && - IPSEC_CHECK_POLICY(ipv6, n, last) != 0) { - m_freem(n); -
svn commit: r339949 - stable/12/usr.sbin/bhyve
Author: bz Date: Wed Oct 31 12:05:45 2018 New Revision: 339949 URL: https://svnweb.freebsd.org/changeset/base/339949 Log: MFC r339586: In bhyve's fbuf emulation improve the overall "usage" message and for the vga option, rather than printing the entire option string, only print vga (as we do for everything else). MFC r339681: Allow the bhyve VNC server to listen on IPv6 for incoming connections. Alternatively to IPv4 address:port this will allow to listen on IPv6 link-local (incl. scope), a specific address, or ::. Addresses have to be given in RFC2732 format so that [::]:port parsing will work. This patch also starts to introduce WITH_INET/INET6_SUPPORT to bhyve. PR: 232018 Submitted by: Dave Rush (northwoodlogic.free gmail.com) (original) Reviewed by:Dave Rush (updated verison) Approved by: re (kib) Modified: stable/12/usr.sbin/bhyve/Makefile stable/12/usr.sbin/bhyve/bhyve.8 stable/12/usr.sbin/bhyve/pci_fbuf.c stable/12/usr.sbin/bhyve/rfb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/Makefile == --- stable/12/usr.sbin/bhyve/Makefile Wed Oct 31 12:00:35 2018 (r339948) +++ stable/12/usr.sbin/bhyve/Makefile Wed Oct 31 12:05:45 2018 (r339949) @@ -73,6 +73,12 @@ SRCS+= vmm_instruction_emul.c LIBADD=vmmapi md pthread z util sbuf cam +.if ${MK_INET_SUPPORT} != "no" +CFLAGS+=-DINET +.endif +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+=-DINET6 +.endif .if ${MK_OPENSSL} == "no" CFLAGS+=-DNO_OPENSSL .else Modified: stable/12/usr.sbin/bhyve/bhyve.8 == --- stable/12/usr.sbin/bhyve/bhyve.8Wed Oct 31 12:00:35 2018 (r339948) +++ stable/12/usr.sbin/bhyve/bhyve.8Wed Oct 31 12:05:45 2018 (r339949) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Aug 23, 2018 +.Dd October 24, 2018 .Dt BHYVE 8 .Os .Sh NAME @@ -369,14 +369,15 @@ Framebuffer devices: .Bl -tag -width 10n .It Oo rfb= Ns Oo Ar IP: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= Ns Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc Ns Oo ,password= Ns Ar password Oc .Bl -tag -width 8n -.It Ar IP:port +.It Ar IPv4:port No or Ar [IPv6%zone]:port An .Ar IP address and a .Ar port VNC should listen on. The default is to listen on localhost IPv4 address and default VNC port 5900. -Listening on an IPv6 address is not supported. +An IPv6 address must be enclosed in square brackets and may contain an +optional zone identifer. .It Ar width No and Ar height A display resolution, width and height, respectively. If not specified, a default resolution of 1024x768 pixels will be used. @@ -582,6 +583,20 @@ bhyve -c 2 -m 4G -w -H \\ -s 4,ahci-hd,disk.img \\ -s 5,virtio-net,tap0 \\ -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \\ + -s 30,xhci,tablet \\ + -s 31,lpc -l com1,stdio \\ + -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\ + uefivm +.Ed +.Pp +Run a UEFI virtual machine with a VNC display that is bound to all IPv6 +addresses on port 5900. +.Bd -literal -offset indent +bhyve -c 2 -m 4G -w -H \\ + -s 0,hostbridge \\ + -s 4,ahci-hd,disk.img \\ + -s 5,virtio-net,tap0 \\ + -s 29,fbuf,tcp=[::]:5900,w=800,h=600 \\ -s 30,xhci,tablet \\ -s 31,lpc -l com1,stdio \\ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\ Modified: stable/12/usr.sbin/bhyve/pci_fbuf.c == --- stable/12/usr.sbin/bhyve/pci_fbuf.c Wed Oct 31 12:00:35 2018 (r339948) +++ stable/12/usr.sbin/bhyve/pci_fbuf.c Wed Oct 31 12:05:45 2018 (r339949) @@ -117,8 +117,9 @@ static void pci_fbuf_usage(char *opt) { - fprintf(stderr, "Invalid fbuf emulation \"%s\"\r\n", opt); - fprintf(stderr, "fbuf: {wait,}{vga=on|io|off,}rfb=:port\r\n"); + fprintf(stderr, "Invalid fbuf emulation option \"%s\"\r\n", opt); + fprintf(stderr, "fbuf: {wait,}{vga=on|io|off,}rfb=:port" + "{,w=width}{,h=height}\r\n"); } static void @@ -250,13 +251,33 @@ pci_fbuf_parse_opts(struct pci_fbuf_softc *sc, char *o xopts, config)); if (!strcmp(xopts, "tcp") || !strcmp(xopts, "rfb")) { - /* parse host-ip:port */ - tmpstr = strsep(&config, ":"); - if (!config) - sc->rfb_port = atoi(tmpstr); - else { - sc->rfb_port = atoi(config); + /* +* IPv4 -- host-ip:port +* IPv6 -- [host-ip%zone]:port +* XXX for now port is mandatory. +*/ + tmpstr = strsep(&config, "]"); +
svn commit: r339948 - head/sys/arm64/arm64
Author: andrew Date: Wed Oct 31 12:00:35 2018 New Revision: 339948 URL: https://svnweb.freebsd.org/changeset/base/339948 Log: Use pmap_invalidate_all rather than invalidating 512 level 2 entries in the early pmap_mapbios/unmapbios code. It is even worse when there are multiple L2 entries to handle as we would need to iterate over all pages. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c == --- head/sys/arm64/arm64/pmap.c Wed Oct 31 11:37:05 2018(r339947) +++ head/sys/arm64/arm64/pmap.c Wed Oct 31 12:00:35 2018(r339948) @@ -4663,11 +4663,11 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t size) pmap_load_store(l2, pa | ATTR_DEFAULT | ATTR_XN | ATTR_IDX(CACHED_MEMORY) | L2_BLOCK); - pmap_invalidate_range(kernel_pmap, va, va + L2_SIZE); va += L2_SIZE; pa += L2_SIZE; } + pmap_invalidate_all(kernel_pmap); va = preinit_map_va + (start_idx * L2_SIZE); @@ -4700,12 +4700,14 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) pd_entry_t *pde; pt_entry_t *l2; int i, lvl, l2_blocks, block; + bool preinit_map; l2_blocks = (roundup2(va + size, L2_SIZE) - rounddown2(va, L2_SIZE)) >> L2_SHIFT; KASSERT(l2_blocks > 0, ("pmap_unmapbios: invalid size %lx", size)); /* Remove preinit mapping */ + preinit_map = false; block = 0; for (i = 0; i < PMAP_PREINIT_MAPPING_COUNT; i++) { ppim = pmap_preinit_mapping + i; @@ -4715,6 +4717,7 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) ppim->va = 0; ppim->pa = 0; ppim->size = 0; + preinit_map = true; offset = block * L2_SIZE; va_trunc = rounddown2(va, L2_SIZE) + offset; @@ -4725,13 +4728,15 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) va_trunc)); l2 = pmap_l1_to_l2(pde, va_trunc); pmap_load_clear(l2); - pmap_invalidate_range(kernel_pmap, va_trunc, - va_trunc + L2_SIZE); if (block == (l2_blocks - 1)) - return; + break; block++; } + } + if (preinit_map) { + pmap_invalidate_all(kernel_pmap); + return; } /* Unmap the pages reserved with kva_alloc. */ ___ 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: r339947 - stable/11/usr.sbin/bhyve
Author: bz Date: Wed Oct 31 11:37:05 2018 New Revision: 339947 URL: https://svnweb.freebsd.org/changeset/base/339947 Log: MFC r339586: In bhyve's fbuf emulation improve the overall "usage" message and for the vga option, rather than printing the entire option string, only print vga (as we do for everything else). MFC r339681: Allow the bhyve VNC server to listen on IPv6 for incoming connections. Alternatively to IPv4 address:port this will allow to listen on IPv6 link-local (incl. scope), a specific address, or ::. Addresses have to be given in RFC2732 format so that [::]:port parsing will work. This patch also starts to introduce WITH_INET/INET6_SUPPORT to bhyve. PR: 232018 Submitted by: Dave Rush (northwoodlogic.free gmail.com) (original) Reviewed by:Dave Rush (updated verison) Modified: stable/11/usr.sbin/bhyve/Makefile stable/11/usr.sbin/bhyve/bhyve.8 stable/11/usr.sbin/bhyve/pci_fbuf.c stable/11/usr.sbin/bhyve/rfb.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyve/Makefile == --- stable/11/usr.sbin/bhyve/Makefile Wed Oct 31 10:45:28 2018 (r339946) +++ stable/11/usr.sbin/bhyve/Makefile Wed Oct 31 11:37:05 2018 (r339947) @@ -65,6 +65,12 @@ SRCS+= vmm_instruction_emul.c LIBADD=vmmapi md pthread z +.if ${MK_INET_SUPPORT} != "no" +CFLAGS+=-DINET +.endif +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+=-DINET6 +.endif .if ${MK_OPENSSL} == "no" CFLAGS+=-DNO_OPENSSL .else Modified: stable/11/usr.sbin/bhyve/bhyve.8 == --- stable/11/usr.sbin/bhyve/bhyve.8Wed Oct 31 10:45:28 2018 (r339946) +++ stable/11/usr.sbin/bhyve/bhyve.8Wed Oct 31 11:37:05 2018 (r339947) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jul 11, 2018 +.Dd October 24, 2018 .Dt BHYVE 8 .Os .Sh NAME @@ -311,14 +311,15 @@ Framebuffer devices: .Bl -tag -width 10n .It Oo rfb= Ns Oo Ar IP: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= Ns Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc Ns Oo ,password= Ns Ar password Oc .Bl -tag -width 8n -.It Ar IP:port +.It Ar IPv4:port No or Ar [IPv6%zone]:port An .Ar IP address and a .Ar port VNC should listen on. The default is to listen on localhost IPv4 address and default VNC port 5900. -Listening on an IPv6 address is not supported. +An IPv6 address must be enclosed in square brackets and may contain an +optional zone identifer. .It Ar width No and Ar height A display resolution, width and height, respectively. If not specified, a default resolution of 1024x768 pixels will be used. @@ -485,6 +486,20 @@ bhyve -c 2 -m 4G -w -H \\ -s 4,ahci-hd,disk.img \\ -s 5,virtio-net,tap0 \\ -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \\ + -s 30,xhci,tablet \\ + -s 31,lpc -l com1,stdio \\ + -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\ + uefivm +.Ed +.Pp +Run a UEFI virtual machine with a VNC display that is bound to all IPv6 +addresses on port 5900. +.Bd -literal -offset indent +bhyve -c 2 -m 4G -w -H \\ + -s 0,hostbridge \\ + -s 4,ahci-hd,disk.img \\ + -s 5,virtio-net,tap0 \\ + -s 29,fbuf,tcp=[::]:5900,w=800,h=600 \\ -s 30,xhci,tablet \\ -s 31,lpc -l com1,stdio \\ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\ Modified: stable/11/usr.sbin/bhyve/pci_fbuf.c == --- stable/11/usr.sbin/bhyve/pci_fbuf.c Wed Oct 31 10:45:28 2018 (r339946) +++ stable/11/usr.sbin/bhyve/pci_fbuf.c Wed Oct 31 11:37:05 2018 (r339947) @@ -117,8 +117,9 @@ static void pci_fbuf_usage(char *opt) { - fprintf(stderr, "Invalid fbuf emulation \"%s\"\r\n", opt); - fprintf(stderr, "fbuf: {wait,}{vga=on|io|off,}rfb=:port\r\n"); + fprintf(stderr, "Invalid fbuf emulation option \"%s\"\r\n", opt); + fprintf(stderr, "fbuf: {wait,}{vga=on|io|off,}rfb=:port" + "{,w=width}{,h=height}\r\n"); } static void @@ -250,13 +251,33 @@ pci_fbuf_parse_opts(struct pci_fbuf_softc *sc, char *o xopts, config)); if (!strcmp(xopts, "tcp") || !strcmp(xopts, "rfb")) { - /* parse host-ip:port */ - tmpstr = strsep(&config, ":"); - if (!config) - sc->rfb_port = atoi(tmpstr); - else { - sc->rfb_port = atoi(config); + /* +* IPv4 -- host-ip:port +* IPv6 -- [host-ip%zone]:port +* XXX for now port is mandatory. +*/ + tmpstr = strsep(&config, "]"); + if (config) { +
svn commit: r339946 - in head: . share/mk
Author: arichardson Date: Wed Oct 31 10:45:28 2018 New Revision: 339946 URL: https://svnweb.freebsd.org/changeset/base/339946 Log: Don't run cc --version during cleandir/obj stages This will no work when there is no cc in $PATH (which is the case before the cross-tools stage once we no longer inherit $PATH in $WMAKE). The variables set by bsd.compiler.mk/bsd.linker.mk are not needed in these stages so this avoids a little bit of makefile parsing. Reviewed By: emaste Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D16814 Modified: head/Makefile.inc1 head/share/mk/bsd.compiler.mk Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Oct 31 10:30:19 2018(r339945) +++ head/Makefile.inc1 Wed Oct 31 10:45:28 2018(r339946) @@ -950,7 +950,7 @@ _worldtmp: .PHONY .else ${_+_}@if [ -e "${WORLDTMP}" ]; then \ echo ">>> Deleting stale files in build tree..."; \ - cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \ + cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES _NO_INCLUDE_COMPILERMK=t \ delete-old delete-old-libs >/dev/null; \ fi rm -rf ${WORLDTMP}/legacy/usr/include @@ -1003,19 +1003,21 @@ _cleanobj: @echo "--" @echo ">>> stage 2.1: cleaning up the object tree" @echo "--" - ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR} + # Avoid including bsd.compiler.mk in clean and obj with _NO_INCLUDE_COMPILERMK + # since the restricted $PATH might not contain a valid cc binary + ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t ${CLEANDIR} .if defined(LIBCOMPAT) - ${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} -f Makefile.inc1 ${CLEANDIR} + ${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} _NO_INCLUDE_COMPILERMK=t -f Makefile.inc1 ${CLEANDIR} .endif .else - ${_+_}cd ${.CURDIR}; ${WMAKE} _cleanobj_fast_depend_hack + ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t _cleanobj_fast_depend_hack .endif # !defined(NO_CLEAN) _obj: @echo @echo "--" @echo ">>> stage 2.2: rebuilding the object tree" @echo "--" - ${_+_}cd ${.CURDIR}; ${WMAKE} obj + ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t obj _build-tools: @echo @echo "--" Modified: head/share/mk/bsd.compiler.mk == --- head/share/mk/bsd.compiler.mk Wed Oct 31 10:30:19 2018 (r339945) +++ head/share/mk/bsd.compiler.mk Wed Oct 31 10:45:28 2018 (r339946) @@ -33,6 +33,16 @@ : .include +.if defined(_NO_INCLUDE_COMPILERMK) +# If _NO_INCLUDE_COMPILERMK is set we are doing a make obj/cleandir/cleanobj +# and might not have a valid compiler in $PATH yet. In this case just set the +# variables that are expected by the other .mk files and return +COMPILER_TYPE=none +X_COMPILER_TYPE=none +COMPILER_VERSION=0 +X_COMPILER_VERSION=0 +COMPILER_FEATURES=none +.else # command = /usr/local/bin/ccache cc ... # wrapper = /usr/local/libexec/ccache/cc ... CCACHE_BUILD_TYPE?=command @@ -220,4 +230,5 @@ ${var}.${${X_}_cc_hash}:= ${${var}} .if !defined(_NO_INCLUDE_LINKERMK) .include .endif +.endif # defined(_NO_INCLUDE_COMPILERMK) .endif # !target() ___ 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: r339945 - head/sys/arm64/arm64
Author: andrew Date: Wed Oct 31 10:30:19 2018 New Revision: 339945 URL: https://svnweb.freebsd.org/changeset/base/339945 Log: Remove function prototypes for functions removed in r339943. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c == --- head/sys/arm64/arm64/mp_machdep.c Wed Oct 31 09:39:38 2018 (r339944) +++ head/sys/arm64/arm64/mp_machdep.c Wed Oct 31 10:30:19 2018 (r339945) @@ -113,10 +113,6 @@ static void intr_pic_ipi_setup(u_int, const char *, in extern struct pcpu __pcpu[]; -static device_identify_t arm64_cpu_identify; -static device_probe_t arm64_cpu_probe; -static device_attach_t arm64_cpu_attach; - static void ipi_ast(void *); static void ipi_hardclock(void *); static void ipi_preempt(void *); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r339944 - head/sys/arm64/arm64
Author: andrew Date: Wed Oct 31 09:39:38 2018 New Revision: 339944 URL: https://svnweb.freebsd.org/changeset/base/339944 Log: Fix some style(9) issues in the arm64 pmap_mapbios/unmapbios. Split lines when they are too long. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c == --- head/sys/arm64/arm64/pmap.c Wed Oct 31 09:25:17 2018(r339943) +++ head/sys/arm64/arm64/pmap.c Wed Oct 31 09:39:38 2018(r339944) @@ -4604,8 +4604,9 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t size) if (size == 0) return (NULL); -/* Calculate how many full L2 blocks are needed for the mapping */ - l2_blocks = (roundup2(pa + size, L2_SIZE) - rounddown2(pa, L2_SIZE)) >> L2_SHIFT; +/* Calculate how many L2 blocks are needed for the mapping */ + l2_blocks = (roundup2(pa + size, L2_SIZE) - + rounddown2(pa, L2_SIZE)) >> L2_SHIFT; offset = pa & L2_OFFSET; @@ -4652,8 +4653,10 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t size) for (i = 0; i < l2_blocks; i++) { pde = pmap_pde(kernel_pmap, va, &lvl); KASSERT(pde != NULL, - ("pmap_mapbios: Invalid page entry, va: 0x%lx", va)); - KASSERT(lvl == 1, ("pmap_mapbios: Invalid level %d", lvl)); + ("pmap_mapbios: Invalid page entry, va: 0x%lx", + va)); + KASSERT(lvl == 1, + ("pmap_mapbios: Invalid level %d", lvl)); /* Insert L2_BLOCK */ l2 = pmap_l1_to_l2(pde, va); @@ -4698,7 +4701,8 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) pt_entry_t *l2; int i, lvl, l2_blocks, block; - l2_blocks = (roundup2(va + size, L2_SIZE) - rounddown2(va, L2_SIZE)) >> L2_SHIFT; + l2_blocks = + (roundup2(va + size, L2_SIZE) - rounddown2(va, L2_SIZE)) >> L2_SHIFT; KASSERT(l2_blocks > 0, ("pmap_unmapbios: invalid size %lx", size)); /* Remove preinit mapping */ @@ -4706,7 +4710,8 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) for (i = 0; i < PMAP_PREINIT_MAPPING_COUNT; i++) { ppim = pmap_preinit_mapping + i; if (ppim->va == va) { - KASSERT(ppim->size == size, ("pmap_unmapbios: size mismatch")); + KASSERT(ppim->size == size, + ("pmap_unmapbios: size mismatch")); ppim->va = 0; ppim->pa = 0; ppim->size = 0; @@ -4716,10 +4721,12 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) /* Remove L2_BLOCK */ pde = pmap_pde(kernel_pmap, va_trunc, &lvl); KASSERT(pde != NULL, - ("pmap_unmapbios: Invalid page entry, va: 0x%lx", va_trunc)); + ("pmap_unmapbios: Invalid page entry, va: 0x%lx", + va_trunc)); l2 = pmap_l1_to_l2(pde, va_trunc); pmap_load_clear(l2); - pmap_invalidate_range(kernel_pmap, va_trunc, va_trunc + L2_SIZE); + pmap_invalidate_range(kernel_pmap, va_trunc, + va_trunc + L2_SIZE); if (block == (l2_blocks - 1)) return; ___ 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: r339943 - head/sys/arm64/arm64
Author: andrew Date: Wed Oct 31 09:25:17 2018 New Revision: 339943 URL: https://svnweb.freebsd.org/changeset/base/339943 Log: Remove the unused arm64_cpu driver. This was previously used for CPU initilisation, however this hasn't been the case in a long time. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c == --- head/sys/arm64/arm64/mp_machdep.c Wed Oct 31 06:24:07 2018 (r339942) +++ head/sys/arm64/arm64/mp_machdep.c Wed Oct 31 09:25:17 2018 (r339943) @@ -126,8 +126,6 @@ static void ipi_stop(void *); struct mtx ap_boot_mtx; struct pcb stoppcbs[MAXCPU]; -static device_t cpu_list[MAXCPU]; - /* * Not all systems boot from the first CPU in the device tree. To work around * this we need to find which CPU we have booted from so when we later @@ -145,78 +143,6 @@ volatile int aps_ready = 0; /* Temporary variables for init_secondary() */ void *dpcpu[MAXCPU - 1]; - -static device_method_t arm64_cpu_methods[] = { - /* Device interface */ - DEVMETHOD(device_identify, arm64_cpu_identify), - DEVMETHOD(device_probe, arm64_cpu_probe), - DEVMETHOD(device_attach,arm64_cpu_attach), - - DEVMETHOD_END -}; - -static devclass_t arm64_cpu_devclass; -static driver_t arm64_cpu_driver = { - "arm64_cpu", - arm64_cpu_methods, - 0 -}; - -DRIVER_MODULE(arm64_cpu, cpu, arm64_cpu_driver, arm64_cpu_devclass, 0, 0); - -static void -arm64_cpu_identify(driver_t *driver, device_t parent) -{ - - if (device_find_child(parent, "arm64_cpu", -1) != NULL) - return; - if (BUS_ADD_CHILD(parent, 0, "arm64_cpu", -1) == NULL) - device_printf(parent, "add child failed\n"); -} - -static int -arm64_cpu_probe(device_t dev) -{ - u_int cpuid; - - cpuid = device_get_unit(dev); - if (cpuid >= MAXCPU || cpuid > mp_maxid) - return (EINVAL); - - device_quiet(dev); - return (0); -} - -static int -arm64_cpu_attach(device_t dev) -{ - const uint32_t *reg; - size_t reg_size; - u_int cpuid; - int i; - - cpuid = device_get_unit(dev); - - if (cpuid >= MAXCPU || cpuid > mp_maxid) - return (EINVAL); - KASSERT(cpu_list[cpuid] == NULL, ("Already have cpu %u", cpuid)); - - reg = cpu_get_cpuid(dev, ®_size); - if (reg == NULL) - return (EINVAL); - - if (bootverbose) { - device_printf(dev, "register <"); - for (i = 0; i < reg_size; i++) - printf("%s%x", (i == 0) ? "" : " ", reg[i]); - printf(">\n"); - } - - /* Set the device to start it later */ - cpu_list[cpuid] = dev; - - return (0); -} static void release_aps(void *dummy __unused) ___ 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: r339930 - head/sys/net
> Author: bz > Date: Tue Oct 30 20:45:15 2018 > New Revision: 339930 > URL: https://svnweb.freebsd.org/changeset/base/339930 > > Log: > With more excessive use of modules, more kernel parts working with > VIMAGE, and feature richness and global state increasing the 8k of > vnet module space are no longer sufficient for people and loading > multiple modules, e.g., pf(4) and ipl(4) or ipsec(4) will fail on > the second module. > > Increase the module space to 8 * PAGE_SIZE which should be enough > to hold multiple firewalls, ipsec, multicast (as in the old days was > a problem), epair, carp, and any kind of other vnet enabled modules. > > Sadly this is a global byte array part of the vnet_set, so we cannot > dynamically change its size; otherwise a TUNABLE would have been > a better solution. > > PR: 228854 > Reported by:Ernie Luzar, Marek Zarychta > Discussed with: rgrimes on current > MFC after: 3 days Pleaes fast track this, I would like to see this in before BETA3 is built on Nov 1st. Same with the better diagnostics commit that followed this. Thanks. Rod Modified: > head/sys/net/vnet.c > > Modified: head/sys/net/vnet.c > == > --- head/sys/net/vnet.c Tue Oct 30 20:08:48 2018(r339929) > +++ head/sys/net/vnet.c Tue Oct 30 20:45:15 2018(r339930) > @@ -171,7 +171,7 @@ static MALLOC_DEFINE(M_VNET_DATA, "vnet_data", "VNET d > * we want the virtualized global variable space to be page-sized, we may > * have more space than that in practice. > */ > -#define VNET_MODMIN 8192 > +#define VNET_MODMIN (8 * PAGE_SIZE) > #define VNET_SIZE roundup2(VNET_BYTES, PAGE_SIZE) > > /* > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"