svn commit: r344842 - in head/tools/tools/ath: . athani
Author: adrian Date: Wed Mar 6 07:58:19 2019 New Revision: 344842 URL: https://svnweb.freebsd.org/changeset/base/344842 Log: [athani] Add a simple tool to list and control ANI parameters. This is a WIP tool I'm using to figure out why ANI is weirdly busted in my home FreeBSD AP/STA setup. Although athstats (mostly) gets the ANI statistics correct, ANI is making the radio deaf it doesn't recover without being disabled. It's very WIP. Tested: * Carambola 2, (AR9331), AP/STA mode. Added: head/tools/tools/ath/athani/ head/tools/tools/ath/athani/Makefile (contents, props changed) head/tools/tools/ath/athani/main.c (contents, props changed) Modified: head/tools/tools/ath/Makefile Modified: head/tools/tools/ath/Makefile == --- head/tools/tools/ath/Makefile Wed Mar 6 07:54:29 2019 (r344841) +++ head/tools/tools/ath/Makefile Wed Mar 6 07:58:19 2019 (r344842) @@ -3,6 +3,6 @@ SUBDIR=arcode athdebug athdecode athkey athpoke athprom athrd athregs athalq SUBDIR+= athstats ath_prom_read athradar athaggrstats SUBDIR+= ath_ee_v14_print ath_ee_v4k_print ath_ee_9287_print ath_ee_9300_print -SUBDIR+= athsurvey athratestats athspectral +SUBDIR+= athsurvey athratestats athspectral athani .include Added: head/tools/tools/ath/athani/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athani/MakefileWed Mar 6 07:58:19 2019 (r344842) @@ -0,0 +1,23 @@ +# $FreeBSD$ + +PROG= athani +MAN= + +CFLAGS+= -I../../../../sys/contrib + +SRCS= main.c + +.include <../Makefile.inc> + +CFLAGS+= -I${.CURDIR}/../common/ +.PATH.c: ${.CURDIR}/../common/ +SRCS+= ctrl.c + +CLEANFILES+=opt_ah.h + +opt_ah.h: + echo "#define AH_DEBUG 1" > opt_ah.h + echo "#define AH_DEBUG_COUNTRY 1" >> opt_ah.h + echo "#define AH_SUPPORT_AR5416 1" >> opt_ah.h + +.include Added: head/tools/tools/ath/athani/main.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athani/main.c Wed Mar 6 07:58:19 2019 (r344842) @@ -0,0 +1,226 @@ +/*- + * Copyright (c) 2019 Adrian Chadd . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer, + *without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + *similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + *redistribution must be conditioned upon including a substantially + *similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER + * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGES. + * + * $FreeBSD$ + */ +#include "diag.h" + +#include "ah.h" +#include "ah_internal.h" + +#include +#include +#include +#include +#include + +#include "../common/ctrl.h" + +/* + * This is a simple wrapper program around the ANI diagnostic interface. + * It is for fetching and setting the live ANI configuration when trying + * to diagnose a noisy environment. + */ + +/* + * HAL_DIAG_ANI_CMD is used to set the ANI configuration. + * HAL_DIAG_ANI_CURRENT is used to fetch the current ANI configuration. + */ + +struct ani_var { + const char *name; + int id; +}; + +static struct ani_var ani_labels[] = { + { "ofdm_noise_immunity_level", 1, }, + { "noise_immunity_level", 1, }, + { "ofdm_weak_signal_detect", 2, }, + { "cck_weak_signal_threshold", 3, }, + { "firstep_level", 4, }, + { "spur_immunity_level", 5, }, + { "mrc_cck", 8, }, + { "cck_noise_immunity_level", 9, }, + { NULL, -1, }, +}; + +static void +usage(void) +{ + fprintf(stderr, "usage: athani [-i interface] [-l]\n"); + fprintf(stderr, "-i: interface\n"); + fprintf(stderr, "
svn commit: r344841 - head/sys/dev/ath/ath_hal
Author: adrian Date: Wed Mar 6 07:54:29 2019 New Revision: 344841 URL: https://svnweb.freebsd.org/changeset/base/344841 Log: [ath_hal] [ath_hal_ar9300] ANI fixes and preparation for userland control. * The ani function bitmap was being badly used when determining if a command could be used. In hostap modes only a couple of the ANI control parameters are enabled. * The ani function bitmap was not being reset to HAL_ANI_ALL if transitioning from AP -> STA. * Change mrcCckOff to mrcCck - 1 == on, rather than 1 == off. This matches the API used to set the value from userland via the diagnostic API. * Handle OFDM/CCK noise immunity level commands in ar9300_ani_control(). These will only come from userland and it will go and program the rest of the ANI control parameters with the values in the ANI table. * Ensure all of the ANI parameters can be tweaked at runtime, even if they're disabled. Tested: * carambola2 (AR9331), STA/AP modes Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Wed Mar 6 06:39:42 2019 (r344840) +++ head/sys/dev/ath/ath_hal/ah.h Wed Mar 6 07:54:29 2019 (r344841) @@ -893,13 +893,13 @@ typedef struct { } HAL_ANI_STATS; typedef struct { - uint8_t noiseImmunityLevel; /* OFDM */ - uint8_t cckNoiseImmunityLevel; + uint8_t noiseImmunityLevel; /* Global for pre-AR9380; OFDM later*/ + uint8_t cckNoiseImmunityLevel; /* AR9380: CCK specific NI */ uint8_t spurImmunityLevel; uint8_t firstepLevel; uint8_t ofdmWeakSigDetectOff; uint8_t cckWeakSigThreshold; - uint8_t mrcCckOff; + uint8_t mrcCck; /* MRC CCK is enabled */ uint32_tlistenTime; /* NB: intentionally ordered so data exported to user space is first */ @@ -958,7 +958,7 @@ typedef struct { */ typedef enum { HAL_ANI_PRESENT = 0,/* is ANI support present */ - HAL_ANI_NOISE_IMMUNITY_LEVEL = 1, /* set level */ + HAL_ANI_NOISE_IMMUNITY_LEVEL = 1, /* set level (global or ofdm) */ HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION = 2, /* enable/disable */ HAL_ANI_CCK_WEAK_SIGNAL_THR = 3,/* enable/disable */ HAL_ANI_FIRSTEP_LEVEL = 4, /* set level */ @@ -966,6 +966,7 @@ typedef enum { HAL_ANI_MODE = 6, /* 0 => manual, 1 => auto (XXX do not change) */ HAL_ANI_PHYERR_RESET = 7, /* reset phy error stats */ HAL_ANI_MRC_CCK = 8, + HAL_ANI_CCK_NOISE_IMMUNITY_LEVEL = 9, /* set level (cck) */ } HAL_ANI_CMD; #defineHAL_ANI_ALL 0x ___ 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: r344840 - in head: lib/libsecureboot lib/libsecureboot/efi lib/libsecureboot/efi/include lib/libsecureboot/efi/include/Guid lib/libsecureboot/efi/include/Protocol lib/libsecureboot/h sh...
Author: mw Date: Wed Mar 6 06:39:42 2019 New Revision: 344840 URL: https://svnweb.freebsd.org/changeset/base/344840 Log: Extend libsecureboot(old libve) to obtain trusted certificates from UEFI and implement revocation UEFI related headers were copied from edk2. A new build option "MK_LOADER_EFI_SECUREBOOT" was added to allow loading of trusted anchors from UEFI. Certificate revocation support is also introduced. The forbidden certificates are loaded from dbx variable. Verification fails in two cases: There is a direct match between cert in dbx and the one in the chain. The CA used to sign the chain is found in dbx. One can also insert a hash of TBS section of a certificate into dbx. In this case verifications fails only if a direct match with a certificate in chain is found. Submitted by: Kornel Duleba Reviewed by: sjg Obtained from: Semihalf Sponsored by: Stormshield Differential Revision:https://reviews.freebsd.org/D19093 Added: head/lib/libsecureboot/efi/ head/lib/libsecureboot/efi/efi_init.c (contents, props changed) head/lib/libsecureboot/efi/efi_variables.c (contents, props changed) head/lib/libsecureboot/efi/include/ head/lib/libsecureboot/efi/include/Guid/ head/lib/libsecureboot/efi/include/Guid/GlobalVariable.h (contents, props changed) head/lib/libsecureboot/efi/include/Guid/ImageAuthentication.h (contents, props changed) head/lib/libsecureboot/efi/include/Protocol/ head/lib/libsecureboot/efi/include/Protocol/Hash.h (contents, props changed) head/tools/build/options/WITH_LOADER_EFI_SECUREBOOT (contents, props changed) Modified: head/lib/libsecureboot/Makefile.inc head/lib/libsecureboot/Makefile.libsa.inc head/lib/libsecureboot/h/verify_file.h head/lib/libsecureboot/libsecureboot-priv.h head/lib/libsecureboot/local.trust.mk head/lib/libsecureboot/verify_file.c head/lib/libsecureboot/vets.c head/share/mk/src.opts.mk head/stand/efi/loader/Makefile head/stand/efi/loader/main.c Modified: head/lib/libsecureboot/Makefile.inc == --- head/lib/libsecureboot/Makefile.inc Wed Mar 6 05:39:40 2019 (r344839) +++ head/lib/libsecureboot/Makefile.inc Wed Mar 6 06:39:42 2019 (r344840) @@ -31,6 +31,17 @@ BRSSL_SRCS+= \ ${BEARSSL}/tools/xmem.c \ ${BEARSSL}/tools/vector.c +BRSSL_DEPS= \ + brf.c \ + vets.c \ + veta.c + +.if ${MK_LOADER_EFI_SECUREBOOT} != "no" +BRSSL_DEPS+= \ + efi_init.c \ + efi_variables.c +.endif + # we do not need/want nested objdirs OBJS_SRCS_FILTER = T R @@ -134,7 +145,7 @@ vse.h: echo 'NULL };' ) > ${.TARGET} -.for s in ${BRSSL_SRCS} brf.c vets.c veta.c +.for s in ${BRSSL_SRCS} ${BRSSL_DEPS} .ifdef BRSSL_SED $s: brssl.h .endif Modified: head/lib/libsecureboot/Makefile.libsa.inc == --- head/lib/libsecureboot/Makefile.libsa.inc Wed Mar 6 05:39:40 2019 (r344839) +++ head/lib/libsecureboot/Makefile.libsa.inc Wed Mar 6 06:39:42 2019 (r344840) @@ -16,6 +16,19 @@ SRCS+= \ vepcr.c \ verify_file.c \ +# Build library with support for the UEFI based authentication +.if ${MK_LOADER_EFI_SECUREBOOT} == "yes" +SRCS+= \ + efi/efi_variables.c \ + efi/efi_init.c + +# Add includes required by efi part +CFLAGS+= \ + -I${SRCTOP}/stand/efi/include \ + -I${SRCTOP}/lib/libsecureboot/efi/include \ + -I${SRCTOP}/stand/efi/include/${MACHINE} +.endif + # this is the list of paths (relative to a file # that we need to verify) used to find a signed manifest. # the signature extensions in VE_SIGNATURE_EXT_LIST Added: head/lib/libsecureboot/efi/efi_init.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libsecureboot/efi/efi_init.c Wed Mar 6 06:39:42 2019 (r344840) @@ -0,0 +1,74 @@ +/*- + * Copyright (c) 2019 Stormshield. + * Copyright (c) 2019 Semihalf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPE
svn commit: r344839 - head/stand/efi/loader
Author: bcran Date: Wed Mar 6 05:39:40 2019 New Revision: 344839 URL: https://svnweb.freebsd.org/changeset/base/344839 Log: Add retry loop around GetMemoryMap call to fix fragmentation bug The call to BS->AllocatePages can cause the memory map to become framented, causing BS->GetMemoryMap to return EFI_BUFFER_TOO_SMALL more than once. For example this can happen on the MinnowBoard Turbot, causing the boot to stop with an error. Avoid this by calling GetMemoryMap in a loop. Reviewed by: imp, tsoome, kevans Differential Revision:https://reviews.freebsd.org/D19341 Modified: head/stand/efi/loader/bootinfo.c head/stand/efi/loader/copy.c Modified: head/stand/efi/loader/bootinfo.c == --- head/stand/efi/loader/bootinfo.cWed Mar 6 02:52:58 2019 (r344838) +++ head/stand/efi/loader/bootinfo.cWed Mar 6 05:39:40 2019 (r344839) @@ -287,12 +287,12 @@ static int bi_load_efi_data(struct preloaded_file *kfp) { EFI_MEMORY_DESCRIPTOR *mm; - EFI_PHYSICAL_ADDRESS addr; + EFI_PHYSICAL_ADDRESS addr = 0; EFI_STATUS status; const char *efi_novmap; size_t efisz; UINTN efi_mapkey; - UINTN mmsz, pages, retry, sz; + UINTN dsz, pages, retry, sz; UINT32 mmver; struct efi_map_header *efihdr; bool do_vmap; @@ -323,76 +323,94 @@ bi_load_efi_data(struct preloaded_file *kfp) efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; /* -* Assgin size of EFI_MEMORY_DESCRIPTOR to keep compatible with +* Assign size of EFI_MEMORY_DESCRIPTOR to keep compatible with * u-boot which doesn't fill this value when buffer for memory * descriptors is too small (eg. 0 to obtain memory map size) */ - mmsz = sizeof(EFI_MEMORY_DESCRIPTOR); + dsz = sizeof(EFI_MEMORY_DESCRIPTOR); /* -* It is possible that the first call to ExitBootServices may change -* the map key. Fetch a new map key and retry ExitBootServices in that -* case. +* Allocate enough pages to hold the bootinfo block and the +* memory map EFI will return to us. The memory map has an +* unknown size, so we have to determine that first. Note that +* the AllocatePages call can itself modify the memory map, so +* we have to take that into account as well. The changes to +* the memory map are caused by splitting a range of free +* memory into two, so that one is marked as being loader +* data. */ + + sz = 0; + + /* +* Matthew Garrett has observed at least one system changing the +* memory map when calling ExitBootServices, causing it to return an +* error, probably because callbacks are allocating memory. +* So we need to retry calling it at least once. +*/ for (retry = 2; retry > 0; retry--) { - /* -* Allocate enough pages to hold the bootinfo block and the -* memory map EFI will return to us. The memory map has an -* unknown size, so we have to determine that first. Note that -* the AllocatePages call can itself modify the memory map, so -* we have to take that into account as well. The changes to -* the memory map are caused by splitting a range of free -* memory into two (AFAICT), so that one is marked as being -* loader data. -*/ - sz = 0; - BS->GetMemoryMap(&sz, NULL, &efi_mapkey, &mmsz, &mmver); - sz += mmsz; - sz = (sz + 0xf) & ~0xf; - pages = EFI_SIZE_TO_PAGES(sz + efisz); - status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, -pages, &addr); - if (EFI_ERROR(status)) { - printf("%s: AllocatePages error %lu\n", __func__, - EFI_ERROR_CODE(status)); - return (ENOMEM); - } + for (;;) { + status = BS->GetMemoryMap(&sz, mm, &efi_mapkey, &dsz, &mmver); + if (!EFI_ERROR(status)) + break; - /* -* Read the memory map and stash it after bootinfo. Align the -* memory map on a 16-byte boundary (the bootinfo block is page -* aligned). -*/ - efihdr = (struct efi_map_header *)(uintptr_t)addr; - mm = (void *)((uint8_t *)efihdr + efisz); - sz = (EFI_PAGE_SIZE * pages) - efisz; + if (status != EFI_BUFFER_TOO_SMALL) { + printf("%s: GetMemoryMap error %lu\n", __func__, + EFI_ERROR_CODE(status)); +
svn commit: r344838 - head/contrib/ipfilter/ipsend/.OLD
Author: cy Date: Wed Mar 6 02:52:58 2019 New Revision: 344838 URL: https://svnweb.freebsd.org/changeset/base/344838 Log: Remove an empty directory emptied by r343702. MFC after:3 days Deleted: head/contrib/ipfilter/ipsend/.OLD/ ___ 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: r344837 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet
Author: cy Date: Wed Mar 6 02:51:33 2019 New Revision: 344837 URL: https://svnweb.freebsd.org/changeset/base/344837 Log: MFC r343705: new_kmem_alloc(9) is a Solaris/illumos malloc(9). FreeBSD and NetBSD never get here, however a test for SOLARIS, as redundant as this test is, serves to document that this is the illumos definition. This should help those who come after me to follow the code more easily. Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h == --- stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Wed Mar 6 02:46:18 2019(r344836) +++ stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Wed Mar 6 02:51:33 2019(r344837) @@ -590,7 +590,7 @@ MALLOC_DECLARE(M_IPFILTER); # define COPYOUT(a,b,c) (bcopy((caddr_t)(a), (caddr_t)(b), (c)), 0) # endif -# ifndef KMALLOC +# if SOLARIS && !defined(KMALLOC) # define KMALLOC(a,b)(a) = (b)new_kmem_alloc(sizeof(*(a)), \ KMEM_NOSLEEP) # define KMALLOCS(a,b,c) (a) = (b)new_kmem_alloc((c), KMEM_NOSLEEP) ___ 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: r344837 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet
Author: cy Date: Wed Mar 6 02:51:33 2019 New Revision: 344837 URL: https://svnweb.freebsd.org/changeset/base/344837 Log: MFC r343705: new_kmem_alloc(9) is a Solaris/illumos malloc(9). FreeBSD and NetBSD never get here, however a test for SOLARIS, as redundant as this test is, serves to document that this is the illumos definition. This should help those who come after me to follow the code more easily. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h == --- stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Wed Mar 6 02:46:18 2019(r344836) +++ stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Wed Mar 6 02:51:33 2019(r344837) @@ -589,7 +589,7 @@ MALLOC_DECLARE(M_IPFILTER); # define COPYOUT(a,b,c) (bcopy((caddr_t)(a), (caddr_t)(b), (c)), 0) # endif -# ifndef KMALLOC +# if SOLARIS && !defined(KMALLOC) # define KMALLOC(a,b)(a) = (b)new_kmem_alloc(sizeof(*(a)), \ KMEM_NOSLEEP) # define KMALLOCS(a,b,c) (a) = (b)new_kmem_alloc((c), KMEM_NOSLEEP) ___ 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: r344836 - in stable: 11/contrib/ipfilter 12/contrib/ipfilter
Author: cy Date: Wed Mar 6 02:46:18 2019 New Revision: 344836 URL: https://svnweb.freebsd.org/changeset/base/344836 Log: MFC r343704: Kernel module shim sources have no business being in the userland build directory, especially those for other operating systems. The kernel module shims for other operating systems are hereby removed. The kernel module shim for FreeBSD, mlfk_ipl.c, is already in sys/contrib/ipfilter/netinet. The one here is never used and should not be in the userland build directory either. mlfk_rule.c isn't used either however we will keep it in case someone wishes to use this shim to load rules via a kernel module, handy for embedded. In that case it should be copied to sys/contrib/ipfilter/netinet and a Makefile created to employ it. (Probably a useful documentation project when time permits.) Deleted: stable/11/contrib/ipfilter/ml_ipl.c stable/11/contrib/ipfilter/mlf_ipl.c stable/11/contrib/ipfilter/mlf_rule.c stable/11/contrib/ipfilter/mlfk_ipl.c stable/11/contrib/ipfilter/mlh_rule.c stable/11/contrib/ipfilter/mln_ipl.c stable/11/contrib/ipfilter/mln_rule.c stable/11/contrib/ipfilter/mlo_ipl.c stable/11/contrib/ipfilter/mlo_rule.c stable/11/contrib/ipfilter/mls_ipl.c stable/11/contrib/ipfilter/mls_rule.c stable/11/contrib/ipfilter/mlso_rule.c Modified: Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Deleted: stable/12/contrib/ipfilter/ml_ipl.c stable/12/contrib/ipfilter/mlf_ipl.c stable/12/contrib/ipfilter/mlf_rule.c stable/12/contrib/ipfilter/mlfk_ipl.c stable/12/contrib/ipfilter/mlh_rule.c stable/12/contrib/ipfilter/mln_ipl.c stable/12/contrib/ipfilter/mln_rule.c stable/12/contrib/ipfilter/mlo_ipl.c stable/12/contrib/ipfilter/mlo_rule.c stable/12/contrib/ipfilter/mls_ipl.c stable/12/contrib/ipfilter/mls_rule.c stable/12/contrib/ipfilter/mlso_rule.c Modified: Directory Properties: stable/12/ (props changed) ___ 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: r344836 - in stable: 11/contrib/ipfilter 12/contrib/ipfilter
Author: cy Date: Wed Mar 6 02:46:18 2019 New Revision: 344836 URL: https://svnweb.freebsd.org/changeset/base/344836 Log: MFC r343704: Kernel module shim sources have no business being in the userland build directory, especially those for other operating systems. The kernel module shims for other operating systems are hereby removed. The kernel module shim for FreeBSD, mlfk_ipl.c, is already in sys/contrib/ipfilter/netinet. The one here is never used and should not be in the userland build directory either. mlfk_rule.c isn't used either however we will keep it in case someone wishes to use this shim to load rules via a kernel module, handy for embedded. In that case it should be copied to sys/contrib/ipfilter/netinet and a Makefile created to employ it. (Probably a useful documentation project when time permits.) Deleted: stable/12/contrib/ipfilter/ml_ipl.c stable/12/contrib/ipfilter/mlf_ipl.c stable/12/contrib/ipfilter/mlf_rule.c stable/12/contrib/ipfilter/mlfk_ipl.c stable/12/contrib/ipfilter/mlh_rule.c stable/12/contrib/ipfilter/mln_ipl.c stable/12/contrib/ipfilter/mln_rule.c stable/12/contrib/ipfilter/mlo_ipl.c stable/12/contrib/ipfilter/mlo_rule.c stable/12/contrib/ipfilter/mls_ipl.c stable/12/contrib/ipfilter/mls_rule.c stable/12/contrib/ipfilter/mlso_rule.c Modified: Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Deleted: stable/11/contrib/ipfilter/ml_ipl.c stable/11/contrib/ipfilter/mlf_ipl.c stable/11/contrib/ipfilter/mlf_rule.c stable/11/contrib/ipfilter/mlfk_ipl.c stable/11/contrib/ipfilter/mlh_rule.c stable/11/contrib/ipfilter/mln_ipl.c stable/11/contrib/ipfilter/mln_rule.c stable/11/contrib/ipfilter/mlo_ipl.c stable/11/contrib/ipfilter/mlo_rule.c stable/11/contrib/ipfilter/mls_ipl.c stable/11/contrib/ipfilter/mls_rule.c stable/11/contrib/ipfilter/mlso_rule.c Modified: Directory Properties: stable/11/ (props changed) ___ 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: r344835 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet
Author: cy Date: Wed Mar 6 02:43:31 2019 New Revision: 344835 URL: https://svnweb.freebsd.org/changeset/base/344835 Log: MFC r343703 Remove a reference to HP-UX in a comment. Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c == --- stable/12/sys/contrib/ipfilter/netinet/fil.cWed Mar 6 02:40:01 2019(r344834) +++ stable/12/sys/contrib/ipfilter/netinet/fil.cWed Mar 6 02:43:31 2019(r344835) @@ -2784,7 +2784,7 @@ ipf_firewall(fin, passp) /* out(I) - 0 == packet going in, 1 == packet going out*/ /* mp(IO) - pointer to caller's buffer pointer that holds this */ /* IP packet. */ -/* Solaris & HP-UX ONLY : */ +/* Solaris: */ /* qpi(I) - pointer to STREAMS queue information for this */ /* interface & direction. */ /* */ ___ 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: r344835 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet
Author: cy Date: Wed Mar 6 02:43:31 2019 New Revision: 344835 URL: https://svnweb.freebsd.org/changeset/base/344835 Log: MFC r343703 Remove a reference to HP-UX in a comment. Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c == --- stable/11/sys/contrib/ipfilter/netinet/fil.cWed Mar 6 02:40:01 2019(r344834) +++ stable/11/sys/contrib/ipfilter/netinet/fil.cWed Mar 6 02:43:31 2019(r344835) @@ -2784,7 +2784,7 @@ ipf_firewall(fin, passp) /* out(I) - 0 == packet going in, 1 == packet going out*/ /* mp(IO) - pointer to caller's buffer pointer that holds this */ /* IP packet. */ -/* Solaris & HP-UX ONLY : */ +/* Solaris: */ /* qpi(I) - pointer to STREAMS queue information for this */ /* interface & direction. */ /* */ ___ 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: r344834 - in stable: 11/contrib/ipfilter/ipsend/.OLD 12/contrib/ipfilter/ipsend/.OLD
Author: cy Date: Wed Mar 6 02:40:01 2019 New Revision: 344834 URL: https://svnweb.freebsd.org/changeset/base/344834 Log: MFC r343702: Remove a redundant ip_compat.h, originally merged from upstream. Deleted: stable/12/contrib/ipfilter/ipsend/.OLD/ip_compat.h Modified: Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Deleted: stable/11/contrib/ipfilter/ipsend/.OLD/ip_compat.h Modified: Directory Properties: stable/11/ (props changed) ___ 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: r344834 - in stable: 11/contrib/ipfilter/ipsend/.OLD 12/contrib/ipfilter/ipsend/.OLD
Author: cy Date: Wed Mar 6 02:40:01 2019 New Revision: 344834 URL: https://svnweb.freebsd.org/changeset/base/344834 Log: MFC r343702: Remove a redundant ip_compat.h, originally merged from upstream. Deleted: stable/11/contrib/ipfilter/ipsend/.OLD/ip_compat.h Modified: Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Deleted: stable/12/contrib/ipfilter/ipsend/.OLD/ip_compat.h Modified: Directory Properties: stable/12/ (props changed) ___ 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: r344833 - in stable: 11/contrib/ipfilter 11/contrib/ipfilter/ipsend 11/contrib/ipfilter/ipsend/.OLD 11/contrib/ipfilter/lib 11/contrib/ipfilter/tools 11/sys/contrib/ipfilter/netinet 12/...
Author: cy Date: Wed Mar 6 02:37:25 2019 New Revision: 344833 URL: https://svnweb.freebsd.org/changeset/base/344833 Log: MFC r343701 & r343732: ipfilter #ifdef cleanup. Remove #ifdefs for ancient and irrelevant operating systems from ipfilter. When ipfilter was written the UNIX and UNIX-like systems in use were diverse and plentiful. IRIX, Tru64 (OSF/1) don't exist any more. OpenBSD removed ipfilter shortly after the first time the ipfilter license terms changed in the early 2000's. ipfilter on AIX, HP/UX, and Linux never really caught on. Removal of code for operating systems that ipfilter will never run on again will simplify the code making it easier to fix bugs, complete partially implemented features, and extend ipfilter. Unsupported previous version FreeBSD code and some older NetBSD code has also been removed. What remains is supported FreeBSD, NetBSD, and illumos. FreeBSD and NetBSD have collaborated exchanging patches, while illumos has expressed willingness to have their ipfilter updated to 5.1.2, provided their zone-specific updates to their ipfilter are merged (which are of interest to FreeBSD to allow control of ipfilters in jails from the global zone). Reviewed by: glebius@ Differential Revision:https://reviews.freebsd.org/D19006 Modified: stable/11/contrib/ipfilter/arc4random.c stable/11/contrib/ipfilter/ip_dstlist.c stable/11/contrib/ipfilter/ip_fil.c stable/11/contrib/ipfilter/ip_fil_compat.c stable/11/contrib/ipfilter/ipf.h stable/11/contrib/ipfilter/ipsend/.OLD/ip_compat.h stable/11/contrib/ipfilter/ipsend/44arp.c stable/11/contrib/ipfilter/ipsend/arp.c stable/11/contrib/ipfilter/ipsend/dlcommon.c stable/11/contrib/ipfilter/ipsend/ip.c stable/11/contrib/ipfilter/ipsend/ipresend.c stable/11/contrib/ipfilter/ipsend/ipsend.c stable/11/contrib/ipfilter/ipsend/ipsend.h stable/11/contrib/ipfilter/ipsend/ipsopt.c stable/11/contrib/ipfilter/ipsend/iptest.c stable/11/contrib/ipfilter/ipsend/iptests.c stable/11/contrib/ipfilter/ipsend/resend.c stable/11/contrib/ipfilter/ipsend/sdlpi.c stable/11/contrib/ipfilter/ipsend/sock.c stable/11/contrib/ipfilter/lib/getifname.c stable/11/contrib/ipfilter/lib/getproto.c stable/11/contrib/ipfilter/lib/inet_addr.c stable/11/contrib/ipfilter/lib/kmem.c stable/11/contrib/ipfilter/lib/printproto.c stable/11/contrib/ipfilter/md5.c stable/11/contrib/ipfilter/tools/ipf.c stable/11/contrib/ipfilter/tools/ipfs.c stable/11/contrib/ipfilter/tools/ipfstat.c stable/11/contrib/ipfilter/tools/ipftest.c stable/11/contrib/ipfilter/tools/ipmon.c stable/11/contrib/ipfilter/tools/ipnat.c stable/11/contrib/ipfilter/tools/ipnat_y.y stable/11/contrib/ipfilter/tools/ippool.c stable/11/contrib/ipfilter/tools/ippool_y.y stable/11/sys/contrib/ipfilter/netinet/fil.c stable/11/sys/contrib/ipfilter/netinet/ip_auth.c stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_dstlist.c stable/11/sys/contrib/ipfilter/netinet/ip_fil.h stable/11/sys/contrib/ipfilter/netinet/ip_frag.c stable/11/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c stable/11/sys/contrib/ipfilter/netinet/ip_htable.c stable/11/sys/contrib/ipfilter/netinet/ip_irc_pxy.c stable/11/sys/contrib/ipfilter/netinet/ip_log.c stable/11/sys/contrib/ipfilter/netinet/ip_lookup.c stable/11/sys/contrib/ipfilter/netinet/ip_nat.c stable/11/sys/contrib/ipfilter/netinet/ip_nat.h stable/11/sys/contrib/ipfilter/netinet/ip_nat6.c stable/11/sys/contrib/ipfilter/netinet/ip_pool.c stable/11/sys/contrib/ipfilter/netinet/ip_proxy.c stable/11/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c stable/11/sys/contrib/ipfilter/netinet/ip_scan.c stable/11/sys/contrib/ipfilter/netinet/ip_state.c stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/ipfilter/arc4random.c stable/12/contrib/ipfilter/ip_dstlist.c stable/12/contrib/ipfilter/ip_fil.c stable/12/contrib/ipfilter/ip_fil_compat.c stable/12/contrib/ipfilter/ipf.h stable/12/contrib/ipfilter/ipsend/.OLD/ip_compat.h stable/12/contrib/ipfilter/ipsend/44arp.c stable/12/contrib/ipfilter/ipsend/arp.c stable/12/contrib/ipfilter/ipsend/dlcommon.c stable/12/contrib/ipfilter/ipsend/ip.c stable/12/contrib/ipfilter/ipsend/ipresend.c stable/12/contrib/ipfilter/ipsend/ipsend.c stable/12/contrib/ipfilter/ipsend/ipsend.h stable/12/contrib/ipfilter/ipsend/ipsopt.c stable/12/contrib/ipfilter/ipsend/iptest.c stable/12/contrib/ipfilter/ipsend/iptests.c stable/12/contrib/ipfilter/ipsend/resend.c stable/12/contrib/ipfilter/ipsend/sdlpi.c stable/12/contrib/ipfilter/ipsend/sock.c stable/12/contrib/ipfilter/lib/getifname.c stable/12/contrib/ipfilter/lib/getproto.c stable/12/contrib/ipfilter/lib/inet_addr.c stable/12/contrib/ipfilter/lib/kmem.c stable/12/contr
svn commit: r344833 - in stable: 11/contrib/ipfilter 11/contrib/ipfilter/ipsend 11/contrib/ipfilter/ipsend/.OLD 11/contrib/ipfilter/lib 11/contrib/ipfilter/tools 11/sys/contrib/ipfilter/netinet 12/...
Author: cy Date: Wed Mar 6 02:37:25 2019 New Revision: 344833 URL: https://svnweb.freebsd.org/changeset/base/344833 Log: MFC r343701 & r343732: ipfilter #ifdef cleanup. Remove #ifdefs for ancient and irrelevant operating systems from ipfilter. When ipfilter was written the UNIX and UNIX-like systems in use were diverse and plentiful. IRIX, Tru64 (OSF/1) don't exist any more. OpenBSD removed ipfilter shortly after the first time the ipfilter license terms changed in the early 2000's. ipfilter on AIX, HP/UX, and Linux never really caught on. Removal of code for operating systems that ipfilter will never run on again will simplify the code making it easier to fix bugs, complete partially implemented features, and extend ipfilter. Unsupported previous version FreeBSD code and some older NetBSD code has also been removed. What remains is supported FreeBSD, NetBSD, and illumos. FreeBSD and NetBSD have collaborated exchanging patches, while illumos has expressed willingness to have their ipfilter updated to 5.1.2, provided their zone-specific updates to their ipfilter are merged (which are of interest to FreeBSD to allow control of ipfilters in jails from the global zone). Reviewed by: glebius@ Differential Revision:https://reviews.freebsd.org/D19006 Modified: stable/12/contrib/ipfilter/arc4random.c stable/12/contrib/ipfilter/ip_dstlist.c stable/12/contrib/ipfilter/ip_fil.c stable/12/contrib/ipfilter/ip_fil_compat.c stable/12/contrib/ipfilter/ipf.h stable/12/contrib/ipfilter/ipsend/.OLD/ip_compat.h stable/12/contrib/ipfilter/ipsend/44arp.c stable/12/contrib/ipfilter/ipsend/arp.c stable/12/contrib/ipfilter/ipsend/dlcommon.c stable/12/contrib/ipfilter/ipsend/ip.c stable/12/contrib/ipfilter/ipsend/ipresend.c stable/12/contrib/ipfilter/ipsend/ipsend.c stable/12/contrib/ipfilter/ipsend/ipsend.h stable/12/contrib/ipfilter/ipsend/ipsopt.c stable/12/contrib/ipfilter/ipsend/iptest.c stable/12/contrib/ipfilter/ipsend/iptests.c stable/12/contrib/ipfilter/ipsend/resend.c stable/12/contrib/ipfilter/ipsend/sdlpi.c stable/12/contrib/ipfilter/ipsend/sock.c stable/12/contrib/ipfilter/lib/getifname.c stable/12/contrib/ipfilter/lib/getproto.c stable/12/contrib/ipfilter/lib/inet_addr.c stable/12/contrib/ipfilter/lib/kmem.c stable/12/contrib/ipfilter/lib/printproto.c stable/12/contrib/ipfilter/md5.c stable/12/contrib/ipfilter/tools/ipf.c stable/12/contrib/ipfilter/tools/ipfs.c stable/12/contrib/ipfilter/tools/ipfstat.c stable/12/contrib/ipfilter/tools/ipftest.c stable/12/contrib/ipfilter/tools/ipmon.c stable/12/contrib/ipfilter/tools/ipnat.c stable/12/contrib/ipfilter/tools/ipnat_y.y stable/12/contrib/ipfilter/tools/ippool.c stable/12/contrib/ipfilter/tools/ippool_y.y stable/12/sys/contrib/ipfilter/netinet/fil.c stable/12/sys/contrib/ipfilter/netinet/ip_auth.c stable/12/sys/contrib/ipfilter/netinet/ip_compat.h stable/12/sys/contrib/ipfilter/netinet/ip_dstlist.c stable/12/sys/contrib/ipfilter/netinet/ip_fil.h stable/12/sys/contrib/ipfilter/netinet/ip_frag.c stable/12/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c stable/12/sys/contrib/ipfilter/netinet/ip_htable.c stable/12/sys/contrib/ipfilter/netinet/ip_irc_pxy.c stable/12/sys/contrib/ipfilter/netinet/ip_log.c stable/12/sys/contrib/ipfilter/netinet/ip_lookup.c stable/12/sys/contrib/ipfilter/netinet/ip_nat.c stable/12/sys/contrib/ipfilter/netinet/ip_nat.h stable/12/sys/contrib/ipfilter/netinet/ip_nat6.c stable/12/sys/contrib/ipfilter/netinet/ip_pool.c stable/12/sys/contrib/ipfilter/netinet/ip_proxy.c stable/12/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c stable/12/sys/contrib/ipfilter/netinet/ip_scan.c stable/12/sys/contrib/ipfilter/netinet/ip_state.c stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/arc4random.c stable/11/contrib/ipfilter/ip_dstlist.c stable/11/contrib/ipfilter/ip_fil.c stable/11/contrib/ipfilter/ip_fil_compat.c stable/11/contrib/ipfilter/ipf.h stable/11/contrib/ipfilter/ipsend/.OLD/ip_compat.h stable/11/contrib/ipfilter/ipsend/44arp.c stable/11/contrib/ipfilter/ipsend/arp.c stable/11/contrib/ipfilter/ipsend/dlcommon.c stable/11/contrib/ipfilter/ipsend/ip.c stable/11/contrib/ipfilter/ipsend/ipresend.c stable/11/contrib/ipfilter/ipsend/ipsend.c stable/11/contrib/ipfilter/ipsend/ipsend.h stable/11/contrib/ipfilter/ipsend/ipsopt.c stable/11/contrib/ipfilter/ipsend/iptest.c stable/11/contrib/ipfilter/ipsend/iptests.c stable/11/contrib/ipfilter/ipsend/resend.c stable/11/contrib/ipfilter/ipsend/sdlpi.c stable/11/contrib/ipfilter/ipsend/sock.c stable/11/contrib/ipfilter/lib/getifname.c stable/11/contrib/ipfilter/lib/getproto.c stable/11/contrib/ipfilter/lib/inet_addr.c stable/11/contrib/ipfilter/lib/kmem.c stable/11/contr
Re: svn commit: r344830 - in head/sys: riscv/riscv vm
> Author: markj > Date: Wed Mar 6 00:01:06 2019 > New Revision: 344830 > URL: https://svnweb.freebsd.org/changeset/base/344830 > > Log: > Implement minidump support for RISC-V. > > Submitted by: Mitchell Horne > Differential Revision: https://reviews.freebsd.org/D18320 > > Modified: > head/sys/riscv/riscv/minidump_machdep.c > head/sys/riscv/riscv/pmap.c > head/sys/riscv/riscv/uma_machdep.c > head/sys/vm/vm_page.c > > Modified: head/sys/riscv/riscv/minidump_machdep.c > == > --- head/sys/riscv/riscv/minidump_machdep.c Tue Mar 5 23:59:55 2019 > (r344829) > +++ head/sys/riscv/riscv/minidump_machdep.c Wed Mar 6 00:01:06 2019 > (r344830) > @@ -1,5 +1,7 @@ > /*- > * Copyright (c) 2006 Peter Wemm > + * Copyright (c) 2015 The FreeBSD Foundation > + * Copyright (c) 2019 Mitchell Horne We must please stop this practice of inserting a new copyright line between an existing one and the all rights reserved clause. Also see other email that the foundation does not want ot assert this any longer. Correction would be to move these 2 lines after the All rights reserved line. We can probably get Peter Wemm to later deassert his reservation. As it is commited only Mitchell Horne is asserting all rights. > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -53,9 +55,381 @@ __FBSDID("$FreeBSD$"); > CTASSERT(sizeof(struct kerneldumpheader) == 512); > CTASSERT(sizeof(*vm_page_dump) == 8); > > +uint64_t *vm_page_dump; > +int vm_page_dump_size; > + > +static struct kerneldumpheader kdh; > + > +/* Handle chunked writes. */ > +static size_t fragsz; > +static void *dump_va; > +static size_t counter, progress, dumpsize; > + > +static uint64_t tmpbuffer[PAGE_SIZE / sizeof(uint64_t)]; > + > +static struct { > + int min_per; > + int max_per; > + int visited; > +} progress_track[10] = { > + { 0, 10, 0}, > + { 10, 20, 0}, > + { 20, 30, 0}, > + { 30, 40, 0}, > + { 40, 50, 0}, > + { 50, 60, 0}, > + { 60, 70, 0}, > + { 70, 80, 0}, > + { 80, 90, 0}, > + { 90, 100, 0} > +}; > + > +static void > +report_progress(size_t progress, size_t dumpsize) > +{ > + int sofar, i; > + > + sofar = 100 - ((progress * 100) / dumpsize); > + for (i = 0; i < nitems(progress_track); i++) { > + if (sofar < progress_track[i].min_per || > + sofar > progress_track[i].max_per) > + continue; > + if (progress_track[i].visited) > + return; > + progress_track[i].visited = 1; > + printf("..%d%%", sofar); > + return; > + } > +} > + > +static bool > +is_dumpable(vm_paddr_t pa) > +{ > + vm_page_t m; > + int i; > + > + if ((m = vm_phys_paddr_to_vm_page(pa)) != NULL) > + return ((m->flags & PG_NODUMP) == 0); > + > + for (i = 0; dump_avail[i] != 0 || dump_avail[i + 1] != 0; i += 2) { > + if (pa >= dump_avail[i] && pa < dump_avail[i + 1]) > + return (true); > + } > + return (false); > +} > + > +static int > +blk_flush(struct dumperinfo *di) > +{ > + int error; > + > + if (fragsz == 0) > + return (0); > + > + error = dump_append(di, dump_va, 0, fragsz); > + fragsz = 0; > + return (error); > +} > + > +/* > + * Write a block of data to the dump file. > + * > + * Caller can provide data through a pointer or by specifying its > + * physical address. > + * > + * XXX writes using pa should be no larger than PAGE_SIZE. > + */ > +static int > +blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz) > +{ > + size_t len; > + int error, c; > + u_int maxdumpsz; > + > + maxdumpsz = min(di->maxiosize, MAXDUMPPGS * PAGE_SIZE); > + if (maxdumpsz == 0) /* seatbelt */ > + maxdumpsz = PAGE_SIZE; > + error = 0; > + if ((sz % PAGE_SIZE) != 0) { > + printf("size not page aligned\n"); > + return (EINVAL); > + } > + if (ptr != NULL && pa != 0) { > + printf("cant have both va and pa!\n"); > + return (EINVAL); > + } > + if uintptr_t)pa) % PAGE_SIZE) != 0) { > + printf("address not page aligned %#lx\n", (uintptr_t)pa); > + return (EINVAL); > + } > + if (ptr != NULL) { > + /* > + * If we're doing a virtual dump, flush any > + * pre-existing pa pages. > + */ > + error = blk_flush(di); > + if (error != 0) > + return (error); > + } > + while (sz) { > + len = maxdumpsz - fragsz; > + if (len > sz) > + len = sz; > + counter += len; > + progress -= len; > + if (counter >> 22) { > +
Re: svn commit: r344829 - head/lib/libkvm
[ Charset UTF-8 unsupported, converting... ] > Author: markj > Date: Tue Mar 5 23:59:55 2019 > New Revision: 344829 > URL: https://svnweb.freebsd.org/changeset/base/344829 > > Log: > Add riscv minidump support to libkvm. > > Submitted by: Mitchell Horne > Differential Revision: https://reviews.freebsd.org/D19171 > > Added: > head/lib/libkvm/kvm_minidump_riscv.c (contents, props changed) > head/lib/libkvm/kvm_riscv.h (contents, props changed) > Modified: > head/lib/libkvm/Makefile > > Modified: head/lib/libkvm/Makefile > == > --- head/lib/libkvm/Makefile Tue Mar 5 23:58:16 2019(r344828) > +++ head/lib/libkvm/Makefile Tue Mar 5 23:59:55 2019(r344829) > @@ -18,6 +18,7 @@ SRCS= kvm.c kvm_cptime.c kvm_getloadavg.c \ > kvm_i386.c kvm_minidump_i386.c \ > kvm_minidump_mips.c \ > kvm_powerpc.c kvm_powerpc64.c \ > + kvm_minidump_riscv.c \ > kvm_sparc64.c > INCS=kvm.h > > > Added: head/lib/libkvm/kvm_minidump_riscv.c > == > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libkvm/kvm_minidump_riscv.c Tue Mar 5 23:59:55 2019 > (r344829) > @@ -0,0 +1,288 @@ > +/*- > + * Copyright (c) 2006 Peter Wemm > + * Copyright (c) 2019 Mitchell Horne > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + *notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + *notice, this list of conditions and the following disclaimer in the > + *documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * From: FreeBSD: src/lib/libkvm/kvm_minidump_amd64.c r261799 > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +/* > + * RISC-V machine dependent routines for kvm and minidumps. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "../../sys/riscv/include/minidump.h" > + > +#include > + > +#include "kvm_private.h" > +#include "kvm_riscv.h" > + > +#define riscv_round_page(x) roundup2((kvaddr_t)(x), RISCV_PAGE_SIZE) > + > +struct vmstate { > + struct minidumphdr hdr; > +}; > + > +static riscv_pt_entry_t > +_riscv_pte_get(kvm_t *kd, u_long pteindex) > +{ > + riscv_pt_entry_t *pte = _kvm_pmap_get(kd, pteindex, sizeof(*pte)); > + > + return le64toh(*pte); > +} > + > +static int > +_riscv_minidump_probe(kvm_t *kd) > +{ > + > + return (_kvm_probe_elf_kernel(kd, ELFCLASS64, EM_RISCV) && > + _kvm_is_minidump(kd)); > +} > + > +static void > +_riscv_minidump_freevtop(kvm_t *kd) > +{ > + struct vmstate *vm = kd->vmst; > + > + free(vm); > + kd->vmst = NULL; > +} > + > +static int > +_riscv_minidump_initvtop(kvm_t *kd) > +{ > + struct vmstate *vmst; > + off_t off, sparse_off; > + > + vmst = _kvm_malloc(kd, sizeof(*vmst)); > + if (vmst == NULL) { > + _kvm_err(kd, kd->program, "cannot allocate vm"); > + return (-1); > + } > + kd->vmst = vmst; > + if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) != > + sizeof(vmst->hdr)) { > + _kvm_err(kd, kd->program, "cannot read dump header"); > + return (-1); > + } > + if (strncmp(MINIDUMP_MAGIC, vmst->hdr.magic, > + sizeof(vmst->hdr.magic)) != 0) { > + _kvm_err(kd, kd->program, "not a minidump for this platform"); > + return (-1); > + } > + > + vmst->hdr.version = le32toh(vmst->hdr.version); > + if (vmst->hdr.version != MINIDUMP_VERSION) { > + _kvm_err(kd, kd->program, "wrong minidump version. " > + "Expected %d got %d", MINIDUMP_VERSION, vmst->hdr.version); > + return (-1); > + } > + vmst->hdr.msgbufsize = le32toh(vmst->hdr.msgbufsize)
svn commit: r344832 - stable/12/lib/libc/sys
Author: emaste Date: Wed Mar 6 00:45:42 2019 New Revision: 344832 URL: https://svnweb.freebsd.org/changeset/base/344832 Log: MFC r344628: poll.2: POLLNVAL is returned also for insufficient rights Reported by: Bora Özarslan Sponsored by: The FreeBSD Foundation Modified: stable/12/lib/libc/sys/poll.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/poll.2 == --- stable/12/lib/libc/sys/poll.2 Wed Mar 6 00:38:10 2019 (r344831) +++ stable/12/lib/libc/sys/poll.2 Wed Mar 6 00:45:42 2019 (r344832) @@ -28,7 +28,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 13, 2014 +.Dd February 27, 2019 .Dt POLL 2 .Os .Sh NAME @@ -127,7 +127,8 @@ should never be present in the .Fa revents bitmask at the same time. .It POLLNVAL -The file descriptor is not open. +The file descriptor is not open, +or in capability mode the file descriptor has insufficient rights. This flag is always checked, even if not present in the .Fa events ___ 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: r344830 - in head/sys: riscv/riscv vm
Author: markj Date: Wed Mar 6 00:01:06 2019 New Revision: 344830 URL: https://svnweb.freebsd.org/changeset/base/344830 Log: Implement minidump support for RISC-V. Submitted by: Mitchell Horne Differential Revision:https://reviews.freebsd.org/D18320 Modified: head/sys/riscv/riscv/minidump_machdep.c head/sys/riscv/riscv/pmap.c head/sys/riscv/riscv/uma_machdep.c head/sys/vm/vm_page.c Modified: head/sys/riscv/riscv/minidump_machdep.c == --- head/sys/riscv/riscv/minidump_machdep.c Tue Mar 5 23:59:55 2019 (r344829) +++ head/sys/riscv/riscv/minidump_machdep.c Wed Mar 6 00:01:06 2019 (r344830) @@ -1,5 +1,7 @@ /*- * Copyright (c) 2006 Peter Wemm + * Copyright (c) 2015 The FreeBSD Foundation + * Copyright (c) 2019 Mitchell Horne * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,9 +55,381 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct kerneldumpheader) == 512); CTASSERT(sizeof(*vm_page_dump) == 8); +uint64_t *vm_page_dump; +int vm_page_dump_size; + +static struct kerneldumpheader kdh; + +/* Handle chunked writes. */ +static size_t fragsz; +static void *dump_va; +static size_t counter, progress, dumpsize; + +static uint64_t tmpbuffer[PAGE_SIZE / sizeof(uint64_t)]; + +static struct { + int min_per; + int max_per; + int visited; +} progress_track[10] = { + { 0, 10, 0}, + { 10, 20, 0}, + { 20, 30, 0}, + { 30, 40, 0}, + { 40, 50, 0}, + { 50, 60, 0}, + { 60, 70, 0}, + { 70, 80, 0}, + { 80, 90, 0}, + { 90, 100, 0} +}; + +static void +report_progress(size_t progress, size_t dumpsize) +{ + int sofar, i; + + sofar = 100 - ((progress * 100) / dumpsize); + for (i = 0; i < nitems(progress_track); i++) { + if (sofar < progress_track[i].min_per || + sofar > progress_track[i].max_per) + continue; + if (progress_track[i].visited) + return; + progress_track[i].visited = 1; + printf("..%d%%", sofar); + return; + } +} + +static bool +is_dumpable(vm_paddr_t pa) +{ + vm_page_t m; + int i; + + if ((m = vm_phys_paddr_to_vm_page(pa)) != NULL) + return ((m->flags & PG_NODUMP) == 0); + + for (i = 0; dump_avail[i] != 0 || dump_avail[i + 1] != 0; i += 2) { + if (pa >= dump_avail[i] && pa < dump_avail[i + 1]) + return (true); + } + return (false); +} + +static int +blk_flush(struct dumperinfo *di) +{ + int error; + + if (fragsz == 0) + return (0); + + error = dump_append(di, dump_va, 0, fragsz); + fragsz = 0; + return (error); +} + +/* + * Write a block of data to the dump file. + * + * Caller can provide data through a pointer or by specifying its + * physical address. + * + * XXX writes using pa should be no larger than PAGE_SIZE. + */ +static int +blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz) +{ + size_t len; + int error, c; + u_int maxdumpsz; + + maxdumpsz = min(di->maxiosize, MAXDUMPPGS * PAGE_SIZE); + if (maxdumpsz == 0) /* seatbelt */ + maxdumpsz = PAGE_SIZE; + error = 0; + if ((sz % PAGE_SIZE) != 0) { + printf("size not page aligned\n"); + return (EINVAL); + } + if (ptr != NULL && pa != 0) { + printf("cant have both va and pa!\n"); + return (EINVAL); + } + if uintptr_t)pa) % PAGE_SIZE) != 0) { + printf("address not page aligned %#lx\n", (uintptr_t)pa); + return (EINVAL); + } + if (ptr != NULL) { + /* +* If we're doing a virtual dump, flush any +* pre-existing pa pages. +*/ + error = blk_flush(di); + if (error != 0) + return (error); + } + while (sz) { + len = maxdumpsz - fragsz; + if (len > sz) + len = sz; + counter += len; + progress -= len; + if (counter >> 22) { + report_progress(progress, dumpsize); + counter &= (1 << 22) - 1; + } + + wdog_kern_pat(WD_LASTVAL); + + if (ptr) { + error = dump_append(di, ptr, 0, len); + if (error != 0) + return (error); + ptr += len; + sz -= len; + } else { + dump_va = (void *)PHYS_TO_DMAP(pa); + fragsz += len; + pa += len; + s
svn commit: r344829 - head/lib/libkvm
Author: markj Date: Tue Mar 5 23:59:55 2019 New Revision: 344829 URL: https://svnweb.freebsd.org/changeset/base/344829 Log: Add riscv minidump support to libkvm. Submitted by: Mitchell Horne Differential Revision:https://reviews.freebsd.org/D19171 Added: head/lib/libkvm/kvm_minidump_riscv.c (contents, props changed) head/lib/libkvm/kvm_riscv.h (contents, props changed) Modified: head/lib/libkvm/Makefile Modified: head/lib/libkvm/Makefile == --- head/lib/libkvm/MakefileTue Mar 5 23:58:16 2019(r344828) +++ head/lib/libkvm/MakefileTue Mar 5 23:59:55 2019(r344829) @@ -18,6 +18,7 @@ SRCS= kvm.c kvm_cptime.c kvm_getloadavg.c \ kvm_i386.c kvm_minidump_i386.c \ kvm_minidump_mips.c \ kvm_powerpc.c kvm_powerpc64.c \ + kvm_minidump_riscv.c \ kvm_sparc64.c INCS= kvm.h Added: head/lib/libkvm/kvm_minidump_riscv.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libkvm/kvm_minidump_riscv.cTue Mar 5 23:59:55 2019 (r344829) @@ -0,0 +1,288 @@ +/*- + * Copyright (c) 2006 Peter Wemm + * Copyright (c) 2019 Mitchell Horne + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * From: FreeBSD: src/lib/libkvm/kvm_minidump_amd64.c r261799 + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * RISC-V machine dependent routines for kvm and minidumps. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "../../sys/riscv/include/minidump.h" + +#include + +#include "kvm_private.h" +#include "kvm_riscv.h" + +#defineriscv_round_page(x) roundup2((kvaddr_t)(x), RISCV_PAGE_SIZE) + +struct vmstate { + struct minidumphdr hdr; +}; + +static riscv_pt_entry_t +_riscv_pte_get(kvm_t *kd, u_long pteindex) +{ + riscv_pt_entry_t *pte = _kvm_pmap_get(kd, pteindex, sizeof(*pte)); + + return le64toh(*pte); +} + +static int +_riscv_minidump_probe(kvm_t *kd) +{ + + return (_kvm_probe_elf_kernel(kd, ELFCLASS64, EM_RISCV) && + _kvm_is_minidump(kd)); +} + +static void +_riscv_minidump_freevtop(kvm_t *kd) +{ + struct vmstate *vm = kd->vmst; + + free(vm); + kd->vmst = NULL; +} + +static int +_riscv_minidump_initvtop(kvm_t *kd) +{ + struct vmstate *vmst; + off_t off, sparse_off; + + vmst = _kvm_malloc(kd, sizeof(*vmst)); + if (vmst == NULL) { + _kvm_err(kd, kd->program, "cannot allocate vm"); + return (-1); + } + kd->vmst = vmst; + if (pread(kd->pmfd, &vmst->hdr, sizeof(vmst->hdr), 0) != + sizeof(vmst->hdr)) { + _kvm_err(kd, kd->program, "cannot read dump header"); + return (-1); + } + if (strncmp(MINIDUMP_MAGIC, vmst->hdr.magic, + sizeof(vmst->hdr.magic)) != 0) { + _kvm_err(kd, kd->program, "not a minidump for this platform"); + return (-1); + } + + vmst->hdr.version = le32toh(vmst->hdr.version); + if (vmst->hdr.version != MINIDUMP_VERSION) { + _kvm_err(kd, kd->program, "wrong minidump version. " + "Expected %d got %d", MINIDUMP_VERSION, vmst->hdr.version); + return (-1); + } + vmst->hdr.msgbufsize = le32toh(vmst->hdr.msgbufsize); + vmst->hdr.bitmapsize = le32toh(vmst->hdr.bitmapsize); + vmst->hdr.pmapsize = le32toh(vmst->hdr.pmapsize); + vmst->hdr.kernbase = le64toh(vmst->hdr.kernbase); + vmst->hdr.dmapphys = le64toh(vmst->hdr.dmapphys); + vmst->hdr.dmapbase = le
svn commit: r344828 - head/sys/riscv/riscv
Author: markj Date: Tue Mar 5 23:58:16 2019 New Revision: 344828 URL: https://svnweb.freebsd.org/changeset/base/344828 Log: Initialize dump_avail[] on riscv. Submitted by: Mitchell Horne Differential Revision:https://reviews.freebsd.org/D19170 Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c == --- head/sys/riscv/riscv/pmap.c Tue Mar 5 23:56:40 2019(r344827) +++ head/sys/riscv/riscv/pmap.c Tue Mar 5 23:58:16 2019(r344828) @@ -628,7 +628,7 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, pa = pmap_early_vtophys(l1pt, freemempos); - /* Initialize phys_avail. */ + /* Initialize phys_avail and dump_avail. */ for (avail_slot = map_slot = physmem = 0; map_slot < physmap_idx * 2; map_slot += 2) { start = physmap[map_slot]; @@ -636,6 +636,9 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, if (start == end) continue; + dump_avail[map_slot] = start; + dump_avail[map_slot + 1] = end; + if (start >= kernstart && end <= pa) continue; ___ 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: r344827 - head/sys/riscv/riscv
Author: markj Date: Tue Mar 5 23:56:40 2019 New Revision: 344827 URL: https://svnweb.freebsd.org/changeset/base/344827 Log: Add pmap_get_tables() for riscv. This mirrors the arm64 implementation and is for use in the minidump code. Submitted by: Mitchell Horne Differential Revision:https://reviews.freebsd.org/D18321 Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c == --- head/sys/riscv/riscv/pmap.c Tue Mar 5 22:55:33 2019(r344826) +++ head/sys/riscv/riscv/pmap.c Tue Mar 5 23:56:40 2019(r344827) @@ -4438,3 +4438,40 @@ pmap_is_valid_memattr(pmap_t pmap __unused, vm_memattr return (mode >= VM_MEMATTR_DEVICE && mode <= VM_MEMATTR_WRITE_BACK); } + +bool +pmap_get_tables(pmap_t pmap, vm_offset_t va, pd_entry_t **l1, pd_entry_t **l2, +pt_entry_t **l3) +{ + pd_entry_t *l1p, *l2p; + + /* Get l1 directory entry. */ + l1p = pmap_l1(pmap, va); + *l1 = l1p; + + if (l1p == NULL || (pmap_load(l1p) & PTE_V) == 0) + return (false); + + if ((pmap_load(l1p) & PTE_RX) != 0) { + *l2 = NULL; + *l3 = NULL; + return (true); + } + + /* Get l2 directory entry. */ + l2p = pmap_l1_to_l2(l1p, va); + *l2 = l2p; + + if (l2p == NULL || (pmap_load(l2p) & PTE_V) == 0) + return (false); + + if ((pmap_load(l2p) & PTE_RX) != 0) { + *l3 = NULL; + return (true); + } + + /* Get l3 page table entry. */ + *l3 = pmap_l2_to_l3(l2p, va); + + return (true); +} ___ 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: r344817 - in head/sys: dev/e1000 net
Hi, So one of the problems is that iflib sets up the buffers, but drivers also have to actually ensure that they configure hardware to use the extra space. This currently means copying that check to every driver. It’s not copied to anywhere except the em driver, which means most of the iflib drivers today would get zero benefit out of enabling CONTIG_MALLOCWORKS. Further, the define is *not* documented anywhere in the kernel, and the name is confusing so it’s unclear what it’s purpose was for. Personally, I’d like to see a) a better name (though sticking with CONTIG_MALLOCWORKS is ok, since it was already in use) b) documented somehow, possibly like an opt_* option like RSS is, and with something which explains why and how to enable it c) extend iflib to provide access to the actually selected buffer size, so that iflib drivers don’t need to duplicate this calculation when setting up the receive buffers in hardware d) extend iflib to prevent using a larger allocation size than the maximum RX segment size. (i.e. not all hardware supports 9k or 16k jumbo frames, so it’s a bit weird for iflib to allocate buffers this large when they won’t be used). Thanks, Jake From: Eric Joyner [mailto:e...@freebsd.org] Sent: Tuesday, March 05, 2019 2:06 PM To: rgri...@freebsd.org; Matthew Macy Cc: src-committers ; svn-src-all ; svn-src-head ; Keller, Jacob E Subject: Re: svn commit: r344817 - in head/sys: dev/e1000 net I'm cc'ing Jake so that he can provide a response. - Eric On Tue, Mar 5, 2019 at 1:12 PM Rodney W. Grimes mailto:free...@gndrsh.dnsmgr.net>> wrote: > This represents a misunderstanding of how defines are used. This left > the option open to the user to enable the use of larger than page size > buffers as it does enable better performance. Over the course of a > long uptime memory can get too fragmented. However, this left it open > to the end consumer. > > I'd like to see this reverted with perhaps a better name for the > define and the addition of an explanatory comment. > Thanks. Yes please. Also, Matt, does it/would it work to stop the memory fragmentation issue if we push the allocation up to the next page size and just waste the 3k bytes? Some people might be willing to make that trade off to get long up times and full 9k jumbo's. Thanks, Rod > -M > > On Tue, Mar 5, 2019 at 11:13 AM Eric Joyner > mailto:e...@freebsd.org>> wrote: > > > > Author: erj > > Date: Tue Mar 5 19:12:51 2019 > > New Revision: 344817 > > URL: https://svnweb.freebsd.org/changeset/base/344817 > > > > Log: > > Remove references to CONTIGMALLOC_WORKS in iflib and em > > > > From Jake: > > "The iflib_fl_setup() function tries to pick various buffer sizes based > > on the max_frame_size value defined by the parent driver. However, this > > code was wrapped under CONTIGMALLOC_WORKS, which was never actually > > defined anywhere. > > > > This same code pattern was used in if_em.c, likely trying to match > > what iflib uses. > > > > Since CONTIGMALLOC_WORKS is not defined, remove this dead code from > > iflib_fl_setup and if_em.c > > > > Given that various iflib drivers appear to be using a similar > > calculation, it might be worth making this buffer size a value that the > > driver can peek at in the future." > > > > Submitted by: Jacob Keller > > mailto:jacob.e.kel...@intel.com>> > > Reviewed by: shurd@ > > MFC after:1 week > > Sponsored by: Intel Corporation > > Differential Revision:https://reviews.freebsd.org/D19199 > > > > Modified: > > head/sys/dev/e1000/if_em.c > > head/sys/net/iflib.c > > > > Modified: head/sys/dev/e1000/if_em.c > > == > > --- head/sys/dev/e1000/if_em.c Tue Mar 5 19:08:37 2019(r344816) > > +++ head/sys/dev/e1000/if_em.c Tue Mar 5 19:12:51 2019(r344817) > > @@ -1276,15 +1276,8 @@ em_if_init(if_ctx_t ctx) > > */ > > if (adapter->hw.mac.max_frame_size <= 2048) > > adapter->rx_mbuf_sz = MCLBYTES; > > -#ifndef CONTIGMALLOC_WORKS > > else > > adapter->rx_mbuf_sz = MJUMPAGESIZE; > > -#else > > - else if (adapter->hw.mac.max_frame_size <= 4096) > > - adapter->rx_mbuf_sz = MJUMPAGESIZE; > > - else > > - adapter->rx_mbuf_sz = MJUM9BYTES; > > -#endif > > em_initialize_receive_unit(ctx); > > > > /* Use real VLAN Filter support? */ > > > > Modified: head/sys/net/iflib.c > > == > > --- head/sys/net/iflib.cTue Mar 5 19:08:37 2019(r344816) > > +++ head/sys/net/iflib.cTue Mar 5 19:12:51 2019(r344817) > > @@ -2187,17 +2187,8 @@ iflib_fl_setup(iflib_fl_t fl) > > */ > > if (sctx->isc_max_frame_size <= 2048) > > fl->ifl_buf_size = MCLBYTES; > > -#ifndef CONTIGMALLOC_WORKS > >
svn commit: r344826 - in head/usr.bin/mkimg: . tests
Author: marcel Date: Tue Mar 5 22:55:33 2019 New Revision: 344826 URL: https://svnweb.freebsd.org/changeset/base/344826 Log: Round # partitions up to fill the last GPT table sector Set the number of partitions entries in the GPT header to a multiple of the number of entries that fit in a sector. PR: 236238 Reviewed by: imp MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D19465 Modified: head/usr.bin/mkimg/gpt.c head/usr.bin/mkimg/tests/Makefile head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu head/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.gz.uu head/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.gz.uu Modified: head/usr.bin/mkimg/gpt.c == --- head/usr.bin/mkimg/gpt.cTue Mar 5 22:04:23 2019(r344825) +++ head/usr.bin/mkimg/gpt.cTue Mar 5 22:55:33 2019(r344826) @@ -259,9 +259,9 @@ gpt_write(lba_t imgsz, void *bootcode) le64enc(&hdr->hdr_lba_end, imgsz - tblsz - 2); mkimg_uuid(&uuid); mkimg_uuid_enc(&hdr->hdr_uuid, &uuid); - le32enc(&hdr->hdr_entries, nparts); + le32enc(&hdr->hdr_entries, tblsz * secsz / sizeof(struct gpt_ent)); le32enc(&hdr->hdr_entsz, sizeof(struct gpt_ent)); - crc = crc32(tbl, nparts * sizeof(struct gpt_ent)); + crc = crc32(tbl, tblsz * secsz); le32enc(&hdr->hdr_crc_table, crc); error = gpt_write_hdr(hdr, 1, imgsz - 1, 2); if (!error) Modified: head/usr.bin/mkimg/tests/Makefile == --- head/usr.bin/mkimg/tests/Makefile Tue Mar 5 22:04:23 2019 (r344825) +++ head/usr.bin/mkimg/tests/Makefile Tue Mar 5 22:55:33 2019 (r344826) @@ -18,6 +18,6 @@ $f: $f.gz.uu CLEANFILES+= ${${PACKAGE}FILES}} rebase: .PHONY - (cd ${.CURDIR}; atf-sh ${_REBASE_SCRIPT}.sh rebase) + (cd ${.CURDIR}; /usr/libexec/atf-sh ${_REBASE_SCRIPT}.sh rebase) .include Modified: head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.gz.uu == --- head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.gz.uuTue Mar 5 22:04:23 2019(r344825) +++ head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.gz.uuTue Mar 5 22:55:33 2019(r344826) @@ -1,132 +1,132 @@ # $FreeBSD$ begin 644 img-1x1-4096-gpt.qcow.gz -M'XL(",]Q+ED``VEM9RTQ>#$M-#`Y-BUG<'0N<6-O=RYO=70`K9W+CAS7L47G -M^HKDFVR2S8J(S*Q,OFW`!CR3C7MG]P+.Y]`HS_GQ[NH^C^ZHO1D6V!(A4"!R -MH^IP]2I*6CH\'.[^:)I.FK9OVK'9Y^;F[],W:>[]S<-OS8^___5OU_?_^/'; -MW9@Y`3Y%N).0NQ$^1;B3D+L)/D6XDY"[ -M&3Y%N).0NP4^1;B3D+L5/D6XTY"[#3Y%N".?%_>XV^%3A#N-N!/\%.%.(^X$ -M^4X9=QIQ)\AWRKC3B#M!OE/&G4;<"?*=,NXTXDZ0[Y1Q9Q%W@GQGC#N+N!/D -M.V/<6<@=\ITQ[BSD#OG.&'<6*GR+]:QET;<:?(=RWCKHNX4^2[CG'71=PI\EW'N.M"[I#O.L9=%W*'?-' -MW"'?S8R[.>0.^6YFW,TA=\AW,^-N#KE#OIL9=W/('?+=S+B;0^Z0[V;&W1)R -MAWRW,.Z6D#ODNX5QMT3<]?@IPMT2<=^6QAW2\1=CWRW,.Z6 -MB+L>^6YAW"T1=SWRW<*X6R/N>N2[E7&W1MSUR'2O\/G@._D0+B30\@=\)T<"'=RB+@;\%.8 -M.PG[NP'X3EA_)V%_-P#?">OO).SO!N`[8?V=A/W=`'PGK+^3L+\;@.^$]7<2 -M]G<#\)VP_D["_FX`OA/6WTG8WPW`=\+Z.PG[NP'X3EA_)V%_-P#?">OO).SO -M!N`[8?V=A/W=`'PGK+^3L+\;@.^$]7<2]G<#\AWK[R3L[P;D.];?2=C?C?@I -MPEW8WXW(=ZR_D["_&Y'O6'\G87\W(M^Q_D["_FY$OF/]G83]W8A\Q_H["?N[ -M$?F.]7<2]G]8?R=A?SOO).SO)OP4X2[L[R;D -M.];?2=C?3OO).SO)N0[UM])V-]-R'>LOY.POYN0[UA_)V%_-R'? -ML?Y.POYN0KYC_9V$_=V$?,?Z.PG[NPGYCO5W$O9W,WZ*OO).SO -M9N0[UM])V-_-R'>LOY.POYN1[UA_)V%_-R/?L?Y.POYN1KYC_9V$_=V,?,?Z -M.PG[NQGYCO5W$O9W,_(=Z^\D[.]FY#O6WTG8W\W(=ZR_D["_FY'O6'\G87\W -M(]^Q_D["_FY&OF/]G83]W8Q\Q_H["?N[!3]%N`O[NP7YCO5W$O9W"_(=Z^\D -M[.\6Y#O6WTG8WRW(=ZR_D["_6Y#O6'\G87^W(-^Q_D["_FY!OF/]G83]W8)\ -MQ_H["?N[!?F.]7<2]G<+\AWK[R3L[Q;D.];?2=C?+]8?R=A?[OO).SO5N0[UM])V-^MR'>LOY.P
Re: svn commit: r344817 - in head/sys: dev/e1000 net
I'm cc'ing Jake so that he can provide a response. - Eric On Tue, Mar 5, 2019 at 1:12 PM Rodney W. Grimes wrote: > > This represents a misunderstanding of how defines are used. This left > > the option open to the user to enable the use of larger than page size > > buffers as it does enable better performance. Over the course of a > > long uptime memory can get too fragmented. However, this left it open > > to the end consumer. > > > > I'd like to see this reverted with perhaps a better name for the > > define and the addition of an explanatory comment. > > Thanks. > Yes please. > > Also, Matt, does it/would it work to stop the memory fragmentation issue > if we push the allocation up to the next page size and just waste the > 3k bytes? Some people might be willing to make that trade off to get > long up times and full 9k jumbo's. > > > Thanks, > Rod > > > -M > > > > On Tue, Mar 5, 2019 at 11:13 AM Eric Joyner wrote: > > > > > > Author: erj > > > Date: Tue Mar 5 19:12:51 2019 > > > New Revision: 344817 > > > URL: https://svnweb.freebsd.org/changeset/base/344817 > > > > > > Log: > > > Remove references to CONTIGMALLOC_WORKS in iflib and em > > > > > > From Jake: > > > "The iflib_fl_setup() function tries to pick various buffer sizes > based > > > on the max_frame_size value defined by the parent driver. However, > this > > > code was wrapped under CONTIGMALLOC_WORKS, which was never actually > > > defined anywhere. > > > > > > This same code pattern was used in if_em.c, likely trying to match > > > what iflib uses. > > > > > > Since CONTIGMALLOC_WORKS is not defined, remove this dead code from > > > iflib_fl_setup and if_em.c > > > > > > Given that various iflib drivers appear to be using a similar > > > calculation, it might be worth making this buffer size a value that > the > > > driver can peek at in the future." > > > > > > Submitted by: Jacob Keller > > > Reviewed by: shurd@ > > > MFC after:1 week > > > Sponsored by: Intel Corporation > > > Differential Revision:https://reviews.freebsd.org/D19199 > > > > > > Modified: > > > head/sys/dev/e1000/if_em.c > > > head/sys/net/iflib.c > > > > > > Modified: head/sys/dev/e1000/if_em.c > > > > == > > > --- head/sys/dev/e1000/if_em.c Tue Mar 5 19:08:37 2019 > (r344816) > > > +++ head/sys/dev/e1000/if_em.c Tue Mar 5 19:12:51 2019 > (r344817) > > > @@ -1276,15 +1276,8 @@ em_if_init(if_ctx_t ctx) > > > */ > > > if (adapter->hw.mac.max_frame_size <= 2048) > > > adapter->rx_mbuf_sz = MCLBYTES; > > > -#ifndef CONTIGMALLOC_WORKS > > > else > > > adapter->rx_mbuf_sz = MJUMPAGESIZE; > > > -#else > > > - else if (adapter->hw.mac.max_frame_size <= 4096) > > > - adapter->rx_mbuf_sz = MJUMPAGESIZE; > > > - else > > > - adapter->rx_mbuf_sz = MJUM9BYTES; > > > -#endif > > > em_initialize_receive_unit(ctx); > > > > > > /* Use real VLAN Filter support? */ > > > > > > Modified: head/sys/net/iflib.c > > > > == > > > --- head/sys/net/iflib.cTue Mar 5 19:08:37 2019 > (r344816) > > > +++ head/sys/net/iflib.cTue Mar 5 19:12:51 2019 > (r344817) > > > @@ -2187,17 +2187,8 @@ iflib_fl_setup(iflib_fl_t fl) > > > */ > > > if (sctx->isc_max_frame_size <= 2048) > > > fl->ifl_buf_size = MCLBYTES; > > > -#ifndef CONTIGMALLOC_WORKS > > > else > > > fl->ifl_buf_size = MJUMPAGESIZE; > > > -#else > > > - else if (sctx->isc_max_frame_size <= 4096) > > > - fl->ifl_buf_size = MJUMPAGESIZE; > > > - else if (sctx->isc_max_frame_size <= 9216) > > > - fl->ifl_buf_size = MJUM9BYTES; > > > - else > > > - fl->ifl_buf_size = MJUM16BYTES; > > > -#endif > > > if (fl->ifl_buf_size > ctx->ifc_max_fl_buf_size) > > > ctx->ifc_max_fl_buf_size = fl->ifl_buf_size; > > > fl->ifl_cltype = m_gettype(fl->ifl_buf_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"
svn commit: r344825 - head/lib/clang/libllvm
Author: dim Date: Tue Mar 5 22:04:23 2019 New Revision: 344825 URL: https://svnweb.freebsd.org/changeset/base/344825 Log: Add a few missed files to the MK_LLVM_TARGET_BPF=yes case, otherwise clang and various other executables will fail to link with undefined symbols. Reported by: O. Hartmann MFC after:1 month X-MFC-With: r344779 Modified: head/lib/clang/libllvm/Makefile Modified: head/lib/clang/libllvm/Makefile == --- head/lib/clang/libllvm/Makefile Tue Mar 5 21:40:08 2019 (r344824) +++ head/lib/clang/libllvm/Makefile Tue Mar 5 22:04:23 2019 (r344825) @@ -1011,11 +1011,13 @@ SRCS_MIN+= Target/BPF/BPFISelDAGToDAG.cpp SRCS_MIN+= Target/BPF/BPFISelLowering.cpp SRCS_MIN+= Target/BPF/BPFInstrInfo.cpp SRCS_MIN+= Target/BPF/BPFMCInstLower.cpp +SRCS_MIN+= Target/BPF/BPFMIChecking.cpp SRCS_MIN+= Target/BPF/BPFMIPeephole.cpp SRCS_MIN+= Target/BPF/BPFRegisterInfo.cpp SRCS_MIN+= Target/BPF/BPFSelectionDAGInfo.cpp SRCS_MIN+= Target/BPF/BPFSubtarget.cpp SRCS_MIN+= Target/BPF/BPFTargetMachine.cpp +SRCS_MIN+= Target/BPF/BTFDebug.cpp SRCS_MIN+= Target/BPF/Disassembler/BPFDisassembler.cpp SRCS_MIN+= Target/BPF/InstPrinter/BPFInstPrinter.cpp SRCS_MIN+= Target/BPF/MCTargetDesc/BPFAsmBackend.cpp ___ 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: r344817 - in head/sys: dev/e1000 net
> This represents a misunderstanding of how defines are used. This left > the option open to the user to enable the use of larger than page size > buffers as it does enable better performance. Over the course of a > long uptime memory can get too fragmented. However, this left it open > to the end consumer. > > I'd like to see this reverted with perhaps a better name for the > define and the addition of an explanatory comment. > Thanks. Yes please. Also, Matt, does it/would it work to stop the memory fragmentation issue if we push the allocation up to the next page size and just waste the 3k bytes? Some people might be willing to make that trade off to get long up times and full 9k jumbo's. Thanks, Rod > -M > > On Tue, Mar 5, 2019 at 11:13 AM Eric Joyner wrote: > > > > Author: erj > > Date: Tue Mar 5 19:12:51 2019 > > New Revision: 344817 > > URL: https://svnweb.freebsd.org/changeset/base/344817 > > > > Log: > > Remove references to CONTIGMALLOC_WORKS in iflib and em > > > > From Jake: > > "The iflib_fl_setup() function tries to pick various buffer sizes based > > on the max_frame_size value defined by the parent driver. However, this > > code was wrapped under CONTIGMALLOC_WORKS, which was never actually > > defined anywhere. > > > > This same code pattern was used in if_em.c, likely trying to match > > what iflib uses. > > > > Since CONTIGMALLOC_WORKS is not defined, remove this dead code from > > iflib_fl_setup and if_em.c > > > > Given that various iflib drivers appear to be using a similar > > calculation, it might be worth making this buffer size a value that the > > driver can peek at in the future." > > > > Submitted by: Jacob Keller > > Reviewed by: shurd@ > > MFC after:1 week > > Sponsored by: Intel Corporation > > Differential Revision:https://reviews.freebsd.org/D19199 > > > > Modified: > > head/sys/dev/e1000/if_em.c > > head/sys/net/iflib.c > > > > Modified: head/sys/dev/e1000/if_em.c > > == > > --- head/sys/dev/e1000/if_em.c Tue Mar 5 19:08:37 2019(r344816) > > +++ head/sys/dev/e1000/if_em.c Tue Mar 5 19:12:51 2019(r344817) > > @@ -1276,15 +1276,8 @@ em_if_init(if_ctx_t ctx) > > */ > > if (adapter->hw.mac.max_frame_size <= 2048) > > adapter->rx_mbuf_sz = MCLBYTES; > > -#ifndef CONTIGMALLOC_WORKS > > else > > adapter->rx_mbuf_sz = MJUMPAGESIZE; > > -#else > > - else if (adapter->hw.mac.max_frame_size <= 4096) > > - adapter->rx_mbuf_sz = MJUMPAGESIZE; > > - else > > - adapter->rx_mbuf_sz = MJUM9BYTES; > > -#endif > > em_initialize_receive_unit(ctx); > > > > /* Use real VLAN Filter support? */ > > > > Modified: head/sys/net/iflib.c > > == > > --- head/sys/net/iflib.cTue Mar 5 19:08:37 2019(r344816) > > +++ head/sys/net/iflib.cTue Mar 5 19:12:51 2019(r344817) > > @@ -2187,17 +2187,8 @@ iflib_fl_setup(iflib_fl_t fl) > > */ > > if (sctx->isc_max_frame_size <= 2048) > > fl->ifl_buf_size = MCLBYTES; > > -#ifndef CONTIGMALLOC_WORKS > > else > > fl->ifl_buf_size = MJUMPAGESIZE; > > -#else > > - else if (sctx->isc_max_frame_size <= 4096) > > - fl->ifl_buf_size = MJUMPAGESIZE; > > - else if (sctx->isc_max_frame_size <= 9216) > > - fl->ifl_buf_size = MJUM9BYTES; > > - else > > - fl->ifl_buf_size = MJUM16BYTES; > > -#endif > > if (fl->ifl_buf_size > ctx->ifc_max_fl_buf_size) > > ctx->ifc_max_fl_buf_size = fl->ifl_buf_size; > > fl->ifl_cltype = m_gettype(fl->ifl_buf_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"
Re: svn commit: r344817 - in head/sys: dev/e1000 net
This represents a misunderstanding of how defines are used. This left the option open to the user to enable the use of larger than page size buffers as it does enable better performance. Over the course of a long uptime memory can get too fragmented. However, this left it open to the end consumer. I'd like to see this reverted with perhaps a better name for the define and the addition of an explanatory comment. Thanks. -M On Tue, Mar 5, 2019 at 11:13 AM Eric Joyner wrote: > > Author: erj > Date: Tue Mar 5 19:12:51 2019 > New Revision: 344817 > URL: https://svnweb.freebsd.org/changeset/base/344817 > > Log: > Remove references to CONTIGMALLOC_WORKS in iflib and em > > From Jake: > "The iflib_fl_setup() function tries to pick various buffer sizes based > on the max_frame_size value defined by the parent driver. However, this > code was wrapped under CONTIGMALLOC_WORKS, which was never actually > defined anywhere. > > This same code pattern was used in if_em.c, likely trying to match > what iflib uses. > > Since CONTIGMALLOC_WORKS is not defined, remove this dead code from > iflib_fl_setup and if_em.c > > Given that various iflib drivers appear to be using a similar > calculation, it might be worth making this buffer size a value that the > driver can peek at in the future." > > Submitted by: Jacob Keller > Reviewed by: shurd@ > MFC after:1 week > Sponsored by: Intel Corporation > Differential Revision:https://reviews.freebsd.org/D19199 > > Modified: > head/sys/dev/e1000/if_em.c > head/sys/net/iflib.c > > Modified: head/sys/dev/e1000/if_em.c > == > --- head/sys/dev/e1000/if_em.c Tue Mar 5 19:08:37 2019(r344816) > +++ head/sys/dev/e1000/if_em.c Tue Mar 5 19:12:51 2019(r344817) > @@ -1276,15 +1276,8 @@ em_if_init(if_ctx_t ctx) > */ > if (adapter->hw.mac.max_frame_size <= 2048) > adapter->rx_mbuf_sz = MCLBYTES; > -#ifndef CONTIGMALLOC_WORKS > else > adapter->rx_mbuf_sz = MJUMPAGESIZE; > -#else > - else if (adapter->hw.mac.max_frame_size <= 4096) > - adapter->rx_mbuf_sz = MJUMPAGESIZE; > - else > - adapter->rx_mbuf_sz = MJUM9BYTES; > -#endif > em_initialize_receive_unit(ctx); > > /* Use real VLAN Filter support? */ > > Modified: head/sys/net/iflib.c > == > --- head/sys/net/iflib.cTue Mar 5 19:08:37 2019(r344816) > +++ head/sys/net/iflib.cTue Mar 5 19:12:51 2019(r344817) > @@ -2187,17 +2187,8 @@ iflib_fl_setup(iflib_fl_t fl) > */ > if (sctx->isc_max_frame_size <= 2048) > fl->ifl_buf_size = MCLBYTES; > -#ifndef CONTIGMALLOC_WORKS > else > fl->ifl_buf_size = MJUMPAGESIZE; > -#else > - else if (sctx->isc_max_frame_size <= 4096) > - fl->ifl_buf_size = MJUMPAGESIZE; > - else if (sctx->isc_max_frame_size <= 9216) > - fl->ifl_buf_size = MJUM9BYTES; > - else > - fl->ifl_buf_size = MJUM16BYTES; > -#endif > if (fl->ifl_buf_size > ctx->ifc_max_fl_buf_size) > ctx->ifc_max_fl_buf_size = fl->ifl_buf_size; > fl->ifl_cltype = m_gettype(fl->ifl_buf_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: r344823 - in head: sys/kern sys/sys usr.bin/procstat
Author: markj Date: Tue Mar 5 19:45:37 2019 New Revision: 344823 URL: https://svnweb.freebsd.org/changeset/base/344823 Log: Show wiring state of map entries in procstat -v. Note that only entries wired by userspace are shown as such. In particular, entries transiently wired by sysctl_wire_old_buffer() are not flagged as wired in procstat -v output. Reviewed by: kib (previous version) MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D19461 Modified: head/sys/kern/kern_proc.c head/sys/sys/user.h head/usr.bin/procstat/procstat.1 head/usr.bin/procstat/procstat_vm.c Modified: head/sys/kern/kern_proc.c == --- head/sys/kern/kern_proc.c Tue Mar 5 19:41:32 2019(r344822) +++ head/sys/kern/kern_proc.c Tue Mar 5 19:45:37 2019(r344823) @@ -2487,6 +2487,8 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, s kve->kve_flags |= KVME_FLAG_GROWS_UP; if (entry->eflags & MAP_ENTRY_GROWS_DOWN) kve->kve_flags |= KVME_FLAG_GROWS_DOWN; + if (entry->eflags & MAP_ENTRY_USER_WIRED) + kve->kve_flags |= KVME_FLAG_USER_WIRED; last_timestamp = map->timestamp; vm_map_unlock_read(map); Modified: head/sys/sys/user.h == --- head/sys/sys/user.h Tue Mar 5 19:41:32 2019(r344822) +++ head/sys/sys/user.h Tue Mar 5 19:45:37 2019(r344823) @@ -471,6 +471,7 @@ struct kinfo_file { #defineKVME_FLAG_SUPER 0x0008 #defineKVME_FLAG_GROWS_UP 0x0010 #defineKVME_FLAG_GROWS_DOWN0x0020 +#defineKVME_FLAG_USER_WIRED0x0040 #if defined(__amd64__) #defineKINFO_OVMENTRY_SIZE 1168 Modified: head/usr.bin/procstat/procstat.1 == --- head/usr.bin/procstat/procstat.1Tue Mar 5 19:41:32 2019 (r344822) +++ head/usr.bin/procstat/procstat.1Tue Mar 5 19:45:37 2019 (r344823) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2017 +.Dd March 4, 2019 .Dt PROCSTAT 1 .Os .Sh NAME @@ -662,6 +662,11 @@ one or more superpage mappings are used grows down (top-down stack) .It U grows up (bottom-up stack) +.It W +pages in this range are locked by +.Xr mlock 2 +or +.Xr mlockall 2 .El .Ss ELF Auxiliary Vector Display ELF auxiliary vector values: @@ -684,6 +689,8 @@ auxiliary vector value .Xr sockstat 1 , .Xr cap_enter 2 , .Xr cap_rights_limit 2 , +.Xr mlock 2 , +.Xr mlockall 2 , .Xr libprocstat 3 , .Xr libxo 3 , .Xr signal 3 , Modified: head/usr.bin/procstat/procstat_vm.c == --- head/usr.bin/procstat/procstat_vm.c Tue Mar 5 19:41:32 2019 (r344822) +++ head/usr.bin/procstat/procstat_vm.c Tue Mar 5 19:45:37 2019 (r344823) @@ -53,7 +53,7 @@ procstat_vm(struct procstat *procstat, struct kinfo_pr ptrwidth = 2*sizeof(void *) + 2; if ((procstat_opts & PS_OPT_NOHEADER) == 0) - xo_emit("{T:/%5s %*s %*s %3s %4s %4s %3s %3s %-4s %-2s %-s}\n", + xo_emit("{T:/%5s %*s %*s %3s %4s %4s %3s %3s %-5s %-2s %-s}\n", "PID", ptrwidth, "START", ptrwidth, "END", "PRT", "RES", "PRES", "REF", "SHD", "FLAG", "TP", "PATH"); @@ -98,9 +98,11 @@ procstat_vm(struct procstat *procstat, struct kinfo_pr KVME_FLAG_NEEDS_COPY ? "N" : "-"); xo_emit("{d:super_pages/%-1s}", kve->kve_flags & KVME_FLAG_SUPER ? "S" : "-"); - xo_emit("{d:grows_down/%-1s} ", kve->kve_flags & + xo_emit("{d:grows_down/%-1s}", kve->kve_flags & KVME_FLAG_GROWS_UP ? "U" : kve->kve_flags & KVME_FLAG_GROWS_DOWN ? "D" : "-"); + xo_emit("{d:wired/%-1s} ", kve->kve_flags & + KVME_FLAG_USER_WIRED ? "W" : "-"); xo_open_container("kve_flags"); xo_emit("{en:copy_on_write/%s}", kve->kve_flags & KVME_FLAG_COW ? "true" : "false"); @@ -112,6 +114,8 @@ procstat_vm(struct procstat *procstat, struct kinfo_pr KVME_FLAG_GROWS_UP ? "true" : "false"); xo_emit("{en:grows_down/%s}", kve->kve_flags & KVME_FLAG_GROWS_DOWN ? "true" : "false"); + xo_emit("{en:wired/%s}", kve->kve_flags & + KVME_FLAG_USER_WIRED ? "true" : "false"); xo_close_container("kve_flags"); switch (kve->kve_type) { case KVME_TYPE_NONE: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send
svn commit: r344822 - stable/11/sys/geom/concat
Author: markj Date: Tue Mar 5 19:41:32 2019 New Revision: 344822 URL: https://svnweb.freebsd.org/changeset/base/344822 Log: MFC r344600: Add a missing return statement to g_concat_kernel_dump(). Modified: stable/11/sys/geom/concat/g_concat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/concat/g_concat.c == --- stable/11/sys/geom/concat/g_concat.cTue Mar 5 19:41:08 2019 (r344821) +++ stable/11/sys/geom/concat/g_concat.cTue Mar 5 19:41:32 2019 (r344822) @@ -219,8 +219,10 @@ g_concat_kernel_dump(struct bio *bp) sc->sc_disks[i].d_end > gkd->offset) break; } - if (i == sc->sc_ndisks) + if (i == sc->sc_ndisks) { g_io_deliver(bp, EOPNOTSUPP); + return; + } disk = &sc->sc_disks[i]; gkd->offset -= disk->d_start; if (gkd->length > disk->d_end - disk->d_start - gkd->offset) ___ 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: r344821 - stable/12/sys/geom/concat
Author: markj Date: Tue Mar 5 19:41:08 2019 New Revision: 344821 URL: https://svnweb.freebsd.org/changeset/base/344821 Log: MFC r344600: Add a missing return statement to g_concat_kernel_dump(). Modified: stable/12/sys/geom/concat/g_concat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/geom/concat/g_concat.c == --- stable/12/sys/geom/concat/g_concat.cTue Mar 5 19:39:13 2019 (r344820) +++ stable/12/sys/geom/concat/g_concat.cTue Mar 5 19:41:08 2019 (r344821) @@ -238,8 +238,10 @@ g_concat_kernel_dump(struct bio *bp) sc->sc_disks[i].d_end > gkd->offset) break; } - if (i == sc->sc_ndisks) + if (i == sc->sc_ndisks) { g_io_deliver(bp, EOPNOTSUPP); + return; + } disk = &sc->sc_disks[i]; gkd->offset -= disk->d_start; if (gkd->length > disk->d_end - disk->d_start - gkd->offset) ___ 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: r344820 - stable/11/sys/kern
Author: markj Date: Tue Mar 5 19:39:13 2019 New Revision: 344820 URL: https://svnweb.freebsd.org/changeset/base/344820 Log: MFC r344278: Move a racy assertion in filt_pipewrite(). PR: 235640 Modified: stable/11/sys/kern/sys_pipe.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sys_pipe.c == --- stable/11/sys/kern/sys_pipe.c Tue Mar 5 19:37:06 2019 (r344819) +++ stable/11/sys/kern/sys_pipe.c Tue Mar 5 19:39:13 2019 (r344820) @@ -1809,15 +1809,19 @@ static int filt_pipewrite(struct knote *kn, long hint) { struct pipe *wpipe; - + + /* +* If this end of the pipe is closed, the knote was removed from the +* knlist and the list lock (i.e., the pipe lock) is therefore not held. +*/ wpipe = kn->kn_hook; - PIPE_LOCK_ASSERT(wpipe, MA_OWNED); if (wpipe->pipe_present != PIPE_ACTIVE || (wpipe->pipe_state & PIPE_EOF)) { kn->kn_data = 0; kn->kn_flags |= EV_EOF; return (1); } + PIPE_LOCK_ASSERT(wpipe, MA_OWNED); kn->kn_data = (wpipe->pipe_buffer.size > 0) ? (wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt) : PIPE_BUF; if (wpipe->pipe_state & PIPE_DIRECTW) ___ 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: r344819 - stable/12/sys/kern
Author: markj Date: Tue Mar 5 19:37:06 2019 New Revision: 344819 URL: https://svnweb.freebsd.org/changeset/base/344819 Log: MFC r344278: Move a racy assertion in filt_pipewrite(). PR: 235640 Modified: stable/12/sys/kern/sys_pipe.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/sys_pipe.c == --- stable/12/sys/kern/sys_pipe.c Tue Mar 5 19:17:24 2019 (r344818) +++ stable/12/sys/kern/sys_pipe.c Tue Mar 5 19:37:06 2019 (r344819) @@ -1743,15 +1743,19 @@ static int filt_pipewrite(struct knote *kn, long hint) { struct pipe *wpipe; - + + /* +* If this end of the pipe is closed, the knote was removed from the +* knlist and the list lock (i.e., the pipe lock) is therefore not held. +*/ wpipe = kn->kn_hook; - PIPE_LOCK_ASSERT(wpipe, MA_OWNED); if (wpipe->pipe_present != PIPE_ACTIVE || (wpipe->pipe_state & PIPE_EOF)) { kn->kn_data = 0; kn->kn_flags |= EV_EOF; return (1); } + PIPE_LOCK_ASSERT(wpipe, MA_OWNED); kn->kn_data = (wpipe->pipe_buffer.size > 0) ? (wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt) : PIPE_BUF; if (wpipe->pipe_state & PIPE_DIRECTW) ___ 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: r344818 - head/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 19:17:24 2019 New Revision: 344818 URL: https://svnweb.freebsd.org/changeset/base/344818 Log: freebsd-update.8: update example to contemporary versions PR: 235761 Reported by: linimon MFC after:1 week Modified: head/usr.sbin/freebsd-update/freebsd-update.8 Modified: head/usr.sbin/freebsd-update/freebsd-update.8 == --- head/usr.sbin/freebsd-update/freebsd-update.8 Tue Mar 5 19:12:51 2019(r344817) +++ head/usr.sbin/freebsd-update/freebsd-update.8 Tue Mar 5 19:17:24 2019(r344818) @@ -59,13 +59,13 @@ by the .Fx Release Engineering Team, e.g., .Fx -10.3-RELEASE and +11.2-RELEASE and .Fx -11.0-RELEASE, but not +12.0-RELEASE, but not .Fx -10.3-STABLE or +11.2-STABLE or .Fx -12-CURRENT. +13.0-CURRENT. .Sh OPTIONS The following options are supported: .Bl -tag -width "-r newrelease" ___ 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: r344817 - in head/sys: dev/e1000 net
Author: erj Date: Tue Mar 5 19:12:51 2019 New Revision: 344817 URL: https://svnweb.freebsd.org/changeset/base/344817 Log: Remove references to CONTIGMALLOC_WORKS in iflib and em From Jake: "The iflib_fl_setup() function tries to pick various buffer sizes based on the max_frame_size value defined by the parent driver. However, this code was wrapped under CONTIGMALLOC_WORKS, which was never actually defined anywhere. This same code pattern was used in if_em.c, likely trying to match what iflib uses. Since CONTIGMALLOC_WORKS is not defined, remove this dead code from iflib_fl_setup and if_em.c Given that various iflib drivers appear to be using a similar calculation, it might be worth making this buffer size a value that the driver can peek at in the future." Submitted by: Jacob Keller Reviewed by: shurd@ MFC after:1 week Sponsored by: Intel Corporation Differential Revision:https://reviews.freebsd.org/D19199 Modified: head/sys/dev/e1000/if_em.c head/sys/net/iflib.c Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Tue Mar 5 19:08:37 2019(r344816) +++ head/sys/dev/e1000/if_em.c Tue Mar 5 19:12:51 2019(r344817) @@ -1276,15 +1276,8 @@ em_if_init(if_ctx_t ctx) */ if (adapter->hw.mac.max_frame_size <= 2048) adapter->rx_mbuf_sz = MCLBYTES; -#ifndef CONTIGMALLOC_WORKS else adapter->rx_mbuf_sz = MJUMPAGESIZE; -#else - else if (adapter->hw.mac.max_frame_size <= 4096) - adapter->rx_mbuf_sz = MJUMPAGESIZE; - else - adapter->rx_mbuf_sz = MJUM9BYTES; -#endif em_initialize_receive_unit(ctx); /* Use real VLAN Filter support? */ Modified: head/sys/net/iflib.c == --- head/sys/net/iflib.cTue Mar 5 19:08:37 2019(r344816) +++ head/sys/net/iflib.cTue Mar 5 19:12:51 2019(r344817) @@ -2187,17 +2187,8 @@ iflib_fl_setup(iflib_fl_t fl) */ if (sctx->isc_max_frame_size <= 2048) fl->ifl_buf_size = MCLBYTES; -#ifndef CONTIGMALLOC_WORKS else fl->ifl_buf_size = MJUMPAGESIZE; -#else - else if (sctx->isc_max_frame_size <= 4096) - fl->ifl_buf_size = MJUMPAGESIZE; - else if (sctx->isc_max_frame_size <= 9216) - fl->ifl_buf_size = MJUM9BYTES; - else - fl->ifl_buf_size = MJUM16BYTES; -#endif if (fl->ifl_buf_size > ctx->ifc_max_fl_buf_size) ctx->ifc_max_fl_buf_size = fl->ifl_buf_size; fl->ifl_cltype = m_gettype(fl->ifl_buf_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: r344816 - stable/12/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 19:08:37 2019 New Revision: 344816 URL: https://svnweb.freebsd.org/changeset/base/344816 Log: MFC r343410: freebsd-update: fix style from r343271 change PR: 234771 Submitted by: Gerald Aryeetey Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 19:07:46 2019(r344815) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 19:08:37 2019(r344816) @@ -670,20 +670,20 @@ fetchupgrade_check_params () { # Disallow upgrade from a version that is not a release case ${RELNUM} in - *-RELEASE | *-ALPHA* | *-BETA* | *-RC*) - ;; - *) - echo -n "`basename $0`: " - cat <<- EOF - Cannot upgrade from a version that is not a release - (including alpha, beta and release candidates) - using `basename $0`. Instead, FreeBSD can be directly - upgraded by source or upgraded to a RELEASE/RELENG version - prior to running `basename $0`. - Currently running: ${RELNUM} - EOF - exit 1 - ;; + *-RELEASE | *-ALPHA* | *-BETA* | *-RC*) + ;; + *) + echo -n "`basename $0`: " + cat <<- EOF + Cannot upgrade from a version that is not a release + (including alpha, beta and release candidates) + using `basename $0`. Instead, FreeBSD can be directly + upgraded by source or upgraded to a RELEASE/RELENG version + prior to running `basename $0`. + Currently running: ${RELNUM} + EOF + exit 1 + ;; esac # Figure out what directory contains the running 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: r344815 - stable/11/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 19:07:46 2019 New Revision: 344815 URL: https://svnweb.freebsd.org/changeset/base/344815 Log: MFC freebsd-update: Clarify unsupported release upgrade error message MFC r343122: freebsd-update: Clarify unsupported release upgrade error message Notify users that upgrading from -CURRENT or -STABLE is unsupported by freebsd-update. Also ensure --currently-running provides a correctly formatted release (as done by -r). Reported by: yuri Reviewed by: bcran MFC r343268: frebsd-update: fix --currently-running after r343122 Reported by: Brandon Schneider MFC r343271: freebsd-update: Allow upgrade from pre-release builds Update r343122 to include -ALPHA, -BETA and -RC releases as upgrade-able via freebsd-update. Reported by: delphij, des Reviewed by: delphij MFC r343410: freebsd-update: fix style from r343271 change PR: 234771 Submitted by: Gerald Aryeetey Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 19:01:57 2019(r344814) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 19:07:46 2019(r344815) @@ -304,6 +304,15 @@ config_TargetRelease () { fi } +# Pretend current release is FreeBSD $1 +config_SourceRelease () { + UNAME_r=$1 + if echo ${UNAME_r} | grep -qE '^[0-9.]+$'; then + UNAME_r="${UNAME_r}-RELEASE" + fi + export UNAME_r +} + # Define what happens to output of utilities config_VerboseLevel () { if [ -z ${VERBOSELEVEL} ]; then @@ -442,7 +451,8 @@ parse_cmdline () { NOTTYOK=1 ;; --currently-running) - shift; export UNAME_r="$1" + shift + config_SourceRelease $1 || usage ;; # Configuration file equivalents @@ -657,6 +667,24 @@ fetchupgrade_check_params () { ARCH=`uname -m` FETCHDIR=${RELNUM}/${ARCH} PATCHDIR=${RELNUM}/${ARCH}/bp + + # Disallow upgrade from a version that is not a release + case ${RELNUM} in + *-RELEASE | *-ALPHA* | *-BETA* | *-RC*) + ;; + *) + echo -n "`basename $0`: " + cat <<- EOF + Cannot upgrade from a version that is not a release + (including alpha, beta and release candidates) + using `basename $0`. Instead, FreeBSD can be directly + upgraded by source or upgraded to a RELEASE/RELENG version + prior to running `basename $0`. + Currently running: ${RELNUM} + EOF + exit 1 + ;; + esac # Figure out what directory contains the running kernel BOOTFILE=`sysctl -n kern.bootfile` ___ 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: r344814 - stable/12/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 19:01:57 2019 New Revision: 344814 URL: https://svnweb.freebsd.org/changeset/base/344814 Log: MFC freebsd-update: Clarify unsupported release upgrade error message MFC r343122: freebsd-update: Clarify unsupported release upgrade error message Notify users that upgrading from -CURRENT or -STABLE is unsupported by freebsd-update. Also ensure --currently-running provides a correctly formatted release (as done by -r). Reported by: yuri Reviewed by: bcran MFC r343268: frebsd-update: fix --currently-running after r343122 Reported by: Brandon Schneider MFC rr343271: freebsd-update: Allow upgrade from pre-release builds Update r343122 to include -ALPHA, -BETA and -RC releases as upgrade-able via freebsd-update. Reported by: delphij, des Reviewed by: delphij PR: 234771 Submitted by: Gerald Aryeetey Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:54:47 2019(r344813) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 19:01:57 2019(r344814) @@ -304,6 +304,15 @@ config_TargetRelease () { fi } +# Pretend current release is FreeBSD $1 +config_SourceRelease () { + UNAME_r=$1 + if echo ${UNAME_r} | grep -qE '^[0-9.]+$'; then + UNAME_r="${UNAME_r}-RELEASE" + fi + export UNAME_r +} + # Define what happens to output of utilities config_VerboseLevel () { if [ -z ${VERBOSELEVEL} ]; then @@ -442,7 +451,8 @@ parse_cmdline () { NOTTYOK=1 ;; --currently-running) - shift; export UNAME_r="$1" + shift + config_SourceRelease $1 || usage ;; # Configuration file equivalents @@ -657,6 +667,24 @@ fetchupgrade_check_params () { ARCH=`uname -m` FETCHDIR=${RELNUM}/${ARCH} PATCHDIR=${RELNUM}/${ARCH}/bp + + # Disallow upgrade from a version that is not a release + case ${RELNUM} in + *-RELEASE | *-ALPHA* | *-BETA* | *-RC*) + ;; + *) + echo -n "`basename $0`: " + cat <<- EOF + Cannot upgrade from a version that is not a release + (including alpha, beta and release candidates) + using `basename $0`. Instead, FreeBSD can be directly + upgraded by source or upgraded to a RELEASE/RELENG version + prior to running `basename $0`. + Currently running: ${RELNUM} + EOF + exit 1 + ;; + esac # Figure out what directory contains the running kernel BOOTFILE=`sysctl -n kern.bootfile` ___ 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: r344813 - stable/11/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:54:47 2019 New Revision: 344813 URL: https://svnweb.freebsd.org/changeset/base/344813 Log: freebsd-update: Use BASEDIR when checking for src componentfreebsd-update: Use BMFC r343152: freebsd-update: Use BASEDIR when checking for src component src could potentially be installed under the based dir and not under the root or vice versa. PR: 224048 Submitted by: Gerald Aryeetey Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:53:28 2019(r344812) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:54:47 2019(r344813) @@ -221,7 +221,7 @@ config_KeepModifiedMetadata () { config_Components () { for C in $@; do if [ "$C" = "src" ]; then - if [ -e /usr/src/COPYRIGHT ]; then + if [ -e "${BASEDIR}/usr/src/COPYRIGHT" ]; then COMPONENTS="${COMPONENTS} ${C}" else echo "src component not installed, skipped" ___ 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: r344811 - stable/12/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:52:13 2019 New Revision: 344811 URL: https://svnweb.freebsd.org/changeset/base/344811 Log: MFC r343152: freebsd-update: Use BASEDIR when checking for src component src could potentially be installed under the based dir and not under the root or vice versa. PR: 224048 Submitted by: Gerald Aryeetey Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:30:43 2019(r344810) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:52:13 2019(r344811) @@ -221,7 +221,7 @@ config_KeepModifiedMetadata () { config_Components () { for C in $@; do if [ "$C" = "src" ]; then - if [ -e /usr/src/COPYRIGHT ]; then + if [ -e "${BASEDIR}/usr/src/COPYRIGHT" ]; then COMPONENTS="${COMPONENTS} ${C}" else echo "src component not installed, skipped" ___ 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: r344810 - stable/11/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:30:43 2019 New Revision: 344810 URL: https://svnweb.freebsd.org/changeset/base/344810 Log: MFC r343270: freebsd-update: Update /etc/passwd after password db changes Add -p to pwd_mkdb in order to ensure password db changes are also included in /etc/passwd. PR: 165954, 232921, 229487 Submitted by: Gerald Aryeetey Reviewed by: jilles Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:29:25 2019(r344809) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:30:43 2019(r344810) @@ -2903,10 +2903,11 @@ Kernel updates have been installed. Please reboot and install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 - # Rebuild /etc/spwd.db and /etc/pwd.db if necessary. + # Rebuild generated pwd files. if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] || - [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ]; then - pwd_mkdb -d ${BASEDIR}/etc ${BASEDIR}/etc/master.passwd + [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ] || + [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/passwd ]; then + pwd_mkdb -d ${BASEDIR}/etc -p ${BASEDIR}/etc/master.passwd fi # Rebuild /etc/login.conf.db if necessary. ___ 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: r344809 - stable/12/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:29:25 2019 New Revision: 344809 URL: https://svnweb.freebsd.org/changeset/base/344809 Log: MFC r343270: freebsd-update: Update /etc/passwd after password db changes Add -p to pwd_mkdb in order to ensure password db changes are also included in /etc/passwd. PR: 165954, 232921, 229487 Submitted by: Gerald Aryeetey Reviewed by: jilles Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:27:29 2019(r344808) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:29:25 2019(r344809) @@ -2903,10 +2903,11 @@ Kernel updates have been installed. Please reboot and install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 - # Rebuild /etc/spwd.db and /etc/pwd.db if necessary. + # Rebuild generated pwd files. if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] || - [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ]; then - pwd_mkdb -d ${BASEDIR}/etc ${BASEDIR}/etc/master.passwd + [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ] || + [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/passwd ]; then + pwd_mkdb -d ${BASEDIR}/etc -p ${BASEDIR}/etc/master.passwd fi # Rebuild /etc/login.conf.db if necessary. ___ 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: r344808 - stable/11/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:27:29 2019 New Revision: 344808 URL: https://svnweb.freebsd.org/changeset/base/344808 Log: MFC r343411: freebsd-update: Clarify unsupported upgrade message PR: 204115 Submitted by: Gerald Aryeetey Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:26:34 2019(r344807) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:27:29 2019(r344808) @@ -994,7 +994,16 @@ fetch_pick_server () { # Have we run out of mirrors? if [ `wc -l < serverlist` -eq 0 ]; then - echo "No mirrors remaining, giving up." + cat <<- EOF + No mirrors remaining, giving up. + + This may be because upgrading from this platform (${ARCH}) + or release (${RELNUM}) is unsupported by `basename $0`. Only + platforms with Tier 1 support can be upgraded by `basename $0`. + See https://www.freebsd.org/platforms/index.html for more info. + + If unsupported, FreeBSD must be upgraded by source. + EOF return 1 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: r344807 - stable/12/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:26:34 2019 New Revision: 344807 URL: https://svnweb.freebsd.org/changeset/base/344807 Log: MFC r343411: freebsd-update: Clarify unsupported upgrade message PR: 204115 Submitted by: Gerald Aryeetey Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:23:55 2019(r344806) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:26:34 2019(r344807) @@ -994,7 +994,16 @@ fetch_pick_server () { # Have we run out of mirrors? if [ `wc -l < serverlist` -eq 0 ]; then - echo "No mirrors remaining, giving up." + cat <<- EOF + No mirrors remaining, giving up. + + This may be because upgrading from this platform (${ARCH}) + or release (${RELNUM}) is unsupported by `basename $0`. Only + platforms with Tier 1 support can be upgraded by `basename $0`. + See https://www.freebsd.org/platforms/index.html for more info. + + If unsupported, FreeBSD must be upgraded by source. + EOF return 1 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: r344806 - stable/11/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:23:55 2019 New Revision: 344806 URL: https://svnweb.freebsd.org/changeset/base/344806 Log: MFC r343412: Fix a typo/wordsmith a description modified in [MFC of r343407] Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:23:31 2019(r344805) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:23:55 2019(r344806) @@ -1922,8 +1922,9 @@ fetch_create_manifest () { # Report to the user if any updates were avoided due to local changes if [ -s modifiedfiles ]; then cat - modifiedfiles <<- EOF | ${PAGER} - The folling files are affected by updates but no changes have - been downloaded because the files have been modified locally: + The following files are affected by updates. No changes have + been downloaded, however, because the files have been modified + locally: EOF fi rm modifiedfiles ___ 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: r344805 - stable/12/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:23:31 2019 New Revision: 344805 URL: https://svnweb.freebsd.org/changeset/base/344805 Log: MFC r343412: Fix a typo/wordsmith a description modified in [MFC of r343407] Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:20:16 2019(r344804) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:23:31 2019(r344805) @@ -1922,8 +1922,9 @@ fetch_create_manifest () { # Report to the user if any updates were avoided due to local changes if [ -s modifiedfiles ]; then cat - modifiedfiles <<- EOF | ${PAGER} - The folling files are affected by updates but no changes have - been downloaded because the files have been modified locally: + The following files are affected by updates. No changes have + been downloaded, however, because the files have been modified + locally: EOF fi rm modifiedfiles ___ 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: r344804 - stable/11/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:20:16 2019 New Revision: 344804 URL: https://svnweb.freebsd.org/changeset/base/344804 Log: MFC r343407: freebsd-update: open $PAGER only if necessary PR: 194547, 208497 Submitted by: Gerald Aryeetey Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:19:26 2019(r344803) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:20:16 2019(r344804) @@ -1921,13 +1921,11 @@ fetch_create_manifest () { # Report to the user if any updates were avoided due to local changes if [ -s modifiedfiles ]; then - echo - echo -n "The following files are affected by updates, " - echo "but no changes have" - echo -n "been downloaded because the files have been " - echo "modified locally:" - cat modifiedfiles - fi | $PAGER + cat - modifiedfiles <<- EOF | ${PAGER} + The folling files are affected by updates but no changes have + been downloaded because the files have been modified locally: + EOF + fi rm modifiedfiles # If no files will be updated, tell the user and exit @@ -1953,30 +1951,29 @@ fetch_create_manifest () { # Report removed files, if any if [ -s files.removed ]; then - echo - echo -n "The following files will be removed " - echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" - cat files.removed - fi | $PAGER + cat - files.removed <<- EOF | ${PAGER} + The following files will be removed as part of updating to + ${RELNUM}-p${RELPATCHNUM}: + EOF + fi rm files.removed # Report added files, if any if [ -s files.added ]; then - echo - echo -n "The following files will be added " - echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" - cat files.added - fi | $PAGER + cat - files.added <<- EOF | ${PAGER} + The following files will be added as part of updating to + ${RELNUM}-p${RELPATCHNUM}: + EOF + fi rm files.added # Report updated files, if any if [ -s files.updated ]; then - echo - echo -n "The following files will be updated " - echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" - - cat files.updated - fi | $PAGER + cat - files.updated <<- EOF | ${PAGER} + The following files will be updated as part of updating to + ${RELNUM}-p${RELPATCHNUM}: + EOF + fi rm files.updated # Create a directory for the install manifest. ___ 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: r344803 - stable/12/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:19:26 2019 New Revision: 344803 URL: https://svnweb.freebsd.org/changeset/base/344803 Log: MFC r343407: freebsd-update: open $PAGER only if necessary PR: 194547, 208497 Submitted by: Gerald Aryeetey Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:17:06 2019(r344802) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:19:26 2019(r344803) @@ -1921,13 +1921,11 @@ fetch_create_manifest () { # Report to the user if any updates were avoided due to local changes if [ -s modifiedfiles ]; then - echo - echo -n "The following files are affected by updates, " - echo "but no changes have" - echo -n "been downloaded because the files have been " - echo "modified locally:" - cat modifiedfiles - fi | $PAGER + cat - modifiedfiles <<- EOF | ${PAGER} + The folling files are affected by updates but no changes have + been downloaded because the files have been modified locally: + EOF + fi rm modifiedfiles # If no files will be updated, tell the user and exit @@ -1953,30 +1951,29 @@ fetch_create_manifest () { # Report removed files, if any if [ -s files.removed ]; then - echo - echo -n "The following files will be removed " - echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" - cat files.removed - fi | $PAGER + cat - files.removed <<- EOF | ${PAGER} + The following files will be removed as part of updating to + ${RELNUM}-p${RELPATCHNUM}: + EOF + fi rm files.removed # Report added files, if any if [ -s files.added ]; then - echo - echo -n "The following files will be added " - echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" - cat files.added - fi | $PAGER + cat - files.added <<- EOF | ${PAGER} + The following files will be added as part of updating to + ${RELNUM}-p${RELPATCHNUM}: + EOF + fi rm files.added # Report updated files, if any if [ -s files.updated ]; then - echo - echo -n "The following files will be updated " - echo "as part of updating to ${RELNUM}-p${RELPATCHNUM}:" - - cat files.updated - fi | $PAGER + cat - files.updated <<- EOF | ${PAGER} + The following files will be updated as part of updating to + ${RELNUM}-p${RELPATCHNUM}: + EOF + fi rm files.updated # Create a directory for the install manifest. ___ 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: r344802 - stable/11/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:17:06 2019 New Revision: 344802 URL: https://svnweb.freebsd.org/changeset/base/344802 Log: MFC r343409: freebsd-update: Stop installing empty component sets Submitted by: Gerald Aryeetey Reported by: rgrimes Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:15:35 2019(r344801) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:17:06 2019(r344802) @@ -2170,7 +2170,7 @@ upgrade_guess_components () { sort -k 2,2 -t ' ' > compfreq.present join -t ' ' -1 2 -2 2 compfreq.present compfreq.total | while read S P T; do - if [ ${P} -gt `expr ${T} / 2` ]; then + if [ ${T} -ne 0 -a ${P} -gt `expr ${T} / 2` ]; then echo ${S} fi done > comp.present ___ 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: r344801 - stable/12/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:15:35 2019 New Revision: 344801 URL: https://svnweb.freebsd.org/changeset/base/344801 Log: MFC r343409: freebsd-update: Stop installing empty component sets Submitted by: Gerald Aryeetey Reported by: rgrimes Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:11:36 2019(r344800) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:15:35 2019(r344801) @@ -2170,7 +2170,7 @@ upgrade_guess_components () { sort -k 2,2 -t ' ' > compfreq.present join -t ' ' -1 2 -2 2 compfreq.present compfreq.total | while read S P T; do - if [ ${P} -gt `expr ${T} / 2` ]; then + if [ ${T} -ne 0 -a ${P} -gt `expr ${T} / 2` ]; then echo ${S} fi done > comp.present ___ 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: r344799 - stable/12/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:10:06 2019 New Revision: 344799 URL: https://svnweb.freebsd.org/changeset/base/344799 Log: MFC r343589: freebsd-update: regenerate man page database after update These are currently not reproducible because they're built by the makewhatis on the freebsd-update build host, not the one in the tree. Regenerate after update, and later we can avoid including it in freebsd-update data. PR: 214545, 217389 Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 16:18:06 2019(r344798) +++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:10:06 2019(r344799) @@ -2907,6 +2907,17 @@ Kernel updates have been installed. Please reboot and cap_mkdb ${BASEDIR}/etc/login.conf fi + # Rebuild man page databases, if necessary. + for D in /usr/share/man /usr/share/openssl/man; do + if [ ! -d ${BASEDIR}/$D ]; then + continue + fi + if [ -z "$(find ${BASEDIR}/$D -type f -newer ${BASEDIR}/$D/mandoc.db)" ]; then + continue; + fi + makewhatis ${BASEDIR}/$D + done + # We've finished installing the world and deleting old files # which are not shared libraries. touch $1/worlddone ___ 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: r344800 - stable/11/usr.sbin/freebsd-update
Author: emaste Date: Tue Mar 5 18:11:36 2019 New Revision: 344800 URL: https://svnweb.freebsd.org/changeset/base/344800 Log: MFC r343589: freebsd-update: regenerate man page database after update These are currently not reproducible because they're built by the makewhatis on the freebsd-update build host, not the one in the tree. Regenerate after update, and later we can avoid including it in freebsd-update data. PR: 214545, 217389 Reviewed by: delphij Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/freebsd-update/freebsd-update.sh == --- stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:10:06 2019(r344799) +++ stable/11/usr.sbin/freebsd-update/freebsd-update.sh Tue Mar 5 18:11:36 2019(r344800) @@ -2907,6 +2907,17 @@ Kernel updates have been installed. Please reboot and cap_mkdb ${BASEDIR}/etc/login.conf fi + # Rebuild man page databases, if necessary. + for D in /usr/share/man /usr/share/openssl/man; do + if [ ! -d ${BASEDIR}/$D ]; then + continue + fi + if [ -z "$(find ${BASEDIR}/$D -type f -newer ${BASEDIR}/$D/mandoc.db)" ]; then + continue; + fi + makewhatis ${BASEDIR}/$D + done + # We've finished installing the world and deleting old files # which are not shared libraries. touch $1/worlddone ___ 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: r344487 - in head/sys: conf gnu/gcov
Hi Alan, On Tue, Mar 5, 2019 at 8:28 AM Alan Somers wrote: > It's not a problem with the version; they're built from the same > source. But is there a problem with the compiler? Can a GCC-built > kernel work with Clang-built world? Sure; I use this configuration all the time (at least, without gcov). Best, Conrad ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r344487 - in head/sys: conf gnu/gcov
It's not a problem with the version; they're built from the same source. But is there a problem with the compiler? Can a GCC-built kernel work with Clang-built world? On Tue, Mar 5, 2019 at 12:54 AM Matthew Macy wrote: > > World? It looks like there's a version mismatch between the kernel and > modules. > > -M > > On Thu, Feb 28, 2019 at 7:11 PM Alan Somers wrote: > > > > On Thu, Feb 28, 2019 at 6:40 PM Matthew Macy wrote: > > > > > > to config add: > > > options LINDEBUGFS > > > options GCOV > > > > > > compile kernel with gcc (otherwise it will be a no-op) > > > > > > sysctl debug.gcov.enable=1 > > > > > > mount -t debugfs debugfs /sys/kernel/debug > > > > > > (or wherever) and the output artifacts will appear under gcov/ > > build path> - you need to be root to see the artifacts > > > > > > gcov can then generate the results as it would normally from the > > > profiling and the build time artifacts > > > > > > bug reports welcome > > > > > > > > > -M > > > > Here's a bug report: I rebuilt the kernel but boot fails with this > > error. Do I need to rebuild world too? > > > > Mounting local filesystems:kldload: fdescfs.ko: lost base for reltab > > linker_load_file: /boot/kernel/fdescfs.ko - unsupported file type > > mount: fdescfs: Operation not supported by device > > Mounting /etc/fstab filesystems failed, will retry after root mount hold > > release > > kldload: fdescfs.ko: lost base for reltab > > linker_load_file: /boot/kernel/fdescfs.ko - unsupported file type > > mount: fdescfs: Operation not supported by device > > . > > Mounting /etc/fstab filesystems failed, startup aborted ___ 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: r344798 - head/lib/clang/libllvm
Author: emaste Date: Tue Mar 5 16:18:06 2019 New Revision: 344798 URL: https://svnweb.freebsd.org/changeset/base/344798 Log: libllvm: promote WithColor and xxhash to SRCS_MIN The armv6 build failed in CI due to missing symbols (from these two source files) in the bootstrap Clang. This affected only armv6 because other Clang-using archs are using LLD as the bootstrap linker, and thus include SRCS_MIW via LLD_BOOTSTRAP. Reported by: CI, via lwhsu Sponsored by: The FreeBSD Foundation Modified: head/lib/clang/libllvm/Makefile Modified: head/lib/clang/libllvm/Makefile == --- head/lib/clang/libllvm/Makefile Tue Mar 5 15:49:30 2019 (r344797) +++ head/lib/clang/libllvm/Makefile Tue Mar 5 16:18:06 2019 (r344798) @@ -866,7 +866,7 @@ SRCS_MIN+= Support/UnicodeCaseFold.cpp SRCS_MIN+= Support/Valgrind.cpp SRCS_MIN+= Support/VirtualFileSystem.cpp SRCS_MIN+= Support/VersionTuple.cpp -SRCS_MIW+= Support/WithColor.cpp +SRCS_MIN+= Support/WithColor.cpp SRCS_MIN+= Support/YAMLParser.cpp SRCS_MIN+= Support/YAMLTraits.cpp SRCS_MIN+= Support/circular_raw_ostream.cpp @@ -877,7 +877,7 @@ SRCS_MIN+= Support/regerror.c SRCS_MIN+= Support/regexec.c SRCS_MIN+= Support/regfree.c SRCS_MIN+= Support/regstrlcpy.c -SRCS_MIW+= Support/xxhash.cpp +SRCS_MIN+= Support/xxhash.cpp SRCS_MIN+= TableGen/Error.cpp SRCS_MIN+= TableGen/JSONBackend.cpp SRCS_MIN+= TableGen/Main.cpp ___ 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: r344797 - head/tests/sys/net
Author: kp Date: Tue Mar 5 15:49:30 2019 New Revision: 344797 URL: https://svnweb.freebsd.org/changeset/base/344797 Log: tun tests: Test renaming and destroying a tun interface in a vnet jail There was a problem destroying renamed tun interfaces in vnet jails. This was fixed in r344794. Test the previously failing scenario. PR: 235704 MFC after:2 weeks Added: head/tests/sys/net/if_tun_test.sh (contents, props changed) Modified: head/tests/sys/net/Makefile Modified: head/tests/sys/net/Makefile == --- head/tests/sys/net/Makefile Tue Mar 5 15:23:28 2019(r344796) +++ head/tests/sys/net/Makefile Tue Mar 5 15:49:30 2019(r344797) @@ -7,6 +7,7 @@ BINDIR= ${TESTSDIR} ATF_TESTS_SH+= if_lagg_test ATF_TESTS_SH+= if_clone_test +ATF_TESTS_SH+= if_tun_test # The tests are written to be run in parallel, but doing so leads to random # panics. I think it's because the kernel's list of interfaces isn't properly Added: head/tests/sys/net/if_tun_test.sh == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/net/if_tun_test.sh Tue Mar 5 15:49:30 2019 (r344797) @@ -0,0 +1,30 @@ +# $FreeBSD$ + +. $(atf_get_srcdir)/../common/vnet.subr + +atf_test_case "235704" "cleanup" +235704_head() +{ + atf_set descr "Test PR #235704" + atf_set require.user root +} + +235704_body() +{ + vnet_init + vnet_mkjail one + + tun=$(jexec one ifconfig tun create) + jexec one ifconfig ${tun} name foo + atf_check -s exit:0 jexec one ifconfig foo destroy +} + +235704_cleanup() +{ + vnet_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "235704" +} ___ 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: r344796 - head/tools/kerneldoc/subsys
Author: netchild Date: Tue Mar 5 15:23:28 2019 New Revision: 344796 URL: https://svnweb.freebsd.org/changeset/base/344796 Log: remove the removed-from-source drm/drm2 parts Deleted: head/tools/kerneldoc/subsys/Doxyfile-dev_drm head/tools/kerneldoc/subsys/Doxyfile-dev_drm2 ___ 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: r344795 - head/lib/libusb
Author: hselasky Date: Tue Mar 5 14:47:15 2019 New Revision: 344795 URL: https://svnweb.freebsd.org/changeset/base/344795 Log: Fix typos in libusb. Found by: Denis Ahrens MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/lib/libusb/libusb10.c Modified: head/lib/libusb/libusb10.c == --- head/lib/libusb/libusb10.c Tue Mar 5 13:21:07 2019(r344794) +++ head/lib/libusb/libusb10.c Tue Mar 5 14:47:15 2019(r344795) @@ -539,7 +539,7 @@ libusb_open_device_with_vid_pid(libusb_context *ctx, u if (ctx == NULL) return (NULL); /* be NULL safe */ - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid enter"); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_with_vid_pid enter"); if ((i = libusb_get_device_list(ctx, &devs)) < 0) return (NULL); @@ -563,7 +563,7 @@ libusb_open_device_with_vid_pid(libusb_context *ctx, u } libusb_free_device_list(devs, 1); - DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid leave"); + DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_with_vid_pid leave"); return (pdev); } ___ 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: r344794 - head/sys/net
Author: kp Date: Tue Mar 5 13:21:07 2019 New Revision: 344794 URL: https://svnweb.freebsd.org/changeset/base/344794 Log: tun: VIMAGE fix for if_tun cloner The if_tun cloner is not virtualised, but if_clone_attach() does use a virtualised list of cloners. The result is that we can't find the if_tun cloner when we try to remove a renamed tun interface. Virtualise the cloner, and move the final cleanup into a sysuninit so that we're sure this happens after all of the vnet_sysuninits Note that we need unit numbers to be system-unique (rather than unique per vnet, as is done by if_clone_simple()). The unit number is used to create the corresponding /dev/tunX device node, and this node must match with the interface. Switch to if_clone_advanced() so that we have control over the unit numbers. Reproduction scenario: jail -c -n foo persist vnet jexec test ifconfig tun create jexec test ifconfig tun0 name wg0 jexec test ifconfig wg0 destroy PR: 235704 Reviewed by: bz, hrs, hselasky MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D19248 Modified: head/sys/net/if_tun.c Modified: head/sys/net/if_tun.c == --- head/sys/net/if_tun.c Tue Mar 5 08:45:07 2019(r344793) +++ head/sys/net/if_tun.c Tue Mar 5 13:21:07 2019(r344794) @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -105,6 +106,7 @@ struct tun_softc { * which is static after setup. */ static struct mtx tunmtx; +static eventhandler_tag tag; static const char tunname[] = "tun"; static MALLOC_DEFINE(M_TUN, tunname, "Tunnel Interface"); static int tundebug = 0; @@ -129,9 +131,12 @@ static int tunoutput(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *ro); static voidtunstart(struct ifnet *); -static int tun_clone_create(struct if_clone *, int, caddr_t); -static voidtun_clone_destroy(struct ifnet *); -static struct if_clone *tun_cloner; +static int tun_clone_match(struct if_clone *ifc, const char *name); +static int tun_clone_create(struct if_clone *, char *, size_t, caddr_t); +static int tun_clone_destroy(struct if_clone *, struct ifnet *); +static struct unrhdr *tun_unrhdr; +VNET_DEFINE_STATIC(struct if_clone *, tun_cloner); +#define V_tun_cloner VNET(tun_cloner) static d_open_ttunopen; static d_close_t tunclose; @@ -173,11 +178,35 @@ static struct cdevsw tun_cdevsw = { }; static int -tun_clone_create(struct if_clone *ifc, int unit, caddr_t params) +tun_clone_match(struct if_clone *ifc, const char *name) { + if (strncmp(tunname, name, 3) == 0 && + (name[3] == '\0' || isdigit(name[3]))) + return (1); + + return (0); +} + +static int +tun_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) +{ struct cdev *dev; - int i; + int err, unit, i; + err = ifc_name2unit(name, &unit); + if (err != 0) + return (err); + + if (unit != -1) { + /* If this unit number is still available that/s okay. */ + if (alloc_unr_specific(tun_unrhdr, unit) == -1) + return (EEXIST); + } else { + unit = alloc_unr(tun_unrhdr); + } + + snprintf(name, IFNAMSIZ, "%s%d", tunname, unit); + /* find any existing device, or allocate new unit number */ i = clone_create(&tunclones, &tun_cdevsw, &unit, &dev, 0); if (i) { @@ -252,6 +281,7 @@ tun_destroy(struct tun_softc *tp) dev = tp->tun_dev; bpfdetach(TUN2IFP(tp)); if_detach(TUN2IFP(tp)); + free_unr(tun_unrhdr, TUN2IFP(tp)->if_dunit); if_free(TUN2IFP(tp)); destroy_dev(dev); seldrain(&tp->tun_rsel); @@ -263,8 +293,8 @@ tun_destroy(struct tun_softc *tp) CURVNET_RESTORE(); } -static void -tun_clone_destroy(struct ifnet *ifp) +static int +tun_clone_destroy(struct if_clone *ifc, struct ifnet *ifp) { struct tun_softc *tp = ifp->if_softc; @@ -272,39 +302,64 @@ tun_clone_destroy(struct ifnet *ifp) TAILQ_REMOVE(&tunhead, tp, tun_list); mtx_unlock(&tunmtx); tun_destroy(tp); + + return (0); } +static void +vnet_tun_init(const void *unused __unused) +{ + V_tun_cloner = if_clone_advanced(tunname, 0, tun_clone_match, + tun_clone_create, tun_clone_destroy); +} +VNET_SYSINIT(vnet_tun_init, SI_SUB_PROTO_IF, SI_ORDER_ANY, + vnet_tun_init, NULL); + +static void +vnet_tun_uninit(const void *unused __unused) +{ + if_clone_detach(V_tun_cloner); +} +VNET_SYSUNINIT(vnet_tun_uninit, SI_SUB_PROTO_IF, SI_ORDER_ANY, +vnet_tun_uninit, NULL); + +static void +tun_uninit(const void *unused __unused) +{ + struct tun_softc *tp; + + EVE
svn commit: r344793 - stable/12/tests/sys/netpfil/pf
Author: kp Date: Tue Mar 5 08:45:07 2019 New Revision: 344793 URL: https://svnweb.freebsd.org/changeset/base/344793 Log: MFC r344692: pf tests: Test CVE-2019-5597 Generate a fragmented packet with different header chains, to provoke the incorrect behaviour of pf. Without the fix this will trigger a panic. Obtained from:Corentin Bayet, Nicolas Collignon, Luca Moro at Synacktiv Added: stable/12/tests/sys/netpfil/pf/CVE-2019-5597.py - copied unchanged from r344692, head/tests/sys/netpfil/pf/CVE-2019-5597.py Modified: stable/12/tests/sys/netpfil/pf/Makefile stable/12/tests/sys/netpfil/pf/fragmentation.sh Directory Properties: stable/12/ (props changed) Copied: stable/12/tests/sys/netpfil/pf/CVE-2019-5597.py (from r344692, head/tests/sys/netpfil/pf/CVE-2019-5597.py) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/tests/sys/netpfil/pf/CVE-2019-5597.py Tue Mar 5 08:45:07 2019(r344793, copy of r344692, head/tests/sys/netpfil/pf/CVE-2019-5597.py) @@ -0,0 +1,35 @@ +#!/usr/local/bin/python2.7 + +import random +import scapy.all as sp +import sys + +UDP_PROTO = 17 +AH_PROTO = 51 +FRAG_PROTO = 44 + +def main(): +intf = sys.argv[1] +ipv6_src = sys.argv[2] +ipv6_dst = sys.argv[3] + +ipv6_main = sp.IPv6(dst=ipv6_dst, src=ipv6_src) + +padding = 8 +fid = random.randint(0,10) +frag_0 = sp.IPv6ExtHdrFragment(id=fid, nh=UDP_PROTO, m=1, offset=0) +frag_1 = sp.IPv6ExtHdrFragment(id=fid, nh=UDP_PROTO, m=0, offset=padding/8) + +pkt1_opts = sp.AH(nh=AH_PROTO, payloadlen=200) \ +/ sp.Raw('' * 199) \ +/ sp.AH(nh=FRAG_PROTO, payloadlen=1) \ +/ frag_1 + +pkt0 = sp.Ether() / ipv6_main / frag_0 / sp.Raw('A' * padding) +pkt1 = sp.Ether() / ipv6_main / pkt1_opts / sp.Raw('B' * padding) + +sp.sendp(pkt0, iface=intf, verbose=False) +sp.sendp(pkt1, iface=intf, verbose=False) + +if __name__ == '__main__': + main() Modified: stable/12/tests/sys/netpfil/pf/Makefile == --- stable/12/tests/sys/netpfil/pf/Makefile Tue Mar 5 08:33:14 2019 (r344792) +++ stable/12/tests/sys/netpfil/pf/Makefile Tue Mar 5 08:45:07 2019 (r344793) @@ -19,8 +19,10 @@ ATF_TESTS_SH+= anchor \ ${PACKAGE}FILES+= utils.subr \ echo_inetd.conf \ - pft_ping.py + pft_ping.py \ + CVE-2019-5597.py ${PACKAGE}FILESMODE_pft_ping.py= 0555 +${PACKAGE}FILESMODE_CVE-2019-5597.py= 0555 .include Modified: stable/12/tests/sys/netpfil/pf/fragmentation.sh == --- stable/12/tests/sys/netpfil/pf/fragmentation.sh Tue Mar 5 08:33:14 2019(r344792) +++ stable/12/tests/sys/netpfil/pf/fragmentation.sh Tue Mar 5 08:45:07 2019(r344793) @@ -104,6 +104,11 @@ v6_body() atf_check -s exit:0 -o ignore\ ping6 -c 1 -b 7 -s 65000 2001:db8:43::3 + + $(atf_get_srcdir)/CVE-2019-5597.py \ + ${epair_send}a \ + 2001:db8:42::1 \ + 2001:db8:43::3 } v6_cleanup() ___ 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: r344792 - stable/12/sys/vm
Author: jah Date: Tue Mar 5 08:33:14 2019 New Revision: 344792 URL: https://svnweb.freebsd.org/changeset/base/344792 Log: MFC r344561: Fix incorrect assertion in vnode_pager_generic_getpages() Modified: stable/12/sys/vm/vnode_pager.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vnode_pager.c == --- stable/12/sys/vm/vnode_pager.c Tue Mar 5 04:16:50 2019 (r344791) +++ stable/12/sys/vm/vnode_pager.c Tue Mar 5 08:33:14 2019 (r344792) @@ -774,7 +774,7 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page KASSERT(foff < object->un_pager.vnp.vnp_size, ("%s: page %p offset beyond vp %p size", __func__, m[0], vp)); - KASSERT(count <= sizeof(bp->b_pages), + KASSERT(count <= nitems(bp->b_pages), ("%s: requested %d pages", __func__, count)); /* ___ 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"