From owner-svn-src-all@freebsd.org Sun Apr 19 00:12:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C55E82B1DB3; Sun, 19 Apr 2020 00:12:32 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494VdX5FqBz48qv; Sun, 19 Apr 2020 00:12:32 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF8011CE1F; Sun, 19 Apr 2020 00:12:32 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03J0CWL6065994; Sun, 19 Apr 2020 00:12:32 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03J0CUKS065983; Sun, 19 Apr 2020 00:12:30 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202004190012.03J0CUKS065983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 19 Apr 2020 00:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360082 - in head/sys: arm/arm arm/include arm64/arm64 conf kern sys X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sys: arm/arm arm/include arm64/arm64 conf kern sys X-SVN-Commit-Revision: 360082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 00:12:32 -0000 Author: mhorne Date: Sun Apr 19 00:12:30 2020 New Revision: 360082 URL: https://svnweb.freebsd.org/changeset/base/360082 Log: Convert arm's physmem interface to MI code The arm_physmem interface found in arm's MD code provides a convenient set of routines for adding/excluding physical memory regions and initializing important kernel globals such as Maxmem, realmem, phys_avail[], and dump_avail[]. It is especially convenient for FDT systems, since we can use FDT parsing functions and pass the result directly to one of these physmem routines. This interface is already in use on arm and arm64, and can be used to simplify this early initialization on RISC-V as well. This requires only a couple trivial changes: - Move arm_physmem_kernel_addr to arm/machdep.c. It is unused on arm64, and manipulated entirely in arm MD code. - Convert arm32_btop/arm64_btop to atop. This is equivalently defined on all architectures. - Drop the "arm" prefix. Reviewed by: manu, emaste ("looks reasonable") MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24153 Added: head/sys/kern/subr_physmem.c - copied, changed from r360081, head/sys/arm/arm/physmem.c head/sys/sys/physmem.h - copied, changed from r360081, head/sys/arm/include/physmem.h Deleted: head/sys/arm/arm/physmem.c head/sys/arm/include/physmem.h Modified: head/sys/arm/arm/machdep.c head/sys/arm/arm/machdep_boot.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/pmap-v6.c head/sys/arm/include/md_var.h head/sys/arm64/arm64/machdep.c head/sys/arm64/arm64/pmap.c head/sys/conf/files.arm head/sys/conf/files.arm64 Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sat Apr 18 23:46:58 2020 (r360081) +++ head/sys/arm/arm/machdep.c Sun Apr 19 00:12:30 2020 (r360082) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -83,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -123,6 +123,9 @@ uint32_t cpu_reset_address = 0; int cold = 1; vm_offset_t vector_page; +/* The address at which the kernel was loaded. Set early in initarm(). */ +vm_paddr_t arm_physmem_kernaddr; + int (*_arm_memcpy)(void *, void *, int, int) = NULL; int (*_arm_bzero)(void *, int, int) = NULL; int _min_memcpy_size = 0; @@ -160,7 +163,6 @@ static void *delay_arg; #endif struct kva_md_info kmi; - /* * arm32_vector_init: * @@ -237,7 +239,7 @@ cpu_startup(void *dummy) (uintmax_t)arm32_ptob(vm_free_count()), (uintmax_t)arm32_ptob(vm_free_count()) / mbyte); if (bootverbose) { - arm_physmem_print_tables(); + physmem_print_tables(); devmap_print_table(); } @@ -870,11 +872,11 @@ initarm(struct arm_boot_params *abp) /* Grab physical memory regions information from device tree. */ if (fdt_get_mem_regions(mem_regions, &mem_regions_sz, &memsize) != 0) panic("Cannot get physical memory regions"); - arm_physmem_hardware_regions(mem_regions, mem_regions_sz); + physmem_hardware_regions(mem_regions, mem_regions_sz); /* Grab reserved memory regions information from device tree. */ if (fdt_get_reserved_regions(mem_regions, &mem_regions_sz) == 0) - arm_physmem_exclude_regions(mem_regions, mem_regions_sz, + physmem_exclude_regions(mem_regions, mem_regions_sz, EXFLAG_NODUMP | EXFLAG_NOALLOC); /* Platform-specific initialisation */ @@ -1081,9 +1083,9 @@ initarm(struct arm_boot_params *abp) * * Prepare the list of physical memory available to the vm subsystem. */ - arm_physmem_exclude_region(abp->abp_physaddr, + physmem_exclude_region(abp->abp_physaddr, (virtual_avail - KERNVIRTADDR), EXFLAG_NOALLOC); - arm_physmem_init_kernel_globals(); + physmem_init_kernel_globals(); init_param2(physmem); dbg_monitor_init(); @@ -1149,11 +1151,11 @@ initarm(struct arm_boot_params *abp) if (fdt_get_mem_regions(mem_regions, &mem_regions_sz,NULL) != 0) panic("Cannot get physical memory regions"); } - arm_physmem_hardware_regions(mem_regions, mem_regions_sz); + physmem_hardware_regions(mem_regions, mem_regions_sz); /* Grab reserved memory regions information from device tree. */ if (fdt_get_reserved_regions(mem_regions, &mem_regions_sz) == 0) - arm_physmem_exclude_regions(mem_regions, mem_regions_sz, + physmem_exclude_regions(mem_regions, mem_regions_sz, EXFLAG_NODUMP | EXFLAG_NOALLOC); /* @@ -1288,9 +1290,9 @@ initarm(struct arm_boot_params *abp) * * Prepare the list of physical memory available to the vm subsystem. */ - arm_physmem_exclude_region(abp->abp_physaddr, + physmem_exclude_region(abp->abp_physaddr, pmap_preboot_get_pages(0) - abp->abp_physaddr, EXFLAG_NOALLOC); - arm_physmem_init_kernel_globals(); + physmem_init_kernel_globals(); init_param2(physmem); /* Init message buffer. */ Modified: head/sys/arm/arm/machdep_boot.c ============================================================================== --- head/sys/arm/arm/machdep_boot.c Sat Apr 18 23:46:58 2020 (r360081) +++ head/sys/arm/arm/machdep_boot.c Sun Apr 19 00:12:30 2020 (r360082) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #if defined(LINUX_BOOT_ABI) @@ -46,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* For KERNVIRTADDR */ #ifdef FDT @@ -228,7 +228,7 @@ linux_parse_boot_param(struct arm_boot_params *abp) case ATAG_CORE: break; case ATAG_MEM: - arm_physmem_hardware_region(walker->u.tag_mem.start, + physmem_hardware_region(walker->u.tag_mem.start, walker->u.tag_mem.size); break; case ATAG_INITRD2: Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Sat Apr 18 23:46:58 2020 (r360081) +++ head/sys/arm/arm/mp_machdep.c Sun Apr 19 00:12:30 2020 (r360082) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #ifdef VFP Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sat Apr 18 23:46:58 2020 (r360081) +++ head/sys/arm/arm/pmap-v6.c Sun Apr 19 00:12:30 2020 (r360082) @@ -117,8 +117,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#include - #include #include #include Modified: head/sys/arm/include/md_var.h ============================================================================== --- head/sys/arm/include/md_var.h Sat Apr 18 23:46:58 2020 (r360081) +++ head/sys/arm/include/md_var.h Sun Apr 19 00:12:30 2020 (r360082) @@ -42,6 +42,7 @@ extern uint32_t *vm_page_dump; extern int vm_page_dump_size; extern u_long elf_hwcap; extern u_long elf_hwcap2; +extern vm_paddr_t arm_physmem_kernaddr; extern int (*_arm_memcpy)(void *, void *, int, int); extern int (*_arm_bzero)(void *, int, int); Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Sat Apr 18 23:46:58 2020 (r360081) +++ head/sys/arm64/arm64/machdep.c Sun Apr 19 00:12:30 2020 (r360082) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -82,8 +83,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #ifdef VFP #include #endif @@ -855,7 +854,7 @@ exclude_efi_map_entry(struct efi_md *p) */ break; default: - arm_physmem_exclude_region(p->md_phys, p->md_pages * PAGE_SIZE, + physmem_exclude_region(p->md_phys, p->md_pages * PAGE_SIZE, EXFLAG_NOALLOC); } } @@ -886,7 +885,7 @@ add_efi_map_entry(struct efi_md *p) /* * We're allowed to use any entry with these types. */ - arm_physmem_hardware_region(p->md_phys, + physmem_hardware_region(p->md_phys, p->md_pages * PAGE_SIZE); break; } @@ -1113,10 +1112,10 @@ initarm(struct arm64_bootparams *abp) if (fdt_get_mem_regions(mem_regions, &mem_regions_sz, NULL) != 0) panic("Cannot get physical memory regions"); - arm_physmem_hardware_regions(mem_regions, mem_regions_sz); + physmem_hardware_regions(mem_regions, mem_regions_sz); } if (fdt_get_reserved_mem(mem_regions, &mem_regions_sz) == 0) - arm_physmem_exclude_regions(mem_regions, mem_regions_sz, + physmem_exclude_regions(mem_regions, mem_regions_sz, EXFLAG_NODUMP | EXFLAG_NOALLOC); #endif @@ -1124,7 +1123,7 @@ initarm(struct arm64_bootparams *abp) efifb = (struct efi_fb *)preload_search_info(kmdp, MODINFO_METADATA | MODINFOMD_EFI_FB); if (efifb != NULL) - arm_physmem_exclude_region(efifb->fb_addr, efifb->fb_size, + physmem_exclude_region(efifb->fb_addr, efifb->fb_size, EXFLAG_NOALLOC); /* Set the pcpu data, this is needed by pmap_bootstrap */ @@ -1153,7 +1152,7 @@ initarm(struct arm64_bootparams *abp) /* Exclude entries neexed in teh DMAP region, but not phys_avail */ if (efihdr != NULL) exclude_efi_map_entries(efihdr); - arm_physmem_init_kernel_globals(); + physmem_init_kernel_globals(); devmap_bootstrap(0, NULL); @@ -1182,7 +1181,7 @@ initarm(struct arm64_bootparams *abp) if (boothowto & RB_VERBOSE) { print_efi_map_entries(efihdr); - arm_physmem_print_tables(); + physmem_print_tables(); } early_boot = 0; Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Sat Apr 18 23:46:58 2020 (r360081) +++ head/sys/arm64/arm64/pmap.c Sun Apr 19 00:12:30 2020 (r360082) @@ -119,6 +119,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -148,8 +149,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #define PMAP_ASSERT_STAGE1(pmap) MPASS((pmap)->pm_stage == PM_STAGE1) #define NL0PG (PAGE_SIZE/(sizeof (pd_entry_t))) @@ -861,7 +860,7 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ /* Assume the address we were loaded to is a valid physical address */ min_pa = KERNBASE - kern_delta; - physmap_idx = arm_physmem_avail(physmap, nitems(physmap)); + physmap_idx = physmem_avail(physmap, nitems(physmap)); physmap_idx /= 2; /* @@ -942,7 +941,7 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ pa = pmap_early_vtophys(l1pt, freemempos); - arm_physmem_exclude_region(start_pa, pa - start_pa, EXFLAG_NOALLOC); + physmem_exclude_region(start_pa, pa - start_pa, EXFLAG_NOALLOC); cpu_tlb_flushID(); } Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sat Apr 18 23:46:58 2020 (r360081) +++ head/sys/conf/files.arm Sun Apr 19 00:12:30 2020 (r360082) @@ -58,7 +58,6 @@ arm/arm/mp_machdep.c optional smp arm/arm/mpcore_timer.c optional mpcore_timer arm/arm/nexus.c standard arm/arm/ofw_machdep.c optional fdt -arm/arm/physmem.c standard arm/arm/pl190.c optional pl190 arm/arm/pl310.c optional pl310 arm/arm/platform.c optional platform @@ -116,6 +115,7 @@ kern/msi_if.m optional intrng kern/pic_if.m optional intrng kern/subr_busdma_bufalloc.c standard kern/subr_devmap.c standard +kern/subr_physmem.c standard kern/subr_sfbuf.c standard libkern/arm/aeabi_unwind.c standard libkern/arm/divsi3.S standard Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Sat Apr 18 23:46:58 2020 (r360081) +++ head/sys/conf/files.arm64 Sun Apr 19 00:12:30 2020 (r360082) @@ -85,7 +85,6 @@ arm/arm/gic.c standard arm/arm/gic_acpi.c optional acpi arm/arm/gic_fdt.c optional fdt arm/arm/pmu.c standard -arm/arm/physmem.c standard arm/broadcom/bcm2835/bcm2835_audio.c optional sound vchiq fdt \ compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" arm/broadcom/bcm2835/bcm2835_bsc.c optional bcm2835_bsc fdt @@ -291,6 +290,7 @@ kern/msi_if.m optional intrng kern/pic_if.m optional intrng kern/subr_devmap.c standard kern/subr_intr.c optional intrng +kern/subr_physmem.c standard libkern/bcmp.c standard libkern/memcmp.c standard \ compile-with "${NORMAL_C:N-fsanitize*}" Copied and modified: head/sys/kern/subr_physmem.c (from r360081, head/sys/arm/arm/physmem.c) ============================================================================== --- head/sys/arm/arm/physmem.c Sat Apr 18 23:46:58 2020 (r360081, copy source) +++ head/sys/kern/subr_physmem.c Sun Apr 19 00:12:30 2020 (r360082) @@ -38,12 +38,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include #include -#include /* * These structures are used internally to keep track of regions of physical @@ -62,10 +62,8 @@ __FBSDID("$FreeBSD$"); #if defined(__arm__) #define MAX_PHYS_ADDR 0xFFFFFFFFull -#define pm_btop(x) arm32_btop(x) -#elif defined(__aarch64__) +#elif defined(__aarch64__) || defined(__riscv) #define MAX_PHYS_ADDR 0xFFFFFFFFFFFFFFFFull -#define pm_btop(x) arm64_btop(x) #endif struct region { @@ -87,9 +85,6 @@ static size_t excnt; long realmem; long Maxmem; -/* The address at which the kernel was loaded. Set early in initarm(). */ -vm_paddr_t arm_physmem_kernaddr; - /* * Print the contents of the physical and excluded region tables using the * provided printf-like output function (which will be either printf or @@ -136,7 +131,7 @@ physmem_dump_tables(int (*prfunc)(const char *, ...)) * Print the contents of the static mapping table. Used for bootverbose. */ void -arm_physmem_print_tables(void) +physmem_print_tables(void) { physmem_dump_tables(printf); @@ -165,7 +160,7 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, for (hwi = 0, hwp = hwregions; hwi < hwcnt; ++hwi, ++hwp) { start = hwp->addr; end = hwp->size + start; - totalmem += pm_btop((vm_offset_t)(end - start)); + totalmem += atop((vm_offset_t)(end - start)); for (exi = 0, exp = exregions; exi < excnt; ++exi, ++exp) { /* * If the excluded region does not match given flags, @@ -213,8 +208,7 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, avail[acnt++] = (vm_paddr_t)start; avail[acnt++] = (vm_paddr_t)xstart; } - availmem += - pm_btop((vm_offset_t)(xstart - start)); + availmem += atop((vm_offset_t)(xstart - start)); start = xend; continue; } @@ -239,7 +233,7 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, avail[acnt++] = (vm_paddr_t)start; avail[acnt++] = (vm_paddr_t)end; } - availmem += pm_btop((vm_offset_t)(end - start)); + availmem += atop((vm_offset_t)(end - start)); } if (acnt >= maxavail) panic("Not enough space in the dump/phys_avail arrays"); @@ -293,7 +287,7 @@ insert_region(struct region *regions, size_t rcnt, vm_ * Add a hardware memory region. */ void -arm_physmem_hardware_region(uint64_t pa, uint64_t sz) +physmem_hardware_region(uint64_t pa, uint64_t sz) { vm_offset_t adj; @@ -345,7 +339,7 @@ arm_physmem_hardware_region(uint64_t pa, uint64_t sz) * Add an exclusion region. */ void -arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t exflags) +physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t exflags) { vm_offset_t adj; @@ -364,7 +358,7 @@ arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz } size_t -arm_physmem_avail(vm_paddr_t *avail, size_t maxavail) +physmem_avail(vm_paddr_t *avail, size_t maxavail) { return (regions_to_avail(avail, EXFLAG_NOALLOC, maxavail, NULL, NULL)); @@ -380,7 +374,7 @@ arm_physmem_avail(vm_paddr_t *avail, size_t maxavail) * last page of physical memory in the system. */ void -arm_physmem_init_kernel_globals(void) +physmem_init_kernel_globals(void) { size_t nextidx; @@ -403,4 +397,3 @@ DB_SHOW_COMMAND(physmem, db_show_physmem) } #endif /* DDB */ - Copied and modified: head/sys/sys/physmem.h (from r360081, head/sys/arm/include/physmem.h) ============================================================================== --- head/sys/arm/include/physmem.h Sat Apr 18 23:46:58 2020 (r360081, copy source) +++ head/sys/sys/physmem.h Sun Apr 19 00:12:30 2020 (r360082) @@ -28,15 +28,10 @@ * $FreeBSD$ */ -#ifndef _MACHINE_PHYSMEM_H_ -#define _MACHINE_PHYSMEM_H_ +#ifndef _SYS_PHYSMEM_H_ +#define _SYS_PHYSMEM_H_ /* - * The physical address at which the kernel was loaded. - */ -extern vm_paddr_t arm_physmem_kernaddr; - -/* * Routines to help configure physical ram. * * Multiple regions of contiguous physical ram can be added (in any order). @@ -46,7 +41,7 @@ extern vm_paddr_t arm_physmem_kernaddr; * * After all early kernel init is done and it's time to configure all * remainining non-excluded physical ram for use by other parts of the kernel, - * arm_physmem_init_kernel_globals() processes the hardware regions and + * physmem_init_kernel_globals() processes the hardware regions and * exclusion regions to generate the global dump_avail and phys_avail arrays * that communicate physical ram configuration to other parts of the kernel. */ @@ -54,11 +49,11 @@ extern vm_paddr_t arm_physmem_kernaddr; #define EXFLAG_NODUMP 0x01 #define EXFLAG_NOALLOC 0x02 -void arm_physmem_hardware_region(uint64_t pa, uint64_t sz); -void arm_physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t flags); -size_t arm_physmem_avail(vm_paddr_t *avail, size_t maxavail); -void arm_physmem_init_kernel_globals(void); -void arm_physmem_print_tables(void); +void physmem_hardware_region(uint64_t pa, uint64_t sz); +void physmem_exclude_region(vm_paddr_t pa, vm_size_t sz, uint32_t flags); +size_t physmem_avail(vm_paddr_t *avail, size_t maxavail); +void physmem_init_kernel_globals(void); +void physmem_print_tables(void); /* * Convenience routines for FDT. @@ -69,20 +64,20 @@ void arm_physmem_print_tables(void); #include static inline void -arm_physmem_hardware_regions(struct mem_region * mrptr, int mrcount) +physmem_hardware_regions(struct mem_region * mrptr, int mrcount) { while (mrcount--) { - arm_physmem_hardware_region(mrptr->mr_start, mrptr->mr_size); + physmem_hardware_region(mrptr->mr_start, mrptr->mr_size); ++mrptr; } } static inline void -arm_physmem_exclude_regions(struct mem_region * mrptr, int mrcount, +physmem_exclude_regions(struct mem_region * mrptr, int mrcount, uint32_t exflags) { while (mrcount--) { - arm_physmem_exclude_region(mrptr->mr_start, mrptr->mr_size, + physmem_exclude_region(mrptr->mr_start, mrptr->mr_size, exflags); ++mrptr; } @@ -90,5 +85,4 @@ arm_physmem_exclude_regions(struct mem_region * mrptr, #endif /* FDT */ -#endif - +#endif /* !_SYS_PHYSMEM_H_ */ From owner-svn-src-all@freebsd.org Sun Apr 19 00:18:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B04F2B1FDE; Sun, 19 Apr 2020 00:18:17 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494Vm90sTtz4992; Sun, 19 Apr 2020 00:18:17 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 145541CE35; Sun, 19 Apr 2020 00:18:17 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03J0IGOT066372; Sun, 19 Apr 2020 00:18:16 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03J0IGtr066369; Sun, 19 Apr 2020 00:18:16 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202004190018.03J0IGtr066369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 19 Apr 2020 00:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360083 - in head/sys: conf riscv/include riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: in head/sys: conf riscv/include riscv/riscv X-SVN-Commit-Revision: 360083 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 00:18:17 -0000 Author: mhorne Date: Sun Apr 19 00:18:16 2020 New Revision: 360083 URL: https://svnweb.freebsd.org/changeset/base/360083 Log: RISC-V: use physmem to manage physical memory Replace our hand-rolled functions with the generic ones provided by kern/subr_physmem.c. This greatly simplifies the initialization of physical memory regions and kernel globals. Tested by: nick Differential Revision: https://reviews.freebsd.org/D24154 Modified: head/sys/conf/files.riscv head/sys/riscv/include/machdep.h head/sys/riscv/riscv/machdep.c head/sys/riscv/riscv/pmap.c Modified: head/sys/conf/files.riscv ============================================================================== --- head/sys/conf/files.riscv Sun Apr 19 00:12:30 2020 (r360082) +++ head/sys/conf/files.riscv Sun Apr 19 00:18:16 2020 (r360083) @@ -20,6 +20,7 @@ kern/pic_if.m standard kern/subr_devmap.c standard kern/subr_dummy_vdso_tc.c standard kern/subr_intr.c standard +kern/subr_physmem.c standard libkern/bcmp.c standard libkern/bcopy.c standard libkern/ffs.c standard Modified: head/sys/riscv/include/machdep.h ============================================================================== --- head/sys/riscv/include/machdep.h Sun Apr 19 00:12:30 2020 (r360082) +++ head/sys/riscv/include/machdep.h Sun Apr 19 00:18:16 2020 (r360083) @@ -44,7 +44,7 @@ struct riscv_bootparams { vm_offset_t dtbp_virt; /* Device tree blob virtual addr */ }; -extern vm_paddr_t physmap[]; +extern vm_paddr_t physmap[PHYS_AVAIL_ENTRIES]; extern u_int physmap_idx; vm_offset_t fake_preload_metadata(struct riscv_bootparams *rbp); Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Sun Apr 19 00:12:30 2020 (r360082) +++ head/sys/riscv/riscv/machdep.c Sun Apr 19 00:18:16 2020 (r360083) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -108,8 +109,6 @@ static struct trapframe proc0_tf; int early_boot = 1; int cold = 1; -long realmem = 0; -long Maxmem = 0; #define DTB_SIZE_MAX (1024 * 1024) @@ -673,74 +672,6 @@ init_proc0(vm_offset_t kstack) pcpup->pc_curpcb = thread0.td_pcb; } -static int -add_physmap_entry(uint64_t base, uint64_t length, vm_paddr_t *physmap, - u_int *physmap_idxp) -{ - u_int i, insert_idx, _physmap_idx; - - _physmap_idx = *physmap_idxp; - - if (length == 0) - return (1); - - /* - * Find insertion point while checking for overlap. Start off by - * assuming the new entry will be added to the end. - */ - insert_idx = _physmap_idx; - for (i = 0; i <= _physmap_idx; i += 2) { - if (base < physmap[i + 1]) { - if (base + length <= physmap[i]) { - insert_idx = i; - break; - } - if (boothowto & RB_VERBOSE) - printf( - "Overlapping memory regions, ignoring second region\n"); - return (1); - } - } - - /* See if we can prepend to the next entry. */ - if (insert_idx <= _physmap_idx && - base + length == physmap[insert_idx]) { - physmap[insert_idx] = base; - return (1); - } - - /* See if we can append to the previous entry. */ - if (insert_idx > 0 && base == physmap[insert_idx - 1]) { - physmap[insert_idx - 1] += length; - return (1); - } - - _physmap_idx += 2; - *physmap_idxp = _physmap_idx; - if (_physmap_idx == PHYS_AVAIL_ENTRIES) { - printf( - "Too many segments in the physical address map, giving up\n"); - return (0); - } - - /* - * Move the last 'N' entries down to make room for the new - * entry if needed. - */ - for (i = _physmap_idx; i > insert_idx; i -= 2) { - physmap[i] = physmap[i - 2]; - physmap[i + 1] = physmap[i - 1]; - } - - /* Insert the new entry. */ - physmap[insert_idx] = base; - physmap[insert_idx + 1] = base + length; - - printf("physmap[%d] = 0x%016lx\n", insert_idx, base); - printf("physmap[%d] = 0x%016lx\n", insert_idx + 1, base + length); - return (1); -} - #ifdef FDT static void try_load_dtb(caddr_t kmdp) @@ -864,7 +795,6 @@ initriscv(struct riscv_bootparams *rvbp) vm_offset_t lastaddr; vm_size_t kernlen; caddr_t kmdp; - int i; TSRAW(&thread0, TS_ENTER, __func__, NULL); @@ -896,20 +826,12 @@ initriscv(struct riscv_bootparams *rvbp) #ifdef FDT try_load_dtb(kmdp); -#endif - /* Load the physical memory ranges */ - physmap_idx = 0; - -#ifdef FDT /* Grab physical memory regions information from device tree. */ - if (fdt_get_mem_regions(mem_regions, &mem_regions_sz, NULL) != 0) + if (fdt_get_mem_regions(mem_regions, &mem_regions_sz, NULL) != 0) { panic("Cannot get physical memory regions"); - - for (i = 0; i < mem_regions_sz; i++) { - add_physmap_entry(mem_regions[i].mr_start, - mem_regions[i].mr_size, physmap, &physmap_idx); } + physmem_hardware_regions(mem_regions, mem_regions_sz); #endif /* Do basic tuning, hz etc */ @@ -921,6 +843,8 @@ initriscv(struct riscv_bootparams *rvbp) kernlen = (lastaddr - KERNBASE); pmap_bootstrap(rvbp->kern_l1pt, mem_regions[0].mr_start, kernlen); + physmem_init_kernel_globals(); + /* Establish static device mappings */ devmap_bootstrap(0, NULL); @@ -932,6 +856,9 @@ initriscv(struct riscv_bootparams *rvbp) mutex_init(); init_param2(physmem); kdb_init(); + + if (boothowto & RB_VERBOSE) + physmem_print_tables(); early_boot = 0; Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Sun Apr 19 00:12:30 2020 (r360082) +++ head/sys/riscv/riscv/pmap.c Sun Apr 19 00:18:16 2020 (r360083) @@ -129,6 +129,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -554,10 +555,10 @@ pmap_bootstrap_l3(vm_offset_t l1pt, vm_offset_t va, vm void pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, vm_size_t kernlen) { - u_int l1_slot, l2_slot, avail_slot, map_slot; + u_int l1_slot, l2_slot; vm_offset_t freemempos; vm_offset_t dpcpu, msgbufpv; - vm_paddr_t end, max_pa, min_pa, pa, start; + vm_paddr_t max_pa, min_pa, pa; pt_entry_t *l2p; int i; @@ -576,6 +577,9 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, /* Assume the address we were loaded to is a valid physical address. */ min_pa = max_pa = kernstart; + physmap_idx = physmem_avail(physmap, nitems(physmap)); + physmap_idx /= 2; + /* * Find the minimum physical address. physmap is sorted, * but may contain empty ranges. @@ -641,46 +645,7 @@ pmap_bootstrap(vm_offset_t l1pt, vm_paddr_t kernstart, pa = pmap_early_vtophys(l1pt, freemempos); - /* 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]; - end = physmap[map_slot + 1]; - - if (start == end) - continue; - dump_avail[map_slot] = start; - dump_avail[map_slot + 1] = end; - realmem += atop((vm_offset_t)(end - start)); - - if (start >= kernstart && end <= pa) - continue; - - if (start < kernstart && end > kernstart) - end = kernstart; - else if (start < pa && end > pa) - start = pa; - phys_avail[avail_slot] = start; - phys_avail[avail_slot + 1] = end; - physmem += (end - start) >> PAGE_SHIFT; - avail_slot += 2; - - if (end != physmap[map_slot + 1] && end > pa) { - phys_avail[avail_slot] = pa; - phys_avail[avail_slot + 1] = physmap[map_slot + 1]; - physmem += (physmap[map_slot + 1] - pa) >> PAGE_SHIFT; - avail_slot += 2; - } - } - phys_avail[avail_slot] = 0; - phys_avail[avail_slot + 1] = 0; - - /* - * Maxmem isn't the "maximum memory", it's one larger than the - * highest page of the physical address space. It should be - * called something like "Maxphyspage". - */ - Maxmem = atop(phys_avail[avail_slot - 1]); + physmem_exclude_region(kernstart, pa - kernstart, EXFLAG_NOALLOC); } /* From owner-svn-src-all@freebsd.org Sun Apr 19 00:33:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D60A62B262D; Sun, 19 Apr 2020 00:33:05 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494W5F5P9cz4BkD; Sun, 19 Apr 2020 00:33:05 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B47361D1F9; Sun, 19 Apr 2020 00:33:05 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03J0X5hP078941; Sun, 19 Apr 2020 00:33:05 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03J0X5q0078940; Sun, 19 Apr 2020 00:33:05 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202004190033.03J0X5q0078940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 19 Apr 2020 00:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360084 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 360084 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 00:33:05 -0000 Author: mhorne Date: Sun Apr 19 00:33:05 2020 New Revision: 360084 URL: https://svnweb.freebsd.org/changeset/base/360084 Log: RISC-V: exclude reserved memory regions The device tree may contain a "reserved-memory" node, whose purpose is to communicate sections of physical memory that should not be used for general allocations. Add the logic to parse and exclude these regions. The particular motivation for this is protection of the SBI runtime firmware. Currently, there is no mechanism through which the SBI can communicate the details of its reserved memory region(s) to a supervisor payload. There has been some discussion recently on how this can be achieved [1], and it seems that the path going forward will be to add an entry to the reserved-memory node. This hasn't caused any issues for us yet, since we exclude all physical memory below the kernel's load address from being allocated, and on all currently supported platforms this covers the SBI firmware region. This will change in another commit, so as a safety measure, ensure that the lowest 2MB of memory is excluded if this region has not been reported. [1] https://github.com/riscv/riscv-sbi-doc/pull/37 Reviewed by: markj, nick (older version) Differential Revision: https://reviews.freebsd.org/D24155 Modified: head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Sun Apr 19 00:18:16 2020 (r360083) +++ head/sys/riscv/riscv/machdep.c Sun Apr 19 00:33:05 2020 (r360084) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -827,6 +828,15 @@ initriscv(struct riscv_bootparams *rvbp) #ifdef FDT try_load_dtb(kmdp); + /* + * Exclude reserved memory specified by the device tree. Typically, + * this contains an entry for memory used by the runtime SBI firmware. + */ + if (fdt_get_reserved_mem(mem_regions, &mem_regions_sz) == 0) { + physmem_exclude_regions(mem_regions, mem_regions_sz, + EXFLAG_NODUMP | EXFLAG_NOALLOC); + } + /* Grab physical memory regions information from device tree. */ if (fdt_get_mem_regions(mem_regions, &mem_regions_sz, NULL) != 0) { panic("Cannot get physical memory regions"); @@ -843,6 +853,21 @@ initriscv(struct riscv_bootparams *rvbp) kernlen = (lastaddr - KERNBASE); pmap_bootstrap(rvbp->kern_l1pt, mem_regions[0].mr_start, kernlen); +#ifdef FDT + /* + * XXX: Exclude the lowest 2MB of physical memory, if it hasn't been + * already, as this area is assumed to contain the SBI firmware. This + * is a little fragile, but it is consistent with the platforms we + * support so far. + * + * TODO: remove this when the all regular booting methods properly + * report their reserved memory in the device tree. + */ + if (mem_regions[0].mr_start == physmap[0]) { + physmem_exclude_region(mem_regions[0].mr_start, L2_SIZE, + EXFLAG_NODUMP | EXFLAG_NOALLOC); + } +#endif physmem_init_kernel_globals(); /* Establish static device mappings */ From owner-svn-src-all@freebsd.org Sun Apr 19 00:34:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D7F62B26CD; Sun, 19 Apr 2020 00:34:50 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494W7G0wxVz4Bv3; Sun, 19 Apr 2020 00:34:50 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B3061D205; Sun, 19 Apr 2020 00:34:50 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03J0YnXM079085; Sun, 19 Apr 2020 00:34:49 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03J0YnMJ079084; Sun, 19 Apr 2020 00:34:49 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202004190034.03J0YnMJ079084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 19 Apr 2020 00:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360085 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 360085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 00:34:50 -0000 Author: mhorne Date: Sun Apr 19 00:34:49 2020 New Revision: 360085 URL: https://svnweb.freebsd.org/changeset/base/360085 Log: RISC-V: provide the correct value for kernstart pmap_bootstrap() expects the kernel's physical load address, but we have been providing the start of physical memory. This had the nice effect of protecting the memory used by the SBI runtime firmware, but now that we have alternate means of achieving that, we should provide the correct value. This will free up any memory between the SBI firmware and the kernel for allocation. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D24156 Modified: head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/riscv/machdep.c ============================================================================== --- head/sys/riscv/riscv/machdep.c Sun Apr 19 00:33:05 2020 (r360084) +++ head/sys/riscv/riscv/machdep.c Sun Apr 19 00:34:49 2020 (r360085) @@ -851,7 +851,7 @@ initriscv(struct riscv_bootparams *rvbp) /* Bootstrap enough of pmap to enter the kernel proper */ kernlen = (lastaddr - KERNBASE); - pmap_bootstrap(rvbp->kern_l1pt, mem_regions[0].mr_start, kernlen); + pmap_bootstrap(rvbp->kern_l1pt, rvbp->kern_phys, kernlen); #ifdef FDT /* From owner-svn-src-all@freebsd.org Sun Apr 19 01:43:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AADBB2B5AE1; Sun, 19 Apr 2020 01:43:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494Xg345h0z4JyX; Sun, 19 Apr 2020 01:43:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87D341DFCC; Sun, 19 Apr 2020 01:43:59 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03J1hxLK023933; Sun, 19 Apr 2020 01:43:59 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03J1hxd8023932; Sun, 19 Apr 2020 01:43:59 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202004190143.03J1hxd8023932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 19 Apr 2020 01:43:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360086 - head/sbin/bectl X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/bectl X-SVN-Commit-Revision: 360086 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 01:43:59 -0000 Author: asomers Date: Sun Apr 19 01:43:59 2020 New Revision: 360086 URL: https://svnweb.freebsd.org/changeset/base/360086 Log: bectl.8: correctly sort SEE ALSO section after 360078 Reported by: yuripv MFC after: 2 weeks MFC with: 360078 Modified: head/sbin/bectl/bectl.8 Modified: head/sbin/bectl/bectl.8 ============================================================================== --- head/sbin/bectl/bectl.8 Sun Apr 19 00:34:49 2020 (r360085) +++ head/sbin/bectl/bectl.8 Sun Apr 19 01:43:59 2020 (r360086) @@ -343,8 +343,8 @@ is specified. To fill in with jail upgrade example when behavior is firm. .El .Sh SEE ALSO -.Xr beinstall.sh 8 , .Xr libbe 3 , +.Xr beinstall.sh 8 , .Xr jail 8 , .Xr zfs 8 , .Xr zpool 8 From owner-svn-src-all@freebsd.org Sun Apr 19 02:18:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F33D2B6BE7; Sun, 19 Apr 2020 02:18:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494YR51yRRz4M9N; Sun, 19 Apr 2020 02:18:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BF1E1E5DD; Sun, 19 Apr 2020 02:18:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03J2If6b042867; Sun, 19 Apr 2020 02:18:41 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03J2IedA042865; Sun, 19 Apr 2020 02:18:40 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202004190218.03J2IedA042865@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 19 Apr 2020 02:18:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360087 - in head: . lib/libbsm X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: . lib/libbsm X-SVN-Commit-Revision: 360087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 02:18:41 -0000 Author: asomers Date: Sun Apr 19 02:18:40 2020 New Revision: 360087 URL: https://svnweb.freebsd.org/changeset/base/360087 Log: libbsm: fix some MLINKS Add missing MLINKS entries for a few functions. Remove some old typo entries. Reported by: phk Reviewed by: cem MFC after: 2 weeks Modified: head/ObsoleteFiles.inc head/lib/libbsm/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Apr 19 01:43:59 2020 (r360086) +++ head/ObsoleteFiles.inc Sun Apr 19 02:18:40 2020 (r360087) @@ -36,6 +36,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20200418: Remove bogus man links +OLD_FILES+=usr/share/man/man3/getauusernam_R.3.gz +OLD_FILES+=usr/share/man/man3/getauclassnam_3.3.gz + # 20200401: Remove procfs-based process debugging OLD_FILES+=usr/include/sys/pioctl.h Modified: head/lib/libbsm/Makefile ============================================================================== --- head/lib/libbsm/Makefile Sun Apr 19 01:43:59 2020 (r360086) +++ head/lib/libbsm/Makefile Sun Apr 19 02:18:40 2020 (r360087) @@ -75,10 +75,11 @@ MAN+= audit.2 \ setauid.2 MLINKS= libbsm.3 bsm.3 \ + libbsm.3 au_fcntl_cmd_to_bsm.3 \ au_class.3 getauclassent.3 \ au_class.3 getauclassent_r.3 \ au_class.3 getauclassnam.3 \ - au_class.3 getauclassnam_3.3 \ + au_class.3 getauclassnam_r.3 \ au_class.3 setauclass.3 \ au_class.3 endauclass.3 \ au_control.3 setac.3 \ @@ -127,6 +128,7 @@ MLINKS= libbsm.3 bsm.3 \ au_token.3 au_to_arg32.3 \ au_token.3 au_to_arg64.3 \ au_token.3 au_to_arg.3 \ + au_token.3 au_to_attr32.3 \ au_token.3 au_to_attr64.3 \ au_token.3 au_to_data.3 \ au_token.3 au_to_exit.3 \ @@ -155,6 +157,7 @@ MLINKS= libbsm.3 bsm.3 \ au_token.3 au_to_sock_inet32.3 \ au_token.3 au_to_sock_inet128.3 \ au_token.3 au_to_sock_inet.3 \ + au_token.3 au_to_socket_ex.3 \ au_token.3 au_to_subject32.3 \ au_token.3 au_to_subject64.3 \ au_token.3 au_to_subject.3 \ @@ -166,6 +169,7 @@ MLINKS= libbsm.3 bsm.3 \ au_token.3 au_to_exec_env.3 \ au_token.3 au_to_header.3 \ au_token.3 au_to_header32.3 \ + au_token.3 au_to_header32_ex.3 \ au_token.3 au_to_header64.3 \ au_token.3 au_to_trailer.3 \ au_token.3 au_to_zonename.3 \ @@ -174,7 +178,7 @@ MLINKS= libbsm.3 bsm.3 \ au_user.3 getauuserent.3 \ au_user.3 getauuserent_r.3 \ au_user.3 getauusernam.3 \ - au_user.3 getauusernam_R.3 \ + au_user.3 getauusernam_r.3 \ au_user.3 au_user_mask.3 \ au_user.3 getfauditflags.3 \ getaudit.2 getaudit_addr.2 \ From owner-svn-src-all@freebsd.org Sun Apr 19 02:20:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 590612B6D3E; Sun, 19 Apr 2020 02:20:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494YTP1gRjz4MTx; Sun, 19 Apr 2020 02:20:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B8AC1E5EE; Sun, 19 Apr 2020 02:20:41 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03J2Kece043073; Sun, 19 Apr 2020 02:20:40 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03J2Kemi043069; Sun, 19 Apr 2020 02:20:40 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202004190220.03J2Kemi043069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 19 Apr 2020 02:20:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360088 - in head: . contrib/openbsm/bin/auditd lib/libauditd share/mk X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: . contrib/openbsm/bin/auditd lib/libauditd share/mk X-SVN-Commit-Revision: 360088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 02:20:41 -0000 Author: asomers Date: Sun Apr 19 02:20:39 2020 New Revision: 360088 URL: https://svnweb.freebsd.org/changeset/base/360088 Log: libauditd: make it a PRIVATELIB According to the upstream man page (which we don't install), none of libauditd's symbols are intended to be public. Also, I can't find any evidence for a port that uses libauditd. Therefore, we should treat it like other such libraries and use PRIVATELIB. Reported by: phk Reviewed by: cem, emaste MFC after: 2 weeks Modified: head/ObsoleteFiles.inc head/contrib/openbsm/bin/auditd/auditd.8 head/lib/libauditd/Makefile head/share/mk/src.libnames.mk Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Apr 19 02:18:40 2020 (r360087) +++ head/ObsoleteFiles.inc Sun Apr 19 02:20:39 2020 (r360088) @@ -36,6 +36,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20200418: Make libauditd private +OLD_FILES+=usr/lib/libauditd.a +OLD_FILES+=usr/lib/libauditd.so +OLD_LIBS+=usr/lib/libauditd.so.5 +OLD_FILES+=usr/lib/libauditd_p.a + # 20200418: Remove bogus man links OLD_FILES+=usr/share/man/man3/getauusernam_R.3.gz OLD_FILES+=usr/share/man/man3/getauclassnam_3.3.gz Modified: head/contrib/openbsm/bin/auditd/auditd.8 ============================================================================== --- head/contrib/openbsm/bin/auditd/auditd.8 Sun Apr 19 02:18:40 2020 (r360087) +++ head/contrib/openbsm/bin/auditd/auditd.8 Sun Apr 19 02:20:39 2020 (r360088) @@ -25,7 +25,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 July 25, 2015 +.Dd April 18, 2020 .Dt AUDITD 8 .Os .Sh NAME @@ -113,7 +113,6 @@ and are no longer available as arguments to .Nm . .Sh SEE ALSO .Xr asl 3 , -.Xr libauditd 3 , .Xr audit 4 , .Xr audit_class 5 , .Xr audit_control 5 , Modified: head/lib/libauditd/Makefile ============================================================================== --- head/lib/libauditd/Makefile Sun Apr 19 02:18:40 2020 (r360087) +++ head/lib/libauditd/Makefile Sun Apr 19 02:20:39 2020 (r360088) @@ -18,6 +18,7 @@ SRCS= auditd_lib.c CFLAGS+= -I${OPENBSMDIR} -I${_LIBBSMDIR} WARNS?= 3 +PRIVATELIB= true MAN= Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Sun Apr 19 02:18:40 2020 (r360087) +++ head/share/mk/src.libnames.mk Sun Apr 19 02:20:39 2020 (r360088) @@ -15,6 +15,7 @@ ____: _PRIVATELIBS= \ atf_c \ atf_cxx \ + auditd \ bsdstat \ devdctl \ event \ @@ -72,7 +73,6 @@ _LIBRARIES= \ alias \ archive \ asn1 \ - auditd \ avl \ be \ begemot \ From owner-svn-src-all@freebsd.org Sun Apr 19 02:25:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B46EF2B6FF5; Sun, 19 Apr 2020 02:25:57 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 494YbT3g6gz4Ms6; Sun, 19 Apr 2020 02:25:57 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 03J2Psv4057959; Sat, 18 Apr 2020 19:25:54 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 03J2PsJB057958; Sat, 18 Apr 2020 19:25:54 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202004190225.03J2PsJB057958@gndrsh.dnsmgr.net> Subject: Re: svn commit: r360077 - head/cddl/usr.sbin/zfsd In-Reply-To: <202004181947.03IJldpw085154@repo.freebsd.org> To: Alan Somers Date: Sat, 18 Apr 2020 19:25:54 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 494YbT3g6gz4Ms6 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 02:25:57 -0000 > Author: asomers > Date: Sat Apr 18 19:47:38 2020 > New Revision: 360077 > URL: https://svnweb.freebsd.org/changeset/base/360077 > > Log: > zfsd.8: fix orphan .Xr > > Though ZFS is a kernel module, it has no man page in section 4. Wouldn't of been better to create a section 4 man page for zfs, even if it was empty/TBD? > Reported by: phk > MFC after: 2 weeks > > Modified: > head/cddl/usr.sbin/zfsd/zfsd.8 > > Modified: head/cddl/usr.sbin/zfsd/zfsd.8 > ============================================================================== > --- head/cddl/usr.sbin/zfsd/zfsd.8 Sat Apr 18 18:25:30 2020 (r360076) > +++ head/cddl/usr.sbin/zfsd/zfsd.8 Sat Apr 18 19:47:38 2020 (r360077) > @@ -25,7 +25,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd May 26, 2016 > +.Dd April 18, 2020 > .Dt ZFSD 8 > .Os > .Sh NAME > @@ -96,8 +96,7 @@ If a leaf vdev generates more than 50 I/O errors in a > .Nm > will mark that vdev as > .Em FAULTED . > -.Xr zfs 4 > -will no longer issue any I/Os to it. > +ZFS will no longer issue any I/Os to it. > .Nm > will activate a hotspare if one is available. > .It Checksum errors > @@ -106,8 +105,7 @@ period, then > .Nm > will mark that vdev as > .Em DEGRADED . > -.Xr zfs 4 > -will still use it, but zfsd will activate a spare anyway. > +ZFS will still use it, but zfsd will activate a spare anyway. > .It Spare addition > If the system administrator adds a hotspare to a pool that is already degraded, > .Nm > @@ -138,7 +136,6 @@ then reads them back in when next it starts up. > .El > .Sh SEE ALSO > .Xr devctl 4 , > -.Xr zfs 4 , > .Xr zpool 8 > .Sh HISTORY > .Nm > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sun Apr 19 02:27:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0A762B7317; Sun, 19 Apr 2020 02:27:22 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f195.google.com (mail-oi1-f195.google.com [209.85.167.195]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494Yd64h7hz4N8r; Sun, 19 Apr 2020 02:27:22 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f195.google.com with SMTP id a2so1159046oia.11; Sat, 18 Apr 2020 19:27:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=USm+7iVm5CgRT2QmEktmis7bJObakMOL6LSrPlqzL/0=; b=TNjxDzuvbBQrltIRpe0XWsKBvdfijoirpJJVRfKc9mPf0J6q1N3KYSaXcIOrEOBZRh JXlAyTK0RV6ry+0DS7o8bkTeyEyY44LeRFr72mg9K0nPmk2ghs1OaCxjunO/ikg50GAv C3k/i+0skC5NwpcORgvw/jazI2jbiKCL3leGfF2eb0CeAIIkDE3WboBQUC9J/oGEvnsX KSFsXfKHo6DBf59q6VXeajZqWo0joj7g+nertKel4W6nuDrThCE94tM4+RsO0Jik/ouh BUXUNXCW0sF+TDMJ9lrrUGH5Xg80rUBIL0km50VdDDbI+6t1A24HOM2qQqe33vrqjn7j gN7Q== X-Gm-Message-State: AGi0PuZKE8L0DwjFOPK6f00Yj1PMWQNdCs/g7KhsiTezUD/rjgJyFCV0 L0BmwxBF3MXr5qxbPPHYPyOwYyp+dnP7o3ePOsJmn/f8 X-Google-Smtp-Source: APiQypLkEedX4nA24mJIIoYJNOPJ3/8dAKRDwcP+0iKHkY50TX6podgDLtiMYaV8T4YTV/YWT7Clm23CJodFbX+mAlc= X-Received: by 2002:a05:6808:651:: with SMTP id z17mr6869995oih.73.1587263241059; Sat, 18 Apr 2020 19:27:21 -0700 (PDT) MIME-Version: 1.0 References: <202004181947.03IJldpw085154@repo.freebsd.org> <202004190225.03J2PsJB057958@gndrsh.dnsmgr.net> In-Reply-To: <202004190225.03J2PsJB057958@gndrsh.dnsmgr.net> From: Alan Somers Date: Sat, 18 Apr 2020 20:27:09 -0600 Message-ID: Subject: Re: svn commit: r360077 - head/cddl/usr.sbin/zfsd To: "Rodney W. Grimes" Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 494Yd64h7hz4N8r X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 02:27:22 -0000 Definitely if there were some meaningful information in it. But an empty file? I'm not sure. I'm only sure that I can fix the bad .Xr faster by removing it. -Alan On Sat, Apr 18, 2020 at 8:25 PM Rodney W. Grimes wrote: > > Author: asomers > > Date: Sat Apr 18 19:47:38 2020 > > New Revision: 360077 > > URL: https://svnweb.freebsd.org/changeset/base/360077 > > > > Log: > > zfsd.8: fix orphan .Xr > > > > Though ZFS is a kernel module, it has no man page in section 4. > > Wouldn't of been better to create a section 4 man page for zfs, > even if it was empty/TBD? > > > Reported by: phk > > MFC after: 2 weeks > > > > Modified: > > head/cddl/usr.sbin/zfsd/zfsd.8 > > > > Modified: head/cddl/usr.sbin/zfsd/zfsd.8 > > > ============================================================================== > > --- head/cddl/usr.sbin/zfsd/zfsd.8 Sat Apr 18 18:25:30 2020 > (r360076) > > +++ head/cddl/usr.sbin/zfsd/zfsd.8 Sat Apr 18 19:47:38 2020 > (r360077) > > @@ -25,7 +25,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd May 26, 2016 > > +.Dd April 18, 2020 > > .Dt ZFSD 8 > > .Os > > .Sh NAME > > @@ -96,8 +96,7 @@ If a leaf vdev generates more than 50 I/O errors in a > > .Nm > > will mark that vdev as > > .Em FAULTED . > > -.Xr zfs 4 > > -will no longer issue any I/Os to it. > > +ZFS will no longer issue any I/Os to it. > > .Nm > > will activate a hotspare if one is available. > > .It Checksum errors > > @@ -106,8 +105,7 @@ period, then > > .Nm > > will mark that vdev as > > .Em DEGRADED . > > -.Xr zfs 4 > > -will still use it, but zfsd will activate a spare anyway. > > +ZFS will still use it, but zfsd will activate a spare anyway. > > .It Spare addition > > If the system administrator adds a hotspare to a pool that is already > degraded, > > .Nm > > @@ -138,7 +136,6 @@ then reads them back in when next it starts up. > > .El > > .Sh SEE ALSO > > .Xr devctl 4 , > > -.Xr zfs 4 , > > .Xr zpool 8 > > .Sh HISTORY > > .Nm > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-svn-src-all@freebsd.org Sun Apr 19 02:49:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 085A62B7C95; Sun, 19 Apr 2020 02:49:06 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494Z696WNbz4Pfk; Sun, 19 Apr 2020 02:49:05 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA7111EBC0; Sun, 19 Apr 2020 02:49:05 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03J2n5O8061669; Sun, 19 Apr 2020 02:49:05 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03J2n5vW061668; Sun, 19 Apr 2020 02:49:05 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202004190249.03J2n5vW061668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 19 Apr 2020 02:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360089 - stable/12/sys/dev/acpica X-SVN-Group: stable-12 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/12/sys/dev/acpica X-SVN-Commit-Revision: 360089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 02:49:06 -0000 Author: cperciva Date: Sun Apr 19 02:49:05 2020 New Revision: 360089 URL: https://svnweb.freebsd.org/changeset/base/360089 Log: MFC r360025: Alert devd when acpi_video brightness changes Modified: stable/12/sys/dev/acpica/acpi_video.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/acpica/acpi_video.c ============================================================================== --- stable/12/sys/dev/acpica/acpi_video.c Sun Apr 19 02:20:39 2020 (r360088) +++ stable/12/sys/dev/acpica/acpi_video.c Sun Apr 19 02:49:05 2020 (r360089) @@ -1034,6 +1034,7 @@ vo_get_brightness(ACPI_HANDLE handle) static void vo_set_brightness(ACPI_HANDLE handle, int level) { + char notify_buf[16]; ACPI_STATUS status; ACPI_SERIAL_ASSERT(video_output); @@ -1041,6 +1042,8 @@ vo_set_brightness(ACPI_HANDLE handle, int level) if (ACPI_FAILURE(status)) printf("can't evaluate %s._BCM - %s\n", acpi_name(handle), AcpiFormatException(status)); + snprintf(notify_buf, sizeof(notify_buf), "notify=%d", level); + devctl_notify("ACPI", "Video", "brightness", notify_buf); } static UINT32 From owner-svn-src-all@freebsd.org Sun Apr 19 07:27:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 596362BCAAD; Sun, 19 Apr 2020 07:27:13 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494hH51Slmz3Gl5; Sun, 19 Apr 2020 07:27:13 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 290FA22180; Sun, 19 Apr 2020 07:27:13 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03J7RDeq038739; Sun, 19 Apr 2020 07:27:13 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03J7RDPC038738; Sun, 19 Apr 2020 07:27:13 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202004190727.03J7RDPC038738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 19 Apr 2020 07:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360090 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 360090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 07:27:13 -0000 Author: melifaro Date: Sun Apr 19 07:27:12 2020 New Revision: 360090 URL: https://svnweb.freebsd.org/changeset/base/360090 Log: Fix lookup key generation in fib6_check_urpf(). The version introduced in r359823 assumed D23051 had been in tree already. As this is not the case yet, revert to sockaddr. Modified: head/sys/netinet6/in6_fib.c Modified: head/sys/netinet6/in6_fib.c ============================================================================== --- head/sys/netinet6/in6_fib.c Sun Apr 19 02:49:05 2020 (r360089) +++ head/sys/netinet6/in6_fib.c Sun Apr 19 07:27:12 2020 (r360090) @@ -362,7 +362,7 @@ fib6_check_urpf(uint32_t fibnum, const struct in6_addr struct rib_head *rh; struct radix_node *rn; struct rtentry *rt; - struct in6_addr addr; + struct sockaddr_in6 sin6; int ret; KASSERT((fibnum < rt_numfibs), ("fib6_check_urpf: bad fibnum")); @@ -370,13 +370,18 @@ fib6_check_urpf(uint32_t fibnum, const struct in6_addr if (rh == NULL) return (0); - addr = *dst6; + /* TODO: radix changes */ + /* Prepare lookup key */ + memset(&sin6, 0, sizeof(sin6)); + sin6.sin6_len = sizeof(struct sockaddr_in6); + sin6.sin6_addr = *dst6; + /* Assume scopeid is valid and embed it directly */ if (IN6_IS_SCOPE_LINKLOCAL(dst6)) - addr.s6_addr16[1] = htons(scopeid & 0xffff); + sin6.sin6_addr.s6_addr16[1] = htons(scopeid & 0xffff); RIB_RLOCK(rh); - rn = rh->rnh_matchaddr((void *)&addr, &rh->head); + rn = rh->rnh_matchaddr((void *)&sin6, &rh->head); if (rn != NULL && ((rn->rn_flags & RNF_ROOT) == 0)) { rt = RNTORT(rn); #ifdef RADIX_MPATH From owner-svn-src-all@freebsd.org Sun Apr 19 09:29:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98DC72BFD19; Sun, 19 Apr 2020 09:29:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494kzf3ZB3z3wkc; Sun, 19 Apr 2020 09:29:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 758312387F; Sun, 19 Apr 2020 09:29:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03J9T2k3014792; Sun, 19 Apr 2020 09:29:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03J9T0Pb014775; Sun, 19 Apr 2020 09:29:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202004190929.03J9T0Pb014775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 19 Apr 2020 09:29:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360091 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv X-SVN-Commit-Revision: 360091 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 09:29:02 -0000 Author: kib Date: Sun Apr 19 09:28:59 2020 New Revision: 360091 URL: https://svnweb.freebsd.org/changeset/base/360091 Log: Align initial-exec TLS segments to the p_vaddr % align. This is continuation of D21163/r359634, which handled the alignment for global mode. Non-x86 arches are not handled, maintainers are welcomed. Tested by: emaste Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D24366 Modified: head/libexec/rtld-elf/aarch64/rtld_machdep.h head/libexec/rtld-elf/amd64/reloc.c head/libexec/rtld-elf/amd64/rtld_machdep.h head/libexec/rtld-elf/arm/rtld_machdep.h head/libexec/rtld-elf/i386/reloc.c head/libexec/rtld-elf/i386/rtld_machdep.h head/libexec/rtld-elf/mips/rtld_machdep.h head/libexec/rtld-elf/powerpc/rtld_machdep.h head/libexec/rtld-elf/powerpc64/rtld_machdep.h head/libexec/rtld-elf/riscv/rtld_machdep.h head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/aarch64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/aarch64/rtld_machdep.h Sun Apr 19 07:27:12 2020 (r360090) +++ head/libexec/rtld-elf/aarch64/rtld_machdep.h Sun Apr 19 09:28:59 2020 (r360091) @@ -72,9 +72,9 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr targe #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) -#define calculate_first_tls_offset(size, align) \ +#define calculate_first_tls_offset(size, align, offset) \ round(16, align) -#define calculate_tls_offset(prev_offset, prev_size, size, align) \ +#define calculate_tls_offset(prev_offset, prev_size, size, align, offset) \ round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size)) #define calculate_tls_post_size(align) \ Modified: head/libexec/rtld-elf/amd64/reloc.c ============================================================================== --- head/libexec/rtld-elf/amd64/reloc.c Sun Apr 19 07:27:12 2020 (r360090) +++ head/libexec/rtld-elf/amd64/reloc.c Sun Apr 19 09:28:59 2020 (r360091) @@ -552,3 +552,33 @@ void *__tls_get_addr(tls_index *ti) return tls_get_addr_common(&segbase[1], ti->ti_module, ti->ti_offset); } + +size_t +calculate_first_tls_offset(size_t size, size_t align, size_t offset) +{ + size_t res; + + res = roundup(size, align); + offset &= align - 1; + if (offset != 0) + res += align - offset; + return (res); +} + +size_t +calculate_tls_offset(size_t prev_offset, size_t prev_size __unused, size_t size, + size_t align, size_t offset) +{ + size_t res; + + res = roundup(prev_offset + size, align); + offset &= align - 1; + if (offset != 0) + res += align - offset; + return (res); +} +size_t +calculate_tls_end(size_t off, size_t size __unused) +{ + return (off); +} Modified: head/libexec/rtld-elf/amd64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/amd64/rtld_machdep.h Sun Apr 19 07:27:12 2020 (r360090) +++ head/libexec/rtld-elf/amd64/rtld_machdep.h Sun Apr 19 09:28:59 2020 (r360091) @@ -61,14 +61,6 @@ extern uint32_t cpu_stdext_feature2; (((Elf_Addr (*)(uint32_t, uint32_t, uint32_t, uint32_t))ptr)( \ cpu_feature, cpu_feature2, cpu_stdext_feature, cpu_stdext_feature2)) -#define round(size, align) \ - (((size) + (align) - 1) & ~((align) - 1)) -#define calculate_first_tls_offset(size, align) \ - round(size, align) -#define calculate_tls_offset(prev_offset, prev_size, size, align) \ - round((prev_offset) + (size), align) -#define calculate_tls_end(off, size) (off) - typedef struct { unsigned long ti_module; unsigned long ti_offset; @@ -81,4 +73,8 @@ void *__tls_get_addr(tls_index *ti) __exported; #define md_abi_variant_hook(x) +size_t calculate_first_tls_offset(size_t size, size_t align, size_t offset); +size_t calculate_tls_offset(size_t prev_offset, size_t prev_size, size_t size, + size_t align, size_t offset); +size_t calculate_tls_end(size_t off, size_t size); #endif Modified: head/libexec/rtld-elf/arm/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/arm/rtld_machdep.h Sun Apr 19 07:27:12 2020 (r360090) +++ head/libexec/rtld-elf/arm/rtld_machdep.h Sun Apr 19 09:28:59 2020 (r360091) @@ -64,9 +64,9 @@ typedef struct { #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) -#define calculate_first_tls_offset(size, align) \ +#define calculate_first_tls_offset(size, align, offset) \ round(8, align) -#define calculate_tls_offset(prev_offset, prev_size, size, align) \ +#define calculate_tls_offset(prev_offset, prev_size, size, align, offset) \ round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size)) #define calculate_tls_post_size(align) \ Modified: head/libexec/rtld-elf/i386/reloc.c ============================================================================== --- head/libexec/rtld-elf/i386/reloc.c Sun Apr 19 07:27:12 2020 (r360090) +++ head/libexec/rtld-elf/i386/reloc.c Sun Apr 19 09:28:59 2020 (r360091) @@ -543,3 +543,33 @@ void *__tls_get_addr(tls_index *ti) return tls_get_addr_common(&segbase[1], ti->ti_module, ti->ti_offset); } + +size_t +calculate_first_tls_offset(size_t size, size_t align, size_t offset) +{ + size_t res; + + res = roundup(size, align); + offset &= align - 1; + if (offset != 0) + res += align - offset; + return (res); +} + +size_t +calculate_tls_offset(size_t prev_offset, size_t prev_size __unused, size_t size, + size_t align, size_t offset) +{ + size_t res; + + res = roundup(prev_offset + size, align); + offset &= align - 1; + if (offset != 0) + res += align - offset; + return (res); +} +size_t +calculate_tls_end(size_t off, size_t size __unused) +{ + return (off); +} Modified: head/libexec/rtld-elf/i386/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/i386/rtld_machdep.h Sun Apr 19 07:27:12 2020 (r360090) +++ head/libexec/rtld-elf/i386/rtld_machdep.h Sun Apr 19 09:28:59 2020 (r360091) @@ -61,14 +61,6 @@ extern uint32_t cpu_stdext_feature2; (((Elf_Addr (*)(uint32_t, uint32_t, uint32_t, uint32_t))(ptr))( \ cpu_feature, cpu_feature2, cpu_stdext_feature, cpu_stdext_feature2)) -#define round(size, align) \ - (((size) + (align) - 1) & ~((align) - 1)) -#define calculate_first_tls_offset(size, align) \ - round(size, align) -#define calculate_tls_offset(prev_offset, prev_size, size, align) \ - round((prev_offset) + (size), align) -#define calculate_tls_end(off, size) (off) - typedef struct { unsigned long ti_module; unsigned long ti_offset; @@ -82,4 +74,8 @@ void *__tls_get_addr(tls_index *ti) __exported; #define md_abi_variant_hook(x) +size_t calculate_first_tls_offset(size_t size, size_t align, size_t offset); +size_t calculate_tls_offset(size_t prev_offset, size_t prev_size, size_t size, + size_t align, size_t offset); +size_t calculate_tls_end(size_t off, size_t size); #endif Modified: head/libexec/rtld-elf/mips/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/mips/rtld_machdep.h Sun Apr 19 07:27:12 2020 (r360090) +++ head/libexec/rtld-elf/mips/rtld_machdep.h Sun Apr 19 09:28:59 2020 (r360091) @@ -66,9 +66,9 @@ typedef struct { #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) -#define calculate_first_tls_offset(size, align) \ +#define calculate_first_tls_offset(size, align, offset) \ TLS_TCB_SIZE -#define calculate_tls_offset(prev_offset, prev_size, size, align) \ +#define calculate_tls_offset(prev_offset, prev_size, size, align, offset) \ round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size)) #define calculate_tls_post_size(align) 0 Modified: head/libexec/rtld-elf/powerpc/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/powerpc/rtld_machdep.h Sun Apr 19 07:27:12 2020 (r360090) +++ head/libexec/rtld-elf/powerpc/rtld_machdep.h Sun Apr 19 09:28:59 2020 (r360091) @@ -79,9 +79,9 @@ void _rtld_powerpc_pltcall(void); #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) -#define calculate_first_tls_offset(size, align) \ +#define calculate_first_tls_offset(size, align, offset) \ TLS_TCB_SIZE -#define calculate_tls_offset(prev_offset, prev_size, size, align) \ +#define calculate_tls_offset(prev_offset, prev_size, size, align, offset) \ round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size)) #define calculate_tls_post_size(align) 0 Modified: head/libexec/rtld-elf/powerpc64/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/powerpc64/rtld_machdep.h Sun Apr 19 07:27:12 2020 (r360090) +++ head/libexec/rtld-elf/powerpc64/rtld_machdep.h Sun Apr 19 09:28:59 2020 (r360091) @@ -71,9 +71,9 @@ extern u_long cpu_features2; /* r4 */ #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) -#define calculate_first_tls_offset(size, align) \ +#define calculate_first_tls_offset(size, align, offset) \ TLS_TCB_SIZE -#define calculate_tls_offset(prev_offset, prev_size, size, align) \ +#define calculate_tls_offset(prev_offset, prev_size, size, align, offset) \ round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size)) #define calculate_tls_post_size(align) 0 Modified: head/libexec/rtld-elf/riscv/rtld_machdep.h ============================================================================== --- head/libexec/rtld-elf/riscv/rtld_machdep.h Sun Apr 19 07:27:12 2020 (r360090) +++ head/libexec/rtld-elf/riscv/rtld_machdep.h Sun Apr 19 09:28:59 2020 (r360091) @@ -88,9 +88,9 @@ Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr targe #define round(size, align) \ (((size) + (align) - 1) & ~((align) - 1)) -#define calculate_first_tls_offset(size, align) \ +#define calculate_first_tls_offset(size, align, offset) \ TLS_TCB_SIZE -#define calculate_tls_offset(prev_offset, prev_size, size, align) \ +#define calculate_tls_offset(prev_offset, prev_size, size, align, offset) \ round(prev_offset + prev_size, align) #define calculate_tls_end(off, size) ((off) + (size)) #define calculate_tls_post_size(align) 0 Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Sun Apr 19 07:27:12 2020 (r360090) +++ head/libexec/rtld-elf/rtld.c Sun Apr 19 09:28:59 2020 (r360091) @@ -4979,13 +4979,13 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcb ralign = tcbalign; if (tls_static_max_align > ralign) ralign = tls_static_max_align; - size = round(tls_static_space, ralign) + round(tcbsize, ralign); + size = roundup(tls_static_space, ralign) + roundup(tcbsize, ralign); assert(tcbsize >= 2*sizeof(Elf_Addr)); tls = malloc_aligned(size, ralign, 0 /* XXX */); dtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); - segbase = (Elf_Addr)(tls + round(tls_static_space, ralign)); + segbase = (Elf_Addr)(tls + roundup(tls_static_space, ralign)); ((Elf_Addr*)segbase)[0] = segbase; ((Elf_Addr*)segbase)[1] = (Elf_Addr) dtv; @@ -5051,7 +5051,7 @@ free_tls(void *tls, size_t tcbsize __unused, size_t t ralign = tcbalign; if (tls_static_max_align > ralign) ralign = tls_static_max_align; - size = round(tls_static_space, ralign); + size = roundup(tls_static_space, ralign); dtv = ((Elf_Addr**)tls)[1]; dtvsize = dtv[1]; @@ -5109,10 +5109,11 @@ allocate_tls_offset(Obj_Entry *obj) } if (tls_last_offset == 0) - off = calculate_first_tls_offset(obj->tlssize, obj->tlsalign); + off = calculate_first_tls_offset(obj->tlssize, obj->tlsalign, + obj->tlspoffset); else off = calculate_tls_offset(tls_last_offset, tls_last_size, - obj->tlssize, obj->tlsalign); + obj->tlssize, obj->tlsalign, obj->tlspoffset); /* * If we have already fixed the size of the static TLS block, we From owner-svn-src-all@freebsd.org Sun Apr 19 10:24:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E1FA2C136C; Sun, 19 Apr 2020 10:24:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494mCM6Tlvz41m9; Sun, 19 Apr 2020 10:24:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D5DE52445A; Sun, 19 Apr 2020 10:24:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JAOFj6053230; Sun, 19 Apr 2020 10:24:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JAOFFT053228; Sun, 19 Apr 2020 10:24:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004191024.03JAOFFT053228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 19 Apr 2020 10:24:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360092 - in head: sys/netgraph/bluetooth/hci usr.sbin/bluetooth/hccontrol X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head: sys/netgraph/bluetooth/hci usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 360092 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 10:24:16 -0000 Author: hselasky Date: Sun Apr 19 10:24:15 2020 New Revision: 360092 URL: https://svnweb.freebsd.org/changeset/base/360092 Log: Bring HCI error messages up-to-date. See Bluetooth v5.6 core specification Vol.1 Part F: Controller error codes. Submitted by: Marc Veldman PR: 245737 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/netgraph/bluetooth/hci/ng_hci_misc.c head/usr.sbin/bluetooth/hccontrol/util.c Modified: head/sys/netgraph/bluetooth/hci/ng_hci_misc.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_misc.c Sun Apr 19 09:28:59 2020 (r360091) +++ head/sys/netgraph/bluetooth/hci/ng_hci_misc.c Sun Apr 19 10:24:15 2020 (r360092) @@ -491,7 +491,35 @@ ng_hci_str_error(u_int16_t code) /* 0x26 */ "Unit key used", /* 0x27 */ "QoS is not supported", /* 0x28 */ "Instant passed", - /* 0x29 */ "Paring with unit key not supported", + /* 0x29 */ "Pairing with unit key not supported", + /* 0x2a */ "Different Transaction Collision", + /* 0x2b */ "Unknown error (Reserved for future use)", + /* 0x2c */ "QoS Unacceptable Parameter", + /* 0x2d */ "QoS Rejected", + /* 0x2e */ "Channel Classification Not Supported", + /* 0x2f */ "Insufficient Security", + /* 0x30 */ "Parameter Out Of Mandatory Range", + /* 0x31 */ "Unknown error (Reserved for future use)", + /* 0x32 */ "Role Switch Pending", + /* 0x33 */ "Unknown error (Reserved for future use)", + /* 0x34 */ "Reserved Slot Violation", + /* 0x35 */ "Role Switch Failed", + /* 0x36 */ "Extended Inquiry Response Too Large", + /* 0x37 */ "Secure Simple Pairing Not Supported By Host", + /* 0x38 */ "Host Busy - Pairing", + /* 0x39 */ "Connection Rejected due to No Suitable Channel Found", + /* 0x3a */ "Controller Busy", + /* 0x3b */ "Unacceptable Connection Parameters", + /* 0x3c */ "Advertising Timeout", + /* 0x3d */ "Connection Terminated due to MIC Failure", + /* 0x3e */ "Connection Failed to be Established / Synchronization Timeout", + /* 0x3f */ "MAC Connection Failed", + /* 0x40 */ "Coarse Clock Adjustment Rejected but Will Try to Adjust Using Clock Dragging", + /* 0x41 */ "Type0 Submap Not Defined", + /* 0x42 */ "Unknown Advertising Identifier", + /* 0x43 */ "Limit Reached", + /* 0x44 */ "Operation Cancelled by Host", + /* 0x45 */ "Packet Too Long", /* SHOULD ALWAYS BE LAST */ "Unknown error" }; Modified: head/usr.sbin/bluetooth/hccontrol/util.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/util.c Sun Apr 19 09:28:59 2020 (r360091) +++ head/usr.sbin/bluetooth/hccontrol/util.c Sun Apr 19 10:24:15 2020 (r360092) @@ -439,7 +439,35 @@ hci_status2str(int status) /* 0x26 */ "Unit key used", /* 0x27 */ "QoS is not supported", /* 0x28 */ "Instant passed", - /* 0x29 */ "Pairing with unit key not supported" + /* 0x29 */ "Pairing with unit key not supported", + /* 0x2a */ "Different Transaction Collision", + /* 0x2b */ "Unknown error (Reserved for future use)", + /* 0x2c */ "QoS Unacceptable Parameter", + /* 0x2d */ "QoS Rejected", + /* 0x2e */ "Channel Classification Not Supported", + /* 0x2f */ "Insufficient Security", + /* 0x30 */ "Parameter Out Of Mandatory Range", + /* 0x31 */ "Unknown error (Reserved for future use)", + /* 0x32 */ "Role Switch Pending", + /* 0x33 */ "Unknown error (Reserved for future use)", + /* 0x34 */ "Reserved Slot Violation", + /* 0x35 */ "Role Switch Failed", + /* 0x36 */ "Extended Inquiry Response Too Large", + /* 0x37 */ "Secure Simple Pairing Not Supported By Host", + /* 0x38 */ "Host Busy - Pairing", + /* 0x39 */ "Connection Rejected due to No Suitable Channel Found", + /* 0x3a */ "Controller Busy", + /* 0x3b */ "Unacceptable Connection Parameters", + /* 0x3c */ "Advertising Timeout", + /* 0x3d */ "Connection Terminated due to MIC Failure", + /* 0x3e */ "Connection Failed to be Established / Synchronization Timeout", + /* 0x3f */ "MAC Connection Failed", + /* 0x40 */ "Coarse Clock Adjustment Rejected but Will Try to Adjust Using Clock Dragging", + /* 0x41 */ "Type0 Submap Not Defined", + /* 0x42 */ "Unknown Advertising Identifier", + /* 0x43 */ "Limit Reached", + /* 0x44 */ "Operation Cancelled by Host", + /* 0x45 */ "Packet Too Long" }; return (status >= SIZE(t)? "Unknown error" : t[status]); From owner-svn-src-all@freebsd.org Sun Apr 19 10:36:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8A262C16E4; Sun, 19 Apr 2020 10:36:23 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494mTL4S0Tz42X4; Sun, 19 Apr 2020 10:36:22 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-wm1-f45.google.com with SMTP id x25so7587340wmc.0; Sun, 19 Apr 2020 03:36:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=8+DHfK80X8LHa/B+lHPe3jmqUJf9XaX8OtxTQAtqfiA=; b=i2yAl7b6WhLTcli8sU6n61cGRieuotOdXfwGcJUvv7F6eVBF0LkLe/7HstkHpBysw5 FSmfk+WZAA/pfA+T45hSlScvPWCbXwv8UCsV+p4gnRao4c+B6x/J3p8A+FSD+wnRz6tZ GGFL6V6o40HJlIVyIVvsULRib1rUMvRe8uN04iqjCJ62mOvGEAut/TQjhkNI7HQXqzNE 3OYR5xV3ekmt1UYLaQZm3kSHNuyXqBIhHnRfN49Dvg8S7RwxcxOr7EYzii4DpcgokKfm yTegb/U9//Th301xvPwszAIX9PKoOC3VAArYSCyQHPUNJaD5pUJM9GlJdy///S6l0LPv eJFA== X-Gm-Message-State: AGi0Pub5pDXj7ZsjCZWh1iT6W63ZYn6hvaNO6lbtJXFmwYDuK/S9kFFu AZtzuNQnue4vH2234X49UlDhg5ZNB1k= X-Google-Smtp-Source: APiQypIOSUCzAuUAGHFbNqCS6zvOb4VYAsaesgQCyLUIx2yynMnSdW1EqUX1y2hgmukj104Evn+XlQ== X-Received: by 2002:a1c:a549:: with SMTP id o70mr2650102wme.179.1587292580741; Sun, 19 Apr 2020 03:36:20 -0700 (PDT) Received: from ?IPv6:2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8? ([2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id s24sm15593913wmj.28.2020.04.19.03.36.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Apr 2020 03:36:20 -0700 (PDT) Subject: Re: svn commit: r360078 - in head: sbin/bectl share/man/man8 To: Yuri Pankov , Alan Somers , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202004181953.03IJrlA0090967@repo.freebsd.org> <530b4960-9735-15da-84b4-2fdda9930fc6@fastmail.com> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: <35522470-1b08-0eaa-e12e-d0cbd6b652e9@FreeBSD.org> Date: Sun, 19 Apr 2020 12:36:38 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <530b4960-9735-15da-84b4-2fdda9930fc6@fastmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 494mTL4S0Tz42X4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.128.45 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-2.50 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[FreeBSD.org]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[45.128.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; IP_SCORE(-0.50)[ip: (-1.65), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; FREEMAIL_TO(0.00)[fastmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[45.128.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 10:36:23 -0000 On 4/18/20 11:11 PM, Yuri Pankov wrote: > We don't have the man style guide (that I know of, at least) We have style.mdoc(5)! From owner-svn-src-all@freebsd.org Sun Apr 19 10:50:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F1732C1B1B; Sun, 19 Apr 2020 10:50:30 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494mnf3mfXz43MR; Sun, 19 Apr 2020 10:50:30 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C86324853; Sun, 19 Apr 2020 10:50:30 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JAoUOF066270; Sun, 19 Apr 2020 10:50:30 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JAoTw2066267; Sun, 19 Apr 2020 10:50:29 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202004191050.03JAoTw2066267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 19 Apr 2020 10:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360093 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 360093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 10:50:30 -0000 Author: manu Date: Sun Apr 19 10:50:29 2020 New Revision: 360093 URL: https://svnweb.freebsd.org/changeset/base/360093 Log: release: arm64: Remove DTSO for Allwinner boards Both SID and THS dts node are now in the main dts and the DTSO have been removed in r359935 MFC after: 2 month X-MFC-With: r359935 Modified: head/release/arm64/PINE64-LTS.conf head/release/arm64/PINE64.conf head/release/arm64/PINEBOOK.conf Modified: head/release/arm64/PINE64-LTS.conf ============================================================================== --- head/release/arm64/PINE64-LTS.conf Sun Apr 19 10:24:15 2020 (r360092) +++ head/release/arm64/PINE64-LTS.conf Sun Apr 19 10:50:29 2020 (r360093) @@ -14,7 +14,7 @@ KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 PART_SCHEME="MBR" -FDT_OVERLAYS="sun50i-a64-sid,sun50i-a64-ths,sun50i-a64-timer,sun50i-a64-opp" +FDT_OVERLAYS="sun50i-a64-timer,sun50i-a64-opp" export BOARDNAME="PINE64-LTS" arm_install_uboot() { Modified: head/release/arm64/PINE64.conf ============================================================================== --- head/release/arm64/PINE64.conf Sun Apr 19 10:24:15 2020 (r360092) +++ head/release/arm64/PINE64.conf Sun Apr 19 10:50:29 2020 (r360093) @@ -14,7 +14,7 @@ KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 PART_SCHEME="MBR" -FDT_OVERLAYS="sun50i-a64-sid,sun50i-a64-ths,sun50i-a64-timer,sun50i-a64-opp" +FDT_OVERLAYS="sun50i-a64-timer,sun50i-a64-opp" export BOARDNAME="PINE64" arm_install_uboot() { Modified: head/release/arm64/PINEBOOK.conf ============================================================================== --- head/release/arm64/PINEBOOK.conf Sun Apr 19 10:24:15 2020 (r360092) +++ head/release/arm64/PINEBOOK.conf Sun Apr 19 10:50:29 2020 (r360093) @@ -14,7 +14,7 @@ KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 PART_SCHEME="MBR" -FDT_OVERLAYS="sun50i-a64-sid,sun50i-a64-ths,sun50i-a64-timer,sun50i-a64-opp" +FDT_OVERLAYS="sun50i-a64-timer,sun50i-a64-opp" export BOARDNAME="PINEBOOK" arm_install_uboot() { From owner-svn-src-all@freebsd.org Sun Apr 19 11:10:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F3EC2C21A5; Sun, 19 Apr 2020 11:10:19 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 494nDW2sVTz44hK; Sun, 19 Apr 2020 11:10:18 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id B9D86716; Sun, 19 Apr 2020 07:10:16 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 19 Apr 2020 07:10:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=W WIu/fU98QvTNTS/NTCHmq35WiYu9iJtya0DeF6K0Sc=; b=ebEX9jSVE5l8E4aOL ccOtc3vFJKXWmrYaL6LT5ICCVzulyM2yLOFa1JzUsg5cggXtNNTSxDbwZ8FirvlD ziar13LDRif0uXyyQy1R3e7INvY03jp11TsasU9ND6NFXgNuiX2lZE8R52/dC6zx zyPoFvyVOHFUevcVckkVoXss8Zx2PrsVc02YR+SeJ7rUppSx3XHoCRR7Ssms99ha 5j3/3bJAvIVZO6l6WO9oAUbWf8n/clQXYOw/Z+nXaMLs3SrpjtYVCYF2nVQCJj9H +BP8/gWUzgLDnqPlbsQE125yWOOdMR9rogS5JHng457Gu4NMNRFyPlrMjnF9I/GO CGmnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=WWIu/fU98QvTNTS/NTCHmq35WiYu9iJtya0DeF6K0 Sc=; b=EAw0nHIdbLNiQtDownG090O3pe1hndVggoYsXZeFI6eqI+SSW6Wu8ox8v 6ehPyINViD5EMcCFYEprSGMJ/aUydnCn2L3uuQmgEglk/HX94sDwW64X0ggrnHCj csPnssRT/r8EJyZhTh5Vz7E4R2TkxV2PfwA7PhW4kZbPBQ59Z8Lx1MwrN+WVjrsk 5HfX2k8PboRUfbrdRsMBHNrj9SyQLjJOeRPoNmI0weI1gPxyg7hMRHuqZRVd2Y7j 3YAz0kO5a5rxCecl0/6IGZ4/xFKV2jD91we7GmzLmXmBNynD0TpXVUBkEZxjk5Rl XaZ1oCUHvglSFk3ypknKbX7OrgOqw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgedugdefjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuf horhhtvgguuchrvggtihhpshculdegtddmnecujfgurhepuffvfhfhkffffgggjggtgfes thejredttdefjeenucfhrhhomhepjghurhhiucfrrghnkhhovhcuoeihphgrnhhkohhvse hfrghsthhmrghilhdrtghomheqnecukfhppeekhedrudejhedrudefledrvdehudenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeihphgrnhhkoh hvsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Received: from [192.168.1.6] (unknown [85.175.139.251]) by mail.messagingengine.com (Postfix) with ESMTPA id EB2283061389; Sun, 19 Apr 2020 07:10:14 -0400 (EDT) Subject: Re: svn commit: r360078 - in head: sbin/bectl share/man/man8 To: Mateusz Piotrowski <0mp@FreeBSD.org>, Alan Somers , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202004181953.03IJrlA0090967@repo.freebsd.org> <530b4960-9735-15da-84b4-2fdda9930fc6@fastmail.com> <35522470-1b08-0eaa-e12e-d0cbd6b652e9@FreeBSD.org> From: Yuri Pankov Message-ID: <41db1308-4ae0-2ea5-711e-b2e1fcb623a5@fastmail.com> Date: Sun, 19 Apr 2020 14:10:13 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <35522470-1b08-0eaa-e12e-d0cbd6b652e9@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 494nDW2sVTz44hK X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 11:10:19 -0000 Mateusz Piotrowski wrote: > On 4/18/20 11:11 PM, Yuri Pankov wrote: >> We don't have the man style guide (that I know of, at least) > We have style.mdoc(5)! Now I know, thanks. May be it would make sense to reference it from style(9) as it's where I was looking, and SEE ALSO already lists style.Makefile and style.lua? From owner-svn-src-all@freebsd.org Sun Apr 19 13:34:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B76BF2C60BD; Sun, 19 Apr 2020 13:34:00 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 494rQH1jp6z4HKK; Sun, 19 Apr 2020 13:33:58 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.110.112]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1jQA56-0004df-PV; Sun, 19 Apr 2020 15:33:57 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Kristof Provost" Subject: Re: svn commit: r360068 - in head/sys: kern net sys References: <202004180750.03I7oUK6032898@repo.freebsd.org> Date: Sun, 19 Apr 2020 15:33:55 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <202004180750.03I7oUK6032898@repo.freebsd.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.2 X-Scan-Signature: 50d93031f3c5812f4fafdc9644ec945e X-Rspamd-Queue-Id: 494rQH1jp6z4HKK X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 195.190.28.88 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-2.51 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:195.190.28.64/27]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[klop.ws]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE(-0.71)[ip: (-0.59), ipnet: 195.190.28.0/24(-0.24), asn: 47172(-2.76), country: NL(0.03)]; RCVD_IN_DNSWL_NONE(0.00)[88.28.190.195.list.dnswl.org : 127.0.10.0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:47172, ipnet:195.190.28.0/24, country:NL]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 13:34:00 -0000 Nice feature. A question below. On Sat, 18 Apr 2020 09:50:30 +0200, Kristof Provost wrote: > Author: kp > Date: Sat Apr 18 07:50:30 2020 > New Revision: 360068 > URL: https://svnweb.freebsd.org/changeset/base/360068 > > Log: > ethersubr: Make the mac address generation more robust > If we create two (vnet) jails and create a bridge interface in each we > end up > with the same mac address on both bridge interfaces. > These very often conflicts, resulting in same mac address in both > jails. > Mitigate this problem by including the jail name in the mac address. > Reviewed by: kevans, melifaro > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D24383 > > Modified: > head/sys/kern/kern_jail.c > head/sys/net/if_ethersubr.c > head/sys/sys/jail.h > > Modified: head/sys/kern/kern_jail.c > ============================================================================== > --- head/sys/kern/kern_jail.c Sat Apr 18 03:14:16 2020 (r360067) > +++ head/sys/kern/kern_jail.c Sat Apr 18 07:50:30 2020 (r360068) > @@ -2920,6 +2920,15 @@ getcredhostid(struct ucred *cred, unsigned long > *hosti > mtx_unlock(&cred->cr_prison->pr_mtx); > } > +void > +getjailname(struct ucred *cred, char *name, size_t len) > +{ > + > + mtx_lock(&cred->cr_prison->pr_mtx); > + strlcpy(name, cred->cr_prison->pr_name, len); > + mtx_unlock(&cred->cr_prison->pr_mtx); > +} > + > #ifdef VIMAGE > /* > * Determine whether the prison represented by cred owns > > Modified: head/sys/net/if_ethersubr.c > ============================================================================== > --- head/sys/net/if_ethersubr.c Sat Apr 18 03:14:16 2020 (r360067) > +++ head/sys/net/if_ethersubr.c Sat Apr 18 07:50:30 2020 (r360068) > @@ -1419,27 +1419,39 @@ ether_8021q_frame(struct mbuf **mp, struct ifnet > *ife, > /* > * Allocate an address from the FreeBSD Foundation OUI. This uses a > - * cryptographic hash function on the containing jail's UUID and the > interface > - * name to attempt to provide a unique but stable address. > Pseudo-interfaces > - * which require a MAC address should use this function to allocate > - * non-locally-administered addresses. > + * cryptographic hash function on the containing jail's name, UUID and > the > + * interface name to attempt to provide a unique but stable address. > + * Pseudo-interfaces which require a MAC address should use this > function to > + * allocate non-locally-administered addresses. > */ > void > ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) > { > -#define ETHER_GEN_ADDR_BUFSIZ HOSTUUIDLEN + IFNAMSIZ + 2 > SHA1_CTX ctx; > - char buf[ETHER_GEN_ADDR_BUFSIZ]; > + char *buf; > char uuid[HOSTUUIDLEN + 1]; > uint64_t addr; > int i, sz; > char digest[SHA1_RESULTLEN]; > + char jailname[MAXHOSTNAMELEN]; > getcredhostuuid(curthread->td_ucred, uuid, sizeof(uuid)); > - sz = snprintf(buf, ETHER_GEN_ADDR_BUFSIZ, "%s-%s", uuid, > ifp->if_xname); > + /* If each (vnet) jail would also have a unique hostuuid this would not > + * be necessary. */ > + getjailname(curthread->td_ucred, jailname, sizeof(jailname)); > + sz = asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, if_name(ifp), > + jailname); > + if (sz < 0) { > + /* Fall back to a random mac address. */ I was wondering if it would be valuable to give this fall back something like: printf("%s: unable to create fixed mac address; using random mac address", if_name(ifp)); This will only be printed in rare circumstances. But in that case will provide valuable information. Regards, Ronald. > + arc4rand(hwaddr, sizeof(*hwaddr), 0); > + hwaddr->octet[0] = 0x02; > + return; > + } > + > SHA1Init(&ctx); > SHA1Update(&ctx, buf, sz); > SHA1Final(digest, &ctx); > + free(buf, M_TEMP); > addr = ((digest[0] << 16) | (digest[1] << 8) | digest[2]) & > OUI_FREEBSD_GENERATED_MASK; > > Modified: head/sys/sys/jail.h > ============================================================================== > --- head/sys/sys/jail.h Sat Apr 18 03:14:16 2020 (r360067) > +++ head/sys/sys/jail.h Sat Apr 18 07:50:30 2020 (r360068) > @@ -382,6 +382,7 @@ void getcredhostname(struct ucred *, char *, size_t); > void getcreddomainname(struct ucred *, char *, size_t); > void getcredhostuuid(struct ucred *, char *, size_t); > void getcredhostid(struct ucred *, unsigned long *); > +void getjailname(struct ucred *cred, char *name, size_t len); > void prison0_init(void); > int prison_allow(struct ucred *, unsigned); > int prison_check(struct ucred *cred1, struct ucred *cred2); > _______________________________________________ > 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-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Sun Apr 19 14:19:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0BD9F2C7332; Sun, 19 Apr 2020 14:19:10 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494sQP68MNz4Lr9; Sun, 19 Apr 2020 14:19:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id B49452E25F; Sun, 19 Apr 2020 14:19:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id B9EA415566; Sun, 19 Apr 2020 16:19:07 +0200 (CEST) From: "Kristof Provost" To: "Ronald Klop" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r360068 - in head/sys: kern net sys Date: Sun, 19 Apr 2020 16:19:06 +0200 X-Mailer: MailMate (1.13.1r5671) Message-ID: <67B55A62-848B-4876-8367-DE0D32A8B7D4@FreeBSD.org> In-Reply-To: References: <202004180750.03I7oUK6032898@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 14:19:10 -0000 On 19 Apr 2020, at 15:33, Ronald Klop wrote: > On Sat, 18 Apr 2020 09:50:30 +0200, Kristof Provost = > wrote: > >> Author: kp >> Date: Sat Apr 18 07:50:30 2020 >> New Revision: 360068 >> URL: https://svnweb.freebsd.org/changeset/base/360068 >> >> Log: >> ethersubr: Make the mac address generation more robust >> If we create two (vnet) jails and create a bridge interface in each = >> we end up >> with the same mac address on both bridge interfaces. >> These very often conflicts, resulting in same mac address in both = >> jails. >> Mitigate this problem by including the jail name in the mac address. >> Reviewed by: kevans, melifaro >> MFC after: 1 week >> Differential Revision: https://reviews.freebsd.org/D24383 >> >> Modified: >> head/sys/kern/kern_jail.c >> head/sys/net/if_ethersubr.c >> head/sys/sys/jail.h >> >> Modified: head/sys/kern/kern_jail.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/kern/kern_jail.c Sat Apr 18 03:14:16 2020 (r360067) >> +++ head/sys/kern/kern_jail.c Sat Apr 18 07:50:30 2020 (r360068) >> @@ -2920,6 +2920,15 @@ getcredhostid(struct ucred *cred, unsigned = >> long *hosti >> mtx_unlock(&cred->cr_prison->pr_mtx); >> } >> +void >> +getjailname(struct ucred *cred, char *name, size_t len) >> +{ >> + >> + mtx_lock(&cred->cr_prison->pr_mtx); >> + strlcpy(name, cred->cr_prison->pr_name, len); >> + mtx_unlock(&cred->cr_prison->pr_mtx); >> +} >> + >> #ifdef VIMAGE >> /* >> * Determine whether the prison represented by cred owns >> >> Modified: head/sys/net/if_ethersubr.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/net/if_ethersubr.c Sat Apr 18 03:14:16 2020 (r360067) >> +++ head/sys/net/if_ethersubr.c Sat Apr 18 07:50:30 2020 (r360068) >> @@ -1419,27 +1419,39 @@ ether_8021q_frame(struct mbuf **mp, struct = >> ifnet *ife, >> /* >> * Allocate an address from the FreeBSD Foundation OUI. This uses a >> - * cryptographic hash function on the containing jail's UUID and the = >> interface >> - * name to attempt to provide a unique but stable address. = >> Pseudo-interfaces >> - * which require a MAC address should use this function to allocate >> - * non-locally-administered addresses. >> + * cryptographic hash function on the containing jail's name, UUID = >> and the >> + * interface name to attempt to provide a unique but stable address. >> + * Pseudo-interfaces which require a MAC address should use this = >> function to >> + * allocate non-locally-administered addresses. >> */ >> void >> ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) >> { >> -#define ETHER_GEN_ADDR_BUFSIZ HOSTUUIDLEN + IFNAMSIZ + 2 >> SHA1_CTX ctx; >> - char buf[ETHER_GEN_ADDR_BUFSIZ]; >> + char *buf; >> char uuid[HOSTUUIDLEN + 1]; >> uint64_t addr; >> int i, sz; >> char digest[SHA1_RESULTLEN]; >> + char jailname[MAXHOSTNAMELEN]; >> getcredhostuuid(curthread->td_ucred, uuid, sizeof(uuid)); >> - sz =3D snprintf(buf, ETHER_GEN_ADDR_BUFSIZ, "%s-%s", uuid, = >> ifp->if_xname); >> + /* If each (vnet) jail would also have a unique hostuuid this would = >> not >> + * be necessary. */ >> + getjailname(curthread->td_ucred, jailname, sizeof(jailname)); >> + sz =3D asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, if_name(ifp), >> + jailname); >> + if (sz < 0) { >> + /* Fall back to a random mac address. */ > > > I was wondering if it would be valuable to give this fall back = > something like: > > printf("%s: unable to create fixed mac address; using = > random mac address", if_name(ifp)); > > This will only be printed in rare circumstances. But in that case will = > provide valuable information. > That would potentially be valuable, yes. On the other hand, we = traditionally don=E2=80=99t sprinkle a lot of printf()s around in the ker= nel. = This is extremely unlikely to happen, and if it does odds are attaching = the interface will fail at an earlier or later point, you may struggle = to pass packets and run into any number of other issues. It=E2=80=99s also possible to diagnose absent the printf(), because the M= AC = address will be locally administered rather than within the FreeBSD OUI. So, in short: not a bad idea. You can argue it both ways, and I find = myself (weakly) on the opposite side. Best regards, Kristof From owner-svn-src-all@freebsd.org Sun Apr 19 14:22:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5ED02C754F; Sun, 19 Apr 2020 14:22:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494sV65NYkz4M9s; Sun, 19 Apr 2020 14:22:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B416C27281; Sun, 19 Apr 2020 14:22:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JEMMVJ001436; Sun, 19 Apr 2020 14:22:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JEMMou001433; Sun, 19 Apr 2020 14:22:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004191422.03JEMMou001433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 19 Apr 2020 14:22:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360094 - head/usr.sbin/bluetooth/hccontrol X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 360094 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 14:22:22 -0000 Author: hselasky Date: Sun Apr 19 14:22:21 2020 New Revision: 360094 URL: https://svnweb.freebsd.org/changeset/base/360094 Log: Improve printing of le features in hccontrol(8). Submitted by: Marc Veldman PR: 245739 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.h head/usr.sbin/bluetooth/hccontrol/le.c head/usr.sbin/bluetooth/hccontrol/util.c Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.h ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/hccontrol.h Sun Apr 19 10:50:29 2020 (r360093) +++ head/usr.sbin/bluetooth/hccontrol/hccontrol.h Sun Apr 19 14:22:21 2020 (r360094) @@ -73,6 +73,7 @@ char const * hci_ver2str (int); char const * hci_lmpver2str (int); char const * hci_manufacturer2str(int); char const * hci_features2str (uint8_t *, char *, int); +char const * hci_le_features2str (uint8_t *, char *, int); char const * hci_cc2str (int); char const * hci_con_state2str (int); char const * hci_status2str (int); Modified: head/usr.sbin/bluetooth/hccontrol/le.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/le.c Sun Apr 19 10:50:29 2020 (r360093) +++ head/usr.sbin/bluetooth/hccontrol/le.c Sun Apr 19 14:22:21 2020 (r360094) @@ -225,18 +225,37 @@ static int le_read_local_supported_features(int s, int argc ,char *argv[]) { ng_hci_le_read_local_supported_features_rp rp; - int e; int n = sizeof(rp); - e = hci_simple_request(s, + union { + uint64_t raw; + uint8_t octets[8]; + } le_features; + + char buffer[2048]; + + if (hci_simple_request(s, NG_HCI_OPCODE(NG_HCI_OGF_LE, NG_HCI_OCF_LE_READ_LOCAL_SUPPORTED_FEATURES), - (void *)&rp, &n); + (void *)&rp, &n) == ERROR) + return (ERROR); - printf("LOCAL SUPPORTED: %d %d %jx\n", e, rp.status, - (uintmax_t) rp.le_features); + if (rp.status != 0x00) { + fprintf(stdout, "Status: %s [%#02x]\n", + hci_status2str(rp.status), rp.status); + return (FAILED); + } - return 0; + le_features.raw = rp.le_features; + + fprintf(stdout, "LE Features: "); + for(int i = 0; i < 8; i++) + fprintf(stdout, " %#02x", le_features.octets[i]); + fprintf(stdout, "\n%s\n", hci_le_features2str(le_features.octets, + buffer, sizeof(buffer))); + fprintf(stdout, "\n"); + + return OK; } static int Modified: head/usr.sbin/bluetooth/hccontrol/util.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/util.c Sun Apr 19 10:50:29 2020 (r360093) +++ head/usr.sbin/bluetooth/hccontrol/util.c Sun Apr 19 14:22:21 2020 (r360094) @@ -371,6 +371,119 @@ done: } /* hci_features2str */ char const * +hci_le_features2str(uint8_t *features, char *buffer, int size) +{ + static char const * const t[][8] = { + { /* byte 0 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 1 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 2 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 3 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 4 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 5 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 6 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 7 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }}; + + if (buffer != NULL && size > 0) { + int n, i, len0, len1; + + memset(buffer, 0, size); + len1 = 0; + + for (n = 0; n < SIZE(t); n++) { + for (i = 0; i < SIZE(t[n]); i++) { + len0 = strlen(buffer); + if (len0 >= size) + goto done; + + if (features[n] & (1 << i)) { + if (len1 + strlen(t[n][i]) > 60) { + len1 = 0; + buffer[len0 - 1] = '\n'; + } + + len1 += strlen(t[n][i]); + strncat(buffer, t[n][i], size - len0); + } + } + } + } +done: + return (buffer); +} + +char const * hci_cc2str(int cc) { static char const * const t[] = { From owner-svn-src-all@freebsd.org Sun Apr 19 14:23:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98F342C75D1 for ; Sun, 19 Apr 2020 14:23:33 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494sWS6VdBz4MSC for ; Sun, 19 Apr 2020 14:23:32 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk1-x741.google.com with SMTP id b62so7773773qkf.6 for ; Sun, 19 Apr 2020 07:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=luXC7RSSeAn2aa8YFbfds7Jtk+NVMT0NXCZVg4Vw/Q4=; b=jYIOOe8dvTDuD4B3IPaPxAt4zmwYP+CxZRuCDnEGVTLs/8XYNPyM8RL4NrnwYEcNTf spD+Et3HTOJVd9Fwc1WIiz71tBJ+8m2LEAmOkhrlRg+3fk7ft6VjYYMvfUoHIxjx925W Cwmz2nD7Uuyt+XTO0/0HSImDMw0iMyrS1jiTJ+bdc//fcvz8Zv4J9sk7CtlC5Es0j3wg Hhfgo7B66adzICpRPGJ8XEqv6bkUmghi2yicIxnC+BYhAzUgGC3t29VpjXKZJtDOs74e Zj4+/N8V7tpaVoFaGHTWnL/k/72duofZELi5+4uL8dJk3Vj8Gb5SOGTAr2kWGdBgbh+I zLJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=luXC7RSSeAn2aa8YFbfds7Jtk+NVMT0NXCZVg4Vw/Q4=; b=Nw9cfmNO/vcgpjCXHjDYI37djTHaCPLMZ2QRryh8n/ORLc6dcMu9LUXBpDZQ01Z5C8 2Gu+ENZy+FbrnLwRj1tObkVouer4IqT3cb3tPHoalWAjtKO57YA2otpv4xmflAPTJFvY vgSkU/vJ6l2aPklKp9CXnbia9Xm9mKmcCwXSY/CqO92NkXsb+aYij6pAALllJuLnys+j bOb7RQVHfp18xYnz5SpTCA/F5SCsv2qMTSJ+V5gKTF9bO7QUHlBX8c7vC+w37DdOuHA6 1p/PHnYO2W1YlsGsdE/3qFsCKnN8V2cFX6FSyhvaW7EjiGWnTMg6GrqjuQor4pkXQvsU i3OQ== X-Gm-Message-State: AGi0Puaq8VFu6jl8uOQdvcaYswd6GvK6jnCOVZqUpE4e7JtLJeqMsgt3 Rje+GTiEtfNhIlB++uiPBHXgFQ== X-Google-Smtp-Source: APiQypLVI81j2KuGn6I4EMQg1dzMgK/w6lyXs/grrkJPbr98Ob54uceYE2jDTFzYsW/NV+NsKJLGKg== X-Received: by 2002:a37:bec5:: with SMTP id o188mr11769255qkf.165.1587306211785; Sun, 19 Apr 2020 07:23:31 -0700 (PDT) Received: from mutt-hbsd (pool-100-16-231-224.bltmmd.fios.verizon.net. [100.16.231.224]) by smtp.gmail.com with ESMTPSA id m83sm15618898qke.117.2020.04.19.07.23.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 07:23:31 -0700 (PDT) Date: Sun, 19 Apr 2020 10:23:27 -0400 From: Shawn Webb To: Kristof Provost Cc: Ronald Klop , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r360068 - in head/sys: kern net sys Message-ID: <20200419142327.nhotyboqubk3vl2l@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA References: <202004180750.03I7oUK6032898@repo.freebsd.org> <67B55A62-848B-4876-8367-DE0D32A8B7D4@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="flj6q4ccadmcdqix" Content-Disposition: inline In-Reply-To: <67B55A62-848B-4876-8367-DE0D32A8B7D4@FreeBSD.org> X-Rspamd-Queue-Id: 494sWS6VdBz4MSC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=jYIOOe8d; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::741 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [-4.26 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; RCVD_IN_DNSWL_NONE(0.00)[1.4.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; IP_SCORE(-0.16)[ip: (0.01), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; RECEIVED_SPAMHAUS_PBL(0.00)[224.231.16.100.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 14:23:33 -0000 --flj6q4ccadmcdqix Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 19, 2020 at 04:19:06PM +0200, Kristof Provost wrote: > On 19 Apr 2020, at 15:33, Ronald Klop wrote: > > On Sat, 18 Apr 2020 09:50:30 +0200, Kristof Provost > > wrote: > >=20 > > > Author: kp > > > Date: Sat Apr 18 07:50:30 2020 > > > New Revision: 360068 > > > URL: https://svnweb.freebsd.org/changeset/base/360068 > > >=20 > > > Log: > > > ethersubr: Make the mac address generation more robust > > > If we create two (vnet) jails and create a bridge interface in each > > > we end up > > > with the same mac address on both bridge interfaces. > > > These very often conflicts, resulting in same mac address in both > > > jails. > > > Mitigate this problem by including the jail name in the mac address. > > > Reviewed by: kevans, melifaro > > > MFC after: 1 week > > > Differential Revision: https://reviews.freebsd.org/D24383 > > >=20 > > > Modified: > > > head/sys/kern/kern_jail.c > > > head/sys/net/if_ethersubr.c > > > head/sys/sys/jail.h > > >=20 > > > Modified: head/sys/kern/kern_jail.c > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > > --- head/sys/kern/kern_jail.c Sat Apr 18 03:14:16 2020 (r360067) > > > +++ head/sys/kern/kern_jail.c Sat Apr 18 07:50:30 2020 (r360068) > > > @@ -2920,6 +2920,15 @@ getcredhostid(struct ucred *cred, unsigned > > > long *hosti > > > mtx_unlock(&cred->cr_prison->pr_mtx); > > > } > > > +void > > > +getjailname(struct ucred *cred, char *name, size_t len) > > > +{ > > > + > > > + mtx_lock(&cred->cr_prison->pr_mtx); > > > + strlcpy(name, cred->cr_prison->pr_name, len); > > > + mtx_unlock(&cred->cr_prison->pr_mtx); > > > +} > > > + > > > #ifdef VIMAGE > > > /* > > > * Determine whether the prison represented by cred owns > > >=20 > > > Modified: head/sys/net/if_ethersubr.c > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > > --- head/sys/net/if_ethersubr.c Sat Apr 18 03:14:16 2020 (r360067) > > > +++ head/sys/net/if_ethersubr.c Sat Apr 18 07:50:30 2020 (r360068) > > > @@ -1419,27 +1419,39 @@ ether_8021q_frame(struct mbuf **mp, struct > > > ifnet *ife, > > > /* > > > * Allocate an address from the FreeBSD Foundation OUI. This uses a > > > - * cryptographic hash function on the containing jail's UUID and > > > the interface > > > - * name to attempt to provide a unique but stable address. > > > Pseudo-interfaces > > > - * which require a MAC address should use this function to allocate > > > - * non-locally-administered addresses. > > > + * cryptographic hash function on the containing jail's name, UUID > > > and the > > > + * interface name to attempt to provide a unique but stable address. > > > + * Pseudo-interfaces which require a MAC address should use this > > > function to > > > + * allocate non-locally-administered addresses. > > > */ > > > void > > > ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) > > > { > > > -#define ETHER_GEN_ADDR_BUFSIZ HOSTUUIDLEN + IFNAMSIZ + 2 > > > SHA1_CTX ctx; > > > - char buf[ETHER_GEN_ADDR_BUFSIZ]; > > > + char *buf; > > > char uuid[HOSTUUIDLEN + 1]; > > > uint64_t addr; > > > int i, sz; > > > char digest[SHA1_RESULTLEN]; > > > + char jailname[MAXHOSTNAMELEN]; > > > getcredhostuuid(curthread->td_ucred, uuid, sizeof(uuid)); > > > - sz =3D snprintf(buf, ETHER_GEN_ADDR_BUFSIZ, "%s-%s", uuid, > > > ifp->if_xname); > > > + /* If each (vnet) jail would also have a unique hostuuid this > > > would not > > > + * be necessary. */ > > > + getjailname(curthread->td_ucred, jailname, sizeof(jailname)); > > > + sz =3D asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, if_name(ifp), > > > + jailname); > > > + if (sz < 0) { > > > + /* Fall back to a random mac address. */ > >=20 > >=20 > > I was wondering if it would be valuable to give this fall back something > > like: > >=20 > > printf("%s: unable to create fixed mac address; using random > > mac address", if_name(ifp)); > >=20 > > This will only be printed in rare circumstances. But in that case will > > provide valuable information. > >=20 > That would potentially be valuable, yes. On the other hand, we traditiona= lly > don???t sprinkle a lot of printf()s around in the kernel. This is extreme= ly > unlikely to happen, and if it does odds are attaching the interface will > fail at an earlier or later point, you may struggle to pass packets and r= un > into any number of other issues. > It???s also possible to diagnose absent the printf(), because the MAC > address will be locally administered rather than within the FreeBSD OUI. >=20 > So, in short: not a bad idea. You can argue it both ways, and I find myse= lf > (weakly) on the opposite side. Would displaying the message only when verbose boot mode is enabled be a suitable compromise? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Sha= wn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --flj6q4ccadmcdqix Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAl6cXtgACgkQ/y5nonf4 4fpcDw//W2EWrllSHRy0LWiNhEeaRxQfkStXDJfsZN0YOkeTSn8fOdxeftFQSj7R geY35ZWdd6y56u5UFyP0lszRQMTPgwT5mvhKE4fDaY81rVdiP952KUBUBXmp8hVm ojIhdsFRbGjW6irDP3RfOcu/eZxiCfHGgmD0l/QeLsckP230y8jgl22agy5r/4U1 kG9L4o70E1bk+5qNrI3CfFL3FWarWBDGG+Hd4waV3Nv0WA6hPtLkltYgdOt6SUP3 d0Pi5KUOUrES70mrsIy5QO/oORLHr7SuuKKS9Hzd2wYygY99SaOgU9hR4fH6MpZu ruEY3HfspNkDv1tFPVg1hCO8U6yiDIpWgqpbh3czjUQGluFvWrvAu91WHE+/im4r ZUU7fh882zb3QWBEfOtwoH7wv2O8uWC5Eu45ynZfyctxyiAMa1bOn6Y53yHSvX4N dG4pQEfn5sA3gDn5i+MD4pO494WmULLxISgCdORAPL3+oPDMr0aCgVZ60EiIuUhs s89694ymqTiF3tPatY9rideN/j/6T+rBVIRScSpj4/Nm01oFfiZoFm91OW0VEDRM BupsHzIG0ICtnGvN/8InyVvbYLZGVRe7zyUp/Fx7919m9jjr16QmL7VP3nwDKWJx HyfOKUGohJwrtyPmv2i528Mv9kV9HSfDKguE0TBR+6p0WmRe5Gk= =6E5S -----END PGP SIGNATURE----- --flj6q4ccadmcdqix-- From owner-svn-src-all@freebsd.org Sun Apr 19 14:25:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B66502C767A; Sun, 19 Apr 2020 14:25:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494sZD4Rndz4Mfp; Sun, 19 Apr 2020 14:25:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 932EA272A6; Sun, 19 Apr 2020 14:25:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JEPulk004216; Sun, 19 Apr 2020 14:25:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JEPuSB004215; Sun, 19 Apr 2020 14:25:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004191425.03JEPuSB004215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 19 Apr 2020 14:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360095 - head/usr.sbin/bluetooth/hccontrol X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 360095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 14:25:56 -0000 Author: hselasky Date: Sun Apr 19 14:25:56 2020 New Revision: 360095 URL: https://svnweb.freebsd.org/changeset/base/360095 Log: Fix cut and paste off-by-one error in hccontrol(8). Make sure strncpy() doesn't write beyond its given buffer. PR: 245739 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/usr.sbin/bluetooth/hccontrol/util.c Modified: head/usr.sbin/bluetooth/hccontrol/util.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/util.c Sun Apr 19 14:22:21 2020 (r360094) +++ head/usr.sbin/bluetooth/hccontrol/util.c Sun Apr 19 14:25:56 2020 (r360095) @@ -134,6 +134,7 @@ hci_hmode2str(int mode, char *buffer, int size) int n; memset(buffer, 0, size); + size--; for (n = 0; n < SIZE(t); n++) { int len = strlen(buffer); @@ -347,6 +348,7 @@ hci_features2str(uint8_t *features, char *buffer, int memset(buffer, 0, size); len1 = 0; + size--; for (n = 0; n < SIZE(t); n++) { for (i = 0; i < SIZE(t[n]); i++) { @@ -460,6 +462,7 @@ hci_le_features2str(uint8_t *features, char *buffer, i memset(buffer, 0, size); len1 = 0; + size--; for (n = 0; n < SIZE(t); n++) { for (i = 0; i < SIZE(t[n]); i++) { From owner-svn-src-all@freebsd.org Sun Apr 19 15:32:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0599A27915B; Sun, 19 Apr 2020 15:32:15 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494v2k6Sb3z4Sqm; Sun, 19 Apr 2020 15:32:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D90A24C; Sun, 19 Apr 2020 15:32:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JFWEoQ046103; Sun, 19 Apr 2020 15:32:14 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JFWEWA046102; Sun, 19 Apr 2020 15:32:14 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202004191532.03JFWEWA046102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 19 Apr 2020 15:32:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360096 - head/sbin/pfctl X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sbin/pfctl X-SVN-Commit-Revision: 360096 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 15:32:15 -0000 Author: kp Date: Sun Apr 19 15:32:14 2020 New Revision: 360096 URL: https://svnweb.freebsd.org/changeset/base/360096 Log: pfctl: Remove unused variable Submitted by: Nick Rogers MFC after: 1 week Sponsored by: RG Nets Modified: head/sbin/pfctl/pfctl_parser.c Modified: head/sbin/pfctl/pfctl_parser.c ============================================================================== --- head/sbin/pfctl/pfctl_parser.c Sun Apr 19 14:25:56 2020 (r360095) +++ head/sbin/pfctl/pfctl_parser.c Sun Apr 19 15:32:14 2020 (r360096) @@ -1370,13 +1370,11 @@ struct node_host * ifa_exists(char *ifa_name) { struct node_host *n; - int s; if (iftab == NULL) ifa_load(); /* check whether this is a group */ - s = get_query_socket(); if (is_a_group(ifa_name)) { /* fake a node_host */ if ((n = calloc(1, sizeof(*n))) == NULL) From owner-svn-src-all@freebsd.org Sun Apr 19 15:37:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 422142792E1; Sun, 19 Apr 2020 15:37:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494v8V116Cz4TC3; Sun, 19 Apr 2020 15:37:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DED275; Sun, 19 Apr 2020 15:37:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JFbENT049134; Sun, 19 Apr 2020 15:37:14 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JFbDPa049133; Sun, 19 Apr 2020 15:37:13 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202004191537.03JFbDPa049133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 19 Apr 2020 15:37:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360097 - head/sbin/pfctl X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sbin/pfctl X-SVN-Commit-Revision: 360097 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 15:37:14 -0000 Author: kp Date: Sun Apr 19 15:37:13 2020 New Revision: 360097 URL: https://svnweb.freebsd.org/changeset/base/360097 Log: pfctl: Call ifa_load() before ifa_grouplookup() ifa_grouplookup() uses the data loaded in ifa_load() (through is_a_group()), so we must call ifa_load() before we can rely on any of the data it populates. Submitted by: Nick Rogers MFC after: 1 week Sponsored by: RG Nets Modified: head/sbin/pfctl/pfctl_parser.c Modified: head/sbin/pfctl/pfctl_parser.c ============================================================================== --- head/sbin/pfctl/pfctl_parser.c Sun Apr 19 15:32:14 2020 (r360096) +++ head/sbin/pfctl/pfctl_parser.c Sun Apr 19 15:37:13 2020 (r360097) @@ -1436,14 +1436,15 @@ ifa_lookup(char *ifa_name, int flags) int got4 = 0, got6 = 0; const char *last_if = NULL; + /* first load iftab and isgroup_map */ + if (iftab == NULL) + ifa_load(); + if ((h = ifa_grouplookup(ifa_name, flags)) != NULL) return (h); if (!strncmp(ifa_name, "self", IFNAMSIZ)) ifa_name = NULL; - - if (iftab == NULL) - ifa_load(); for (p = iftab; p; p = p->next) { if (ifa_skip_if(ifa_name, p)) From owner-svn-src-all@freebsd.org Sun Apr 19 16:10:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6B1427A0D0; Sun, 19 Apr 2020 16:10:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494vth3pCcz4Wm0; Sun, 19 Apr 2020 16:10:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79471685; Sun, 19 Apr 2020 16:10:20 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JGAKE9069447; Sun, 19 Apr 2020 16:10:20 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JGAK0P069446; Sun, 19 Apr 2020 16:10:20 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202004191610.03JGAK0P069446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 19 Apr 2020 16:10:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360098 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 360098 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 16:10:20 -0000 Author: kp Date: Sun Apr 19 16:10:20 2020 New Revision: 360098 URL: https://svnweb.freebsd.org/changeset/base/360098 Log: pf: Improve ioctl() input validation Both DIOCCHANGEADDR and DIOCADDADDR take a struct pf_pooladdr from userspace. They failed to validate the dyn pointer contained in its struct pf_addr_wrap member structure. This triggered assertion failures under fuzz testing in pfi_dynaddr_setup(). Happily the dyn variable was overruled there, but we should verify that it's set to NULL anyway. Reported-by: syzbot+93e93150bc29f9b4b85f@syzkaller.appspotmail.com Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24431 Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Sun Apr 19 15:37:13 2020 (r360097) +++ head/sys/netpfil/pf/pf_ioctl.c Sun Apr 19 16:10:20 2020 (r360098) @@ -2643,6 +2643,10 @@ DIOCGETSTATES_full: error = EINVAL; break; } + if (pp->addr.addr.p.dyn != NULL) { + error = EINVAL; + break; + } pa = malloc(sizeof(*pa), M_PFRULE, M_WAITOK); bcopy(&pp->addr, pa, sizeof(struct pf_pooladdr)); if (pa->ifname[0]) @@ -2739,6 +2743,10 @@ DIOCGETSTATES_full: if (pca->addr.addr.type != PF_ADDR_ADDRMASK && pca->addr.addr.type != PF_ADDR_DYNIFTL && pca->addr.addr.type != PF_ADDR_TABLE) { + error = EINVAL; + break; + } + if (pca->addr.addr.p.dyn != NULL) { error = EINVAL; break; } From owner-svn-src-all@freebsd.org Sun Apr 19 16:30:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F97927A577; Sun, 19 Apr 2020 16:30:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494wLL2Mx3z4YHm; Sun, 19 Apr 2020 16:30:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4CB34A7B; Sun, 19 Apr 2020 16:30:50 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JGUopj081652; Sun, 19 Apr 2020 16:30:50 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JGUoBM081651; Sun, 19 Apr 2020 16:30:50 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202004191630.03JGUoBM081651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 19 Apr 2020 16:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360099 - head/tests/sys/net X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/tests/sys/net X-SVN-Commit-Revision: 360099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 16:30:50 -0000 Author: kp Date: Sun Apr 19 16:30:49 2020 New Revision: 360099 URL: https://svnweb.freebsd.org/changeset/base/360099 Log: bridge tests: Ensure that bridges in different jails get different MAC addresses We used to have a problem where bridges created in different vnet jails would end up having the same mac address. This is now fixed by including the jail name as a seed for the mac address generation, but we should verify that it doesn't regress. Modified: head/tests/sys/net/if_bridge_test.sh Modified: head/tests/sys/net/if_bridge_test.sh ============================================================================== --- head/tests/sys/net/if_bridge_test.sh Sun Apr 19 16:10:20 2020 (r360098) +++ head/tests/sys/net/if_bridge_test.sh Sun Apr 19 16:30:49 2020 (r360099) @@ -271,6 +271,44 @@ delete_with_members_cleanup() vnet_cleanup } +atf_test_case "mac_conflict" "cleanup" +mac_conflict_head() +{ + atf_set descr 'Ensure that bridges in different jails get different mac addresses' + atf_set require.user root +} + +mac_conflict_body() +{ + vnet_init + + epair=$(vnet_mkepair) + + # Ensure the bridge module is loaded so jails can use it. + tmpbridge=$(vnet_mkbridge) + + vnet_mkjail bridge_mac_conflict_one ${epair}a + vnet_mkjail bridge_mac_conflict_two ${epair}b + + jexec bridge_mac_conflict_one ifconfig bridge create + jexec bridge_mac_conflict_one ifconfig bridge0 192.0.2.1/24 up \ + addm ${epair}a + jexec bridge_mac_conflict_one ifconfig ${epair}a up + + jexec bridge_mac_conflict_two ifconfig bridge create + jexec bridge_mac_conflict_two ifconfig bridge0 192.0.2.2/24 up \ + addm ${epair}b + jexec bridge_mac_conflict_two ifconfig ${epair}b up + + atf_check -s exit:0 -o ignore \ + jexec bridge_mac_conflict_one ping -c 3 192.0.2.2 +} + +mac_conflict_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "bridge_transmit_ipv4_unicast" @@ -278,4 +316,5 @@ atf_init_test_cases() atf_add_test_case "static" atf_add_test_case "span" atf_add_test_case "delete_with_members" + atf_add_test_case "mac_conflict" } From owner-svn-src-all@freebsd.org Sun Apr 19 17:01:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6800B27B229; Sun, 19 Apr 2020 17:01:15 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494x1R2BQwz4bH9; Sun, 19 Apr 2020 17:01:15 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46762107A; Sun, 19 Apr 2020 17:01:15 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JH1F3G002791; Sun, 19 Apr 2020 17:01:15 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JH1F42002790; Sun, 19 Apr 2020 17:01:15 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202004191701.03JH1F42002790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 19 Apr 2020 17:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360100 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 360100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 17:01:15 -0000 Author: cy Date: Sun Apr 19 17:01:14 2020 New Revision: 360100 URL: https://svnweb.freebsd.org/changeset/base/360100 Log: fib4_free_nh_ext is an empty function. It does nothing. Don't call it. MFC after: 2 weeks Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sun Apr 19 16:30:49 2020 (r360099) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sun Apr 19 17:01:14 2020 (r360100) @@ -699,7 +699,6 @@ ipf_fastroute(m0, mpp, fin, fdp) struct ifnet *ifp, *sifp; struct sockaddr_in dst; struct nhop4_extended nh4; - int has_nhop = 0; u_long fibnum = 0; u_short ip_off; frdest_t node; @@ -782,7 +781,6 @@ ipf_fastroute(m0, mpp, fin, fdp) goto bad; } - has_nhop = 1; if (ifp == NULL) ifp = nh4.nh_ifp; if (nh4.nh_flags & NHF_GATEWAY) @@ -925,9 +923,6 @@ done: V_ipfmain.ipf_frouteok[0]++; else V_ipfmain.ipf_frouteok[1]++; - - if (has_nhop) - fib4_free_nh_ext(fibnum, &nh4); return 0; bad: From owner-svn-src-all@freebsd.org Sun Apr 19 17:01:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0BB127B27C; Sun, 19 Apr 2020 17:01:19 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494x1W0cs7z4bJm; Sun, 19 Apr 2020 17:01:18 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C0EB1081; Sun, 19 Apr 2020 17:01:18 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JH1IwB002893; Sun, 19 Apr 2020 17:01:18 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JH1IqC002892; Sun, 19 Apr 2020 17:01:18 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202004191701.03JH1IqC002892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 19 Apr 2020 17:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360101 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 360101 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 17:01:19 -0000 Author: cy Date: Sun Apr 19 17:01:17 2020 New Revision: 360101 URL: https://svnweb.freebsd.org/changeset/base/360101 Log: Convert ipfilter to the new routing KPI. Reviewed by: melifaro (previous version) Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sun Apr 19 17:01:14 2020 (r360100) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sun Apr 19 17:01:17 2020 (r360101) @@ -49,6 +49,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include +#include #include #include #include @@ -698,7 +699,7 @@ ipf_fastroute(m0, mpp, fin, fdp) int len, off, error = 0, hlen, code; struct ifnet *ifp, *sifp; struct sockaddr_in dst; - struct nhop4_extended nh4; + struct nhop_object *nh; u_long fibnum = 0; u_short ip_off; frdest_t node; @@ -773,7 +774,9 @@ ipf_fastroute(m0, mpp, fin, fdp) dst.sin_addr = fdp->fd_ip; fibnum = M_GETFIB(m0); - if (fib4_lookup_nh_ext(fibnum, dst.sin_addr, NHR_REF, 0, &nh4) != 0) { + NET_EPOCH_ASSERT(); + nh = fib4_lookup(fibnum, dst.sin_addr, 0, NHR_NONE, 0); + if (nh == NULL) { if (in_localaddr(ip->ip_dst)) error = EHOSTUNREACH; else @@ -782,9 +785,9 @@ ipf_fastroute(m0, mpp, fin, fdp) } if (ifp == NULL) - ifp = nh4.nh_ifp; - if (nh4.nh_flags & NHF_GATEWAY) - dst.sin_addr = nh4.nh_addr; + ifp = nh->nh_ifp; + if (nh->nh_flags & NHF_GATEWAY) + dst.sin_addr = nh->gw4_sa.sin_addr; /* * For input packets which are being "fastrouted", they won't @@ -944,11 +947,13 @@ int ipf_verifysrc(fin) fr_info_t *fin; { - struct nhop4_basic nh4; + struct nhop_object *nh; - if (fib4_lookup_nh_basic(0, fin->fin_src, 0, 0, &nh4) != 0) + NET_EPOCH_ASSERT(); + nh = fib4_lookup(RT_DEFAULT_FIB, fin->fin_src, 0, NHR_NONE, 0); + if (nh == NULL) return (0); - return (fin->fin_ifp == nh4.nh_ifp); + return (fin->fin_ifp == nh->nh_ifp); } From owner-svn-src-all@freebsd.org Sun Apr 19 17:01:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7A7827B2DE; Sun, 19 Apr 2020 17:01:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494x1b2Kwhz4bMb; Sun, 19 Apr 2020 17:01:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71441108C; Sun, 19 Apr 2020 17:01:22 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JH1Mn4002942; Sun, 19 Apr 2020 17:01:22 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JH1LFA002938; Sun, 19 Apr 2020 17:01:21 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202004191701.03JH1LFA002938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 19 Apr 2020 17:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360102 - in head: libexec/rc/rc.d share/mk tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head: libexec/rc/rc.d share/mk tools/build/mk X-SVN-Commit-Revision: 360102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 17:01:24 -0000 Author: cy Date: Sun Apr 19 17:01:21 2020 New Revision: 360102 URL: https://svnweb.freebsd.org/changeset/base/360102 Log: Conditionally install Kerberos rc files based on MK_KERBEROS_SCRIPTS instead of MK_KERBEROS. The reason for this change is some users prefer to build FreeBSD WITHOUT_KERBEROS, wanting to retain the Kerberos rc scripts to start/stop MIT Kerberos or Heimdal from ports. PR: 197337 Reported by: Adam McDougall Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D24252 Modified: head/libexec/rc/rc.d/Makefile head/share/mk/bsd.opts.mk head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/libexec/rc/rc.d/Makefile ============================================================================== --- head/libexec/rc/rc.d/Makefile Sun Apr 19 17:01:17 2020 (r360101) +++ head/libexec/rc/rc.d/Makefile Sun Apr 19 17:01:21 2020 (r360102) @@ -242,14 +242,17 @@ CONFS+= lpd .if ${MK_KERBEROS} != "no" CONFS+= ipropd_master CONFS+= ipropd_slave -_kadmind= kadmind -_kdc= kdc -_kfd= kfd -_kpasswdd= kpasswdd DIRS+= VAR_HEMIDAL VAR_HEMIDAL= /var/heimdal VAR_HEMIDAL_MODE= 700 +.endif + +.if ${MK_KERBEROS_SCRIPTS} != "no" +_kadmind= kadmind +_kdc= kdc +_kfd= kfd +_kpasswdd= kpasswdd .endif .if ${MK_MAIL} != "no" Modified: head/share/mk/bsd.opts.mk ============================================================================== --- head/share/mk/bsd.opts.mk Sun Apr 19 17:01:17 2020 (r360101) +++ head/share/mk/bsd.opts.mk Sun Apr 19 17:01:21 2020 (r360102) @@ -55,6 +55,7 @@ __DEFAULT_YES_OPTIONS = \ INCLUDES \ INSTALLLIB \ KERBEROS \ + KERBEROS_SCRIPTS \ MAKE_CHECK_USE_SANDBOX \ MAN \ MANCOMPRESS \ Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sun Apr 19 17:01:17 2020 (r360101) +++ head/share/mk/src.opts.mk Sun Apr 19 17:01:21 2020 (r360102) @@ -237,6 +237,7 @@ __DEFAULT_DEPENDENT_OPTIONS= \ INET \ INET6 \ KERBEROS \ + KERBEROS_SCRIPTS \ KVM \ NETGRAPH \ PAM \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Apr 19 17:01:17 2020 (r360101) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Apr 19 17:01:21 2020 (r360102) @@ -3152,13 +3152,9 @@ OLD_FILES+=usr/libexec/hprop OLD_FILES+=usr/libexec/hpropd OLD_FILES+=usr/libexec/ipropd-master OLD_FILES+=usr/libexec/ipropd-slave -OLD_FILES+=usr/libexec/kadmind OLD_FILES+=usr/libexec/kcm -OLD_FILES+=usr/libexec/kdc OLD_FILES+=usr/libexec/kdigest -OLD_FILES+=usr/libexec/kfd OLD_FILES+=usr/libexec/kimpersonate -OLD_FILES+=usr/libexec/kpasswdd OLD_FILES+=usr/sbin/kstash OLD_FILES+=usr/sbin/ktutil OLD_FILES+=usr/sbin/iprop-log @@ -3878,6 +3874,13 @@ OLD_FILES+=usr/share/man/man8/pam_krb5.8.gz OLD_FILES+=usr/share/man/man8/pam_ksu.8.gz OLD_FILES+=usr/share/man/man8/string2key.8.gz OLD_FILES+=usr/share/man/man8/verify_krb5_conf.8.gz +.endif + +.if ${MK_KERBEROS_SCRIPTS} == no +OLD_FILES+=usr/libexec/kadmind +OLD_FILES+=usr/libexec/kdc +OLD_FILES+=usr/libexec/kfd +OLD_FILES+=usr/libexec/kpasswdd .endif .if ${MK_KERBEROS_SUPPORT} == no From owner-svn-src-all@freebsd.org Sun Apr 19 17:19:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A11C27BB34; Sun, 19 Apr 2020 17:19:30 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494xQT6XFDz4ctJ; Sun, 19 Apr 2020 17:19:29 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB4CC1442; Sun, 19 Apr 2020 17:19:29 +0000 (UTC) (envelope-from mr@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JHJT3E013195; Sun, 19 Apr 2020 17:19:29 GMT (envelope-from mr@FreeBSD.org) Received: (from mr@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JHJT86013192; Sun, 19 Apr 2020 17:19:29 GMT (envelope-from mr@FreeBSD.org) Message-Id: <202004191719.03JHJT86013192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mr set sender to mr@FreeBSD.org using -f From: Michael Reifenberger Date: Sun, 19 Apr 2020 17:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360103 - in stable/12/sys/amd64/vmm: intel io X-SVN-Group: stable-12 X-SVN-Commit-Author: mr X-SVN-Commit-Paths: in stable/12/sys/amd64/vmm: intel io X-SVN-Commit-Revision: 360103 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 17:19:30 -0000 Author: mr Date: Sun Apr 19 17:19:29 2020 New Revision: 360103 URL: https://svnweb.freebsd.org/changeset/base/360103 Log: MFC r358848: Untangle TPR shadowing and APIC virtualization. This speeds up Windows guests tremendously. The patch does: Add a new tuneable 'hw.vmm.vmx.use_tpr_shadowing' to disable TLP shadowing. Also add 'hw.vmm.vmx.cap.tpr_shadowing' to be able to query if TPR shadowing is used. Detach the initialization of TPR shadowing from the initialization of APIC virtualization. APIC virtualization still needs TPR shadowing, but not vice versa. Any CPU that supports APIC virtualization should also support TPR shadowing. When TPR shadowing is used, the APIC page of each vCPU is written to the VMCS_VIRTUAL_APIC field of the VMCS so that the CPU can write directly to the page without intercept. On vm exit, vlapic_update_ppr() is called to update the PPR. Geänderte Pfade: M /head/sys/amd64/vmm/intel/vmx.c M /head/sys/amd64/vmm/io/vlapic.c M /head/sys/amd64/vmm/io/vlapic.h Submitted by: Yamagi Burmeister Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D22942 Modified: stable/12/sys/amd64/vmm/intel/vmx.c stable/12/sys/amd64/vmm/io/vlapic.c stable/12/sys/amd64/vmm/io/vlapic.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/vmm/intel/vmx.c ============================================================================== --- stable/12/sys/amd64/vmm/intel/vmx.c Sun Apr 19 17:01:21 2020 (r360102) +++ stable/12/sys/amd64/vmm/intel/vmx.c Sun Apr 19 17:19:29 2020 (r360103) @@ -172,6 +172,10 @@ static int cap_invpcid; SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, invpcid, CTLFLAG_RD, &cap_invpcid, 0, "Guests are allowed to use INVPCID"); +static int tpr_shadowing; +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, tpr_shadowing, CTLFLAG_RD, + &tpr_shadowing, 0, "TPR shadowing support"); + static int virtual_interrupt_delivery; SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, virtual_interrupt_delivery, CTLFLAG_RD, &virtual_interrupt_delivery, 0, "APICv virtual interrupt delivery support"); @@ -627,7 +631,7 @@ vmx_restore(void) static int vmx_init(int ipinum) { - int error, use_tpr_shadow; + int error; uint64_t basic, fixed0, fixed1, feature_control; uint32_t tmp, procbased2_vid_bits; @@ -751,6 +755,24 @@ vmx_init(int ipinum) &tmp) == 0); /* + * Check support for TPR shadow. + */ + error = vmx_set_ctlreg(MSR_VMX_PROCBASED_CTLS, + MSR_VMX_TRUE_PROCBASED_CTLS, PROCBASED_USE_TPR_SHADOW, 0, + &tmp); + if (error == 0) { + tpr_shadowing = 1; + TUNABLE_INT_FETCH("hw.vmm.vmx.use_tpr_shadowing", + &tpr_shadowing); + } + + if (tpr_shadowing) { + procbased_ctls |= PROCBASED_USE_TPR_SHADOW; + procbased_ctls &= ~PROCBASED_CR8_LOAD_EXITING; + procbased_ctls &= ~PROCBASED_CR8_STORE_EXITING; + } + + /* * Check support for virtual interrupt delivery. */ procbased2_vid_bits = (PROCBASED2_VIRTUALIZE_APIC_ACCESSES | @@ -758,13 +780,9 @@ vmx_init(int ipinum) PROCBASED2_APIC_REGISTER_VIRTUALIZATION | PROCBASED2_VIRTUAL_INTERRUPT_DELIVERY); - use_tpr_shadow = (vmx_set_ctlreg(MSR_VMX_PROCBASED_CTLS, - MSR_VMX_TRUE_PROCBASED_CTLS, PROCBASED_USE_TPR_SHADOW, 0, - &tmp) == 0); - error = vmx_set_ctlreg(MSR_VMX_PROCBASED_CTLS2, MSR_VMX_PROCBASED_CTLS2, procbased2_vid_bits, 0, &tmp); - if (error == 0 && use_tpr_shadow) { + if (error == 0 && tpr_shadowing) { virtual_interrupt_delivery = 1; TUNABLE_INT_FETCH("hw.vmm.vmx.use_apic_vid", &virtual_interrupt_delivery); @@ -776,13 +794,6 @@ vmx_init(int ipinum) procbased_ctls2 &= ~PROCBASED2_VIRTUALIZE_X2APIC_MODE; /* - * No need to emulate accesses to %CR8 if virtual - * interrupt delivery is enabled. - */ - procbased_ctls &= ~PROCBASED_CR8_LOAD_EXITING; - procbased_ctls &= ~PROCBASED_CR8_STORE_EXITING; - - /* * Check for Posted Interrupts only if Virtual Interrupt * Delivery is enabled. */ @@ -1051,10 +1062,13 @@ vmx_vminit(struct vm *vm, pmap_t pmap) vmx->ctx[i].guest_dr6 = DBREG_DR6_RESERVED1; error += vmwrite(VMCS_GUEST_DR7, DBREG_DR7_RESERVED1); - if (virtual_interrupt_delivery) { - error += vmwrite(VMCS_APIC_ACCESS, APIC_ACCESS_ADDRESS); + if (tpr_shadowing) { error += vmwrite(VMCS_VIRTUAL_APIC, vtophys(&vmx->apic_page[i])); + } + + if (virtual_interrupt_delivery) { + error += vmwrite(VMCS_APIC_ACCESS, APIC_ACCESS_ADDRESS); error += vmwrite(VMCS_EOI_EXIT0, 0); error += vmwrite(VMCS_EOI_EXIT1, 0); error += vmwrite(VMCS_EOI_EXIT2, 0); @@ -2645,6 +2659,12 @@ vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_ SDT_PROBE3(vmm, vmx, exit, mwait, vmx, vcpu, vmexit); vmexit->exitcode = VM_EXITCODE_MWAIT; break; + case EXIT_REASON_TPR: + vlapic = vm_lapic(vmx->vm, vcpu); + vlapic_sync_tpr(vlapic); + vmexit->inst_length = 0; + handled = HANDLED; + break; case EXIT_REASON_VMCALL: case EXIT_REASON_VMCLEAR: case EXIT_REASON_VMLAUNCH: @@ -2931,6 +2951,16 @@ vmx_run(void *arg, int vcpu, register_t rip, pmap_t pm } /* + * If TPR Shadowing is enabled, the TPR Threshold + * must be updated right before entering the guest. + */ + if (tpr_shadowing && !virtual_interrupt_delivery) { + if ((vmx->cap[vcpu].proc_ctls & PROCBASED_USE_TPR_SHADOW) != 0) { + vmcs_write(VMCS_TPR_THRESHOLD, vlapic_get_cr8(vlapic)); + } + } + + /* * VM exits restore the base address but not the * limits of GDTR and IDTR. The VMCS only stores the * base address, so VM exits set the limits to 0xffff. @@ -3604,10 +3634,33 @@ vmx_set_tmr(struct vlapic *vlapic, int vector, bool le } static void -vmx_enable_x2apic_mode(struct vlapic *vlapic) +vmx_enable_x2apic_mode_ts(struct vlapic *vlapic) { struct vmx *vmx; struct vmcs *vmcs; + uint32_t proc_ctls; + int vcpuid; + + vcpuid = vlapic->vcpuid; + vmx = ((struct vlapic_vtx *)vlapic)->vmx; + vmcs = &vmx->vmcs[vcpuid]; + + proc_ctls = vmx->cap[vcpuid].proc_ctls; + proc_ctls &= ~PROCBASED_USE_TPR_SHADOW; + proc_ctls |= PROCBASED_CR8_LOAD_EXITING; + proc_ctls |= PROCBASED_CR8_STORE_EXITING; + vmx->cap[vcpuid].proc_ctls = proc_ctls; + + VMPTRLD(vmcs); + vmcs_write(VMCS_PRI_PROC_BASED_CTLS, proc_ctls); + VMCLEAR(vmcs); +} + +static void +vmx_enable_x2apic_mode_vid(struct vlapic *vlapic) +{ + struct vmx *vmx; + struct vmcs *vmcs; uint32_t proc_ctls2; int vcpuid, error; @@ -3765,12 +3818,16 @@ vmx_vlapic_init(void *arg, int vcpuid) vlapic_vtx->pir_desc = &vmx->pir_desc[vcpuid]; vlapic_vtx->vmx = vmx; + if (tpr_shadowing) { + vlapic->ops.enable_x2apic_mode = vmx_enable_x2apic_mode_ts; + } + if (virtual_interrupt_delivery) { vlapic->ops.set_intr_ready = vmx_set_intr_ready; vlapic->ops.pending_intr = vmx_pending_intr; vlapic->ops.intr_accepted = vmx_intr_accepted; vlapic->ops.set_tmr = vmx_set_tmr; - vlapic->ops.enable_x2apic_mode = vmx_enable_x2apic_mode; + vlapic->ops.enable_x2apic_mode = vmx_enable_x2apic_mode_vid; } if (posted_interrupts) Modified: stable/12/sys/amd64/vmm/io/vlapic.c ============================================================================== --- stable/12/sys/amd64/vmm/io/vlapic.c Sun Apr 19 17:01:21 2020 (r360102) +++ stable/12/sys/amd64/vmm/io/vlapic.c Sun Apr 19 17:19:29 2020 (r360103) @@ -549,6 +549,12 @@ vlapic_update_ppr(struct vlapic *vlapic) VLAPIC_CTR1(vlapic, "vlapic_update_ppr 0x%02x", ppr); } +void +vlapic_sync_tpr(struct vlapic *vlapic) +{ + vlapic_update_ppr(vlapic); +} + static VMM_STAT(VLAPIC_GRATUITOUS_EOI, "EOI without any in-service interrupt"); static void @@ -1094,6 +1100,8 @@ vlapic_pending_intr(struct vlapic *vlapic, int *vecptr int idx, i, bitpos, vector; uint32_t *irrptr, val; + vlapic_update_ppr(vlapic); + if (vlapic->ops.pending_intr) return ((*vlapic->ops.pending_intr)(vlapic, vecptr)); @@ -1151,7 +1159,6 @@ vlapic_intr_accepted(struct vlapic *vlapic, int vector panic("isrvec_stk_top overflow %d", stk_top); vlapic->isrvec_stk[stk_top] = vector; - vlapic_update_ppr(vlapic); } void Modified: stable/12/sys/amd64/vmm/io/vlapic.h ============================================================================== --- stable/12/sys/amd64/vmm/io/vlapic.h Sun Apr 19 17:01:21 2020 (r360102) +++ stable/12/sys/amd64/vmm/io/vlapic.h Sun Apr 19 17:19:29 2020 (r360103) @@ -75,6 +75,8 @@ void vlapic_set_error(struct vlapic *vlapic, uint32_t void vlapic_fire_cmci(struct vlapic *vlapic); int vlapic_trigger_lvt(struct vlapic *vlapic, int vector); +void vlapic_sync_tpr(struct vlapic *vlapic); + uint64_t vlapic_get_apicbase(struct vlapic *vlapic); int vlapic_set_apicbase(struct vlapic *vlapic, uint64_t val); void vlapic_set_x2apic_state(struct vm *vm, int vcpuid, enum x2apic_state s); From owner-svn-src-all@freebsd.org Sun Apr 19 17:28:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7606627C137; Sun, 19 Apr 2020 17:28:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494xd72X4Dz4dqX; Sun, 19 Apr 2020 17:28:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 520F81638; Sun, 19 Apr 2020 17:28:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JHSh1S019559; Sun, 19 Apr 2020 17:28:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JHShLs019558; Sun, 19 Apr 2020 17:28:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202004191728.03JHShLs019558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 19 Apr 2020 17:28:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360104 - head/sys/dev/evdev X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/dev/evdev X-SVN-Commit-Revision: 360104 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 17:28:43 -0000 Author: delphij Date: Sun Apr 19 17:28:42 2020 New Revision: 360104 URL: https://svnweb.freebsd.org/changeset/base/360104 Log: Use LIST_FOREACH_SAFE instead of LIST_FOREACH as we are removing elements in the middle. This fixes a panic when detaching USB mouse. PR: 245732 Reviewed by: wulf MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D24500 Modified: head/sys/dev/evdev/evdev.c Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Sun Apr 19 17:19:29 2020 (r360103) +++ head/sys/dev/evdev/evdev.c Sun Apr 19 17:28:42 2020 (r360104) @@ -358,7 +358,7 @@ evdev_register_mtx(struct evdev_dev *evdev, struct mtx int evdev_unregister(struct evdev_dev *evdev) { - struct evdev_client *client; + struct evdev_client *client, *tmp; int ret; debugf(evdev, "%s: unregistered evdev provider: %s\n", evdev->ev_shortname, evdev->ev_name); @@ -368,7 +368,7 @@ evdev_unregister(struct evdev_dev *evdev) EVDEV_LOCK(evdev); evdev->ev_cdev->si_drv1 = NULL; /* Wake up sleepers */ - LIST_FOREACH(client, &evdev->ev_clients, ec_link) { + LIST_FOREACH_SAFE(client, &evdev->ev_clients, ec_link, tmp) { evdev_revoke_client(client); evdev_dispose_client(evdev, client); EVDEV_CLIENT_LOCKQ(client); From owner-svn-src-all@freebsd.org Sun Apr 19 17:53:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77CBF27CC9A; Sun, 19 Apr 2020 17:53:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 494yB12d6Zz3Cb0; Sun, 19 Apr 2020 17:53:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 555AA1BFA; Sun, 19 Apr 2020 17:53:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JHrj7J038352; Sun, 19 Apr 2020 17:53:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JHri5Z038350; Sun, 19 Apr 2020 17:53:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004191753.03JHri5Z038350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 19 Apr 2020 17:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360105 - head/sys/dev/sound/pci/hda X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 360105 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 17:53:45 -0000 Author: emaste Date: Sun Apr 19 17:53:44 2020 New Revision: 360105 URL: https://svnweb.freebsd.org/changeset/base/360105 Log: snd_hda: whitespace and style(9) cleanups Modified: head/sys/dev/sound/pci/hda/hdac.c head/sys/dev/sound/pci/hda/hdacc.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Sun Apr 19 17:28:42 2020 (r360104) +++ head/sys/dev/sound/pci/hda/hdac.c Sun Apr 19 17:53:44 2020 (r360105) @@ -360,8 +360,7 @@ hdac_poll_callback(void *arg) hdac_unlock(sc); return; } - callout_reset(&sc->poll_callout, sc->poll_ival, - hdac_poll_callback, sc); + callout_reset(&sc->poll_callout, sc->poll_ival, hdac_poll_callback, sc); hdac_unlock(sc); hdac_intr_handler(sc); @@ -412,7 +411,7 @@ hdac_reset(struct hdac_softc *sc, int wakeup) if (!(gctl & HDAC_GCTL_CRST)) break; DELAY(10); - } while (--count); + } while (--count); if (gctl & HDAC_GCTL_CRST) { device_printf(sc->dev, "Unable to put hdac in reset\n"); return (ENXIO); @@ -446,7 +445,6 @@ hdac_reset(struct hdac_softc *sc, int wakeup) return (0); } - /**************************************************************************** * int hdac_get_capabilities(struct hdac_softc *); * @@ -620,11 +618,10 @@ hdac_dma_alloc_fail: return (result); } - /**************************************************************************** * void hdac_dma_free(struct hdac_softc *, struct hdac_dma *) * - * Free a struct dhac_dma that has been previously allocated via the + * Free a struct hdac_dma that has been previously allocated via the * hdac_dma_alloc function. ****************************************************************************/ static void @@ -1041,8 +1038,7 @@ hdac_probe(device_t dev) if (HDA_DEV_MATCH(hdac_devices[i].model, model) && class == PCIC_MULTIMEDIA && subclass == PCIS_MULTIMEDIA_HDA) { - snprintf(desc, sizeof(desc), - "%s (0x%04x)", + snprintf(desc, sizeof(desc), "%s (0x%04x)", hdac_devices[i].desc, pci_get_device(dev)); result = BUS_PROBE_GENERIC; break; @@ -1700,20 +1696,17 @@ hdac_print_child(device_t dev, device_t child) int retval; retval = bus_print_child_header(dev, child); - retval += printf(" at cad %d", - (int)(intptr_t)device_get_ivars(child)); + retval += printf(" at cad %d", (int)(intptr_t)device_get_ivars(child)); retval += bus_print_child_footer(dev, child); return (retval); } static int -hdac_child_location_str(device_t dev, device_t child, char *buf, - size_t buflen) +hdac_child_location_str(device_t dev, device_t child, char *buf, size_t buflen) { - snprintf(buf, buflen, "cad=%d", - (int)(intptr_t)device_get_ivars(child)); + snprintf(buf, buflen, "cad=%d", (int)(intptr_t)device_get_ivars(child)); return (0); } @@ -1724,8 +1717,8 @@ hdac_child_pnpinfo_str_method(device_t dev, device_t c struct hdac_softc *sc = device_get_softc(dev); nid_t cad = (uintptr_t)device_get_ivars(child); - snprintf(buf, buflen, "vendor=0x%04x device=0x%04x revision=0x%02x " - "stepping=0x%02x", + snprintf(buf, buflen, + "vendor=0x%04x device=0x%04x revision=0x%02x stepping=0x%02x", sc->codecs[cad].vendor_id, sc->codecs[cad].device_id, sc->codecs[cad].revision_id, sc->codecs[cad].stepping_id); return (0); @@ -1901,8 +1894,8 @@ hdac_stream_free(device_t dev, device_t child, int dir } static int -hdac_stream_start(device_t dev, device_t child, - int dir, int stream, bus_addr_t buf, int blksz, int blkcnt) +hdac_stream_start(device_t dev, device_t child, int dir, int stream, + bus_addr_t buf, int blksz, int blkcnt) { struct hdac_softc *sc = device_get_softc(dev); struct hdac_bdle *bdle; Modified: head/sys/dev/sound/pci/hda/hdacc.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdacc.c Sun Apr 19 17:28:42 2020 (r360104) +++ head/sys/dev/sound/pci/hda/hdacc.c Sun Apr 19 17:53:44 2020 (r360105) @@ -434,7 +434,8 @@ hdacc_probe(device_t dev) int i; id = ((uint32_t)hda_get_vendor_id(dev) << 16) + hda_get_device_id(dev); - revid = ((uint32_t)hda_get_revision_id(dev) << 8) + hda_get_stepping_id(dev); + revid = ((uint32_t)hda_get_revision_id(dev) << 8) + + hda_get_stepping_id(dev); for (i = 0; i < nitems(hdacc_codecs); i++) { if (!HDA_DEV_MATCH(hdacc_codecs[i].id, id)) @@ -525,8 +526,7 @@ hdacc_detach(device_t dev) } static int -hdacc_child_location_str(device_t dev, device_t child, char *buf, - size_t buflen) +hdacc_child_location_str(device_t dev, device_t child, char *buf, size_t buflen) { struct hdacc_fg *fg = device_get_ivars(child); @@ -645,8 +645,8 @@ hdacc_stream_free(device_t dev, device_t child, int di } static int -hdacc_stream_start(device_t dev, device_t child, - int dir, int stream, bus_addr_t buf, int blksz, int blkcnt) +hdacc_stream_start(device_t dev, device_t child, int dir, int stream, + bus_addr_t buf, int blksz, int blkcnt) { return (HDAC_STREAM_START(device_get_parent(dev), dev, From owner-svn-src-all@freebsd.org Sun Apr 19 19:16:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9803F27EE5A; Sun, 19 Apr 2020 19:16:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49501r1r64z3KgJ; Sun, 19 Apr 2020 19:16:48 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ot1-f50.google.com with SMTP id m13so6159989otf.6; Sun, 19 Apr 2020 12:16:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=93EEcJjnbSVXuHnBhbSLYnEA6cj3Ho4wKk4dXDHKAzw=; b=L0gHBk44Hrkp4cNWSnW6eTVMjlHah/bAhigPvIjBfRVnCoDjxchFeDcGHyTJu4H82j 3pkqKUB8H2x7eBHMlNPRtyWzzCVpCF+GlURw10eMed94Wdo+6ya5AhzBpSHBUoSPokj3 RRTrQJeOOr2fQmrg6m448lU54R10tDSMJT4uIGaEeKs79nvQ2Zub+/DRKaus5B3yZsPy Q/FklyEqIEDwP3mkK/4NFgf2d1HR6i1YEwBzfv1eDUIbZmnmmNqFX26sccf0FeEAv/Xv KoZo0g+k1wRp8fuQp1ZHr4OcD4wAj2s7ivcWQNUA1BzOZ7efXDTOekIfHNhRtNwLSSjA bTlA== X-Gm-Message-State: AGi0Pua8Gcnj12FfYNaWkBOLtM8iSOLG+WYtcTy6qYc8RtNkWLuOZ3iF DLL1xeD5eula007gg8oDWTiYXZhY X-Google-Smtp-Source: APiQypICq5hhS58W19DJeyj/7UcQIZTY6OwFbMgzXA8iPUv+ugBpDR0XUC0tYuT5Br9j6KDTG7dGmg== X-Received: by 2002:a05:6830:314e:: with SMTP id c14mr7219918ots.7.1587323806548; Sun, 19 Apr 2020 12:16:46 -0700 (PDT) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com. [209.85.167.182]) by smtp.gmail.com with ESMTPSA id n2sm883045oie.46.2020.04.19.12.16.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Apr 2020 12:16:46 -0700 (PDT) Received: by mail-oi1-f182.google.com with SMTP id j16so6923810oih.10; Sun, 19 Apr 2020 12:16:45 -0700 (PDT) X-Received: by 2002:a05:6808:28b:: with SMTP id z11mr1076119oic.135.1587323805656; Sun, 19 Apr 2020 12:16:45 -0700 (PDT) MIME-Version: 1.0 References: <202004191701.03JH1LFA002938@repo.freebsd.org> In-Reply-To: <202004191701.03JH1LFA002938@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sun, 19 Apr 2020 12:16:34 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360102 - in head: libexec/rc/rc.d share/mk tools/build/mk To: Cy Schubert Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49501r1r64z3KgJ X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 19:16:48 -0000 Hm, some of us just want kerberos to be completed excised. This change makes WITHOUT_KERBEROS retain portions of kerberos? That seems unfortunate. On Sun, Apr 19, 2020 at 10:01 AM Cy Schubert wrote: > > Author: cy > Date: Sun Apr 19 17:01:21 2020 > New Revision: 360102 > URL: https://svnweb.freebsd.org/changeset/base/360102 > > Log: > Conditionally install Kerberos rc files based on MK_KERBEROS_SCRIPTS > instead of MK_KERBEROS. The reason for this change is some users > prefer to build FreeBSD WITHOUT_KERBEROS, wanting to retain the > Kerberos rc scripts to start/stop MIT Kerberos or Heimdal from ports. > > PR: 197337 > Reported by: Adam McDougall > Reviewed by: imp > Differential Revision: https://reviews.freebsd.org/D24252 > > Modified: > head/libexec/rc/rc.d/Makefile > head/share/mk/bsd.opts.mk > head/share/mk/src.opts.mk > head/tools/build/mk/OptionalObsoleteFiles.inc > > Modified: head/libexec/rc/rc.d/Makefile > ============================================================================== > --- head/libexec/rc/rc.d/Makefile Sun Apr 19 17:01:17 2020 (r360101) > +++ head/libexec/rc/rc.d/Makefile Sun Apr 19 17:01:21 2020 (r360102) > @@ -242,14 +242,17 @@ CONFS+= lpd > .if ${MK_KERBEROS} != "no" > CONFS+= ipropd_master > CONFS+= ipropd_slave > -_kadmind= kadmind > -_kdc= kdc > -_kfd= kfd > -_kpasswdd= kpasswdd > > DIRS+= VAR_HEMIDAL > VAR_HEMIDAL= /var/heimdal > VAR_HEMIDAL_MODE= 700 > +.endif > + > +.if ${MK_KERBEROS_SCRIPTS} != "no" > +_kadmind= kadmind > +_kdc= kdc > +_kfd= kfd > +_kpasswdd= kpasswdd > .endif > > .if ${MK_MAIL} != "no" > > Modified: head/share/mk/bsd.opts.mk > ============================================================================== > --- head/share/mk/bsd.opts.mk Sun Apr 19 17:01:17 2020 (r360101) > +++ head/share/mk/bsd.opts.mk Sun Apr 19 17:01:21 2020 (r360102) > @@ -55,6 +55,7 @@ __DEFAULT_YES_OPTIONS = \ > INCLUDES \ > INSTALLLIB \ > KERBEROS \ > + KERBEROS_SCRIPTS \ > MAKE_CHECK_USE_SANDBOX \ > MAN \ > MANCOMPRESS \ > > Modified: head/share/mk/src.opts.mk > ============================================================================== > --- head/share/mk/src.opts.mk Sun Apr 19 17:01:17 2020 (r360101) > +++ head/share/mk/src.opts.mk Sun Apr 19 17:01:21 2020 (r360102) > @@ -237,6 +237,7 @@ __DEFAULT_DEPENDENT_OPTIONS= \ > INET \ > INET6 \ > KERBEROS \ > + KERBEROS_SCRIPTS \ > KVM \ > NETGRAPH \ > PAM \ > > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > ============================================================================== > --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Apr 19 17:01:17 2020 (r360101) > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Apr 19 17:01:21 2020 (r360102) > @@ -3152,13 +3152,9 @@ OLD_FILES+=usr/libexec/hprop > OLD_FILES+=usr/libexec/hpropd > OLD_FILES+=usr/libexec/ipropd-master > OLD_FILES+=usr/libexec/ipropd-slave > -OLD_FILES+=usr/libexec/kadmind > OLD_FILES+=usr/libexec/kcm > -OLD_FILES+=usr/libexec/kdc > OLD_FILES+=usr/libexec/kdigest > -OLD_FILES+=usr/libexec/kfd > OLD_FILES+=usr/libexec/kimpersonate > -OLD_FILES+=usr/libexec/kpasswdd > OLD_FILES+=usr/sbin/kstash > OLD_FILES+=usr/sbin/ktutil > OLD_FILES+=usr/sbin/iprop-log > @@ -3878,6 +3874,13 @@ OLD_FILES+=usr/share/man/man8/pam_krb5.8.gz > OLD_FILES+=usr/share/man/man8/pam_ksu.8.gz > OLD_FILES+=usr/share/man/man8/string2key.8.gz > OLD_FILES+=usr/share/man/man8/verify_krb5_conf.8.gz > +.endif > + > +.if ${MK_KERBEROS_SCRIPTS} == no > +OLD_FILES+=usr/libexec/kadmind > +OLD_FILES+=usr/libexec/kdc > +OLD_FILES+=usr/libexec/kfd > +OLD_FILES+=usr/libexec/kpasswdd > .endif > > .if ${MK_KERBEROS_SUPPORT} == no From owner-svn-src-all@freebsd.org Sun Apr 19 19:37:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A92F727F953; Sun, 19 Apr 2020 19:37:27 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4950Td4f5nz3M9y; Sun, 19 Apr 2020 19:37:25 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1587325038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZKrbv1I+1sPzcnYfwGUyhvP8icDfQv+G8qk7V4OJwKk=; b=K7HXRgNAmclEyByOvSdsbKlIggD62SSjDFs1TmSYgvfc5uoOFjjbA3EI/yJFsPokCCLL+C 4435urY1/mB9N9S7YN4TPXZ3B1fsS0nbbosKPgVyB3siqPF4tSRa7VbUGz7HKOgjKmzYpM sqMJL1E7088OPXbJkT/sqk1fCNca0Kk= Received: from tails.home (lfbn-idf2-1-900-181.w86-238.abo.wanadoo.fr [86.238.131.181]) by mx.blih.net (OpenSMTPD) with ESMTPSA id dbc470f2 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 19 Apr 2020 19:37:18 +0000 (UTC) Date: Sun, 19 Apr 2020 21:37:18 +0200 From: Emmanuel Vadot To: cy@freebsd.org Cc: cem@freebsd.org, src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r360102 - in head: libexec/rc/rc.d share/mk tools/build/mk Message-Id: <20200419213718.8c44dced2c4f67c8544f2434@bidouilliste.com> In-Reply-To: References: <202004191701.03JH1LFA002938@repo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4950Td4f5nz3M9y X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=K7HXRgNA; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-3.89 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[bidouilliste.com:+]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-1.39)[ip: (-9.26), ipnet: 212.83.128.0/19(1.88), asn: 12876(0.44), country: FR(0.00)]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 19:37:27 -0000 -- Emmanuel Vadot On Sun, 19 Apr 2020 12:16:34 -0700 Conrad Meyer wrote: > Hm, some of us just want kerberos to be completed excised. This > change makes WITHOUT_KERBEROS retain portions of kerberos? That seems > unfortunate. Agreed, It would be better to default MK_KERBEROS_SCRIPTS to yes and explicitly setting it to no when WITHOUT_KERBEROS=yes. One could then do WITHOUT_KERBEROS=yes and MK_KERBEROS_SCRIPTS=yes for such weird install. BTW, why would one want base script for ports utilities ? Couldn't the ports install some rc scripts with same functionnality as the base one ? Cheers, > On Sun, Apr 19, 2020 at 10:01 AM Cy Schubert wrote: > > > > Author: cy > > Date: Sun Apr 19 17:01:21 2020 > > New Revision: 360102 > > URL: https://svnweb.freebsd.org/changeset/base/360102 > > > > Log: > > Conditionally install Kerberos rc files based on MK_KERBEROS_SCRIPTS > > instead of MK_KERBEROS. The reason for this change is some users > > prefer to build FreeBSD WITHOUT_KERBEROS, wanting to retain the > > Kerberos rc scripts to start/stop MIT Kerberos or Heimdal from ports. > > > > PR: 197337 > > Reported by: Adam McDougall > > Reviewed by: imp > > Differential Revision: https://reviews.freebsd.org/D24252 > > > > Modified: > > head/libexec/rc/rc.d/Makefile > > head/share/mk/bsd.opts.mk > > head/share/mk/src.opts.mk > > head/tools/build/mk/OptionalObsoleteFiles.inc > > > > Modified: head/libexec/rc/rc.d/Makefile > > ============================================================================== > > --- head/libexec/rc/rc.d/Makefile Sun Apr 19 17:01:17 2020 (r360101) > > +++ head/libexec/rc/rc.d/Makefile Sun Apr 19 17:01:21 2020 (r360102) > > @@ -242,14 +242,17 @@ CONFS+= lpd > > .if ${MK_KERBEROS} != "no" > > CONFS+= ipropd_master > > CONFS+= ipropd_slave > > -_kadmind= kadmind > > -_kdc= kdc > > -_kfd= kfd > > -_kpasswdd= kpasswdd > > > > DIRS+= VAR_HEMIDAL > > VAR_HEMIDAL= /var/heimdal > > VAR_HEMIDAL_MODE= 700 > > +.endif > > + > > +.if ${MK_KERBEROS_SCRIPTS} != "no" > > +_kadmind= kadmind > > +_kdc= kdc > > +_kfd= kfd > > +_kpasswdd= kpasswdd > > .endif > > > > .if ${MK_MAIL} != "no" > > > > Modified: head/share/mk/bsd.opts.mk > > ============================================================================== > > --- head/share/mk/bsd.opts.mk Sun Apr 19 17:01:17 2020 (r360101) > > +++ head/share/mk/bsd.opts.mk Sun Apr 19 17:01:21 2020 (r360102) > > @@ -55,6 +55,7 @@ __DEFAULT_YES_OPTIONS = \ > > INCLUDES \ > > INSTALLLIB \ > > KERBEROS \ > > + KERBEROS_SCRIPTS \ > > MAKE_CHECK_USE_SANDBOX \ > > MAN \ > > MANCOMPRESS \ > > > > Modified: head/share/mk/src.opts.mk > > ============================================================================== > > --- head/share/mk/src.opts.mk Sun Apr 19 17:01:17 2020 (r360101) > > +++ head/share/mk/src.opts.mk Sun Apr 19 17:01:21 2020 (r360102) > > @@ -237,6 +237,7 @@ __DEFAULT_DEPENDENT_OPTIONS= \ > > INET \ > > INET6 \ > > KERBEROS \ > > + KERBEROS_SCRIPTS \ > > KVM \ > > NETGRAPH \ > > PAM \ > > > > Modified: head/tools/build/mk/OptionalObsoleteFiles.inc > > ============================================================================== > > --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Apr 19 17:01:17 2020 (r360101) > > +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Apr 19 17:01:21 2020 (r360102) > > @@ -3152,13 +3152,9 @@ OLD_FILES+=usr/libexec/hprop > > OLD_FILES+=usr/libexec/hpropd > > OLD_FILES+=usr/libexec/ipropd-master > > OLD_FILES+=usr/libexec/ipropd-slave > > -OLD_FILES+=usr/libexec/kadmind > > OLD_FILES+=usr/libexec/kcm > > -OLD_FILES+=usr/libexec/kdc > > OLD_FILES+=usr/libexec/kdigest > > -OLD_FILES+=usr/libexec/kfd > > OLD_FILES+=usr/libexec/kimpersonate > > -OLD_FILES+=usr/libexec/kpasswdd > > OLD_FILES+=usr/sbin/kstash > > OLD_FILES+=usr/sbin/ktutil > > OLD_FILES+=usr/sbin/iprop-log > > @@ -3878,6 +3874,13 @@ OLD_FILES+=usr/share/man/man8/pam_krb5.8.gz > > OLD_FILES+=usr/share/man/man8/pam_ksu.8.gz > > OLD_FILES+=usr/share/man/man8/string2key.8.gz > > OLD_FILES+=usr/share/man/man8/verify_krb5_conf.8.gz > > +.endif > > + > > +.if ${MK_KERBEROS_SCRIPTS} == no > > +OLD_FILES+=usr/libexec/kadmind > > +OLD_FILES+=usr/libexec/kdc > > +OLD_FILES+=usr/libexec/kfd > > +OLD_FILES+=usr/libexec/kpasswdd > > .endif > > > > .if ${MK_KERBEROS_SUPPORT} == no From owner-svn-src-all@freebsd.org Sun Apr 19 19:54:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A33922A8276; Sun, 19 Apr 2020 19:54:16 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4950s43kNSz3Ngj; Sun, 19 Apr 2020 19:54:16 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 6EAC2ED5; Sun, 19 Apr 2020 19:54:16 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f173.google.com with SMTP id q17so6820113qtp.4; Sun, 19 Apr 2020 12:54:16 -0700 (PDT) X-Gm-Message-State: AGi0PuZKPOj7Bum2Q52YQnDv8iNAWCbrT2YFfUgONeeHJq5lUsDPLLSK nIGCHlYB/PW1hA51jPiipTZ3UXFZLXOSyIHiXXQ= X-Google-Smtp-Source: APiQypIiwwrTMGNMbDJeF2Eci8LKBzhG+QrBqB6TkcyP/IqO9mKrurEJh6ltV3HzEG8FE67qmXvk8X5cCEEcWXUEanw= X-Received: by 2002:aed:3ea5:: with SMTP id n34mr12632940qtf.60.1587326055854; Sun, 19 Apr 2020 12:54:15 -0700 (PDT) MIME-Version: 1.0 References: <202004191701.03JH1LFA002938@repo.freebsd.org> In-Reply-To: <202004191701.03JH1LFA002938@repo.freebsd.org> From: Kyle Evans Date: Sun, 19 Apr 2020 14:54:04 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360102 - in head: libexec/rc/rc.d share/mk tools/build/mk To: Cy Schubert Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 19:54:16 -0000 On Sun, Apr 19, 2020 at 12:01 PM Cy Schubert wrote: > > Author: cy > Date: Sun Apr 19 17:01:21 2020 > New Revision: 360102 > URL: https://svnweb.freebsd.org/changeset/base/360102 > > Log: > Conditionally install Kerberos rc files based on MK_KERBEROS_SCRIPTS > instead of MK_KERBEROS. The reason for this change is some users > prefer to build FreeBSD WITHOUT_KERBEROS, wanting to retain the > Kerberos rc scripts to start/stop MIT Kerberos or Heimdal from ports. > > PR: 197337 > Reported by: Adam McDougall > Reviewed by: imp > Differential Revision: https://reviews.freebsd.org/D24252 > > [... snip ...] > Modified: head/share/mk/src.opts.mk > ============================================================================== > --- head/share/mk/src.opts.mk Sun Apr 19 17:01:17 2020 (r360101) > +++ head/share/mk/src.opts.mk Sun Apr 19 17:01:21 2020 (r360102) > @@ -237,6 +237,7 @@ __DEFAULT_DEPENDENT_OPTIONS= \ > INET \ > INET6 \ > KERBEROS \ > + KERBEROS_SCRIPTS \ > KVM \ > NETGRAPH \ > PAM \ > This hunk seems to be wrong, looking at more context. It's setting up a MK_KERBEROS_SCRIPTS_SUPPORT option... I'm kinda guessing what you intended is what the other commentary on this has been about -- defaulting KERBEROS_SCRIPTS to ON unless KERBEROS is OFF. Just moving it up to the __DEFAULT_DEPENDENT_OPTIONS block doesn't seem to do the trick, though, I guess kerberos is weird. Thanks, Kyle Evans From owner-svn-src-all@freebsd.org Sun Apr 19 19:56:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4F442A831A; Sun, 19 Apr 2020 19:56:08 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4950vC4rKPz3NrQ; Sun, 19 Apr 2020 19:56:07 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id QG2rjFX6T62brQG2ujKDT2; Sun, 19 Apr 2020 13:56:05 -0600 X-Authority-Analysis: v=2.3 cv=LKf9vKe9 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=cl8xLZFz6L8A:10 a=7ASnObcnAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=qXlbvJYPZq5jwDjV0qwA:9 a=CjuIK1q_8ugA:10 a=a0pkbRptYPMA:10 a=pj5rz7AvTRnaHDIeLm0D:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 377E6279; Sun, 19 Apr 2020 12:56:01 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 03JJu1lu005677; Sun, 19 Apr 2020 12:56:01 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 03JJu0vL005674; Sun, 19 Apr 2020 12:56:00 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202004191956.03JJu0vL005674@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Emmanuel Vadot cc: cy@freebsd.org, cem@freebsd.org, src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r360102 - in head: libexec/rc/rc.d share/mk tools/build/mk In-reply-to: <20200419213718.8c44dced2c4f67c8544f2434@bidouilliste.com> References: <202004191701.03JH1LFA002938@repo.freebsd.org> <20200419213718.8c44dced2c4f67c8544f2434@bidouilliste.com> Comments: In-reply-to Emmanuel Vadot message dated "Sun, 19 Apr 2020 21:37:18 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 19 Apr 2020 12:56:00 -0700 X-CMAE-Envelope: MS4wfLx+BQm1gy1qCt18BzQmoZM3gG12ZHOzGDDJPbq0vLPbsjPff4o1UoUIS/i/kB+uS2zqhZtPWZYvszbpngP7SsgWQGMzaz54Zl3eFBhaDXK7m+OTxwH/ gzDBrBqMAHOnnNJMs5jzVwPf0/yMZEy80rY+eMI5D1cKbDQFE03Y+idAU2ULGjvXGNAFB+Bwo7+c8LHC2fqOiwA1HfhkTqdVjJ7XFoyqssTOqCXJBev9/BMm edQ1dX/4KlZXVtI1zGocnnvLCGN6nTOk3DvRhuxPSubtzoCKoRAlgyl5xbFJi7tmVzWfO/3y5uE+vr/Ohh9AmM7JMzP9I/K3b+0gng+FCpv8TgYKDw1N6jTO +6PVfTiM X-Rspamd-Queue-Id: 4950vC4rKPz3NrQ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.9) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.23 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RWL_MAILSPIKE_GOOD(0.00)[9.134.59.64.rep.mailspike.net : 127.0.0.18]; RCPT_COUNT_FIVE(0.00)[6]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.53)[ip: (-6.72), ipnet: 64.59.128.0/20(-3.28), asn: 6327(-2.56), country: CA(-0.09)]; RCVD_IN_DNSWL_LOW(-0.10)[9.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 19:56:08 -0000 In message <20200419213718.8c44dced2c4f67c8544f2434@bidouilliste.com>, Emmanuel Vadot writes: > -- > Emmanuel Vadot > On Sun, 19 Apr 2020 12:16:34 -0700 > Conrad Meyer wrote: > > > Hm, some of us just want kerberos to be completed excised. This > > change makes WITHOUT_KERBEROS retain portions of kerberos? That seems > > unfortunate. > > Agreed, > It would be better to default MK_KERBEROS_SCRIPTS to yes and > explicitly setting it to no when WITHOUT_KERBEROS=yes. One could then > do WITHOUT_KERBEROS=yes and MK_KERBEROS_SCRIPTS=yes for such weird > install. > BTW, why would one want base script for ports utilities ? Couldn't the > ports install some rc scripts with same functionnality as the base one ? IMO that should be a separate port. In regard to removing kerberos from base entirely. The original suggestion by pfg@ to replace Heimdal in base (and taken up by myself), was met with significant resistance from a person. The current plan is to make Heimdal private, for now, when I get the cycles. I would like to see the removal of Heimdal from base some day, either replacing it with MIT or entirely (relying on ports only). Pkgbase may make it politically palatable, providing the ability to move forward toward this goal. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sun Apr 19 20:05:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00CF52A884A; Sun, 19 Apr 2020 20:05:42 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49516D5bRBz3PqC; Sun, 19 Apr 2020 20:05:40 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id QGC9jFahY62brQGCAjKEvz; Sun, 19 Apr 2020 14:05:39 -0600 X-Authority-Analysis: v=2.3 cv=LKf9vKe9 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=cl8xLZFz6L8A:10 a=6I5d2MoRAAAA:8 a=OItwt65DAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=qjgrWDkeqHQRnLt4dm4A:9 a=CjuIK1q_8ugA:10 a=vRcdKC0ogzYA:10 a=IjZwj45LgO3ly-622nXo:22 a=IuhtMwT3ZfbKfYFiE3X7:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 3CD1B321; Sun, 19 Apr 2020 13:05:37 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 03JK5beV005784; Sun, 19 Apr 2020 13:05:37 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 03JK5bIP005781; Sun, 19 Apr 2020 13:05:37 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202004192005.03JK5bIP005781@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Kyle Evans cc: Cy Schubert , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r360102 - in head: libexec/rc/rc.d share/mk tools/build/mk In-reply-to: References: <202004191701.03JH1LFA002938@repo.freebsd.org> Comments: In-reply-to Kyle Evans message dated "Sun, 19 Apr 2020 14:54:04 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 19 Apr 2020 13:05:37 -0700 X-CMAE-Envelope: MS4wfPAsTHtuIRdiJD10uPJy95YItRZC4wCJkmuVj0C8DMqHZ3QLCybU70G3qpZm/P4XjJUjUytCrsouqoT/c/8002kj4ZVxeUEZpfH16rdhiZCatNsa+W1M rA/dQhRCuuknf1QNnOrgK7Hv3lmrxiaI4ye07fOXALIvyjo8f69K6KcF8Tc3RjRRwCvfGtN1HCzg/ZSi8eGB2xZm58PaC8sFTMkWtirJAKSjOeIYzoEriw4+ /wvmTPqBmVb/C/sumGGfih01hsQoI4mAWvhqr/lg/o6t3fMT9lKKWlk3Kl0XYN1o5xIaM9LgBRF68tw79g+rsg== X-Rspamd-Queue-Id: 49516D5bRBz3PqC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.9) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.23 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[9.134.59.64.rep.mailspike.net : 127.0.0.18]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; IP_SCORE(-2.53)[ip: (-6.71), ipnet: 64.59.128.0/20(-3.27), asn: 6327(-2.56), country: CA(-0.09)]; TO_DN_ALL(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[9.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 20:05:42 -0000 In message , Kyle Evans writes: > On Sun, Apr 19, 2020 at 12:01 PM Cy Schubert wrote: > > > > Author: cy > > Date: Sun Apr 19 17:01:21 2020 > > New Revision: 360102 > > URL: https://svnweb.freebsd.org/changeset/base/360102 > > > > Log: > > Conditionally install Kerberos rc files based on MK_KERBEROS_SCRIPTS > > instead of MK_KERBEROS. The reason for this change is some users > > prefer to build FreeBSD WITHOUT_KERBEROS, wanting to retain the > > Kerberos rc scripts to start/stop MIT Kerberos or Heimdal from ports. > > > > PR: 197337 > > Reported by: Adam McDougall > > Reviewed by: imp > > Differential Revision: https://reviews.freebsd.org/D24252 > > > > [... snip ...] > > Modified: head/share/mk/src.opts.mk > > =========================================================================== > === > > --- head/share/mk/src.opts.mk Sun Apr 19 17:01:17 2020 (r360101) > > +++ head/share/mk/src.opts.mk Sun Apr 19 17:01:21 2020 (r360102) > > @@ -237,6 +237,7 @@ __DEFAULT_DEPENDENT_OPTIONS= \ > > INET \ > > INET6 \ > > KERBEROS \ > > + KERBEROS_SCRIPTS \ > > KVM \ > > NETGRAPH \ > > PAM \ > > > > This hunk seems to be wrong, looking at more context. It's setting up > a MK_KERBEROS_SCRIPTS_SUPPORT option... I'm kinda guessing what you > intended is what the other commentary on this has been about -- > defaulting KERBEROS_SCRIPTS to ON unless KERBEROS is OFF. Just moving > it up to the __DEFAULT_DEPENDENT_OPTIONS block doesn't seem to do the > trick, though, I guess kerberos is weird. The point is to leave KERBEROS_SCRIPTS on while disabling KERBEROS to allow those who choose not to install Heimdal in base to use one of the ports instead. The other option might be to revert this and install conflicting scripts in ports, which I'm not enamoured with. This would be the source of additional PRs from people who attempt to enable one while not disabling the other. I have no tolerance for those types of PRs, as my coworkers at $JOB can attest to. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sun Apr 19 20:07:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 217402A8935; Sun, 19 Apr 2020 20:07:48 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49518h02Fzz3Q9S; Sun, 19 Apr 2020 20:07:48 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id E3E22100C; Sun, 19 Apr 2020 20:07:47 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f176.google.com with SMTP id s63so8484347qke.4; Sun, 19 Apr 2020 13:07:47 -0700 (PDT) X-Gm-Message-State: AGi0Puag6RQNKY0IwsfLEuBB8F+tiQ8rOUW2zDv3s1DNNUeJ2/z0Acw2 nNZGPQXnftRSr8fs/5sXW4kKunDWNjzumLIJBzk= X-Google-Smtp-Source: APiQypIFGh6Eu1ttxGhIynoYx7/R77/11W4moroVObqsfcFcHgX0W8MXKLKk2aySGmTHg4ThnnOFBdFy/J2RoFqqNVc= X-Received: by 2002:a37:6287:: with SMTP id w129mr12846760qkb.34.1587326867428; Sun, 19 Apr 2020 13:07:47 -0700 (PDT) MIME-Version: 1.0 References: <202004191701.03JH1LFA002938@repo.freebsd.org> <202004192005.03JK5bIP005781@slippy.cwsent.com> In-Reply-To: <202004192005.03JK5bIP005781@slippy.cwsent.com> From: Kyle Evans Date: Sun, 19 Apr 2020 15:07:36 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360102 - in head: libexec/rc/rc.d share/mk tools/build/mk To: Cy Schubert Cc: Cy Schubert , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 20:07:48 -0000 On Sun, Apr 19, 2020 at 3:05 PM Cy Schubert wrote: > > In message om> > , Kyle Evans writes: > > On Sun, Apr 19, 2020 at 12:01 PM Cy Schubert wrote: > > > > > > Author: cy > > > Date: Sun Apr 19 17:01:21 2020 > > > New Revision: 360102 > > > URL: https://svnweb.freebsd.org/changeset/base/360102 > > > > > > Log: > > > Conditionally install Kerberos rc files based on MK_KERBEROS_SCRIPTS > > > instead of MK_KERBEROS. The reason for this change is some users > > > prefer to build FreeBSD WITHOUT_KERBEROS, wanting to retain the > > > Kerberos rc scripts to start/stop MIT Kerberos or Heimdal from ports. > > > > > > PR: 197337 > > > Reported by: Adam McDougall > > > Reviewed by: imp > > > Differential Revision: https://reviews.freebsd.org/D24252 > > > > > > [... snip ...] > > > Modified: head/share/mk/src.opts.mk > > > =========================================================================== > > === > > > --- head/share/mk/src.opts.mk Sun Apr 19 17:01:17 2020 (r360101) > > > +++ head/share/mk/src.opts.mk Sun Apr 19 17:01:21 2020 (r360102) > > > @@ -237,6 +237,7 @@ __DEFAULT_DEPENDENT_OPTIONS= \ > > > INET \ > > > INET6 \ > > > KERBEROS \ > > > + KERBEROS_SCRIPTS \ > > > KVM \ > > > NETGRAPH \ > > > PAM \ > > > > > > > This hunk seems to be wrong, looking at more context. It's setting up > > a MK_KERBEROS_SCRIPTS_SUPPORT option... I'm kinda guessing what you > > intended is what the other commentary on this has been about -- > > defaulting KERBEROS_SCRIPTS to ON unless KERBEROS is OFF. Just moving > > it up to the __DEFAULT_DEPENDENT_OPTIONS block doesn't seem to do the > > trick, though, I guess kerberos is weird. > > The point is to leave KERBEROS_SCRIPTS on while disabling KERBEROS to allow > those who choose not to install Heimdal in base to use one of the ports > instead. > > The other option might be to revert this and install conflicting scripts in > ports, which I'm not enamoured with. This would be the source of additional > PRs from people who attempt to enable one while not disabling the other. I > have no tolerance for those types of PRs, as my coworkers at $JOB can > attest to. > The keyword is default; to default it to off if KERBEROS is off, which assumes the absence of any user-specified WITH_/WITHOUT_ KERBEROS_SCRIPTS. As soon as the user specifies one way or the other, the relationship is broken. From owner-svn-src-all@freebsd.org Sun Apr 19 20:40:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E35B2A95F6; Sun, 19 Apr 2020 20:40:02 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4951sr6dKDz3xSf; Sun, 19 Apr 2020 20:40:00 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id QGjNjFnqy62brQGjPjKK7d; Sun, 19 Apr 2020 14:39:59 -0600 X-Authority-Analysis: v=2.3 cv=LKf9vKe9 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=cl8xLZFz6L8A:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=OItwt65DAAAA:8 a=EkcXrb_YAAAA:8 a=85C-kqNnyAvj1W-UPvIA:9 a=CjuIK1q_8ugA:10 a=UJ0tAi3fqDAA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=IuhtMwT3ZfbKfYFiE3X7:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 29BA040D; Sun, 19 Apr 2020 13:39:57 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 03JKdvHv006016; Sun, 19 Apr 2020 13:39:57 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 03JKdv38006013; Sun, 19 Apr 2020 13:39:57 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202004192039.03JKdv38006013@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Kyle Evans cc: Cy Schubert , Cy Schubert , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r360102 - in head: libexec/rc/rc.d share/mk tools/build/mk In-reply-to: References: <202004191701.03JH1LFA002938@repo.freebsd.org> <202004192005.03JK5bIP005781@slippy.cwsent.com> Comments: In-reply-to Kyle Evans message dated "Sun, 19 Apr 2020 15:07:36 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 19 Apr 2020 13:39:57 -0700 X-CMAE-Envelope: MS4wfMMWWNmIDHuf0OXGCAYM7KLap/IjTR3/J/3LZHwCmOsIt/G5VO6YweBv3Mv1YODhHFr+CgJlhQhen8GwwhPK/dP89zcq1N6ZCnKEKf43tCuLqv7LEyrA S04QXzjtGYbpU+cIs8VBNEcglyFUjP9wbPUR9mHoQ5rWyfTsq8Kq76l+0RZ5VHsVRqyx+1t2tyeugqOQv/pBucYZfuF54DgD58P2HLsPxvLuQLYZo/isv1K0 PwKRWTNCR8NJ12SR/GGZ5P9dyMUM2dtvsn3MdNYF9dG3OrmSQo9vECzRGd4JJVNCzK/QgRzGtldlljOWvjcFgg== X-Rspamd-Queue-Id: 4951sr6dKDz3xSf X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.13) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.21 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[6]; REPLYTO_EQ_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.51)[ip: (-6.65), ipnet: 64.59.128.0/20(-3.27), asn: 6327(-2.56), country: CA(-0.09)]; RCVD_IN_DNSWL_LOW(-0.10)[13.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 20:40:02 -0000 In message , Kyle Evans writes: > On Sun, Apr 19, 2020 at 3:05 PM Cy Schubert wrote > : > > > > In message c > > om> > > , Kyle Evans writes: > > > On Sun, Apr 19, 2020 at 12:01 PM Cy Schubert wrote: > > > > > > > > Author: cy > > > > Date: Sun Apr 19 17:01:21 2020 > > > > New Revision: 360102 > > > > URL: https://svnweb.freebsd.org/changeset/base/360102 > > > > > > > > Log: > > > > Conditionally install Kerberos rc files based on MK_KERBEROS_SCRIPTS > > > > instead of MK_KERBEROS. The reason for this change is some users > > > > prefer to build FreeBSD WITHOUT_KERBEROS, wanting to retain the > > > > Kerberos rc scripts to start/stop MIT Kerberos or Heimdal from ports. > > > > > > > > PR: 197337 > > > > Reported by: Adam McDougall > > > > Reviewed by: imp > > > > Differential Revision: https://reviews.freebsd.org/D24252 > > > > > > > > [... snip ...] > > > > Modified: head/share/mk/src.opts.mk > > > > ======================================================================= > ==== > > > === > > > > --- head/share/mk/src.opts.mk Sun Apr 19 17:01:17 2020 (r36010 > 1) > > > > +++ head/share/mk/src.opts.mk Sun Apr 19 17:01:21 2020 (r36010 > 2) > > > > @@ -237,6 +237,7 @@ __DEFAULT_DEPENDENT_OPTIONS= \ > > > > INET \ > > > > INET6 \ > > > > KERBEROS \ > > > > + KERBEROS_SCRIPTS \ > > > > KVM \ > > > > NETGRAPH \ > > > > PAM \ > > > > > > > > > > This hunk seems to be wrong, looking at more context. It's setting up > > > a MK_KERBEROS_SCRIPTS_SUPPORT option... I'm kinda guessing what you > > > intended is what the other commentary on this has been about -- > > > defaulting KERBEROS_SCRIPTS to ON unless KERBEROS is OFF. Just moving > > > it up to the __DEFAULT_DEPENDENT_OPTIONS block doesn't seem to do the > > > trick, though, I guess kerberos is weird. > > > > The point is to leave KERBEROS_SCRIPTS on while disabling KERBEROS to allow > > those who choose not to install Heimdal in base to use one of the ports > > instead. > > > > The other option might be to revert this and install conflicting scripts in > > ports, which I'm not enamoured with. This would be the source of additional > > PRs from people who attempt to enable one while not disabling the other. I > > have no tolerance for those types of PRs, as my coworkers at $JOB can > > attest to. > > > > The keyword is default; to default it to off if KERBEROS is off, which > assumes the absence of any user-specified WITH_/WITHOUT_ > KERBEROS_SCRIPTS. As soon as the user specifies one way or the other, > the relationship is broken. Sure. I'll make that change tonight. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sun Apr 19 20:57:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FF242A9E53; Sun, 19 Apr 2020 20:57:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4952Fz2fHJz3yh8; Sun, 19 Apr 2020 20:57:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg1-x541.google.com with SMTP id r4so4020874pgg.4; Sun, 19 Apr 2020 13:57:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rbbZDMBVCnK/Z+JqgfjH+cKdy63mlPu0dKxtwyaDdR4=; b=WsFnROHgxvD6G3RvBfNToJQyzR3hK4Hq4mCQZ5tTzNDKMkL4VXe+UrEnfpRUk+yr5+ 3fe6EXG5VLLZzU7XpuhLSHREjmcKo0XHxd6QLxJGqTdBrO6N3sXWlqZHbI3ZJD41d4Ai WiVnXp62gTaIO9ucrXGlAa0gIsuMSvM8G8W3Q1cCzfTK1DjSQZb1kmu4XRVq3tIzTkoZ J0EmS8rSkFljkzr2V7Om32fLlpAp5nm3Qit5hpVkVkaYgASL8exhN7W/7pNzuzuaeWA5 gr5lq7+xYYeEpvrOj6ZRnRs0W+/FIhj1npnnQgIXzA9XqmCmkXi61HFaeAMwsfjsuQwE B5xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=rbbZDMBVCnK/Z+JqgfjH+cKdy63mlPu0dKxtwyaDdR4=; b=kMoaNKdrEcbN5rwZgxKLe8X+QlURRGEU+FYpvGWMEo+FcPf5gAz2V2qhXSNK7YlcMZ NYEaW/7dVvc6xLQSi632GyoR1mSI+1d0qfsFebrhfDFTfzDb556ijwxbA96FZvwUJhsc mqs4mvZPEx+/wipvGx8sMtMews14tWzTHQyWmQ6FolYi3EGy/OCqTFpVwNqSHT0Jb946 LkKzfUtcfJ12hO8QWgonokhGqGdOHAbxSvftHZje2dm+1gKiWDSqxA93+7WEB+uKiHlG joIUh/3P6FhjoOhFm3sE5UoxoQ0/3VbbFVdAd3pbuvnaj4T5pelIOsIVI0M8D/pRQAPg J1ZA== X-Gm-Message-State: AGi0PuYu7YrtleRSjw+8kH+pX65pXU9GEU5rnQxeJUIdouz/LyB224py uEnI6JDEe/JYqSpcj8WcuJjiv7jQz8A= X-Google-Smtp-Source: APiQypKYP3g1t6knxdcr7s1C9w+ntaRIO0UmKxassEDRyhr5NshtEnIFEUKted2YM9NLgUQOjIa64Q== X-Received: by 2002:a63:b557:: with SMTP id u23mr13297392pgo.160.1587329845128; Sun, 19 Apr 2020 13:57:25 -0700 (PDT) Received: from [192.168.20.26] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id c24sm5925459pfi.170.2020.04.19.13.57.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Apr 2020 13:57:24 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r360102 - in head: libexec/rc/rc.d share/mk tools/build/mk From: Enji Cooper In-Reply-To: <202004191701.03JH1LFA002938@repo.freebsd.org> Date: Sun, 19 Apr 2020 13:57:23 -0700 Cc: src-committers , svn-src-all , svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202004191701.03JH1LFA002938@repo.freebsd.org> To: Cy Schubert X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 4952Fz2fHJz3yh8 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 20:57:27 -0000 > On Apr 19, 2020, at 10:01 AM, Cy Schubert wrote: >=20 > Author: cy > Date: Sun Apr 19 17:01:21 2020 > New Revision: 360102 > URL: https://svnweb.freebsd.org/changeset/base/360102 >=20 > Log: > Conditionally install Kerberos rc files based on MK_KERBEROS_SCRIPTS > instead of MK_KERBEROS. The reason for this change is some users > prefer to build FreeBSD WITHOUT_KERBEROS, wanting to retain the > Kerberos rc scripts to start/stop MIT Kerberos or Heimdal from ports. >=20 > PR: 197337 > Reported by: Adam McDougall > Reviewed by: imp > Differential Revision: https://reviews.freebsd.org/D24252 Hi Cy, Having excised code like this in the past, I don=E2=80=99t think = this is the right approach: a separate slave port should be added that = handles the rc.d script installation, etc, or the scripts should be = added to the manifest for the ports. Thanks, -Enji= From owner-svn-src-all@freebsd.org Sun Apr 19 21:03:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 35AAE2AAF6D; Sun, 19 Apr 2020 21:03:52 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4952PM3dhbz41DG; Sun, 19 Apr 2020 21:03:51 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pl1-x630.google.com with SMTP id w3so3171516plz.5; Sun, 19 Apr 2020 14:03:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=yMHTPwb6/HAEha7ZS1i8xIMWSV3rbFURsKVBMSx5OJE=; b=gIbvppgfmX+UmN6EjHsnOmb4KUZCOEojrMJfsuD55X1MECcoI0R/4eMz0UzkkUfrfJ /dU9U2n4XHwfN+7o0fdAnnRJn68ZWWh2pMYUcjwyLtuuHNqv3W/JT0gaT4M7DUZdoazj CP5X2I8IqU18LYp7hB2bdYEiIKWaWYgIiJpDcpMuj3kyXOiXka2kCUbjSBt/OdA7Pvsa 2kR2Hl/7g4UbKBqyofWx6eZIADYYCNvZu60CbQN3S2GZ6tyM7o+15HKzFq61v9ln54L/ nRpoFv7Ji3cs0OjMHB7qcitBPWaASwO6w4gzGPpiuGWR2XVjf8/yx8+NDMT2eD8CWMQ3 +NVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=yMHTPwb6/HAEha7ZS1i8xIMWSV3rbFURsKVBMSx5OJE=; b=P2izRcftw3s0G8vSRdfLTp4qxZylBVlo7gjn5sYdwOOxZwurEeWuuk7KMzmPWxLzNU fOTwYD+kuFovk8zvLoY/Zb6WkxU3wZi/SeU9R1Iqre6Gaan8i+ka/Se7yMkLsBS2twg8 5d4gOncRIzWoWZlsH378Xxnar2b1SML7OoRLvcZqrmNFKhy/BItPpNoJf+acCl9yHeb1 qoHbfQMiBD1s7tW4n55P0004k81NLaYORcoiNwxVzuavFtplK3ALsrl8Wknu7uZ/Ro+f ncfb5qkGvtETYVkqActnc8B43uh1WyWmbLB1dPYsZj4NRlBaXjQOpktpxPX5YdzaEje8 BvvA== X-Gm-Message-State: AGi0PuZRn9MCJeEbN2SwOLzUT1xbzRWfpQpAdrdD2yVKdM+3m5uCDars J0lEDGUiFa/LSD4xkPuFLpKNod6HU6I= X-Google-Smtp-Source: APiQypIGuKajH75GQB+ANdgX2aLThHk4DYCw/d/UCJcQIpq5iYl0KEJ6xu4jn62xeQW76Dz0MO08Gg== X-Received: by 2002:a17:90a:1a46:: with SMTP id 6mr16683933pjl.111.1587330229445; Sun, 19 Apr 2020 14:03:49 -0700 (PDT) Received: from [192.168.20.26] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id s4sm10771247pfm.200.2020.04.19.14.03.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Apr 2020 14:03:48 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r360019 - head/tests/sys/kern From: Enji Cooper In-Reply-To: <202004162007.03GK7Zgr089624@repo.freebsd.org> Date: Sun, 19 Apr 2020 14:03:48 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202004162007.03GK7Zgr089624@repo.freebsd.org> To: "Jonathan T. Looney" X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 4952PM3dhbz41DG X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=gIbvppgf; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::630 as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com X-Spamd-Result: default: False [-2.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RECEIVED_SPAMHAUS_PBL(0.00)[228.52.19.73.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (-8.95), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[0.3.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 21:03:52 -0000 > On Apr 16, 2020, at 1:07 PM, Jonathan T. Looney = wrote: >=20 > Author: jtl > Date: Thu Apr 16 20:07:34 2020 > New Revision: 360019 > URL: https://svnweb.freebsd.org/changeset/base/360019 >=20 > Log: > Add a regression test for the changes in r359922 and r359923. >=20 > Note that the Python code has been tested on both Python 2.7 and 3.7. >=20 > Reviewed by: olivier > MFC after: 2 weeks > Sponsored by: Netflix, Inc. Ugh=E2=80=A6 I can tell by this commit that I just need to add = pytest support to kyua >_>=E2=80=A6 Thanks, -Enji= From owner-svn-src-all@freebsd.org Sun Apr 19 21:31:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6BBCE2ABAD0; Sun, 19 Apr 2020 21:31:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49530r3011z430h; Sun, 19 Apr 2020 21:31:08 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id QHWqjG6rz62brQHWsjKRwh; Sun, 19 Apr 2020 15:31:06 -0600 X-Authority-Analysis: v=2.3 cv=LKf9vKe9 c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=8nJEP1OIZ-IA:10 a=cl8xLZFz6L8A:10 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=OItwt65DAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=uafkwe_5hhgdQcQB4A8A:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=IuhtMwT3ZfbKfYFiE3X7:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 2DFCF557; Sun, 19 Apr 2020 14:31:04 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 03JLV4j4006604; Sun, 19 Apr 2020 14:31:04 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 03JLV3cT006601; Sun, 19 Apr 2020 14:31:03 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202004192131.03JLV3cT006601@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Enji Cooper cc: Cy Schubert , src-committers , svn-src-all , svn-src-head@freebsd.org Subject: Re: svn commit: r360102 - in head: libexec/rc/rc.d share/mk tools/build/mk In-reply-to: References: <202004191701.03JH1LFA002938@repo.freebsd.org> Comments: In-reply-to Enji Cooper message dated "Sun, 19 Apr 2020 13:57:23 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sun, 19 Apr 2020 14:31:03 -0700 X-CMAE-Envelope: MS4wfJVmLwuBk49Lf3bP8dXpquomBOaZjmoHBf7WBfvqEmzlNRtG/Q5I6+II8ulXe7T4A/ZsQVPuaXJji3NQcM7L0mFdZI9K+O7wuU7p3Gfp9vtIC2FqEyEa QpyGqMu4P+7+/H6mzBbopvwH8irz8iZRzELAJLlF+Mq9n4Ds9ZCkgeaWzKVqw47nAK1bDA67I/hxI0Rk07UFS6MhpHTWP1Yhc+OP9/sNoUrNE/kwhTeJjjTw 92r3vFOglXtOaafo6JC6ZE6cgDYoJ11p7BQLcWXwEk6aHdVQL3b8n1C3HMEj3XK8 X-Rspamd-Queue-Id: 49530r3011z430h X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.9) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.22 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RWL_MAILSPIKE_GOOD(0.00)[9.134.59.64.rep.mailspike.net : 127.0.0.18]; RCPT_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.52)[ip: (-6.69), ipnet: 64.59.128.0/20(-3.27), asn: 6327(-2.56), country: CA(-0.09)]; RCVD_IN_DNSWL_LOW(-0.10)[9.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 21:31:09 -0000 In message , Enji Cooper writes : > > > > On Apr 19, 2020, at 10:01 AM, Cy Schubert wrote: > > > > Author: cy > > Date: Sun Apr 19 17:01:21 2020 > > New Revision: 360102 > > URL: https://svnweb.freebsd.org/changeset/base/360102 > > > > Log: > > Conditionally install Kerberos rc files based on MK_KERBEROS_SCRIPTS > > instead of MK_KERBEROS. The reason for this change is some users > > prefer to build FreeBSD WITHOUT_KERBEROS, wanting to retain the > > Kerberos rc scripts to start/stop MIT Kerberos or Heimdal from ports. > > > > PR: 197337 > > Reported by: Adam McDougall > > Reviewed by: imp > > Differential Revision: https://reviews.freebsd.org/D24252 > > > Hi Cy, > Having excised code like this in the past, I don’t think this is the > right approach: a separate slave port should be added that handles the rc.d s > cript installation, etc, or the scripts should be added to the manifest for t > he ports. This will be removed. No slave port will be produced. No additional rc scripts will be added to the port. Patches are welcome. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Sun Apr 19 21:38:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A1C22ABE26; Sun, 19 Apr 2020 21:38:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49538s15vlz43W8; Sun, 19 Apr 2020 21:38:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0262C4A80; Sun, 19 Apr 2020 21:38:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JLc4YP078261; Sun, 19 Apr 2020 21:38:04 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JLc4tr078257; Sun, 19 Apr 2020 21:38:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202004192138.03JLc4tr078257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 19 Apr 2020 21:38:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360106 - in head: libexec/rc/rc.d share/mk tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head: libexec/rc/rc.d share/mk tools/build/mk X-SVN-Commit-Revision: 360106 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 21:38:05 -0000 Author: cy Date: Sun Apr 19 21:38:03 2020 New Revision: 360106 URL: https://svnweb.freebsd.org/changeset/base/360106 Log: Due to popular demand, revert r360102. Reported by: many Modified: head/libexec/rc/rc.d/Makefile head/share/mk/bsd.opts.mk head/share/mk/src.opts.mk head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/libexec/rc/rc.d/Makefile ============================================================================== --- head/libexec/rc/rc.d/Makefile Sun Apr 19 17:53:44 2020 (r360105) +++ head/libexec/rc/rc.d/Makefile Sun Apr 19 21:38:03 2020 (r360106) @@ -242,17 +242,14 @@ CONFS+= lpd .if ${MK_KERBEROS} != "no" CONFS+= ipropd_master CONFS+= ipropd_slave - -DIRS+= VAR_HEMIDAL -VAR_HEMIDAL= /var/heimdal -VAR_HEMIDAL_MODE= 700 -.endif - -.if ${MK_KERBEROS_SCRIPTS} != "no" _kadmind= kadmind _kdc= kdc _kfd= kfd _kpasswdd= kpasswdd + +DIRS+= VAR_HEMIDAL +VAR_HEMIDAL= /var/heimdal +VAR_HEMIDAL_MODE= 700 .endif .if ${MK_MAIL} != "no" Modified: head/share/mk/bsd.opts.mk ============================================================================== --- head/share/mk/bsd.opts.mk Sun Apr 19 17:53:44 2020 (r360105) +++ head/share/mk/bsd.opts.mk Sun Apr 19 21:38:03 2020 (r360106) @@ -55,7 +55,6 @@ __DEFAULT_YES_OPTIONS = \ INCLUDES \ INSTALLLIB \ KERBEROS \ - KERBEROS_SCRIPTS \ MAKE_CHECK_USE_SANDBOX \ MAN \ MANCOMPRESS \ Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Sun Apr 19 17:53:44 2020 (r360105) +++ head/share/mk/src.opts.mk Sun Apr 19 21:38:03 2020 (r360106) @@ -237,7 +237,6 @@ __DEFAULT_DEPENDENT_OPTIONS= \ INET \ INET6 \ KERBEROS \ - KERBEROS_SCRIPTS \ KVM \ NETGRAPH \ PAM \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Apr 19 17:53:44 2020 (r360105) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Apr 19 21:38:03 2020 (r360106) @@ -3152,9 +3152,13 @@ OLD_FILES+=usr/libexec/hprop OLD_FILES+=usr/libexec/hpropd OLD_FILES+=usr/libexec/ipropd-master OLD_FILES+=usr/libexec/ipropd-slave +OLD_FILES+=usr/libexec/kadmind OLD_FILES+=usr/libexec/kcm +OLD_FILES+=usr/libexec/kdc OLD_FILES+=usr/libexec/kdigest +OLD_FILES+=usr/libexec/kfd OLD_FILES+=usr/libexec/kimpersonate +OLD_FILES+=usr/libexec/kpasswdd OLD_FILES+=usr/sbin/kstash OLD_FILES+=usr/sbin/ktutil OLD_FILES+=usr/sbin/iprop-log @@ -3874,13 +3878,6 @@ OLD_FILES+=usr/share/man/man8/pam_krb5.8.gz OLD_FILES+=usr/share/man/man8/pam_ksu.8.gz OLD_FILES+=usr/share/man/man8/string2key.8.gz OLD_FILES+=usr/share/man/man8/verify_krb5_conf.8.gz -.endif - -.if ${MK_KERBEROS_SCRIPTS} == no -OLD_FILES+=usr/libexec/kadmind -OLD_FILES+=usr/libexec/kdc -OLD_FILES+=usr/libexec/kfd -OLD_FILES+=usr/libexec/kpasswdd .endif .if ${MK_KERBEROS_SUPPORT} == no From owner-svn-src-all@freebsd.org Sun Apr 19 22:54:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C0EA2AD915 for ; Sun, 19 Apr 2020 22:54:30 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4954s05xpdz48Dc for ; Sun, 19 Apr 2020 22:54:28 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-ej1-x642.google.com with SMTP id s3so6361269eji.6 for ; Sun, 19 Apr 2020 15:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=y+5C500PqYPOl8OH7iHJ4mT4XJv2zqvGgG7OAbPhDnI=; b=JTvxosrvArbti4i1UivcOkCVEibITS1HjWdBm80ztAtq7Bx5PqVVyjJUz8cfOw9C0R 64pnv0MB6ROb2j/saX3gekjNzlIsXR1z2PWyOvPdwVF80i75/uiUmphh0/Z9cSeC0ycQ Jgvgu95nYyFICHLbwXNm7ZXUna4VbwmaIYiNDonlolEQXYXisYVAAIHsnsUI7EsWn3Z/ sggGUg/m2ihVghu9Th42REaike0m7arCb4GUQC5l74BL7rRzprk/LaEIv+i3YUDM8pFF EG8fkHNHGn0m0USF5PX3qhFGWaEjkj0iGUu2Ofnp+HGKCMvK+4diS6lt1IoxGXcvwEuO qTbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=y+5C500PqYPOl8OH7iHJ4mT4XJv2zqvGgG7OAbPhDnI=; b=LNNgWhiOMk96BrtttPzugAFMBVZ7JAWqP+e/W1MsJWD4f4j8GJ6xDyrphPMOSyRFym pCZ3008UokswJ5jccI4WRkmBP6rY1Prhij+5n44gtJcQ/EiJNTw622sDKRLbOfxnYUKV r4I0sereg2WmDr+vbVunLi5iXAetmxDMhKWyEUUsHqx5LC/+UspMcDzA7li79b2656rJ qwzX2wh5uUHYFmjtsokism3QRA0JTD/oSgpsQZE5ABbLtI0pXJqTyMtIjDe/ZIeFOu54 XYBfmi+RcKt05vdn2HWVR3+fmz05B40LY6Dy9M1IwTfT5F6ijT/MVIWsYhXVAakmwld7 oHdg== X-Gm-Message-State: AGi0PuaOqrObMMR7ihd3UN9kLKxtTgqOHYudVB581gXs5dePqpB6eiLL qsZJF2ULxxiG61qrDG8Xw4kgJGuAqmV7UUHy X-Google-Smtp-Source: APiQypLQllWvhrXzZ2mebXQw2SIvO3xlQq10rKmVxjRoIdqlPRrgkap4cH0IN+/FSVlvm1cs0yYJVg== X-Received: by 2002:a2e:9496:: with SMTP id c22mr7083264ljh.165.1587336444321; Sun, 19 Apr 2020 15:47:24 -0700 (PDT) Received: from mutt-hbsd ([185.220.101.11]) by smtp.gmail.com with ESMTPSA id z9sm29321541lfd.9.2020.04.19.15.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 15:47:23 -0700 (PDT) Date: Sun, 19 Apr 2020 18:47:13 -0400 From: Shawn Webb To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359950 - head/usr.sbin/bhyve Message-ID: <20200419224713.xaxvnuo334v6bhtj@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA References: <202004150200.03F20I3H001953@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4fkv3lqg7o4odp2d" Content-Disposition: inline In-Reply-To: <202004150200.03F20I3H001953@repo.freebsd.org> X-Rspamd-Queue-Id: 4954s05xpdz48Dc X-Spamd-Bar: ++++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=JTvxosrv; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2a00:1450:4864:20::642 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [10.02 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip6:2a00:1450:4000::/36:c]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.56)[ipnet: 2a00:1450::/32(-2.34), asn: 15169(-0.43), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RECEIVED_SPAMHAUS_PBL(0.00)[11.101.220.185.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[11.101.220.185.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.4]; R_DKIM_ALLOW(0.00)[hardenedbsd.org:s=google]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; SH_AUTHBL_RECEIVED(4.00)[11.101.220.185.khpj7ygk5idzvmvt5x4ziurxhy.authbl.dq.spamhaus.net : 127.0.0.20]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; NEURAL_SPAM_MEDIUM(0.11)[0.109,0]; BAD_REP_POLICIES(0.10)[]; RECEIVED_BLOCKLISTDE(3.00)[11.101.220.185.bl.blocklist.de]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.08)[0.078,0]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; GREYLIST(0.00)[pass,body] X-Spam: Yes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 22:54:30 -0000 --4fkv3lqg7o4odp2d Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 15, 2020 at 02:00:18AM +0000, Conrad Meyer wrote: > Author: cem > Date: Wed Apr 15 02:00:17 2020 > New Revision: 359950 > URL: https://svnweb.freebsd.org/changeset/base/359950 >=20 > Log: > bhyve(8): Add VM Generation Counter ACPI device > =20 > Add an implementatation of the 'Virtual Machine Generation ID' spec to > Bhyve. The spec provides a randomly generated GUID (at bhyve start) in > device memory, along with an ACPI device with _CID VM_Gen_Counter and A= DDR > evaluating to a Package pointing at that GUID. > =20 > A GPE is defined which Notifies the ACPI Device when the generation cha= nges > (such as when a snapshot is rolled back). At this time, Bhyve does not > support snapshotting, so the GPE is never actually raised. > =20 > Suggested by: rpokala > Discussed with: grehan > Differential Revision: https://reviews.freebsd.org/D23165 >=20 > Added: > head/usr.sbin/bhyve/vmgenc.c (contents, props changed) > head/usr.sbin/bhyve/vmgenc.h (contents, props changed) > Modified: > head/usr.sbin/bhyve/Makefile > head/usr.sbin/bhyve/acpi.c > head/usr.sbin/bhyve/acpi.h > head/usr.sbin/bhyve/bhyverun.c > head/usr.sbin/bhyve/pm.c Hey Conrad, Something about this commit broke bhyve in UEFI mode. Reverting this specific change caused bhyve to work again. Here's a sample command: /usr/obj/usr/src/amd64.amd64/usr.sbin/bhyve/bhyve \ -c 4 \ -m 16g \ -H \ -A \ -P \ -S \ -g 0 \ -s 0:0,hostbridge \ -s 1:0,lpc \ -s 29,fbuf,tcp=3D127.0.0.1:5910,w=3D1024,h=3D768,wait \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ -s 2:0,virtio-net,tap1 \ -s 3:0,virtio-blk,/dev/zvol/rpool/bhyve/hbsd-cross-dso-cfi-01/disk-01 \ -l com1,/dev/nmdm-hbsd-cross-dso-cfi-01-A \ -s 31:0,ahci-cd,/ISO/HardenedBSD/12-stable_amd64/2020-04-19_disc1.iso \ hbsd-cdcfi-01 Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Sha= wn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --4fkv3lqg7o4odp2d Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAl6c1OoACgkQ/y5nonf4 4fpmFBAAkIZ0yZKAVukQnHTTHYh961A5XaOde5uiCRBSAovpcC/lM1hzhx5wA9hj x4DktYszi4/IrQK7hQSkA/Iq3xOCKcmkdiH6gs8W0Mw3sGfwVO6t3u2+qnDNGnDJ me1GgykD0AX0zl0gACN0jM8566I3gGY2xuNUFY6W6Wzd969KNTvIfEDBlmTMFIr0 vWDdVBWl1YGa4ePgmHynjCM5X5JVkBwRWKwEqw+5yF5wfkqdxu6i4qW6uFbVdOJ6 imVinqbwaQP5bqx+7Ln3svLEhLaCwSvd0KVR2fqc/y8SEigc8ryqiAsirYnVRYD/ yk8mRm3PdQafbUJoilOooKzIf/7CbA+URj7QkpLBZr5y2BMW2rXFnIQgXFUEJ6Js bsUSMF31Vz2KZqD0N7RxFi0QHH5nawLY9ZSUWwWisldfmu2KsSuaDv73HAzp5ofu w5R1bYazLIem61Uiak+TwEQHTZxM9tbFOqtcrruIcKf0iCOZicregpb/ROXtpZPi ZMuy82ZpEI1V6lRqKonoa1bqoZJvk9q6Xz8KT/jRjSgeZanOZSZ+I1U2kWEfHx0c c9UngdJhIMWTZuuBPKC7fhd4MH/F1J76dIHeusybvv0FXiZ2BttTX2Iv55M8V6Mr XfyXBUxrcyPnEOrkjT4sklPe3pUbpEx8AJfx2Ac27LEN/MNGT2I= =/PtU -----END PGP SIGNATURE----- --4fkv3lqg7o4odp2d-- From owner-svn-src-all@freebsd.org Sun Apr 19 23:04:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C98BC2ADEF9; Sun, 19 Apr 2020 23:04:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ot1-f67.google.com (mail-ot1-f67.google.com [209.85.210.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49554Y6MCMz48vk; Sun, 19 Apr 2020 23:04:29 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ot1-f67.google.com with SMTP id j4so6470338otr.11; Sun, 19 Apr 2020 16:04:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=mxnYXrPgwR4i4dj2oVw1F6Y0aApMFNVFAB+hIfHTXOo=; b=KqAtJyiAPmn7Wy7zvPdTQCJONSQwT7PBp3D6kKzAKlibw/hLt5EKf4P9a+ohlWd1Yh SO0624uNBPQ2akHyvjx/7jOlyhmGU8IufRNDgweOn4o1gIALr7jL2VLLwPrsZWTMpyXD gdGP+a3BSRNJ1QkDX2t2xhBL3UvTZoKaV0sofRNPyzgjfp683IXmonBK3HGkdecTv/LI NrL7soQpxdy0U6IZRqc/pkJLtvBFN7ERweDixhMtDXGZ2dk15lAc805PQo+BfK6/CLan vXq8733ltdoS4LG8oOpgQv4MqA3WCNXANHh6NUYYnJ0Pc4M5IBoqJVc5wativsy90skF Ru7w== X-Gm-Message-State: AGi0PuY4eUGQBx5WfLiqeDZyEK/+dfS3Zv/YsA1QWr2z0X/Ljie/aiDR wn51y60F4PModcXYJK3U83YQl5DM X-Google-Smtp-Source: APiQypK18SZSWPFtCTu3g67lXKB1+d+vJElNVH1g7gAdpb9Lx1Gp3syRX2W1+ue2B3ZoGmE6aMjtcA== X-Received: by 2002:a05:6830:1147:: with SMTP id x7mr7327188otq.359.1587337468335; Sun, 19 Apr 2020 16:04:28 -0700 (PDT) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com. [209.85.167.179]) by smtp.gmail.com with ESMTPSA id l11sm6246960oom.15.2020.04.19.16.04.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Apr 2020 16:04:27 -0700 (PDT) Received: by mail-oi1-f179.google.com with SMTP id t199so7250319oif.7; Sun, 19 Apr 2020 16:04:27 -0700 (PDT) X-Received: by 2002:aca:dc56:: with SMTP id t83mr8407836oig.48.1587337467608; Sun, 19 Apr 2020 16:04:27 -0700 (PDT) MIME-Version: 1.0 References: <202004150200.03F20I3H001953@repo.freebsd.org> <20200419224713.xaxvnuo334v6bhtj@mutt-hbsd> In-Reply-To: <20200419224713.xaxvnuo334v6bhtj@mutt-hbsd> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sun, 19 Apr 2020 16:04:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r359950 - head/usr.sbin/bhyve To: Shawn Webb Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 49554Y6MCMz48vk X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.210.67 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-1.16 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RWL_MAILSPIKE_GOOD(0.00)[67.210.85.209.rep.mailspike.net : 127.0.0.18]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-0.996,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[67.210.85.209.list.dnswl.org : 127.0.5.0]; HTTP_TO_IP(1.00)[]; IP_SCORE(-0.17)[ip: (0.01), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 23:04:30 -0000 Hey Shawn, I will take a look. Thanks for the report and especially the repro example. What sort of bad symptoms are you observing (or will it be super obvious when I try this)? Thanks, Conrad On Sun, Apr 19, 2020 at 15:53 Shawn Webb wrote: > On Wed, Apr 15, 2020 at 02:00:18AM +0000, Conrad Meyer wrote: > > Author: cem > > Date: Wed Apr 15 02:00:17 2020 > > New Revision: 359950 > > URL: https://svnweb.freebsd.org/changeset/base/359950 > > > > Log: > > bhyve(8): Add VM Generation Counter ACPI device > > > > Add an implementatation of the 'Virtual Machine Generation ID' spec to > > Bhyve. The spec provides a randomly generated GUID (at bhyve start) in > > device memory, along with an ACPI device with _CID VM_Gen_Counter and > ADDR > > evaluating to a Package pointing at that GUID. > > > > A GPE is defined which Notifies the ACPI Device when the generation > changes > > (such as when a snapshot is rolled back). At this time, Bhyve does not > > support snapshotting, so the GPE is never actually raised. > > > > Suggested by: rpokala > > Discussed with: grehan > > Differential Revision: https://reviews.freebsd.org/D23165 > > > > Added: > > head/usr.sbin/bhyve/vmgenc.c (contents, props changed) > > head/usr.sbin/bhyve/vmgenc.h (contents, props changed) > > Modified: > > head/usr.sbin/bhyve/Makefile > > head/usr.sbin/bhyve/acpi.c > > head/usr.sbin/bhyve/acpi.h > > head/usr.sbin/bhyve/bhyverun.c > > head/usr.sbin/bhyve/pm.c > > Hey Conrad, > > Something about this commit broke bhyve in UEFI mode. Reverting this > specific change caused bhyve to work again. Here's a sample command: > > /usr/obj/usr/src/amd64.amd64/usr.sbin/bhyve/bhyve \ > -c 4 \ > -m 16g \ > -H \ > -A \ > -P \ > -S \ > -g 0 \ > -s 0:0,hostbridge \ > -s 1:0,lpc \ > -s 29,fbuf,tcp=127.0.0.1:5910,w=1024,h=768,wait \ > -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ > -s 2:0,virtio-net,tap1 \ > -s 3:0,virtio-blk,/dev/zvol/rpool/bhyve/hbsd-cross-dso-cfi-01/disk-01 \ > -l com1,/dev/nmdm-hbsd-cross-dso-cfi-01-A \ > -s 31:0,ahci-cd,/ISO/HardenedBSD/12-stable_amd64/2020-04-19_disc1.iso \ > hbsd-cdcfi-01 > > Thanks, > > -- > Shawn Webb > Cofounder / Security Engineer > HardenedBSD > > GPG Key ID: 0xFF2E67A277F8E1FA > GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 > > https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc > From owner-svn-src-all@freebsd.org Sun Apr 19 23:14:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39B842AE2B3 for ; Sun, 19 Apr 2020 23:14:10 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4955Hj0BH8z49bv for ; Sun, 19 Apr 2020 23:14:08 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wr1-x444.google.com with SMTP id j1so4494109wrt.1 for ; Sun, 19 Apr 2020 16:14:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=45AFPPRq6oE/axD6UYGxnnv+Uffgm+nx4yZJnqHVyKQ=; b=Eo0Kg0IS7ujLaFJxNeQyqHkOLUV8WLL7mqvOXLzY9TJq8/9OBLEjuyBNtthSTys4Yn jQsUP2vtDjD9Hq2GU1CU1B/5KL414cq2xYpBCYb32S1XaK+FOJqzFpBYZHWp73RMJUhW rZZl0S2SVZ+IWv3L3wNVsaHz4XCT1oY2Z8qbDw+s+qKiRpqanHBLQLswjzAClvLQjDwM hAbjEInBxvffPNaWWYV2pMu6GSrHOfuOEbk/+Zm71qa7QHMdnKhUOULdYQj4gauGJ1Pq fj9g1dYItuoEqxdemU+8l3KTnc+Zg0x9a29OGbVz8OVxlwY08HuoBjWX/RCF6EB5rYeA +5lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=45AFPPRq6oE/axD6UYGxnnv+Uffgm+nx4yZJnqHVyKQ=; b=DeWiwXB/y89OcPCWArl8A3WVPtXWwZPCuDp6f4W4+MvAepTHNXXpkx37M0IoHISQeR cj+zXTzXpH4UqOjF6kIzEV7sxfq4E8FvEeT6Nmk1gnBB8Oy2vh9c0pFQuMiHEkQF21oJ 8yGUkMWObiHXGl6qWTk0EdeAZlqDMj6TwE/nTx/QogHMRuDv+b45tmtUxneAShdwfTn3 0zW4MuDjENQ+KaJwRUkkE4y8sa/baJ1DeagoK/q1OIPt1wYts5TBZMYNUJM9qiwr1Y4B GDpfQCXDLxZWyzcdFwa4ZR9AfQvuXIP0EDk0zbTr5qNmQtxr/xUp61SLSIvUKbkMNvKJ f/Dg== X-Gm-Message-State: AGi0PuZLtdbfJJBN23/Sn+hua2DqogiSnszZ3IP9zhT4R0TdIHmdBiPQ kORXSmWd8vfTbdbRCORhlHLrig== X-Google-Smtp-Source: APiQypJ/a55yv8Hi32NoJVJd+ocSP1czY/oR5lnHA6ng3ICUazIzvO/6l0FV5UM28/5xiMhsEhs9Vw== X-Received: by 2002:adf:82cf:: with SMTP id 73mr15354371wrc.411.1587338047586; Sun, 19 Apr 2020 16:14:07 -0700 (PDT) Received: from mutt-hbsd ([209.141.58.114]) by smtp.gmail.com with ESMTPSA id k17sm15682158wmi.10.2020.04.19.16.14.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 16:14:06 -0700 (PDT) Date: Sun, 19 Apr 2020 19:13:53 -0400 From: Shawn Webb To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359950 - head/usr.sbin/bhyve Message-ID: <20200419231353.fkx5uwtqq7h7yolh@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA References: <202004150200.03F20I3H001953@repo.freebsd.org> <20200419224713.xaxvnuo334v6bhtj@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="n4scb7s6isw3txja" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4955Hj0BH8z49bv X-Spamd-Bar: +++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=Eo0Kg0IS; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2a00:1450:4864:20::444 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [9.23 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip6:2a00:1450:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.02)[ip: (2.72), ipnet: 2a00:1450::/32(-2.34), asn: 15169(-0.43), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[114.58.141.209.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.4]; R_DKIM_ALLOW(0.00)[hardenedbsd.org:s=google]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; SH_AUTHBL_RECEIVED(4.00)[114.58.141.209.khpj7ygk5idzvmvt5x4ziurxhy.authbl.dq.spamhaus.net : 127.0.0.20]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; NEURAL_SPAM_MEDIUM(0.90)[0.897,0]; BAD_REP_POLICIES(0.10)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.95)[0.952,0]; RCVD_IN_DNSWL_NONE(0.00)[4.4.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; MID_RHS_NOT_FQDN(0.50)[]; GREYLIST(0.00)[pass,meta]; RCVD_TLS_ALL(0.00)[] X-Spam: Yes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 23:14:10 -0000 --n4scb7s6isw3txja Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable This is the full output from bhyve: fbuf frame buffer base: 0x69191a00000 [sz 16777216] bhyve: bootrom_alloc: vm_mmap_mapseg: No space left on device bhyve: vmgenc_init: bootrom_alloc Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Sha= wn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc On Sun, Apr 19, 2020 at 04:04:16PM -0700, Conrad Meyer wrote: > Hey Shawn, >=20 > I will take a look. Thanks for the report and especially the repro exampl= e. > What sort of bad symptoms are you observing (or will it be super obvious > when I try this)? >=20 > Thanks, > Conrad >=20 > On Sun, Apr 19, 2020 at 15:53 Shawn Webb wro= te: >=20 > > On Wed, Apr 15, 2020 at 02:00:18AM +0000, Conrad Meyer wrote: > > > Author: cem > > > Date: Wed Apr 15 02:00:17 2020 > > > New Revision: 359950 > > > URL: https://svnweb.freebsd.org/changeset/base/359950 > > > > > > Log: > > > bhyve(8): Add VM Generation Counter ACPI device > > > > > > Add an implementatation of the 'Virtual Machine Generation ID' spec= to > > > Bhyve. The spec provides a randomly generated GUID (at bhyve start= ) in > > > device memory, along with an ACPI device with _CID VM_Gen_Counter a= nd > > ADDR > > > evaluating to a Package pointing at that GUID. > > > > > > A GPE is defined which Notifies the ACPI Device when the generation > > changes > > > (such as when a snapshot is rolled back). At this time, Bhyve does= not > > > support snapshotting, so the GPE is never actually raised. > > > > > > Suggested by: rpokala > > > Discussed with: grehan > > > Differential Revision: https://reviews.freebsd.org/D23165 > > > > > > Added: > > > head/usr.sbin/bhyve/vmgenc.c (contents, props changed) > > > head/usr.sbin/bhyve/vmgenc.h (contents, props changed) > > > Modified: > > > head/usr.sbin/bhyve/Makefile > > > head/usr.sbin/bhyve/acpi.c > > > head/usr.sbin/bhyve/acpi.h > > > head/usr.sbin/bhyve/bhyverun.c > > > head/usr.sbin/bhyve/pm.c > > > > Hey Conrad, > > > > Something about this commit broke bhyve in UEFI mode. Reverting this > > specific change caused bhyve to work again. Here's a sample command: > > > > /usr/obj/usr/src/amd64.amd64/usr.sbin/bhyve/bhyve \ > > -c 4 \ > > -m 16g \ > > -H \ > > -A \ > > -P \ > > -S \ > > -g 0 \ > > -s 0:0,hostbridge \ > > -s 1:0,lpc \ > > -s 29,fbuf,tcp=3D127.0.0.1:5910,w=3D1024,h=3D768,wait \ > > -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ > > -s 2:0,virtio-net,tap1 \ > > -s 3:0,virtio-blk,/dev/zvol/rpool/bhyve/hbsd-cross-dso-cfi-01/disk-= 01 \ > > -l com1,/dev/nmdm-hbsd-cross-dso-cfi-01-A \ > > -s 31:0,ahci-cd,/ISO/HardenedBSD/12-stable_amd64/2020-04-19_disc1.i= so \ > > hbsd-cdcfi-01 > > > > Thanks, > > > > -- > > Shawn Webb > > Cofounder / Security Engineer > > HardenedBSD > > > > GPG Key ID: 0xFF2E67A277F8E1FA > > GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 > > > > https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master= /Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc > > --n4scb7s6isw3txja Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAl6c2ysACgkQ/y5nonf4 4fooag//bE9CS3aqjys+LM6sk2WhMnE/6kNi12zVup+LcJWSOMOz+ij2Omm0O3Ft ZsVdJa/z0MMvdJwfkHIR+mIy/HX7Rl2u0dGVedg9aUxbS3C4YnvJMOGnZo0vTRuB XSWw1lqESt2KKHcG9MuYTc038UZeY3h88vSKObq74ZphtVZBYky0HSbbJdzq8bUY xh9rBcSabc72N/GkzTgBVBR4UwrteQ2qImWWYzbqbTXQa7xem5+af8p71n7ibzvz 5yjey9Fi1rTW9HkeFu16um9ZfSbA/guuXpdIjWRjL6fYpNcijo8vjbntmXmpXoIr HwAZO7HxS2UHmblOTNnE1gDEtyJ/2Ax84h2WXtLyfB69WHM9R7+BOfhQqywPZGKu 7Z8LqXYdtYzFGgMSDAvZufyM3dFZzu5PRQCnGDiGWVwVICZpJJT5g2GGZB7HhExK gDI/1g0l67duLpF/hVpdJvMxoU21Xdx39BwhTjXOgC7VnGYaufnz6MxMu8vb1LOh /WNBAJTuBfnAXjXXS8Cn77BEV6CQRI8FdkzyDAC0ydHcv0NNvnIRw5HopZZLc8ox YFYnT5m3hnuITh2Pno/ur6NxNprxmtsfUainem5qwAYt4EcmfkPolqu5r4CTou2u /Sj0kL2hnTDqcbyHR0einAxxzpJO2Z6LObDcrMt/hVIckIE/H7Q= =9F0l -----END PGP SIGNATURE----- --n4scb7s6isw3txja-- From owner-svn-src-all@freebsd.org Sun Apr 19 23:32:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E884F2AE846; Sun, 19 Apr 2020 23:32:27 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4955hq0Tyrz4C0R; Sun, 19 Apr 2020 23:32:26 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0380E5C006A; Sun, 19 Apr 2020 19:32:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 19 Apr 2020 19:32:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=V ZMpHxHtEhG1YfbAjV9EawdEH9EV8xoNP5BxUva9v+k=; b=Om5HIFX+60Q5jCaEh xvdgAUhbNQGZXXZQ5e5Hwxs7IfjhLWonaDIg2mCN4Ve3J7MKWXGDz2kaRjQDdEVw sHDzoyEZp/QO9yUAUAqg8H0YCLSBRjXWj0Oq/WlDE6nmzbgGrzaInAxlbVu/EtnN S3C0JlJO+6GvwBFcYYADJCQiTLCOIpk0+3blpw5cqjGV/YRvNAaS54xER1y5U3mZ 9lur6qSEL054XKCJxaJlRVGjOxsYBLqRlsbtJBNZj50ZyzwR08TP4oaMs39CX/u6 jzdpjvCAhskctXnpUk+1DC15sfwze9iYE2hOTTK0I0LF8s9qY+Bk9eFsl4OVBPcE J0lvg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=VZMpHxHtEhG1YfbAjV9EawdEH9EV8xoNP5BxUva9v +k=; b=EkQHmz7P8a80j9sJmCVJOoCESxX5He5QKcR9OomtqZIE4/F/kb1a6vQc/ gQN+XFYxE0UOs7dBixBbgNgS2mtaxopssgsetsFkaK+r5yPr3e5bdMUDcx5BzgbO J6sSuXq9CtcbicEZaV+DQceJHlm1sQD8VBgDkOwmjjPqsuyWcoMuWVRcfXJKjus1 kO7lXuNUod7MBcpAqGqwN71vzQxPPICnJ+opLEv87hL5SGJT8Qf90bL0IbVaxuXI HnWsHHvJjdPGN2pAjffssvPV47SDjwQXpaKlygCKpyVNU9oE61k5vojeYJhsPrwO H13+HS8XHDYsEaZMZHRCzkgeCkIUg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgedvgddvvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeehnecuhfhrohhmpegjuhhrihcu rfgrnhhkohhvuceohihprghnkhhovhesfhgrshhtmhgrihhlrdgtohhmqeenucfkphepke ehrddujeehrddufeelrddvhedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhephihprghnkhhovhesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Received: from [192.168.1.6] (unknown [85.175.139.251]) by mail.messagingengine.com (Postfix) with ESMTPA id 3791A306454A; Sun, 19 Apr 2020 19:32:24 -0400 (EDT) Subject: Re: svn commit: r359950 - head/usr.sbin/bhyve To: Shawn Webb , Conrad Meyer Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <202004150200.03F20I3H001953@repo.freebsd.org> <20200419224713.xaxvnuo334v6bhtj@mutt-hbsd> <20200419231353.fkx5uwtqq7h7yolh@mutt-hbsd> From: Yuri Pankov Message-ID: <58b1d5e0-fa4d-6024-89e9-d8d40d3f7b25@fastmail.com> Date: Mon, 20 Apr 2020 02:32:23 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200419231353.fkx5uwtqq7h7yolh@mutt-hbsd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4955hq0Tyrz4C0R X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fastmail.com header.s=fm2 header.b=Om5HIFX+; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=EkQHmz7P; dmarc=pass (policy=none) header.from=fastmail.com; spf=pass (mx1.freebsd.org: domain of ypankov@fastmail.com designates 66.111.4.28 as permitted sender) smtp.mailfrom=ypankov@fastmail.com X-Spamd-Result: default: False [-3.10 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[28.4.111.66.rep.mailspike.net : 127.0.0.18]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.28]; FREEMAIL_FROM(0.00)[fastmail.com]; TO_DN_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[fastmail.com:+,messagingengine.com:+]; DMARC_POLICY_ALLOW(-0.50)[fastmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.00)[ip: (-9.82), ipnet: 66.111.4.0/24(-4.89), asn: 11403(-2.69), country: US(-0.05)]; RCVD_IN_DNSWL_LOW(-0.10)[28.4.111.66.list.dnswl.org : 127.0.5.1]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[251.139.175.85.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[fastmail.com:s=fm2,messagingengine.com:s=fm2]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[fastmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 23:32:28 -0000 Shawn Webb wrote: > This is the full output from bhyve: > > fbuf frame buffer base: 0x69191a00000 [sz 16777216] > bhyve: bootrom_alloc: vm_mmap_mapseg: No space left on device > bhyve: vmgenc_init: bootrom_alloc I wonder if it's coincidence, and you really didn't have 16G to wire at that moment, and after reverting the commit it was there (reboot?) -- I was getting the same error well before this change when I had almost all of the memory eaten by ZFS ARC, I was looking at r359949 as possible candidate, but limiting that memory hog did make the issue disappear. From owner-svn-src-all@freebsd.org Sun Apr 19 23:36:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3B452AE959 for ; Sun, 19 Apr 2020 23:36:37 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4955nd1WvMz4CF4 for ; Sun, 19 Apr 2020 23:36:37 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wr1-x444.google.com with SMTP id b11so9947273wrs.6 for ; Sun, 19 Apr 2020 16:36:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=e0PIYhduG57bxxvwnWkG8PmImwZCyH2NjB6BXHV1EWo=; b=NlaxchoXVGsDWM71wzpdEcXqWNhNlF96NwE9qilXFB4LoT1uxWkbCM6JiaiimZi+xU 9hDZpSB+gjapQw8K1+EuezPX49jyh5ecWLJhcNvwwnDfSZQojaUVfNzPigOg21OKexVV 7PbU8mGoqPVfjlkYwvSSJ2rP3vMHqh02wO8l2eUNzNwr24PWDutR81uLYOk9qocykW53 Mc2pKBUmo7rfBwPu6dZs47vT3G4XGieHvl3dqZYfTGsbvG6TZHZaOs06FvQKMjv+weYb EBg7WEdzZZJGsXSlOlu6WekQMgravRJZP8eWyqC98hVibl81r8p7quhbNNjlLt1DJzlv SJWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=e0PIYhduG57bxxvwnWkG8PmImwZCyH2NjB6BXHV1EWo=; b=BdAoltKqhmqc2j/vSfeglIgrIO+2qOqXXpNwdVVPeDMvlEACnU/uTDk9P8KmnUu5ji 3aJcTzfuJ/vjBnv+OF5aR2rM/wtIv1gB3RQKqzOOrzoyQNgFoc6WIr+r7v365HYXb0on 2JA/NUbmSwJxgaclhgecJzDozxUTHN4nuc4XLEJ3ae9aBnwntUZ24q4/O8RpG39yFTSr fYhSvlVEjoEQRatme0x7kXfbCrTF+ujnA+Auy3cmAO+wopzLuMZofVo+8mDZfJ3zSfl5 wSn1WO3G92NBfSTFZFg2/XwtXsBQXsJjzWOhWIFEKzt54YJ8wjWVq1vWAw5fTP2P9AdP WdNw== X-Gm-Message-State: AGi0PuYM5b3203pWBBKkoBUsYWyQsIWo7ujUq2h8br2SkJ1sBCCmvUTJ e365/X9mgSZzMtG0LRQYclsk7a10bzD7Ipvz X-Google-Smtp-Source: APiQypK8MSXEfUHskKdelfFZmEtMAe7Yr5uWCCLvLMoIiYUKW1U2Y5sLSLdP0DzkmhfvunWoZhH0fw== X-Received: by 2002:adf:fdc1:: with SMTP id i1mr17379268wrs.158.1587339395811; Sun, 19 Apr 2020 16:36:35 -0700 (PDT) Received: from mutt-hbsd ([185.220.101.146]) by smtp.gmail.com with ESMTPSA id l15sm17018230wmi.48.2020.04.19.16.36.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 16:36:35 -0700 (PDT) Date: Sun, 19 Apr 2020 19:35:55 -0400 From: Shawn Webb To: Yuri Pankov Cc: Conrad Meyer , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r359950 - head/usr.sbin/bhyve Message-ID: <20200419233453.msdnqagslgzadcya@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA References: <202004150200.03F20I3H001953@repo.freebsd.org> <20200419224713.xaxvnuo334v6bhtj@mutt-hbsd> <20200419231353.fkx5uwtqq7h7yolh@mutt-hbsd> <58b1d5e0-fa4d-6024-89e9-d8d40d3f7b25@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xnpnuonasknw6zop" Content-Disposition: inline In-Reply-To: <58b1d5e0-fa4d-6024-89e9-d8d40d3f7b25@fastmail.com> X-Rspamd-Queue-Id: 4955nd1WvMz4CF4 X-Spamd-Bar: ++++++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=NlaxchoX; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2a00:1450:4864:20::444 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [12.26 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip6:2a00:1450:4000::/36]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; SIGNED_PGP(-2.00)[]; FREEMAIL_TO(0.00)[fastmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.02)[ip: (2.72), ipnet: 2a00:1450::/32(-2.34), asn: 15169(-0.43), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RECEIVED_SPAMHAUS_PBL(0.00)[146.101.220.185.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[146.101.220.185.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.4]; R_DKIM_ALLOW(0.00)[hardenedbsd.org:s=google]; FROM_HAS_DN(0.00)[]; SH_AUTHBL_RECEIVED(4.00)[146.101.220.185.khpj7ygk5idzvmvt5x4ziurxhy.authbl.dq.spamhaus.net : 127.0.0.20]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; NEURAL_SPAM_MEDIUM(0.91)[0.911,0]; BAD_REP_POLICIES(0.10)[]; RECEIVED_BLOCKLISTDE(3.00)[146.101.220.185.bl.blocklist.de]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.96)[0.964,0]; RCVD_IN_DNSWL_NONE(0.00)[4.4.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; GREYLIST(0.00)[pass,meta] X-Spam: Yes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 23:36:37 -0000 --xnpnuonasknw6zop Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 20, 2020 at 02:32:23AM +0300, Yuri Pankov wrote: > Shawn Webb wrote: > > This is the full output from bhyve: > >=20 > > fbuf frame buffer base: 0x69191a00000 [sz 16777216] > > bhyve: bootrom_alloc: vm_mmap_mapseg: No space left on device > > bhyve: vmgenc_init: bootrom_alloc >=20 > I wonder if it's coincidence, and you really didn't have 16G to wire at t= hat > moment, and after reverting the commit it was there (reboot?) -- I was > getting the same error well before this change when I had almost all of t= he > memory eaten by ZFS ARC, I was looking at r359949 as possible candidate, = but > limiting that memory hog did make the issue disappear. Good thought, but this was on a fresh reboot on my laptop with 64GB ECC RAM. At the time bhyve was started, I had 55GB memory free. Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Sha= wn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --xnpnuonasknw6zop Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAl6c4FoACgkQ/y5nonf4 4frC7hAAj5XxaNBEVBrb01+8/4HBLRwRD10o4i9ZpmPAiiH77TntgY1sGXMEur3S mCXe0jDmk5Q6KERdDa3mwg6KK8fQoxQJHzgR/cqQOYCOY2koOii0HDH77jaAiJtI FIKms8V3as/k+fcKt6d/yGdYKP8Gvl5BGZ4vTV5ZbXBoF01gN73y/gAkzmNQMgai Q1PB2RwwUc0KTohomv2smZjTkNUQQUt/rSyOEqmgUQywCOhigrqPRPtm6KI9FZVa DOMbCHsFJDdMjieRDcHxGXbvi+qc7cfNQ+LQKDOOxa5cMNSlbqhowzMKVMOWEcNM LewP7Cl/yERXG3Me3NbnZChyW3BJoYmKQlaPHQzoeng31o32rQjbny6DFsqHbX+J nP0+yN7x+Jrf+pRjL/QObVWGc3Gi6tbYmiwORAgzenyT/wcMV9LQb+2swcoSjalt +Mkswum9T8F6ofR/gEjJL/fnTw4tgTvoC9gTlJRAagJEHO8ibi6zmLKJY0GH19SL dgcvT9zKLvjZl3sD+0vNqUiCEqpQ7tIInAv37LKUcK+GgoZEpkUifhYx0n/0ZiBP RqFeBuSFBJdMxS6OswGAhh1TWWJBCc0E5arGoauZQtsjsc3zEt3Dh0uP2CckTUhY y0ZE2PH406UlTtzIqZsXlFYPIcMDoxiqggRa3eyAOt6Gg6RwiOg= =pWyt -----END PGP SIGNATURE----- --xnpnuonasknw6zop-- From owner-svn-src-all@freebsd.org Sun Apr 19 23:42:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A52462AEC49; Sun, 19 Apr 2020 23:42:08 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4955vz0wzdz4CkN; Sun, 19 Apr 2020 23:42:07 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi1-f193.google.com with SMTP id t199so7299608oif.7; Sun, 19 Apr 2020 16:42:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=7hToRy+1gcOTodfJYR7MfEqrhpQ/2GDzSCPGhicMZPk=; b=IHAvCD1uXTTonEJHxfNpi9uZC8qUvI47MChMLfjxnkIhurYDqkeqPr4bDzjXt+acH5 FFeSQXHXIgls4FWxs8ydW7JSbFzs0ztMpzHWtABBxmdb2eSYwFlb78ab5Q84kcGPDZ+W f5kdOoY7H4u41eehw56ISuX30IdYWVtOCgldYC1qxMV8FPn4BVH4PBNjSNhv6+e9nhio PGlWFDE4VzIAjr1ceRfOXIElbuFqfISmG9qCx72qXqKl/qthlG5gqAjLM7Pv5HvR6GCv C806GHGZrYv7AVxHuXxhGZLm30ikth5qSztLcVuVyxFOQW3sQUOC1PfbwEjje01Peusd QTBQ== X-Gm-Message-State: AGi0PuYJ2PiuA/x3IhMTArPDPhRps/0qSVakity+q1/CBVpuIaQCtgGk TDeo7ncQwCmJecwfN55LDDQQV6CO X-Google-Smtp-Source: APiQypLihtO0BNu0fOJBoMUB/u3d8L3f2cW3obF0Iie9d0tLVdX7oubsBVdP60/k36ptjfVvYo0D0g== X-Received: by 2002:aca:53cd:: with SMTP id h196mr9171448oib.104.1587339725518; Sun, 19 Apr 2020 16:42:05 -0700 (PDT) Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com. [209.85.210.47]) by smtp.gmail.com with ESMTPSA id f203sm5373409oia.38.2020.04.19.16.42.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Apr 2020 16:42:05 -0700 (PDT) Received: by mail-ot1-f47.google.com with SMTP id b13so6543104oti.3; Sun, 19 Apr 2020 16:42:05 -0700 (PDT) X-Received: by 2002:a05:6830:11d7:: with SMTP id v23mr7790598otq.216.1587339724931; Sun, 19 Apr 2020 16:42:04 -0700 (PDT) MIME-Version: 1.0 References: <202004150200.03F20I3H001953@repo.freebsd.org> <20200419224713.xaxvnuo334v6bhtj@mutt-hbsd> <20200419231353.fkx5uwtqq7h7yolh@mutt-hbsd> In-Reply-To: <20200419231353.fkx5uwtqq7h7yolh@mutt-hbsd> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sun, 19 Apr 2020 16:41:53 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r359950 - head/usr.sbin/bhyve To: Shawn Webb Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4955vz0wzdz4CkN X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.167.193 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-2.17 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; HAS_REPLYTO(0.00)[cem@freebsd.org]; REPLYTO_ADDR_EQ_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[193.167.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; IP_SCORE(-0.17)[ip: (0.00), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[193.167.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 23:42:08 -0000 Thanks! I believe we're running into VM_MAX_MEMMAPS (4) due to: 1. Low memory (0 through PCI hole) 2. High memory (4GB+) 3. Framebuffer 4. VMgenid's segment 5. EFI firmware's segment As a temporary workaround, if you do not need any of: >3GB RAM, framebuffer, or EFI boot, turning off any one of these should free a segment and allow boot. Unless there is an ABI problem, I think we should probably go ahead and bump VM_MAX_MEMMAPS, or make it dynamically sized. And as a userspace workaround for the issue that doesn't require a reboot (or reload of vmm.ko), we could add a knob to bhyve(8) to disable vmgenid. Best, Conrad On Sun, Apr 19, 2020 at 4:14 PM Shawn Webb wrote: > > This is the full output from bhyve: > > fbuf frame buffer base: 0x69191a00000 [sz 16777216] > bhyve: bootrom_alloc: vm_mmap_mapseg: No space left on device > bhyve: vmgenc_init: bootrom_alloc > > Thanks, > > -- > Shawn Webb > Cofounder / Security Engineer > HardenedBSD > > GPG Key ID: 0xFF2E67A277F8E1FA > GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 > https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc > > On Sun, Apr 19, 2020 at 04:04:16PM -0700, Conrad Meyer wrote: > > Hey Shawn, > > > > I will take a look. Thanks for the report and especially the repro example. > > What sort of bad symptoms are you observing (or will it be super obvious > > when I try this)? > > > > Thanks, > > Conrad > > > > On Sun, Apr 19, 2020 at 15:53 Shawn Webb wrote: > > > > > On Wed, Apr 15, 2020 at 02:00:18AM +0000, Conrad Meyer wrote: > > > > Author: cem > > > > Date: Wed Apr 15 02:00:17 2020 > > > > New Revision: 359950 > > > > URL: https://svnweb.freebsd.org/changeset/base/359950 > > > > > > > > Log: > > > > bhyve(8): Add VM Generation Counter ACPI device > > > > > > > > Add an implementatation of the 'Virtual Machine Generation ID' spec to > > > > Bhyve. The spec provides a randomly generated GUID (at bhyve start) in > > > > device memory, along with an ACPI device with _CID VM_Gen_Counter and > > > ADDR > > > > evaluating to a Package pointing at that GUID. > > > > > > > > A GPE is defined which Notifies the ACPI Device when the generation > > > changes > > > > (such as when a snapshot is rolled back). At this time, Bhyve does not > > > > support snapshotting, so the GPE is never actually raised. > > > > > > > > Suggested by: rpokala > > > > Discussed with: grehan > > > > Differential Revision: https://reviews.freebsd.org/D23165 > > > > > > > > Added: > > > > head/usr.sbin/bhyve/vmgenc.c (contents, props changed) > > > > head/usr.sbin/bhyve/vmgenc.h (contents, props changed) > > > > Modified: > > > > head/usr.sbin/bhyve/Makefile > > > > head/usr.sbin/bhyve/acpi.c > > > > head/usr.sbin/bhyve/acpi.h > > > > head/usr.sbin/bhyve/bhyverun.c > > > > head/usr.sbin/bhyve/pm.c > > > > > > Hey Conrad, > > > > > > Something about this commit broke bhyve in UEFI mode. Reverting this > > > specific change caused bhyve to work again. Here's a sample command: > > > > > > /usr/obj/usr/src/amd64.amd64/usr.sbin/bhyve/bhyve \ > > > -c 4 \ > > > -m 16g \ > > > -H \ > > > -A \ > > > -P \ > > > -S \ > > > -g 0 \ > > > -s 0:0,hostbridge \ > > > -s 1:0,lpc \ > > > -s 29,fbuf,tcp=127.0.0.1:5910,w=1024,h=768,wait \ > > > -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ > > > -s 2:0,virtio-net,tap1 \ > > > -s 3:0,virtio-blk,/dev/zvol/rpool/bhyve/hbsd-cross-dso-cfi-01/disk-01 \ > > > -l com1,/dev/nmdm-hbsd-cross-dso-cfi-01-A \ > > > -s 31:0,ahci-cd,/ISO/HardenedBSD/12-stable_amd64/2020-04-19_disc1.iso \ > > > hbsd-cdcfi-01 > > > > > > Thanks, > > > > > > -- > > > Shawn Webb > > > Cofounder / Security Engineer > > > HardenedBSD > > > > > > GPG Key ID: 0xFF2E67A277F8E1FA > > > GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 > > > > > > https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc > > > From owner-svn-src-all@freebsd.org Sun Apr 19 23:45:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA0782AEE41 for ; Sun, 19 Apr 2020 23:45:49 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from vito.onthenet.com.au (vito.onthenet.com.au [203.22.124.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49560F2VSvz4D52 for ; Sun, 19 Apr 2020 23:45:49 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto2.onthenet.com.au [203.13.68.14]) by vito.onthenet.com.au (Postfix) with ESMTPS id 9F4C720C1157 for ; Mon, 20 Apr 2020 09:45:44 +1000 (AEST) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTPS id 84E0620B49B4 for ; Mon, 20 Apr 2020 09:45:44 +1000 (AEST) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id 76A832127CA6 for ; Mon, 20 Apr 2020 09:45:44 +1000 (AEST) Received: from iredmail.onthenet.com.au ([127.0.0.1]) by iredmail.onthenet.com.au (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id azM2kuSQ8XP4 for ; Mon, 20 Apr 2020 09:45:44 +1000 (AEST) Received: from MacBook-Air-4.local (otn-120-29-62-248.broadband.onthenet.net [120.29.62.248]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id 0A7352127CA0; Mon, 20 Apr 2020 09:45:44 +1000 (AEST) Subject: Re: svn commit: r359950 - head/usr.sbin/bhyve To: cem@freebsd.org, Shawn Webb Cc: src-committers , svn-src-all , svn-src-head References: <202004150200.03F20I3H001953@repo.freebsd.org> <20200419224713.xaxvnuo334v6bhtj@mutt-hbsd> <20200419231353.fkx5uwtqq7h7yolh@mutt-hbsd> From: Peter Grehan Message-ID: <686f9074-f3c4-69c8-305f-ef7a176f1fdd@freebsd.org> Date: Mon, 20 Apr 2020 09:45:43 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=UIBp4xXy c=1 sm=1 tr=0 a=A6CF0fG5TOl4vs6YHvqXgw==:117 a=DPSYfp6L38iglyTf480Cpw==:17 a=IkcTkHD0fZMA:10 a=cl8xLZFz6L8A:10 a=HhEx0fGA1_H0kInabGgA:9 a=QEXdDO2ut3YA:10 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=JKaPTPCb c=1 sm=1 tr=0 a=eF5wA05EhuPcU0j7PNT2Vg==:117 a=DPSYfp6L38iglyTf480Cpw==:17 a=IkcTkHD0fZMA:10 a=cl8xLZFz6L8A:10 a=HhEx0fGA1_H0kInabGgA:9 a=QEXdDO2ut3YA:10 X-Rspamd-Queue-Id: 49560F2VSvz4D52 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; ASN(0.00)[asn:9313, ipnet:203.22.124.0/23, country:AU] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 23:45:49 -0000 > Unless there is an ABI problem, I think we should probably go > ahead and bump VM_MAX_MEMMAPS That's a reasonable fix - double it (or more) until it's made dynamic. The VGA code is another (future) client of this, and it would allow other things like multiple frame buffers. later, Peter. From owner-svn-src-all@freebsd.org Sun Apr 19 23:50:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 690C32AF134; Sun, 19 Apr 2020 23:50:57 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49566924Zhz4DPV; Sun, 19 Apr 2020 23:50:56 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ot1-f48.google.com with SMTP id g14so6542726otg.10; Sun, 19 Apr 2020 16:50:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=XpiNuN4BcglYEEOlNyYGO7LjVr8UGcxIsVTu1BL1Pqo=; b=j7s57zw5fnyhWWTMHlgdfb+Id9o+mCd1HCXwj0uEyilc0QJExQX83NcrseMFlTTk1t Mxi6ae6HhRUd2XZMsZVr/ssOIwtNP4JNS7tci2ulqGrwfuYZkpESjnhexAtMcw5usSsd phUHyzDQNW9ZJpKSAlmb+fc2yiln9z2QEb0vG5GTC+dF7WibRYjEQS2GbEMmZAWpR+0D cdaOOmSf4b7vA9pm/gJ6A1qkFuCu7DdOf6FypmUO/CfyfdHZpxr4mA6hD3gJKZABMTDV WcLR2NZeUdgCX5xPJxSusH2rtze6Ou5r+3Al7zgudu2rXWoFN2DTEhn9lNiG+KOP23AS D7NA== X-Gm-Message-State: AGi0PuY4e4/uPODjmJ3F7xmUvfz7zJ6hmkgvEJRCda9su8Epu8XqrlYe IFcuk1L75rsnLzSjfXqA3msQchln X-Google-Smtp-Source: APiQypJHCmp8tPQRCAOwLu95UsHj5xWeCDjo/3EkcjoYcSqpV0J+mH+liFojBeTlagm4sFkF5VOGow== X-Received: by 2002:a05:6830:4c8:: with SMTP id s8mr7318697otd.198.1587340255828; Sun, 19 Apr 2020 16:50:55 -0700 (PDT) Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com. [209.85.210.50]) by smtp.gmail.com with ESMTPSA id g10sm345470oou.31.2020.04.19.16.50.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Apr 2020 16:50:55 -0700 (PDT) Received: by mail-ot1-f50.google.com with SMTP id m13so6543748otf.6; Sun, 19 Apr 2020 16:50:55 -0700 (PDT) X-Received: by 2002:a9d:6b97:: with SMTP id b23mr1318272otq.157.1587340255413; Sun, 19 Apr 2020 16:50:55 -0700 (PDT) MIME-Version: 1.0 References: <202004150200.03F20I3H001953@repo.freebsd.org> <20200419224713.xaxvnuo334v6bhtj@mutt-hbsd> <20200419231353.fkx5uwtqq7h7yolh@mutt-hbsd> <686f9074-f3c4-69c8-305f-ef7a176f1fdd@freebsd.org> In-Reply-To: <686f9074-f3c4-69c8-305f-ef7a176f1fdd@freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sun, 19 Apr 2020 16:50:44 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r359950 - head/usr.sbin/bhyve To: Peter Grehan , Shawn Webb Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49566924Zhz4DPV X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 23:50:57 -0000 https://reviews.freebsd.org/D24507 :-) On Sun, Apr 19, 2020 at 4:45 PM Peter Grehan wrote: > > > Unless there is an ABI problem, I think we should probably go > > ahead and bump VM_MAX_MEMMAPS > > That's a reasonable fix - double it (or more) until it's made dynamic. > The VGA code is another (future) client of this, and it would allow > other things like multiple frame buffers. > > later, > > Peter. From owner-svn-src-all@freebsd.org Sun Apr 19 23:53:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C81FB2AF1EA; Sun, 19 Apr 2020 23:53:47 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49569R4YXsz4Dpl; Sun, 19 Apr 2020 23:53:47 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 978A06543; Sun, 19 Apr 2020 23:53:47 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03JNrl3A065559; Sun, 19 Apr 2020 23:53:47 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03JNrlh4065558; Sun, 19 Apr 2020 23:53:47 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202004192353.03JNrlh4065558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sun, 19 Apr 2020 23:53:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360107 - head/sys/amd64/vmm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/amd64/vmm X-SVN-Commit-Revision: 360107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 23:53:47 -0000 Author: cem Date: Sun Apr 19 23:53:47 2020 New Revision: 360107 URL: https://svnweb.freebsd.org/changeset/base/360107 Log: vmm(4): Bump VM_MAX_MEMMAPS for vmgenid As a short term solution for the problem reported by Shawn Webb re: r359950, bump the maximum number of memmaps per VM. This structure is 40 bytes, and the additional four (fixed array embedded in the struct vm) members increase the size of struct vm by 3%. (The vast majority of struct vm is the embedded struct vcpu array, which accounts for 84% of the size -- over 4 kB.) Reported by: Shawn Webb Reviewed by: grehan X-MFC-With: r359950 Differential Revision: https://reviews.freebsd.org/D24507 Modified: head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Sun Apr 19 21:38:03 2020 (r360106) +++ head/sys/amd64/vmm/vmm.c Sun Apr 19 23:53:47 2020 (r360107) @@ -134,7 +134,7 @@ struct mem_map { int prot; int flags; }; -#define VM_MAX_MEMMAPS 4 +#define VM_MAX_MEMMAPS 8 /* * Initialization: From owner-svn-src-all@freebsd.org Sun Apr 19 23:55:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D18232AF286; Sun, 19 Apr 2020 23:55:50 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4956Cn6dzhz4F17; Sun, 19 Apr 2020 23:55:49 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi1-f179.google.com with SMTP id t199so7316794oif.7; Sun, 19 Apr 2020 16:55:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=BakRynuUiTIE65pALJ2qcxx2SBpcfz36rkoYsW3Yi10=; b=ayy/Wbo5jq6HJmS1Fo3qRNkYR4ML6fhT26hWr81p07vUAfbM3f8i4xfv0mn9LY5CFI jNwDY7FXATzwgRNplhVsHN53ngqOxVDvCXwUxUKoi8yo6oTk3dtiQ/e8zbhNtypsJuv0 Jb0f6iwLmiNp9tEuFti3iT93lpaluUtO8TlSnLsKso/4EzDWjy8rgH1gLYoB7EFT/PPD G90YjFtxtvMiQa3N7DEjriogzTxvEab8vSiZbnRfDXdOuqc3HIYE/PNxm70QGxsNYA99 Uwz5FFWWY6u27sZ3CJ5JxFIIu4k0B+G3e6jH2ILnCAzDU5nT9sgmFSkujBc85DaCq/do 9lMA== X-Gm-Message-State: AGi0PuaTpfZZgwwL6LdMTAWKoyUqyurZJkAIi6ehPBa1uUcVpNpEPtyc vgugTt8ooZZNiO9GHAjOXvjJthEp X-Google-Smtp-Source: APiQypJX+6QStXmaZFJ3Sa+gX3qYu7asWRlC/Xp94MHnzdjz/nJiNJHUZIvF2bqn2eiU/iznKa8PIw== X-Received: by 2002:aca:c28b:: with SMTP id s133mr9292616oif.36.1587340548722; Sun, 19 Apr 2020 16:55:48 -0700 (PDT) Received: from mail-oo1-f46.google.com (mail-oo1-f46.google.com. [209.85.161.46]) by smtp.gmail.com with ESMTPSA id f25sm8121552oti.2.2020.04.19.16.55.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Apr 2020 16:55:48 -0700 (PDT) Received: by mail-oo1-f46.google.com with SMTP id q204so1743262ooq.1; Sun, 19 Apr 2020 16:55:48 -0700 (PDT) X-Received: by 2002:a4a:bb10:: with SMTP id f16mr2422336oop.43.1587340548437; Sun, 19 Apr 2020 16:55:48 -0700 (PDT) MIME-Version: 1.0 References: <202004150200.03F20I3H001953@repo.freebsd.org> <20200419224713.xaxvnuo334v6bhtj@mutt-hbsd> <20200419231353.fkx5uwtqq7h7yolh@mutt-hbsd> <686f9074-f3c4-69c8-305f-ef7a176f1fdd@freebsd.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sun, 19 Apr 2020 16:55:37 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r359950 - head/usr.sbin/bhyve To: Shawn Webb Cc: Peter Grehan , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4956Cn6dzhz4F17 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.167.179 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-2.21 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; HAS_REPLYTO(0.00)[cem@freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[179.167.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; IP_SCORE(-0.22)[ip: (-0.22), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; REPLYTO_ADDR_EQ_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 23:55:50 -0000 Committed in r360107, if you don't mind rebooting to try the patch. I will work on the slightly more complicated additional steps mentioned earlier, but those will take a little more time. Thanks again, Conrad On Sun, Apr 19, 2020 at 4:50 PM Conrad Meyer wrote: > > https://reviews.freebsd.org/D24507 :-) > > On Sun, Apr 19, 2020 at 4:45 PM Peter Grehan wrote: > > > > > Unless there is an ABI problem, I think we should probably go > > > ahead and bump VM_MAX_MEMMAPS > > > > That's a reasonable fix - double it (or more) until it's made dynamic. > > The VGA code is another (future) client of this, and it would allow > > other things like multiple frame buffers. > > > > later, > > > > Peter. From owner-svn-src-all@freebsd.org Sun Apr 19 23:58:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FC962AF4FC for ; Sun, 19 Apr 2020 23:58:14 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4956GY6R9Yz4FBG for ; Sun, 19 Apr 2020 23:58:13 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wm1-x332.google.com with SMTP id g12so9366087wmh.3 for ; Sun, 19 Apr 2020 16:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ntwEm5YA5Uj8fw2FaYRIcussRqc+KO7Rw/fy+SspGPk=; b=JQQrjsLWZffc5kMPtZq8hhdFjgAN3tjqd8v3jxXCWwWUdijDVhAtFDQrsA6v2IfDmQ 3ZwyfCfLZ2Ou7mqX8t9MdlR+fci2m0Yt0tLdHUb8TWemVL/K7Mb6yKFG3JpJgLs4TtQz dYDZ91nuXEiAy5S7qJSXTJRpIYmfDIRWdUiCyWeqvqSBMOvChCBE69bFIAaVm2sPQi7Y uB87OYknUfQ+rd7ta/jbGnk4IJxcjQAZ+hbqy1z9JqthSvzzMxS6KgcXBD2u1X9htrRf kXNzoD3zzEPn/EmzQJTw0AWHgVsRuRl03Jk/X5u7ZwIIhf+tZL9OiUtXvyMf7Gxq/nix busA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ntwEm5YA5Uj8fw2FaYRIcussRqc+KO7Rw/fy+SspGPk=; b=ZAdtGBkJPfS76xi/ACtBmioAlwNdFTlv5xMFMm37CS83JyGVmaUwyj6oUmUiXcpi2x S7Wsnjs76NnYM18cYGFi2iyyZMjMj37zPOUGaa7oYNx9yA4RqS1c2oZ7SVqsnSBbL3iP QDdpA1EKwXz9E7OvNhlHMv98fJn6PThlS/kigvgZBKPH5HxDWI22SeSF0CfOZHkKHxT0 EIERr9HZbqwyNwOukjylwkHo3EdnHgC1rIx6LqDp2MhiugrtEX4uWxEC/KreTORX6rym HFtk63sspJBag8Wy57WRsNQLgP49GPQccBWQuMdygxc3EPcxascKcFs8JbW18NC6xm/n RAug== X-Gm-Message-State: AGi0PuZYnSGH0c7VaOXxK6h0epuRCT7To0w/8omFYtWNHTeOj+UcPAdH 4o10H6NqQSSBN5BrIN8u00VkAA== X-Google-Smtp-Source: APiQypL0EINZ6vHfh6Js4KtiPTMXiQuF2s7MgQE8OqFfcevUNEZRBr5P5GMPl3lM5IlheTFst57M8Q== X-Received: by 2002:a1c:2002:: with SMTP id g2mr14215744wmg.109.1587340691066; Sun, 19 Apr 2020 16:58:11 -0700 (PDT) Received: from mutt-hbsd (tor-exit-12.zbau.f3netze.de. [185.220.100.251]) by smtp.gmail.com with ESMTPSA id f8sm19317247wrm.14.2020.04.19.16.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Apr 2020 16:58:10 -0700 (PDT) Date: Sun, 19 Apr 2020 19:58:01 -0400 From: Shawn Webb To: Conrad Meyer Cc: Peter Grehan , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r359950 - head/usr.sbin/bhyve Message-ID: <20200419235801.dxzgaqfrghnbqrrw@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA References: <202004150200.03F20I3H001953@repo.freebsd.org> <20200419224713.xaxvnuo334v6bhtj@mutt-hbsd> <20200419231353.fkx5uwtqq7h7yolh@mutt-hbsd> <686f9074-f3c4-69c8-305f-ef7a176f1fdd@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rhk6bpyxdnv4gyhk" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4956GY6R9Yz4FBG X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=JQQrjsLW; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2a00:1450:4864:20::332 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [3.32 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(0.00)[+ip6:2a00:1450:4000::/36:c]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.38)[ip: (-9.09), ipnet: 2a00:1450::/32(-2.34), asn: 15169(-0.43), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[251.100.220.185.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.4]; R_DKIM_ALLOW(0.00)[hardenedbsd.org:s=google]; NEURAL_HAM_MEDIUM(-0.81)[-0.806,0]; FROM_HAS_DN(0.00)[]; SH_AUTHBL_RECEIVED(4.00)[251.100.220.185.khpj7ygk5idzvmvt5x4ziurxhy.authbl.dq.spamhaus.net : 127.0.0.20]; NEURAL_HAM_LONG(-0.90)[-0.896,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; BAD_REP_POLICIES(0.10)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2.3.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; MID_RHS_NOT_FQDN(0.50)[]; GREYLIST(0.00)[pass,meta]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 23:58:14 -0000 --rhk6bpyxdnv4gyhk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thanks, Conrad! I'll test out the change tomorrow after the HardenedBSD auto-sync scripts run tonight. I'll report back tomorrow. Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Sha= wn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc On Sun, Apr 19, 2020 at 04:55:37PM -0700, Conrad Meyer wrote: > Committed in r360107, if you don't mind rebooting to try the patch. I > will work on the slightly more complicated additional steps mentioned > earlier, but those will take a little more time. >=20 > Thanks again, > Conrad >=20 > On Sun, Apr 19, 2020 at 4:50 PM Conrad Meyer wrote: > > > > https://reviews.freebsd.org/D24507 :-) > > > > On Sun, Apr 19, 2020 at 4:45 PM Peter Grehan wrote: > > > > > > > Unless there is an ABI problem, I think we should probably go > > > > ahead and bump VM_MAX_MEMMAPS > > > > > > That's a reasonable fix - double it (or more) until it's made dynam= ic. > > > The VGA code is another (future) client of this, and it would allow > > > other things like multiple frame buffers. > > > > > > later, > > > > > > Peter. --rhk6bpyxdnv4gyhk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIyBAEBCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAl6c5YMACgkQ/y5nonf4 4fqFmg/4xqK/C1Vh0T+Nskta9Se7O1CjOaqr9Oco5JmrKbLNIFdIvLFswXydWWJv kiRHQCC/xjXjHO4bNSnKbgq4vJFLdv0QtOQOj4McRB03kucLcaVKrUg8AxwweT4+ 24u1m/ZDQzxrD5emrwzRymYlz39h/UzxmGMlWyLe1EexSC+dB7XRWhcTq6PMc/Vg uXdOpuFaZldgXUWfHGxkfxX0Y5na3ImI74D6j5/tYSRYkJgoI+R94ueH7UQ6Kphu zc8s2UMrJnEATWdruc3LSqNTaxjVIIyPz9DnhG7OAGbZ3DHngNC5YP+P0HnpYfnJ nTYn6dzyTvtliaGPsSCBGZfw4/fYKjgCdwg84rEoP1sHKP7rg80M0sjCh5v5j+Fl 5yXMYiioABdlt/QEk1Rko4mLNdE/e56kjV10nm74nvbzYaILgvu/2OwsE/bpIxeq uiZ0oH1ZHuO+As9Hygl4GBNGZBWs745C1FNvJboQkPi46Cp2tDE55ez2e4shapJP WAUQ8etyYYge631oLXHVtReOLdswE+JE//tdFvMIPWq1Q9oyNU8tJIAKvYgvp9Ik SBY889+tmpkYRXToFVK2PVSYvwqINChl3XEkLPPpxMceJQ12/5rHhHDPRARn+V/+ E+73/gvS3rqEafJfx270FA/ZABWsvkuC0Nx2si+QWEMZ6D1qOA== =irOv -----END PGP SIGNATURE----- --rhk6bpyxdnv4gyhk-- From owner-svn-src-all@freebsd.org Sun Apr 19 23:59:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5E442AF61C; Sun, 19 Apr 2020 23:59:49 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oo1-f65.google.com (mail-oo1-f65.google.com [209.85.161.65]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4956JP44YJz4FM5; Sun, 19 Apr 2020 23:59:49 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oo1-f65.google.com with SMTP id g14so1738326ooa.4; Sun, 19 Apr 2020 16:59:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=OAvZqJ5DDepgmLJQTCLa/wR0N/CV6sM5OU1LUp4v+RU=; b=P+fXfj4NF6QzDV+QC5YEu0JS3sIAVH925uDHoZXGMuihw7DsbXz+1Oidww4B2mzcVB XhxA3JYb1Swha5mEV4l6SqF+NyyXJHGWwtE60FaZZWaPtzTv1HpzFA3uJCSqAQgA20Ys qmz16AJ/ARyxq7MDCWQ/9M0M316B+TN/x0cfgTY86j0obk0lODjTlKGrRUC56bjpJXuZ +uvj1Ekp8So2jnnVEohCRntRAaUGFxe/zrTrnd0SuQknhk3Rq04PmvjJ5bRZ/onbhXPm k3yU2n0MwpIag3+bw75m5K3Ipz7nv0D0kCHcCPwIiw8KgHfocCrZSF3BqtkcK4JZhL85 kP1Q== X-Gm-Message-State: AGi0PuYgdQx7saSuFdm4qMugfkiVhLX8VS/+NYmIznN8Y8Es2NE6uZ0r oyQmUMRfpe9tR8umh1JZ2bPq03iz X-Google-Smtp-Source: APiQypLOwBMgsUdAnioQ/73Fs0pxGwytma4dxwqr0KeoMgDvnEkZXR0Ahs8+oit37hbo7rweT1ZvaQ== X-Received: by 2002:a4a:a5d0:: with SMTP id k16mr10917145oom.41.1587340788595; Sun, 19 Apr 2020 16:59:48 -0700 (PDT) Received: from mail-oo1-f47.google.com (mail-oo1-f47.google.com. [209.85.161.47]) by smtp.gmail.com with ESMTPSA id k13sm9090882oou.27.2020.04.19.16.59.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Apr 2020 16:59:48 -0700 (PDT) Received: by mail-oo1-f47.google.com with SMTP id e18so1732389oot.9; Sun, 19 Apr 2020 16:59:48 -0700 (PDT) X-Received: by 2002:a4a:b38d:: with SMTP id p13mr10891875ooo.22.1587340788125; Sun, 19 Apr 2020 16:59:48 -0700 (PDT) MIME-Version: 1.0 References: <202004181953.03IJrlA0090967@repo.freebsd.org> <530b4960-9735-15da-84b4-2fdda9930fc6@fastmail.com> <35522470-1b08-0eaa-e12e-d0cbd6b652e9@FreeBSD.org> In-Reply-To: <35522470-1b08-0eaa-e12e-d0cbd6b652e9@FreeBSD.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sun, 19 Apr 2020 16:59:37 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360078 - in head: sbin/bectl share/man/man8 To: Mateusz Piotrowski <0mp@freebsd.org> Cc: Yuri Pankov , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4956JP44YJz4FM5 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 23:59:49 -0000 There is also mdoc(7), which describes the same thing: SEE ALSO References other manuals with related topics. This section should exist for most manuals. Cross-references should conventionally be ordered first by section, then alphabetically (ignoring case). I consult mdoc(7) frequently when writing or editing manual pages. In addition to 'mandoc -Tlint', there is a tool in ports called 'igor' which can be used to perform some style checking of manual pages. Hope that helps! Regards, Conrad On Sun, Apr 19, 2020 at 3:36 AM Mateusz Piotrowski <0mp@freebsd.org> wrote: > > On 4/18/20 11:11 PM, Yuri Pankov wrote: > > We don't have the man style guide (that I know of, at least) > We have style.mdoc(5)! From owner-svn-src-all@freebsd.org Mon Apr 20 00:47:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F1C472B0AAD; Mon, 20 Apr 2020 00:47:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4957MN6BHcz4JPD; Mon, 20 Apr 2020 00:47:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFA036EE0; Mon, 20 Apr 2020 00:47:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03K0lSlN096909; Mon, 20 Apr 2020 00:47:28 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03K0lS2Q096908; Mon, 20 Apr 2020 00:47:28 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004200047.03K0lS2Q096908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 20 Apr 2020 00:47:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360108 - head/tests/sys/kqueue/libkqueue X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/tests/sys/kqueue/libkqueue X-SVN-Commit-Revision: 360108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 00:47:29 -0000 Author: kevans Date: Mon Apr 20 00:47:28 2020 New Revision: 360108 URL: https://svnweb.freebsd.org/changeset/base/360108 Log: tests: kqueue: fix some issues with now() on ILP32 platforms There were ultimately two separate problems here: - a 32-bit long cannot represent microseconds since 1970 (noted by ian) - time_t is 32-bit on i386, so now() was wrong anyways even with the correct return type. For the first, just explicitly use a uint64_t for now() and all of the callers. For the second, we need to explicitly cast tv_sec to uint64_t before it gets multiplied in the SEC_TO_US macro. Casting this instance rather than generally in the macro was arbitrarily chosen simply because all other uses are converting small relative time values. The tests now pass on i386, at least; presumably other ILP32 will be fine now as well. Modified: head/tests/sys/kqueue/libkqueue/timer.c Modified: head/tests/sys/kqueue/libkqueue/timer.c ============================================================================== --- head/tests/sys/kqueue/libkqueue/timer.c Sun Apr 19 23:53:47 2020 (r360107) +++ head/tests/sys/kqueue/libkqueue/timer.c Mon Apr 20 00:47:28 2020 (r360108) @@ -30,13 +30,14 @@ /* Get the current time with microsecond precision. Used for * sub-second timing to make some timer tests run faster. */ -static long +static uint64_t now(void) { struct timeval tv; gettimeofday(&tv, NULL); - return SEC_TO_US(tv.tv_sec) + tv.tv_usec; + /* Promote potentially 32-bit time_t to uint64_t before conversion. */ + return SEC_TO_US((uint64_t)tv.tv_sec) + tv.tv_usec; } /* Sleep for a given number of milliseconds. The timeout is assumed to @@ -216,7 +217,7 @@ test_abstime(void) { const char *test_id = "kevent(EVFILT_TIMER, EV_ONESHOT, NOTE_ABSTIME)"; struct kevent kev; - long end, start, stop; + uint64_t end, start, stop; const int timeout_sec = 3; test_begin(test_id); @@ -252,7 +253,7 @@ test_update(void) const char *test_id = "kevent(EVFILT_TIMER (UPDATE), EV_ADD | EV_ONESHOT)"; struct kevent kev; long elapsed; - long start; + uint64_t start; test_begin(test_id); @@ -297,7 +298,7 @@ test_update_equal(void) const char *test_id = "kevent(EVFILT_TIMER (UPDATE=), EV_ADD | EV_ONESHOT)"; struct kevent kev; long elapsed; - long start; + uint64_t start; test_begin(test_id); @@ -341,7 +342,7 @@ test_update_expired(void) const char *test_id = "kevent(EVFILT_TIMER (UPDATE EXP), EV_ADD | EV_ONESHOT)"; struct kevent kev; long elapsed; - long start; + uint64_t start; test_begin(test_id); @@ -392,8 +393,7 @@ test_update_periodic(void) const char *test_id = "kevent(EVFILT_TIMER (UPDATE), periodic)"; struct kevent kev; long elapsed; - long start; - long stop; + uint64_t start, stop; test_begin(test_id); @@ -450,8 +450,7 @@ test_update_timing(void) int iteration; int sleeptime; long elapsed; - long start; - long stop; + uint64_t start, stop; test_begin(test_id); From owner-svn-src-all@freebsd.org Mon Apr 20 01:17:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D3B8A2B16F3; Mon, 20 Apr 2020 01:17:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49581S5Km0z4LZT; Mon, 20 Apr 2020 01:17:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B21E87497; Mon, 20 Apr 2020 01:17:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03K1H0hZ015743; Mon, 20 Apr 2020 01:17:00 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03K1H03B015742; Mon, 20 Apr 2020 01:17:00 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202004200117.03K1H03B015742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 20 Apr 2020 01:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360109 - stable/12/sys/rpc X-SVN-Group: stable-12 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/12/sys/rpc X-SVN-Commit-Revision: 360109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 01:17:00 -0000 Author: rmacklem Date: Mon Apr 20 01:17:00 2020 New Revision: 360109 URL: https://svnweb.freebsd.org/changeset/base/360109 Log: MFC: r359643 Change the xid for client side krpc over UDP to a global value. Without this patch, the xid used for the client side krpc requests over UDP was initialized for each "connection". A "connection" for UDP is rather sketchy and for the kernel NLM a new one is created every 2minutes. A problem with client side interoperability with a Netapp server for the NLM was reported and it is believed to be caused by reuse of the same xid. Although this was never completely diagnosed by the reporter, I could see how the same xid might get reused, since it is initialized to a value based on the TOD clock every two minutes. I suspect initializing the value for every "connection" was inherited from userland library code, where having a global xid was not practical. However, implementing a global "xid" for the kernel rpc is straightforward and will ensure that an xid value is not reused for a long time. This patch does that and is hoped it will fix the Netapp interoperability problem. PR: 245022 Modified: stable/12/sys/rpc/clnt_dg.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/rpc/clnt_dg.c ============================================================================== --- stable/12/sys/rpc/clnt_dg.c Mon Apr 20 00:47:28 2020 (r360108) +++ stable/12/sys/rpc/clnt_dg.c Mon Apr 20 01:17:00 2020 (r360109) @@ -94,6 +94,8 @@ static struct clnt_ops clnt_dg_ops = { .cl_control = clnt_dg_control }; +static volatile uint32_t rpc_xid = 0; + /* * A pending RPC request which awaits a reply. Requests which have * received their reply will have cr_xid set to zero and cr_mrep to @@ -193,6 +195,7 @@ clnt_dg_create( struct __rpc_sockinfo si; XDR xdrs; int error; + uint32_t newxid; if (svcaddr == NULL) { rpc_createerr.cf_stat = RPC_UNKNOWNADDR; @@ -245,8 +248,10 @@ clnt_dg_create( cu->cu_sent = 0; cu->cu_cwnd_wait = FALSE; (void) getmicrotime(&now); - cu->cu_xid = __RPC_GETXID(&now); - call_msg.rm_xid = cu->cu_xid; + /* Clip at 28bits so that it will not wrap around. */ + newxid = __RPC_GETXID(&now) & 0xfffffff; + atomic_cmpset_32(&rpc_xid, 0, newxid); + call_msg.rm_xid = atomic_fetchadd_32(&rpc_xid, 1); call_msg.rm_call.cb_prog = program; call_msg.rm_call.cb_vers = version; xdrmem_create(&xdrs, cu->cu_mcallc, MCALL_MSG_SIZE, XDR_ENCODE); @@ -418,8 +423,7 @@ clnt_dg_call( call_again: mtx_assert(&cs->cs_lock, MA_OWNED); - cu->cu_xid++; - xid = cu->cu_xid; + xid = atomic_fetchadd_32(&rpc_xid, 1); send_again: mtx_unlock(&cs->cs_lock); @@ -865,13 +869,13 @@ clnt_dg_control(CLIENT *cl, u_int request, void *info) (void) memcpy(&cu->cu_raddr, addr, addr->sa_len); break; case CLGET_XID: - *(uint32_t *)info = cu->cu_xid; + *(uint32_t *)info = atomic_load_32(&rpc_xid); break; case CLSET_XID: /* This will set the xid of the NEXT call */ /* decrement by 1 as clnt_dg_call() increments once */ - cu->cu_xid = *(uint32_t *)info - 1; + atomic_store_32(&rpc_xid, *(uint32_t *)info - 1); break; case CLGET_VERS: From owner-svn-src-all@freebsd.org Mon Apr 20 01:26:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F35522B1BEB; Mon, 20 Apr 2020 01:26:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4958DB5zKLz4MN5; Mon, 20 Apr 2020 01:26:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C836D768C; Mon, 20 Apr 2020 01:26:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03K1QIJ0022077; Mon, 20 Apr 2020 01:26:18 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03K1QI6q022076; Mon, 20 Apr 2020 01:26:18 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202004200126.03K1QI6q022076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 20 Apr 2020 01:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360110 - stable/11/sys/rpc X-SVN-Group: stable-11 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/11/sys/rpc X-SVN-Commit-Revision: 360110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 01:26:19 -0000 Author: rmacklem Date: Mon Apr 20 01:26:18 2020 New Revision: 360110 URL: https://svnweb.freebsd.org/changeset/base/360110 Log: MFC: r359643 Change the xid for client side krpc over UDP to a global value. Without this patch, the xid used for the client side krpc requests over UDP was initialized for each "connection". A "connection" for UDP is rather sketchy and for the kernel NLM a new one is created every 2minutes. A problem with client side interoperability with a Netapp server for the NLM was reported and it is believed to be caused by reuse of the same xid. Although this was never completely diagnosed by the reporter, I could see how the same xid might get reused, since it is initialized to a value based on the TOD clock every two minutes. I suspect initializing the value for every "connection" was inherited from userland library code, where having a global xid was not practical. However, implementing a global "xid" for the kernel rpc is straightforward and will ensure that an xid value is not reused for a long time. This patch does that and is hoped it will fix the Netapp interoperability problem. PR: 245022 Modified: stable/11/sys/rpc/clnt_dg.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/rpc/clnt_dg.c ============================================================================== --- stable/11/sys/rpc/clnt_dg.c Mon Apr 20 01:17:00 2020 (r360109) +++ stable/11/sys/rpc/clnt_dg.c Mon Apr 20 01:26:18 2020 (r360110) @@ -92,6 +92,8 @@ static struct clnt_ops clnt_dg_ops = { .cl_control = clnt_dg_control }; +static volatile uint32_t rpc_xid = 0; + /* * A pending RPC request which awaits a reply. Requests which have * received their reply will have cr_xid set to zero and cr_mrep to @@ -191,6 +193,7 @@ clnt_dg_create( struct __rpc_sockinfo si; XDR xdrs; int error; + uint32_t newxid; if (svcaddr == NULL) { rpc_createerr.cf_stat = RPC_UNKNOWNADDR; @@ -243,8 +246,10 @@ clnt_dg_create( cu->cu_sent = 0; cu->cu_cwnd_wait = FALSE; (void) getmicrotime(&now); - cu->cu_xid = __RPC_GETXID(&now); - call_msg.rm_xid = cu->cu_xid; + /* Clip at 28bits so that it will not wrap around. */ + newxid = __RPC_GETXID(&now) & 0xfffffff; + atomic_cmpset_32(&rpc_xid, 0, newxid); + call_msg.rm_xid = atomic_fetchadd_32(&rpc_xid, 1); call_msg.rm_call.cb_prog = program; call_msg.rm_call.cb_vers = version; xdrmem_create(&xdrs, cu->cu_mcallc, MCALL_MSG_SIZE, XDR_ENCODE); @@ -420,8 +425,7 @@ clnt_dg_call( call_again: mtx_assert(&cs->cs_lock, MA_OWNED); - cu->cu_xid++; - xid = cu->cu_xid; + xid = atomic_fetchadd_32(&rpc_xid, 1); send_again: mtx_unlock(&cs->cs_lock); @@ -867,13 +871,13 @@ clnt_dg_control(CLIENT *cl, u_int request, void *info) (void) memcpy(&cu->cu_raddr, addr, addr->sa_len); break; case CLGET_XID: - *(uint32_t *)info = cu->cu_xid; + *(uint32_t *)info = atomic_load_32(&rpc_xid); break; case CLSET_XID: /* This will set the xid of the NEXT call */ /* decrement by 1 as clnt_dg_call() increments once */ - cu->cu_xid = *(uint32_t *)info - 1; + atomic_store_32(&rpc_xid, *(uint32_t *)info - 1); break; case CLGET_VERS: From owner-svn-src-all@freebsd.org Mon Apr 20 08:12:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8594D2BA911; Mon, 20 Apr 2020 08:12:41 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495KF52zfmz3Nhn; Mon, 20 Apr 2020 08:12:41 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6178DC649; Mon, 20 Apr 2020 08:12:41 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03K8CfQG075960; Mon, 20 Apr 2020 08:12:41 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03K8CeYH075958; Mon, 20 Apr 2020 08:12:40 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202004200812.03K8CeYH075958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 20 Apr 2020 08:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360111 - stable/12/usr.sbin/jail X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/usr.sbin/jail X-SVN-Commit-Revision: 360111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 08:12:41 -0000 Author: eugen Date: Mon Apr 20 08:12:40 2020 New Revision: 360111 URL: https://svnweb.freebsd.org/changeset/base/360111 Log: MFC r360040: jail(8): improve manual and usage information with more clear description for "jail -e" mode to show that it does not take additional jail name argument. Reported by: David Marec Modified: stable/12/usr.sbin/jail/jail.8 stable/12/usr.sbin/jail/jail.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/jail/jail.8 ============================================================================== --- stable/12/usr.sbin/jail/jail.8 Mon Apr 20 01:26:18 2020 (r360110) +++ stable/12/usr.sbin/jail/jail.8 Mon Apr 20 08:12:40 2020 (r360111) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 6, 2019 +.Dd April 17, 2020 .Dt JAIL 8 .Os .Sh NAME @@ -49,7 +49,6 @@ .Nm .Op Fl qv .Op Fl f Ar conf_file -.Op Fl e Ar separator .Op Fl rR .Op Cm * | Ar jail ... .Nm @@ -60,6 +59,10 @@ .Op Fl n Ar jailname .Op Fl s Ar securelevel .Op Ar path hostname [ Ar ip Ns [ Ns Ar ,... Ns ]] Ar command ... +.Nm +.Op Fl f Ar conf_file +.Fl e +.Ar separator .Sh DESCRIPTION The .Nm Modified: stable/12/usr.sbin/jail/jail.c ============================================================================== --- stable/12/usr.sbin/jail/jail.c Mon Apr 20 01:26:18 2020 (r360110) +++ stable/12/usr.sbin/jail/jail.c Mon Apr 20 08:12:40 2020 (r360111) @@ -1040,10 +1040,11 @@ usage(void) (void)fprintf(stderr, "usage: jail [-dhilqv] [-J jid_file] [-u username] [-U username]\n" " -[cmr] param=value ... [command=command ...]\n" - " jail [-dqv] [-f file] [-e separator] -[cmr] [jail]\n" + " jail [-dqv] [-f file] -[cmr] [jail]\n" " jail [-qv] [-f file] -[rR] ['*' | jail ...]\n" " jail [-dhilqv] [-J jid_file] [-u username] [-U username]\n" " [-n jailname] [-s securelevel]\n" - " path hostname [ip[,...]] command ...\n"); + " path hostname [ip[,...]] command ...\n" + " jail [-f file] -e separator\n"); exit(1); } From owner-svn-src-all@freebsd.org Mon Apr 20 08:15:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 089EA2BA9A2; Mon, 20 Apr 2020 08:15:37 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495KJS6Tldz3NvZ; Mon, 20 Apr 2020 08:15:36 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9D67C64B; Mon, 20 Apr 2020 08:15:36 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03K8FaL6076173; Mon, 20 Apr 2020 08:15:36 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03K8FaLF076171; Mon, 20 Apr 2020 08:15:36 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202004200815.03K8FaLF076171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 20 Apr 2020 08:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360112 - stable/11/usr.sbin/jail X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/usr.sbin/jail X-SVN-Commit-Revision: 360112 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 08:15:37 -0000 Author: eugen Date: Mon Apr 20 08:15:36 2020 New Revision: 360112 URL: https://svnweb.freebsd.org/changeset/base/360112 Log: MFC r360040: jail(8): improve manual and usage information with more clear description for "jail -e" mode to show that it does not take additional jail name argument. Reported by: David Marec Modified: stable/11/usr.sbin/jail/jail.8 stable/11/usr.sbin/jail/jail.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/jail/jail.8 ============================================================================== --- stable/11/usr.sbin/jail/jail.8 Mon Apr 20 08:12:40 2020 (r360111) +++ stable/11/usr.sbin/jail/jail.8 Mon Apr 20 08:15:36 2020 (r360112) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 10, 2018 +.Dd April 17, 2020 .Dt JAIL 8 .Os .Sh NAME @@ -49,7 +49,6 @@ .Nm .Op Fl qv .Op Fl f Ar conf_file -.Op Fl e Ar separator .Op Fl rR .Op Cm * | Ar jail ... .Nm @@ -60,6 +59,10 @@ .Op Fl n Ar jailname .Op Fl s Ar securelevel .Op Ar path hostname [ Ar ip Ns [ Ns Ar ,... Ns ]] Ar command ... +.Nm +.Op Fl f Ar conf_file +.Fl e +.Ar separator .Sh DESCRIPTION The .Nm Modified: stable/11/usr.sbin/jail/jail.c ============================================================================== --- stable/11/usr.sbin/jail/jail.c Mon Apr 20 08:12:40 2020 (r360111) +++ stable/11/usr.sbin/jail/jail.c Mon Apr 20 08:15:36 2020 (r360112) @@ -1048,10 +1048,11 @@ usage(void) (void)fprintf(stderr, "usage: jail [-dhilqv] [-J jid_file] [-u username] [-U username]\n" " -[cmr] param=value ... [command=command ...]\n" - " jail [-dqv] [-f file] [-e separator] -[cmr] [jail]\n" + " jail [-dqv] [-f file] -[cmr] [jail]\n" " jail [-qv] [-f file] -[rR] ['*' | jail ...]\n" " jail [-dhilqv] [-J jid_file] [-u username] [-U username]\n" " [-n jailname] [-s securelevel]\n" - " path hostname [ip[,...]] command ...\n"); + " path hostname [ip[,...]] command ...\n" + " jail [-f file] -e separator\n"); exit(1); } From owner-svn-src-all@freebsd.org Mon Apr 20 13:18:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFA792C2A09; Mon, 20 Apr 2020 13:18:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495S245WdHz4L1j; Mon, 20 Apr 2020 13:18:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4662FF8C; Mon, 20 Apr 2020 13:18:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KDIai6062553; Mon, 20 Apr 2020 13:18:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KDIaul062552; Mon, 20 Apr 2020 13:18:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004201318.03KDIaul062552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 20 Apr 2020 13:18:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360113 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 360113 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 13:18:36 -0000 Author: markj Date: Mon Apr 20 13:18:36 2020 New Revision: 360113 URL: https://svnweb.freebsd.org/changeset/base/360113 Log: MFC r359893: Fix sendto() on unconnected SOCK_STREAM/SEQPACKET unix sockets. Modified: stable/12/sys/kern/uipc_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/uipc_usrreq.c ============================================================================== --- stable/12/sys/kern/uipc_usrreq.c Mon Apr 20 08:15:36 2020 (r360112) +++ stable/12/sys/kern/uipc_usrreq.c Mon Apr 20 13:18:36 2020 (r360113) @@ -1135,25 +1135,29 @@ uipc_send(struct socket *so, int flags, struct mbuf *m case SOCK_STREAM: if ((so->so_state & SS_ISCONNECTED) == 0) { if (nam != NULL) { - if ((error = connect_internal(so, nam, td))) + error = connect_internal(so, nam, td); + if (error != 0) break; - } else { + } else { error = ENOTCONN; break; } - } else if ((unp2 = unp->unp_conn) == NULL) { + } else { + UNP_PCB_LOCK(unp); + } + + if ((unp2 = unp->unp_conn) == NULL) { + UNP_PCB_UNLOCK(unp); error = ENOTCONN; break; } else if (so->so_snd.sb_state & SBS_CANTSENDMORE) { + UNP_PCB_UNLOCK(unp); error = EPIPE; break; - } else { - UNP_PCB_LOCK(unp); - if ((unp2 = unp->unp_conn) == NULL) { - UNP_PCB_UNLOCK(unp); - error = ENOTCONN; - break; - } + } else if ((unp2 = unp->unp_conn) == NULL) { + UNP_PCB_UNLOCK(unp); + error = ENOTCONN; + break; } unp_pcb_owned_lock2(unp, unp2, freed); UNP_PCB_UNLOCK(unp); @@ -1195,15 +1199,11 @@ uipc_send(struct socket *so, int flags, struct mbuf *m sbappend_locked(&so2->so_rcv, m, flags); break; - case SOCK_SEQPACKET: { - const struct sockaddr *from; - - from = &sun_noname; + case SOCK_SEQPACKET: if (sbappendaddr_nospacecheck_locked(&so2->so_rcv, - from, m, control)) + &sun_noname, m, control)) control = NULL; break; - } } mbcnt = so2->so_rcv.sb_mbcnt; From owner-svn-src-all@freebsd.org Mon Apr 20 13:19:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A348C2C2A7E; Mon, 20 Apr 2020 13:19:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495S303vSCz4L8c; Mon, 20 Apr 2020 13:19:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8135AFF8D; Mon, 20 Apr 2020 13:19:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KDJOnP062644; Mon, 20 Apr 2020 13:19:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KDJO87062642; Mon, 20 Apr 2020 13:19:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004201319.03KDJO87062642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 20 Apr 2020 13:19:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360114 - stable/12/sys/dev/sound/pci/hda X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 360114 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 13:19:24 -0000 Author: markj Date: Mon Apr 20 13:19:23 2020 New Revision: 360114 URL: https://svnweb.freebsd.org/changeset/base/360114 Log: MFC r359894: snd_hda(4): Recognize the ALC257 codec. PR: 245524 Modified: stable/12/sys/dev/sound/pci/hda/hdac.h stable/12/sys/dev/sound/pci/hda/hdacc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdac.h Mon Apr 20 13:18:36 2020 (r360113) +++ stable/12/sys/dev/sound/pci/hda/hdac.h Mon Apr 20 13:19:23 2020 (r360114) @@ -361,6 +361,7 @@ #define HDA_CODEC_ALC235 HDA_CODEC_CONSTRUCT(REALTEK, 0x0235) #define HDA_CODEC_ALC255 HDA_CODEC_CONSTRUCT(REALTEK, 0x0255) #define HDA_CODEC_ALC256 HDA_CODEC_CONSTRUCT(REALTEK, 0x0256) +#define HDA_CODEC_ALC257 HDA_CODEC_CONSTRUCT(REALTEK, 0x0257) #define HDA_CODEC_ALC260 HDA_CODEC_CONSTRUCT(REALTEK, 0x0260) #define HDA_CODEC_ALC262 HDA_CODEC_CONSTRUCT(REALTEK, 0x0262) #define HDA_CODEC_ALC267 HDA_CODEC_CONSTRUCT(REALTEK, 0x0267) Modified: stable/12/sys/dev/sound/pci/hda/hdacc.c ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdacc.c Mon Apr 20 13:18:36 2020 (r360113) +++ stable/12/sys/dev/sound/pci/hda/hdacc.c Mon Apr 20 13:19:23 2020 (r360114) @@ -86,6 +86,7 @@ static const struct { { HDA_CODEC_ALC235, 0, "Realtek ALC235" }, { HDA_CODEC_ALC255, 0, "Realtek ALC255" }, { HDA_CODEC_ALC256, 0, "Realtek ALC256" }, + { HDA_CODEC_ALC257, 0, "Realtek ALC257" }, { HDA_CODEC_ALC260, 0, "Realtek ALC260" }, { HDA_CODEC_ALC262, 0, "Realtek ALC262" }, { HDA_CODEC_ALC267, 0, "Realtek ALC267" }, From owner-svn-src-all@freebsd.org Mon Apr 20 13:36:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03FD82C315D; Mon, 20 Apr 2020 13:36:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495SQ96K2gz4MbG; Mon, 20 Apr 2020 13:36:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC54318352; Mon, 20 Apr 2020 13:36:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KDa1Rt074553; Mon, 20 Apr 2020 13:36:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KDa1FP074552; Mon, 20 Apr 2020 13:36:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004201336.03KDa1FP074552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 20 Apr 2020 13:36:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360115 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 360115 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 13:36:02 -0000 Author: hselasky Date: Mon Apr 20 13:36:01 2020 New Revision: 360115 URL: https://svnweb.freebsd.org/changeset/base/360115 Log: Allow the ERR_CAST() function in the LinuxKPI to take a const void pointer. No functional change. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/err.h Modified: head/sys/compat/linuxkpi/common/include/linux/err.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/err.h Mon Apr 20 13:19:23 2020 (r360114) +++ head/sys/compat/linuxkpi/common/include/linux/err.h Mon Apr 20 13:36:01 2020 (r360115) @@ -31,6 +31,8 @@ #ifndef _LINUX_ERR_H_ #define _LINUX_ERR_H_ +#include + #include #define MAX_ERRNO 4095 @@ -62,9 +64,9 @@ IS_ERR_OR_NULL(const void *ptr) } static inline void * -ERR_CAST(void *ptr) +ERR_CAST(const void *ptr) { - return (void *)ptr; + return __DECONST(void *, ptr); } static inline int From owner-svn-src-all@freebsd.org Mon Apr 20 13:44:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C1E92C3639; Mon, 20 Apr 2020 13:44:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495Sbg2KzQz4NMt; Mon, 20 Apr 2020 13:44:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3176A18522; Mon, 20 Apr 2020 13:44:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KDiEwA080876; Mon, 20 Apr 2020 13:44:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KDiEvw080873; Mon, 20 Apr 2020 13:44:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004201344.03KDiEvw080873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 20 Apr 2020 13:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360116 - in head: sys/netgraph/bluetooth/hci sys/netgraph/bluetooth/include usr.sbin/bluetooth/hccontrol X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head: sys/netgraph/bluetooth/hci sys/netgraph/bluetooth/include usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 360116 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 13:44:15 -0000 Author: hselasky Date: Mon Apr 20 13:44:14 2020 New Revision: 360116 URL: https://svnweb.freebsd.org/changeset/base/360116 Log: Substitute le_read_supported_status with le_read_supported_states. Refer to bluetooth core v5.2 specifications Vol4. Part E. 7.8.27. PR: 245763 Submitted by: Marc Veldman MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c head/sys/netgraph/bluetooth/include/ng_hci.h head/usr.sbin/bluetooth/hccontrol/le.c Modified: head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c Mon Apr 20 13:36:01 2020 (r360115) +++ head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c Mon Apr 20 13:44:14 2020 (r360116) @@ -842,7 +842,7 @@ process_le_params(ng_hci_unit_p unit, u_int16_t ocf, case NG_HCI_OCF_LE_RAND: case NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_REPLY: case NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY: - case NG_HCI_OCF_LE_READ_SUPPORTED_STATUS: + case NG_HCI_OCF_LE_READ_SUPPORTED_STATES: case NG_HCI_OCF_LE_RECEIVER_TEST: case NG_HCI_OCF_LE_TRANSMITTER_TEST: case NG_HCI_OCF_LE_TEST_END: @@ -913,7 +913,7 @@ process_le_status(ng_hci_unit_p unit,ng_hci_command_st case NG_HCI_OCF_LE_RAND: case NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_REPLY: case NG_HCI_OCF_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY: - case NG_HCI_OCF_LE_READ_SUPPORTED_STATUS: + case NG_HCI_OCF_LE_READ_SUPPORTED_STATES: case NG_HCI_OCF_LE_RECEIVER_TEST: case NG_HCI_OCF_LE_TRANSMITTER_TEST: case NG_HCI_OCF_LE_TEST_END: Modified: head/sys/netgraph/bluetooth/include/ng_hci.h ============================================================================== --- head/sys/netgraph/bluetooth/include/ng_hci.h Mon Apr 20 13:36:01 2020 (r360115) +++ head/sys/netgraph/bluetooth/include/ng_hci.h Mon Apr 20 13:44:14 2020 (r360116) @@ -1673,12 +1673,12 @@ typedef struct { }__attribute__ ((packed)) ng_hci_le_long_term_key_request_negative_reply_rp; -#define NG_HCI_OCF_LE_READ_SUPPORTED_STATUS 0x001c +#define NG_HCI_OCF_LE_READ_SUPPORTED_STATES 0x001c /*No command parameter*/ typedef struct { u_int8_t status; - u_int64_t le_status; -}__attribute__ ((packed)) ng_hci_le_read_supported_status_rp; + u_int64_t le_states; +}__attribute__ ((packed)) ng_hci_le_read_supported_states_rp; #define NG_HCI_OCF_LE_RECEIVER_TEST 0x001d typedef struct{ Modified: head/usr.sbin/bluetooth/hccontrol/le.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/le.c Mon Apr 20 13:36:01 2020 (r360115) +++ head/usr.sbin/bluetooth/hccontrol/le.c Mon Apr 20 13:44:14 2020 (r360116) @@ -52,7 +52,7 @@ static int le_set_scan_param(int s, int argc, char *ar static int le_set_scan_enable(int s, int argc, char *argv[]); static int parse_param(int argc, char *argv[], char *buf, int *len); static int le_set_scan_response(int s, int argc, char *argv[]); -static int le_read_supported_status(int s, int argc, char *argv[]); +static int le_read_supported_states(int s, int argc, char *argv[]); static int le_read_local_supported_features(int s, int argc ,char *argv[]); static int set_le_event_mask(int s, uint64_t mask); static int set_event_mask(int s, uint64_t mask); @@ -259,20 +259,26 @@ le_read_local_supported_features(int s, int argc ,char } static int -le_read_supported_status(int s, int argc, char *argv[]) +le_read_supported_states(int s, int argc, char *argv[]) { - ng_hci_le_read_supported_status_rp rp; - int e; + ng_hci_le_read_supported_states_rp rp; int n = sizeof(rp); - e = hci_simple_request(s, NG_HCI_OPCODE( + if (hci_simple_request(s, NG_HCI_OPCODE( NG_HCI_OGF_LE, - NG_HCI_OCF_LE_READ_SUPPORTED_STATUS), - (void *)&rp, &n); + NG_HCI_OCF_LE_READ_SUPPORTED_STATES), + (void *)&rp, &n) == ERROR) + return (ERROR); - printf("LE_STATUS: %d %d %jx\n", e, rp.status, (uintmax_t)rp.le_status); + if (rp.status != 0x00) { + fprintf(stdout, "Status: %s [%#02x]\n", + hci_status2str(rp.status), rp.status); + return (FAILED); + } - return 0; + fprintf(stdout, "LE States: %jx\n", rp.le_states); + + return (OK); } static int @@ -347,11 +353,11 @@ struct hci_command le_commands[] = { &le_read_local_supported_features, }, { - "le_read_supported_status", - "le_read_supported_status\n" + "le_read_supported_states", + "le_read_supported_states\n" "read supported status" , - &le_read_supported_status, + &le_read_supported_states, }, { "le_set_scan_response", From owner-svn-src-all@freebsd.org Mon Apr 20 13:47:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B93C72C392F; Mon, 20 Apr 2020 13:47:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495Sg13YlXz4Nlx; Mon, 20 Apr 2020 13:47:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BD7A1852E; Mon, 20 Apr 2020 13:47:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KDl92c081093; Mon, 20 Apr 2020 13:47:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KDl7xI081086; Mon, 20 Apr 2020 13:47:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004201347.03KDl7xI081086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2020 13:47:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360117 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 360117 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 13:47:10 -0000 Author: mav Date: Mon Apr 20 13:47:07 2020 New Revision: 360117 URL: https://svnweb.freebsd.org/changeset/base/360117 Log: Open device with O_RDONLY when command is non-invasive. This allows to use some of the subcommands against mounted nvd devices. MFC after: 1 week Sponsored by: iXystems, Inc. Modified: head/sbin/nvmecontrol/identify.c head/sbin/nvmecontrol/logpage.c head/sbin/nvmecontrol/ns.c head/sbin/nvmecontrol/nsid.c head/sbin/nvmecontrol/nvmecontrol.c head/sbin/nvmecontrol/nvmecontrol.h head/sbin/nvmecontrol/resv.c Modified: head/sbin/nvmecontrol/identify.c ============================================================================== --- head/sbin/nvmecontrol/identify.c Mon Apr 20 13:44:14 2020 (r360116) +++ head/sbin/nvmecontrol/identify.c Mon Apr 20 13:47:07 2020 (r360117) @@ -241,7 +241,7 @@ identify(const struct cmd *f, int argc, char *argv[]) if (arg_parse(argc, argv, f)) return; - open_dev(opt.dev, &fd, 1, 1); + open_dev(opt.dev, &fd, 0, 1); get_nsid(fd, &path, &nsid); if (nsid != 0) { /* @@ -251,7 +251,7 @@ identify(const struct cmd *f, int argc, char *argv[]) * the IDENTIFY command itself. */ close(fd); - open_dev(path, &fd, 1, 1); + open_dev(path, &fd, 0, 1); } free(path); if (opt.nsid != NONE) Modified: head/sbin/nvmecontrol/logpage.c ============================================================================== --- head/sbin/nvmecontrol/logpage.c Mon Apr 20 13:44:14 2020 (r360116) +++ head/sbin/nvmecontrol/logpage.c Mon Apr 20 13:47:07 2020 (r360117) @@ -687,13 +687,13 @@ logpage(const struct cmd *f, int argc, char *argv[]) fprintf(stderr, "Missing page_id (-p).\n"); arg_help(argc, argv, f); } - open_dev(opt.dev, &fd, 1, 1); + open_dev(opt.dev, &fd, 0, 1); get_nsid(fd, &path, &nsid); if (nsid == 0) { nsid = NVME_GLOBAL_NAMESPACE_TAG; } else { close(fd); - open_dev(path, &fd, 1, 1); + open_dev(path, &fd, 0, 1); } free(path); Modified: head/sbin/nvmecontrol/ns.c ============================================================================== --- head/sbin/nvmecontrol/ns.c Mon Apr 20 13:44:14 2020 (r360116) +++ head/sbin/nvmecontrol/ns.c Mon Apr 20 13:47:07 2020 (r360117) @@ -404,7 +404,7 @@ nsactive(const struct cmd *f, int argc, char *argv[]) if (arg_parse(argc, argv, f)) return; - open_dev(active_opt.dev, &fd, 1, 1); + open_dev(active_opt.dev, &fd, 0, 1); memset(&pt, 0, sizeof(pt)); pt.cmd.opc = NVME_OPC_IDENTIFY; @@ -435,7 +435,7 @@ nsallocated(const struct cmd *f, int argc, char *argv[ if (arg_parse(argc, argv, f)) return; - open_dev(active_opt.dev, &fd, 1, 1); + open_dev(active_opt.dev, &fd, 0, 1); read_controller_data(fd, &cd); /* Check that controller can execute this command. */ @@ -472,7 +472,7 @@ nscontrollers(const struct cmd *f, int argc, char *arg if (arg_parse(argc, argv, f)) return; - open_dev(controllers_opt.dev, &fd, 1, 1); + open_dev(controllers_opt.dev, &fd, 0, 1); read_controller_data(fd, &cd); /* Check that controller can execute this command. */ @@ -781,7 +781,7 @@ nsattached(const struct cmd *f, int argc, char *argv[] fprintf(stderr, "No valid NSID specified\n"); arg_help(argc, argv, f); } - open_dev(attached_opt.dev, &fd, 1, 1); + open_dev(attached_opt.dev, &fd, 0, 1); read_controller_data(fd, &cd); /* Check that controller can execute this command. */ @@ -825,7 +825,7 @@ nsidentify(const struct cmd *f, int argc, char *argv[] fprintf(stderr, "No valid NSID specified\n"); arg_help(argc, argv, f); } - open_dev(identify_opt.dev, &fd, 1, 1); + open_dev(identify_opt.dev, &fd, 0, 1); read_controller_data(fd, &cd); /* Check that controller can execute this command. */ Modified: head/sbin/nvmecontrol/nsid.c ============================================================================== --- head/sbin/nvmecontrol/nsid.c Mon Apr 20 13:44:14 2020 (r360116) +++ head/sbin/nvmecontrol/nsid.c Mon Apr 20 13:47:07 2020 (r360117) @@ -73,7 +73,7 @@ gnsid(const struct cmd *f, int argc, char *argv[]) if (arg_parse(argc, argv, f)) return; - open_dev(nsid_opt.dev, &fd, 1, 1); + open_dev(nsid_opt.dev, &fd, 0, 1); get_nsid(fd, &path, &nsid); close(fd); printf("%s\t%u\n", path, nsid); Modified: head/sbin/nvmecontrol/nvmecontrol.c ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.c Mon Apr 20 13:44:14 2020 (r360116) +++ head/sbin/nvmecontrol/nvmecontrol.c Mon Apr 20 13:47:07 2020 (r360117) @@ -142,18 +142,17 @@ read_namespace_data(int fd, uint32_t nsid, struct nvme } int -open_dev(const char *str, int *fd, int show_error, int exit_on_error) +open_dev(const char *str, int *fd, int write, int exit_on_error) { char full_path[64]; snprintf(full_path, sizeof(full_path), _PATH_DEV"%s", str); - *fd = open(full_path, O_RDWR); + *fd = open(full_path, write ? O_RDWR : O_RDONLY); if (*fd < 0) { - if (show_error) - warn("could not open %s", full_path); - if (exit_on_error) - exit(1); - else + if (exit_on_error) { + err(1, "could not open %s%s", full_path, + write ? " for write" : ""); + } else return (errno); } Modified: head/sbin/nvmecontrol/nvmecontrol.h ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.h Mon Apr 20 13:44:14 2020 (r360116) +++ head/sbin/nvmecontrol/nvmecontrol.h Mon Apr 20 13:47:07 2020 (r360117) @@ -68,7 +68,7 @@ void logpage_register(struct logpage_function *p); #define NVME_CTRLR_PREFIX "nvme" #define NVME_NS_PREFIX "ns" -int open_dev(const char *str, int *fd, int show_error, int exit_on_error); +int open_dev(const char *str, int *fd, int write, int exit_on_error); void get_nsid(int fd, char **ctrlr_str, uint32_t *nsid); void read_controller_data(int fd, struct nvme_controller_data *cdata); void read_namespace_data(int fd, uint32_t nsid, struct nvme_namespace_data *nsdata); Modified: head/sbin/nvmecontrol/resv.c ============================================================================== --- head/sbin/nvmecontrol/resv.c Mon Apr 20 13:44:14 2020 (r360116) +++ head/sbin/nvmecontrol/resv.c Mon Apr 20 13:47:07 2020 (r360117) @@ -242,7 +242,7 @@ resvacquire(const struct cmd *f, int argc, char *argv[ if (arg_parse(argc, argv, f)) return; - open_dev(acquire_opt.dev, &fd, 1, 1); + open_dev(acquire_opt.dev, &fd, 0, 1); get_nsid(fd, NULL, &nsid); if (nsid == 0) { fprintf(stderr, "This command require namespace-id\n"); @@ -280,7 +280,7 @@ resvregister(const struct cmd *f, int argc, char *argv if (arg_parse(argc, argv, f)) return; - open_dev(register_opt.dev, &fd, 1, 1); + open_dev(register_opt.dev, &fd, 0, 1); get_nsid(fd, NULL, &nsid); if (nsid == 0) { fprintf(stderr, "This command require namespace-id\n"); @@ -318,7 +318,7 @@ resvrelease(const struct cmd *f, int argc, char *argv[ if (arg_parse(argc, argv, f)) return; - open_dev(release_opt.dev, &fd, 1, 1); + open_dev(release_opt.dev, &fd, 0, 1); get_nsid(fd, NULL, &nsid); if (nsid == 0) { fprintf(stderr, "This command require namespace-id\n"); @@ -358,7 +358,7 @@ resvreport(const struct cmd *f, int argc, char *argv[] if (arg_parse(argc, argv, f)) return; - open_dev(report_opt.dev, &fd, 1, 1); + open_dev(report_opt.dev, &fd, 0, 1); get_nsid(fd, NULL, &nsid); if (nsid == 0) { fprintf(stderr, "This command require namespace-id\n"); From owner-svn-src-all@freebsd.org Mon Apr 20 13:47:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA10C2C39AE; Mon, 20 Apr 2020 13:47:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495Sg83M0pz4Nqq; Mon, 20 Apr 2020 13:47:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF2091852F; Mon, 20 Apr 2020 13:47:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KDlFTW081143; Mon, 20 Apr 2020 13:47:15 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KDlFEh081142; Mon, 20 Apr 2020 13:47:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004201347.03KDlFEh081142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 20 Apr 2020 13:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360118 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 360118 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 13:47:18 -0000 Author: hselasky Date: Mon Apr 20 13:47:15 2020 New Revision: 360118 URL: https://svnweb.freebsd.org/changeset/base/360118 Log: Allow test_bit() in the LinuxKPI to accept a const pointer. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/bitops.h Mon Apr 20 13:47:07 2020 (r360117) +++ head/sys/compat/linuxkpi/common/include/linux/bitops.h Mon Apr 20 13:47:15 2020 (r360118) @@ -273,7 +273,7 @@ find_next_zero_bit(const unsigned long *addr, unsigned atomic_clear_long(&((volatile unsigned long *)(a))[BIT_WORD(i)], BIT_MASK(i)) #define test_bit(i, a) \ - !!(READ_ONCE(((volatile unsigned long *)(a))[BIT_WORD(i)]) & BIT_MASK(i)) + !!(READ_ONCE(((volatile const unsigned long *)(a))[BIT_WORD(i)]) & BIT_MASK(i)) static inline int test_and_clear_bit(long bit, volatile unsigned long *var) From owner-svn-src-all@freebsd.org Mon Apr 20 14:03:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FAEC2C4150; Mon, 20 Apr 2020 14:03:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495T1P6bsnz4QKB; Mon, 20 Apr 2020 14:03:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDFB7188FD; Mon, 20 Apr 2020 14:03:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KE35wM093476; Mon, 20 Apr 2020 14:03:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KE356d093475; Mon, 20 Apr 2020 14:03:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004201403.03KE356d093475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 20 Apr 2020 14:03:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360119 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 360119 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 14:03:06 -0000 Author: hselasky Date: Mon Apr 20 14:03:05 2020 New Revision: 360119 URL: https://svnweb.freebsd.org/changeset/base/360119 Log: Implement aligned LinuxKPI types for u16, u32 and u64. Makes a difference for 32-bit platforms mostly. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/types.h Modified: head/sys/compat/linuxkpi/common/include/linux/types.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/types.h Mon Apr 20 13:47:15 2020 (r360118) +++ head/sys/compat/linuxkpi/common/include/linux/types.h Mon Apr 20 14:03:05 2020 (r360119) @@ -53,6 +53,10 @@ typedef uint32_t __be32; typedef uint64_t __le64; typedef uint64_t __be64; +typedef uint16_t __aligned_u16 __aligned(sizeof(uint16_t)); +typedef uint32_t __aligned_u32 __aligned(sizeof(uint32_t)); +typedef uint64_t __aligned_u64 __aligned(sizeof(uint64_t)); + typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; From owner-svn-src-all@freebsd.org Mon Apr 20 14:18:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC84A2C464E; Mon, 20 Apr 2020 14:18:56 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495TMh4B1Lz4RXL; Mon, 20 Apr 2020 14:18:56 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AA4418B03; Mon, 20 Apr 2020 14:18:56 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KEIuCP000417; Mon, 20 Apr 2020 14:18:56 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KEIuUL000416; Mon, 20 Apr 2020 14:18:56 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202004201418.03KEIuUL000416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 20 Apr 2020 14:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360120 - head/tests/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/netinet X-SVN-Commit-Revision: 360120 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 14:18:56 -0000 Author: lwhsu Date: Mon Apr 20 14:18:56 2020 New Revision: 360120 URL: https://svnweb.freebsd.org/changeset/base/360120 Log: Temporarily disable sys.netinet.divert.* on i386 PR: 244703 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/netinet/divert.sh Modified: head/tests/sys/netinet/divert.sh ============================================================================== --- head/tests/sys/netinet/divert.sh Mon Apr 20 14:03:05 2020 (r360119) +++ head/tests/sys/netinet/divert.sh Mon Apr 20 14:18:56 2020 (r360120) @@ -47,6 +47,11 @@ ipdivert_ip_output_remote_success_head() { ipdivert_ip_output_remote_success_body() { + if [ "$(atf_config_get ci false)" = "true" ] && \ + [ "$(uname -p)" = "i386" ]; then + atf_skip "https://bugs.freebsd.org/245764" + fi + ids=65530 id=`printf "%x" ${ids}` if [ $$ -gt 65535 ]; then @@ -96,6 +101,11 @@ ipdivert_ip_input_local_success_head() { } ipdivert_ip_input_local_success_body() { + + if [ "$(atf_config_get ci false)" = "true" ] && \ + [ "$(uname -p)" = "i386" ]; then + atf_skip "https://bugs.freebsd.org/245764" + fi ids=65529 id=`printf "%x" ${ids}` From owner-svn-src-all@freebsd.org Mon Apr 20 14:24:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3D162C4A69; Mon, 20 Apr 2020 14:24:13 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495TTn69Shz4SJx; Mon, 20 Apr 2020 14:24:13 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CEF5418CDB; Mon, 20 Apr 2020 14:24:13 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KEODvt006442; Mon, 20 Apr 2020 14:24:13 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KEODbA006441; Mon, 20 Apr 2020 14:24:13 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202004201424.03KEODbA006441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 20 Apr 2020 14:24:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360121 - head/tests/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/netinet X-SVN-Commit-Revision: 360121 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 14:24:14 -0000 Author: lwhsu Date: Mon Apr 20 14:24:13 2020 New Revision: 360121 URL: https://svnweb.freebsd.org/changeset/base/360121 Log: Only skip sys.netinet.socket_afinet.socket_afinet_bind_zero in CI env Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/netinet/socket_afinet.c Modified: head/tests/sys/netinet/socket_afinet.c ============================================================================== --- head/tests/sys/netinet/socket_afinet.c Mon Apr 20 14:18:56 2020 (r360120) +++ head/tests/sys/netinet/socket_afinet.c Mon Apr 20 14:24:13 2020 (r360121) @@ -51,7 +51,8 @@ ATF_TC_BODY(socket_afinet_bind_zero, tc) int sd, rc; struct sockaddr_in sin; - atf_tc_skip("doesn't work when mac_portacl(4) loaded (bug238781)"); + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("doesn't work when mac_portacl(4) loaded (https://bugs.freebsd.org/238781)"); sd = socket(PF_INET, SOCK_DGRAM, 0); ATF_CHECK(sd >= 0); From owner-svn-src-all@freebsd.org Mon Apr 20 14:45:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A0F62C52B8; Mon, 20 Apr 2020 14:45:18 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495Ty635lhz4V3x; Mon, 20 Apr 2020 14:45:18 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6595F190A9; Mon, 20 Apr 2020 14:45:18 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KEjIQO018711; Mon, 20 Apr 2020 14:45:18 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KEjIbB018710; Mon, 20 Apr 2020 14:45:18 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004201445.03KEjIbB018710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 20 Apr 2020 14:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360122 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 360122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 14:45:18 -0000 Author: markj Date: Mon Apr 20 14:45:17 2020 New Revision: 360122 URL: https://svnweb.freebsd.org/changeset/base/360122 Log: Handle trashed queue pointers in vm_page_acquire_unlocked(). vm_page_acquire_unlocked() relies on type-stability of vm_page structures and assumes that the listq linkage pointers always point to a vm_page or are NULL. QUEUE_MACRO_DEBUG_TRASH breaks that assumption, so add an explicit check for a trashed queue pointer before dereferencing. Reported and tested by: pho Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24472 Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Apr 20 14:24:13 2020 (r360121) +++ head/sys/vm/vm_page.c Mon Apr 20 14:45:17 2020 (r360122) @@ -4438,7 +4438,7 @@ vm_page_acquire_unlocked(vm_object_t object, vm_pindex * without barriers. Switch to radix to verify. */ if (prev == NULL || (m = TAILQ_NEXT(prev, listq)) == NULL || - m->pindex != pindex || + QMD_IS_TRASHED(m) || m->pindex != pindex || atomic_load_ptr(&m->object) != object) { prev = NULL; /* From owner-svn-src-all@freebsd.org Mon Apr 20 14:54:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C11792C56A8; Mon, 20 Apr 2020 14:54:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495V8y58CTz4W0w; Mon, 20 Apr 2020 14:54:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABA9819289; Mon, 20 Apr 2020 14:54:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KEsgsq025148; Mon, 20 Apr 2020 14:54:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KEsglq025144; Mon, 20 Apr 2020 14:54:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004201454.03KEsglq025144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2020 14:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360123 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 360123 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 14:54:42 -0000 Author: mav Date: Mon Apr 20 14:54:41 2020 New Revision: 360123 URL: https://svnweb.freebsd.org/changeset/base/360123 Log: Allow namespace-id specification where it makes sense. It makes tool more convenient to not require user to explicitly convert namespace device name into controller device name. There should be no changes to already existing syntaxes. MFC after: 1 week Modified: head/sbin/nvmecontrol/firmware.c head/sbin/nvmecontrol/ns.c head/sbin/nvmecontrol/power.c head/sbin/nvmecontrol/reset.c Modified: head/sbin/nvmecontrol/firmware.c ============================================================================== --- head/sbin/nvmecontrol/firmware.c Mon Apr 20 14:45:17 2020 (r360122) +++ head/sbin/nvmecontrol/firmware.c Mon Apr 20 14:54:41 2020 (r360123) @@ -80,7 +80,7 @@ static const struct opts firmware_opts[] = { #undef OPT static const struct args firmware_args[] = { - { arg_string, &opt.dev, "controller-id" }, + { arg_string, &opt.dev, "controller-id|namespace-id" }, { arg_none, NULL, NULL }, }; @@ -226,6 +226,7 @@ firmware(const struct cmd *f, int argc, char *argv[]) int activate_action, reboot_required; char prompt[64]; void *buf = NULL; + char *path; int32_t size = 0, nsid; uint16_t oacs_fw; uint8_t fw_slot1_ro, fw_num_slots; @@ -262,13 +263,12 @@ firmware(const struct cmd *f, int argc, char *argv[]) } open_dev(opt.dev, &fd, 1, 1); - - /* Check that a controller (and not a namespace) was specified. */ - get_nsid(fd, NULL, &nsid); + get_nsid(fd, &path, &nsid); if (nsid != 0) { close(fd); - arg_help(argc, argv, f); + open_dev(path, &fd, 1, 1); } + free(path); read_controller_data(fd, &cdata); Modified: head/sbin/nvmecontrol/ns.c ============================================================================== --- head/sbin/nvmecontrol/ns.c Mon Apr 20 14:45:17 2020 (r360122) +++ head/sbin/nvmecontrol/ns.c Mon Apr 20 14:54:41 2020 (r360123) @@ -79,7 +79,7 @@ static struct active_options { }; static const struct args active_args[] = { - { arg_string, &active_opt.dev, "controller-id" }, + { arg_string, &active_opt.dev, "controller-id|namespace-id" }, { arg_none, NULL, NULL }, }; @@ -112,7 +112,7 @@ static struct controllers_options { }; static const struct args controllers_args[] = { - { arg_string, &controllers_opt.dev, "controller-id" }, + { arg_string, &controllers_opt.dev, "controller-id|namespace-id" }, { arg_none, NULL, NULL }, }; @@ -178,7 +178,7 @@ static const struct opts create_opts[] = { }; static const struct args create_args[] = { - { arg_string, &create_opt.dev, "controller-id" }, + { arg_string, &create_opt.dev, "controller-id|namespace-id" }, { arg_none, NULL, NULL }, }; @@ -208,7 +208,7 @@ static const struct opts delete_opts[] = { }; static const struct args delete_args[] = { - { arg_string, &delete_opt.dev, "controller-id" }, + { arg_string, &delete_opt.dev, "controller-id|namespace-id" }, { arg_none, NULL, NULL }, }; @@ -242,7 +242,7 @@ static const struct opts attach_opts[] = { }; static const struct args attach_args[] = { - { arg_string, &attach_opt.dev, "controller-id" }, + { arg_string, &attach_opt.dev, "controller-id|namespace-id" }, { arg_none, NULL, NULL }, }; @@ -272,7 +272,7 @@ static const struct opts attached_opts[] = { }; static const struct args attached_args[] = { - { arg_string, &attached_opt.dev, "controller-id" }, + { arg_string, &attached_opt.dev, "controller-id|namespace-id" }, { arg_none, NULL, NULL }, }; @@ -306,7 +306,7 @@ static const struct opts detach_opts[] = { }; static const struct args detach_args[] = { - { arg_string, &detach_opt.dev, "controller-id" }, + { arg_string, &detach_opt.dev, "controller-id|namespace-id" }, { arg_none, NULL, NULL }, }; @@ -344,7 +344,7 @@ static const struct opts identify_opts[] = { }; static const struct args identify_args[] = { - { arg_string, &identify_opt.dev, "controller-id" }, + { arg_string, &identify_opt.dev, "controller-id|namespace-id" }, { arg_none, NULL, NULL }, }; @@ -399,13 +399,28 @@ static void nsactive(const struct cmd *f, int argc, char *argv[]) { struct nvme_pt_command pt; + struct nvme_controller_data cd; int fd, i; + char *path; + uint32_t nsid; uint32_t list[1024]; if (arg_parse(argc, argv, f)) return; open_dev(active_opt.dev, &fd, 0, 1); + get_nsid(fd, &path, &nsid); + if (nsid != 0) { + close(fd); + open_dev(path, &fd, 0, 1); + } + free(path); + read_controller_data(fd, &cd); + /* Check that controller can execute this command. */ + if (((cd.oacs >> NVME_CTRLR_DATA_OACS_NSMGMT_SHIFT) & + NVME_CTRLR_DATA_OACS_NSMGMT_MASK) == 0) + errx(1, "controller does not support namespace management"); + memset(&pt, 0, sizeof(pt)); pt.cmd.opc = NVME_OPC_IDENTIFY; pt.cmd.nsid = htole32(0); @@ -431,11 +446,19 @@ nsallocated(const struct cmd *f, int argc, char *argv[ struct nvme_pt_command pt; struct nvme_controller_data cd; int fd, i; + char *path; + uint32_t nsid; uint32_t list[1024]; if (arg_parse(argc, argv, f)) return; open_dev(active_opt.dev, &fd, 0, 1); + get_nsid(fd, &path, &nsid); + if (nsid != 0) { + close(fd); + open_dev(path, &fd, 0, 1); + } + free(path); read_controller_data(fd, &cd); /* Check that controller can execute this command. */ @@ -468,11 +491,19 @@ nscontrollers(const struct cmd *f, int argc, char *arg struct nvme_pt_command pt; struct nvme_controller_data cd; int fd, i, n; + char *path; + uint32_t nsid; uint16_t clist[2048]; if (arg_parse(argc, argv, f)) return; open_dev(controllers_opt.dev, &fd, 0, 1); + get_nsid(fd, &path, &nsid); + if (nsid != 0) { + close(fd); + open_dev(path, &fd, 0, 1); + } + free(path); read_controller_data(fd, &cd); /* Check that controller can execute this command. */ @@ -513,6 +544,8 @@ nscreate(const struct cmd *f, int argc, char *argv[]) struct nvme_controller_data cd; struct nvme_namespace_data nsdata; int fd, result; + char *path; + uint32_t nsid; if (arg_parse(argc, argv, f)) return; @@ -526,6 +559,12 @@ nscreate(const struct cmd *f, int argc, char *argv[]) } open_dev(create_opt.dev, &fd, 1, 1); + get_nsid(fd, &path, &nsid); + if (nsid != 0) { + close(fd); + open_dev(path, &fd, 1, 1); + } + free(path); read_controller_data(fd, &cd); /* Check that controller can execute this command. */ @@ -583,17 +622,26 @@ nsdelete(const struct cmd *f, int argc, char *argv[]) struct nvme_pt_command pt; struct nvme_controller_data cd; int fd, result; + char *path; + uint32_t nsid; char buf[2]; if (arg_parse(argc, argv, f)) return; - if (delete_opt.nsid == NONE) { - fprintf(stderr, - "No NSID specified"); - arg_help(argc, argv, f); - } open_dev(delete_opt.dev, &fd, 1, 1); + get_nsid(fd, &path, &nsid); + if (nsid != 0) { + close(fd); + open_dev(path, &fd, 1, 1); + } else if (delete_opt.nsid == NONE) { + close(fd); + fprintf(stderr, "No NSID specified"); + arg_help(argc, argv, f); + } + if (delete_opt.nsid != NONE) + nsid = delete_opt.nsid; + free(path); read_controller_data(fd, &cd); /* Check that controller can execute this command. */ @@ -607,7 +655,7 @@ nsdelete(const struct cmd *f, int argc, char *argv[]) pt.buf = buf; pt.len = sizeof(buf); pt.is_read = 1; - pt.cmd.nsid = delete_opt.nsid; + pt.cmd.nsid = nsid; if ((result = ioctl(fd, NVME_PASSTHROUGH_CMD, &pt)) < 0) errx(1, "ioctl request to %s failed: %d", delete_opt.dev, result); @@ -617,7 +665,7 @@ nsdelete(const struct cmd *f, int argc, char *argv[]) get_res_str((pt.cpl.status >> NVME_STATUS_SC_SHIFT) & NVME_STATUS_SC_MASK)); } - printf("namespace %d deleted\n", delete_opt.nsid); + printf("namespace %d deleted\n", nsid); exit(0); } @@ -642,15 +690,24 @@ nsattach(const struct cmd *f, int argc, char *argv[]) struct nvme_pt_command pt; struct nvme_controller_data cd; int fd, result; + char *path; + uint32_t nsid; uint16_t clist[2048]; if (arg_parse(argc, argv, f)) return; - if (attach_opt.nsid == NONE) { - fprintf(stderr, "No valid NSID specified\n"); + open_dev(attach_opt.dev, &fd, 1, 1); + get_nsid(fd, &path, &nsid); + if (nsid != 0) { + close(fd); + open_dev(path, &fd, 1, 1); + } else if (attach_opt.nsid == NONE) { + close(fd); + fprintf(stderr, "No NSID specified"); arg_help(argc, argv, f); } - open_dev(attach_opt.dev, &fd, 1, 1); + if (attach_opt.nsid != NONE) + nsid = attach_opt.nsid; read_controller_data(fd, &cd); /* Check that controller can execute this command. */ @@ -682,7 +739,7 @@ nsattach(const struct cmd *f, int argc, char *argv[]) memset(&pt, 0, sizeof(pt)); pt.cmd.opc = NVME_OPC_NAMESPACE_ATTACHMENT; pt.cmd.cdw10 = htole32(0); /* attach */ - pt.cmd.nsid = attach_opt.nsid; + pt.cmd.nsid = nsid; pt.buf = &clist; pt.len = sizeof(clist); @@ -694,7 +751,7 @@ nsattach(const struct cmd *f, int argc, char *argv[]) get_res_str((pt.cpl.status >> NVME_STATUS_SC_SHIFT) & NVME_STATUS_SC_MASK)); } - printf("namespace %d attached\n", attach_opt.nsid); + printf("namespace %d attached\n", nsid); exit(0); } @@ -704,15 +761,24 @@ nsdetach(const struct cmd *f, int argc, char *argv[]) struct nvme_pt_command pt; struct nvme_controller_data cd; int fd, result; + char *path; + uint32_t nsid; uint16_t clist[2048]; if (arg_parse(argc, argv, f)) return; - if (detach_opt.nsid == NONE) { - fprintf(stderr, "No valid NSID specified\n"); + open_dev(detach_opt.dev, &fd, 1, 1); + get_nsid(fd, &path, &nsid); + if (nsid != 0) { + close(fd); + open_dev(path, &fd, 1, 1); + } else if (detach_opt.nsid == NONE) { + close(fd); + fprintf(stderr, "No NSID specified"); arg_help(argc, argv, f); } - open_dev(detach_opt.dev, &fd, 1, 1); + if (detach_opt.nsid != NONE) + nsid = detach_opt.nsid; read_controller_data(fd, &cd); /* Check that controller can execute this command. */ @@ -724,7 +790,7 @@ nsdetach(const struct cmd *f, int argc, char *argv[]) /* Get list of controllers this namespace attached to. */ memset(&pt, 0, sizeof(pt)); pt.cmd.opc = NVME_OPC_IDENTIFY; - pt.cmd.nsid = htole32(detach_opt.nsid); + pt.cmd.nsid = htole32(nsid); pt.cmd.cdw10 = htole32(0x12); pt.buf = clist; pt.len = sizeof(clist); @@ -751,7 +817,7 @@ nsdetach(const struct cmd *f, int argc, char *argv[]) memset(&pt, 0, sizeof(pt)); pt.cmd.opc = NVME_OPC_NAMESPACE_ATTACHMENT; pt.cmd.cdw10 = htole32(1); /* detach */ - pt.cmd.nsid = detach_opt.nsid; + pt.cmd.nsid = nsid; pt.buf = &clist; pt.len = sizeof(clist); @@ -763,7 +829,7 @@ nsdetach(const struct cmd *f, int argc, char *argv[]) get_res_str((pt.cpl.status >> NVME_STATUS_SC_SHIFT) & NVME_STATUS_SC_MASK)); } - printf("namespace %d detached\n", detach_opt.nsid); + printf("namespace %d detached\n", nsid); exit(0); } @@ -773,15 +839,24 @@ nsattached(const struct cmd *f, int argc, char *argv[] struct nvme_pt_command pt; struct nvme_controller_data cd; int fd, i, n; + char *path; + uint32_t nsid; uint16_t clist[2048]; if (arg_parse(argc, argv, f)) return; - if (attached_opt.nsid == NONE) { - fprintf(stderr, "No valid NSID specified\n"); + open_dev(attached_opt.dev, &fd, 0, 1); + get_nsid(fd, &path, &nsid); + if (nsid != 0) { + close(fd); + open_dev(path, &fd, 1, 1); + } else if (attached_opt.nsid == NONE) { + close(fd); + fprintf(stderr, "No NSID specified"); arg_help(argc, argv, f); } - open_dev(attached_opt.dev, &fd, 0, 1); + if (attached_opt.nsid != NONE) + nsid = attached_opt.nsid; read_controller_data(fd, &cd); /* Check that controller can execute this command. */ @@ -791,7 +866,7 @@ nsattached(const struct cmd *f, int argc, char *argv[] memset(&pt, 0, sizeof(pt)); pt.cmd.opc = NVME_OPC_IDENTIFY; - pt.cmd.nsid = htole32(attached_opt.nsid); + pt.cmd.nsid = htole32(nsid); pt.cmd.cdw10 = htole32(0x12); pt.buf = clist; pt.len = sizeof(clist); @@ -817,15 +892,24 @@ nsidentify(const struct cmd *f, int argc, char *argv[] struct nvme_namespace_data nsdata; uint8_t *data; int fd; + char *path; + uint32_t nsid; u_int i; if (arg_parse(argc, argv, f)) return; - if (identify_opt.nsid == NONE) { - fprintf(stderr, "No valid NSID specified\n"); + open_dev(identify_opt.dev, &fd, 0, 1); + get_nsid(fd, &path, &nsid); + if (nsid != 0) { + close(fd); + open_dev(path, &fd, 1, 1); + } else if (identify_opt.nsid == NONE) { + close(fd); + fprintf(stderr, "No NSID specified"); arg_help(argc, argv, f); } - open_dev(identify_opt.dev, &fd, 0, 1); + if (identify_opt.nsid != NONE) + nsid = identify_opt.nsid; read_controller_data(fd, &cd); /* Check that controller can execute this command. */ @@ -835,7 +919,7 @@ nsidentify(const struct cmd *f, int argc, char *argv[] memset(&pt, 0, sizeof(pt)); pt.cmd.opc = NVME_OPC_IDENTIFY; - pt.cmd.nsid = htole32(identify_opt.nsid); + pt.cmd.nsid = htole32(nsid); pt.cmd.cdw10 = htole32(0x11); pt.buf = &nsdata; pt.len = sizeof(nsdata); @@ -855,7 +939,7 @@ nsidentify(const struct cmd *f, int argc, char *argv[] break; } if (i == sizeof(nsdata)) - errx(1, "namespace %d is not allocated", identify_opt.nsid); + errx(1, "namespace %d is not allocated", nsid); /* Convert data to host endian */ nvme_namespace_data_swapbytes(&nsdata); Modified: head/sbin/nvmecontrol/power.c ============================================================================== --- head/sbin/nvmecontrol/power.c Mon Apr 20 14:45:17 2020 (r360122) +++ head/sbin/nvmecontrol/power.c Mon Apr 20 14:54:41 2020 (r360123) @@ -144,6 +144,8 @@ power(const struct cmd *f, int argc, char *argv[]) { struct nvme_controller_data cdata; int fd; + char *path; + uint32_t nsid; if (arg_parse(argc, argv, f)) return; @@ -154,6 +156,12 @@ power(const struct cmd *f, int argc, char *argv[]) } open_dev(opt.dev, &fd, 1, 1); + get_nsid(fd, &path, &nsid); + if (nsid != 0) { + close(fd); + open_dev(path, &fd, 1, 1); + } + free(path); if (opt.list) { read_controller_data(fd, &cdata); @@ -185,7 +193,7 @@ static const struct opts power_opts[] = { #undef OPT static const struct args power_args[] = { - { arg_string, &opt.dev, "controller-id" }, + { arg_string, &opt.dev, "controller-id|namespace-id" }, { arg_none, NULL, NULL }, }; Modified: head/sbin/nvmecontrol/reset.c ============================================================================== --- head/sbin/nvmecontrol/reset.c Mon Apr 20 14:45:17 2020 (r360122) +++ head/sbin/nvmecontrol/reset.c Mon Apr 20 14:54:41 2020 (r360123) @@ -48,7 +48,7 @@ static struct options { }; static const struct args args[] = { - { arg_string, &opt.dev, "controller-id" }, + { arg_string, &opt.dev, "controller-id|namespace-id" }, { arg_none, NULL, NULL }, }; @@ -56,10 +56,18 @@ static void reset(const struct cmd *f, int argc, char *argv[]) { int fd; + char *path; + uint32_t nsid; if (arg_parse(argc, argv, f)) return; open_dev(opt.dev, &fd, 1, 1); + get_nsid(fd, &path, &nsid); + if (nsid != 0) { + close(fd); + open_dev(path, &fd, 1, 1); + } + free(path); if (ioctl(fd, NVME_RESET_CONTROLLER) < 0) err(1, "reset request to %s failed", argv[optind]); From owner-svn-src-all@freebsd.org Mon Apr 20 15:41:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8FBC02C6318; Mon, 20 Apr 2020 15:41:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495WC93MJSz4Z1P; Mon, 20 Apr 2020 15:41:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E1BB19A94; Mon, 20 Apr 2020 15:41:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KFffGs053982; Mon, 20 Apr 2020 15:41:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KFff0c053981; Mon, 20 Apr 2020 15:41:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004201541.03KFff0c053981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 20 Apr 2020 15:41:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360124 - head/sys/dev/sound/pci/hda X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 360124 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 15:41:41 -0000 Author: emaste Date: Mon Apr 20 15:41:40 2020 New Revision: 360124 URL: https://svnweb.freebsd.org/changeset/base/360124 Log: hdac: remove unused macro Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Mon Apr 20 14:54:41 2020 (r360123) +++ head/sys/dev/sound/pci/hda/hdac.c Mon Apr 20 15:41:40 2020 (r360124) @@ -232,9 +232,6 @@ static int hdac_resume(device_t); static int hdac_rirb_flush(struct hdac_softc *sc); static int hdac_unsolq_flush(struct hdac_softc *sc); -#define hdac_command(a1, a2, a3) \ - hdac_send_command(a1, a3, a2) - /* This function surely going to make its way into upper level someday. */ static void hdac_config_fetch(struct hdac_softc *sc, uint32_t *on, uint32_t *off) From owner-svn-src-all@freebsd.org Mon Apr 20 16:14:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 74BFE2C6CF5; Mon, 20 Apr 2020 16:14:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495WxK2XD4z4cLH; Mon, 20 Apr 2020 16:14:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DCA51A1A8; Mon, 20 Apr 2020 16:14:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KGEjuo073884; Mon, 20 Apr 2020 16:14:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KGEitC073880; Mon, 20 Apr 2020 16:14:44 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004201614.03KGEitC073880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 20 Apr 2020 16:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360125 - in head/usr.bin/diff: . tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/usr.bin/diff: . tests X-SVN-Commit-Revision: 360125 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 16:14:45 -0000 Author: kevans Date: Mon Apr 20 16:14:44 2020 New Revision: 360125 URL: https://svnweb.freebsd.org/changeset/base/360125 Log: diff(1): reject conflicting formatting options This matches GNU diff(1) behavior and, more importantly, eliminates any source of confusion if multiple formatting options are specified. Note that the committed diff differs slightly from the submitted: I've modified it so that we initialize diff_format to something that isn't an accepted format option so that we can also reject --normal -c and -c --normal, which would've otherwise been accepted because the default was --normal. After option parsing we default it to D_NORMAL if it's still unset. PR: 243975 Submitted by: fehmi noyan isi MFC after: 1 week Modified: head/usr.bin/diff/diff.c head/usr.bin/diff/diff.h head/usr.bin/diff/tests/diff_test.sh Modified: head/usr.bin/diff/diff.c ============================================================================== --- head/usr.bin/diff/diff.c Mon Apr 20 15:41:40 2020 (r360124) +++ head/usr.bin/diff/diff.c Mon Apr 20 16:14:44 2020 (r360125) @@ -100,6 +100,7 @@ static struct option longopts[] = { }; void usage(void) __dead2; +void conflicting_format(void) __dead2; void push_excludes(char *); void push_ignore_pats(char *); void read_excludes_file(char *file); @@ -120,7 +121,7 @@ main(int argc, char **argv) prevoptind = 1; newarg = 1; diff_context = 3; - diff_format = 0; + diff_format = D_UNSET; while ((ch = getopt_long(argc, argv, OPTIONS, longopts, NULL)) != -1) { switch (ch) { case '0': case '1': case '2': case '3': case '4': @@ -141,6 +142,8 @@ main(int argc, char **argv) break; case 'C': case 'c': + if (diff_format != D_UNSET) + conflicting_format(); cflag = 1; diff_format = D_CONTEXT; if (optarg != NULL) { @@ -154,13 +157,19 @@ main(int argc, char **argv) dflags |= D_MINIMAL; break; case 'D': + if (diff_format != D_UNSET) + conflicting_format(); diff_format = D_IFDEF; ifdefname = optarg; break; case 'e': + if (diff_format != D_UNSET) + conflicting_format(); diff_format = D_EDIT; break; case 'f': + if (diff_format != D_UNSET) + conflicting_format(); diff_format = D_REVERSE; break; case 'H': @@ -193,10 +202,12 @@ main(int argc, char **argv) Nflag = 1; break; case 'n': + if (diff_format != D_UNSET) + conflicting_format(); diff_format = D_NREVERSE; break; case 'p': - if (diff_format == 0) + if (diff_format == D_UNSET) diff_format = D_CONTEXT; dflags |= D_PROTOTYPE; break; @@ -207,6 +218,8 @@ main(int argc, char **argv) rflag = 1; break; case 'q': + if (diff_format != D_UNSET) + conflicting_format(); diff_format = D_BRIEF; break; case 'S': @@ -223,6 +236,8 @@ main(int argc, char **argv) break; case 'U': case 'u': + if (diff_format != D_UNSET) + conflicting_format(); diff_format = D_UNIFIED; if (optarg != NULL) { l = strtol(optarg, &ep, 10); @@ -249,9 +264,13 @@ main(int argc, char **argv) push_excludes(optarg); break; case 'y': + if (diff_format != D_UNSET) + conflicting_format(); diff_format = D_SIDEBYSIDE; break; case OPT_CHANGED_GROUP_FORMAT: + if (diff_format != D_UNSET) + conflicting_format(); diff_format = D_GFORMAT; group_format = optarg; break; @@ -264,6 +283,8 @@ main(int argc, char **argv) ignore_file_case = 0; break; case OPT_NORMAL: + if (diff_format != D_UNSET) + conflicting_format(); diff_format = D_NORMAL; break; case OPT_TSIZE: @@ -287,6 +308,8 @@ main(int argc, char **argv) newarg = optind != prevoptind; prevoptind = optind; } + if (diff_format == D_UNSET) + diff_format = D_NORMAL; argc -= optind; argv += optind; @@ -490,4 +513,12 @@ usage(void) " -y | --side-by-side file1 file2\n"); exit(2); +} + +void +conflicting_format(void) +{ + + fprintf(stderr, "error: conflicting output format options.\n"); + usage(); } Modified: head/usr.bin/diff/diff.h ============================================================================== --- head/usr.bin/diff/diff.h Mon Apr 20 15:41:40 2020 (r360124) +++ head/usr.bin/diff/diff.h Mon Apr 20 16:14:44 2020 (r360125) @@ -50,6 +50,9 @@ #define D_GFORMAT 7 /* Diff with defined changed group format */ #define D_SIDEBYSIDE 8 /* Side by side */ +#define D_UNSET -2 + + /* * Output flags */ Modified: head/usr.bin/diff/tests/diff_test.sh ============================================================================== --- head/usr.bin/diff/tests/diff_test.sh Mon Apr 20 15:41:40 2020 (r360124) +++ head/usr.bin/diff/tests/diff_test.sh Mon Apr 20 16:14:44 2020 (r360125) @@ -11,6 +11,7 @@ atf_test_case brief_format atf_test_case b230049 atf_test_case Bflag atf_test_case tabsize +atf_test_case conflicting_format simple_body() { @@ -49,8 +50,6 @@ unified_body() { atf_check -o file:$(atf_get_srcdir)/unified_p.out -s eq:1 \ diff -up -L input_c1.in -L input_c2.in "$(atf_get_srcdir)/input_c1.in" "$(atf_get_srcdir)/input_c2.in" - atf_check -o file:$(atf_get_srcdir)/unified_c9999.out -s eq:1 \ - diff -u -c9999 -L input_c1.in -L input_c2.in "$(atf_get_srcdir)/input_c1.in" "$(atf_get_srcdir)/input_c2.in" atf_check -o file:$(atf_get_srcdir)/unified_9999.out -s eq:1 \ diff -u9999 -L input_c1.in -L input_c2.in "$(atf_get_srcdir)/input_c1.in" "$(atf_get_srcdir)/input_c2.in" } @@ -175,6 +174,20 @@ tabsize_body() diff -t --tabsize 1 A B } +conflicting_format_body() +{ + printf "\tA\n" > A + printf "\tB\n" > B + + atf_check -s exit:2 -e ignore diff -c -u A B + atf_check -s exit:2 -e ignore diff -e -f A B + atf_check -s exit:2 -e ignore diff -y -q A B + atf_check -s exit:2 -e ignore diff -q -u A B + atf_check -s exit:2 -e ignore diff -q -c A B + atf_check -s exit:2 -e ignore diff --normal -c A B + atf_check -s exit:2 -e ignore diff -c --normal A B +} + atf_init_test_cases() { atf_add_test_case simple @@ -188,4 +201,5 @@ atf_init_test_cases() atf_add_test_case b230049 atf_add_test_case Bflag atf_add_test_case tabsize + atf_add_test_case conflicting_format } From owner-svn-src-all@freebsd.org Mon Apr 20 16:17:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80BA52C6E73; Mon, 20 Apr 2020 16:17:17 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495X0F2sNNz4ccr; Mon, 20 Apr 2020 16:17:17 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58C891A1B3; Mon, 20 Apr 2020 16:17:17 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KGHHID074078; Mon, 20 Apr 2020 16:17:17 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KGHHj7074077; Mon, 20 Apr 2020 16:17:17 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <202004201617.03KGHHj7074077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Mon, 20 Apr 2020 16:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360126 - head/sys/dev/evdev X-SVN-Group: head X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: head/sys/dev/evdev X-SVN-Commit-Revision: 360126 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 16:17:17 -0000 Author: zeising (doc,ports committer) Date: Mon Apr 20 16:17:16 2020 New Revision: 360126 URL: https://svnweb.freebsd.org/changeset/base/360126 Log: Change kern.evdev.rcpt_mask to 12 by default Change kern.evdev.rcpt_mask from 3 to 12 by default. This makes us much more evdev-friendly, and will prevent everyone using xorg and wayland with evdev devices (the default) from needing to change this locally. powerpc32 still uses the old value for the keyboard part, becaues the adb keyboard driver used there is not evdev compatible. Reviewed by: wulf Approved by: wulf MFC after: 2 weeks X-MFC-Note: 12 only Relnotes: yes Differential Revision: https://reviews.freebsd.org/D24370 Modified: head/sys/dev/evdev/evdev.c Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Mon Apr 20 16:14:44 2020 (r360125) +++ head/sys/dev/evdev/evdev.c Mon Apr 20 16:17:16 2020 (r360126) @@ -66,7 +66,12 @@ enum evdev_sparse_result MALLOC_DEFINE(M_EVDEV, "evdev", "evdev memory"); -int evdev_rcpt_mask = EVDEV_RCPT_SYSMOUSE | EVDEV_RCPT_KBDMUX; +/* adb keyboard driver used on powerpc does not support evdev yet */ +#ifdef __powerpc__ +int evdev_rcpt_mask = EVDEV_RCPT_KBDMUX | EVDEV_RCPT_HW_MOUSE; +#else +int evdev_rcpt_mask = EVDEV_RCPT_HW_MOUSE | EVDEV_RCPT_HW_KBD; +#endif int evdev_sysmouse_t_axis = 0; SYSCTL_NODE(_kern, OID_AUTO, evdev, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, From owner-svn-src-all@freebsd.org Mon Apr 20 16:21:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2C4F2C7087; Mon, 20 Apr 2020 16:21:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495X5G5kxYz4cxH; Mon, 20 Apr 2020 16:21:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C01B21A222; Mon, 20 Apr 2020 16:21:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KGLcmb077414; Mon, 20 Apr 2020 16:21:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KGLcT0077411; Mon, 20 Apr 2020 16:21:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004201621.03KGLcT0077411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 20 Apr 2020 16:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360127 - head/sys/compat/linuxkpi/common/include/asm X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/asm X-SVN-Commit-Revision: 360127 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 16:21:39 -0000 Author: hselasky Date: Mon Apr 20 16:21:37 2020 New Revision: 360127 URL: https://svnweb.freebsd.org/changeset/base/360127 Log: Implement the atomic fetch add unless functions for the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/asm/atomic-long.h head/sys/compat/linuxkpi/common/include/asm/atomic.h head/sys/compat/linuxkpi/common/include/asm/atomic64.h Modified: head/sys/compat/linuxkpi/common/include/asm/atomic-long.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/atomic-long.h Mon Apr 20 16:17:16 2020 (r360126) +++ head/sys/compat/linuxkpi/common/include/asm/atomic-long.h Mon Apr 20 16:21:37 2020 (r360127) @@ -111,6 +111,20 @@ atomic_long_add_unless(atomic_long_t *v, long a, long } static inline long +atomic_long_fetch_add_unless(atomic_long_t *v, long a, long u) +{ + long c = atomic_long_read(v); + + for (;;) { + if (unlikely(c == u)) + break; + if (likely(atomic_fcmpset_long(&v->counter, &c, c + a))) + break; + } + return (c); +} + +static inline long atomic_long_dec_and_test(atomic_long_t *v) { long i = atomic_long_add(-1, v); Modified: head/sys/compat/linuxkpi/common/include/asm/atomic.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/atomic.h Mon Apr 20 16:17:16 2020 (r360126) +++ head/sys/compat/linuxkpi/common/include/asm/atomic.h Mon Apr 20 16:21:37 2020 (r360127) @@ -119,6 +119,20 @@ atomic_add_unless(atomic_t *v, int a, int u) return (c != u); } +static inline int +atomic_fetch_add_unless(atomic_t *v, int a, int u) +{ + int c = atomic_read(v); + + for (;;) { + if (unlikely(c == u)) + break; + if (likely(atomic_fcmpset_int(&v->counter, &c, c + a))) + break; + } + return (c); +} + static inline void atomic_clear_mask(unsigned int mask, atomic_t *v) { Modified: head/sys/compat/linuxkpi/common/include/asm/atomic64.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/asm/atomic64.h Mon Apr 20 16:17:16 2020 (r360126) +++ head/sys/compat/linuxkpi/common/include/asm/atomic64.h Mon Apr 20 16:21:37 2020 (r360127) @@ -104,6 +104,20 @@ atomic64_add_unless(atomic64_t *v, int64_t a, int64_t } static inline int64_t +atomic64_fetch_add_unless(atomic64_t *v, int64_t a, int64_t u) +{ + int64_t c = atomic64_read(v); + + for (;;) { + if (unlikely(c == u)) + break; + if (likely(atomic_fcmpset_64(&v->counter, &c, c + a))) + break; + } + return (c); +} + +static inline int64_t atomic64_xchg(atomic64_t *v, int64_t i) { #if !((defined(__mips__) && !(defined(__mips_n32) || defined(__mips_n64))) || \ From owner-svn-src-all@freebsd.org Mon Apr 20 16:31:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E492A2C72BD; Mon, 20 Apr 2020 16:31:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495XJ94NDLz4dYQ; Mon, 20 Apr 2020 16:31:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 917481A3E8; Mon, 20 Apr 2020 16:31:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KGV5GZ082716; Mon, 20 Apr 2020 16:31:05 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KGV5pX082715; Mon, 20 Apr 2020 16:31:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004201631.03KGV5pX082715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 20 Apr 2020 16:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360128 - stable/12/usr.sbin/daemon X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/usr.sbin/daemon X-SVN-Commit-Revision: 360128 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 16:31:06 -0000 Author: mav Date: Mon Apr 20 16:31:05 2020 New Revision: 360128 URL: https://svnweb.freebsd.org/changeset/base/360128 Log: MFC r348629 (by cem): daemon(8): Don't block SIGTERM during restart delay I believe this was introduced in the original '-r' commit, r231911 (2012). At the time, the scope was limited to a 1 second sleep. r332518 (2018) added '-R', which increased the potential duration of the affected interval (from 1 to N seconds) by permitting arbitrary restart intervals. Instead, handle SIGTERM normally during restart-sleep, when the monitored process is not running, and shut down promptly. (I noticed this behavior when debugging a child process that exited quickly under the 'daemon -r -R 30' environment. 'kill ' had no immediate effect and the monitor process slept until the next restart attempt. This was annoying.) Modified: stable/12/usr.sbin/daemon/daemon.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/daemon/daemon.c ============================================================================== --- stable/12/usr.sbin/daemon/daemon.c Mon Apr 20 16:21:37 2020 (r360127) +++ stable/12/usr.sbin/daemon/daemon.c Mon Apr 20 16:31:05 2020 (r360128) @@ -359,12 +359,13 @@ restart: } } } + if (restart && !terminate) + daemon_sleep(restart, 0); if (sigprocmask(SIG_BLOCK, &mask_term, NULL)) { warn("sigprocmask"); goto exit; } if (restart && !terminate) { - daemon_sleep(restart, 0); close(pfd[0]); pfd[0] = -1; goto restart; @@ -384,7 +385,8 @@ static void daemon_sleep(time_t secs, long nsecs) { struct timespec ts = { secs, nsecs }; - while (nanosleep(&ts, &ts) == -1) { + + while (!terminate && nanosleep(&ts, &ts) == -1) { if (errno != EINTR) err(1, "nanosleep"); } From owner-svn-src-all@freebsd.org Mon Apr 20 16:40:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6BE02C73AC; Mon, 20 Apr 2020 16:40:01 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495XVT4vXfz4drC; Mon, 20 Apr 2020 16:40:01 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-qt1-x834.google.com with SMTP id s30so9056645qth.2; Mon, 20 Apr 2020 09:40:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=n+EGHHpa8f0nioE+GU6/REPuXKlW5Ns3PTFi9MThXj8=; b=XxZD+vLqSHWGRImzjOV2nB2pPMbnboJnJpnZKMXrt1zo72jjECjEEjZUZUpIiu44Cr LwBLWeVZqDhLTA0VTRtz6TSqtFjhx/6fTgxlaoa8O+i2OqHcouRvOqRNVE0zjVmGnc6H 6KinocPp+tByvX07dsb4si7JR25qHGTpKYImo+CmuD2mNd6bvZEqefdZ+9kwuiYjckMI UcayfyYeIZGHa3VjhXDmMQESqB38R08irxEoo3nAicQJqlAY+J+J0CnJtT2g1pO1Q7RW doUrGeMYFv2RkMpmtt9lPkydicv8r/+P9m7PZtm/Sd5FlkUSfuWHGKL+RELGB8iimu8c o6Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n+EGHHpa8f0nioE+GU6/REPuXKlW5Ns3PTFi9MThXj8=; b=XbmctXUCN0KsP++b+H/sHFudrEESAapE9zDVlKY3HONt2cCJnex1cw0hrP0dMvjYTh P3xiJGyuxihDEZcPFkAmf4yf8tPBi0AbgVmsc78k+mm1Lunlvv1cbuKjX40aw6ubydvN mXhbwc19nbU792MyQBH2gwqzS435EQWRSCLMrqhmqKv4LrHZumScZW3z6tztzc3sELcq DLHsFMaSNIO6WUSK661tNTuvD6i+f7RIKpUgDWFJLyFaVBglHDpCk1QpmS9x1kasOpct 6UexiO3CnWEivm5fG2VXVX5ZOy5E5IPeEoC7KiSLAPF3OyvL2nuox1WahyKkRltOlkaO pq4w== X-Gm-Message-State: AGi0PuZQcUmSLyaOUwTLnrJllQEY39XzgrHQN0Q7e0uGVDYeGBfVDjmk Sr77g1CAId9YT9lL+bHHTV/nKGi9NfM= X-Google-Smtp-Source: APiQypJvJg/m5Fbt04P8Q5MkehMFPOAVNhSdc1yO/BvcSSlHhgRiuCqUr03eXqgNcgHq12AakNuM8Q== X-Received: by 2002:ac8:1084:: with SMTP id a4mr16932671qtj.156.1587400800193; Mon, 20 Apr 2020 09:40:00 -0700 (PDT) Received: from titan.knownspace (173-19-125-130.client.mchsi.com. [173.19.125.130]) by smtp.gmail.com with ESMTPSA id u24sm18651qkk.84.2020.04.20.09.39.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Apr 2020 09:39:59 -0700 (PDT) Date: Mon, 20 Apr 2020 11:39:57 -0500 From: Justin Hibbits To: Niclas Zeising Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r360126 - head/sys/dev/evdev Message-ID: <20200420113957.50d41308@titan.knownspace> In-Reply-To: <202004201617.03KGHHj7074077@repo.freebsd.org> References: <202004201617.03KGHHj7074077@repo.freebsd.org> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 495XVT4vXfz4drC X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 16:40:01 -0000 On Mon, 20 Apr 2020 16:17:17 +0000 (UTC) Niclas Zeising wrote: > Author: zeising (doc,ports committer) > Date: Mon Apr 20 16:17:16 2020 > New Revision: 360126 > URL: https://svnweb.freebsd.org/changeset/base/360126 > > Log: > Change kern.evdev.rcpt_mask to 12 by default > > Change kern.evdev.rcpt_mask from 3 to 12 by default. This makes us > much more evdev-friendly, and will prevent everyone using xorg and > wayland with evdev devices (the default) from needing to change this > locally. > powerpc32 still uses the old value for the keyboard part, becaues > the adb keyboard driver used there is not evdev compatible. > > Reviewed by: wulf > Approved by: wulf > MFC after: 2 weeks > X-MFC-Note: 12 only > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D24370 > > Modified: > head/sys/dev/evdev/evdev.c > > Modified: head/sys/dev/evdev/evdev.c > ============================================================================== > --- head/sys/dev/evdev/evdev.c Mon Apr 20 16:14:44 2020 > (r360125) +++ head/sys/dev/evdev/evdev.c Mon Apr 20 16:17:16 > 2020 (r360126) @@ -66,7 +66,12 @@ enum evdev_sparse_result > > MALLOC_DEFINE(M_EVDEV, "evdev", "evdev memory"); > > -int evdev_rcpt_mask = EVDEV_RCPT_SYSMOUSE | EVDEV_RCPT_KBDMUX; > +/* adb keyboard driver used on powerpc does not support evdev yet */ > +#ifdef __powerpc__ This affects *all* powerpc, not just powerpc32. For just powerpc32, you should have: #if defined(__powerpc__) && !defined(__powerpc64__) But I'm curious, why not attach to sysmouse(4) and kbdmux(4)? What breakage does that cause? I could maybe see not attaching to sysmouse(4) by default, if the protocol isn't expressive enough, but kbdmux(4) should be sufficient. - Justin From owner-svn-src-all@freebsd.org Mon Apr 20 16:57:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 240E92C7B08; Mon, 20 Apr 2020 16:57:29 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mail.daemonic.se (mail.daemonic.se [176.58.89.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 495Xtc5Y6Xz4g0r; Mon, 20 Apr 2020 16:57:28 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from cid.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 495Xtb1ls8z3lbm; Mon, 20 Apr 2020 16:57:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([IPv6:::1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cid.daemonic.se (mailscanner.daemonic.se [IPv6:::1]) (amavisd-new, port 10587) with ESMTPS id O7p-FfR7_AiU; Mon, 20 Apr 2020 16:55:08 +0000 (UTC) Received: from garnet.daemonic.se (unknown [IPv6:2001:470:dca9:201:39ae:b103:6efc:d521]) by mail.daemonic.se (Postfix) with ESMTPSA id 495Xlh571Zz3mCs; Mon, 20 Apr 2020 16:51:28 +0000 (UTC) Subject: Re: svn commit: r360126 - head/sys/dev/evdev To: Justin Hibbits Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202004201617.03KGHHj7074077@repo.freebsd.org> <20200420113957.50d41308@titan.knownspace> From: Niclas Zeising Message-ID: Date: Mon, 20 Apr 2020 18:51:27 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200420113957.50d41308@titan.knownspace> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 495Xtc5Y6Xz4g0r X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.91 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.96)[-0.963,0]; ASN(0.00)[asn:36236, ipnet:176.58.89.0/24, country:US]; NEURAL_HAM_LONG(-0.95)[-0.948,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 16:57:29 -0000 On 2020-04-20 18:39, Justin Hibbits wrote: > On Mon, 20 Apr 2020 16:17:17 +0000 (UTC) > Niclas Zeising wrote: > >> Author: zeising (doc,ports committer) >> Date: Mon Apr 20 16:17:16 2020 >> New Revision: 360126 >> URL: https://svnweb.freebsd.org/changeset/base/360126 >> >> Log: >> Change kern.evdev.rcpt_mask to 12 by default >> >> Change kern.evdev.rcpt_mask from 3 to 12 by default. This makes us >> much more evdev-friendly, and will prevent everyone using xorg and >> wayland with evdev devices (the default) from needing to change this >> locally. >> powerpc32 still uses the old value for the keyboard part, becaues >> the adb keyboard driver used there is not evdev compatible. >> >> Reviewed by: wulf >> Approved by: wulf >> MFC after: 2 weeks >> X-MFC-Note: 12 only >> Relnotes: yes >> Differential Revision: https://reviews.freebsd.org/D24370 >> >> Modified: >> head/sys/dev/evdev/evdev.c >> >> Modified: head/sys/dev/evdev/evdev.c >> ============================================================================== >> --- head/sys/dev/evdev/evdev.c Mon Apr 20 16:14:44 2020 >> (r360125) +++ head/sys/dev/evdev/evdev.c Mon Apr 20 16:17:16 >> 2020 (r360126) @@ -66,7 +66,12 @@ enum evdev_sparse_result >> >> MALLOC_DEFINE(M_EVDEV, "evdev", "evdev memory"); >> >> -int evdev_rcpt_mask = EVDEV_RCPT_SYSMOUSE | EVDEV_RCPT_KBDMUX; >> +/* adb keyboard driver used on powerpc does not support evdev yet */ >> +#ifdef __powerpc__ > > This affects *all* powerpc, not just powerpc32. For just powerpc32, > you should have: > > #if defined(__powerpc__) && !defined(__powerpc64__) Ok, I wasn't aware of that, I'll fix it. > > But I'm curious, why not attach to sysmouse(4) and kbdmux(4)? What > breakage does that cause? I could maybe see not attaching to > sysmouse(4) by default, if the protocol isn't expressive enough, but > kbdmux(4) should be sufficient. Sysmouse hides features from evdev, so it's better to let xorg or wayland access the device directly. If both are enabled, you'll get double events, meaning double key presses when using USB devices: https://reviews.freebsd.org/D24370#538523 Regards -- Niclas Zeising From owner-svn-src-all@freebsd.org Mon Apr 20 17:10:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62F5B2A8029; Mon, 20 Apr 2020 17:10:30 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495Y9d3ZCkz3CCT; Mon, 20 Apr 2020 17:10:29 +0000 (UTC) (envelope-from jonlooney@gmail.com) Received: by mail-qt1-f175.google.com with SMTP id z90so9100239qtd.10; Mon, 20 Apr 2020 10:10:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i9kuGHI5/SE2gw5Wl6OQ3O9Xp7Gtti8n9IuSSuKf2k0=; b=O+OLHQflRy3JESxEEHe7lhMwJ0XblDF+SdNCXW1UYUTlmoH3aauagjzZiFjxMBEV5J icnEdRUWYfYGISMfxc34FHoWQEvPvKsN1lQPXGs6bWXGj+pwIcCNtXkA4R5syP940Dw8 qvh6EOqnUlEglKtm5FUqFXBRUKkgXCBDkcK7OhwRJinuf3ykVFsplnvRDFrWVPhAuuJN 6EZY2tVimMYsx2zFg9tdjATYoQXws0Uhz+2kH7swpDnOsM4W+zkRURqB1z8htoi8QzrC FqvDtKFZtBChFn6RXqW1TtGE8Sw9EP4vG1bjQE4dgVlQSnnEX0lyPJIb7Cbl9SWhPxU1 xZnA== X-Gm-Message-State: AGi0PuZ8aVYC1LIKA58e+kdPzy6pkS53D2EMUsg3Jj2kfWUb7hEvn7Gu GkbbHdgPSKARjbeEUX6pp2YyHOz3 X-Google-Smtp-Source: APiQypJUF6Sq5kGti2A7iPLP9PcuRzT23+WuQ2m9QTuIiSov0QQmNBpCj4b59m0da4jTODkIRNwAZQ== X-Received: by 2002:ac8:4b4c:: with SMTP id e12mr17172732qts.78.1587402627998; Mon, 20 Apr 2020 10:10:27 -0700 (PDT) Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com. [209.85.219.51]) by smtp.gmail.com with ESMTPSA id 65sm71878qkf.79.2020.04.20.10.10.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Apr 2020 10:10:27 -0700 (PDT) Received: by mail-qv1-f51.google.com with SMTP id p19so5083300qve.0; Mon, 20 Apr 2020 10:10:27 -0700 (PDT) X-Received: by 2002:ad4:4f93:: with SMTP id em19mr16251504qvb.110.1587402627318; Mon, 20 Apr 2020 10:10:27 -0700 (PDT) MIME-Version: 1.0 References: <202004162007.03GK7Zgr089624@repo.freebsd.org> In-Reply-To: From: "Jonathan T. Looney" Date: Mon, 20 Apr 2020 13:10:16 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360019 - head/tests/sys/kern To: Enji Cooper Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 495Y9d3ZCkz3CCT X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jonlooney@gmail.com designates 209.85.160.175 as permitted sender) smtp.mailfrom=jonlooney@gmail.com X-Spamd-Result: default: False [-1.94 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; URI_COUNT_ODD(1.00)[3]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[175.160.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.94)[ip: (-3.84), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[jtl@freebsd.org,jonlooney@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[175.160.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[jtl@freebsd.org,jonlooney@gmail.com]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 17:10:30 -0000 On Sun, Apr 19, 2020 at 5:03 PM Enji Cooper wrote: > > > On Apr 16, 2020, at 1:07 PM, Jonathan T. Looney wrote= : > > > > Author: jtl > > Date: Thu Apr 16 20:07:34 2020 > > New Revision: 360019 > > URL: https://svnweb.freebsd.org/changeset/base/360019 > > > > Log: > > Add a regression test for the changes in r359922 and r359923. > > > > Note that the Python code has been tested on both Python 2.7 and 3.7. > > > > Reviewed by: olivier > > MFC after: 2 weeks > > Sponsored by: Netflix, Inc. > > Ugh=E2=80=A6 I can tell by this commit that I just need to add py= test > support to kyua >_>=E2=80=A6 > I assume you're suggesting that we support running Python code natively, instead of from a shell script. If so, I think that's a great idea. It looks like we're growing a number of Python scripts in the test suite, and supporting them more natively is probably good for more than one reason= . Jonathan From owner-svn-src-all@freebsd.org Mon Apr 20 17:33:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F7A32A8CFC; Mon, 20 Apr 2020 17:33:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495Yhk6f6Nz3Dr7; Mon, 20 Apr 2020 17:33:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf1-x432.google.com with SMTP id 18so1636066pfx.6; Mon, 20 Apr 2020 10:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=So9aQPMzKH0k8zIkaVyV1vGgfHh2te/EQqU77WbHhv0=; b=l5hekXjpXDWVi95jeHfj8VLqOz7DE5d7KhM3FdRZ1XNS+CUi7zeFdG51yCmu9XsS4l oiPmm+JlBBOhmAOP79qfKf3TS30Rx22AOiIlohWIuOvlJTCMX8791U7sC0OHsBc15Ky2 vwh/ib2d8PzLkrmWP18tOzpf3GWlK6x+ATjqWLcoMhC+RJNVT+u5aIfIVNZamFzspFyU Fr2S7GowzO1YaQE6cS0SwwOJO/PyKkXTsdWtn4uxpP/P7oCVrPArLbCjNzeEEvKfM+6L n44wR3B3iHfvSlRaguFF+lPXUbzz2iRHenUb5lQZON7OhYZtnAoqPBYtMBwj6NJ1RPHw J36Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=So9aQPMzKH0k8zIkaVyV1vGgfHh2te/EQqU77WbHhv0=; b=sTSK1A5fGdXuaeEMoBDSdfnR+tZQTnLb18gqvznAasfH/CaDuRC0iYT6h6fOy70LGx kKHQqqDgsTGBB59Z+mPkiQjkKzSvT333i9NgQRoaeimRCuj714C35LA5U8Xbl6OJ9VV+ xvPXA21NW3LeEqcjwsZS9KxkmSMczUwwWZicNj9vDryK3ZvSm/nv4H8Q0CXMReRKYAqY CkeaXHpZJJVvkqP8D00zvIVAG3zakcSKju/jcanJR31PHvpcEEgg+K1D0HwTz0PzWw+B vrerch+VCJhgR//1aTOZZR8MgaseT4nKG88s08NaXM8YzheOG9WokQGiUPH0gOK+7s2L wN4g== X-Gm-Message-State: AGi0Pubajy2iSgEUZv71X55zcumAgcACaYY6SFtSeycgIHFWZSw5Pc+C 9cvBf8r35Rm43XMTTyy0FZG24YlEZEM= X-Google-Smtp-Source: APiQypI+okqfUQmTXofrNScEFpQhwL48CRgk3QDMWy5/+iS0jJFXvvjNrq7xN+uMeGp+XHSoRFkvJQ== X-Received: by 2002:aa7:962c:: with SMTP id r12mr18132675pfg.232.1587404037025; Mon, 20 Apr 2020 10:33:57 -0700 (PDT) Received: from [192.168.20.26] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 192sm63084pfu.182.2020.04.20.10.33.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Apr 2020 10:33:56 -0700 (PDT) From: Enji Cooper Message-Id: <1FC4B1BE-B147-466D-B01D-F4A670516FF1@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: svn commit: r360019 - head/tests/sys/kern Date: Mon, 20 Apr 2020 10:33:55 -0700 In-Reply-To: Cc: src-committers , svn-src-all , svn-src-head@freebsd.org To: "Jonathan T. Looney" References: <202004162007.03GK7Zgr089624@repo.freebsd.org> X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 495Yhk6f6Nz3Dr7 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 17:33:59 -0000 > On Apr 20, 2020, at 10:10 AM, Jonathan T. Looney = wrote: >=20 > On Sun, Apr 19, 2020 at 5:03 PM Enji Cooper > wrote: >=20 > > On Apr 16, 2020, at 1:07 PM, Jonathan T. Looney = wrote: > >=20 > > Author: jtl > > Date: Thu Apr 16 20:07:34 2020 > > New Revision: 360019 > > URL: https://svnweb.freebsd.org/changeset/base/360019 = > >=20 > > Log: > > Add a regression test for the changes in r359922 and r359923. > >=20 > > Note that the Python code has been tested on both Python 2.7 and = 3.7. > >=20 > > Reviewed by: olivier > > MFC after: 2 weeks > > Sponsored by: Netflix, Inc. >=20 > Ugh=E2=80=A6 I can tell by this commit that I just need to add = pytest support to kyua >_>=E2=80=A6 >=20 > I assume you're suggesting that we support running Python code = natively, instead of from a shell script. If so, I think that's a great = idea. >=20 > It looks like we're growing a number of Python scripts in the test = suite, and supporting them more natively is probably good for more than = one reason. That was exactly my thinking. The reason why I picked pytest is = that nose 1.x is abandoned, nose 2.x converges with pytest (and the page = recommends pytest), and raw unittest requires a lot of complexity. = Another plus of pytest is that it has an extensible plugin framework. It=E2=80=99s really unfortunate that we don=E2=80=99t have = better package integration in buildworld. It would make building and = installing tests a lot easier. Cheers, -Enji From owner-svn-src-all@freebsd.org Mon Apr 20 17:39:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 287EB2A8EB9; Mon, 20 Apr 2020 17:39:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495YqX0KFfz3F55; Mon, 20 Apr 2020 17:39:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0622C1B0D7; Mon, 20 Apr 2020 17:39:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KHdp2H023424; Mon, 20 Apr 2020 17:39:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KHdpYM023423; Mon, 20 Apr 2020 17:39:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004201739.03KHdpYM023423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 20 Apr 2020 17:39:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360129 - head/contrib/llvm-project/clang/lib/CodeGen X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm-project/clang/lib/CodeGen X-SVN-Commit-Revision: 360129 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 17:39:52 -0000 Author: dim Date: Mon Apr 20 17:39:51 2020 New Revision: 360129 URL: https://svnweb.freebsd.org/changeset/base/360129 Log: Merge commit ce5173c0e from llvm git (by Reid Kleckner): Use FinishThunk to finish musttail thunks FinishThunk, and the invariant of setting and then unsetting CurCodeDecl, was added in 7f416cc42638 (2015). The invariant didn't exist when I added this musttail codepath in ab2090d10765 (2014). Recently in 28328c3771, I started using this codepath on non-Windows platforms, and users reported problems during release testing (PR44987). The issue was already present for users of EH on i686-windows-msvc, so I added a test for that case as well. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D76444 This should fix 'Assertion failed: (!empty() && "popping exception stack when not empty"), function popTerminate, file /usr/src/contrib/llvm-project/clang/lib/CodeGen/CGCleanup.h, line 583' when building the net-p2p/libtorrent-rasterbar PR: 244830 Reported by: jbeich, yuri MFC after: 6 weeks X-MFC-With: 358851 Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp Mon Apr 20 16:31:05 2020 (r360128) +++ head/contrib/llvm-project/clang/lib/CodeGen/CGVTables.cpp Mon Apr 20 17:39:51 2020 (r360129) @@ -437,7 +437,8 @@ void CodeGenFunction::EmitMustTailThunk(GlobalDecl GD, // Finish the function to maintain CodeGenFunction invariants. // FIXME: Don't emit unreachable code. EmitBlock(createBasicBlock()); - FinishFunction(); + + FinishThunk(); } void CodeGenFunction::generateThunk(llvm::Function *Fn, @@ -564,7 +565,7 @@ llvm::Constant *CodeGenVTables::maybeEmitThunk(GlobalD CGM.SetLLVMFunctionAttributesForDefinition(GD.getDecl(), ThunkFn); // Thunks for variadic methods are special because in general variadic - // arguments cannot be perferctly forwarded. In the general case, clang + // arguments cannot be perfectly forwarded. In the general case, clang // implements such thunks by cloning the original function body. However, for // thunks with no return adjustment on targets that support musttail, we can // use musttail to perfectly forward the variadic arguments. From owner-svn-src-all@freebsd.org Mon Apr 20 17:48:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A64AF2A928F; Mon, 20 Apr 2020 17:48:11 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495Z172kLHz3FfP; Mon, 20 Apr 2020 17:48:11 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 548E01B2BA; Mon, 20 Apr 2020 17:48:11 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KHmBcQ029498; Mon, 20 Apr 2020 17:48:11 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KHmB5W029497; Mon, 20 Apr 2020 17:48:11 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202004201748.03KHmB5W029497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 20 Apr 2020 17:48:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360130 - head/tests/sys/kqueue/libkqueue X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/kqueue/libkqueue X-SVN-Commit-Revision: 360130 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 17:48:11 -0000 Author: lwhsu Date: Mon Apr 20 17:48:10 2020 New Revision: 360130 URL: https://svnweb.freebsd.org/changeset/base/360130 Log: Temporarily skip timer tests in sys.kqueue.libkqueue.kqueue_test.main on i386 PR: 245768 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/kqueue/libkqueue/kqueue_test.sh Modified: head/tests/sys/kqueue/libkqueue/kqueue_test.sh ============================================================================== --- head/tests/sys/kqueue/libkqueue/kqueue_test.sh Mon Apr 20 17:39:51 2020 (r360129) +++ head/tests/sys/kqueue/libkqueue/kqueue_test.sh Mon Apr 20 17:48:10 2020 (r360130) @@ -1,9 +1,16 @@ #!/bin/sh # $FreeBSD$ -i=1 +skip="" # Temporarily disable evfilt_proc tests: https://bugs.freebsd.org/233586 -"$(dirname $0)/kqtest" --no-proc | while read line; do +skip="${skip} --no-proc" +if [ "$(uname -p)" = "i386" ]; then + # Temporarily disable timer tests on i386: https://bugs.freebsd.org/245768 + skip="${skip} --no-timer" +fi + +i=1 +"$(dirname $0)/kqtest" ${skip} | while read line; do echo $line | grep -q passed if [ $? -eq 0 ]; then echo "ok - $i $line" From owner-svn-src-all@freebsd.org Mon Apr 20 18:01:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFBD62A965F; Mon, 20 Apr 2020 18:01:45 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495ZJn4D3Dz3Ghn; Mon, 20 Apr 2020 18:01:45 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C2C81B635; Mon, 20 Apr 2020 18:01:45 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KI1jII041335; Mon, 20 Apr 2020 18:01:45 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KI1jTK041334; Mon, 20 Apr 2020 18:01:45 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202004201801.03KI1jTK041334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 20 Apr 2020 18:01:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360131 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 360131 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 18:01:45 -0000 Author: cem Date: Mon Apr 20 18:01:45 2020 New Revision: 360131 URL: https://svnweb.freebsd.org/changeset/base/360131 Log: acpi_ec(4): Do not probe "successfully" if an error occurred All of the 'goto out;' cases in this probe routine without explicit initialization of 'ret' indicate error cases and were clearly intended to use the initial definition of 'ret' with ENXIO. However, 'ret' was accidentally squashed by reuse for a subroutine call near the beginning of probe. Use a different variable for the subroutine status to preserve ENXIO ret for the 'goto out's as a minimal solution to the panic reported at attach for now. PR: 245757 Modified: head/sys/dev/acpica/acpi_ec.c Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Mon Apr 20 17:48:10 2020 (r360130) +++ head/sys/dev/acpica/acpi_ec.c Mon Apr 20 18:01:45 2020 (r360131) @@ -344,7 +344,7 @@ acpi_ec_probe(device_t dev) device_t peer; char desc[64]; int ecdt; - int ret; + int ret, rc; struct acpi_ec_params *params; static char *ec_ids[] = { "PNP0C09", NULL }; @@ -368,9 +368,9 @@ acpi_ec_probe(device_t dev) } else ecdt = 0; - ret = ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids, NULL); - if (ret > 0) - return (ret); + rc = ACPI_ID_PROBE(device_get_parent(dev), dev, ec_ids, NULL); + if (rc > 0) + return (rc); params = malloc(sizeof(struct acpi_ec_params), M_TEMP, M_WAITOK | M_ZERO); @@ -398,7 +398,6 @@ acpi_ec_probe(device_t dev) peer = devclass_get_device(acpi_ec_devclass, params->uid); if (peer != NULL && device_is_alive(peer)) { device_disable(dev); - ret = ENXIO; goto out; } From owner-svn-src-all@freebsd.org Mon Apr 20 18:13:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DFC72A9CC9; Mon, 20 Apr 2020 18:13:40 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi1-f195.google.com (mail-oi1-f195.google.com [209.85.167.195]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495ZZW6dlNz3Hl4; Mon, 20 Apr 2020 18:13:39 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi1-f195.google.com with SMTP id k9so9639059oia.8; Mon, 20 Apr 2020 11:13:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=Yulf9JMoJdqSZjbCkjSXBWU8AcErb0PkFZTswtTUuZ0=; b=dLRbWU4No6xfHEV5fr2sUlmPKHouswOWi+p8kkmuXvw6shqcOyoj65H5DNKkyRZc/T 6H3hSDW+qBchI6J+Qn/d4FIkcys/2ubcKKxWXu2RCvP4XLOT/BRaLsWi0LyV6u7xJFsr jo4g8FL26BARxjj5eIYLIuAWyqFvljXuLSLTG9+ofpU6Axl0OyLJwEdgZywxF0mn5oCW chXGl1UYldYSF/sg56lrZpAVOwlMjDF422wum/zFirbvX1YoU9ZoPJDw3FGOJ4nbLaHD 5zhV8g0vudv1w1PksDEbFG65eT2KXt6Ut3bRaWQC324kc38rT9Ip2jHhAgBExH9gaiqM iI7w== X-Gm-Message-State: AGi0PuYBtJBc2w5FBxdeWOZfNAKU5Go0mMlRG4BtzAmr9K4a1Sk14uDP 6qfMU+jn7FCMyfAjNKamubqvK1XP X-Google-Smtp-Source: APiQypK7dgYyf0iCDxpFSPOr50VIYSlK1OFN7lP93RfRP/SxGDzowPs883DMO48HMVs0kCJp6lsTSQ== X-Received: by 2002:aca:1e10:: with SMTP id m16mr487290oic.84.1587406418476; Mon, 20 Apr 2020 11:13:38 -0700 (PDT) Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com. [209.85.210.49]) by smtp.gmail.com with ESMTPSA id t13sm92894otr.43.2020.04.20.11.13.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Apr 2020 11:13:38 -0700 (PDT) Received: by mail-ot1-f49.google.com with SMTP id e20so8990276otl.2; Mon, 20 Apr 2020 11:13:38 -0700 (PDT) X-Received: by 2002:a9d:6b97:: with SMTP id b23mr4429251otq.157.1587406417933; Mon, 20 Apr 2020 11:13:37 -0700 (PDT) MIME-Version: 1.0 References: <202004201617.03KGHHj7074077@repo.freebsd.org> <20200420113957.50d41308@titan.knownspace> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 20 Apr 2020 11:13:27 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360126 - head/sys/dev/evdev To: Niclas Zeising Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 495ZZW6dlNz3Hl4 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 18:13:40 -0000 Hi Niclas, On Mon, Apr 20, 2020 at 9:57 AM Niclas Zeising wrote: > > On 2020-04-20 18:39, Justin Hibbits wrote: > > For just powerpc32, > > you should have: > > > > #if defined(__powerpc__) && !defined(__powerpc64__) > > Ok, I wasn't aware of that, I'll fix it. FYI, arch(7) is a great resource here (thanks, emaste@): """ Architecture-specific macros: Architecture Predefined macros ... powerpc __powerpc__ powerpcspe __powerpc__, __SPE__ powerpc64 __powerpc__, __powerpc64__ """ For other predefined macros not covered in arch(7), I highly recommend https://sourceforge.net/p/predef/wiki/Home/ . Best regards, Conrad From owner-svn-src-all@freebsd.org Mon Apr 20 18:23:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 226E12AA18D; Mon, 20 Apr 2020 18:23:32 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495Znw09c5z3JcS; Mon, 20 Apr 2020 18:23:32 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0104B1BA2A; Mon, 20 Apr 2020 18:23:32 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KINVoD054007; Mon, 20 Apr 2020 18:23:31 GMT (envelope-from zeising@FreeBSD.org) Received: (from zeising@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KINV3d054006; Mon, 20 Apr 2020 18:23:31 GMT (envelope-from zeising@FreeBSD.org) Message-Id: <202004201823.03KINV3d054006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zeising set sender to zeising@FreeBSD.org using -f From: Niclas Zeising Date: Mon, 20 Apr 2020 18:23:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360132 - head/sys/dev/evdev X-SVN-Group: head X-SVN-Commit-Author: zeising X-SVN-Commit-Paths: head/sys/dev/evdev X-SVN-Commit-Revision: 360132 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 18:23:32 -0000 Author: zeising (doc,ports committer) Date: Mon Apr 20 18:23:31 2020 New Revision: 360132 URL: https://svnweb.freebsd.org/changeset/base/360132 Log: Fix kern.evdev.rcpt_mask on powerpc In r360126, I meant to have a different mask only on powerpc, not powerpc64. Update the check to check that we're not compiling for powerpc64. Reported by: jhibbits Approved by: wulf (implicit) MFC after: 2 weeks X-MFC-Note: 12 only X-MFC-With: r360126 Differential Revision: D24370 (followup) Modified: head/sys/dev/evdev/evdev.c Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Mon Apr 20 18:01:45 2020 (r360131) +++ head/sys/dev/evdev/evdev.c Mon Apr 20 18:23:31 2020 (r360132) @@ -67,7 +67,7 @@ enum evdev_sparse_result MALLOC_DEFINE(M_EVDEV, "evdev", "evdev memory"); /* adb keyboard driver used on powerpc does not support evdev yet */ -#ifdef __powerpc__ +#if defined(__powerpc__) && !defined(__powerpc64__) int evdev_rcpt_mask = EVDEV_RCPT_KBDMUX | EVDEV_RCPT_HW_MOUSE; #else int evdev_rcpt_mask = EVDEV_RCPT_HW_MOUSE | EVDEV_RCPT_HW_KBD; From owner-svn-src-all@freebsd.org Mon Apr 20 18:23:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23B142AA1CE; Mon, 20 Apr 2020 18:23:37 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495Zp0424Sz3JfW; Mon, 20 Apr 2020 18:23:36 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ot1-f44.google.com with SMTP id 72so2549388otu.1; Mon, 20 Apr 2020 11:23:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=FcVaKqj1egVtVTu0Udk2N7yoQfNZ+euyJOIEyKr1fSk=; b=UlWL5OR118ZEy0S+2zEaxwkwh/loQSYafJPUZVM6Gcx3VnjcZL6TMFly9j4TadZqTV GKdFutuQN2VOeWVn7cWMYJijm53xjchu7kW23ESwjxcclLX8XekLPMOiuqKVscBYETY3 tEY0erLbloU6e9Wm9zGAPE0blZLXmQllGVq7ou9jA539TtyQdmJP5XVdD6Pvr+569O9r //qm4e5NEw9a9p1fUBjMMOkG/oJOGQ6YlfbtG808wbys34cel2QPLStn9O1Pmz290Rn7 +Mxiz6eDN+qfOV5f3Nt4Y2oXwExIoxz4itsc8hKVMSXVurKzsYRvW1BrVZYOKTIjei9U sZ/A== X-Gm-Message-State: AGi0Pubto9jjL4pfGQXYk0dEZSbMNtpGBal0jrQmrx92ZHBg1YqaPy86 qU9XkFWe25ARfP1ioEkCuugIxSV6 X-Google-Smtp-Source: APiQypLzROByvqsGiWIuaEKPLzin09taQGXzqFstGJqthfKdEcl51uaqxM8L/TLMuAE43MWI84ISkw== X-Received: by 2002:a9d:eed:: with SMTP id 100mr7578024otj.83.1587407015131; Mon, 20 Apr 2020 11:23:35 -0700 (PDT) Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com. [209.85.167.174]) by smtp.gmail.com with ESMTPSA id q187sm30264oih.48.2020.04.20.11.23.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Apr 2020 11:23:34 -0700 (PDT) Received: by mail-oi1-f174.google.com with SMTP id a2so5048607oia.11; Mon, 20 Apr 2020 11:23:34 -0700 (PDT) X-Received: by 2002:a05:6808:28b:: with SMTP id z11mr516607oic.135.1587407014537; Mon, 20 Apr 2020 11:23:34 -0700 (PDT) MIME-Version: 1.0 References: <202004201445.03KEjIbB018710@repo.freebsd.org> In-Reply-To: <202004201445.03KEjIbB018710@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Mon, 20 Apr 2020 11:23:23 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360122 - head/sys/vm To: Mark Johnston Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 495Zp0424Sz3JfW X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 18:23:37 -0000 Thanks! On Mon, Apr 20, 2020 at 7:45 AM Mark Johnston wrote: > > Author: markj > Date: Mon Apr 20 14:45:17 2020 > New Revision: 360122 > URL: https://svnweb.freebsd.org/changeset/base/360122 > > Log: > Handle trashed queue pointers in vm_page_acquire_unlocked(). > > vm_page_acquire_unlocked() relies on type-stability of vm_page > structures and assumes that the listq linkage pointers always point to a > vm_page or are NULL. QUEUE_MACRO_DEBUG_TRASH breaks that assumption, so > add an explicit check for a trashed queue pointer before dereferencing. > > Reported and tested by: pho > Reviewed by: kib > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D24472 > > Modified: > head/sys/vm/vm_page.c > > Modified: head/sys/vm/vm_page.c > ============================================================================== > --- head/sys/vm/vm_page.c Mon Apr 20 14:24:13 2020 (r360121) > +++ head/sys/vm/vm_page.c Mon Apr 20 14:45:17 2020 (r360122) > @@ -4438,7 +4438,7 @@ vm_page_acquire_unlocked(vm_object_t object, vm_pindex > * without barriers. Switch to radix to verify. > */ > if (prev == NULL || (m = TAILQ_NEXT(prev, listq)) == NULL || > - m->pindex != pindex || > + QMD_IS_TRASHED(m) || m->pindex != pindex || > atomic_load_ptr(&m->object) != object) { > prev = NULL; > /* From owner-svn-src-all@freebsd.org Mon Apr 20 18:37:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 017B12AAB8A; Mon, 20 Apr 2020 18:37:49 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2607:f740:d:20::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 495b6N66jSz3LKj; Mon, 20 Apr 2020 18:37:48 +0000 (UTC) (envelope-from zeising@freebsd.org) Received: from cid.daemonic.se (localhost [IPv6:::1]) by mail.daemonic.se (Postfix) with ESMTP id 495b6D72Cvz3mD0; Mon, 20 Apr 2020 18:37:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mail.daemonic.se ([IPv6:::1]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256) by cid.daemonic.se (mailscanner.daemonic.se [IPv6:::1]) (amavisd-new, port 10587) with ESMTPS id CEaArZz5Ek5h; Mon, 20 Apr 2020 18:35:20 +0000 (UTC) Received: from garnet.daemonic.se (unknown [IPv6:2001:470:dca9:201:39ae:b103:6efc:d521]) by mail.daemonic.se (Postfix) with ESMTPSA id 495Zpy2fQMz3mD1; Mon, 20 Apr 2020 18:24:26 +0000 (UTC) Subject: Re: svn commit: r360126 - head/sys/dev/evdev To: cem@freebsd.org Cc: src-committers , svn-src-all , svn-src-head References: <202004201617.03KGHHj7074077@repo.freebsd.org> <20200420113957.50d41308@titan.knownspace> From: Niclas Zeising Message-ID: <1a901390-992f-7f5b-899a-660365da174d@freebsd.org> Date: Mon, 20 Apr 2020 20:24:25 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 495b6N66jSz3LKj X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 18:37:49 -0000 On 2020-04-20 20:13, Conrad Meyer wrote: > Hi Niclas, > > On Mon, Apr 20, 2020 at 9:57 AM Niclas Zeising wrote: >> >> On 2020-04-20 18:39, Justin Hibbits wrote: >>> For just powerpc32, >>> you should have: >>> >>> #if defined(__powerpc__) && !defined(__powerpc64__) >> >> Ok, I wasn't aware of that, I'll fix it. > > FYI, arch(7) is a great resource here (thanks, emaste@): > > """ > Architecture-specific macros: > > Architecture Predefined macros > ... > powerpc __powerpc__ > powerpcspe __powerpc__, __SPE__ > powerpc64 __powerpc__, __powerpc64__ > """ > > For other predefined macros not covered in arch(7), I highly recommend > https://sourceforge.net/p/predef/wiki/Home/ . > I'll remember that for next time, thanks! In any case, this should be fixed with r360132, sorry about that. Regards -- Niclas Zeising From owner-svn-src-all@freebsd.org Mon Apr 20 19:08:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC6792AB84F; Mon, 20 Apr 2020 19:08:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495bp53vhwz3P2y; Mon, 20 Apr 2020 19:08:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7CE841C242; Mon, 20 Apr 2020 19:08:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KJ8jL6079278; Mon, 20 Apr 2020 19:08:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KJ8jqv079277; Mon, 20 Apr 2020 19:08:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004201908.03KJ8jqv079277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 20 Apr 2020 19:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360133 - stable/12/sys/dev/sound/pci/hda X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 360133 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 19:08:45 -0000 Author: emaste Date: Mon Apr 20 19:08:45 2020 New Revision: 360133 URL: https://svnweb.freebsd.org/changeset/base/360133 Log: MFC r360053: hdac: update comment to match function name snd_hda was rewritten in r230130; one function retained a comment referencing the previous name. Modified: stable/12/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdac.c Mon Apr 20 18:23:31 2020 (r360132) +++ stable/12/sys/dev/sound/pci/hda/hdac.c Mon Apr 20 19:08:45 2020 (r360133) @@ -962,7 +962,7 @@ hdac_unsolq_flush(struct hdac_softc *sc) } /**************************************************************************** - * uint32_t hdac_command_sendone_internal + * uint32_t hdac_send_command * * Wrapper function that sends only one command to a given codec ****************************************************************************/ From owner-svn-src-all@freebsd.org Mon Apr 20 19:14:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E6242ABB40; Mon, 20 Apr 2020 19:14:24 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 495bwb190Jz3Pj7; Mon, 20 Apr 2020 19:14:22 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id 74738D170B; Mon, 20 Apr 2020 22:14:15 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id NVJ_uFuwybMf; Mon, 20 Apr 2020 22:14:10 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id 13508D16FC; Mon, 20 Apr 2020 22:14:10 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id 446E1422122; Mon, 20 Apr 2020 22:12:34 +0300 (MSK) X-Virus-Scanned: amavisd-new at cicgroup.ru Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id 33kidCsngryd; Mon, 20 Apr 2020 22:12:31 +0300 (MSK) Received: from [192.168.0.30] (gateway [10.0.2.2]) by mail.cicgroup.ru (Postfix) with ESMTPA id A7ECE42211C; Mon, 20 Apr 2020 22:12:31 +0300 (MSK) Subject: Re: svn commit: r360126 - head/sys/dev/evdev To: Justin Hibbits Cc: Niclas Zeising , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202004201617.03KGHHj7074077@repo.freebsd.org> <20200420113957.50d41308@titan.knownspace> From: Vladimir Kondratyev Message-ID: <9e1f8218-916d-82cb-348f-326fc651115d@kondratyev.su> Date: Mon, 20 Apr 2020 22:13:51 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200420113957.50d41308@titan.knownspace> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 495bwb190Jz3Pj7 X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of vladimir@kondratyev.su has no SPF policy when checking 195.170.219.3) smtp.mailfrom=vladimir@kondratyev.su X-Spamd-Result: default: False [1.04 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; NEURAL_HAM_MEDIUM(-0.32)[-0.320,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[kondratyev.su]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.35)[0.354,0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8299, ipnet:195.170.192.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[country: RU(0.01)] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 19:14:24 -0000 On 20.04.2020 19:39, Justin Hibbits wrote: > But I'm curious, why not attach to sysmouse(4) and kbdmux(4)? What > breakage does that cause? I could maybe see not attaching to > sysmouse(4) by default, if the protocol isn't expressive enough, but > kbdmux(4) should be sufficient. > > - Justin kbdmux(4) is pretty good for standard 102-104-keys keyboards found at common desktops. But it does not work that good with some laptop ones. There are no "Flight mode on/off", "Touchpad on/off" e.t.c. events defined in AT-keyset but they exist in evdev-keyset. Unfortunately, we do not support keymap uploading in our drivers yet to make utilization of this advantage easy but IMO its better to switch to direct key-event reporting earlier rather than later. From owner-svn-src-all@freebsd.org Mon Apr 20 19:16:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3063D2ABC5B; Mon, 20 Apr 2020 19:16:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495byg0X2Rz3Pvw; Mon, 20 Apr 2020 19:16:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D5DE1C43B; Mon, 20 Apr 2020 19:16:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KJGASY085383; Mon, 20 Apr 2020 19:16:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KJGA2g085382; Mon, 20 Apr 2020 19:16:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004201916.03KJGA2g085382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 20 Apr 2020 19:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360134 - head/contrib/llvm-project/llvm/lib/Target/PowerPC X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm-project/llvm/lib/Target/PowerPC X-SVN-Commit-Revision: 360134 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 19:16:11 -0000 Author: dim Date: Mon Apr 20 19:16:10 2020 New Revision: 360134 URL: https://svnweb.freebsd.org/changeset/base/360134 Log: Merge commit 64b31d96d from llvm git (by Nemanja Ivanovic): [PowerPC] Do not attempt to reuse load for 64-bit FP_TO_UINT without FPCVT We call the function that attempts to reuse the conversion without checking whether the target matches the constraints that the callee expects. This patch adds the check prior to the call. Fixes: https://bugs.llvm.org/show_bug.cgi?id=43976 Differential revision: https://reviews.llvm.org/D77564 This should fix 'Assertion failed: ((Op.getOpcode() == ISD::FP_TO_SINT || Subtarget.hasFPCVT()) && "i64 FP_TO_UINT is supported only with FPCVT"), function LowerFP_TO_INTForReuse, file /usr/src/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp, line 7276' when building the devel/libslang2 port (and a few others) for PowerPC64. Requested by: pkubaj MFC after: 6 weeks X-MFC-With: 358851 Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp Mon Apr 20 19:08:45 2020 (r360133) +++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp Mon Apr 20 19:16:10 2020 (r360134) @@ -7848,9 +7848,10 @@ bool PPCTargetLowering::canReuseLoadAddress(SDValue Op SelectionDAG &DAG, ISD::LoadExtType ET) const { SDLoc dl(Op); + bool ValidFPToUint = Op.getOpcode() == ISD::FP_TO_UINT && + (Subtarget.hasFPCVT() || Op.getValueType() == MVT::i32); if (ET == ISD::NON_EXTLOAD && - (Op.getOpcode() == ISD::FP_TO_UINT || - Op.getOpcode() == ISD::FP_TO_SINT) && + (ValidFPToUint || Op.getOpcode() == ISD::FP_TO_SINT) && isOperationLegalOrCustom(Op.getOpcode(), Op.getOperand(0).getValueType())) { From owner-svn-src-all@freebsd.org Mon Apr 20 22:20:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 143DB2B1A2C; Mon, 20 Apr 2020 22:20:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495h3G6h7Yz4DMq; Mon, 20 Apr 2020 22:20:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC60A1E7D3; Mon, 20 Apr 2020 22:20:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KMKQCb097457; Mon, 20 Apr 2020 22:20:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KMKQAB097456; Mon, 20 Apr 2020 22:20:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004202220.03KMKQAB097456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 20 Apr 2020 22:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360135 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 360135 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 22:20:27 -0000 Author: jhb Date: Mon Apr 20 22:20:26 2020 New Revision: 360135 URL: https://svnweb.freebsd.org/changeset/base/360135 Log: Generate IVs directly in esp_output. This is the only place that uses CRYPTO_F_IV_GENERATE. All crypto drivers currently duplicate the same boilerplate code to handle this case. Doing the generation directly removes complexity from drivers. It also simplifies support for separate input and output buffers. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D24449 Modified: head/sys/netipsec/xform_esp.c Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Mon Apr 20 19:16:10 2020 (r360134) +++ head/sys/netipsec/xform_esp.c Mon Apr 20 22:20:26 2020 (r360135) @@ -813,10 +813,9 @@ esp_output(struct mbuf *m, struct secpolicy *sp, struc crp->crp_payload_length = m->m_pkthdr.len - (skip + hlen + alen); crp->crp_op = CRYPTO_OP_ENCRYPT; - /* Encryption operation. */ + /* Generate IV / nonce. */ + ivp = &crp->crp_iv[0]; if (SAV_ISCTRORGCM(sav)) { - ivp = &crp->crp_iv[0]; - /* GCM IV Format: RFC4106 4 */ /* CTR IV Format: RFC3686 4 */ /* Salt is last four bytes of key, RFC4106 8.1 */ @@ -833,8 +832,9 @@ esp_output(struct mbuf *m, struct secpolicy *sp, struc m_copyback(m, skip + hlen - sav->ivlen, sav->ivlen, &ivp[4]); crp->crp_flags |= CRYPTO_F_IV_SEPARATE; } else if (sav->ivlen != 0) { + arc4rand(ivp, sav->ivlen, 0); crp->crp_iv_start = skip + hlen - sav->ivlen; - crp->crp_flags |= CRYPTO_F_IV_GENERATE; + m_copyback(m, crp->crp_iv_start, sav->ivlen, ivp); } /* Callback parameters */ From owner-svn-src-all@freebsd.org Mon Apr 20 22:24:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B5832B1C39; Mon, 20 Apr 2020 22:24:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495h8Q1CSSz4DrR; Mon, 20 Apr 2020 22:24:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2021F1E9BE; Mon, 20 Apr 2020 22:24:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KMOssa003635; Mon, 20 Apr 2020 22:24:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KMOosL003616; Mon, 20 Apr 2020 22:24:50 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004202224.03KMOosL003616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 20 Apr 2020 22:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360136 - in head: share/man/man9 sys/crypto/aesni sys/crypto/armv8 sys/crypto/ccp sys/crypto/via sys/dev/cesa sys/dev/cxgbe/crypto sys/dev/glxsb sys/dev/hifn sys/dev/safe sys/dev/sec s... X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: share/man/man9 sys/crypto/aesni sys/crypto/armv8 sys/crypto/ccp sys/crypto/via sys/dev/cesa sys/dev/cxgbe/crypto sys/dev/glxsb sys/dev/hifn sys/dev/safe sys/dev/sec sys/dev/ubsec sys/mips/cav... X-SVN-Commit-Revision: 360136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 22:24:54 -0000 Author: jhb Date: Mon Apr 20 22:24:49 2020 New Revision: 360136 URL: https://svnweb.freebsd.org/changeset/base/360136 Log: Retire the CRYPTO_F_IV_GENERATE flag. The sole in-tree user of this flag has been retired, so remove this complexity from all drivers. While here, add a helper routine drivers can use to read the current request's IV into a local buffer. Use this routine to replace duplicated code in nearly all drivers. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D24450 Modified: head/share/man/man9/Makefile head/share/man/man9/crypto_driver.9 head/share/man/man9/crypto_request.9 head/sys/crypto/aesni/aesni.c head/sys/crypto/armv8/armv8_crypto.c head/sys/crypto/ccp/ccp_hardware.c head/sys/crypto/via/padlock_cipher.c head/sys/dev/cesa/cesa.c head/sys/dev/cxgbe/crypto/t4_crypto.c head/sys/dev/glxsb/glxsb.c head/sys/dev/hifn/hifn7751.c head/sys/dev/safe/safe.c head/sys/dev/sec/sec.c head/sys/dev/ubsec/ubsec.c head/sys/mips/cavium/cryptocteon/cryptocteon.c head/sys/mips/nlm/dev/sec/nlmsec.c head/sys/opencrypto/crypto.c head/sys/opencrypto/cryptodev.h head/sys/opencrypto/cryptosoft.c Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Mon Apr 20 22:20:26 2020 (r360135) +++ head/share/man/man9/Makefile Mon Apr 20 22:24:49 2020 (r360136) @@ -904,6 +904,7 @@ MLINKS+=crypto_driver.9 crypto_apply.9 \ crypto_driver.9 crypto_done.9 \ crypto_driver.9 crypto_get_driverid.9 \ crypto_driver.9 crypto_get_driver_session.9 \ + crypto_driver.9 crypto_read_iv.9 \ crypto_driver.9 crypto_unblock.9 \ crypto_driver.9 crypto_unregister_all.9 \ crypto_driver.9 CRYPTODEV_FREESESSION.9 \ Modified: head/share/man/man9/crypto_driver.9 ============================================================================== --- head/share/man/man9/crypto_driver.9 Mon Apr 20 22:20:26 2020 (r360135) +++ head/share/man/man9/crypto_driver.9 Mon Apr 20 22:24:49 2020 (r360136) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 27, 2020 +.Dd April 20, 2020 .Dt CRYPTO_DRIVER 9 .Os .Sh NAME @@ -62,6 +62,8 @@ .Fn crypto_get_driverid "device_t dev" "size_t session_size" "int flags" .Ft void * .Fn crypto_get_driver_session "crypto_session_t crypto_session" +.Ft void +.Fn crypto_read_iv "struct cryptop *crp" "void *iv" .Ft int .Fn crypto_unblock "uint32_t driverid" "int what" .Ft int @@ -260,6 +262,12 @@ into the data buffer for The bytes are written starting at an offset of .Fa off bytes in the request's data buffer. +.Pp +.Fn crypto_read_iv +copies the IV or nonce for +.Fa crp +into the the local buffer pointed to by +.Fa iv . .Pp A driver calls .Fn crypto_done Modified: head/share/man/man9/crypto_request.9 ============================================================================== --- head/share/man/man9/crypto_request.9 Mon Apr 20 22:20:26 2020 (r360135) +++ head/share/man/man9/crypto_request.9 Mon Apr 20 22:24:49 2020 (r360136) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 27, 2020 +.Dd April 20, 2020 .Dt CRYPTO_REQUEST 9 .Os .Sh NAME @@ -225,16 +225,6 @@ should be set in and .Fa crp_digest_start should be left as zero. -.Pp -An encryption request using an IV stored in the IV region may set -.Dv CRYPTO_F_IV_GENERATE -in -.Fa crp_flags -to request that the driver generate a random IV. -Note that -.Dv CRYPTO_F_IV_GENERATE -cannot be used with decryption operations or in combination with -.Dv CRYPTO_F_IV_SEPARATE . .Pp Requests that store part, but not all, of the IV in the data buffer should store the partial IV in the data buffer and pass the full IV separately in Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/crypto/aesni/aesni.c Mon Apr 20 22:24:49 2020 (r360136) @@ -704,14 +704,7 @@ aesni_cipher_crypt(struct aesni_session *ses, struct c aesni_cipher_setup_common(ses, csp, crp->crp_cipher_key, csp->csp_cipher_klen); - /* Setup iv */ - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(iv, csp->csp_ivlen, 0); - crypto_copyback(crp, crp->crp_iv_start, csp->csp_ivlen, iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - memcpy(iv, crp->crp_iv, csp->csp_ivlen); - else - crypto_copydata(crp, crp->crp_iv_start, csp->csp_ivlen, iv); + crypto_read_iv(crp, iv); switch (csp->csp_cipher_alg) { case CRYPTO_AES_CBC: Modified: head/sys/crypto/armv8/armv8_crypto.c ============================================================================== --- head/sys/crypto/armv8/armv8_crypto.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/crypto/armv8/armv8_crypto.c Mon Apr 20 22:24:49 2020 (r360136) @@ -335,14 +335,7 @@ armv8_crypto_cipher_process(struct armv8_crypto_sessio panic("armv8: new cipher key"); } - /* Setup iv */ - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(iv, csp->csp_ivlen, 0); - crypto_copyback(crp, crp->crp_iv_start, csp->csp_ivlen, iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - memcpy(iv, crp->crp_iv, csp->csp_ivlen); - else - crypto_copydata(crp, crp->crp_iv_start, csp->csp_ivlen, iv); + crypto_read_iv(crp, iv); /* Do work */ switch (csp->csp_cipher_alg) { Modified: head/sys/crypto/ccp/ccp_hardware.c ============================================================================== --- head/sys/crypto/ccp/ccp_hardware.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/crypto/ccp/ccp_hardware.c Mon Apr 20 22:24:49 2020 (r360136) @@ -1353,13 +1353,7 @@ ccp_collect_iv(struct cryptop *crp, const struct crypt char *iv) { - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(iv, csp->csp_ivlen, 0); - crypto_copyback(crp, crp->crp_iv_start, csp->csp_ivlen, iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - memcpy(iv, crp->crp_iv, csp->csp_ivlen); - else - crypto_copydata(crp, crp->crp_iv_start, csp->csp_ivlen, iv); + crypto_read_iv(crp, iv); /* * If the input IV is 12 bytes, append an explicit counter of 1. Modified: head/sys/crypto/via/padlock_cipher.c ============================================================================== --- head/sys/crypto/via/padlock_cipher.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/crypto/via/padlock_cipher.c Mon Apr 20 22:24:49 2020 (r360136) @@ -209,13 +209,7 @@ padlock_cipher_process(struct padlock_session *ses, st cw->cw_filler2 = 0; cw->cw_filler3 = 0; - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(iv, AES_BLOCK_LEN, 0); - crypto_copyback(crp, crp->crp_iv_start, AES_BLOCK_LEN, iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - memcpy(iv, crp->crp_iv, AES_BLOCK_LEN); - else - crypto_copydata(crp, crp->crp_iv_start, AES_BLOCK_LEN, iv); + crypto_read_iv(crp, iv); if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) { cw->cw_direction = PADLOCK_DIRECTION_ENCRYPT; Modified: head/sys/dev/cesa/cesa.c ============================================================================== --- head/sys/dev/cesa/cesa.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/dev/cesa/cesa.c Mon Apr 20 22:24:49 2020 (r360136) @@ -1791,17 +1791,8 @@ cesa_process(device_t dev, struct cryptop *crp, int hi CESA_LOCK(sc, sessions); cesa_sync_desc(sc, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - if (csp->csp_cipher_alg != 0) { - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(cr->cr_csd->csd_iv, csp->csp_ivlen, 0); - crypto_copyback(crp, crp->crp_iv_start, csp->csp_ivlen, - cr->cr_csd->csd_iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - memcpy(cr->cr_csd->csd_iv, crp->crp_iv, csp->csp_ivlen); - else - crypto_copydata(crp, crp->crp_iv_start, csp->csp_ivlen, - cr->cr_csd->csd_iv); - } + if (csp->csp_cipher_alg != 0) + crypto_read_iv(crp, cr->cr_csd->csd_iv); if (crp->crp_cipher_key != NULL) { memcpy(cs->cs_key, crp->crp_cipher_key, Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_crypto.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/dev/cxgbe/crypto/t4_crypto.c Mon Apr 20 22:24:49 2020 (r360136) @@ -665,19 +665,7 @@ ccr_blkcipher(struct ccr_softc *sc, struct ccr_session crwr = wrtod(wr); memset(crwr, 0, wr_len); - /* - * Read the existing IV from the request or generate a random - * one if none is provided. - */ - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(iv, s->blkcipher.iv_len, 0); - crypto_copyback(crp, crp->crp_iv_start, s->blkcipher.iv_len, - iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - memcpy(iv, crp->crp_iv, s->blkcipher.iv_len); - else - crypto_copydata(crp, crp->crp_iv_start, s->blkcipher.iv_len, - iv); + crypto_read_iv(crp, iv); /* Zero the remainder of the IV for AES-XTS. */ memset(iv + s->blkcipher.iv_len, 0, iv_len - s->blkcipher.iv_len); @@ -968,19 +956,7 @@ ccr_eta(struct ccr_softc *sc, struct ccr_session *s, s crwr = wrtod(wr); memset(crwr, 0, wr_len); - /* - * Read the existing IV from the request or generate a random - * one if none is provided. - */ - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(iv, s->blkcipher.iv_len, 0); - crypto_copyback(crp, crp->crp_iv_start, s->blkcipher.iv_len, - iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - memcpy(iv, crp->crp_iv, s->blkcipher.iv_len); - else - crypto_copydata(crp, crp->crp_iv_start, s->blkcipher.iv_len, - iv); + crypto_read_iv(crp, iv); /* Zero the remainder of the IV for AES-XTS. */ memset(iv + s->blkcipher.iv_len, 0, iv_len - s->blkcipher.iv_len); Modified: head/sys/dev/glxsb/glxsb.c ============================================================================== --- head/sys/dev/glxsb/glxsb.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/dev/glxsb/glxsb.c Mon Apr 20 22:24:49 2020 (r360136) @@ -659,13 +659,7 @@ glxsb_crypto_encdec(struct cryptop *crp, struct glxsb_ else control = SB_CTL_DEC; - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(op_iv, sizeof(op_iv), 0); - crypto_copyback(crp, crp->crp_iv_start, sizeof(op_iv), op_iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - memcpy(op_iv, crp->crp_iv, sizeof(op_iv)); - else - crypto_copydata(crp, crp->crp_iv_start, sizeof(op_iv), op_iv); + crypto_read_iv(crp, op_iv); offset = 0; tlen = crp->crp_payload_length; Modified: head/sys/dev/hifn/hifn7751.c ============================================================================== --- head/sys/dev/hifn/hifn7751.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/dev/hifn/hifn7751.c Mon Apr 20 22:24:49 2020 (r360136) @@ -2431,7 +2431,7 @@ hifn_process(device_t dev, struct cryptop *crp, int hi struct hifn_softc *sc = device_get_softc(dev); struct hifn_command *cmd = NULL; const void *mackey; - int err, ivlen, keylen; + int err, keylen; struct hifn_session *ses; ses = crypto_get_driver_session(crp->crp_session); @@ -2485,18 +2485,8 @@ hifn_process(device_t dev, struct cryptop *crp, int hi err = EINVAL; goto errout; } - if (csp->csp_cipher_alg != CRYPTO_ARC4) { - ivlen = csp->csp_ivlen; - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(cmd->iv, ivlen, 0); - crypto_copyback(crp, crp->crp_iv_start, ivlen, - cmd->iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - memcpy(cmd->iv, crp->crp_iv, ivlen); - else - crypto_copydata(crp, crp->crp_iv_start, ivlen, - cmd->iv); - } + if (csp->csp_cipher_alg != CRYPTO_ARC4) + crypto_read_iv(crp, cmd->iv); if (crp->crp_cipher_key != NULL) cmd->ck = crp->crp_cipher_key; Modified: head/sys/dev/safe/safe.c ============================================================================== --- head/sys/dev/safe/safe.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/dev/safe/safe.c Mon Apr 20 22:24:49 2020 (r360136) @@ -894,16 +894,7 @@ safe_process(device_t dev, struct cryptop *crp, int hi * in the state record and set the hash/crypt offset to * copy both the header+IV. */ - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(re->re_sastate.sa_saved_iv, csp->csp_ivlen, 0); - crypto_copyback(crp, crp->crp_iv_start, csp->csp_ivlen, - re->re_sastate.sa_saved_iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - memcpy(re->re_sastate.sa_saved_iv, crp->crp_iv, - csp->csp_ivlen); - else - crypto_copydata(crp, crp->crp_iv_start, csp->csp_ivlen, - re->re_sastate.sa_saved_iv); + crypto_read_iv(crp, re->re_sastate.sa_saved_iv); cmd0 |= SAFE_SA_CMD0_IVLD_STATE; if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) { Modified: head/sys/dev/sec/sec.c ============================================================================== --- head/sys/dev/sec/sec.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/dev/sec/sec.c Mon Apr 20 22:24:49 2020 (r360136) @@ -1285,18 +1285,8 @@ sec_process(device_t dev, struct cryptop *crp, int hin desc->sd_error = 0; desc->sd_crp = crp; - if (csp->csp_cipher_alg != 0) { - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(desc->sd_desc->shd_iv, csp->csp_ivlen, 0); - crypto_copyback(crp, crp->crp_iv_start, csp->csp_ivlen, - desc->sd_desc->shd_iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - memcpy(desc->sd_desc->shd_iv, crp->crp_iv, - csp->csp_ivlen); - else - crypto_copydata(crp, crp->crp_iv_start, csp->csp_ivlen, - desc->sd_desc->shd_iv); - } + if (csp->csp_cipher_alg != 0) + crypto_read_iv(crp, desc->sd_desc->shd_iv); if (crp->crp_cipher_key != NULL) memcpy(ses->ss_key, crp->crp_cipher_key, csp->csp_cipher_klen); Modified: head/sys/dev/ubsec/ubsec.c ============================================================================== --- head/sys/dev/ubsec/ubsec.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/dev/ubsec/ubsec.c Mon Apr 20 22:24:49 2020 (r360136) @@ -1043,15 +1043,7 @@ ubsec_process(device_t dev, struct cryptop *crp, int h ctx.pc_flags |= htole16(UBS_PKTCTX_ENC_3DES); - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(ctx.pc_iv, csp->csp_ivlen, 0); - crypto_copyback(crp, crp->crp_iv_start, - csp->csp_ivlen, ctx.pc_iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - memcpy(ctx.pc_iv, crp->crp_iv, csp->csp_ivlen); - else - crypto_copydata(crp, crp->crp_iv_start, csp->csp_ivlen, - ctx.pc_iv); + crypto_read_iv(crp, ctx.pc_iv); if (!CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) { ctx.pc_flags |= htole16(UBS_PKTCTX_INBOUND); Modified: head/sys/mips/cavium/cryptocteon/cryptocteon.c ============================================================================== --- head/sys/mips/cavium/cryptocteon/cryptocteon.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/mips/cavium/cryptocteon/cryptocteon.c Mon Apr 20 22:24:49 2020 (r360136) @@ -365,12 +365,7 @@ cryptocteon_process(device_t dev, struct cryptop *crp, } if (csp->csp_cipher_alg != 0) { - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(iv_data, csp->csp_ivlen, 0); - crypto_copyback(crp, crp->crp_iv_start, csp->csp_ivlen, - iv_data); - ivp = iv_data; - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) + if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) ivp = crp->crp_iv; else { crypto_copydata(crp, crp->crp_iv_start, csp->csp_ivlen, Modified: head/sys/mips/nlm/dev/sec/nlmsec.c ============================================================================== --- head/sys/mips/nlm/dev/sec/nlmsec.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/mips/nlm/dev/sec/nlmsec.c Mon Apr 20 22:24:49 2020 (r360136) @@ -470,11 +470,7 @@ xlp_copyiv(struct xlp_sec_softc *sc, struct xlp_sec_co crp = cmd->crp; if (csp->csp_cipher_alg != CRYPTO_ARC4) { - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(cmd->iv, csp->csp_ivlen, 0); - crypto_copyback(crp, crp->crp_iv_start, csp->csp_ivlen, - cmd->iv); - } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) + if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) memcpy(cmd->iv, crp->crp_iv, csp->csp_ivlen); } } Modified: head/sys/opencrypto/crypto.c ============================================================================== --- head/sys/opencrypto/crypto.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/opencrypto/crypto.c Mon Apr 20 22:24:49 2020 (r360136) @@ -1280,14 +1280,6 @@ crp_sanity(struct cryptop *crp) ("invalid ETA op %x", crp->crp_op)); break; } - KASSERT((crp->crp_flags & CRYPTO_F_IV_GENERATE) == 0 || - crp->crp_op == CRYPTO_OP_ENCRYPT || - crp->crp_op == (CRYPTO_OP_ENCRYPT | CRYPTO_OP_COMPUTE_DIGEST), - ("IV_GENERATE set for non-encryption operation %x", crp->crp_op)); - KASSERT((crp->crp_flags & - (CRYPTO_F_IV_SEPARATE | CRYPTO_F_IV_GENERATE)) != - (CRYPTO_F_IV_SEPARATE | CRYPTO_F_IV_GENERATE), - ("crp with both IV_SEPARATE and IV_GENERATE set")); KASSERT(crp->crp_buf_type >= CRYPTO_BUF_CONTIG && crp->crp_buf_type <= CRYPTO_BUF_MBUF, ("invalid crp buffer type %d", crp->crp_buf_type)); @@ -1305,9 +1297,8 @@ crp_sanity(struct cryptop *crp) ("AAD region in request not supporting AAD")); } if (csp->csp_ivlen == 0) { - KASSERT((crp->crp_flags & - (CRYPTO_F_IV_SEPARATE | CRYPTO_F_IV_GENERATE)) == 0, - ("IV_GENERATE or IV_SEPARATE set when IV isn't used")); + KASSERT((crp->crp_flags & CRYPTO_F_IV_SEPARATE) == 0, + ("IV_SEPARATE set when IV isn't used")); KASSERT(crp->crp_iv_start == 0, ("crp_iv_start set when IV isn't used")); } else if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) { @@ -1360,8 +1351,6 @@ crypto_dispatch(struct cryptop *crp) #ifdef INVARIANTS crp_sanity(crp); #endif - - /* TODO: Handle CRYPTO_F_IV_GENERATE so drivers don't have to. */ cryptostats.cs_ops++; Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/opencrypto/cryptodev.h Mon Apr 20 22:24:49 2020 (r360136) @@ -454,7 +454,6 @@ struct cryptop { * if CRYPTO_F_ASYNC flags is set */ #define CRYPTO_F_IV_SEPARATE 0x0200 /* Use crp_iv[] as IV. */ -#define CRYPTO_F_IV_GENERATE 0x0400 /* Generate a random IV and store. */ int crp_op; @@ -610,6 +609,18 @@ int crypto_apply(struct cryptop *crp, int off, int len int (*f)(void *, void *, u_int), void *arg); void *crypto_contiguous_subsegment(struct cryptop *crp, size_t skip, size_t len); + +static __inline void +crypto_read_iv(struct cryptop *crp, void *iv) +{ + const struct crypto_session_params *csp; + + csp = crypto_get_params(crp->crp_session); + if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) + memcpy(iv, crp->crp_iv, csp->csp_ivlen); + else + crypto_copydata(crp, crp->crp_iv_start, csp->csp_ivlen, iv); +} #endif /* _KERNEL */ #endif /* _CRYPTO_CRYPTO_H_ */ Modified: head/sys/opencrypto/cryptosoft.c ============================================================================== --- head/sys/opencrypto/cryptosoft.c Mon Apr 20 22:20:26 2020 (r360135) +++ head/sys/opencrypto/cryptosoft.c Mon Apr 20 22:24:49 2020 (r360136) @@ -133,14 +133,7 @@ swcr_encdec(struct swcr_session *ses, struct cryptop * (crp->crp_flags & CRYPTO_F_IV_SEPARATE) == 0) return (EINVAL); - /* IV explicitly provided ? */ - if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - bcopy(crp->crp_iv, iv, ivlen); - else if (crp->crp_flags & CRYPTO_F_IV_GENERATE) { - arc4rand(iv, ivlen, 0); - crypto_copyback(crp, crp->crp_iv_start, ivlen, iv); - } else - crypto_copydata(crp, crp->crp_iv_start, ivlen, iv); + crypto_read_iv(crp, iv); if (crp->crp_cipher_key != NULL) { if (sw->sw_kschedule) @@ -510,15 +503,9 @@ swcr_gmac(struct swcr_session *ses, struct cryptop *cr bcopy(swa->sw_ictx, &ctx, axf->ctxsize); blksz = axf->blocksize; - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) - return (EINVAL); - /* Initialize the IV */ ivlen = AES_GCM_IV_LEN; - if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - bcopy(crp->crp_iv, iv, ivlen); - else - crypto_copydata(crp, crp->crp_iv_start, ivlen, iv); + crypto_read_iv(crp, iv); axf->Reinit(&ctx, iv, ivlen); for (i = 0; i < crp->crp_payload_length; i += blksz) { @@ -669,15 +656,9 @@ swcr_ccm_cbc_mac(struct swcr_session *ses, struct cryp bcopy(swa->sw_ictx, &ctx, axf->ctxsize); blksz = axf->blocksize; - if (crp->crp_flags & CRYPTO_F_IV_GENERATE) - return (EINVAL); - /* Initialize the IV */ ivlen = AES_CCM_IV_LEN; - if (crp->crp_flags & CRYPTO_F_IV_SEPARATE) - bcopy(crp->crp_iv, iv, ivlen); - else - crypto_copydata(crp, crp->crp_iv_start, ivlen, iv); + crypto_read_iv(crp, iv); /* * AES CCM-CBC-MAC needs to know the length of both the auth From owner-svn-src-all@freebsd.org Mon Apr 20 22:57:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0A822B2553; Mon, 20 Apr 2020 22:57:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495hsl67s7z4GhC; Mon, 20 Apr 2020 22:57:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C92AB1EF65; Mon, 20 Apr 2020 22:57:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KMvFmc021676; Mon, 20 Apr 2020 22:57:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KMvFCj021675; Mon, 20 Apr 2020 22:57:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004202257.03KMvFCj021675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 20 Apr 2020 22:57:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360137 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 360137 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 22:57:16 -0000 Author: jhb Date: Mon Apr 20 22:57:15 2020 New Revision: 360137 URL: https://svnweb.freebsd.org/changeset/base/360137 Log: Update comments about IVs used in IPsec ESP. Add some prose and a diagram describing the layout of the cipher IV for AES-CTR and AES-GCM and how it relates to the ESP IV stored in the packet after the ESP header. Also, remove an XXX comment about the initial block counter value used for AES-CTR in esp_output as the current code matches the RFC (and the equivalent code in esp_input didn't have the XXX comment). Discussed with: cem Modified: head/sys/netipsec/xform_esp.c Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Mon Apr 20 22:24:49 2020 (r360136) +++ head/sys/netipsec/xform_esp.c Mon Apr 20 22:57:15 2020 (r360137) @@ -406,22 +406,38 @@ esp_input(struct mbuf *m, struct secasvar *sav, int sk crp->crp_payload_start = skip + hlen; crp->crp_payload_length = m->m_pkthdr.len - (skip + hlen + alen); + /* Generate or read cipher IV. */ if (SAV_ISCTRORGCM(sav)) { ivp = &crp->crp_iv[0]; - /* GCM IV Format: RFC4106 4 */ - /* CTR IV Format: RFC3686 4 */ - /* Salt is last four bytes of key, RFC4106 8.1 */ - /* Nonce is last four bytes of key, RFC3686 5.1 */ + /* + * AES-GCM and AES-CTR use similar cipher IV formats + * defined in RFC 4106 section 4 and RFC 3686 section + * 4, respectively. + * + * The first 4 bytes of the cipher IV contain an + * implicit salt, or nonce, obtained from the last 4 + * bytes of the encryption key. The next 8 bytes hold + * an explicit IV unique to each packet. This + * explicit IV is used as the ESP IV for the packet. + * The last 4 bytes hold a big-endian block counter + * incremented for each block. For AES-GCM, the block + * counter's initial value is defined as part of the + * algorithm. For AES-CTR, the block counter's + * initial value for each packet is defined as 1 by + * RFC 3686. + * + * ------------------------------------------ + * | Salt | Explicit ESP IV | Block Counter | + * ------------------------------------------ + * 4 bytes 8 bytes 4 bytes + */ memcpy(ivp, sav->key_enc->key_data + _KEYLEN(sav->key_enc) - 4, 4); - + m_copydata(m, skip + hlen - sav->ivlen, sav->ivlen, &ivp[4]); if (SAV_ISCTR(sav)) { - /* Initial block counter is 1, RFC3686 4 */ be32enc(&ivp[sav->ivlen + 4], 1); } - - m_copydata(m, skip + hlen - sav->ivlen, sav->ivlen, &ivp[4]); crp->crp_flags |= CRYPTO_F_IV_SEPARATE; } else if (sav->ivlen != 0) crp->crp_iv_start = skip + hlen - sav->ivlen; @@ -813,22 +829,20 @@ esp_output(struct mbuf *m, struct secpolicy *sp, struc crp->crp_payload_length = m->m_pkthdr.len - (skip + hlen + alen); crp->crp_op = CRYPTO_OP_ENCRYPT; - /* Generate IV / nonce. */ + /* Generate cipher and ESP IVs. */ ivp = &crp->crp_iv[0]; if (SAV_ISCTRORGCM(sav)) { - /* GCM IV Format: RFC4106 4 */ - /* CTR IV Format: RFC3686 4 */ - /* Salt is last four bytes of key, RFC4106 8.1 */ - /* Nonce is last four bytes of key, RFC3686 5.1 */ + /* + * See comment in esp_input() for details on the + * cipher IV. A simple per-SA counter stored in + * 'cntr' is used as the explicit ESP IV. + */ memcpy(ivp, sav->key_enc->key_data + _KEYLEN(sav->key_enc) - 4, 4); be64enc(&ivp[4], cntr); if (SAV_ISCTR(sav)) { - /* Initial block counter is 1, RFC3686 4 */ - /* XXXAE: should we use this only for first packet? */ be32enc(&ivp[sav->ivlen + 4], 1); } - m_copyback(m, skip + hlen - sav->ivlen, sav->ivlen, &ivp[4]); crp->crp_flags |= CRYPTO_F_IV_SEPARATE; } else if (sav->ivlen != 0) { From owner-svn-src-all@freebsd.org Mon Apr 20 23:32:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C293E2B3069; Mon, 20 Apr 2020 23:32:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495jfn4bpLz4K71; Mon, 20 Apr 2020 23:32:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F16C1F7A3; Mon, 20 Apr 2020 23:32:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03KNWnQR045905; Mon, 20 Apr 2020 23:32:49 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03KNWntv045904; Mon, 20 Apr 2020 23:32:49 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202004202332.03KNWntv045904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 20 Apr 2020 23:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360138 - head/contrib/bsnmp/snmpd X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/contrib/bsnmp/snmpd X-SVN-Commit-Revision: 360138 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2020 23:32:49 -0000 Author: glebius Date: Mon Apr 20 23:32:49 2020 New Revision: 360138 URL: https://svnweb.freebsd.org/changeset/base/360138 Log: Fix immediate crash when snmpd is bound to a specific IP address. The code that sets up msghdr must first fully fill in the msghdr itself, and only then use CMSG_xxx() macros. Silence from: harti, one week Modified: head/contrib/bsnmp/snmpd/trans_inet.c Modified: head/contrib/bsnmp/snmpd/trans_inet.c ============================================================================== --- head/contrib/bsnmp/snmpd/trans_inet.c Mon Apr 20 22:57:15 2020 (r360137) +++ head/contrib/bsnmp/snmpd/trans_inet.c Mon Apr 20 23:32:49 2020 (r360138) @@ -71,7 +71,7 @@ typedef void input_func(int, void *); typedef int activate_func(struct inet_port *); typedef void deactivate_func(struct inet_port *); typedef void parse_ctrl_func(struct port_sock *, const struct msghdr *); -typedef void setsrc_func(struct port_sock *, struct msghdr *); +typedef void setsrc_func(struct port_sock *, struct msghdr *, char *); static create_func ipv4_create; static input_func ipv4_input; @@ -401,13 +401,12 @@ inet_send2(struct tport *tp, const u_char *buf, size_t msg.msg_name = (void *)pi->peer; msg.msg_namelen = pi->peerlen; - msg.msg_control = NULL; - msg.msg_controllen = 0; - char cbuf[XMIT_CBUF_SIZE]; if (s->set_ret_source) { - msg.msg_control = cbuf; - s->setsrc(s, &msg); + s->setsrc(s, &msg, cbuf); + } else { + msg.msg_control = NULL; + msg.msg_controllen = 0; } return (sendmsg(s->input.fd, &msg, 0)); @@ -638,18 +637,20 @@ ipv4_parse_ctrl(struct port_sock *sock, const struct m * \param msg message */ static void -ipv4_setsrc(struct port_sock *sock, struct msghdr *msg) +ipv4_setsrc(struct port_sock *sock, struct msghdr *msg, char *cbuf) { - struct cmsghdr *cmsg = CMSG_FIRSTHDR(msg); + struct cmsghdr *cmsg; + msg->msg_control = cbuf; + msg->msg_controllen = CMSG_SPACE(sizeof(struct in_addr)); + /* select outgoing interface by setting source address */ + cmsg = CMSG_FIRSTHDR(msg); cmsg->cmsg_level = IPPROTO_IP; cmsg->cmsg_type = IP_SENDSRCADDR; cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); memcpy(CMSG_DATA(cmsg), &sock->ret_source.a4, sizeof(struct in_addr)); - - msg->msg_controllen = CMSG_SPACE(sizeof(struct in_addr)); } /** @@ -878,18 +879,20 @@ ipv6_parse_ctrl(struct port_sock *sock, const struct m * \param msg message */ static void -ipv6_setsrc(struct port_sock *sock, struct msghdr *msg) +ipv6_setsrc(struct port_sock *sock, struct msghdr *msg, char *cbuf) { - struct cmsghdr *cmsg = CMSG_FIRSTHDR(msg); + struct cmsghdr *cmsg; + msg->msg_control = cbuf; + msg->msg_controllen = CMSG_SPACE(sizeof(struct in6_pktinfo)); + /* select outgoing interface by setting source address */ + cmsg = CMSG_FIRSTHDR(msg); cmsg->cmsg_level = IPPROTO_IPV6; cmsg->cmsg_type = IPV6_PKTINFO; cmsg->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo)); memcpy(CMSG_DATA(cmsg), &sock->ret_source.a6, sizeof(struct in6_pktinfo)); - - msg->msg_controllen = CMSG_SPACE(sizeof(struct in6_pktinfo)); } /** From owner-svn-src-all@freebsd.org Tue Apr 21 00:37:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 97FB92B47E0; Tue, 21 Apr 2020 00:37:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495l5v3ZGWz4PfN; Tue, 21 Apr 2020 00:37:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75C2520330; Tue, 21 Apr 2020 00:37:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03L0btDI083577; Tue, 21 Apr 2020 00:37:55 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03L0btu7083576; Tue, 21 Apr 2020 00:37:55 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <202004210037.03L0btu7083576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 21 Apr 2020 00:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360139 - head/bin/sh X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/bin/sh X-SVN-Commit-Revision: 360139 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 00:37:55 -0000 Author: bdrewery Date: Tue Apr 21 00:37:55 2020 New Revision: 360139 URL: https://svnweb.freebsd.org/changeset/base/360139 Log: Fix build with NO_HISTORY set Reviewed by: jilles Differential Revision: https://reviews.freebsd.org/D24458 Modified: head/bin/sh/histedit.c Modified: head/bin/sh/histedit.c ============================================================================== --- head/bin/sh/histedit.c Mon Apr 20 23:32:49 2020 (r360138) +++ head/bin/sh/histedit.c Tue Apr 21 00:37:55 2020 (r360139) @@ -54,12 +54,12 @@ __FBSDID("$FreeBSD$"); #include "main.h" #include "output.h" #include "mystring.h" +#include "builtins.h" #ifndef NO_HISTORY #include "myhistedit.h" #include "error.h" #include "eval.h" #include "memalloc.h" -#include "builtins.h" #define MAXHISTLOOPS 4 /* max recursions through fc */ #define DEFEDITOR "ed" /* default editor *should* be $EDITOR */ @@ -503,7 +503,7 @@ bindcmd(int argc, char **argv) #include "error.h" int -histcmd(int argc, char **argv) +histcmd(int argc __unused, char **argv __unused) { error("not compiled with history support"); @@ -512,7 +512,7 @@ histcmd(int argc, char **argv) } int -bindcmd(int argc, char **argv) +bindcmd(int argc __unused, char **argv __unused) { error("not compiled with line editing support"); From owner-svn-src-all@freebsd.org Tue Apr 21 01:15:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A624B2B542D; Tue, 21 Apr 2020 01:15:16 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 495lwz65jbz4SQG; Tue, 21 Apr 2020 01:15:15 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from disco.vangyzen.net (unknown [70.97.188.230]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 6AEA556468; Mon, 20 Apr 2020 20:15:14 -0500 (CDT) Subject: Re: svn commit: r360068 - in head/sys: kern net sys To: Shawn Webb , Kristof Provost Cc: Ronald Klop , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <202004180750.03I7oUK6032898@repo.freebsd.org> <67B55A62-848B-4876-8367-DE0D32A8B7D4@FreeBSD.org> <20200419142327.nhotyboqubk3vl2l@mutt-hbsd> From: Eric van Gyzen Message-ID: <523895fb-7f30-c4ce-78a7-d16b2ff4954c@vangyzen.net> Date: Mon, 20 Apr 2020 20:15:13 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200419142327.nhotyboqubk3vl2l@mutt-hbsd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 495lwz65jbz4SQG X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of eric@vangyzen.net designates 199.48.133.146 as permitted sender) smtp.mailfrom=eric@vangyzen.net X-Spamd-Result: default: False [-5.40 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[vangyzen.net]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-3.10)[ip: (-7.99), ipnet: 199.48.132.0/22(-3.66), asn: 36236(-3.80), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:36236, ipnet:199.48.132.0/22, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 01:15:16 -0000 >>>> + sz = asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, if_name(ifp), >>>> + jailname); >>>> + if (sz < 0) { >>>> + /* Fall back to a random mac address. */ >>> >>> >>> I was wondering if it would be valuable to give this fall back something >>> like: >>> >>> printf("%s: unable to create fixed mac address; using random >>> mac address", if_name(ifp)); >>> >>> This will only be printed in rare circumstances. But in that case will >>> provide valuable information. >>> >> That would potentially be valuable, yes. On the other hand, we traditionally >> don???t sprinkle a lot of printf()s around in the kernel. This is extremely >> unlikely to happen, and if it does odds are attaching the interface will >> fail at an earlier or later point, you may struggle to pass packets and run >> into any number of other issues. >> It???s also possible to diagnose absent the printf(), because the MAC >> address will be locally administered rather than within the FreeBSD OUI. >> >> So, in short: not a bad idea. You can argue it both ways, and I find myself >> (weakly) on the opposite side. > > Would displaying the message only when verbose boot mode is enabled be > a suitable compromise? We could completely avoid the problems of dynamic allocation by calling SHA1Update three times, feeding each piece of data separately. For bonus points, use a single char[] to save stack space, too. Maybe use a union, for legibility, and to ensure the proper size without ugly assertions. Eric From owner-svn-src-all@freebsd.org Tue Apr 21 02:14:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFB662B84A6; Tue, 21 Apr 2020 02:14:28 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495nFJ4WTLz4YJ1; Tue, 21 Apr 2020 02:14:28 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 83DBFF168; Tue, 21 Apr 2020 02:14:28 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f182.google.com with SMTP id n20so4202114qtp.9; Mon, 20 Apr 2020 19:14:28 -0700 (PDT) X-Gm-Message-State: AGi0PuaVvPFIcIYfQRzHfKe/nU1TX5Ca81vfrIiLYfGyNUGvWe4V4p/5 LiWG/vtR4xod04GEvGT0s5S0B09n0EuhxLyY0GE= X-Google-Smtp-Source: APiQypIchJs+asYA47BKFXHvSsMwtxLoYsa8n8gGIWCLW3t4YnvZI7F4bA/SHFHkgju2pgyrDMZtiCGpRL7eKXIqcZI= X-Received: by 2002:ac8:65cc:: with SMTP id t12mr18843323qto.310.1587435268017; Mon, 20 Apr 2020 19:14:28 -0700 (PDT) MIME-Version: 1.0 References: <202004180750.03I7oUK6032898@repo.freebsd.org> <67B55A62-848B-4876-8367-DE0D32A8B7D4@FreeBSD.org> <20200419142327.nhotyboqubk3vl2l@mutt-hbsd> <523895fb-7f30-c4ce-78a7-d16b2ff4954c@vangyzen.net> In-Reply-To: <523895fb-7f30-c4ce-78a7-d16b2ff4954c@vangyzen.net> From: Kyle Evans Date: Mon, 20 Apr 2020 21:14:16 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360068 - in head/sys: kern net sys To: Eric van Gyzen Cc: Shawn Webb , Kristof Provost , Ronald Klop , svn-src-head , svn-src-all , src-committers Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 02:14:28 -0000 On Mon, Apr 20, 2020 at 8:15 PM Eric van Gyzen wrote: > > >>>> + sz = asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, if_name(ifp), > >>>> + jailname); > >>>> + if (sz < 0) { > >>>> + /* Fall back to a random mac address. */ > >>> > >>> > >>> I was wondering if it would be valuable to give this fall back something > >>> like: > >>> > >>> printf("%s: unable to create fixed mac address; using random > >>> mac address", if_name(ifp)); > >>> > >>> This will only be printed in rare circumstances. But in that case will > >>> provide valuable information. > >>> > >> That would potentially be valuable, yes. On the other hand, we traditionally > >> don???t sprinkle a lot of printf()s around in the kernel. This is extremely > >> unlikely to happen, and if it does odds are attaching the interface will > >> fail at an earlier or later point, you may struggle to pass packets and run > >> into any number of other issues. > >> It???s also possible to diagnose absent the printf(), because the MAC > >> address will be locally administered rather than within the FreeBSD OUI. > >> > >> So, in short: not a bad idea. You can argue it both ways, and I find myself > >> (weakly) on the opposite side. > > > > Would displaying the message only when verbose boot mode is enabled be > > a suitable compromise? > > We could completely avoid the problems of dynamic allocation by calling > SHA1Update three times, feeding each piece of data separately. > > For bonus points, use a single char[] to save stack space, too. Maybe > use a union, for legibility, and to ensure the proper size without ugly > assertions. > To be honest, I'd be more inclined to just revert this part of it and push it all back onto the stack. It's still < 512 bytes and pretty much always called in short paths because it's generally only used during initial creation of some ifnet; I found the concern about the stack usage here, specifically, a bit dubious in the first place, and this follow-up hasn't left me enjoying it any further. Thanks, Kyle Evans From owner-svn-src-all@freebsd.org Tue Apr 21 02:34:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 623E82B93F7 for ; Tue, 21 Apr 2020 02:34:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495nhJ0Sj6z4Zvb for ; Tue, 21 Apr 2020 02:34:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id DA925F3D2 for ; Tue, 21 Apr 2020 02:34:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f42.google.com with SMTP id v18so5856735qvx.9 for ; Mon, 20 Apr 2020 19:34:23 -0700 (PDT) X-Gm-Message-State: AGi0Puabpt+vQgEWS6Er/kQCYdk1HW4I+ewtnQ/D6evAfwEHEc8Doeb9 w67cINqHyfzNv6QhQ9yFbA8NIu0Ap4frdvWePCc= X-Received: by 2002:a05:6214:28d:: with SMTP id l13mt18407375qvv.181.1587436463320; Mon, 20 Apr 2020 19:34:23 -0700 (PDT) MIME-Version: 1.0 References: <202004180750.03I7oUK6032898@repo.freebsd.org> <67B55A62-848B-4876-8367-DE0D32A8B7D4@FreeBSD.org> <20200419142327.nhotyboqubk3vl2l@mutt-hbsd> <523895fb-7f30-c4ce-78a7-d16b2ff4954c@vangyzen.net> In-Reply-To: From: Kyle Evans Date: Mon, 20 Apr 2020 21:34:12 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r360068 - in head/sys: kern net sys Cc: Eric van Gyzen , Shawn Webb , Kristof Provost , Ronald Klop , svn-src-head , svn-src-all , src-committers Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 02:34:24 -0000 On Mon, Apr 20, 2020 at 9:14 PM Kyle Evans wrote: > > On Mon, Apr 20, 2020 at 8:15 PM Eric van Gyzen wrote: > > > > >>>> + sz = asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, if_name(ifp), > > >>>> + jailname); > > >>>> + if (sz < 0) { > > >>>> + /* Fall back to a random mac address. */ > > >>> > > >>> > > >>> I was wondering if it would be valuable to give this fall back something > > >>> like: > > >>> > > >>> printf("%s: unable to create fixed mac address; using random > > >>> mac address", if_name(ifp)); > > >>> > > >>> This will only be printed in rare circumstances. But in that case will > > >>> provide valuable information. > > >>> > > >> That would potentially be valuable, yes. On the other hand, we traditionally > > >> don???t sprinkle a lot of printf()s around in the kernel. This is extremely > > >> unlikely to happen, and if it does odds are attaching the interface will > > >> fail at an earlier or later point, you may struggle to pass packets and run > > >> into any number of other issues. > > >> It???s also possible to diagnose absent the printf(), because the MAC > > >> address will be locally administered rather than within the FreeBSD OUI. > > >> > > >> So, in short: not a bad idea. You can argue it both ways, and I find myself > > >> (weakly) on the opposite side. > > > > > > Would displaying the message only when verbose boot mode is enabled be > > > a suitable compromise? > > > > We could completely avoid the problems of dynamic allocation by calling > > SHA1Update three times, feeding each piece of data separately. > > > > For bonus points, use a single char[] to save stack space, too. Maybe > > use a union, for legibility, and to ensure the proper size without ugly > > assertions. > > > > To be honest, I'd be more inclined to just revert this part of it and > push it all back onto the stack. It's still < 512 bytes and pretty > much always called in short paths because it's generally only used > during initial creation of some ifnet; I found the concern about the > stack usage here, specifically, a bit dubious in the first place, and > this follow-up hasn't left me enjoying it any further. > Sorry, to clarify: I'm also pretty much OK with SHA1Update 3x if I'm alone in the "don't really care about this particular stack usage" camp, but I've found it useful that they're currently joined into a single buffer as I've had occasion to dump it in the past to confirm my understanding of the pedigree of the output, in case of, e.g., generated conflicts. From owner-svn-src-all@freebsd.org Tue Apr 21 03:57:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4DBCF2BCEF3; Tue, 21 Apr 2020 03:57:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495qXC1PvYz3CcC; Tue, 21 Apr 2020 03:57:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B9C722BB1; Tue, 21 Apr 2020 03:57:31 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03L3vVOt008308; Tue, 21 Apr 2020 03:57:31 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03L3vVUw008307; Tue, 21 Apr 2020 03:57:31 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004210357.03L3vVUw008307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 21 Apr 2020 03:57:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360140 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 360140 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 03:57:31 -0000 Author: kevans Date: Tue Apr 21 03:57:30 2020 New Revision: 360140 URL: https://svnweb.freebsd.org/changeset/base/360140 Log: kqueue: fix conversion of timer data to sbintime This unbreaks the i386 kqueue timer tests after a recent change switched NOTE_ABSTIME over to using microseconds. Notably, the data argument (which holds useconds) is an int64_t, but we were passing it to timer2sbintime which takes an intptr_t. Perhaps in a previous incarnation, intptr_t would have made sense, but now it just leads to the timestamp getting truncated and subsequently rejected when it no longer fits in an intptr_t. PR: 245768 Reported by: lwhsu / CI MFC after: 1 week Modified: head/sys/kern/kern_event.c Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Tue Apr 21 00:37:55 2020 (r360139) +++ head/sys/kern/kern_event.c Tue Apr 21 03:57:30 2020 (r360140) @@ -619,7 +619,7 @@ knote_fork(struct knlist *list, int pid) (NOTE_SECONDS | NOTE_MSECONDS | NOTE_USECONDS | NOTE_NSECONDS) static sbintime_t -timer2sbintime(intptr_t data, int flags) +timer2sbintime(int64_t data, int flags) { int64_t secs; From owner-svn-src-all@freebsd.org Tue Apr 21 04:47:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 771E42BE77D; Tue, 21 Apr 2020 04:47:43 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495rf72bDzz3G1X; Tue, 21 Apr 2020 04:47:43 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53E5B23574; Tue, 21 Apr 2020 04:47:43 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03L4lhF8038602; Tue, 21 Apr 2020 04:47:43 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03L4lgFP038599; Tue, 21 Apr 2020 04:47:42 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202004210447.03L4lgFP038599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 21 Apr 2020 04:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360141 - in stable/12/sys/fs: nfs nfsserver X-SVN-Group: stable-12 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in stable/12/sys/fs: nfs nfsserver X-SVN-Commit-Revision: 360141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 04:47:43 -0000 Author: rmacklem Date: Tue Apr 21 04:47:42 2020 New Revision: 360141 URL: https://svnweb.freebsd.org/changeset/base/360141 Log: MFC: r359679 Fix noisy NFSv4 server printf. Peter reported that his dmesg was getting cluttered with nfsrv_cache_session: no session messages when he rebooted his NFS server and they did not seem useful. He was correct, in that these messages are "normal" and expected when NFSv4.1 or NFSv4.2 are mounted and the server is rebooted. This patch silences the printf() during the grace period after a reboot. It also adds the client IP address to the printf(), so that the message is more useful if/when it occurs. If this happens outside of the server's grace period, it does indicate something is not working correctly. Instead of adding yet another nd_XXX argument, the arguments for nfsrv_cache_session() were simplified to take a "struct nfsrv_descript *". Modified: stable/12/sys/fs/nfs/nfs_var.h stable/12/sys/fs/nfsserver/nfs_nfsdkrpc.c stable/12/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/12/sys/fs/nfs/nfs_var.h Tue Apr 21 03:57:30 2020 (r360140) +++ stable/12/sys/fs/nfs/nfs_var.h Tue Apr 21 04:47:42 2020 (r360141) @@ -142,7 +142,7 @@ void nfsrv_throwawayallstate(NFSPROC_T *); int nfsrv_checksequence(struct nfsrv_descript *, uint32_t, uint32_t *, uint32_t *, int, uint32_t *, NFSPROC_T *); int nfsrv_checkreclaimcomplete(struct nfsrv_descript *, int); -void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **); +void nfsrv_cache_session(struct nfsrv_descript *, struct mbuf **); void nfsrv_freeallbackchannel_xprts(void); int nfsrv_layoutcommit(struct nfsrv_descript *, vnode_t, int, int, uint64_t, uint64_t, uint64_t, int, struct timespec *, int, nfsv4stateid_t *, Modified: stable/12/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- stable/12/sys/fs/nfsserver/nfs_nfsdkrpc.c Tue Apr 21 03:57:30 2020 (r360140) +++ stable/12/sys/fs/nfsserver/nfs_nfsdkrpc.c Tue Apr 21 04:47:42 2020 (r360141) @@ -394,8 +394,7 @@ nfs_proc(struct nfsrv_descript *nd, u_int32_t xid, SVC } else m = NULL; if ((nd->nd_flag & ND_HASSEQUENCE) != 0) - nfsrv_cache_session(nd->nd_sessionid, - nd->nd_slotid, nd->nd_repstat, &m); + nfsrv_cache_session(nd, &m); if (nd->nd_repstat == NFSERR_REPLYFROMCACHE) nd->nd_repstat = 0; cacherep = RC_REPLY; Modified: stable/12/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/12/sys/fs/nfsserver/nfs_nfsdstate.c Tue Apr 21 03:57:30 2020 (r360140) +++ stable/12/sys/fs/nfsserver/nfs_nfsdstate.c Tue Apr 21 04:47:42 2020 (r360141) @@ -6279,22 +6279,56 @@ nfsrv_checkreclaimcomplete(struct nfsrv_descript *nd, * Cache the reply in a session slot. */ void -nfsrv_cache_session(uint8_t *sessionid, uint32_t slotid, int repstat, - struct mbuf **m) +nfsrv_cache_session(struct nfsrv_descript *nd, struct mbuf **m) { struct nfsdsession *sep; struct nfssessionhash *shp; + char *buf, *cp; +#ifdef INET + struct sockaddr_in *sin; +#endif +#ifdef INET6 + struct sockaddr_in6 *sin6; +#endif - shp = NFSSESSIONHASH(sessionid); + shp = NFSSESSIONHASH(nd->nd_sessionid); NFSLOCKSESSION(shp); - sep = nfsrv_findsession(sessionid); + sep = nfsrv_findsession(nd->nd_sessionid); if (sep == NULL) { NFSUNLOCKSESSION(shp); - printf("nfsrv_cache_session: no session\n"); + if ((nfsrv_stablefirst.nsf_flags & NFSNSF_GRACEOVER) != 0) { + buf = malloc(INET6_ADDRSTRLEN, M_TEMP, M_WAITOK); + switch (nd->nd_nam->sa_family) { +#ifdef INET + case AF_INET: + sin = (struct sockaddr_in *)nd->nd_nam; + cp = inet_ntop(sin->sin_family, + &sin->sin_addr.s_addr, buf, + INET6_ADDRSTRLEN); + break; +#endif +#ifdef INET6 + case AF_INET6: + sin6 = (struct sockaddr_in6 *)nd->nd_nam; + cp = inet_ntop(sin6->sin6_family, + &sin6->sin6_addr, buf, INET6_ADDRSTRLEN); + break; +#endif + default: + cp = NULL; + } + if (cp != NULL) + printf("nfsrv_cache_session: no session " + "IPaddr=%s\n", cp); + else + printf("nfsrv_cache_session: no session\n"); + free(buf, M_TEMP); + } m_freem(*m); return; } - nfsv4_seqsess_cacherep(slotid, sep->sess_slots, repstat, m); + nfsv4_seqsess_cacherep(nd->nd_slotid, sep->sess_slots, nd->nd_repstat, + m); NFSUNLOCKSESSION(shp); } From owner-svn-src-all@freebsd.org Tue Apr 21 05:00:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0464A2BF691; Tue, 21 Apr 2020 05:00:37 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495rx06MJlz3H7H; Tue, 21 Apr 2020 05:00:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB5CC2375E; Tue, 21 Apr 2020 05:00:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03L50a9c046075; Tue, 21 Apr 2020 05:00:36 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03L50a0O046072; Tue, 21 Apr 2020 05:00:36 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202004210500.03L50a0O046072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 21 Apr 2020 05:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360142 - in stable/11/sys/fs: nfs nfsserver X-SVN-Group: stable-11 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in stable/11/sys/fs: nfs nfsserver X-SVN-Commit-Revision: 360142 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 05:00:37 -0000 Author: rmacklem Date: Tue Apr 21 05:00:35 2020 New Revision: 360142 URL: https://svnweb.freebsd.org/changeset/base/360142 Log: MFC: r359679 Fix noisy NFSv4 server printf. Peter reported that his dmesg was getting cluttered with nfsrv_cache_session: no session messages when he rebooted his NFS server and they did not seem useful. He was correct, in that these messages are "normal" and expected when NFSv4.1 or NFSv4.2 are mounted and the server is rebooted. This patch silences the printf() during the grace period after a reboot. It also adds the client IP address to the printf(), so that the message is more useful if/when it occurs. If this happens outside of the server's grace period, it does indicate something is not working correctly. Instead of adding yet another nd_XXX argument, the arguments for nfsrv_cache_session() were simplified to take a "struct nfsrv_descript *". Modified: stable/11/sys/fs/nfs/nfs_var.h stable/11/sys/fs/nfsserver/nfs_nfsdkrpc.c stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/11/sys/fs/nfs/nfs_var.h Tue Apr 21 04:47:42 2020 (r360141) +++ stable/11/sys/fs/nfs/nfs_var.h Tue Apr 21 05:00:35 2020 (r360142) @@ -136,7 +136,7 @@ void nfsrv_throwawayallstate(NFSPROC_T *); int nfsrv_checksequence(struct nfsrv_descript *, uint32_t, uint32_t *, uint32_t *, int, uint32_t *, NFSPROC_T *); int nfsrv_checkreclaimcomplete(struct nfsrv_descript *, int); -void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **); +void nfsrv_cache_session(struct nfsrv_descript *, struct mbuf **); void nfsrv_freeallbackchannel_xprts(void); /* nfs_nfsdserv.c */ Modified: stable/11/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- stable/11/sys/fs/nfsserver/nfs_nfsdkrpc.c Tue Apr 21 04:47:42 2020 (r360141) +++ stable/11/sys/fs/nfsserver/nfs_nfsdkrpc.c Tue Apr 21 05:00:35 2020 (r360142) @@ -387,8 +387,7 @@ nfs_proc(struct nfsrv_descript *nd, u_int32_t xid, SVC } else m = NULL; if ((nd->nd_flag & ND_HASSEQUENCE) != 0) - nfsrv_cache_session(nd->nd_sessionid, - nd->nd_slotid, nd->nd_repstat, &m); + nfsrv_cache_session(nd, &m); if (nd->nd_repstat == NFSERR_REPLYFROMCACHE) nd->nd_repstat = 0; cacherep = RC_REPLY; Modified: stable/11/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Tue Apr 21 04:47:42 2020 (r360141) +++ stable/11/sys/fs/nfsserver/nfs_nfsdstate.c Tue Apr 21 05:00:35 2020 (r360142) @@ -6156,22 +6156,56 @@ nfsrv_checkreclaimcomplete(struct nfsrv_descript *nd, * Cache the reply in a session slot. */ void -nfsrv_cache_session(uint8_t *sessionid, uint32_t slotid, int repstat, - struct mbuf **m) +nfsrv_cache_session(struct nfsrv_descript *nd, struct mbuf **m) { struct nfsdsession *sep; struct nfssessionhash *shp; + char *buf, *cp; +#ifdef INET + struct sockaddr_in *sin; +#endif +#ifdef INET6 + struct sockaddr_in6 *sin6; +#endif - shp = NFSSESSIONHASH(sessionid); + shp = NFSSESSIONHASH(nd->nd_sessionid); NFSLOCKSESSION(shp); - sep = nfsrv_findsession(sessionid); + sep = nfsrv_findsession(nd->nd_sessionid); if (sep == NULL) { NFSUNLOCKSESSION(shp); - printf("nfsrv_cache_session: no session\n"); + if ((nfsrv_stablefirst.nsf_flags & NFSNSF_GRACEOVER) != 0) { + buf = malloc(INET6_ADDRSTRLEN, M_TEMP, M_WAITOK); + switch (nd->nd_nam->sa_family) { +#ifdef INET + case AF_INET: + sin = (struct sockaddr_in *)nd->nd_nam; + cp = inet_ntop(sin->sin_family, + &sin->sin_addr.s_addr, buf, + INET6_ADDRSTRLEN); + break; +#endif +#ifdef INET6 + case AF_INET6: + sin6 = (struct sockaddr_in6 *)nd->nd_nam; + cp = inet_ntop(sin6->sin6_family, + &sin6->sin6_addr, buf, INET6_ADDRSTRLEN); + break; +#endif + default: + cp = NULL; + } + if (cp != NULL) + printf("nfsrv_cache_session: no session " + "IPaddr=%s\n", cp); + else + printf("nfsrv_cache_session: no session\n"); + free(buf, M_TEMP); + } m_freem(*m); return; } - nfsv4_seqsess_cacherep(slotid, sep->sess_slots, repstat, m); + nfsv4_seqsess_cacherep(nd->nd_slotid, sep->sess_slots, nd->nd_repstat, + m); NFSUNLOCKSESSION(shp); } From owner-svn-src-all@freebsd.org Tue Apr 21 08:15:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CEBBC2C4216; Tue, 21 Apr 2020 08:15:06 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 495xFQ51m9z3yKD; Tue, 21 Apr 2020 08:15:06 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 8DBD211DC6; Tue, 21 Apr 2020 08:15:06 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 1A4571972E; Tue, 21 Apr 2020 10:15:04 +0200 (CEST) From: "Kristof Provost" To: "Kyle Evans" Cc: "Eric van Gyzen" , "Shawn Webb" , "Ronald Klop" , svn-src-head , svn-src-all , src-committers Subject: Re: svn commit: r360068 - in head/sys: kern net sys Date: Tue, 21 Apr 2020 10:15:03 +0200 X-Mailer: MailMate (1.13.1r5671) Message-ID: In-Reply-To: References: <202004180750.03I7oUK6032898@repo.freebsd.org> <67B55A62-848B-4876-8367-DE0D32A8B7D4@FreeBSD.org> <20200419142327.nhotyboqubk3vl2l@mutt-hbsd> <523895fb-7f30-c4ce-78a7-d16b2ff4954c@vangyzen.net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 08:15:06 -0000 On 21 Apr 2020, at 4:34, Kyle Evans wrote: > On Mon, Apr 20, 2020 at 9:14 PM Kyle Evans wrote: >> >> On Mon, Apr 20, 2020 at 8:15 PM Eric van Gyzen >> wrote: >>> >>>>>>> + sz = asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, if_name(ifp), >>>>>>> + jailname); >>>>>>> + if (sz < 0) { >>>>>>> + /* Fall back to a random mac address. */ >>>>>> >>>>>> >>>>>> I was wondering if it would be valuable to give this fall back >>>>>> something >>>>>> like: >>>>>> >>>>>> printf("%s: unable to create fixed mac address; using >>>>>> random >>>>>> mac address", if_name(ifp)); >>>>>> >>>>>> This will only be printed in rare circumstances. But in that case >>>>>> will >>>>>> provide valuable information. >>>>>> >>>>> That would potentially be valuable, yes. On the other hand, we >>>>> traditionally >>>>> don???t sprinkle a lot of printf()s around in the kernel. This is >>>>> extremely >>>>> unlikely to happen, and if it does odds are attaching the >>>>> interface will >>>>> fail at an earlier or later point, you may struggle to pass >>>>> packets and run >>>>> into any number of other issues. >>>>> It???s also possible to diagnose absent the printf(), because the >>>>> MAC >>>>> address will be locally administered rather than within the >>>>> FreeBSD OUI. >>>>> >>>>> So, in short: not a bad idea. You can argue it both ways, and I >>>>> find myself >>>>> (weakly) on the opposite side. >>>> >>>> Would displaying the message only when verbose boot mode is enabled >>>> be >>>> a suitable compromise? >>> >>> We could completely avoid the problems of dynamic allocation by >>> calling >>> SHA1Update three times, feeding each piece of data separately. >>> >>> For bonus points, use a single char[] to save stack space, too. >>> Maybe >>> use a union, for legibility, and to ensure the proper size without >>> ugly >>> assertions. >>> >> >> To be honest, I'd be more inclined to just revert this part of it and >> push it all back onto the stack. It's still < 512 bytes and pretty >> much always called in short paths because it's generally only used >> during initial creation of some ifnet; I found the concern about the >> stack usage here, specifically, a bit dubious in the first place, and >> this follow-up hasn't left me enjoying it any further. >> > > Sorry, to clarify: I'm also pretty much OK with SHA1Update 3x if I'm > alone in the "don't really care about this particular stack usage" > camp, but I've found it useful that they're currently joined into a > single buffer as I've had occasion to dump it in the past to confirm > my understanding of the pedigree of the output, in case of, e.g., > generated conflicts. For what it’s worth, I’m in your camp: a few hundred bytes of stack use doesn’t matter much here. Straightforward code is more important. Best regards, Kristof From owner-svn-src-all@freebsd.org Tue Apr 21 13:05:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C79FB2CCD47; Tue, 21 Apr 2020 13:05:45 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4963hn3QSjz4HbL; Tue, 21 Apr 2020 13:05:45 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 706A515C8; Tue, 21 Apr 2020 13:05:45 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LD5jgZ045438; Tue, 21 Apr 2020 13:05:45 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LD5im9045434; Tue, 21 Apr 2020 13:05:44 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202004211305.03LD5im9045434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Tue, 21 Apr 2020 13:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360143 - in head/sys/netinet: . tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: in head/sys/netinet: . tcp_stacks X-SVN-Commit-Revision: 360143 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 13:05:45 -0000 Author: rscheff Date: Tue Apr 21 13:05:44 2020 New Revision: 360143 URL: https://svnweb.freebsd.org/changeset/base/360143 Log: Correctly set up the initial TCP congestion window in all cases, by adjust snd_una right after the connection initialization, to include the one byte in sequence space occupied by the SYN bit. This does not change the regular ACK processing, while making the BYTES_THIS_ACK macro to work properly. PR: 235256 Reviewed by: tuexen (mentor), rgrimes (mentor) Approved by: tuexen (mentor), rgrimes (mentor) MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D19000 Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_stacks/bbr.c head/sys/netinet/tcp_stacks/rack.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Tue Apr 21 05:00:35 2020 (r360142) +++ head/sys/netinet/tcp_input.c Tue Apr 21 13:05:44 2020 (r360143) @@ -2374,12 +2374,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru if (IS_FASTOPEN(tp->t_flags) && tp->t_tfo_pending) { tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; - - /* - * Account for the ACK of our SYN prior to - * regular ACK processing below. - */ - tp->snd_una++; } if (tp->t_flags & TF_NEEDFIN) { tcp_state_change(tp, TCPS_FIN_WAIT_1); @@ -2399,6 +2393,12 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru cc_conn_init(tp); tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp)); } + if (SEQ_GT(th->th_ack, tp->snd_una)) + /* + * Account for the ACK of our SYN prior to + * regular ACK processing below. + */ + tp->snd_una++; /* * If segment contains data or ACK, will call tcp_reass() * later; if not, do so now to pass queued data to user. Modified: head/sys/netinet/tcp_stacks/bbr.c ============================================================================== --- head/sys/netinet/tcp_stacks/bbr.c Tue Apr 21 05:00:35 2020 (r360142) +++ head/sys/netinet/tcp_stacks/bbr.c Tue Apr 21 13:05:44 2020 (r360143) @@ -9325,11 +9325,6 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, str tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; - /* - * Account for the ACK of our SYN prior to regular - * ACK processing below. - */ - tp->snd_una++; } /* * Make transitions: SYN-RECEIVED -> ESTABLISHED SYN-RECEIVED* -> @@ -9352,6 +9347,12 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, str if (!IS_FASTOPEN(tp->t_flags)) cc_conn_init(tp); } + if (SEQ_GT(th->th_ack, tp->snd_una)) + /* + * Account for the ACK of our SYN prior to + * regular ACK processing below. + */ + tp->snd_una++; /* * If segment contains data or ACK, will call tcp_reass() later; if * not, do so now to pass queued data to user. Modified: head/sys/netinet/tcp_stacks/rack.c ============================================================================== --- head/sys/netinet/tcp_stacks/rack.c Tue Apr 21 05:00:35 2020 (r360142) +++ head/sys/netinet/tcp_stacks/rack.c Tue Apr 21 13:05:44 2020 (r360143) @@ -6539,12 +6539,6 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, st if (IS_FASTOPEN(tp->t_flags) && tp->t_tfo_pending) { tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; - - /* - * Account for the ACK of our SYN prior to - * regular ACK processing below. - */ - tp->snd_una++; } if (tp->t_flags & TF_NEEDFIN) { tcp_state_change(tp, TCPS_FIN_WAIT_1); @@ -6562,6 +6556,12 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, st if (!IS_FASTOPEN(tp->t_flags)) cc_conn_init(tp); } + if (SEQ_GT(th->th_ack, tp->snd_una)) + /* + * Account for the ACK of our SYN prior to + * regular ACK processing below. + */ + tp->snd_una++; /* * If segment contains data or ACK, will call tcp_reass() later; if * not, do so now to pass queued data to user. From owner-svn-src-all@freebsd.org Tue Apr 21 13:30:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FBB62CDBAA; Tue, 21 Apr 2020 13:30:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4964Dm6lHxz4K7s; Tue, 21 Apr 2020 13:30:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E251D19E5; Tue, 21 Apr 2020 13:30:00 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LDU0hp057368; Tue, 21 Apr 2020 13:30:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LDU0Lc057367; Tue, 21 Apr 2020 13:30:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004211330.03LDU0Lc057367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 21 Apr 2020 13:30:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360144 - head/contrib/blacklist/bin X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/blacklist/bin X-SVN-Commit-Revision: 360144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 13:30:01 -0000 Author: emaste Date: Tue Apr 21 13:30:00 2020 New Revision: 360144 URL: https://svnweb.freebsd.org/changeset/base/360144 Log: blacklistd.8: fix db file path PR: 245781 Submitted by: Jose Luis Duran MFC after: 3 days Modified: head/contrib/blacklist/bin/blacklistd.8 Modified: head/contrib/blacklist/bin/blacklistd.8 ============================================================================== --- head/contrib/blacklist/bin/blacklistd.8 Tue Apr 21 13:05:44 2020 (r360143) +++ head/contrib/blacklist/bin/blacklistd.8 Tue Apr 21 13:30:00 2020 (r360144) @@ -153,7 +153,7 @@ The name of the configuration file to read, usually The Berkeley DB file where .Nm stores its state, usually -.Pa /var/run/blacklistd.db . +.Pa /var/db/blacklistd.db . .It Fl d Normally, .Nm From owner-svn-src-all@freebsd.org Tue Apr 21 13:57:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 71A232CEB1F; Tue, 21 Apr 2020 13:57:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4964rw2SWLz4MGB; Tue, 21 Apr 2020 13:57:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FC021FC8; Tue, 21 Apr 2020 13:57:52 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LDvqZv075890; Tue, 21 Apr 2020 13:57:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LDvqQU075889; Tue, 21 Apr 2020 13:57:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202004211357.03LDvqQU075889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 21 Apr 2020 13:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360145 - head/sys/fs/autofs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/fs/autofs X-SVN-Commit-Revision: 360145 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 13:57:52 -0000 Author: trasz Date: Tue Apr 21 13:57:51 2020 New Revision: 360145 URL: https://svnweb.freebsd.org/changeset/base/360145 Log: Silence down a warning which should really be a debug message. MFC after: 2 weeks Sponsored by: DARPA Modified: head/sys/fs/autofs/autofs_vfsops.c Modified: head/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- head/sys/fs/autofs/autofs_vfsops.c Tue Apr 21 13:30:00 2020 (r360144) +++ head/sys/fs/autofs/autofs_vfsops.c Tue Apr 21 13:57:51 2020 (r360145) @@ -128,7 +128,7 @@ autofs_unmount(struct mount *mp, int mntflags) flags |= FORCECLOSE; error = vflush(mp, 0, flags, curthread); if (error != 0) { - AUTOFS_WARN("vflush failed with error %d", error); + AUTOFS_DEBUG("vflush failed with error %d", error); return (error); } From owner-svn-src-all@freebsd.org Tue Apr 21 14:45:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07F5D2CFC73; Tue, 21 Apr 2020 14:45:42 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4965w51g3Mz4Pkj; Tue, 21 Apr 2020 14:45:40 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-qk1-x72b.google.com with SMTP id o19so14717955qkk.5; Tue, 21 Apr 2020 07:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZtWx6jir9qPkrzXEpQH3ipg4q1oEna2RBKihM6AoO/4=; b=JM8BbBg4g8n6vBZBieBRC8REKWLD/UL5r5U8HQ0/IR26Z/wDUxCPkx1tLzcwJ63RqM lDqo0I9gFlMMhTHtKswq0egPQmp38Hhvq0EQfy/YVWfRmH+NQJojlZrCMWdO3yPpFoRg iZQgReFmjvzMAGBtTLyCE4Y1CYJXUwL5ChWElwPOR4lJOXUjRxxU3PtyWyJaeK8VRUl1 65DrTaX8JWreK/vTrPgr3mxgXJqER45kQyO0vFGdtA1B7nLsjOZup/6oWkHDhFIZrmAK BfP3rUQmVF+TrqpwJjvu2oltJIEUwAST75i3ks6nNXpiE1WT9+d2SDPUfaoOA8VcBuT2 uYKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZtWx6jir9qPkrzXEpQH3ipg4q1oEna2RBKihM6AoO/4=; b=VZergGbICBSS1EHjyRwgP0TXcPPLhgTzESRCyqIeYAmI4ruSaXBV1oTmQG6P7tLkdo vC+FjCSOTDFsFbZuwYliChAT9Qr2jzTSe2LY1lxuOJahmZk42N9H/1VDzQ+u9y8R2xIt 50JSB7nAz2tTig5HtadfvrZnm0If3Mh7TxKufTduZQVnr8MhjxMxsRhhAFCgAbPTfGah mF2cNRL9aCgSFj6UwWIY8Ux0nS4lRBcPgHnfGaX6O7MmlSAknTIBn/ZBPLQAdvuUmEEp +4CH8tRnWZnTVEbnSWXy9HGrWw1smU1AkX50PSdw+tGkbPre4MAfjIoWJTJobOq0gw7i 6OAQ== X-Gm-Message-State: AGi0PuZa7KgbyEum8NuPSH7Q/IzmuRJ3t0fnCzhImGZsh2wsr6jcapwp OAugYQGNaEmveKBdYtC5HzeLwKLaTV6BGQ== X-Google-Smtp-Source: APiQypKTUU8KHeJxjAv4iIyLCQ9UzozdNKJUKB9W334Q9uZJs0pjZbximKsXiAPzwyBm0NzsBRj5pw== X-Received: by 2002:a37:9d8c:: with SMTP id g134mr22542153qke.307.1587480340153; Tue, 21 Apr 2020 07:45:40 -0700 (PDT) Received: from titan.knownspace (173-19-125-130.client.mchsi.com. [173.19.125.130]) by smtp.gmail.com with ESMTPSA id b42sm1907759qta.29.2020.04.21.07.45.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 07:45:39 -0700 (PDT) Date: Tue, 21 Apr 2020 09:45:37 -0500 From: Justin Hibbits To: Vladimir Kondratyev Cc: Niclas Zeising , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r360126 - head/sys/dev/evdev Message-ID: <20200421094537.1e26836e@titan.knownspace> In-Reply-To: <9e1f8218-916d-82cb-348f-326fc651115d@kondratyev.su> References: <202004201617.03KGHHj7074077@repo.freebsd.org> <20200420113957.50d41308@titan.knownspace> <9e1f8218-916d-82cb-348f-326fc651115d@kondratyev.su> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4965w51g3Mz4Pkj X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=JM8BbBg4; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of chmeeedalf@gmail.com designates 2607:f8b0:4864:20::72b as permitted sender) smtp.mailfrom=chmeeedalf@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RECEIVED_SPAMHAUS_PBL(0.00)[130.125.19.173.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (-9.32), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[b.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 14:45:42 -0000 On Mon, 20 Apr 2020 22:13:51 +0300 Vladimir Kondratyev wrote: > On 20.04.2020 19:39, Justin Hibbits wrote: > > But I'm curious, why not attach to sysmouse(4) and kbdmux(4)? What > > breakage does that cause? I could maybe see not attaching to > > sysmouse(4) by default, if the protocol isn't expressive enough, but > > kbdmux(4) should be sufficient. > > > > - Justin > > kbdmux(4) is pretty good for standard 102-104-keys keyboards found at > common desktops. > > But it does not work that good with some laptop ones. > > There are no "Flight mode on/off", "Touchpad on/off" e.t.c. events > defined in AT-keyset but they exist in evdev-keyset. > > Unfortunately, we do not support keymap uploading in our drivers yet > to make utilization of this advantage easy > > but IMO its better to switch to direct key-event reporting earlier > rather than later. > Thanks for that explanation. I tried thinking of any way these capabilities could be added to kbdmux, but they really are keyboard specific events, so wouldn't belong in kbdmux anyway. I'd be interested in adding the necessary capabilities to adb(4), to remove this special casing. I have a PowerBook G4 Ti to use for such a task. - Justin From owner-svn-src-all@freebsd.org Tue Apr 21 15:44:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45E822A92B8; Tue, 21 Apr 2020 15:44:21 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4967Cn1964z4T1Y; Tue, 21 Apr 2020 15:44:21 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2313736DD; Tue, 21 Apr 2020 15:44:21 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LFiLr3043176; Tue, 21 Apr 2020 15:44:21 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LFiLV2043175; Tue, 21 Apr 2020 15:44:21 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <202004211544.03LFiLV2043175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Tue, 21 Apr 2020 15:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360146 - head/crypto/openssl/ssl X-SVN-Group: head X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: head/crypto/openssl/ssl X-SVN-Commit-Revision: 360146 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 15:44:21 -0000 Author: gordon Date: Tue Apr 21 15:44:20 2020 New Revision: 360146 URL: https://svnweb.freebsd.org/changeset/base/360146 Log: Fix OpenSSL remote denial of service. See https://www.openssl.org/news/secadv/20200421.txt for details. Approved by: so Security: CVE-2020-1967 Modified: head/crypto/openssl/ssl/t1_lib.c Modified: head/crypto/openssl/ssl/t1_lib.c ============================================================================== --- head/crypto/openssl/ssl/t1_lib.c Tue Apr 21 13:57:51 2020 (r360145) +++ head/crypto/openssl/ssl/t1_lib.c Tue Apr 21 15:44:20 2020 (r360146) @@ -2130,7 +2130,7 @@ static int tls1_check_sig_alg(SSL *s, X509 *x, int def sigalg = use_pc_sigalgs ? tls1_lookup_sigalg(s->s3->tmp.peer_cert_sigalgs[i]) : s->shared_sigalgs[i]; - if (sig_nid == sigalg->sigandhash) + if (sigalg != NULL && sig_nid == sigalg->sigandhash) return 1; } return 0; From owner-svn-src-all@freebsd.org Tue Apr 21 15:47:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 857F42A9377; Tue, 21 Apr 2020 15:47:59 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4967Hz2ybBz4T99; Tue, 21 Apr 2020 15:47:59 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60D4936E8; Tue, 21 Apr 2020 15:47:59 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LFlxUD043385; Tue, 21 Apr 2020 15:47:59 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LFlxbS043384; Tue, 21 Apr 2020 15:47:59 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <202004211547.03LFlxbS043384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Tue, 21 Apr 2020 15:47:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360147 - stable/12/crypto/openssl/ssl X-SVN-Group: stable-12 X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: stable/12/crypto/openssl/ssl X-SVN-Commit-Revision: 360147 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 15:47:59 -0000 Author: gordon Date: Tue Apr 21 15:47:58 2020 New Revision: 360147 URL: https://svnweb.freebsd.org/changeset/base/360147 Log: MFC: r360146 Fix OpenSSL remote denial of service. See https://www.openssl.org/news/secadv/20200421.txt for details. Approved by: so Security: FreeBSD-SA-20:11.openssl Security: CVE-2020-1967 Modified: stable/12/crypto/openssl/ssl/t1_lib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/openssl/ssl/t1_lib.c ============================================================================== --- stable/12/crypto/openssl/ssl/t1_lib.c Tue Apr 21 15:44:20 2020 (r360146) +++ stable/12/crypto/openssl/ssl/t1_lib.c Tue Apr 21 15:47:58 2020 (r360147) @@ -2130,7 +2130,7 @@ static int tls1_check_sig_alg(SSL *s, X509 *x, int def sigalg = use_pc_sigalgs ? tls1_lookup_sigalg(s->s3->tmp.peer_cert_sigalgs[i]) : s->shared_sigalgs[i]; - if (sig_nid == sigalg->sigandhash) + if (sigalg != NULL && sig_nid == sigalg->sigandhash) return 1; } return 0; From owner-svn-src-all@freebsd.org Tue Apr 21 15:50:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6824C2A9509; Tue, 21 Apr 2020 15:50:58 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4967MQ24xgz4Tbk; Tue, 21 Apr 2020 15:50:58 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42CA73727; Tue, 21 Apr 2020 15:50:58 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LFowsc046155; Tue, 21 Apr 2020 15:50:58 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LFovIJ046153; Tue, 21 Apr 2020 15:50:57 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <202004211550.03LFovIJ046153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Tue, 21 Apr 2020 15:50:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r360148 - in releng: 11.3/usr.bin/quota 12.1/usr.bin/quota X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 11.3/usr.bin/quota 12.1/usr.bin/quota X-SVN-Commit-Revision: 360148 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 15:50:58 -0000 Author: gordon Date: Tue Apr 21 15:50:57 2020 New Revision: 360148 URL: https://svnweb.freebsd.org/changeset/base/360148 Log: Fix regression in rpc.rquotad with certain NFS servers. Approved by: so Security: FreeBSD-EN-20:07.quotad Modified: releng/11.3/usr.bin/quota/quota.c releng/12.1/usr.bin/quota/quota.c Modified: releng/11.3/usr.bin/quota/quota.c ============================================================================== --- releng/11.3/usr.bin/quota/quota.c Tue Apr 21 15:47:58 2020 (r360147) +++ releng/11.3/usr.bin/quota/quota.c Tue Apr 21 15:50:57 2020 (r360148) @@ -604,7 +604,7 @@ getnfsquota(struct statfs *fst, struct quotause *qup, call_stat = callaurpc(host, RQUOTAPROG, EXT_RQUOTAVERS, RQUOTAPROC_GETQUOTA, (xdrproc_t)xdr_ext_getquota_args, (char *)&gq_args, (xdrproc_t)xdr_getquota_rslt, (char *)&gq_rslt); - if (call_stat == RPC_PROGVERSMISMATCH) { + if (call_stat == RPC_PROGVERSMISMATCH || call_stat == RPC_PROGNOTREGISTERED) { if (quotatype == USRQUOTA) { old_gq_args.gqa_pathp = cp + 1; old_gq_args.gqa_uid = id; Modified: releng/12.1/usr.bin/quota/quota.c ============================================================================== --- releng/12.1/usr.bin/quota/quota.c Tue Apr 21 15:47:58 2020 (r360147) +++ releng/12.1/usr.bin/quota/quota.c Tue Apr 21 15:50:57 2020 (r360148) @@ -606,7 +606,7 @@ getnfsquota(struct statfs *fst, struct quotause *qup, call_stat = callaurpc(host, RQUOTAPROG, EXT_RQUOTAVERS, RQUOTAPROC_GETQUOTA, (xdrproc_t)xdr_ext_getquota_args, (char *)&gq_args, (xdrproc_t)xdr_getquota_rslt, (char *)&gq_rslt); - if (call_stat == RPC_PROGVERSMISMATCH) { + if (call_stat == RPC_PROGVERSMISMATCH || call_stat == RPC_PROGNOTREGISTERED) { if (quotatype == USRQUOTA) { old_gq_args.gqa_pathp = cp + 1; old_gq_args.gqa_uid = id; From owner-svn-src-all@freebsd.org Tue Apr 21 15:52:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A69192A9B3D; Tue, 21 Apr 2020 15:52:23 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4967P32PK4z4V2b; Tue, 21 Apr 2020 15:52:23 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CE8E38D6; Tue, 21 Apr 2020 15:52:23 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LFqNsn049319; Tue, 21 Apr 2020 15:52:23 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LFqMtY049317; Tue, 21 Apr 2020 15:52:22 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <202004211552.03LFqMtY049317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Tue, 21 Apr 2020 15:52:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r360149 - in releng: 11.3/sys/netpfil/ipfw 12.1/sys/netpfil/ipfw X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 11.3/sys/netpfil/ipfw 12.1/sys/netpfil/ipfw X-SVN-Commit-Revision: 360149 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 15:52:23 -0000 Author: gordon Date: Tue Apr 21 15:52:22 2020 New Revision: 360149 URL: https://svnweb.freebsd.org/changeset/base/360149 Log: Fix ipfw invalid mbuf handling. Approved by: so Security: FreeBSD-SA-20:10.ipfw Security: CVE-2019-5614 Security: CVE-2019-15874 Modified: releng/11.3/sys/netpfil/ipfw/ip_fw2.c releng/12.1/sys/netpfil/ipfw/ip_fw2.c Modified: releng/11.3/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- releng/11.3/sys/netpfil/ipfw/ip_fw2.c Tue Apr 21 15:50:57 2020 (r360148) +++ releng/11.3/sys/netpfil/ipfw/ip_fw2.c Tue Apr 21 15:52:22 2020 (r360149) @@ -328,53 +328,74 @@ ipopts_match(struct ip *ip, ipfw_insn *cmd) return (flags_match(cmd, bits)); } +/* + * Parse TCP options. The logic copied from tcp_dooptions(). + */ static int -tcpopts_match(struct tcphdr *tcp, ipfw_insn *cmd) +tcpopts_parse(const struct tcphdr *tcp, uint16_t *mss) { + const u_char *cp = (const u_char *)(tcp + 1); int optlen, bits = 0; - u_char *cp = (u_char *)(tcp + 1); - int x = (tcp->th_off << 2) - sizeof(struct tcphdr); + int cnt = (tcp->th_off << 2) - sizeof(struct tcphdr); - for (; x > 0; x -= optlen, cp += optlen) { + for (; cnt > 0; cnt -= optlen, cp += optlen) { int opt = cp[0]; if (opt == TCPOPT_EOL) break; if (opt == TCPOPT_NOP) optlen = 1; else { + if (cnt < 2) + break; optlen = cp[1]; - if (optlen <= 0) + if (optlen < 2 || optlen > cnt) break; } switch (opt) { - default: break; case TCPOPT_MAXSEG: + if (optlen != TCPOLEN_MAXSEG) + break; bits |= IP_FW_TCPOPT_MSS; + if (mss != NULL) + *mss = be16dec(cp + 2); break; case TCPOPT_WINDOW: - bits |= IP_FW_TCPOPT_WINDOW; + if (optlen == TCPOLEN_WINDOW) + bits |= IP_FW_TCPOPT_WINDOW; break; case TCPOPT_SACK_PERMITTED: + if (optlen == TCPOLEN_SACK_PERMITTED) + bits |= IP_FW_TCPOPT_SACK; + break; + case TCPOPT_SACK: - bits |= IP_FW_TCPOPT_SACK; + if (optlen > 2 && (optlen - 2) % TCPOLEN_SACK == 0) + bits |= IP_FW_TCPOPT_SACK; break; case TCPOPT_TIMESTAMP: - bits |= IP_FW_TCPOPT_TS; + if (optlen == TCPOLEN_TIMESTAMP) + bits |= IP_FW_TCPOPT_TS; break; - } } - return (flags_match(cmd, bits)); + return (bits); } static int +tcpopts_match(struct tcphdr *tcp, ipfw_insn *cmd) +{ + + return (flags_match(cmd, tcpopts_parse(tcp, NULL))); +} + +static int iface_match(struct ifnet *ifp, ipfw_insn_if *cmd, struct ip_fw_chain *chain, uint32_t *tablearg) { @@ -1419,17 +1440,31 @@ ipfw_chk(struct ip_fw_args *args) * this way). */ #define PULLUP_TO(_len, p, T) PULLUP_LEN(_len, p, sizeof(T)) -#define PULLUP_LEN(_len, p, T) \ +#define _PULLUP_LOCKED(_len, p, T, unlock) \ do { \ int x = (_len) + T; \ if ((m)->m_len < x) { \ args->m = m = m_pullup(m, x); \ - if (m == NULL) \ + if (m == NULL) { \ + unlock; \ goto pullup_failed; \ + } \ } \ p = (mtod(m, char *) + (_len)); \ } while (0) +#define PULLUP_LEN(_len, p, T) _PULLUP_LOCKED(_len, p, T, ) +#define PULLUP_LEN_LOCKED(_len, p, T) \ + _PULLUP_LOCKED(_len, p, T, IPFW_PF_RUNLOCK(chain)); \ + UPDATE_POINTERS() +/* + * In case pointers got stale after pullups, update them. + */ +#define UPDATE_POINTERS() \ +do { \ + ip = mtod(m, struct ip *); \ +} while (0) + /* * if we have an ether header, */ @@ -2255,7 +2290,7 @@ do { \ case O_TCPOPTS: if (proto == IPPROTO_TCP && offset == 0 && ulp){ - PULLUP_LEN(hlen, ulp, + PULLUP_LEN_LOCKED(hlen, ulp, (TCP(ulp)->th_off << 2)); match = tcpopts_match(TCP(ulp), cmd); } @@ -3106,6 +3141,7 @@ do { \ } /* end of inner loop, scan opcodes */ #undef PULLUP_LEN +#undef PULLUP_LEN_LOCKED if (done) break; Modified: releng/12.1/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- releng/12.1/sys/netpfil/ipfw/ip_fw2.c Tue Apr 21 15:50:57 2020 (r360148) +++ releng/12.1/sys/netpfil/ipfw/ip_fw2.c Tue Apr 21 15:52:22 2020 (r360149) @@ -330,22 +330,27 @@ ipopts_match(struct ip *ip, ipfw_insn *cmd) return (flags_match(cmd, bits)); } +/* + * Parse TCP options. The logic copied from tcp_dooptions(). + */ static int -tcpopts_parse(struct tcphdr *tcp, uint16_t *mss) +tcpopts_parse(const struct tcphdr *tcp, uint16_t *mss) { - u_char *cp = (u_char *)(tcp + 1); + const u_char *cp = (const u_char *)(tcp + 1); int optlen, bits = 0; - int x = (tcp->th_off << 2) - sizeof(struct tcphdr); + int cnt = (tcp->th_off << 2) - sizeof(struct tcphdr); - for (; x > 0; x -= optlen, cp += optlen) { + for (; cnt > 0; cnt -= optlen, cp += optlen) { int opt = cp[0]; if (opt == TCPOPT_EOL) break; if (opt == TCPOPT_NOP) optlen = 1; else { + if (cnt < 2) + break; optlen = cp[1]; - if (optlen <= 0) + if (optlen < 2 || optlen > cnt) break; } @@ -354,22 +359,31 @@ tcpopts_parse(struct tcphdr *tcp, uint16_t *mss) break; case TCPOPT_MAXSEG: + if (optlen != TCPOLEN_MAXSEG) + break; bits |= IP_FW_TCPOPT_MSS; if (mss != NULL) *mss = be16dec(cp + 2); break; case TCPOPT_WINDOW: - bits |= IP_FW_TCPOPT_WINDOW; + if (optlen == TCPOLEN_WINDOW) + bits |= IP_FW_TCPOPT_WINDOW; break; case TCPOPT_SACK_PERMITTED: + if (optlen == TCPOLEN_SACK_PERMITTED) + bits |= IP_FW_TCPOPT_SACK; + break; + case TCPOPT_SACK: - bits |= IP_FW_TCPOPT_SACK; + if (optlen > 2 && (optlen - 2) % TCPOLEN_SACK == 0) + bits |= IP_FW_TCPOPT_SACK; break; case TCPOPT_TIMESTAMP: - bits |= IP_FW_TCPOPT_TS; + if (optlen == TCPOLEN_TIMESTAMP) + bits |= IP_FW_TCPOPT_TS; break; } } @@ -1427,18 +1441,32 @@ ipfw_chk(struct ip_fw_args *args) * pointer might become stale after other pullups (but we never use it * this way). */ -#define PULLUP_TO(_len, p, T) PULLUP_LEN(_len, p, sizeof(T)) -#define PULLUP_LEN(_len, p, T) \ +#define PULLUP_TO(_len, p, T) PULLUP_LEN(_len, p, sizeof(T)) +#define _PULLUP_LOCKED(_len, p, T, unlock) \ do { \ int x = (_len) + T; \ if ((m)->m_len < x) { \ args->m = m = m_pullup(m, x); \ - if (m == NULL) \ + if (m == NULL) { \ + unlock; \ goto pullup_failed; \ + } \ } \ p = (mtod(m, char *) + (_len)); \ } while (0) +#define PULLUP_LEN(_len, p, T) _PULLUP_LOCKED(_len, p, T, ) +#define PULLUP_LEN_LOCKED(_len, p, T) \ + _PULLUP_LOCKED(_len, p, T, IPFW_PF_RUNLOCK(chain)); \ + UPDATE_POINTERS() +/* + * In case pointers got stale after pullups, update them. + */ +#define UPDATE_POINTERS() \ +do { \ + ip = mtod(m, struct ip *); \ +} while (0) + /* * if we have an ether header, */ @@ -2269,7 +2297,7 @@ do { \ case O_TCPOPTS: if (proto == IPPROTO_TCP && offset == 0 && ulp){ - PULLUP_LEN(hlen, ulp, + PULLUP_LEN_LOCKED(hlen, ulp, (TCP(ulp)->th_off << 2)); match = tcpopts_match(TCP(ulp), cmd); } @@ -2294,7 +2322,7 @@ do { \ uint16_t mss, *p; int i; - PULLUP_LEN(hlen, ulp, + PULLUP_LEN_LOCKED(hlen, ulp, (TCP(ulp)->th_off << 2)); if ((tcpopts_parse(TCP(ulp), &mss) & IP_FW_TCPOPT_MSS) == 0) @@ -3145,6 +3173,7 @@ do { \ } /* end of inner loop, scan opcodes */ #undef PULLUP_LEN +#undef PULLUP_LEN_LOCKED if (done) break; From owner-svn-src-all@freebsd.org Tue Apr 21 15:53:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB38B2A9CBA; Tue, 21 Apr 2020 15:53:08 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4967Pw4gmVz4VJp; Tue, 21 Apr 2020 15:53:08 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BCD038EA; Tue, 21 Apr 2020 15:53:08 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LFr8vK049401; Tue, 21 Apr 2020 15:53:08 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LFr8iC049400; Tue, 21 Apr 2020 15:53:08 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <202004211553.03LFr8iC049400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Tue, 21 Apr 2020 15:53:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r360150 - releng/12.1/crypto/openssl/ssl X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: releng/12.1/crypto/openssl/ssl X-SVN-Commit-Revision: 360150 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 15:53:08 -0000 Author: gordon Date: Tue Apr 21 15:53:08 2020 New Revision: 360150 URL: https://svnweb.freebsd.org/changeset/base/360150 Log: Fix OpenSSL remote denial of service vulnerability. Approved by: so Security: FreeBSD-SA-20:11.openssl Security: CVE-2020-1967 Modified: releng/12.1/crypto/openssl/ssl/t1_lib.c Modified: releng/12.1/crypto/openssl/ssl/t1_lib.c ============================================================================== --- releng/12.1/crypto/openssl/ssl/t1_lib.c Tue Apr 21 15:52:22 2020 (r360149) +++ releng/12.1/crypto/openssl/ssl/t1_lib.c Tue Apr 21 15:53:08 2020 (r360150) @@ -2099,7 +2099,7 @@ static int tls1_check_sig_alg(SSL *s, X509 *x, int def sigalg = use_pc_sigalgs ? tls1_lookup_sigalg(s->s3->tmp.peer_cert_sigalgs[i]) : s->shared_sigalgs[i]; - if (sig_nid == sigalg->sigandhash) + if (sigalg != NULL && sig_nid == sigalg->sigandhash) return 1; } return 0; From owner-svn-src-all@freebsd.org Tue Apr 21 15:54:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D77542A9DA0; Tue, 21 Apr 2020 15:54:09 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4967R55PBCz4VRQ; Tue, 21 Apr 2020 15:54:09 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BD3738F1; Tue, 21 Apr 2020 15:54:09 +0000 (UTC) (envelope-from gordon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LFs9xO049490; Tue, 21 Apr 2020 15:54:09 GMT (envelope-from gordon@FreeBSD.org) Received: (from gordon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LFs8SK049487; Tue, 21 Apr 2020 15:54:08 GMT (envelope-from gordon@FreeBSD.org) Message-Id: <202004211554.03LFs8SK049487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gordon set sender to gordon@FreeBSD.org using -f From: Gordon Tetlow Date: Tue, 21 Apr 2020 15:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r360151 - in releng: 11.3 11.3/sys/conf 12.1 12.1/sys/conf X-SVN-Group: releng X-SVN-Commit-Author: gordon X-SVN-Commit-Paths: in releng: 11.3 11.3/sys/conf 12.1 12.1/sys/conf X-SVN-Commit-Revision: 360151 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 15:54:09 -0000 Author: gordon Date: Tue Apr 21 15:54:08 2020 New Revision: 360151 URL: https://svnweb.freebsd.org/changeset/base/360151 Log: Add UPDATING entries and bump version. Approved by: so Modified: releng/11.3/UPDATING releng/11.3/sys/conf/newvers.sh releng/12.1/UPDATING releng/12.1/sys/conf/newvers.sh Modified: releng/11.3/UPDATING ============================================================================== --- releng/11.3/UPDATING Tue Apr 21 15:53:08 2020 (r360150) +++ releng/11.3/UPDATING Tue Apr 21 15:54:08 2020 (r360151) @@ -16,6 +16,13 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20200421 p8 FreeBSD-EN-20:07.quotad + FreeBSD-SA-20:10.ipfw + + Fix regression in rpc.rquotad with certain NFS servers [EN-20:07.quotad] + + Fix ipfw invalid mbuf handling [SA-20:10.ipfw] + 20200319 p7 FreeBSD-EN-20:04.pfctl FreeBSD-EN-20:06.ipv6 FreeBSD-SA-20:04.tcp Modified: releng/11.3/sys/conf/newvers.sh ============================================================================== --- releng/11.3/sys/conf/newvers.sh Tue Apr 21 15:53:08 2020 (r360150) +++ releng/11.3/sys/conf/newvers.sh Tue Apr 21 15:54:08 2020 (r360151) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.3" -BRANCH="RELEASE-p7" +BRANCH="RELEASE-p8" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/12.1/UPDATING ============================================================================== --- releng/12.1/UPDATING Tue Apr 21 15:53:08 2020 (r360150) +++ releng/12.1/UPDATING Tue Apr 21 15:54:08 2020 (r360151) @@ -16,6 +16,16 @@ from older versions of FreeBSD, try WITHOUT_CLANG and the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20200421 p4 FreeBSD-EN-20:07.quotad + FreeBSD-SA-20:10.ipfw + FreeBSD-SA-20:11.openssl + + Fix regression in rpc.rquotad with certain NFS servers [EN-20:07.quotad] + + Fix ipfw invalid mbuf handling [SA-20:10.ipfw] + + Fix OpenSSL remote denial of service vulnerability [SA-20:11.openssl] + 20200319 p3 FreeBSD-EN-20:03.sshd FreeBSD-EN-20:05.mlx5en FreeBSD-EN-20:06.ipv6 Modified: releng/12.1/sys/conf/newvers.sh ============================================================================== --- releng/12.1/sys/conf/newvers.sh Tue Apr 21 15:53:08 2020 (r360150) +++ releng/12.1/sys/conf/newvers.sh Tue Apr 21 15:54:08 2020 (r360151) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.1" -BRANCH="RELEASE-p3" +BRANCH="RELEASE-p4" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Tue Apr 21 15:55:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCB602A9E24; Tue, 21 Apr 2020 15:55:08 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4967SD4QQzz4VYm; Tue, 21 Apr 2020 15:55:08 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92F4D38F3; Tue, 21 Apr 2020 15:55:08 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LFt8Gc049621; Tue, 21 Apr 2020 15:55:08 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LFt87u049620; Tue, 21 Apr 2020 15:55:08 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202004211555.03LFt87u049620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Tue, 21 Apr 2020 15:55:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360152 - head/tests/sys/kqueue/libkqueue X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/tests/sys/kqueue/libkqueue X-SVN-Commit-Revision: 360152 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 15:55:08 -0000 Author: arichardson Date: Tue Apr 21 15:55:08 2020 New Revision: 360152 URL: https://svnweb.freebsd.org/changeset/base/360152 Log: Remove extern from function declarations in common.h Suggested by: cem Modified: head/tests/sys/kqueue/libkqueue/common.h Modified: head/tests/sys/kqueue/libkqueue/common.h ============================================================================== --- head/tests/sys/kqueue/libkqueue/common.h Tue Apr 21 15:54:08 2020 (r360151) +++ head/tests/sys/kqueue/libkqueue/common.h Tue Apr 21 15:55:08 2020 (r360152) @@ -43,7 +43,7 @@ extern int vnode_fd; extern int kqfd; -extern char * kevent_to_str(struct kevent *); +char * kevent_to_str(struct kevent *); struct kevent * kevent_get(int); struct kevent * kevent_get_timeout(int, int); @@ -70,19 +70,19 @@ kevent_add(int kqfd, struct kevent *kev, } while (0); /* Checks if any events are pending, which is an error. */ -extern void test_no_kevents(void); -extern void test_no_kevents_quietly(void); +void test_no_kevents(void); +void test_no_kevents_quietly(void); -extern void test_begin(const char *); -extern void success(void); +void test_begin(const char *); +void success(void); -extern void test_evfilt_read(void); -extern void test_evfilt_signal(void); -extern void test_evfilt_vnode(void); -extern void test_evfilt_timer(void); -extern void test_evfilt_proc(void); +void test_evfilt_read(void); +void test_evfilt_signal(void); +void test_evfilt_vnode(void); +void test_evfilt_timer(void); +void test_evfilt_proc(void); #if HAVE_EVFILT_USER -extern void test_evfilt_user(void); +void test_evfilt_user(void); #endif #endif /* _COMMON_H */ From owner-svn-src-all@freebsd.org Tue Apr 21 15:55:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B5702A9E7D; Tue, 21 Apr 2020 15:55:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4967Sd2JJ9z4Vgn; Tue, 21 Apr 2020 15:55:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30A3638F4; Tue, 21 Apr 2020 15:55:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LFtTIv049682; Tue, 21 Apr 2020 15:55:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LFtT4P049681; Tue, 21 Apr 2020 15:55:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004211555.03LFtT4P049681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 21 Apr 2020 15:55:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360153 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 360153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 15:55:29 -0000 Author: markj Date: Tue Apr 21 15:55:28 2020 New Revision: 360153 URL: https://svnweb.freebsd.org/changeset/base/360153 Log: Minimize conditional compilation for handling of M_EXEC. This simplifies some planned changes. No functional change intended. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24474 Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Tue Apr 21 15:55:08 2020 (r360152) +++ head/sys/vm/vm_kern.c Tue Apr 21 15:55:28 2020 (r360153) @@ -402,14 +402,10 @@ kmem_malloc_domain(int domain, vm_size_t size, int fla vm_offset_t addr; int rv; -#if VM_NRESERVLEVEL > 0 if (__predict_true((flags & M_EXEC) == 0)) arena = vm_dom[domain].vmd_kernel_arena; else arena = vm_dom[domain].vmd_kernel_rwx_arena; -#else - arena = vm_dom[domain].vmd_kernel_arena; -#endif size = round_page(size); if (vmem_alloc(arena, size, flags | M_BESTFIT, &addr)) return (0); @@ -501,10 +497,8 @@ retry: vm_page_valid(m); pmap_enter(kernel_pmap, addr + i, m, prot, prot | PMAP_ENTER_WIRED, 0); -#if VM_NRESERVLEVEL > 0 if (__predict_false((prot & VM_PROT_EXECUTE) != 0)) m->oflags |= VPO_KMEM_EXEC; -#endif } VM_OBJECT_WUNLOCK(object); @@ -578,14 +572,10 @@ _kmem_unback(vm_object_t object, vm_offset_t addr, vm_ VM_OBJECT_WLOCK(object); m = vm_page_lookup(object, atop(offset)); domain = vm_phys_domain(m); -#if VM_NRESERVLEVEL > 0 if (__predict_true((m->oflags & VPO_KMEM_EXEC) == 0)) arena = vm_dom[domain].vmd_kernel_arena; else arena = vm_dom[domain].vmd_kernel_rwx_arena; -#else - arena = vm_dom[domain].vmd_kernel_arena; -#endif for (; offset < end; offset += PAGE_SIZE, m = next) { next = vm_page_next(m); vm_page_xbusy_claim(m); @@ -814,6 +804,9 @@ kmem_init(vm_offset_t start, vm_offset_t end) vmem_set_import(vm_dom[domain].vmd_kernel_rwx_arena, kva_import_domain, (vmem_release_t *)vmem_xfree, kernel_arena, KVA_QUANTUM); +#else + vm_dom[domain].vmd_kernel_rwx_arena = + vm_dom[domain].vmd_kernel_arena; #endif } From owner-svn-src-all@freebsd.org Tue Apr 21 16:01:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9628A2AA325; Tue, 21 Apr 2020 16:01:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4967br3VnGz4W2x; Tue, 21 Apr 2020 16:01:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F873396B; Tue, 21 Apr 2020 16:01:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LG1iuD052529; Tue, 21 Apr 2020 16:01:44 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LG1ig3052528; Tue, 21 Apr 2020 16:01:44 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004211601.03LG1ig3052528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 21 Apr 2020 16:01:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360154 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 360154 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 16:01:44 -0000 Author: markj Date: Tue Apr 21 16:01:44 2020 New Revision: 360154 URL: https://svnweb.freebsd.org/changeset/base/360154 Log: Factor out the kmem contig page alloc and reclamation code. kmem_alloc_attr_domain() and kmem_alloc_contig_domain() duplicated each other's page allocation and reclamation logic. Place it in a single function to make it easier to add additional consumers. No functional change intended. Reviewed by: jeff, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24475 Modified: head/sys/vm/vm_kern.c Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Tue Apr 21 15:55:28 2020 (r360153) +++ head/sys/vm/vm_kern.c Tue Apr 21 16:01:44 2020 (r360154) @@ -169,6 +169,35 @@ kva_free(vm_offset_t addr, vm_size_t size) vmem_free(kernel_arena, addr, size); } +static vm_page_t +kmem_alloc_contig_pages(vm_object_t object, vm_pindex_t pindex, int domain, + int pflags, u_long npages, vm_paddr_t low, vm_paddr_t high, + u_long alignment, vm_paddr_t boundary, vm_memattr_t memattr) +{ + vm_page_t m; + int tries; + bool wait; + + VM_OBJECT_ASSERT_WLOCKED(object); + + wait = (pflags & VM_ALLOC_WAITOK) != 0; + pflags &= ~(VM_ALLOC_NOWAIT | VM_ALLOC_WAITOK | VM_ALLOC_WAITFAIL); + pflags |= VM_ALLOC_NOWAIT; + for (tries = wait ? 3 : 1;; tries--) { + m = vm_page_alloc_contig_domain(object, pindex, domain, pflags, + npages, low, high, alignment, boundary, memattr); + if (m != NULL || tries == 0) + break; + + VM_OBJECT_WUNLOCK(object); + if (!vm_page_reclaim_contig_domain(domain, pflags, npages, + low, high, alignment, boundary) && wait) + vm_wait_domain(domain); + VM_OBJECT_WLOCK(object); + } + return (m); +} + /* * Allocates a region from the kernel address map and physical pages * within the specified address range to the kernel object. Creates a @@ -182,38 +211,26 @@ kmem_alloc_attr_domain(int domain, vm_size_t size, int vm_paddr_t high, vm_memattr_t memattr) { vmem_t *vmem; - vm_object_t object = kernel_object; + vm_object_t object; vm_offset_t addr, i, offset; vm_page_t m; - int pflags, tries; + int pflags; vm_prot_t prot; + object = kernel_object; size = round_page(size); vmem = vm_dom[domain].vmd_kernel_arena; if (vmem_alloc(vmem, size, M_BESTFIT | flags, &addr)) return (0); offset = addr - VM_MIN_KERNEL_ADDRESS; pflags = malloc2vm_flags(flags) | VM_ALLOC_WIRED; - pflags &= ~(VM_ALLOC_NOWAIT | VM_ALLOC_WAITOK | VM_ALLOC_WAITFAIL); - pflags |= VM_ALLOC_NOWAIT; prot = (flags & M_EXEC) != 0 ? VM_PROT_ALL : VM_PROT_RW; VM_OBJECT_WLOCK(object); for (i = 0; i < size; i += PAGE_SIZE) { - tries = 0; -retry: - m = vm_page_alloc_contig_domain(object, atop(offset + i), + m = kmem_alloc_contig_pages(object, atop(offset + i), domain, pflags, 1, low, high, PAGE_SIZE, 0, memattr); if (m == NULL) { VM_OBJECT_WUNLOCK(object); - if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { - if (!vm_page_reclaim_contig_domain(domain, - pflags, 1, low, high, PAGE_SIZE, 0) && - (flags & M_WAITOK) != 0) - vm_wait_domain(domain); - VM_OBJECT_WLOCK(object); - tries++; - goto retry; - } kmem_unback(object, addr, i); vmem_free(vmem, addr, size); return (0); @@ -273,37 +290,25 @@ kmem_alloc_contig_domain(int domain, vm_size_t size, i vm_memattr_t memattr) { vmem_t *vmem; - vm_object_t object = kernel_object; + vm_object_t object; vm_offset_t addr, offset, tmp; vm_page_t end_m, m; u_long npages; - int pflags, tries; - + int pflags; + + object = kernel_object; size = round_page(size); vmem = vm_dom[domain].vmd_kernel_arena; if (vmem_alloc(vmem, size, flags | M_BESTFIT, &addr)) return (0); offset = addr - VM_MIN_KERNEL_ADDRESS; pflags = malloc2vm_flags(flags) | VM_ALLOC_WIRED; - pflags &= ~(VM_ALLOC_NOWAIT | VM_ALLOC_WAITOK | VM_ALLOC_WAITFAIL); - pflags |= VM_ALLOC_NOWAIT; npages = atop(size); VM_OBJECT_WLOCK(object); - tries = 0; -retry: - m = vm_page_alloc_contig_domain(object, atop(offset), domain, pflags, - npages, low, high, alignment, boundary, memattr); + m = kmem_alloc_contig_pages(object, atop(offset), domain, + pflags, npages, low, high, alignment, boundary, memattr); if (m == NULL) { VM_OBJECT_WUNLOCK(object); - if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { - if (!vm_page_reclaim_contig_domain(domain, pflags, - npages, low, high, alignment, boundary) && - (flags & M_WAITOK) != 0) - vm_wait_domain(domain); - VM_OBJECT_WLOCK(object); - tries++; - goto retry; - } vmem_free(vmem, addr, size); return (0); } From owner-svn-src-all@freebsd.org Tue Apr 21 16:13:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F09D2AA897; Tue, 21 Apr 2020 16:13:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4967sH1LyYz4X15; Tue, 21 Apr 2020 16:13:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 29BA43D52; Tue, 21 Apr 2020 16:13:23 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LGDMNl062522; Tue, 21 Apr 2020 16:13:22 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LGDMoV062521; Tue, 21 Apr 2020 16:13:22 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004211613.03LGDMoV062521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 21 Apr 2020 16:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360155 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 360155 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 16:13:23 -0000 Author: kevans Date: Tue Apr 21 16:13:22 2020 New Revision: 360155 URL: https://svnweb.freebsd.org/changeset/base/360155 Log: kevent32: fix the split of data into data1/data2 The current situation results in intermittent breakage if data gets split up with the sign bit set on the data1 half of it, as PAIR32TO64 will then: data1 | (data2 << 32) -> resulting in data1 getting sign-extended when it's implicitly widened and clobbering the result. AFAICT, there's no compelling reason for these to be signed. This was most exposed by flakiness in the kqueue timer tests under compat32 after the ABSTIME test got switched over to using a better clock and microseconds. Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D24518 Modified: head/sys/sys/event.h Modified: head/sys/sys/event.h ============================================================================== --- head/sys/sys/event.h Tue Apr 21 16:01:44 2020 (r360154) +++ head/sys/sys/event.h Tue Apr 21 16:13:22 2020 (r360155) @@ -111,7 +111,7 @@ struct kevent32 { #ifndef __amd64__ uint32_t pad0; #endif - int32_t data1, data2; + uint32_t data1, data2; uint32_t udata; /* opaque user data identifier */ #ifndef __amd64__ uint32_t pad1; From owner-svn-src-all@freebsd.org Tue Apr 21 16:52:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B38E2AB942; Tue, 21 Apr 2020 16:52:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4968kx2QXGz4Z50; Tue, 21 Apr 2020 16:52:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E5654576; Tue, 21 Apr 2020 16:52:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LGqvuJ087088; Tue, 21 Apr 2020 16:52:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LGqv3l087087; Tue, 21 Apr 2020 16:52:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004211652.03LGqv3l087087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 21 Apr 2020 16:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360156 - stable/12/sys/dev/ipmi X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/ipmi X-SVN-Commit-Revision: 360156 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 16:52:57 -0000 Author: mav Date: Tue Apr 21 16:52:56 2020 New Revision: 360156 URL: https://svnweb.freebsd.org/changeset/base/360156 Log: MFC r348996 (by jtl): The current IPMI KCS code is waiting 100us for all transitions (roughly between each byte either sent or received). However, most transitions actually complete in 2-3 microseconds. By polling the status register with a delay of 4us with exponential backoff, the performance of most IPMI operations is significantly improved: - A BMC update on a Supermicro x9 or x11 motherboard goes from ~1 hour to ~6-8 minutes. - An ipmitool sensor list time improves by a factor of 4. Testing showed no significant improvements on a modern server by using a lower delay. The changes should also generally reduce the total amount of CPU or I/O bandwidth used for a given IPMI operation. Modified: stable/12/sys/dev/ipmi/ipmi_kcs.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ipmi/ipmi_kcs.c ============================================================================== --- stable/12/sys/dev/ipmi/ipmi_kcs.c Tue Apr 21 16:13:22 2020 (r360155) +++ stable/12/sys/dev/ipmi/ipmi_kcs.c Tue Apr 21 16:52:56 2020 (r360156) @@ -48,55 +48,46 @@ __FBSDID("$FreeBSD$"); #include #endif +#define POLLING_DELAY_MIN 4 /* Waits are 2-3 usecs on typical systems */ +#define POLLING_DELAY_MAX 256 + static void kcs_clear_obf(struct ipmi_softc *, int); static void kcs_error(struct ipmi_softc *); -static int kcs_wait_for_ibf(struct ipmi_softc *, int); -static int kcs_wait_for_obf(struct ipmi_softc *, int); +static int kcs_wait_for_ibf(struct ipmi_softc *, bool); +static int kcs_wait_for_obf(struct ipmi_softc *, bool); static int -kcs_wait_for_ibf(struct ipmi_softc *sc, int state) +kcs_wait(struct ipmi_softc *sc, int value, int mask) { int status, start = ticks; + int delay_usec = POLLING_DELAY_MIN; status = INB(sc, KCS_CTL_STS); - if (state == 0) { - /* WAIT FOR IBF = 0 */ - while (ticks - start < MAX_TIMEOUT && status & KCS_STATUS_IBF) { - DELAY(100); - status = INB(sc, KCS_CTL_STS); - } - } else { - /* WAIT FOR IBF = 1 */ - while (ticks - start < MAX_TIMEOUT && - !(status & KCS_STATUS_IBF)) { - DELAY(100); - status = INB(sc, KCS_CTL_STS); - } + while (ticks - start < MAX_TIMEOUT && (status & mask) != value) { + /* + * The wait delay is increased exponentially to avoid putting + * significant load on I/O bus. + */ + DELAY(delay_usec); + status = INB(sc, KCS_CTL_STS); + if (delay_usec < POLLING_DELAY_MAX) + delay_usec *= 2; } return (status); } static int -kcs_wait_for_obf(struct ipmi_softc *sc, int state) +kcs_wait_for_ibf(struct ipmi_softc *sc, bool level) { - int status, start = ticks; - status = INB(sc, KCS_CTL_STS); - if (state == 0) { - /* WAIT FOR OBF = 0 */ - while (ticks - start < MAX_TIMEOUT && status & KCS_STATUS_OBF) { - DELAY(100); - status = INB(sc, KCS_CTL_STS); - } - } else { - /* WAIT FOR OBF = 1 */ - while (ticks - start < MAX_TIMEOUT && - !(status & KCS_STATUS_OBF)) { - DELAY(100); - status = INB(sc, KCS_CTL_STS); - } - } - return (status); + return (kcs_wait(sc, level ? KCS_STATUS_IBF : 0, KCS_STATUS_IBF)); +} + +static int +kcs_wait_for_obf(struct ipmi_softc *sc, bool level) +{ + + return (kcs_wait(sc, level ? KCS_STATUS_OBF : 0, KCS_STATUS_OBF)); } static void From owner-svn-src-all@freebsd.org Tue Apr 21 16:57:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40DBB2ACADF; Tue, 21 Apr 2020 16:57:20 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4968qx6Wvmz4bcC; Tue, 21 Apr 2020 16:57:17 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E5134581; Tue, 21 Apr 2020 16:57:16 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LGvGYA087454; Tue, 21 Apr 2020 16:57:16 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LGvGhj087453; Tue, 21 Apr 2020 16:57:16 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202004211657.03LGvGhj087453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 21 Apr 2020 16:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r360157 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: cy X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 360157 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 16:57:20 -0000 Author: cy Date: Tue Apr 21 16:57:15 2020 New Revision: 360157 URL: https://svnweb.freebsd.org/changeset/base/360157 Log: Sizelimit for sqlite3-3.31.1 (3310100) import. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Tue Apr 21 16:52:56 2020 (r360156) +++ svnadmin/conf/sizelimit.conf Tue Apr 21 16:57:15 2020 (r360157) @@ -16,6 +16,7 @@ # First field is username, second field is the raised limit required. achim bapt +cy davidcs dim 20480000 imp From owner-svn-src-all@freebsd.org Tue Apr 21 16:58:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3189E2AD439; Tue, 21 Apr 2020 16:58:37 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4968sS5SYBz4cKW; Tue, 21 Apr 2020 16:58:36 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0F984583; Tue, 21 Apr 2020 16:58:36 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LGwa21087552; Tue, 21 Apr 2020 16:58:36 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LGwK7a087537; Tue, 21 Apr 2020 16:58:20 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202004211658.03LGwK7a087537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 21 Apr 2020 16:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r360158 - in vendor/sqlite3/dist: . tea X-SVN-Group: vendor X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in vendor/sqlite3/dist: . tea X-SVN-Commit-Revision: 360158 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 16:58:37 -0000 Author: cy Date: Tue Apr 21 16:58:19 2020 New Revision: 360158 URL: https://svnweb.freebsd.org/changeset/base/360158 Log: Import sqlite3-3.31.1 (3310100) Modified: vendor/sqlite3/dist/configure vendor/sqlite3/dist/configure.ac vendor/sqlite3/dist/sqlite3.c vendor/sqlite3/dist/sqlite3.h vendor/sqlite3/dist/sqlite3ext.h vendor/sqlite3/dist/tea/configure vendor/sqlite3/dist/tea/configure.ac Modified: vendor/sqlite3/dist/configure ============================================================================== --- vendor/sqlite3/dist/configure Tue Apr 21 16:57:15 2020 (r360157) +++ vendor/sqlite3/dist/configure Tue Apr 21 16:58:19 2020 (r360158) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.31.0. +# Generated by GNU Autoconf 2.69 for sqlite 3.31.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.31.0' -PACKAGE_STRING='sqlite 3.31.0' +PACKAGE_VERSION='3.31.1' +PACKAGE_STRING='sqlite 3.31.1' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.31.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.31.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1412,7 +1412,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.31.0:";; + short | recursive ) echo "Configuration of sqlite 3.31.1:";; esac cat <<\_ACEOF @@ -1537,7 +1537,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.31.0 +sqlite configure 3.31.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.31.0, which was +It was created by sqlite $as_me 3.31.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2818,7 +2818,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.31.0' + VERSION='3.31.1' cat >>confdefs.h <<_ACEOF @@ -14438,7 +14438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.31.0, which was +This file was extended by sqlite $as_me 3.31.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14495,7 +14495,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.31.0 +sqlite config.status 3.31.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/sqlite3/dist/configure.ac ============================================================================== --- vendor/sqlite3/dist/configure.ac Tue Apr 21 16:57:15 2020 (r360157) +++ vendor/sqlite3/dist/configure.ac Tue Apr 21 16:58:19 2020 (r360158) @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.31.0, http://www.sqlite.org) +AC_INIT(sqlite, 3.31.1, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) Modified: vendor/sqlite3/dist/sqlite3.c ============================================================================== --- vendor/sqlite3/dist/sqlite3.c Tue Apr 21 16:57:15 2020 (r360157) +++ vendor/sqlite3/dist/sqlite3.c Tue Apr 21 16:58:19 2020 (r360158) @@ -1,6 +1,6 @@ /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.31.0. By combining all the individual C code files into this +** version 3.31.1. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a single translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -1165,9 +1165,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.31.0" -#define SQLITE_VERSION_NUMBER 3031000 -#define SQLITE_SOURCE_ID "2020-01-22 18:38:59 f6affdd41608946fcfcea914ece149038a8b25a62bbe719ed2561c649b86d824" +#define SQLITE_VERSION "3.31.1" +#define SQLITE_VERSION_NUMBER 3031001 +#define SQLITE_SOURCE_ID "2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837bb4d6" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -56233,30 +56233,48 @@ SQLITE_PRIVATE int sqlite3PagerOpen( ** Database file handle (pVfs->szOsFile bytes) ** Sub-journal file handle (journalFileSize bytes) ** Main journal file handle (journalFileSize bytes) - ** \0\1\0 journal prefix (3 bytes) - ** Journal filename (nPathname+8+1 bytes) - ** \2\0 WAL prefix (2 bytes) - ** WAL filename (nPathname+4+1 bytes) - ** \3\0 database prefix (2 bytes) + ** \0\0\0\0 database prefix (4 bytes) ** Database file name (nPathname+1 bytes) ** URI query parameters (nUriByte bytes) - ** \0\0 terminator (2 bytes) + ** Journal filename (nPathname+8+1 bytes) + ** WAL filename (nPathname+4+1 bytes) + ** \0\0\0 terminator (3 bytes) + ** + ** Some 3rd-party software, over which we have no control, depends on + ** the specific order of the filenames and the \0 separators between them + ** so that it can (for example) find the database filename given the WAL + ** filename without using the sqlite3_filename_database() API. This is a + ** misuse of SQLite and a bug in the 3rd-party software, but the 3rd-party + ** software is in widespread use, so we try to avoid changing the filename + ** order and formatting if possible. In particular, the details of the + ** filename format expected by 3rd-party software should be as follows: + ** + ** - Main Database Path + ** - \0 + ** - Multiple URI components consisting of: + ** - Key + ** - \0 + ** - Value + ** - \0 + ** - \0 + ** - Journal Path + ** - \0 + ** - WAL Path (zWALName) + ** - \0 */ pPtr = (u8 *)sqlite3MallocZero( ROUND8(sizeof(*pPager)) + /* Pager structure */ ROUND8(pcacheSize) + /* PCache object */ ROUND8(pVfs->szOsFile) + /* The main db file */ journalFileSize * 2 + /* The two journal files */ - 3 + /* Journal prefix */ + 4 + /* Database prefix */ + nPathname + 1 + /* database filename */ + nUriByte + /* query parameters */ nPathname + 8 + 1 + /* Journal filename */ #ifndef SQLITE_OMIT_WAL - 2 + /* WAL prefix */ nPathname + 4 + 1 + /* WAL filename */ #endif - 2 + /* Database prefix */ - nPathname + 1 + /* database filename */ - nUriByte + /* query parameters */ - 2 /* Terminator */ + 3 /* Terminator */ ); assert( EIGHT_BYTE_ALIGNMENT(SQLITE_INT_TO_PTR(journalFileSize)) ); if( !pPtr ){ @@ -56270,9 +56288,20 @@ SQLITE_PRIVATE int sqlite3PagerOpen( pPager->jfd = (sqlite3_file*)pPtr; pPtr += journalFileSize; assert( EIGHT_BYTE_ALIGNMENT(pPager->jfd) ); + /* Fill in the Pager.zFilename and pPager.zQueryParam fields */ + pPtr += 4; /* Skip zero prefix */ + pPager->zFilename = (char*)pPtr; + if( nPathname>0 ){ + memcpy(pPtr, zPathname, nPathname); pPtr += nPathname + 1; + if( zUri ){ + memcpy(pPtr, zUri, nUriByte); pPtr += nUriByte; + }else{ + pPtr++; + } + } + /* Fill in Pager.zJournal */ - pPtr[1] = '\001'; pPtr += 3; if( nPathname>0 ){ pPager->zJournal = (char*)pPtr; memcpy(pPtr, zPathname, nPathname); pPtr += nPathname; @@ -56283,12 +56312,10 @@ SQLITE_PRIVATE int sqlite3PagerOpen( #endif }else{ pPager->zJournal = 0; - pPtr++; } #ifndef SQLITE_OMIT_WAL /* Fill in Pager.zWal */ - pPtr[0] = '\002'; pPtr[1] = 0; pPtr += 2; if( nPathname>0 ){ pPager->zWal = (char*)pPtr; memcpy(pPtr, zPathname, nPathname); pPtr += nPathname; @@ -56299,21 +56326,9 @@ SQLITE_PRIVATE int sqlite3PagerOpen( #endif }else{ pPager->zWal = 0; - pPtr++; } #endif - /* Fill in the Pager.zFilename and pPager.zQueryParam fields */ - pPtr[0] = '\003'; pPtr[1] = 0; pPtr += 2; - pPager->zFilename = (char*)pPtr; - if( nPathname>0 ){ - memcpy(pPtr, zPathname, nPathname); pPtr += nPathname + 1; - if( zUri ){ - memcpy(pPtr, zUri, nUriByte); /* pPtr += nUriByte; // not needed */ - } - /* Double-zero terminator implied by the sqlite3MallocZero */ - } - if( nPathname ) sqlite3DbFree(0, zPathname); pPager->pVfs = pVfs; pPager->vfsFlags = vfsFlags; @@ -58433,8 +58448,8 @@ SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager ** sqlite3_uri_parameter() and sqlite3_filename_database() and friends. */ SQLITE_PRIVATE const char *sqlite3PagerFilename(const Pager *pPager, int nullIfMemDb){ - static const char zFake[] = { 0x00, 0x01, 0x00, 0x00, 0x00 }; - return (nullIfMemDb && pPager->memDb) ? &zFake[3] : pPager->zFilename; + static const char zFake[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + return (nullIfMemDb && pPager->memDb) ? &zFake[4] : pPager->zFilename; } /* @@ -117491,6 +117506,9 @@ SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3 *db, assert( !ExprHasProperty(pExpr, EP_xIsSelect) ); nExpr = pExpr->x.pList->nExpr; pDef = sqlite3FindFunction(db, pExpr->u.zToken, nExpr, SQLITE_UTF8, 0); +#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION + if( pDef==0 ) return 0; +#endif if( NEVER(pDef==0) || (pDef->funcFlags & SQLITE_FUNC_LIKE)==0 ){ return 0; } @@ -122767,11 +122785,11 @@ typedef int (*sqlite3_loadext_entry)( /* Version 3.26.0 and later */ #define sqlite3_normalized_sql sqlite3_api->normalized_sql /* Version 3.28.0 and later */ -#define sqlite3_stmt_isexplain sqlite3_api->isexplain -#define sqlite3_value_frombind sqlite3_api->frombind +#define sqlite3_stmt_isexplain sqlite3_api->stmt_isexplain +#define sqlite3_value_frombind sqlite3_api->value_frombind /* Version 3.30.0 and later */ #define sqlite3_drop_modules sqlite3_api->drop_modules -/* Version 3.31.0 andn later */ +/* Version 3.31.0 and later */ #define sqlite3_hard_heap_limit64 sqlite3_api->hard_heap_limit64 #define sqlite3_uri_key sqlite3_api->uri_key #define sqlite3_filename_database sqlite3_api->filename_database @@ -163283,6 +163301,21 @@ SQLITE_API int sqlite3_test_control(int op, ...){ } /* +** The Pager stores the Database filename, Journal filename, and WAL filename +** consecutively in memory, in that order. The database filename is prefixed +** by four zero bytes. Locate the start of the database filename by searching +** backwards for the first byte following four consecutive zero bytes. +** +** This only works if the filename passed in was obtained from the Pager. +*/ +static const char *databaseName(const char *zName){ + while( zName[-1]!=0 || zName[-2]!=0 || zName[-3]!=0 || zName[-4]!=0 ){ + zName--; + } + return zName; +} + +/* ** This is a utility routine, useful to VFS implementations, that checks ** to see if a database file was a URI that contained a specific query ** parameter, and if so obtains the value of the query parameter. @@ -163295,6 +163328,7 @@ SQLITE_API int sqlite3_test_control(int op, ...){ */ SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam){ if( zFilename==0 || zParam==0 ) return 0; + zFilename = databaseName(zFilename); zFilename += sqlite3Strlen30(zFilename) + 1; while( zFilename[0] ){ int x = strcmp(zFilename, zParam); @@ -163310,6 +163344,7 @@ SQLITE_API const char *sqlite3_uri_parameter(const cha */ SQLITE_API const char *sqlite3_uri_key(const char *zFilename, int N){ if( zFilename==0 || N<0 ) return 0; + zFilename = databaseName(zFilename); zFilename += sqlite3Strlen30(zFilename) + 1; while( zFilename[0] && (N--)>0 ){ zFilename += sqlite3Strlen30(zFilename) + 1; @@ -163344,25 +163379,6 @@ SQLITE_API sqlite3_int64 sqlite3_uri_int64( } /* -** The Pager stores the Journal filename, WAL filename, and Database filename -** consecutively in memory, in that order, with prefixes \000\001\000, -** \002\000, and \003\000, in that order. Thus the three names look like query -** parameters if you start at the first prefix. -** -** This routine backs up a filename to the start of the first prefix. -** -** This only works if the filenamed passed in was obtained from the Pager. -*/ -static const char *startOfNameList(const char *zName){ - while( zName[0]!='\001' || zName[1]!=0 ){ - zName -= 3; - while( zName[0]!='\000' ){ zName--; } - zName++; - } - return zName-1; -} - -/* ** Translate a filename that was handed to a VFS routine into the corresponding ** database, journal, or WAL file. ** @@ -163373,14 +163389,26 @@ static const char *startOfNameList(const char *zName){ ** corruption. */ SQLITE_API const char *sqlite3_filename_database(const char *zFilename){ + return databaseName(zFilename); return sqlite3_uri_parameter(zFilename - 3, "\003"); } SQLITE_API const char *sqlite3_filename_journal(const char *zFilename){ - const char *z = sqlite3_uri_parameter(startOfNameList(zFilename), "\001"); - return ALWAYS(z) && z[0] ? z : 0; + zFilename = databaseName(zFilename); + zFilename += sqlite3Strlen30(zFilename) + 1; + while( zFilename[0] ){ + zFilename += sqlite3Strlen30(zFilename) + 1; + zFilename += sqlite3Strlen30(zFilename) + 1; + } + return zFilename + 1; } SQLITE_API const char *sqlite3_filename_wal(const char *zFilename){ - return sqlite3_uri_parameter(startOfNameList(zFilename), "\002"); +#ifdef SQLITE_OMIT_WAL + return 0; +#else + zFilename = sqlite3_filename_journal(zFilename); + zFilename += sqlite3Strlen30(zFilename) + 1; + return zFilename; +#endif } /* @@ -219999,8 +220027,8 @@ static int fts5QueryCksum( ** contain valid utf-8, return non-zero. */ static int fts5TestUtf8(const char *z, int n){ - assert_nc( n>0 ); int i = 0; + assert_nc( n>0 ); while( inormalized_sql /* Version 3.28.0 and later */ -#define sqlite3_stmt_isexplain sqlite3_api->isexplain -#define sqlite3_value_frombind sqlite3_api->frombind +#define sqlite3_stmt_isexplain sqlite3_api->stmt_isexplain +#define sqlite3_value_frombind sqlite3_api->value_frombind /* Version 3.30.0 and later */ #define sqlite3_drop_modules sqlite3_api->drop_modules -/* Version 3.31.0 andn later */ +/* Version 3.31.0 and later */ #define sqlite3_hard_heap_limit64 sqlite3_api->hard_heap_limit64 #define sqlite3_uri_key sqlite3_api->uri_key #define sqlite3_filename_database sqlite3_api->filename_database Modified: vendor/sqlite3/dist/tea/configure ============================================================================== --- vendor/sqlite3/dist/tea/configure Tue Apr 21 16:57:15 2020 (r360157) +++ vendor/sqlite3/dist/tea/configure Tue Apr 21 16:58:19 2020 (r360158) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.31.0. +# Generated by GNU Autoconf 2.69 for sqlite 3.31.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.31.0' -PACKAGE_STRING='sqlite 3.31.0' +PACKAGE_VERSION='3.31.1' +PACKAGE_STRING='sqlite 3.31.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1303,7 +1303,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.31.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.31.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1365,7 +1365,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.31.0:";; + short | recursive ) echo "Configuration of sqlite 3.31.1:";; esac cat <<\_ACEOF @@ -1467,7 +1467,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.31.0 +sqlite configure 3.31.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1878,7 +1878,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.31.0, which was +It was created by sqlite $as_me 3.31.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -9373,7 +9373,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.31.0, which was +This file was extended by sqlite $as_me 3.31.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9426,7 +9426,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.31.0 +sqlite config.status 3.31.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: vendor/sqlite3/dist/tea/configure.ac ============================================================================== --- vendor/sqlite3/dist/tea/configure.ac Tue Apr 21 16:57:15 2020 (r360157) +++ vendor/sqlite3/dist/tea/configure.ac Tue Apr 21 16:58:19 2020 (r360158) @@ -19,7 +19,7 @@ dnl to configure the system for the local environment. # so you can encode the package version directly into the source files. #----------------------------------------------------------------------- -AC_INIT([sqlite], [3.31.0]) +AC_INIT([sqlite], [3.31.1]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. From owner-svn-src-all@freebsd.org Tue Apr 21 17:01:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 147392AE785; Tue, 21 Apr 2020 17:01:13 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4968wS6shfz4dVQ; Tue, 21 Apr 2020 17:01:12 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBA8345BF; Tue, 21 Apr 2020 17:01:12 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LH1CYo089131; Tue, 21 Apr 2020 17:01:12 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LH1CWx089125; Tue, 21 Apr 2020 17:01:12 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202004211701.03LH1CWx089125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 21 Apr 2020 17:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r360159 - vendor/sqlite3/sqlite-3310100 X-SVN-Group: vendor X-SVN-Commit-Author: cy X-SVN-Commit-Paths: vendor/sqlite3/sqlite-3310100 X-SVN-Commit-Revision: 360159 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:01:13 -0000 Author: cy Date: Tue Apr 21 17:01:12 2020 New Revision: 360159 URL: https://svnweb.freebsd.org/changeset/base/360159 Log: Tag import of sqlite3-3.31.1 (3310100) Added: vendor/sqlite3/sqlite-3310100/ - copied from r360158, vendor/sqlite3/dist/ From owner-svn-src-all@freebsd.org Tue Apr 21 17:03:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0F1E2AF698; Tue, 21 Apr 2020 17:03:10 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4968yk3vqzz4f8K; Tue, 21 Apr 2020 17:03:10 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61B81475B; Tue, 21 Apr 2020 17:03:10 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LH3ABB093367; Tue, 21 Apr 2020 17:03:10 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LH3AaH093366; Tue, 21 Apr 2020 17:03:10 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202004211703.03LH3AaH093366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Tue, 21 Apr 2020 17:03:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r360160 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: cy X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 360160 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:03:11 -0000 Author: cy Date: Tue Apr 21 17:03:09 2020 New Revision: 360160 URL: https://svnweb.freebsd.org/changeset/base/360160 Log: sqlite3 import into the vendor branch is now complete. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Tue Apr 21 17:01:12 2020 (r360159) +++ svnadmin/conf/sizelimit.conf Tue Apr 21 17:03:09 2020 (r360160) @@ -16,7 +16,6 @@ # First field is username, second field is the raised limit required. achim bapt -cy davidcs dim 20480000 imp From owner-svn-src-all@freebsd.org Tue Apr 21 17:05:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F40C2B01E4; Tue, 21 Apr 2020 17:05:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49691G3Cb4z4fdq; Tue, 21 Apr 2020 17:05:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E003475E; Tue, 21 Apr 2020 17:05:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LH5M5W093567; Tue, 21 Apr 2020 17:05:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LH5Lbx093566; Tue, 21 Apr 2020 17:05:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202004211705.03LH5Lbx093566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 21 Apr 2020 17:05:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360161 - stable/11/release/doc/share/xml X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/share/xml X-SVN-Commit-Revision: 360161 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:05:22 -0000 Author: gjb Date: Tue Apr 21 17:05:21 2020 New Revision: 360161 URL: https://svnweb.freebsd.org/changeset/base/360161 Log: Document EN-20:07, SA-20:10. Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/11/release/doc/share/xml/errata.xml stable/11/release/doc/share/xml/security.xml Modified: stable/11/release/doc/share/xml/errata.xml ============================================================================== --- stable/11/release/doc/share/xml/errata.xml Tue Apr 21 17:03:09 2020 (r360160) +++ stable/11/release/doc/share/xml/errata.xml Tue Apr 21 17:05:21 2020 (r360161) @@ -83,6 +83,14 @@ 18 March 2020 Incorrect checksum calculations + + + FreeBSD-EN-20:07.quotad + 21 April 2020 + Regression with certain NFS + servers + Modified: stable/11/release/doc/share/xml/security.xml ============================================================================== --- stable/11/release/doc/share/xml/security.xml Tue Apr 21 17:03:09 2020 (r360160) +++ stable/11/release/doc/share/xml/security.xml Tue Apr 21 17:05:21 2020 (r360161) @@ -178,6 +178,13 @@ 18 March 2020 Multiple denial of service + + + FreeBSD-SA-20:10.ipfw + 21 April 2020 + Invalid &man.mbuf.9; handling + From owner-svn-src-all@freebsd.org Tue Apr 21 17:07:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7DB62B03CB; Tue, 21 Apr 2020 17:07:02 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49693B4gLyz4fvj; Tue, 21 Apr 2020 17:07:02 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B1D74764; Tue, 21 Apr 2020 17:07:02 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LH72hI093907; Tue, 21 Apr 2020 17:07:02 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LH72Mh093906; Tue, 21 Apr 2020 17:07:02 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202004211707.03LH72Mh093906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 21 Apr 2020 17:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360162 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 360162 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:07:02 -0000 Author: lwhsu Date: Tue Apr 21 17:07:02 2020 New Revision: 360162 URL: https://svnweb.freebsd.org/changeset/base/360162 Log: hwpstate_intel(4): small text tweaks The sysctl output looks like this: dev.hwpstate_intel.0.epp: 50 dev.hwpstate_intel.0.%parent: cpu0 dev.hwpstate_intel.0.%pnpinfo: dev.hwpstate_intel.0.%location: dev.hwpstate_intel.0.%driver: hwpstate_intel dev.hwpstate_intel.0.%desc: Intel Speed Shift but all the '%' got escaped in the manual page, un-escape them. While here: - Move the example of dev.hwpstate_intel.%d.%parent after the description to align with others. - Capitalize "CPU" (*) Submitted by: danfe (*) Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D24520 Modified: head/share/man/man4/hwpstate_intel.4 Modified: head/share/man/man4/hwpstate_intel.4 ============================================================================== --- head/share/man/man4/hwpstate_intel.4 Tue Apr 21 17:05:21 2020 (r360161) +++ head/share/man/man4/hwpstate_intel.4 Tue Apr 21 17:07:02 2020 (r360162) @@ -64,17 +64,17 @@ The following .Xr sysctl 8 values are available .Bl -tag -width indent -.It Va dev.hwpstate_intel.%d.\%desc +.It Va dev.hwpstate_intel.%d.%desc Describes the attached driver .It dev.hwpstate_intel.0.%desc: Intel Speed Shift -.It Va dev.hwpstate_intel.%d.\%driver +.It Va dev.hwpstate_intel.%d.%driver Driver in use, always hwpstate_intel. .It dev.hwpstate_intel.0.%driver: hwpstate_intel -.It Va dev.hwpstate_intel.%d.\%parent -.It dev.hwpstate_intel.0.%parent: cpu0 -The cpu that is exposing these frequencies. +.It Va dev.hwpstate_intel.%d.%parent +The CPU that is exposing these frequencies. For example .Va cpu0 . +.It dev.hwpstate_intel.0.%parent: cpu0 .It Va dev.hwpstate_intel.%d.epp Energy/Performance Preference. Valid values range from 0 to 100. From owner-svn-src-all@freebsd.org Tue Apr 21 17:13:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 699B52B0C76; Tue, 21 Apr 2020 17:13:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4969BC269dz3CJD; Tue, 21 Apr 2020 17:13:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4392C4950; Tue, 21 Apr 2020 17:13:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LHD7uB000239; Tue, 21 Apr 2020 17:13:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LHD6ao000237; Tue, 21 Apr 2020 17:13:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004211713.03LHD6ao000237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 21 Apr 2020 17:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360163 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 360163 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:13:07 -0000 Author: markj Date: Tue Apr 21 17:13:06 2020 New Revision: 360163 URL: https://svnweb.freebsd.org/changeset/base/360163 Log: Handle PCATCH in blockcount_sleep() so it can be interrupted. blockcount_wait() still unconditionally waits for the count to reach zero before returning. Tested by: pho (a larger patch) Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24513 Modified: head/sys/kern/kern_synch.c head/sys/sys/blockcount.h Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Tue Apr 21 17:07:02 2020 (r360162) +++ head/sys/kern/kern_synch.c Tue Apr 21 17:13:06 2020 (r360163) @@ -400,12 +400,12 @@ _blockcount_wakeup(blockcount_t *bc, u_int old) } /* - * Wait for a wakeup. This does not guarantee that the count is still zero on - * return and may be subject to transient wakeups. Callers wanting a precise - * answer should use blockcount_wait() with an interlock. + * Wait for a wakeup or a signal. This does not guarantee that the count is + * still zero on return. Callers wanting a precise answer should use + * blockcount_wait() with an interlock. * - * Return 0 if there is no work to wait for, and 1 if we slept waiting for work - * to complete. In the latter case the counter value must be re-read. + * If there is no work to wait for, return 0. If the sleep was interrupted by a + * signal, return EINTR or ERESTART, and return EAGAIN otherwise. */ int _blockcount_sleep(blockcount_t *bc, struct lock_object *lock, const char *wmesg, @@ -415,10 +415,15 @@ _blockcount_sleep(blockcount_t *bc, struct lock_object uintptr_t lock_state; u_int old; int ret; + bool catch, drop; KASSERT(lock != &Giant.lock_object, ("%s: cannot use Giant as the interlock", __func__)); + catch = (prio & PCATCH) != 0; + drop = (prio & PDROP) != 0; + prio &= PRIMASK; + /* * Synchronize with the fence in blockcount_release(). If we end up * waiting, the sleepqueue lock acquisition will provide the required @@ -428,7 +433,7 @@ _blockcount_sleep(blockcount_t *bc, struct lock_object * ourselves to sleep to avoid jumping ahead. */ if (atomic_load_acq_int(&bc->__count) == 0) { - if (lock != NULL && (prio & PDROP) != 0) + if (lock != NULL && drop) LOCK_CLASS(lock)->lc_unlock(lock); return (0); } @@ -439,23 +444,27 @@ _blockcount_sleep(blockcount_t *bc, struct lock_object if (lock != NULL) lock_state = LOCK_CLASS(lock)->lc_unlock(lock); old = blockcount_read(bc); + ret = 0; do { if (_BLOCKCOUNT_COUNT(old) == 0) { sleepq_release(wchan); - ret = 0; goto out; } if (_BLOCKCOUNT_WAITERS(old)) break; } while (!atomic_fcmpset_int(&bc->__count, &old, old | _BLOCKCOUNT_WAITERS_FLAG)); - sleepq_add(wchan, NULL, wmesg, 0, 0); - sleepq_wait(wchan, prio); - ret = 1; + sleepq_add(wchan, NULL, wmesg, catch ? SLEEPQ_INTERRUPTIBLE : 0, 0); + if (catch) + ret = sleepq_wait_sig(wchan, prio); + else + sleepq_wait(wchan, prio); + if (ret == 0) + ret = EAGAIN; out: PICKUP_GIANT(); - if (lock != NULL && (prio & PDROP) == 0) + if (lock != NULL && !drop) LOCK_CLASS(lock)->lc_lock(lock, lock_state); return (ret); Modified: head/sys/sys/blockcount.h ============================================================================== --- head/sys/sys/blockcount.h Tue Apr 21 17:07:02 2020 (r360162) +++ head/sys/sys/blockcount.h Tue Apr 21 17:13:06 2020 (r360163) @@ -80,9 +80,9 @@ static __inline void _blockcount_wait(blockcount_t *bc, struct lock_object *lo, const char *wmesg, int prio) { - KASSERT((prio & PDROP) == 0, ("%s: invalid prio %x", __func__, prio)); + KASSERT((prio & ~PRIMASK) == 0, ("%s: invalid prio %x", __func__, prio)); - while (_blockcount_sleep(bc, lo, wmesg, prio) != 0) + while (_blockcount_sleep(bc, lo, wmesg, prio) == EAGAIN) ; } From owner-svn-src-all@freebsd.org Tue Apr 21 17:14:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA2B62B0D40; Tue, 21 Apr 2020 17:14:08 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4969CN50NNz3CRk; Tue, 21 Apr 2020 17:14:08 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6920495C; Tue, 21 Apr 2020 17:14:08 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LHE8wY000327; Tue, 21 Apr 2020 17:14:08 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LHE8YF000326; Tue, 21 Apr 2020 17:14:08 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202004211714.03LHE8YF000326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 21 Apr 2020 17:14:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360164 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 360164 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:14:08 -0000 Author: lwhsu Date: Tue Apr 21 17:14:08 2020 New Revision: 360164 URL: https://svnweb.freebsd.org/changeset/base/360164 Log: Update .Dd Modified: head/share/man/man4/hwpstate_intel.4 Modified: head/share/man/man4/hwpstate_intel.4 ============================================================================== --- head/share/man/man4/hwpstate_intel.4 Tue Apr 21 17:13:06 2020 (r360163) +++ head/share/man/man4/hwpstate_intel.4 Tue Apr 21 17:14:08 2020 (r360164) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 1, 2020 +.Dd April 21, 2020 .Dt HWPSTATE_INTEL 4 .Os .Sh NAME From owner-svn-src-all@freebsd.org Tue Apr 21 17:17:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 612D32B0F0E; Tue, 21 Apr 2020 17:17:33 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4969HK1XPYz3Cgt; Tue, 21 Apr 2020 17:17:33 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FD46495F; Tue, 21 Apr 2020 17:17:33 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LHHXeb000541; Tue, 21 Apr 2020 17:17:33 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LHHXQw000540; Tue, 21 Apr 2020 17:17:33 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202004211717.03LHHXQw000540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Tue, 21 Apr 2020 17:17:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360165 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 360165 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:17:33 -0000 Author: lwhsu Date: Tue Apr 21 17:17:32 2020 New Revision: 360165 URL: https://svnweb.freebsd.org/changeset/base/360165 Log: Also update est(4) as r360162 and r360164 MFC after: 3 days Modified: head/share/man/man4/est.4 Modified: head/share/man/man4/est.4 ============================================================================== --- head/share/man/man4/est.4 Tue Apr 21 17:14:08 2020 (r360164) +++ head/share/man/man4/est.4 Tue Apr 21 17:17:32 2020 (r360165) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 18, 2012 +.Dd April 21, 2020 .Dt EST 4 .Os .Sh NAME @@ -66,7 +66,7 @@ Attempt to infer information from direct probing of th Should only be used in diagnostic cases. .Pq default 0 .It hw.est.strict -Validate frequency requested is accepted by the cpu when set. +Validate frequency requested is accepted by the CPU when set. It appears that this will only work on single core cpus. .Pq default 0 .El @@ -75,17 +75,17 @@ The following .Xr sysctl 8 values are available .Bl -tag -width indent -.It Va dev.est.%d.\%desc +.It Va dev.est.%d.%desc Description of support, almost always Enhanced SpeedStep Frequency Control. .It dev.est.0.%desc: Enhanced SpeedStep Frequency Control -.It Va dev.est.%d.\%driver +.It Va dev.est.%d.%driver Driver in use, always est. .It dev.est.0.%driver: est -.It Va dev.est.%d.\%parent -.It dev.est.0.%parent: cpu0 -The cpu that is exposing these frequencies. +.It Va dev.est.%d.%parent +The CPU that is exposing these frequencies. For example .Va cpu0 . +.It dev.est.0.%parent: cpu0 .It Va dev.est.%d.freq_settings . The valid frequencies that are allowed by this CPU and their step values. .It dev.est.0.freq_settings: 2201/45000 2200/45000 2000/39581 1900/37387 From owner-svn-src-all@freebsd.org Tue Apr 21 17:30:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C5C992B19DB; Tue, 21 Apr 2020 17:30:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4969Zm4tRMz3Dwf; Tue, 21 Apr 2020 17:30:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A11544BB9; Tue, 21 Apr 2020 17:30:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LHUuJI009369; Tue, 21 Apr 2020 17:30:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LHUuEt009368; Tue, 21 Apr 2020 17:30:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004211730.03LHUuEt009368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 21 Apr 2020 17:30:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360166 - head/lib/libvmmapi X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/lib/libvmmapi X-SVN-Commit-Revision: 360166 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:30:56 -0000 Author: jhb Date: Tue Apr 21 17:30:56 2020 New Revision: 360166 URL: https://svnweb.freebsd.org/changeset/base/360166 Log: Add description string for VM_CAP_BPT_EXIT. While here, replace the array of mapping structures with an array of string pointers where the index is the capability value. Submitted by: Rob Fairbanks Reviewed by: rgrimes MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24289 Modified: head/lib/libvmmapi/vmmapi.c Modified: head/lib/libvmmapi/vmmapi.c ============================================================================== --- head/lib/libvmmapi/vmmapi.c Tue Apr 21 17:17:32 2020 (r360165) +++ head/lib/libvmmapi/vmmapi.c Tue Apr 21 17:30:56 2020 (r360166) @@ -816,16 +816,13 @@ vm_inject_nmi(struct vmctx *ctx, int vcpu) return (ioctl(ctx->fd, VM_INJECT_NMI, &vmnmi)); } -static struct { - const char *name; - int type; -} capstrmap[] = { - { "hlt_exit", VM_CAP_HALT_EXIT }, - { "mtrap_exit", VM_CAP_MTRAP_EXIT }, - { "pause_exit", VM_CAP_PAUSE_EXIT }, - { "unrestricted_guest", VM_CAP_UNRESTRICTED_GUEST }, - { "enable_invpcid", VM_CAP_ENABLE_INVPCID }, - { 0 } +static const char *capstrmap[] = { + [VM_CAP_HALT_EXIT] = "hlt_exit", + [VM_CAP_MTRAP_EXIT] = "mtrap_exit", + [VM_CAP_PAUSE_EXIT] = "pause_exit", + [VM_CAP_UNRESTRICTED_GUEST] = "unrestricted_guest", + [VM_CAP_ENABLE_INVPCID] = "enable_invpcid", + [VM_CAP_BPT_EXIT] = "bpt_exit", }; int @@ -833,9 +830,9 @@ vm_capability_name2type(const char *capname) { int i; - for (i = 0; capstrmap[i].name != NULL && capname != NULL; i++) { - if (strcmp(capstrmap[i].name, capname) == 0) - return (capstrmap[i].type); + for (i = 0; i < nitems(capstrmap); i++) { + if (strcmp(capstrmap[i], capname) == 0) + return (i); } return (-1); @@ -844,12 +841,8 @@ vm_capability_name2type(const char *capname) const char * vm_capability_type2name(int type) { - int i; - - for (i = 0; capstrmap[i].name != NULL; i++) { - if (capstrmap[i].type == type) - return (capstrmap[i].name); - } + if (type < nitems(capstrmap)) + return (capstrmap[type]); return (NULL); } From owner-svn-src-all@freebsd.org Tue Apr 21 17:32:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93AAA2B1D51; Tue, 21 Apr 2020 17:32:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4969d63C32z3FHK; Tue, 21 Apr 2020 17:32:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 690994DD4; Tue, 21 Apr 2020 17:32:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LHWwMO012766; Tue, 21 Apr 2020 17:32:58 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LHWw4O012765; Tue, 21 Apr 2020 17:32:58 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004211732.03LHWw4O012765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 21 Apr 2020 17:32:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360167 - head/libexec/tftpd X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/libexec/tftpd X-SVN-Commit-Revision: 360167 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:32:58 -0000 Author: jhb Date: Tue Apr 21 17:32:57 2020 New Revision: 360167 URL: https://svnweb.freebsd.org/changeset/base/360167 Log: Abort transfer if fseeko() fails. CID: 1420215 Reviewed by: asomers MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24454 Modified: head/libexec/tftpd/tftp-transfer.c Modified: head/libexec/tftpd/tftp-transfer.c ============================================================================== --- head/libexec/tftpd/tftp-transfer.c Tue Apr 21 17:30:56 2020 (r360166) +++ head/libexec/tftpd/tftp-transfer.c Tue Apr 21 17:32:57 2020 (r360167) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "tftp-file.h" @@ -124,7 +125,13 @@ read_block: acktry++; ts->retries++; - seek_file(window[0].offset); + if (seek_file(window[0].offset) != 0) { + tftp_log(LOG_ERR, + "seek_file failed: %s", + strerror(errno)); + send_error(peer, errno + 100); + goto abort; + } *block = window[0].block; windowblock = 0; goto read_block; @@ -158,7 +165,13 @@ read_block: /* Resend the current window. */ ts->retries++; - seek_file(window[0].offset); + if (seek_file(window[0].offset) != 0) { + tftp_log(LOG_ERR, + "seek_file failed: %s", + strerror(errno)); + send_error(peer, errno + 100); + goto abort; + } *block = window[0].block; windowblock = 0; goto read_block; @@ -183,7 +196,14 @@ read_block: if (debug&DEBUG_SIMPLE) tftp_log(LOG_DEBUG, "Partial ACK"); - seek_file(window[i + 1].offset); + if (seek_file(window[i + 1].offset) != + 0) { + tftp_log(LOG_ERR, + "seek_file failed: %s", + strerror(errno)); + send_error(peer, errno + 100); + goto abort; + } *block = window[i + 1].block; windowblock = 0; ts->retries++; From owner-svn-src-all@freebsd.org Tue Apr 21 17:38:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78D7E2B1EBD; Tue, 21 Apr 2020 17:38:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4969l413d5z3FVb; Tue, 21 Apr 2020 17:38:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F91B4DF2; Tue, 21 Apr 2020 17:38:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LHc75A013060; Tue, 21 Apr 2020 17:38:07 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LHc7AM013059; Tue, 21 Apr 2020 17:38:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004211738.03LHc7AM013059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 21 Apr 2020 17:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360168 - in head/sys: cddl/dev/dtrace/mips mips/mips X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: cddl/dev/dtrace/mips mips/mips X-SVN-Commit-Revision: 360168 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:38:08 -0000 Author: jhb Date: Tue Apr 21 17:38:07 2020 New Revision: 360168 URL: https://svnweb.freebsd.org/changeset/base/360168 Log: Handle non-dtrace-triggered kernel breakpoint traps in mips. If DTRACE is enabled at compile time, all kernel breakpoint traps are first given to dtrace to see if they are triggered by a FBT probe. Previously if dtrace didn't recognize the trap, it was silently ignored breaking the handling of other kernel breakpoint traps such as the debug.kdb.enter sysctl. This only returns early from the trap handler if dtrace recognizes the trap and handles it. Submitted by: Nicolò Mazzucato Reviewed by: markj Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D24478 Modified: head/sys/cddl/dev/dtrace/mips/dtrace_subr.c head/sys/mips/mips/trap.c Modified: head/sys/cddl/dev/dtrace/mips/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/mips/dtrace_subr.c Tue Apr 21 17:32:57 2020 (r360167) +++ head/sys/cddl/dev/dtrace/mips/dtrace_subr.c Tue Apr 21 17:38:07 2020 (r360168) @@ -251,6 +251,9 @@ dtrace_invop_start(struct trapframe *frame) int invop; invop = dtrace_invop(frame->pc, frame, frame->pc); + if (invop == 0) + return (-1); + offs = (invop & LDSD_DATA_MASK); sp = (register_t *)((uint8_t *)frame->sp + offs); Modified: head/sys/mips/mips/trap.c ============================================================================== --- head/sys/mips/mips/trap.c Tue Apr 21 17:32:57 2020 (r360167) +++ head/sys/mips/mips/trap.c Tue Apr 21 17:38:07 2020 (r360168) @@ -807,10 +807,9 @@ dofault: #if defined(KDTRACE_HOOKS) || defined(DDB) case T_BREAK: #ifdef KDTRACE_HOOKS - if (!usermode && dtrace_invop_jump_addr != 0) { - dtrace_invop_jump_addr(trapframe); + if (!usermode && dtrace_invop_jump_addr != NULL && + dtrace_invop_jump_addr(trapframe) == 0) return (trapframe->pc); - } #endif #ifdef DDB kdb_trap(type, 0, trapframe); From owner-svn-src-all@freebsd.org Tue Apr 21 17:40:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D7AB2B2043; Tue, 21 Apr 2020 17:40:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4969ng3HgMz3FnC; Tue, 21 Apr 2020 17:40:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C46A4DFE; Tue, 21 Apr 2020 17:40:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LHeNVQ013339; Tue, 21 Apr 2020 17:40:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LHeNTX013338; Tue, 21 Apr 2020 17:40:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004211740.03LHeNTX013338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 21 Apr 2020 17:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360169 - head/lib/libc/riscv/gen X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/lib/libc/riscv/gen X-SVN-Commit-Revision: 360169 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:40:23 -0000 Author: jhb Date: Tue Apr 21 17:40:23 2020 New Revision: 360169 URL: https://svnweb.freebsd.org/changeset/base/360169 Log: Check the magic value in longjmp() before calling sigprocmask(). This avoids passing garbage to sigprocmask() if the jump buffer is invalid. Reviewed by: mhorne Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24483 Modified: head/lib/libc/riscv/gen/setjmp.S Modified: head/lib/libc/riscv/gen/setjmp.S ============================================================================== --- head/lib/libc/riscv/gen/setjmp.S Tue Apr 21 17:38:07 2020 (r360168) +++ head/lib/libc/riscv/gen/setjmp.S Tue Apr 21 17:40:23 2020 (r360169) @@ -100,6 +100,11 @@ ENTRY(setjmp) END(setjmp) ENTRY(longjmp) + /* Check the magic value */ + ld t0, 0(a0) + ld t1, .Lmagic + bne t0, t1, botch + addi sp, sp, -(4 * 8) sd a0, (0 * 8)(sp) sd ra, (1 * 8)(sp) @@ -115,11 +120,6 @@ ENTRY(longjmp) ld ra, (1 * 8)(sp) ld a0, (0 * 8)(sp) addi sp, sp, (4 * 8) - - /* Check the magic value */ - ld t0, 0(a0) - ld t1, .Lmagic - bne t0, t1, botch /* Restore the stack pointer */ ld t0, 8(a0) From owner-svn-src-all@freebsd.org Tue Apr 21 17:42:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D25B32B2277; Tue, 21 Apr 2020 17:42:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4969r85HJ2z3GCY; Tue, 21 Apr 2020 17:42:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0A854FCA; Tue, 21 Apr 2020 17:42:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LHgWof018929; Tue, 21 Apr 2020 17:42:32 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LHgWqB018927; Tue, 21 Apr 2020 17:42:32 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004211742.03LHgWqB018927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 21 Apr 2020 17:42:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360170 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 360170 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:42:32 -0000 Author: jhb Date: Tue Apr 21 17:42:32 2020 New Revision: 360170 URL: https://svnweb.freebsd.org/changeset/base/360170 Log: Retire two unused background fsck sysctls. These two sysctls were added to support UFS softupdates journalling with snapshots. However, the changes to fsck to use them were never committed and there have never been any in-tree uses of these sysctls. More details from Kirk: When journalling got added to soft updates, its journal rollback freed blocks that it thought were no longer in use. But it does not take snapshots into account (i.e., if a snapshot is still using it, then it cannot be freed). So I added the needed logic to fsck by having the free go through the kernel's blkfree code so it could grab blocks that were still needed by snapshots. That is done using the setbufoutput hack. I never got that code working reliably, so it is still sitting in my work directory. Which also explains why you still cannot take snapshots on filesystems running with journalling... In looking over my use of this feature, and in particular the troubles I was having with it, I conclude that it may be better to extract the code from the kernel that handles freeing blocks claimed by snapshots and putting it into fsck directly. My original intent was that it is complex and at the time changing, so only having to maintain it in one place was appealing. But at this point it has not changed in years and the hacks like setinode and setbufoutput to be able to use the kernel code is sufficiently ugly, that I am leaning towards just extracting it. Reviewed by: mckusick MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24484 Modified: head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/fs.h Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Tue Apr 21 17:40:23 2020 (r360169) +++ head/sys/ufs/ffs/ffs_alloc.c Tue Apr 21 17:42:32 2020 (r360170) @@ -3086,18 +3086,6 @@ ffs_fserr(fs, inum, cp) * in the current directory is oldvalue then change it to newvalue. * unlink(nameptr, oldvalue) - Verify that the inode number associated * with nameptr in the current directory is oldvalue then unlink it. - * - * The following functions may only be used on a quiescent filesystem - * by the soft updates journal. They are not safe to be run on an active - * filesystem. - * - * setinode(inode, dip) - the specified disk inode is replaced with the - * contents pointed to by dip. - * setbufoutput(fd, flags) - output associated with the specified file - * descriptor (which must reference the character device supporting - * the filesystem) switches from using physio to running through the - * buffer cache when flags is set to 1. The descriptor reverts to - * physio for output when flags is set to zero. */ static int sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS); @@ -3163,23 +3151,12 @@ static SYSCTL_NODE(_vfs_ffs, FFS_UNLINK, unlink, CTLFLAG_WR | CTLFLAG_NEEDGIANT, sysctl_ffs_fsck, "Unlink a Duplicate Name"); -static SYSCTL_NODE(_vfs_ffs, FFS_SET_INODE, setinode, - CTLFLAG_WR | CTLFLAG_NEEDGIANT, sysctl_ffs_fsck, - "Update an On-Disk Inode"); - -static SYSCTL_NODE(_vfs_ffs, FFS_SET_BUFOUTPUT, setbufoutput, - CTLFLAG_WR | CTLFLAG_NEEDGIANT, sysctl_ffs_fsck, - "Set Buffered Writing for Descriptor"); - #ifdef DIAGNOSTIC static int fsckcmds = 0; SYSCTL_INT(_debug, OID_AUTO, ffs_fsckcmds, CTLFLAG_RW, &fsckcmds, 0, "print out fsck_ffs-based filesystem update commands"); #endif /* DIAGNOSTIC */ -static int buffered_write(struct file *, struct uio *, struct ucred *, - int, struct thread *); - static int sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) { @@ -3194,10 +3171,9 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) ufs2_daddr_t blkno; long blkcnt, blksize; u_long key; - struct file *fp, *vfp; + struct file *fp; cap_rights_t rights; int filetype, error; - static struct fileops *origops, bufferedops; if (req->newlen > sizeof cmd) return (EBADRPC); @@ -3490,76 +3466,6 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) 0, (ino_t)cmd.size); break; - case FFS_SET_INODE: - if (ump->um_fsckpid != td->td_proc->p_pid) { - error = EPERM; - break; - } -#ifdef DIAGNOSTIC - if (fsckcmds) { - printf("%s: update inode %jd\n", - mp->mnt_stat.f_mntonname, (intmax_t)cmd.value); - } -#endif /* DIAGNOSTIC */ - if ((error = ffs_vget(mp, (ino_t)cmd.value, LK_EXCLUSIVE, &vp))) - break; - AUDIT_ARG_VNODE1(vp); - ip = VTOI(vp); - if (I_IS_UFS1(ip)) - error = copyin((void *)(intptr_t)cmd.size, ip->i_din1, - sizeof(struct ufs1_dinode)); - else - error = copyin((void *)(intptr_t)cmd.size, ip->i_din2, - sizeof(struct ufs2_dinode)); - if (error) { - vput(vp); - break; - } - UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_MODIFIED); - error = ffs_update(vp, 1); - vput(vp); - break; - - case FFS_SET_BUFOUTPUT: - if (ump->um_fsckpid != td->td_proc->p_pid) { - error = EPERM; - break; - } - if (ITOUMP(VTOI(vp)) != ump) { - error = EINVAL; - break; - } -#ifdef DIAGNOSTIC - if (fsckcmds) { - printf("%s: %s buffered output for descriptor %jd\n", - mp->mnt_stat.f_mntonname, - cmd.size == 1 ? "enable" : "disable", - (intmax_t)cmd.value); - } -#endif /* DIAGNOSTIC */ - if ((error = getvnode(td, cmd.value, - cap_rights_init(&rights, CAP_FSCK), &vfp)) != 0) - break; - if (vfp->f_vnode->v_type != VCHR) { - fdrop(vfp, td); - error = EINVAL; - break; - } - if (origops == NULL) { - origops = vfp->f_ops; - bcopy((void *)origops, (void *)&bufferedops, - sizeof(bufferedops)); - bufferedops.fo_write = buffered_write; - } - if (cmd.size == 1) - atomic_store_rel_ptr((volatile uintptr_t *)&vfp->f_ops, - (uintptr_t)&bufferedops); - else - atomic_store_rel_ptr((volatile uintptr_t *)&vfp->f_ops, - (uintptr_t)origops); - fdrop(vfp, td); - break; - default: #ifdef DIAGNOSTIC if (fsckcmds) { @@ -3573,94 +3479,5 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) } fdrop(fp, td); vn_finished_write(mp); - return (error); -} - -/* - * Function to switch a descriptor to use the buffer cache to stage - * its I/O. This is needed so that writes to the filesystem device - * will give snapshots a chance to copy modified blocks for which it - * needs to retain copies. - */ -static int -buffered_write(fp, uio, active_cred, flags, td) - struct file *fp; - struct uio *uio; - struct ucred *active_cred; - int flags; - struct thread *td; -{ - struct pwd *pwd; - struct vnode *devvp, *vp; - struct inode *ip; - struct buf *bp; - struct fs *fs; - struct ufsmount *ump; - struct filedesc *fdp; - int error; - daddr_t lbn; - - /* - * The devvp is associated with the /dev filesystem. To discover - * the filesystem with which the device is associated, we depend - * on the application setting the current directory to a location - * within the filesystem being written. Yes, this is an ugly hack. - */ - devvp = fp->f_vnode; - if (!vn_isdisk(devvp, NULL)) - return (EINVAL); - fdp = td->td_proc->p_fd; - FILEDESC_SLOCK(fdp); - pwd = FILEDESC_LOCKED_LOAD_PWD(fdp); - vp = pwd->pwd_cdir; - vref(vp); - FILEDESC_SUNLOCK(fdp); - vn_lock(vp, LK_SHARED | LK_RETRY); - /* - * Check that the current directory vnode indeed belongs to - * UFS before trying to dereference UFS-specific v_data fields. - */ - if (vp->v_op != &ffs_vnodeops1 && vp->v_op != &ffs_vnodeops2) { - vput(vp); - return (EINVAL); - } - ip = VTOI(vp); - ump = ip->i_ump; - if (ump->um_odevvp != devvp) { - vput(vp); - return (EINVAL); - } - devvp = ump->um_devvp; - fs = ITOFS(ip); - vput(vp); - foffset_lock_uio(fp, uio, flags); - vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); -#ifdef DIAGNOSTIC - if (fsckcmds) { - printf("%s: buffered write for block %jd\n", - fs->fs_fsmnt, (intmax_t)btodb(uio->uio_offset)); - } -#endif /* DIAGNOSTIC */ - /* - * All I/O must be contained within a filesystem block, start on - * a fragment boundary, and be a multiple of fragments in length. - */ - if (uio->uio_resid > fs->fs_bsize - (uio->uio_offset % fs->fs_bsize) || - fragoff(fs, uio->uio_offset) != 0 || - fragoff(fs, uio->uio_resid) != 0) { - error = EINVAL; - goto out; - } - lbn = numfrags(fs, uio->uio_offset); - bp = getblk(devvp, lbn, uio->uio_resid, 0, 0, 0); - bp->b_flags |= B_RELBUF; - if ((error = uiomove((char *)bp->b_data, uio->uio_resid, uio)) != 0) { - brelse(bp); - goto out; - } - error = bwrite(bp); -out: - VOP_UNLOCK(devvp); - foffset_unlock_uio(fp, uio, flags | FOF_NEXTOFF); return (error); } Modified: head/sys/ufs/ffs/fs.h ============================================================================== --- head/sys/ufs/ffs/fs.h Tue Apr 21 17:40:23 2020 (r360169) +++ head/sys/ufs/ffs/fs.h Tue Apr 21 17:42:32 2020 (r360170) @@ -219,8 +219,8 @@ #define FFS_SET_CWD 12 /* set current directory */ #define FFS_SET_DOTDOT 13 /* set inode number for ".." */ #define FFS_UNLINK 14 /* remove a name in the filesystem */ -#define FFS_SET_INODE 15 /* update an on-disk inode */ -#define FFS_SET_BUFOUTPUT 16 /* set buffered writing on descriptor */ +/* Was FFS_SET_INODE 15 */ +/* Was FFS_SET_BUFOUTPUT 16 */ #define FFS_SET_SIZE 17 /* set inode size */ #define FFS_MAXID 17 /* number of valid ffs ids */ From owner-svn-src-all@freebsd.org Tue Apr 21 17:47:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83BCA2B24EB; Tue, 21 Apr 2020 17:47:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4969xQ2Pk5z3GYc; Tue, 21 Apr 2020 17:47:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DE7A4FDD; Tue, 21 Apr 2020 17:47:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LHl6YR019191; Tue, 21 Apr 2020 17:47:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LHl6Gg019190; Tue, 21 Apr 2020 17:47:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004211747.03LHl6Gg019190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 21 Apr 2020 17:47:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360171 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 360171 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:47:06 -0000 Author: jhb Date: Tue Apr 21 17:47:05 2020 New Revision: 360171 URL: https://svnweb.freebsd.org/changeset/base/360171 Log: Don't access a user buffer directly from the kernel. The handle_string callback for the ENCIOC_SETSTRING ioctl was passing a user pointer to memcpy(). Fix by using copyin() instead. For ENCIOC_GETSTRING ioctls, the handler was storing the user pointer in a CCB's data_ptr field where it was indirected by other code. Fix this by allocating a temporary buffer (which ENCIOC_SETSTRING already did) and copying the result out to the user buffer after the CCB has been processed. Reviewed by: kib Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24487 Modified: head/sys/cam/scsi/scsi_enc_ses.c Modified: head/sys/cam/scsi/scsi_enc_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_enc_ses.c Tue Apr 21 17:42:32 2020 (r360170) +++ head/sys/cam/scsi/scsi_enc_ses.c Tue Apr 21 17:47:05 2020 (r360171) @@ -2904,13 +2904,19 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *s buf[1] = 0; buf[2] = sstr->bufsiz >> 8; buf[3] = sstr->bufsiz & 0xff; - memcpy(&buf[4], sstr->buf, sstr->bufsiz); + ret = copyin(sstr->buf, &buf[4], sstr->bufsiz); + if (ret != 0) { + ENC_FREE(buf); + return (ret); + } break; case ENCIOC_GETSTRING: payload = sstr->bufsiz; amt = payload; + buf = ENC_MALLOC(payload); + if (buf == NULL) + return (ENOMEM); ses_page_cdb(cdb, payload, SesStringIn, CAM_DIR_IN); - buf = sstr->buf; break; case ENCIOC_GETENCNAME: if (ses_cache->ses_nsubencs < 1) @@ -2950,6 +2956,8 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *s return (EINVAL); } ret = enc_runcmd(enc, cdb, 6, buf, &amt); + if (ret == 0 && ioc == ENCIOC_GETSTRING) + ret = copyout(buf, sstr->buf, sstr->bufsiz); if (ioc == ENCIOC_SETSTRING) ENC_FREE(buf); return (ret); From owner-svn-src-all@freebsd.org Tue Apr 21 17:51:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69F382B2897; Tue, 21 Apr 2020 17:51:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496B2z2Z95z3H5n; Tue, 21 Apr 2020 17:51:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5113F5182; Tue, 21 Apr 2020 17:51:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LHptGc024516; Tue, 21 Apr 2020 17:51:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LHptcm024515; Tue, 21 Apr 2020 17:51:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004211751.03LHptcm024515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 21 Apr 2020 17:51:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360172 - head/usr.sbin/bluetooth/hccontrol X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 360172 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 17:51:55 -0000 Author: hselasky Date: Tue Apr 21 17:51:54 2020 New Revision: 360172 URL: https://svnweb.freebsd.org/changeset/base/360172 Log: Update string tables in hccontrol(8). Submitted by: Marc Veldman PR: 245796 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/usr.sbin/bluetooth/hccontrol/util.c Modified: head/usr.sbin/bluetooth/hccontrol/util.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/util.c Tue Apr 21 17:47:05 2020 (r360171) +++ head/usr.sbin/bluetooth/hccontrol/util.c Tue Apr 21 17:51:54 2020 (r360172) @@ -160,7 +160,10 @@ hci_ver2str(int ver) /* 0x05 */ "Bluetooth HCI Specification 3.0", /* 0x06 */ "Bluetooth HCI Specification 4.0", /* 0x07 */ "Bluetooth HCI Specification 4.1", - /* 0x08 */ "Bluetooth HCI Specification 4.2" + /* 0x08 */ "Bluetooth HCI Specification 4.2", + /* 0x09 */ "Bluetooth HCI Specification 5.0", + /* 0x0a */ "Bluetooth HCI Specification 5.1", + /* 0x0b */ "Bluetooth HCI Specification 5.2" }; return (ver >= SIZE(t)? "?" : t[ver]); @@ -175,10 +178,13 @@ hci_lmpver2str(int ver) /* 0x02 */ "Bluetooth LMP 1.2", /* 0x03 */ "Bluetooth LMP 2.0", /* 0x04 */ "Bluetooth LMP 2.1", - /* 0x04 */ "Bluetooth LMP 3.0", - /* 0x04 */ "Bluetooth LMP 4.0", - /* 0x04 */ "Bluetooth LMP 4.1", - /* 0x04 */ "Bluetooth LMP 4.2" + /* 0x05 */ "Bluetooth LMP 3.0", + /* 0x06 */ "Bluetooth LMP 4.0", + /* 0x07 */ "Bluetooth LMP 4.1", + /* 0x08 */ "Bluetooth LMP 4.2", + /* 0x09 */ "Bluetooth LMP 5.0", + /* 0x0a */ "Bluetooth LMP 5.1", + /* 0x0b */ "Bluetooth LMP 5.2" }; return (ver >= SIZE(t)? "?" : t[ver]); @@ -198,7 +204,7 @@ hci_manufacturer2str(int m) /* 0007 */ "Lucent", /* 0008 */ "Motorola", /* 0009 */ "Infineon Technologies AG", - /* 0010 */ "Cambridge Silicon Radio", + /* 0010 */ "Qualcomm Technologies International, Ltd. (QTIL)", /* 0011 */ "Silicon Wave", /* 0012 */ "Digianswer A/S", /* 0013 */ "Texas Instruments Inc.", @@ -213,7 +219,7 @@ hci_manufacturer2str(int m) /* 0022 */ "KC Technology Inc.", /* 0023 */ "Newlogic", /* 0024 */ "Transilica, Inc.", - /* 0025 */ "Rohde & Schwartz GmbH & Co. KG", + /* 0025 */ "Rohde & Schwarz GmbH & Co. KG", /* 0026 */ "TTPCom Limited", /* 0027 */ "Signia Technologies, Inc.", /* 0028 */ "Conexant Systems Inc.", @@ -225,7 +231,7 @@ hci_manufacturer2str(int m) /* 0034 */ "NEC Corporation", /* 0035 */ "WavePlus Technology Co., Ltd.", /* 0036 */ "Alcatel", - /* 0037 */ "Philips Semiconductors", + /* 0037 */ "NXP Semiconductors (formerly Philips Semiconductors)", /* 0038 */ "C Technologies", /* 0039 */ "Open Interface", /* 0040 */ "R F Micro Devices", @@ -237,22 +243,2187 @@ hci_manufacturer2str(int m) /* 0046 */ "Norwood Systems", /* 0047 */ "MewTel Technology Inc.", /* 0048 */ "ST Microelectronics", - /* 0049 */ "Synopsys", + /* 0049 */ "Synopsys, Inc.", /* 0050 */ "Red-M (Communications) Ltd", /* 0051 */ "Commil Ltd", /* 0052 */ "Computer Access Technology Corporation (CATC)", /* 0053 */ "Eclipse (HQ Espana) S.L.", - /* 0054 */ "Renesas Technology Corp.", + /* 0054 */ "Renesas Electronics Corporation", /* 0055 */ "Mobilian Corporation", - /* 0056 */ "Terax", + /* 0056 */ "Syntronix Corporation", /* 0057 */ "Integrated System Solution Corp.", - /* 0058 */ "Matsushita Electric Industrial Co., Ltd.", + /* 0058 */ "Panasonic Corporation (formerly Matsushita Electric Industrial Co., Ltd.)", /* 0059 */ "Gennum Corporation", - /* 0060 */ "Research In Motion", + /* 0060 */ "BlackBerry Limited (formerly Research In Motion)", /* 0061 */ "IPextreme, Inc.", /* 0062 */ "Systems and Chips, Inc", /* 0063 */ "Bluetooth SIG, Inc", - /* 0064 */ "Seiko Epson Corporation" + /* 0064 */ "Seiko Epson Corporation", + /* 0065 */ "Integrated Silicon Solution Taiwan, Inc.", + /* 0066 */ "CONWISE Technology Corporation Ltd", + /* 0067 */ "PARROT AUTOMOTIVE SAS", + /* 0068 */ "Socket Mobile", + /* 0069 */ "Atheros Communications, Inc.", + /* 0070 */ "MediaTek, Inc.", + /* 0071 */ "Bluegiga", + /* 0072 */ "Marvell Technology Group Ltd.", + /* 0073 */ "3DSP Corporation", + /* 0074 */ "Accel Semiconductor Ltd.", + /* 0075 */ "Continental Automotive Systems", + /* 0076 */ "Apple, Inc.", + /* 0077 */ "Staccato Communications, Inc.", + /* 0078 */ "Avago Technologies", + /* 0079 */ "APT Ltd.", + /* 0080 */ "SiRF Technology, Inc.", + /* 0081 */ "Tzero Technologies, Inc.", + /* 0082 */ "J&M Corporation", + /* 0083 */ "Free2move AB", + /* 0084 */ "3DiJoy Corporation", + /* 0085 */ "Plantronics, Inc.", + /* 0086 */ "Sony Ericsson Mobile Communications", + /* 0087 */ "Harman International Industries, Inc.", + /* 0088 */ "Vizio, Inc.", + /* 0089 */ "Nordic Semiconductor ASA", + /* 0090 */ "EM Microelectronic-Marin SA", + /* 0091 */ "Ralink Technology Corporation", + /* 0092 */ "Belkin International, Inc.", + /* 0093 */ "Realtek Semiconductor Corporation", + /* 0094 */ "Stonestreet One, LLC", + /* 0095 */ "Wicentric, Inc.", + /* 0096 */ "RivieraWaves S.A.S", + /* 0097 */ "RDA Microelectronics", + /* 0098 */ "Gibson Guitars", + /* 0099 */ "MiCommand Inc.", + /* 0100 */ "Band XI International, LLC", + /* 0101 */ "Hewlett-Packard Company", + /* 0102 */ "9Solutions Oy", + /* 0103 */ "GN Netcom A/S", + /* 0104 */ "General Motors", + /* 0105 */ "A&D Engineering, Inc.", + /* 0106 */ "MindTree Ltd.", + /* 0107 */ "Polar Electro OY", + /* 0108 */ "Beautiful Enterprise Co., Ltd.", + /* 0109 */ "BriarTek, Inc", + /* 0110 */ "Summit Data Communications, Inc.", + /* 0111 */ "Sound ID", + /* 0112 */ "Monster, LLC", + /* 0113 */ "connectBlue AB", + /* 0114 */ "ShangHai Super Smart Electronics Co. Ltd.", + /* 0115 */ "Group Sense Ltd.", + /* 0116 */ "Zomm, LLC", + /* 0117 */ "Samsung Electronics Co. Ltd.", + /* 0118 */ "Creative Technology Ltd.", + /* 0119 */ "Laird Technologies", + /* 0120 */ "Nike, Inc.", + /* 0121 */ "lesswire AG", + /* 0122 */ "MStar Semiconductor, Inc.", + /* 0123 */ "Hanlynn Technologies", + /* 0124 */ "A & R Cambridge", + /* 0125 */ "Seers Technology Co., Ltd.", + /* 0126 */ "Sports Tracking Technologies Ltd.", + /* 0127 */ "Autonet Mobile", + /* 0128 */ "DeLorme Publishing Company, Inc.", + /* 0129 */ "WuXi Vimicro", + /* 0130 */ "Sennheiser Communications A/S", + /* 0131 */ "TimeKeeping Systems, Inc.", + /* 0132 */ "Ludus Helsinki Ltd.", + /* 0133 */ "BlueRadios, Inc.", + /* 0134 */ "Equinux AG", + /* 0135 */ "Garmin International, Inc.", + /* 0136 */ "Ecotest", + /* 0137 */ "GN ReSound A/S", + /* 0138 */ "Jawbone", + /* 0139 */ "Topcon Positioning Systems, LLC", + /* 0140 */ "Gimbal Inc. (formerly Qualcomm Labs, Inc. and Qualcomm Retail Solutions, Inc.)", + /* 0141 */ "Zscan Software", + /* 0142 */ "Quintic Corp", + /* 0143 */ "Telit Wireless Solutions GmbH (formerly Stollmann E+V GmbH)", + /* 0144 */ "Funai Electric Co., Ltd.", + /* 0145 */ "Advanced PANMOBIL systems GmbH & Co. KG", + /* 0146 */ "ThinkOptics, Inc.", + /* 0147 */ "Universal Electronics, Inc.", + /* 0148 */ "Airoha Technology Corp.", + /* 0149 */ "NEC Lighting, Ltd.", + /* 0150 */ "ODM Technology, Inc.", + /* 0151 */ "ConnecteDevice Ltd.", + /* 0152 */ "zero1.tv GmbH", + /* 0153 */ "i.Tech Dynamic Global Distribution Ltd.", + /* 0154 */ "Alpwise", + /* 0155 */ "Jiangsu Toppower Automotive Electronics Co., Ltd.", + /* 0156 */ "Colorfy, Inc.", + /* 0157 */ "Geoforce Inc.", + /* 0158 */ "Bose Corporation", + /* 0159 */ "Suunto Oy", + /* 0160 */ "Kensington Computer Products Group", + /* 0161 */ "SR-Medizinelektronik", + /* 0162 */ "Vertu Corporation Limited", + /* 0163 */ "Meta Watch Ltd.", + /* 0164 */ "LINAK A/S", + /* 0165 */ "OTL Dynamics LLC", + /* 0166 */ "Panda Ocean Inc.", + /* 0167 */ "Visteon Corporation", + /* 0168 */ "ARP Devices Limited", + /* 0169 */ "MARELLI EUROPE S.P.A. (formerly Magneti Marelli S.p.A.)", + /* 0170 */ "CAEN RFID srl", + /* 0171 */ "Ingenieur-Systemgruppe Zahn GmbH", + /* 0172 */ "Green Throttle Games", + /* 0173 */ "Peter Systemtechnik GmbH", + /* 0174 */ "Omegawave Oy", + /* 0175 */ "Cinetix", + /* 0176 */ "Passif Semiconductor Corp", + /* 0177 */ "Saris Cycling Group, Inc", + /* 0178 */ "Bekey A/S", + /* 0179 */ "Clarinox Technologies Pty. Ltd.", + /* 0180 */ "BDE Technology Co., Ltd.", + /* 0181 */ "Swirl Networks", + /* 0182 */ "Meso international", + /* 0183 */ "TreLab Ltd", + /* 0184 */ "Qualcomm Innovation Center, Inc. (QuIC)", + /* 0185 */ "Johnson Controls, Inc.", + /* 0186 */ "Starkey Laboratories Inc.", + /* 0187 */ "S-Power Electronics Limited", + /* 0188 */ "Ace Sensor Inc", + /* 0189 */ "Aplix Corporation", + /* 0190 */ "AAMP of America", + /* 0191 */ "Stalmart Technology Limited", + /* 0192 */ "AMICCOM Electronics Corporation", + /* 0193 */ "Shenzhen Excelsecu Data Technology Co.,Ltd", + /* 0194 */ "Geneq Inc.", + /* 0195 */ "adidas AG", + /* 0196 */ "LG Electronics", + /* 0197 */ "Onset Computer Corporation", + /* 0198 */ "Selfly BV", + /* 0199 */ "Quuppa Oy.", + /* 0200 */ "GeLo Inc", + /* 0201 */ "Evluma", + /* 0202 */ "MC10", + /* 0203 */ "Binauric SE", + /* 0204 */ "Beats Electronics", + /* 0205 */ "Microchip Technology Inc.", + /* 0206 */ "Elgato Systems GmbH", + /* 0207 */ "ARCHOS SA", + /* 0208 */ "Dexcom, Inc.", + /* 0209 */ "Polar Electro Europe B.V.", + /* 0210 */ "Dialog Semiconductor B.V.", + /* 0211 */ "Taixingbang Technology (HK) Co,. LTD.", + /* 0212 */ "Kawantech", + /* 0213 */ "Austco Communication Systems", + /* 0214 */ "Timex Group USA, Inc.", + /* 0215 */ "Qualcomm Technologies, Inc.", + /* 0216 */ "Qualcomm Connected Experiences, Inc.", + /* 0217 */ "Voyetra Turtle Beach", + /* 0218 */ "txtr GmbH", + /* 0219 */ "Biosentronics", + /* 0220 */ "Procter & Gamble", + /* 0221 */ "Hosiden Corporation", + /* 0222 */ "Muzik LLC", + /* 0223 */ "Misfit Wearables Corp", + /* 0224 */ "Google", + /* 0225 */ "Danlers Ltd", + /* 0226 */ "Semilink Inc", + /* 0227 */ "inMusic Brands, Inc", + /* 0228 */ "L.S. Research Inc.", + /* 0229 */ "Eden Software Consultants Ltd.", + /* 0230 */ "Freshtemp", + /* 0231 */ "KS Technologies", + /* 0232 */ "ACTS Technologies", + /* 0233 */ "Vtrack Systems", + /* 0234 */ "Nielsen-Kellerman Company", + /* 0235 */ "Server Technology Inc.", + /* 0236 */ "BioResearch Associates", + /* 0237 */ "Jolly Logic, LLC", + /* 0238 */ "Above Average Outcomes, Inc.", + /* 0239 */ "Bitsplitters GmbH", + /* 0240 */ "PayPal, Inc.", + /* 0241 */ "Witron Technology Limited", + /* 0242 */ "Morse Project Inc.", + /* 0243 */ "Kent Displays Inc.", + /* 0244 */ "Nautilus Inc.", + /* 0245 */ "Smartifier Oy", + /* 0246 */ "Elcometer Limited", + /* 0247 */ "VSN Technologies, Inc.", + /* 0248 */ "AceUni Corp., Ltd.", + /* 0249 */ "StickNFind", + /* 0250 */ "Crystal Code AB", + /* 0251 */ "KOUKAAM a.s.", + /* 0252 */ "Delphi Corporation", + /* 0253 */ "ValenceTech Limited", + /* 0254 */ "Stanley Black and Decker", + /* 0255 */ "Typo Products, LLC", + /* 0256 */ "TomTom International BV", + /* 0257 */ "Fugoo, Inc.", + /* 0258 */ "Keiser Corporation", + /* 0259 */ "Bang & Olufsen A/S", + /* 0260 */ "PLUS Location Systems Pty Ltd", + /* 0261 */ "Ubiquitous Computing Technology Corporation", + /* 0262 */ "Innovative Yachtter Solutions", + /* 0263 */ "William Demant Holding A/S", + /* 0264 */ "Chicony Electronics Co., Ltd.", + /* 0265 */ "Atus BV", + /* 0266 */ "Codegate Ltd", + /* 0267 */ "ERi, Inc", + /* 0268 */ "Transducers Direct, LLC", + /* 0269 */ "DENSO TEN LIMITED (formerly Fujitsu Ten LImited)", + /* 0270 */ "Audi AG", + /* 0271 */ "HiSilicon Technologies CO., LIMITED", + /* 0272 */ "Nippon Seiki Co., Ltd.", + /* 0273 */ "Steelseries ApS", + /* 0274 */ "Visybl Inc.", + /* 0275 */ "Openbrain Technologies, Co., Ltd.", + /* 0276 */ "Xensr", + /* 0277 */ "e.solutions", + /* 0278 */ "10AK Technologies", + /* 0279 */ "Wimoto Technologies Inc", + /* 0280 */ "Radius Networks, Inc.", + /* 0281 */ "Wize Technology Co., Ltd.", + /* 0282 */ "Qualcomm Labs, Inc.", + /* 0283 */ "Hewlett Packard Enterprise", + /* 0284 */ "Baidu", + /* 0285 */ "Arendi AG", + /* 0286 */ "Skoda Auto a.s.", + /* 0287 */ "Volkswagen AG", + /* 0288 */ "Porsche AG", + /* 0289 */ "Sino Wealth Electronic Ltd.", + /* 0290 */ "AirTurn, Inc.", + /* 0291 */ "Kinsa, Inc", + /* 0292 */ "HID Global", + /* 0293 */ "SEAT es", + /* 0294 */ "Promethean Ltd.", + /* 0295 */ "Salutica Allied Solutions", + /* 0296 */ "GPSI Group Pty Ltd", + /* 0297 */ "Nimble Devices Oy", + /* 0298 */ "Changzhou Yongse Infotech Co., Ltd.", + /* 0299 */ "SportIQ", + /* 0300 */ "TEMEC Instruments B.V.", + /* 0301 */ "Sony Corporation", + /* 0302 */ "ASSA ABLOY", + /* 0303 */ "Clarion Co. Inc.", + /* 0304 */ "Warehouse Innovations", + /* 0305 */ "Cypress Semiconductor", + /* 0306 */ "MADS Inc", + /* 0307 */ "Blue Maestro Limited", + /* 0308 */ "Resolution Products, Ltd.", + /* 0309 */ "Aireware LLC", + /* 0310 */ "Silvair, Inc.", + /* 0311 */ "Prestigio Plaza Ltd.", + /* 0312 */ "NTEO Inc.", + /* 0313 */ "Focus Systems Corporation", + /* 0314 */ "Tencent Holdings Ltd.", + /* 0315 */ "Allegion", + /* 0316 */ "Murata Manufacturing Co., Ltd.", + /* 0317 */ "WirelessWERX", + /* 0318 */ "Nod, Inc.", + /* 0319 */ "B&B Manufacturing Company", + /* 0320 */ "Alpine Electronics (China) Co., Ltd", + /* 0321 */ "FedEx Services", + /* 0322 */ "Grape Systems Inc.", + /* 0323 */ "Bkon Connect", + /* 0324 */ "Lintech GmbH", + /* 0325 */ "Novatel Wireless", + /* 0326 */ "Ciright", + /* 0327 */ "Mighty Cast, Inc.", + /* 0328 */ "Ambimat Electronics", + /* 0329 */ "Perytons Ltd.", + /* 0330 */ "Tivoli Audio, LLC", + /* 0331 */ "Master Lock", + /* 0332 */ "Mesh-Net Ltd", + /* 0333 */ "HUIZHOU DESAY SV AUTOMOTIVE CO., LTD.", + /* 0334 */ "Tangerine, Inc.", + /* 0335 */ "B&W Group Ltd.", + /* 0336 */ "Pioneer Corporation", + /* 0337 */ "OnBeep", + /* 0338 */ "Vernier Software & Technology", + /* 0339 */ "ROL Ergo", + /* 0340 */ "Pebble Technology", + /* 0341 */ "NETATMO", + /* 0342 */ "Accumulate AB", + /* 0343 */ "Anhui Huami Information Technology Co., Ltd.", + /* 0344 */ "Inmite s.r.o.", + /* 0345 */ "ChefSteps, Inc.", + /* 0346 */ "micas AG", + /* 0347 */ "Biomedical Research Ltd.", + /* 0348 */ "Pitius Tec S.L.", + /* 0349 */ "Estimote, Inc.", + /* 0350 */ "Unikey Technologies, Inc.", + /* 0351 */ "Timer Cap Co.", + /* 0352 */ "AwoX", + /* 0353 */ "yikes", + /* 0354 */ "MADSGlobalNZ Ltd.", + /* 0355 */ "PCH International", + /* 0356 */ "Qingdao Yeelink Information Technology Co., Ltd.", + /* 0357 */ "Milwaukee Tool (Formally Milwaukee Electric Tools)", + /* 0358 */ "MISHIK Pte Ltd", + /* 0359 */ "Ascensia Diabetes Care US Inc.", + /* 0360 */ "Spicebox LLC", + /* 0361 */ "emberlight", + /* 0362 */ "Cooper-Atkins Corporation", + /* 0363 */ "Qblinks", + /* 0364 */ "MYSPHERA", + /* 0365 */ "LifeScan Inc", + /* 0366 */ "Volantic AB", + /* 0367 */ "Podo Labs, Inc", + /* 0368 */ "Roche Diabetes Care AG", + /* 0369 */ "Amazon.com Services, LLC (formerly Amazon Fulfillment Service)", + /* 0370 */ "Connovate Technology Private Limited", + /* 0371 */ "Kocomojo, LLC", + /* 0372 */ "Everykey Inc.", + /* 0373 */ "Dynamic Controls", + /* 0374 */ "SentriLock", + /* 0375 */ "I-SYST inc.", + /* 0376 */ "CASIO COMPUTER CO., LTD.", + /* 0377 */ "LAPIS Semiconductor Co., Ltd.", + /* 0378 */ "Telemonitor, Inc.", + /* 0379 */ "taskit GmbH", + /* 0380 */ "Daimler AG", + /* 0381 */ "BatAndCat", + /* 0382 */ "BluDotz Ltd", + /* 0383 */ "XTel Wireless ApS", + /* 0384 */ "Gigaset Communications GmbH", + /* 0385 */ "Gecko Health Innovations, Inc.", + /* 0386 */ "HOP Ubiquitous", + /* 0387 */ "Walt Disney", + /* 0388 */ "Nectar", + /* 0389 */ "bel'apps LLC", + /* 0390 */ "CORE Lighting Ltd", + /* 0391 */ "Seraphim Sense Ltd", + /* 0392 */ "Unico RBC", + /* 0393 */ "Physical Enterprises Inc.", + /* 0394 */ "Able Trend Technology Limited", + /* 0395 */ "Konica Minolta, Inc.", + /* 0396 */ "Wilo SE", + /* 0397 */ "Extron Design Services", + /* 0398 */ "Fitbit, Inc.", + /* 0399 */ "Fireflies Systems", + /* 0400 */ "Intelletto Technologies Inc.", + /* 0401 */ "FDK CORPORATION", + /* 0402 */ "Cloudleaf, Inc", + /* 0403 */ "Maveric Automation LLC", + /* 0404 */ "Acoustic Stream Corporation", + /* 0405 */ "Zuli", + /* 0406 */ "Paxton Access Ltd", + /* 0407 */ "WiSilica Inc.", + /* 0408 */ "VENGIT Korlatolt Felelossegu Tarsasag", + /* 0409 */ "SALTO SYSTEMS S.L.", + /* 0410 */ "TRON Forum (formerly T-Engine Forum)", + /* 0411 */ "CUBETECH s.r.o.", + /* 0412 */ "Cokiya Incorporated", + /* 0413 */ "CVS Health", + /* 0414 */ "Ceruus", + /* 0415 */ "Strainstall Ltd", + /* 0416 */ "Channel Enterprises (HK) Ltd.", + /* 0417 */ "FIAMM", + /* 0418 */ "GIGALANE.CO.,LTD", + /* 0419 */ "EROAD", + /* 0420 */ "Mine Safety Appliances", + /* 0421 */ "Icon Health and Fitness", + /* 0422 */ "Wille Engineering (formely as Asandoo GmbH)", + /* 0423 */ "ENERGOUS CORPORATION", + /* 0424 */ "Taobao", + /* 0425 */ "Canon Inc.", + /* 0426 */ "Geophysical Technology Inc.", + /* 0427 */ "Facebook, Inc.", + /* 0428 */ "Trividia Health, Inc.", + /* 0429 */ "FlightSafety International", + /* 0430 */ "Earlens Corporation", + /* 0431 */ "Sunrise Micro Devices, Inc.", + /* 0432 */ "Star Micronics Co., Ltd.", + /* 0433 */ "Netizens Sp. z o.o.", + /* 0434 */ "Nymi Inc.", + /* 0435 */ "Nytec, Inc.", + /* 0436 */ "Trineo Sp. z o.o.", + /* 0437 */ "Nest Labs Inc.", + /* 0438 */ "LM Technologies Ltd", + /* 0439 */ "General Electric Company", + /* 0440 */ "i+D3 S.L.", + /* 0441 */ "HANA Micron", + /* 0442 */ "Stages Cycling LLC", + /* 0443 */ "Cochlear Bone Anchored Solutions AB", + /* 0444 */ "SenionLab AB", + /* 0445 */ "Syszone Co., Ltd", + /* 0446 */ "Pulsate Mobile Ltd.", + /* 0447 */ "Hong Kong HunterSun Electronic Limited", + /* 0448 */ "pironex GmbH", + /* 0449 */ "BRADATECH Corp.", + /* 0450 */ "Transenergooil AG", + /* 0451 */ "Bunch", + /* 0452 */ "DME Microelectronics", + /* 0453 */ "Bitcraze AB", + /* 0454 */ "HASWARE Inc.", + /* 0455 */ "Abiogenix Inc.", + /* 0456 */ "Poly-Control ApS", + /* 0457 */ "Avi-on", + /* 0458 */ "Laerdal Medical AS", + /* 0459 */ "Fetch My Pet", + /* 0460 */ "Sam Labs Ltd.", + /* 0461 */ "Chengdu Synwing Technology Ltd", + /* 0462 */ "HOUWA SYSTEM DESIGN, k.k.", + /* 0463 */ "BSH", + /* 0464 */ "Primus Inter Pares Ltd", + /* 0465 */ "August Home, Inc", + /* 0466 */ "Gill Electronics", + /* 0467 */ "Sky Wave Design", + /* 0468 */ "Newlab S.r.l.", + /* 0469 */ "ELAD srl", + /* 0470 */ "G-wearables inc.", + /* 0471 */ "Squadrone Systems Inc.", + /* 0472 */ "Code Corporation", + /* 0473 */ "Savant Systems LLC", + /* 0474 */ "Logitech International SA", + /* 0475 */ "Innblue Consulting", + /* 0476 */ "iParking Ltd.", + /* 0477 */ "Koninklijke Philips Electronics N.V.", + /* 0478 */ "Minelab Electronics Pty Limited", + /* 0479 */ "Bison Group Ltd.", + /* 0480 */ "Widex A/S", + /* 0481 */ "Jolla Ltd", + /* 0482 */ "Lectronix, Inc.", + /* 0483 */ "Caterpillar Inc", + /* 0484 */ "Freedom Innovations", + /* 0485 */ "Dynamic Devices Ltd", + /* 0486 */ "Technology Solutions (UK) Ltd", + /* 0487 */ "IPS Group Inc.", + /* 0488 */ "STIR", + /* 0489 */ "Sano, Inc.", + /* 0490 */ "Advanced Application Design, Inc.", + /* 0491 */ "AutoMap LLC", + /* 0492 */ "Spreadtrum Communications Shanghai Ltd", + /* 0493 */ "CuteCircuit LTD", + /* 0494 */ "Valeo Service", + /* 0495 */ "Fullpower Technologies, Inc.", + /* 0496 */ "KloudNation", + /* 0497 */ "Zebra Technologies Corporation", + /* 0498 */ "Itron, Inc.", + /* 0499 */ "The University of Tokyo", + /* 0500 */ "UTC Fire and Security", + /* 0501 */ "Cool Webthings Limited", + /* 0502 */ "DJO Global", + /* 0503 */ "Gelliner Limited", + /* 0504 */ "Anyka (Guangzhou) Microelectronics Technology Co, LTD", + /* 0505 */ "Medtronic Inc.", + /* 0506 */ "Gozio Inc.", + /* 0507 */ "Form Lifting, LLC", + /* 0508 */ "Wahoo Fitness, LLC", + /* 0509 */ "Kontakt Micro-Location Sp. z o.o.", + /* 0510 */ "Radio Systems Corporation", + /* 0511 */ "Freescale Semiconductor, Inc.", + /* 0512 */ "Verifone Systems Pte Ltd. Taiwan Branch", + /* 0513 */ "AR Timing", + /* 0514 */ "Rigado LLC", + /* 0515 */ "Kemppi Oy", + /* 0516 */ "Tapcentive Inc.", + /* 0517 */ "Smartbotics Inc.", + /* 0518 */ "Otter Products, LLC", + /* 0519 */ "STEMP Inc.", + /* 0520 */ "LumiGeek LLC", + /* 0521 */ "InvisionHeart Inc.", + /* 0522 */ "Macnica Inc.", + /* 0523 */ "Jaguar Land Rover Limited", + /* 0524 */ "CoroWare Technologies, Inc", + /* 0525 */ "Simplo Technology Co., LTD", + /* 0526 */ "Omron Healthcare Co., LTD", + /* 0527 */ "Comodule GMBH", + /* 0528 */ "ikeGPS", + /* 0529 */ "Telink Semiconductor Co. Ltd", + /* 0530 */ "Interplan Co., Ltd", + /* 0531 */ "Wyler AG", + /* 0532 */ "IK Multimedia Production srl", + /* 0533 */ "Lukoton Experience Oy", + /* 0534 */ "MTI Ltd", + /* 0535 */ "Tech4home, Lda", + /* 0536 */ "Hiotech AB", + /* 0537 */ "DOTT Limited", + /* 0538 */ "Blue Speck Labs, LLC", + /* 0539 */ "Cisco Systems, Inc", + /* 0540 */ "Mobicomm Inc", + /* 0541 */ "Edamic", + /* 0542 */ "Goodnet, Ltd", + /* 0543 */ "Luster Leaf Products Inc", + /* 0544 */ "Manus Machina BV", + /* 0545 */ "Mobiquity Networks Inc", + /* 0546 */ "Praxis Dynamics", + /* 0547 */ "Philip Morris Products S.A.", + /* 0548 */ "Comarch SA", + /* 0549 */ "Nestlé Nespresso S.A.", + /* 0550 */ "Merlinia A/S", + /* 0551 */ "LifeBEAM Technologies", + /* 0552 */ "Twocanoes Labs, LLC", + /* 0553 */ "Muoverti Limited", + /* 0554 */ "Stamer Musikanlagen GMBH", + /* 0555 */ "Tesla Motors", + /* 0556 */ "Pharynks Corporation", + /* 0557 */ "Lupine", + /* 0558 */ "Siemens AG", + /* 0559 */ "Huami (Shanghai) Culture Communication CO., LTD", + /* 0560 */ "Foster Electric Company, Ltd", + /* 0561 */ "ETA SA", + /* 0562 */ "x-Senso Solutions Kft", + /* 0563 */ "Shenzhen SuLong Communication Ltd", + /* 0564 */ "FengFan (BeiJing) Technology Co, Ltd", + /* 0565 */ "Qrio Inc", + /* 0566 */ "Pitpatpet Ltd", + /* 0567 */ "MSHeli s.r.l.", + /* 0568 */ "Trakm8 Ltd", + /* 0569 */ "JIN CO, Ltd", + /* 0570 */ "Alatech Tehnology", + /* 0571 */ "Beijing CarePulse Electronic Technology Co, Ltd", + /* 0572 */ "Awarepoint", + /* 0573 */ "ViCentra B.V.", + /* 0574 */ "Raven Industries", + /* 0575 */ "WaveWare Technologies Inc.", + /* 0576 */ "Argenox Technologies", + /* 0577 */ "Bragi GmbH", + /* 0578 */ "16Lab Inc", + /* 0579 */ "Masimo Corp", + /* 0580 */ "Iotera Inc", + /* 0581 */ "Endress+Hauser", + /* 0582 */ "ACKme Networks, Inc.", + /* 0583 */ "FiftyThree Inc.", + /* 0584 */ "Parker Hannifin Corp", + /* 0585 */ "Transcranial Ltd", + /* 0586 */ "Uwatec AG", + /* 0587 */ "Orlan LLC", + /* 0588 */ "Blue Clover Devices", + /* 0589 */ "M-Way Solutions GmbH", + /* 0590 */ "Microtronics Engineering GmbH", + /* 0591 */ "Schneider Schreibgeräte GmbH", + /* 0592 */ "Sapphire Circuits LLC", + /* 0593 */ "Lumo Bodytech Inc.", + /* 0594 */ "UKC Technosolution", + /* 0595 */ "Xicato Inc.", + /* 0596 */ "Playbrush", + /* 0597 */ "Dai Nippon Printing Co., Ltd.", + /* 0598 */ "G24 Power Limited", + /* 0599 */ "AdBabble Local Commerce Inc.", + /* 0600 */ "Devialet SA", + /* 0601 */ "ALTYOR", + /* 0602 */ "University of Applied Sciences Valais/Haute Ecole Valaisanne", + /* 0603 */ "Five Interactive, LLC dba Zendo", + /* 0604 */ "NetEase (Hangzhou) Network co.Ltd.", + /* 0605 */ "Lexmark International Inc.", + /* 0606 */ "Fluke Corporation", + /* 0607 */ "Yardarm Technologies", + /* 0608 */ "SensaRx", + /* 0609 */ "SECVRE GmbH", + /* 0610 */ "Glacial Ridge Technologies", + /* 0611 */ "Identiv, Inc.", + /* 0612 */ "DDS, Inc.", + /* 0613 */ "SMK Corporation", + /* 0614 */ "Schawbel Technologies LLC", + /* 0615 */ "XMI Systems SA", + /* 0616 */ "Cerevo", + /* 0617 */ "Torrox GmbH & Co KG", + /* 0618 */ "Gemalto", + /* 0619 */ "DEKA Research & Development Corp.", + /* 0620 */ "Domster Tadeusz Szydlowski", + /* 0621 */ "Technogym SPA", + /* 0622 */ "FLEURBAEY BVBA", + /* 0623 */ "Aptcode Solutions", + /* 0624 */ "LSI ADL Technology", + /* 0625 */ "Animas Corp", + /* 0626 */ "Alps Electric Co., Ltd.", + /* 0627 */ "OCEASOFT", + /* 0628 */ "Motsai Research", + /* 0629 */ "Geotab", + /* 0630 */ "E.G.O. Elektro-Geraetebau GmbH", + /* 0631 */ "bewhere inc", + /* 0632 */ "Johnson Outdoors Inc", + /* 0633 */ "steute Schaltgerate GmbH & Co. KG", + /* 0634 */ "Ekomini inc.", + /* 0635 */ "DEFA AS", + /* 0636 */ "Aseptika Ltd", + /* 0637 */ "HUAWEI Technologies Co., Ltd.", + /* 0638 */ "HabitAware, LLC", + /* 0639 */ "ruwido austria gmbh", + /* 0640 */ "ITEC corporation", + /* 0641 */ "StoneL", + /* 0642 */ "Sonova AG", + /* 0643 */ "Maven Machines, Inc.", + /* 0644 */ "Synapse Electronics", + /* 0645 */ "Standard Innovation Inc.", + /* 0646 */ "RF Code, Inc.", + /* 0647 */ "Wally Ventures S.L.", + /* 0648 */ "Willowbank Electronics Ltd", + /* 0649 */ "SK Telecom", + /* 0650 */ "Jetro AS", + /* 0651 */ "Code Gears LTD", + /* 0652 */ "NANOLINK APS", + /* 0653 */ "IF, LLC", + /* 0654 */ "RF Digital Corp", + /* 0655 */ "Church & Dwight Co., Inc", + /* 0656 */ "Multibit Oy", + /* 0657 */ "CliniCloud Inc", + /* 0658 */ "SwiftSensors", + /* 0659 */ "Blue Bite", + /* 0660 */ "ELIAS GmbH", + /* 0661 */ "Sivantos GmbH", + /* 0662 */ "Petzl", + /* 0663 */ "storm power ltd", + /* 0664 */ "EISST Ltd", + /* 0665 */ "Inexess Technology Simma KG", + /* 0666 */ "Currant, Inc.", + /* 0667 */ "C2 Development, Inc.", + /* 0668 */ "Blue Sky Scientific, LLC", + /* 0669 */ "ALOTTAZS LABS, LLC", + /* 0670 */ "Kupson spol. s r.o.", + /* 0671 */ "Areus Engineering GmbH", + /* 0672 */ "Impossible Camera GmbH", + /* 0673 */ "InventureTrack Systems", + /* 0674 */ "LockedUp", + /* 0675 */ "Itude", + /* 0676 */ "Pacific Lock Company", + /* 0677 */ "Tendyron Corporation", + /* 0678 */ "Robert Bosch GmbH", + /* 0679 */ "Illuxtron international B.V.", + /* 0680 */ "miSport Ltd.", + /* 0681 */ "Chargelib", + /* 0682 */ "Doppler Lab", + /* 0683 */ "BBPOS Limited", + /* 0684 */ "RTB Elektronik GmbH & Co. KG", + /* 0685 */ "Rx Networks, Inc.", + /* 0686 */ "WeatherFlow, Inc.", + /* 0687 */ "Technicolor USA Inc.", + /* 0688 */ "Bestechnic(Shanghai),Ltd", + /* 0689 */ "Raden Inc", + /* 0690 */ "JouZen Oy", + /* 0691 */ "CLABER S.P.A.", + /* 0692 */ "Hyginex, Inc.", + /* 0693 */ "HANSHIN ELECTRIC RAILWAY CO.,LTD.", + /* 0694 */ "Schneider Electric", + /* 0695 */ "Oort Technologies LLC", + /* 0696 */ "Chrono Therapeutics", + /* 0697 */ "Rinnai Corporation", + /* 0698 */ "Swissprime Technologies AG", + /* 0699 */ "Koha.,Co.Ltd", + /* 0700 */ "Genevac Ltd", + /* 0701 */ "Chemtronics", + /* 0702 */ "Seguro Technology Sp. z o.o.", + /* 0703 */ "Redbird Flight Simulations", + /* 0704 */ "Dash Robotics", + /* 0705 */ "LINE Corporation", + /* 0706 */ "Guillemot Corporation", + /* 0707 */ "Techtronic Power Tools Technology Limited", + /* 0708 */ "Wilson Sporting Goods", + /* 0709 */ "Lenovo (Singapore) Pte Ltd.", + /* 0710 */ "Ayatan Sensors", + /* 0711 */ "Electronics Tomorrow Limited", + /* 0712 */ "VASCO Data Security International, Inc.", + /* 0713 */ "PayRange Inc.", + /* 0714 */ "ABOV Semiconductor", + /* 0715 */ "AINA-Wireless Inc.", + /* 0716 */ "Eijkelkamp Soil & Water", + /* 0717 */ "BMA ergonomics b.v.", + /* 0718 */ "Teva Branded Pharmaceutical Products R&D, Inc.", + /* 0719 */ "Anima", + /* 0720 */ "3M", + /* 0721 */ "Empatica Srl", + /* 0722 */ "Afero, Inc.", + /* 0723 */ "Powercast Corporation", + /* 0724 */ "Secuyou ApS", + /* 0725 */ "OMRON Corporation", + /* 0726 */ "Send Solutions", + /* 0727 */ "NIPPON SYSTEMWARE CO.,LTD.", + /* 0728 */ "Neosfar", + /* 0729 */ "Fliegl Agrartechnik GmbH", + /* 0730 */ "Gilvader", + /* 0731 */ "Digi International Inc (R)", + /* 0732 */ "DeWalch Technologies, Inc.", + /* 0733 */ "Flint Rehabilitation Devices, LLC", + /* 0734 */ "Samsung SDS Co., Ltd.", + /* 0735 */ "Blur Product Development", + /* 0736 */ "University of Michigan", + /* 0737 */ "Victron Energy BV", + /* 0738 */ "NTT docomo", + /* 0739 */ "Carmanah Technologies Corp.", + /* 0740 */ "Bytestorm Ltd.", + /* 0741 */ "Espressif Incorporated", + /* 0742 */ "Unwire", + /* 0743 */ "Connected Yard, Inc.", + /* 0744 */ "American Music Environments", + /* 0745 */ "Sensogram Technologies, Inc.", + /* 0746 */ "Fujitsu Limited", + /* 0747 */ "Ardic Technology", + /* 0748 */ "Delta Systems, Inc", + /* 0749 */ "HTC Corporation", + /* 0750 */ "Citizen Holdings Co., Ltd.", + /* 0751 */ "SMART-INNOVATION.inc", + /* 0752 */ "Blackrat Software", + /* 0753 */ "The Idea Cave, LLC", + /* 0754 */ "GoPro, Inc.", + /* 0755 */ "AuthAir, Inc", + /* 0756 */ "Vensi, Inc.", + /* 0757 */ "Indagem Tech LLC", + /* 0758 */ "Intemo Technologies", + /* 0759 */ "DreamVisions co., Ltd.", + /* 0760 */ "Runteq Oy Ltd", + /* 0761 */ "IMAGINATION TECHNOLOGIES LTD", + /* 0762 */ "CoSTAR TEchnologies", + /* 0763 */ "Clarius Mobile Health Corp.", + /* 0764 */ "Shanghai Frequen Microelectronics Co., Ltd.", + /* 0765 */ "Uwanna, Inc.", + /* 0766 */ "Lierda Science & Technology Group Co., Ltd.", + /* 0767 */ "Silicon Laboratories", + /* 0768 */ "World Moto Inc.", + /* 0769 */ "Giatec Scientific Inc.", + /* 0770 */ "Loop Devices, Inc", + /* 0771 */ "IACA electronique", + /* 0772 */ "Proxy Technologies, Inc.", + /* 0773 */ "Swipp ApS", + /* 0774 */ "Life Laboratory Inc.", + /* 0775 */ "FUJI INDUSTRIAL CO.,LTD.", + /* 0776 */ "Surefire, LLC", + /* 0777 */ "Dolby Labs", + /* 0778 */ "Ellisys", + /* 0779 */ "Magnitude Lighting Converters", + /* 0780 */ "Hilti AG", + /* 0781 */ "Devdata S.r.l.", + /* 0782 */ "Deviceworx", + /* 0783 */ "Shortcut Labs", + /* 0784 */ "SGL Italia S.r.l.", + /* 0785 */ "PEEQ DATA", + /* 0786 */ "Ducere Technologies Pvt Ltd", + /* 0787 */ "DiveNav, Inc.", + /* 0788 */ "RIIG AI Sp. z o.o.", + /* 0789 */ "Thermo Fisher Scientific", + /* 0790 */ "AG Measurematics Pvt. Ltd.", + /* 0791 */ "CHUO Electronics CO., LTD.", + /* 0792 */ "Aspenta International", + /* 0793 */ "Eugster Frismag AG", + /* 0794 */ "Amber wireless GmbH", + /* 0795 */ "HQ Inc", + /* 0796 */ "Lab Sensor Solutions", + /* 0797 */ "Enterlab ApS", + /* 0798 */ "Eyefi, Inc.", + /* 0799 */ "MetaSystem S.p.A.", + /* 0800 */ "SONO ELECTRONICS. CO., LTD", + /* 0801 */ "Jewelbots", + /* 0802 */ "Compumedics Limited", + /* 0803 */ "Rotor Bike Components", + /* 0804 */ "Astro, Inc.", + /* 0805 */ "Amotus Solutions", + /* 0806 */ "Healthwear Technologies (Changzhou)Ltd", + /* 0807 */ "Essex Electronics", + /* 0808 */ "Grundfos A/S", + /* 0809 */ "Eargo, Inc.", + /* 0810 */ "Electronic Design Lab", + /* 0811 */ "ESYLUX", + /* 0812 */ "NIPPON SMT.CO.,Ltd", + /* 0813 */ "BM innovations GmbH", + /* 0814 */ "indoormap", + /* 0815 */ "OttoQ Inc", + /* 0816 */ "North Pole Engineering", + /* 0817 */ "3flares Technologies Inc.", + /* 0818 */ "Electrocompaniet A.S.", + /* 0819 */ "Mul-T-Lock", + /* 0820 */ "Corentium AS", + /* 0821 */ "Enlighted Inc", + /* 0822 */ "GISTIC", + /* 0823 */ "AJP2 Holdings, LLC", + /* 0824 */ "COBI GmbH", + /* 0825 */ "Blue Sky Scientific, LLC", + /* 0826 */ "Appception, Inc.", + /* 0827 */ "Courtney Thorne Limited", + /* 0828 */ "Virtuosys", + /* 0829 */ "TPV Technology Limited", + /* 0830 */ "Monitra SA", + /* 0831 */ "Automation Components, Inc.", + /* 0832 */ "Letsense s.r.l.", + /* 0833 */ "Etesian Technologies LLC", + /* 0834 */ "GERTEC BRASIL LTDA.", + /* 0835 */ "Drekker Development Pty. Ltd.", + /* 0836 */ "Whirl Inc", + /* 0837 */ "Locus Positioning", + /* 0838 */ "Acuity Brands Lighting, Inc", + /* 0839 */ "Prevent Biometrics", + /* 0840 */ "Arioneo", + /* 0841 */ "VersaMe", + /* 0842 */ "Vaddio", + /* 0843 */ "Libratone A/S", + /* 0844 */ "HM Electronics, Inc.", + /* 0845 */ "TASER International, Inc.", + /* 0846 */ "SafeTrust Inc.", + /* 0847 */ "Heartland Payment Systems", + /* 0848 */ "Bitstrata Systems Inc.", + /* 0849 */ "Pieps GmbH", + /* 0850 */ "iRiding(Xiamen)Technology Co.,Ltd.", + /* 0851 */ "Alpha Audiotronics, Inc.", + /* 0852 */ "TOPPAN FORMS CO.,LTD.", + /* 0853 */ "Sigma Designs, Inc.", + /* 0854 */ "Spectrum Brands, Inc.", + /* 0855 */ "Polymap Wireless", + /* 0856 */ "MagniWare Ltd.", + /* 0857 */ "Novotec Medical GmbH", + /* 0858 */ "Medicom Innovation Partner a/s", + /* 0859 */ "Matrix Inc.", + /* 0860 */ "Eaton Corporation", + /* 0861 */ "KYS", + /* 0862 */ "Naya Health, Inc.", + /* 0863 */ "Acromag", + /* 0864 */ "Insulet Corporation", + /* 0865 */ "Wellinks Inc.", + /* 0866 */ "ON Semiconductor", + /* 0867 */ "FREELAP SA", + /* 0868 */ "Favero Electronics Srl", + /* 0869 */ "BioMech Sensor LLC", + /* 0870 */ "BOLTT Sports technologies Private limited", + /* 0871 */ "Saphe International", + /* 0872 */ "Metormote AB", + /* 0873 */ "littleBits", + /* 0874 */ "SetPoint Medical", + /* 0875 */ "BRControls Products BV", + /* 0876 */ "Zipcar", + /* 0877 */ "AirBolt Pty Ltd", + /* 0878 */ "KeepTruckin Inc", + /* 0879 */ "Motiv, Inc.", + /* 0880 */ "Wazombi Labs OU", + /* 0881 */ "ORBCOMM", + /* 0882 */ "Nixie Labs, Inc.", + /* 0883 */ "AppNearMe Ltd", + /* 0884 */ "Holman Industries", + /* 0885 */ "Expain AS", + /* 0886 */ "Electronic Temperature Instruments Ltd", + /* 0887 */ "Plejd AB", + /* 0888 */ "Propeller Health", + /* 0889 */ "Shenzhen iMCO Electronic Technology Co.,Ltd", + /* 0890 */ "Algoria", + /* 0891 */ "Apption Labs Inc.", + /* 0892 */ "Cronologics Corporation", + /* 0893 */ "MICRODIA Ltd.", + /* 0894 */ "lulabytes S.L.", + /* 0895 */ "Societe des Produits Nestle S.A. (formerly Nestec S.A.)", + /* 0896 */ "LLC \"MEGA-F service\"", + /* 0897 */ "Sharp Corporation", + /* 0898 */ "Precision Outcomes Ltd", + /* 0899 */ "Kronos Incorporated", + /* 0900 */ "OCOSMOS Co., Ltd.", + /* 0901 */ "Embedded Electronic Solutions Ltd. dba e2Solutions", + /* 0902 */ "Aterica Inc.", + /* 0903 */ "BluStor PMC, Inc.", + /* 0904 */ "Kapsch TrafficCom AB", + /* 0905 */ "ActiveBlu Corporation", + /* 0906 */ "Kohler Mira Limited", + /* 0907 */ "Noke", + /* 0908 */ "Appion Inc.", + /* 0909 */ "Resmed Ltd", + /* 0910 */ "Crownstone B.V.", + /* 0911 */ "Xiaomi Inc.", + /* 0912 */ "INFOTECH s.r.o.", + /* 0913 */ "Thingsquare AB", + /* 0914 */ "T&D", + /* 0915 */ "LAVAZZA S.p.A.", + /* 0916 */ "Netclearance Systems, Inc.", + /* 0917 */ "SDATAWAY", + /* 0918 */ "BLOKS GmbH", + /* 0919 */ "LEGO System A/S", + /* 0920 */ "Thetatronics Ltd", + /* 0921 */ "Nikon Corporation", + /* 0922 */ "NeST", + /* 0923 */ "South Silicon Valley Microelectronics", + /* 0924 */ "ALE International", + /* 0925 */ "CareView Communications, Inc.", + /* 0926 */ "SchoolBoard Limited", + /* 0927 */ "Molex Corporation", + /* 0928 */ "IVT Wireless Limited", + /* 0929 */ "Alpine Labs LLC", + /* 0930 */ "Candura Instruments", + /* 0931 */ "SmartMovt Technology Co., Ltd", + /* 0932 */ "Token Zero Ltd", + /* 0933 */ "ACE CAD Enterprise Co., Ltd. (ACECAD)", + /* 0934 */ "Medela, Inc", + /* 0935 */ "AeroScout", + /* 0936 */ "Esrille Inc.", + /* 0937 */ "THINKERLY SRL", + /* 0938 */ "Exon Sp. z o.o.", + /* 0939 */ "Meizu Technology Co., Ltd.", + /* 0940 */ "Smablo LTD", + /* 0941 */ "XiQ", + /* 0942 */ "Allswell Inc.", + /* 0943 */ "Comm-N-Sense Corp DBA Verigo", + /* 0944 */ "VIBRADORM GmbH", + /* 0945 */ "Otodata Wireless Network Inc.", + /* 0946 */ "Propagation Systems Limited", + /* 0947 */ "Midwest Instruments & Controls", + /* 0948 */ "Alpha Nodus, inc.", + /* 0949 */ "petPOMM, Inc", + /* 0950 */ "Mattel", + /* 0951 */ "Airbly Inc.", + /* 0952 */ "A-Safe Limited", + /* 0953 */ "FREDERIQUE CONSTANT SA", + /* 0954 */ "Maxscend Microelectronics Company Limited", + /* 0955 */ "Abbott", + /* 0956 */ "ASB Bank Ltd", + /* 0957 */ "amadas", + /* 0958 */ "Applied Science, Inc.", + /* 0959 */ "iLumi Solutions Inc.", + /* 0960 */ "Arch Systems Inc.", + /* 0961 */ "Ember Technologies, Inc.", + /* 0962 */ "Snapchat Inc", + /* 0963 */ "Casambi Technologies Oy", + /* 0964 */ "Pico Technology Inc.", + /* 0965 */ "St. Jude Medical, Inc.", + /* 0966 */ "Intricon", + /* 0967 */ "Structural Health Systems, Inc.", + /* 0968 */ "Avvel International", + /* 0969 */ "Gallagher Group", + /* 0970 */ "In2things Automation Pvt. Ltd.", + /* 0971 */ "SYSDEV Srl", + /* 0972 */ "Vonkil Technologies Ltd", + /* 0973 */ "Wynd Technologies, Inc.", + /* 0974 */ "CONTRINEX S.A.", + /* 0975 */ "MIRA, Inc.", + /* 0976 */ "Watteam Ltd", + /* 0977 */ "Density Inc.", + /* 0978 */ "IOT Pot India Private Limited", + /* 0979 */ "Sigma Connectivity AB", *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Apr 21 19:07:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC0F82B5959; Tue, 21 Apr 2020 19:07:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496CkY5tsTz3N03; Tue, 21 Apr 2020 19:07:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C50946018; Tue, 21 Apr 2020 19:07:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LJ7naV069019; Tue, 21 Apr 2020 19:07:49 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LJ7kQQ069002; Tue, 21 Apr 2020 19:07:46 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202004211907.03LJ7kQQ069002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 21 Apr 2020 19:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r360173 - in vendor-crypto/openssl/dist: . apps crypto/aes crypto/asn1 crypto/bio crypto/ec crypto/evp crypto/rand crypto/x509 crypto/x509v3 doc/man1 doc/man3 include/openssl ssl X-SVN-Group: vendor-crypto X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-crypto/openssl/dist: . apps crypto/aes crypto/asn1 crypto/bio crypto/ec crypto/evp crypto/rand crypto/x509 crypto/x509v3 doc/man1 doc/man3 include/openssl ssl X-SVN-Commit-Revision: 360173 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 19:07:49 -0000 Author: jkim Date: Tue Apr 21 19:07:46 2020 New Revision: 360173 URL: https://svnweb.freebsd.org/changeset/base/360173 Log: Import OpenSSL 1.1.1g. Added: vendor-crypto/openssl/dist/doc/man3/X509_check_purpose.pod Modified: vendor-crypto/openssl/dist/CHANGES vendor-crypto/openssl/dist/FREEBSD-upgrade vendor-crypto/openssl/dist/INSTALL vendor-crypto/openssl/dist/NEWS vendor-crypto/openssl/dist/README vendor-crypto/openssl/dist/apps/build.info vendor-crypto/openssl/dist/apps/dhparam.c vendor-crypto/openssl/dist/apps/dsa.c vendor-crypto/openssl/dist/apps/dsaparam.c vendor-crypto/openssl/dist/apps/ec.c vendor-crypto/openssl/dist/apps/ecparam.c vendor-crypto/openssl/dist/apps/engine.c vendor-crypto/openssl/dist/apps/gendsa.c vendor-crypto/openssl/dist/apps/genrsa.c vendor-crypto/openssl/dist/apps/ocsp.c vendor-crypto/openssl/dist/apps/pkcs12.c vendor-crypto/openssl/dist/apps/rsa.c vendor-crypto/openssl/dist/apps/rsautl.c vendor-crypto/openssl/dist/apps/s_time.c vendor-crypto/openssl/dist/apps/srp.c vendor-crypto/openssl/dist/apps/ts.c vendor-crypto/openssl/dist/crypto/aes/aes_core.c vendor-crypto/openssl/dist/crypto/aes/aes_local.h vendor-crypto/openssl/dist/crypto/asn1/asn1_lib.c vendor-crypto/openssl/dist/crypto/bio/bss_acpt.c vendor-crypto/openssl/dist/crypto/ec/ec_asn1.c vendor-crypto/openssl/dist/crypto/ec/ec_lib.c vendor-crypto/openssl/dist/crypto/ec/ec_mult.c vendor-crypto/openssl/dist/crypto/ec/ecp_smpl.c vendor-crypto/openssl/dist/crypto/evp/e_aes.c vendor-crypto/openssl/dist/crypto/rand/build.info vendor-crypto/openssl/dist/crypto/rand/drbg_ctr.c vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c vendor-crypto/openssl/dist/crypto/x509v3/v3_purp.c vendor-crypto/openssl/dist/doc/man1/s_time.pod vendor-crypto/openssl/dist/doc/man3/EVP_aes.pod vendor-crypto/openssl/dist/doc/man3/RAND_set_rand_method.pod vendor-crypto/openssl/dist/include/openssl/opensslv.h vendor-crypto/openssl/dist/ssl/t1_lib.c Modified: vendor-crypto/openssl/dist/CHANGES ============================================================================== --- vendor-crypto/openssl/dist/CHANGES Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/CHANGES Tue Apr 21 19:07:46 2020 (r360173) @@ -7,6 +7,27 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1f and 1.1.1g [21 Apr 2020] + + *) Fixed segmentation fault in SSL_check_chain() + Server or client applications that call the SSL_check_chain() function + during or after a TLS 1.3 handshake may crash due to a NULL pointer + dereference as a result of incorrect handling of the + "signature_algorithms_cert" TLS extension. The crash occurs if an invalid + or unrecognised signature algorithm is received from the peer. This could + be exploited by a malicious peer in a Denial of Service attack. + (CVE-2020-1967) + [Benjamin Kaduk] + + *) Added AES consttime code for no-asm configurations + an optional constant time support for AES was added + when building openssl for no-asm. + Enable with: ./config no-asm -DOPENSSL_AES_CONST_TIME + Disable with: ./config no-asm -DOPENSSL_NO_AES_CONST_TIME + At this time this feature is by default disabled. + It will be enabled by default in 3.0. + [Bernd Edlinger] + Changes between 1.1.1e and 1.1.1f [31 Mar 2020] *) Revert the change of EOF detection while reading in libssl to avoid Modified: vendor-crypto/openssl/dist/FREEBSD-upgrade ============================================================================== --- vendor-crypto/openssl/dist/FREEBSD-upgrade Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/FREEBSD-upgrade Tue Apr 21 19:07:46 2020 (r360173) @@ -11,7 +11,7 @@ First, read http://wiki.freebsd.org/SubversionPrimer/V # Xlist setenv XLIST /FreeBSD/work/openssl/svn-FREEBSD-files/FREEBSD-Xlist setenv FSVN "svn+ssh://repo.freebsd.org/base" -setenv OSSLVER 1.1.1e +setenv OSSLVER 1.1.1g ###setenv OSSLTAG v`echo ${OSSLVER} | tr . _` Modified: vendor-crypto/openssl/dist/INSTALL ============================================================================== --- vendor-crypto/openssl/dist/INSTALL Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/INSTALL Tue Apr 21 19:07:46 2020 (r360173) @@ -535,9 +535,9 @@ conjunction with the "-DPEDANTIC" option (or the --strict-warnings option). - no-ui - Don't build with the "UI" capability (i.e. the set of - features enabling text based prompts). + no-ui-console + Don't build with the "UI" console method (i.e. the "UI" + method that enables text based console prompts). enable-unit-test Enable additional unit test APIs. This should not typically Modified: vendor-crypto/openssl/dist/NEWS ============================================================================== --- vendor-crypto/openssl/dist/NEWS Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/NEWS Tue Apr 21 19:07:46 2020 (r360173) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1f and OpenSSL 1.1.1g [21 Apr 2020] + + o Fixed segmentation fault in SSL_check_chain() (CVE-2020-1967) + Major changes between OpenSSL 1.1.1e and OpenSSL 1.1.1f [31 Mar 2020] o Revert the unexpected EOF reporting via SSL_ERROR_SSL Modified: vendor-crypto/openssl/dist/README ============================================================================== --- vendor-crypto/openssl/dist/README Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/README Tue Apr 21 19:07:46 2020 (r360173) @@ -1,5 +1,5 @@ - OpenSSL 1.1.1f 31 Mar 2020 + OpenSSL 1.1.1g 21 Apr 2020 Copyright (c) 1998-2020 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: vendor-crypto/openssl/dist/apps/build.info ============================================================================== --- vendor-crypto/openssl/dist/apps/build.info Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/apps/build.info Tue Apr 21 19:07:46 2020 (r360173) @@ -1,16 +1,17 @@ {- our @apps_openssl_src = qw(openssl.c - asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c - dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c - genpkey.c genrsa.c nseq.c ocsp.c passwd.c pkcs12.c pkcs7.c pkcs8.c - pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c + asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c + enc.c errstr.c + genpkey.c nseq.c passwd.c pkcs7.c pkcs8.c + pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c s_client.c s_server.c s_time.c sess_id.c smime.c speed.c spkac.c - srp.c ts.c verify.c version.c x509.c rehash.c storeutl.c); + verify.c version.c x509.c rehash.c storeutl.c); our @apps_lib_src = ( qw(apps.c opt.c s_cb.c s_socket.c app_rand.c bf_prefix.c), split(/\s+/, $target{apps_aux_src}) ); our @apps_init_src = split(/\s+/, $target{apps_init_src}); "" -} + IF[{- !$disabled{apps} -}] LIBS_NO_INST=libapps.a SOURCE[libapps.a]={- join(" ", @apps_lib_src) -} @@ -21,11 +22,51 @@ IF[{- !$disabled{apps} -}] SOURCE[openssl]={- join(" ", @apps_openssl_src) -} INCLUDE[openssl]=.. ../include DEPEND[openssl]=libapps.a ../libssl - -IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}] - GENERATE[openssl.rc]=../util/mkrc.pl openssl - SOURCE[openssl]=openssl.rc -ENDIF + IF[{- !$disabled{'des'} -}] + SOURCE[openssl]=pkcs12.c + DEPEND[pkcs12.o]=progs.h + ENDIF + IF[{- !$disabled{'ec'} -}] + SOURCE[openssl]=ec.c ecparam.c + DEPEND[ec.o]=progs.h + DEPEND[ecparam.o]=progs.h + ENDIF + IF[{- !$disabled{'ocsp'} -}] + SOURCE[openssl]=ocsp.c + DEPEND[ocsp.o]=progs.h + ENDIF + IF[{- !$disabled{'srp'} -}] + SOURCE[openssl]=srp.c + DEPEND[srp.o]=progs.h + ENDIF + IF[{- !$disabled{'ts'} -}] + SOURCE[openssl]=ts.c + DEPEND[ts.o]=progs.h + ENDIF + IF[{- !$disabled{'dh'} -}] + SOURCE[openssl]=dhparam.c + DEPEND[dhparam.o]=progs.h + ENDIF + IF[{- !$disabled{'dsa'} -}] + SOURCE[openssl]=dsa.c dsaparam.c gendsa.c + DEPEND[dsa.o]=progs.h + DEPEND[dsaparam.o]=progs.h + DEPEND[gendsa.o]=progs.h + ENDIF + IF[{- !$disabled{'engine'} -}] + SOURCE[openssl]=engine.c + DEPEND[engine.o]=progs.h + ENDIF + IF[{- !$disabled{'rsa'} -}] + SOURCE[openssl]=rsa.c rsautl.c genrsa.c + DEPEND[rsa.o]=progs.h + DEPEND[rsautl.o]=progs.h + DEPEND[genrsa.o]=progs.h + ENDIF + IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}] + GENERATE[openssl.rc]=../util/mkrc.pl openssl + SOURCE[openssl]=openssl.rc + ENDIF {- join("\n ", map { (my $x = $_) =~ s|\.c$|.o|; "DEPEND[$x]=progs.h" } @apps_openssl_src) -} Modified: vendor-crypto/openssl/dist/apps/dhparam.c ============================================================================== --- vendor-crypto/openssl/dist/apps/dhparam.c Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/apps/dhparam.c Tue Apr 21 19:07:46 2020 (r360173) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,29 +8,25 @@ */ #include -#ifdef OPENSSL_NO_DH -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include +#ifndef OPENSSL_NO_DSA +# include +#endif -# ifndef OPENSSL_NO_DSA -# include -# endif +#define DEFBITS 2048 -# define DEFBITS 2048 - static int dh_cb(int p, int n, BN_GENCB *cb); typedef enum OPTION_choice { @@ -56,13 +52,13 @@ const OPTIONS dhparam_options[] = { {"C", OPT_C, '-', "Print C code"}, {"2", OPT_2, '-', "Generate parameters using 2 as the generator value"}, {"5", OPT_5, '-', "Generate parameters using 5 as the generator value"}, -# ifndef OPENSSL_NO_DSA +#ifndef OPENSSL_NO_DSA {"dsaparam", OPT_DSAPARAM, '-', "Read or generate DSA parameters, convert to DH"}, -# endif -# ifndef OPENSSL_NO_ENGINE +#endif +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -146,13 +142,13 @@ int dhparam_main(int argc, char **argv) if (g && !num) num = DEFBITS; -# ifndef OPENSSL_NO_DSA +#ifndef OPENSSL_NO_DSA if (dsaparam && g) { BIO_printf(bio_err, "generator may not be chosen for DSA parameters\n"); goto end; } -# endif +#endif out = bio_open_default(outfile, 'w', outformat); if (out == NULL) @@ -173,7 +169,7 @@ int dhparam_main(int argc, char **argv) BN_GENCB_set(cb, dh_cb, bio_err); -# ifndef OPENSSL_NO_DSA +#ifndef OPENSSL_NO_DSA if (dsaparam) { DSA *dsa = DSA_new(); @@ -196,7 +192,7 @@ int dhparam_main(int argc, char **argv) goto end; } } else -# endif +#endif { dh = DH_new(); BIO_printf(bio_err, @@ -217,7 +213,7 @@ int dhparam_main(int argc, char **argv) if (in == NULL) goto end; -# ifndef OPENSSL_NO_DSA +#ifndef OPENSSL_NO_DSA if (dsaparam) { DSA *dsa; @@ -239,7 +235,7 @@ int dhparam_main(int argc, char **argv) goto end; } } else -# endif +#endif { if (informat == FORMAT_ASN1) { /* @@ -376,4 +372,3 @@ static int dh_cb(int p, int n, BN_GENCB *cb) (void)BIO_flush(BN_GENCB_get_arg(cb)); return 1; } -#endif Modified: vendor-crypto/openssl/dist/apps/dsa.c ============================================================================== --- vendor-crypto/openssl/dist/apps/dsa.c Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/apps/dsa.c Tue Apr 21 19:07:46 2020 (r360173) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,24 +8,20 @@ */ #include -#ifdef OPENSSL_NO_DSA -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include -# include - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_INFORM, OPT_OUTFORM, OPT_IN, OPT_OUT, OPT_ENGINE, @@ -49,14 +45,14 @@ const OPTIONS dsa_options[] = { {"passin", OPT_PASSIN, 's', "Input file pass phrase source"}, {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, {"", OPT_CIPHER, '-', "Any supported cipher"}, -# ifndef OPENSSL_NO_RC4 +#ifndef OPENSSL_NO_RC4 {"pvk-strong", OPT_PVK_STRONG, '-', "Enable 'Strong' PVK encoding level (default)"}, {"pvk-weak", OPT_PVK_WEAK, '-', "Enable 'Weak' PVK encoding level"}, {"pvk-none", OPT_PVK_NONE, '-', "Don't enforce PVK encoding"}, -# endif -# ifndef OPENSSL_NO_ENGINE +#endif +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -71,9 +67,9 @@ int dsa_main(int argc, char **argv) OPTION_CHOICE o; int informat = FORMAT_PEM, outformat = FORMAT_PEM, text = 0, noout = 0; int i, modulus = 0, pubin = 0, pubout = 0, ret = 1; -# ifndef OPENSSL_NO_RC4 +#ifndef OPENSSL_NO_RC4 int pvk_encr = 2; -# endif +#endif int private = 0; prog = opt_init(argc, argv, dsa_options); @@ -214,7 +210,7 @@ int dsa_main(int argc, char **argv) i = PEM_write_bio_DSAPrivateKey(out, dsa, enc, NULL, 0, NULL, passout); } -# ifndef OPENSSL_NO_RSA +#ifndef OPENSSL_NO_RSA } else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) { EVP_PKEY *pk; pk = EVP_PKEY_new(); @@ -229,13 +225,13 @@ int dsa_main(int argc, char **argv) goto end; } assert(private); -# ifdef OPENSSL_NO_RC4 +# ifdef OPENSSL_NO_RC4 BIO_printf(bio_err, "PVK format not supported\n"); EVP_PKEY_free(pk); goto end; -# else +# else i = i2b_PVK_bio(out, pk, pvk_encr, 0, passout); -# endif +# endif } else if (pubin || pubout) { i = i2b_PublicKey_bio(out, pk); } else { @@ -243,7 +239,7 @@ int dsa_main(int argc, char **argv) i = i2b_PrivateKey_bio(out, pk); } EVP_PKEY_free(pk); -# endif +#endif } else { BIO_printf(bio_err, "bad output format specified for outfile\n"); goto end; @@ -262,4 +258,3 @@ int dsa_main(int argc, char **argv) OPENSSL_free(passout); return ret; } -#endif Modified: vendor-crypto/openssl/dist/apps/dsaparam.c ============================================================================== --- vendor-crypto/openssl/dist/apps/dsaparam.c Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/apps/dsaparam.c Tue Apr 21 19:07:46 2020 (r360173) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,23 +8,19 @@ */ #include -#ifdef OPENSSL_NO_DSA -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include - static int dsa_cb(int p, int n, BN_GENCB *cb); typedef enum OPTION_choice { @@ -44,9 +40,9 @@ const OPTIONS dsaparam_options[] = { {"noout", OPT_NOOUT, '-', "No output"}, {"genkey", OPT_GENKEY, '-', "Generate a DSA key"}, OPT_R_OPTIONS, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -255,4 +251,3 @@ static int dsa_cb(int p, int n, BN_GENCB *cb) (void)BIO_flush(BN_GENCB_get_arg(cb)); return 1; } -#endif Modified: vendor-crypto/openssl/dist/apps/ec.c ============================================================================== --- vendor-crypto/openssl/dist/apps/ec.c Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/apps/ec.c Tue Apr 21 19:07:46 2020 (r360173) @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,20 +8,16 @@ */ #include -#ifdef OPENSSL_NO_EC -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include - static OPT_PAIR conv_forms[] = { {"compressed", POINT_CONVERSION_COMPRESSED}, {"uncompressed", POINT_CONVERSION_UNCOMPRESSED}, @@ -62,9 +58,9 @@ const OPTIONS ec_options[] = { "Specifies the way the ec parameters are encoded"}, {"conv_form", OPT_CONV_FORM, 's', "Specifies the point conversion form "}, {"", OPT_CIPHER, '-', "Any supported cipher"}, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -280,4 +276,3 @@ int ec_main(int argc, char **argv) OPENSSL_free(passout); return ret; } -#endif Modified: vendor-crypto/openssl/dist/apps/ecparam.c ============================================================================== --- vendor-crypto/openssl/dist/apps/ecparam.c Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/apps/ecparam.c Tue Apr 21 19:07:46 2020 (r360173) @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (the "License"). You may not use @@ -9,23 +9,19 @@ */ #include -#ifdef OPENSSL_NO_EC -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_INFORM, OPT_OUTFORM, OPT_IN, OPT_OUT, OPT_TEXT, OPT_C, @@ -55,9 +51,9 @@ const OPTIONS ecparam_options[] = { "Specifies the way the ec parameters are encoded"}, {"genkey", OPT_GENKEY, '-', "Generate ec key"}, OPT_R_OPTIONS, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -446,5 +442,3 @@ int ecparam_main(int argc, char **argv) BIO_free_all(out); return ret; } - -#endif Modified: vendor-crypto/openssl/dist/apps/engine.c ============================================================================== --- vendor-crypto/openssl/dist/apps/engine.c Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/apps/engine.c Tue Apr 21 19:07:46 2020 (r360173) @@ -1,5 +1,5 @@ /* - * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,20 +8,16 @@ */ #include -#ifdef OPENSSL_NO_ENGINE -NON_EMPTY_TRANSLATION_UNIT -#else +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include +#include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include -# include - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_C, OPT_T, OPT_TT, OPT_PRE, OPT_POST, @@ -486,4 +482,3 @@ int engine_main(int argc, char **argv) BIO_free_all(out); return ret; } -#endif Modified: vendor-crypto/openssl/dist/apps/gendsa.c ============================================================================== --- vendor-crypto/openssl/dist/apps/gendsa.c Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/apps/gendsa.c Tue Apr 21 19:07:46 2020 (r360173) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,23 +8,19 @@ */ #include -#ifdef OPENSSL_NO_DSA -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_OUT, OPT_PASSOUT, OPT_ENGINE, OPT_CIPHER, @@ -39,9 +35,9 @@ const OPTIONS gendsa_options[] = { {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, OPT_R_OPTIONS, {"", OPT_CIPHER, '-', "Encrypt the output with any supported cipher"}, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -143,4 +139,3 @@ int gendsa_main(int argc, char **argv) OPENSSL_free(passout); return ret; } -#endif Modified: vendor-crypto/openssl/dist/apps/genrsa.c ============================================================================== --- vendor-crypto/openssl/dist/apps/genrsa.c Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/apps/genrsa.c Tue Apr 21 19:07:46 2020 (r360173) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,28 +8,24 @@ */ #include -#ifdef OPENSSL_NO_RSA -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include -# include -# include +#define DEFBITS 2048 +#define DEFPRIMES 2 -# define DEFBITS 2048 -# define DEFPRIMES 2 - static int genrsa_cb(int p, int n, BN_GENCB *cb); typedef enum OPTION_choice { @@ -48,9 +44,9 @@ const OPTIONS genrsa_options[] = { OPT_R_OPTIONS, {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, {"", OPT_CIPHER, '-', "Encrypt the output with any supported cipher"}, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif {"primes", OPT_PRIMES, 'p', "Specify number of primes"}, {NULL} }; @@ -198,4 +194,3 @@ static int genrsa_cb(int p, int n, BN_GENCB *cb) (void)BIO_flush(BN_GENCB_get_arg(cb)); return 1; } -#endif Modified: vendor-crypto/openssl/dist/apps/ocsp.c ============================================================================== --- vendor-crypto/openssl/dist/apps/ocsp.c Tue Apr 21 17:51:54 2020 (r360172) +++ vendor-crypto/openssl/dist/apps/ocsp.c Tue Apr 21 19:07:46 2020 (r360173) @@ -1,5 +1,5 @@ /* - * Copyright 2001-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -9,65 +9,62 @@ #include -#ifdef OPENSSL_NO_OCSP -NON_EMPTY_TRANSLATION_UNIT -#else -# ifdef OPENSSL_SYS_VMS -# define _XOPEN_SOURCE_EXTENDED/* So fd_set and friends get properly defined +#ifdef OPENSSL_SYS_VMS +# define _XOPEN_SOURCE_EXTENDED/* So fd_set and friends get properly defined * on OpenVMS */ -# endif +#endif -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include /* Needs to be included before the openssl headers */ -# include "apps.h" -# include "progs.h" -# include "internal/sockets.h" -# include -# include -# include -# include -# include -# include -# include -# include +#include "apps.h" +#include "progs.h" +#include "internal/sockets.h" +#include +#include +#include +#include +#include +#include +#include +#include #ifndef HAVE_FORK -# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) -# define HAVE_FORK 0 -# else -# define HAVE_FORK 1 -# endif +#if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) +# define HAVE_FORK 0 +#else +# define HAVE_FORK 1 #endif +#endif #if HAVE_FORK -# undef NO_FORK +#undef NO_FORK #else -# define NO_FORK +#define NO_FORK #endif -# if !defined(NO_FORK) && !defined(OPENSSL_NO_SOCK) \ +#if !defined(NO_FORK) && !defined(OPENSSL_NO_SOCK) \ && !defined(OPENSSL_NO_POSIX_IO) -# define OCSP_DAEMON -# include -# include -# include -# include -# define MAXERRLEN 1000 /* limit error text sent to syslog to 1000 bytes */ -# else -# undef LOG_INFO -# undef LOG_WARNING -# undef LOG_ERR -# define LOG_INFO 0 -# define LOG_WARNING 1 -# define LOG_ERR 2 -# endif +# define OCSP_DAEMON +# include +# include +# include +# include +# define MAXERRLEN 1000 /* limit error text sent to syslog to 1000 bytes */ +#else +# undef LOG_INFO +# undef LOG_WARNING +# undef LOG_ERR +# define LOG_INFO 0 +# define LOG_WARNING 1 +# define LOG_ERR 2 +#endif -# if defined(OPENSSL_SYS_VXWORKS) +#if defined(OPENSSL_SYS_VXWORKS) /* not supported */ int setpgid(pid_t pid, pid_t pgid) { @@ -80,9 +77,9 @@ pid_t fork(void) errno = ENOSYS; return (pid_t) -1; } -# endif +#endif /* Maximum leeway in validity period: default 5 minutes */ -# define MAX_VALIDITY_PERIOD (5 * 60) +#define MAX_VALIDITY_PERIOD (5 * 60) static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, const EVP_MD *cert_id_md, X509 *issuer, @@ -109,20 +106,20 @@ static void log_message(int level, const char *fmt, .. static char *prog; static int multi = 0; -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON static int acfd = (int) INVALID_SOCKET; static int index_changed(CA_DB *); static void spawn_loop(void); static int print_syslog(const char *str, size_t len, void *levPtr); static void socket_timeout(int signum); -# endif +#endif -# ifndef OPENSSL_NO_SOCK +#ifndef OPENSSL_NO_SOCK static OCSP_RESPONSE *query_responder(BIO *cbio, const char *host, const char *path, const STACK_OF(CONF_VALUE) *headers, OCSP_REQUEST *req, int req_timeout); -# endif +#endif typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, @@ -160,9 +157,9 @@ const OPTIONS ocsp_options[] = { "Don't include any certificates in response"}, {"resp_key_id", OPT_RESP_KEY_ID, '-', "Identify response by signing certificate key ID"}, -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON {"multi", OPT_MULTI, 'p', "run multiple responder processes"}, -# endif +#endif {"no_certs", OPT_NO_CERTS, '-', "Don't include any certificates in signed request"}, {"no_signature_verify", OPT_NO_SIGNATURE_VERIFY, '-', @@ -511,9 +508,9 @@ int ocsp_main(int argc, char **argv) trailing_md = 1; break; case OPT_MULTI: -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON multi = atoi(opt_arg()); -# endif +#endif break; } } @@ -593,7 +590,7 @@ int ocsp_main(int argc, char **argv) } } -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON if (multi && acbio != NULL) spawn_loop(); if (acbio != NULL && req_timeout > 0) @@ -606,7 +603,7 @@ int ocsp_main(int argc, char **argv) redo_accept: if (acbio != NULL) { -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON if (index_changed(rdb)) { CA_DB *newrdb = load_index(ridx_filename, NULL); @@ -619,7 +616,7 @@ redo_accept: ridx_filename); } } -# endif +#endif req = NULL; if (!do_responder(&req, &cbio, acbio, req_timeout)) @@ -688,16 +685,16 @@ redo_accept: if (cbio != NULL) send_ocsp_response(cbio, resp); } else if (host != NULL) { -# ifndef OPENSSL_NO_SOCK +#ifndef OPENSSL_NO_SOCK resp = process_responder(req, host, path, port, use_ssl, headers, req_timeout); if (resp == NULL) goto end; -# else +#else BIO_printf(bio_err, "Error creating connect BIO - sockets not supported.\n"); goto end; -# endif +#endif } else if (respin != NULL) { derbio = bio_open_default(respin, 'r', FORMAT_ASN1); if (derbio == NULL) @@ -840,7 +837,7 @@ log_message(int level, const char *fmt, ...) va_list ap; va_start(ap, fmt); -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON if (multi) { char buf[1024]; if (vsnprintf(buf, sizeof(buf), fmt, ap) > 0) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Apr 21 19:08:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4E7C2B59F4; Tue, 21 Apr 2020 19:08:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496ClB48dpz3N6M; Tue, 21 Apr 2020 19:08:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6FD69601C; Tue, 21 Apr 2020 19:08:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LJ8MQo069086; Tue, 21 Apr 2020 19:08:22 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LJ8MaT069085; Tue, 21 Apr 2020 19:08:22 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202004211908.03LJ8MaT069085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 21 Apr 2020 19:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r360174 - vendor-crypto/openssl/1.1.1g X-SVN-Group: vendor-crypto X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-crypto/openssl/1.1.1g X-SVN-Commit-Revision: 360174 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 19:08:22 -0000 Author: jkim Date: Tue Apr 21 19:08:22 2020 New Revision: 360174 URL: https://svnweb.freebsd.org/changeset/base/360174 Log: Tag OpenSSL 1.1.1g. Added: vendor-crypto/openssl/1.1.1g/ - copied from r360173, vendor-crypto/openssl/dist/ From owner-svn-src-all@freebsd.org Tue Apr 21 19:38:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E25502B7783; Tue, 21 Apr 2020 19:38:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496DQ622jwz3yYy; Tue, 21 Apr 2020 19:38:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E4996614; Tue, 21 Apr 2020 19:38:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LJcaSP093048; Tue, 21 Apr 2020 19:38:36 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LJcXQr092913; Tue, 21 Apr 2020 19:38:33 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202004211938.03LJcXQr092913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 21 Apr 2020 19:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360175 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto/aes crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/ec crypto/openssl/crypto/evp c... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto/aes crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/ec crypto/openssl/crypto/evp crypto/openssl/crypto/rand... X-SVN-Commit-Revision: 360175 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 19:38:40 -0000 Author: jkim Date: Tue Apr 21 19:38:32 2020 New Revision: 360175 URL: https://svnweb.freebsd.org/changeset/base/360175 Log: Merge OpenSSL 1.1.1g. Added: head/crypto/openssl/doc/man3/X509_check_purpose.pod - copied unchanged from r360173, vendor-crypto/openssl/dist/doc/man3/X509_check_purpose.pod head/secure/lib/libcrypto/man/man3/X509_check_purpose.3 (contents, props changed) Modified: head/crypto/openssl/CHANGES head/crypto/openssl/INSTALL head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/build.info head/crypto/openssl/apps/dhparam.c head/crypto/openssl/apps/dsa.c head/crypto/openssl/apps/dsaparam.c head/crypto/openssl/apps/ec.c head/crypto/openssl/apps/ecparam.c head/crypto/openssl/apps/engine.c head/crypto/openssl/apps/gendsa.c head/crypto/openssl/apps/genrsa.c head/crypto/openssl/apps/ocsp.c head/crypto/openssl/apps/pkcs12.c head/crypto/openssl/apps/rsa.c head/crypto/openssl/apps/rsautl.c head/crypto/openssl/apps/s_time.c head/crypto/openssl/apps/srp.c head/crypto/openssl/apps/ts.c head/crypto/openssl/crypto/aes/aes_core.c head/crypto/openssl/crypto/aes/aes_local.h head/crypto/openssl/crypto/asn1/asn1_lib.c head/crypto/openssl/crypto/bio/bss_acpt.c head/crypto/openssl/crypto/ec/ec_asn1.c head/crypto/openssl/crypto/ec/ec_lib.c head/crypto/openssl/crypto/ec/ec_mult.c head/crypto/openssl/crypto/ec/ecp_smpl.c head/crypto/openssl/crypto/evp/e_aes.c head/crypto/openssl/crypto/rand/build.info head/crypto/openssl/crypto/rand/drbg_ctr.c head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/crypto/x509v3/v3_purp.c head/crypto/openssl/doc/man1/s_time.pod head/crypto/openssl/doc/man3/EVP_aes.pod head/crypto/openssl/doc/man3/RAND_set_rand_method.pod head/crypto/openssl/include/openssl/opensslv.h head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/man/man3/ADMISSIONS.3 head/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 head/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 head/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 head/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 head/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 head/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 head/secure/lib/libcrypto/man/man3/BF_encrypt.3 head/secure/lib/libcrypto/man/man3/BIO_ADDR.3 head/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 head/secure/lib/libcrypto/man/man3/BIO_connect.3 head/secure/lib/libcrypto/man/man3/BIO_ctrl.3 head/secure/lib/libcrypto/man/man3/BIO_f_base64.3 head/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 head/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 head/secure/lib/libcrypto/man/man3/BIO_f_md.3 head/secure/lib/libcrypto/man/man3/BIO_f_null.3 head/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 head/secure/lib/libcrypto/man/man3/BIO_find_type.3 head/secure/lib/libcrypto/man/man3/BIO_get_data.3 head/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 head/secure/lib/libcrypto/man/man3/BIO_meth_new.3 head/secure/lib/libcrypto/man/man3/BIO_new.3 head/secure/lib/libcrypto/man/man3/BIO_new_CMS.3 head/secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 head/secure/lib/libcrypto/man/man3/BIO_printf.3 head/secure/lib/libcrypto/man/man3/BIO_push.3 head/secure/lib/libcrypto/man/man3/BIO_read.3 head/secure/lib/libcrypto/man/man3/BIO_s_accept.3 head/secure/lib/libcrypto/man/man3/BIO_s_bio.3 head/secure/lib/libcrypto/man/man3/BIO_s_connect.3 head/secure/lib/libcrypto/man/man3/BIO_s_fd.3 head/secure/lib/libcrypto/man/man3/BIO_s_file.3 head/secure/lib/libcrypto/man/man3/BIO_s_mem.3 head/secure/lib/libcrypto/man/man3/BIO_s_null.3 head/secure/lib/libcrypto/man/man3/BIO_s_socket.3 head/secure/lib/libcrypto/man/man3/BIO_set_callback.3 head/secure/lib/libcrypto/man/man3/BIO_should_retry.3 head/secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/man3/BN_CTX_new.3 head/secure/lib/libcrypto/man/man3/BN_CTX_start.3 head/secure/lib/libcrypto/man/man3/BN_add.3 head/secure/lib/libcrypto/man/man3/BN_add_word.3 head/secure/lib/libcrypto/man/man3/BN_bn2bin.3 head/secure/lib/libcrypto/man/man3/BN_cmp.3 head/secure/lib/libcrypto/man/man3/BN_copy.3 head/secure/lib/libcrypto/man/man3/BN_generate_prime.3 head/secure/lib/libcrypto/man/man3/BN_mod_inverse.3 head/secure/lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/man3/BN_new.3 head/secure/lib/libcrypto/man/man3/BN_num_bytes.3 head/secure/lib/libcrypto/man/man3/BN_rand.3 head/secure/lib/libcrypto/man/man3/BN_security_bits.3 head/secure/lib/libcrypto/man/man3/BN_set_bit.3 head/secure/lib/libcrypto/man/man3/BN_swap.3 head/secure/lib/libcrypto/man/man3/BN_zero.3 head/secure/lib/libcrypto/man/man3/BUF_MEM_new.3 head/secure/lib/libcrypto/man/man3/CMS_add0_cert.3 head/secure/lib/libcrypto/man/man3/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/man3/CMS_add1_signer.3 head/secure/lib/libcrypto/man/man3/CMS_compress.3 head/secure/lib/libcrypto/man/man3/CMS_decrypt.3 head/secure/lib/libcrypto/man/man3/CMS_encrypt.3 head/secure/lib/libcrypto/man/man3/CMS_final.3 head/secure/lib/libcrypto/man/man3/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/man3/CMS_get0_type.3 head/secure/lib/libcrypto/man/man3/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/man3/CMS_sign.3 head/secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/man3/CMS_uncompress.3 head/secure/lib/libcrypto/man/man3/CMS_verify.3 head/secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/man3/CONF_modules_free.3 head/secure/lib/libcrypto/man/man3/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/man3/CRYPTO_THREAD_run_once.3 head/secure/lib/libcrypto/man/man3/CRYPTO_get_ex_new_index.3 head/secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 head/secure/lib/libcrypto/man/man3/CTLOG_STORE_get0_log_by_id.3 head/secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 head/secure/lib/libcrypto/man/man3/CTLOG_new.3 head/secure/lib/libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 head/secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 head/secure/lib/libcrypto/man/man3/DES_random_key.3 head/secure/lib/libcrypto/man/man3/DH_generate_key.3 head/secure/lib/libcrypto/man/man3/DH_generate_parameters.3 head/secure/lib/libcrypto/man/man3/DH_get0_pqg.3 head/secure/lib/libcrypto/man/man3/DH_get_1024_160.3 head/secure/lib/libcrypto/man/man3/DH_meth_new.3 head/secure/lib/libcrypto/man/man3/DH_new.3 head/secure/lib/libcrypto/man/man3/DH_new_by_nid.3 head/secure/lib/libcrypto/man/man3/DH_set_method.3 head/secure/lib/libcrypto/man/man3/DH_size.3 head/secure/lib/libcrypto/man/man3/DSA_SIG_new.3 head/secure/lib/libcrypto/man/man3/DSA_do_sign.3 head/secure/lib/libcrypto/man/man3/DSA_dup_DH.3 head/secure/lib/libcrypto/man/man3/DSA_generate_key.3 head/secure/lib/libcrypto/man/man3/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 head/secure/lib/libcrypto/man/man3/DSA_meth_new.3 head/secure/lib/libcrypto/man/man3/DSA_new.3 head/secure/lib/libcrypto/man/man3/DSA_set_method.3 head/secure/lib/libcrypto/man/man3/DSA_sign.3 head/secure/lib/libcrypto/man/man3/DSA_size.3 head/secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 head/secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 head/secure/lib/libcrypto/man/man3/DTLSv1_listen.3 head/secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 head/secure/lib/libcrypto/man/man3/ECPKParameters_print.3 head/secure/lib/libcrypto/man/man3/EC_GFp_simple_method.3 head/secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 head/secure/lib/libcrypto/man/man3/EC_GROUP_new.3 head/secure/lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 head/secure/lib/libcrypto/man/man3/EC_KEY_new.3 head/secure/lib/libcrypto/man/man3/EC_POINT_add.3 head/secure/lib/libcrypto/man/man3/EC_POINT_new.3 head/secure/lib/libcrypto/man/man3/ENGINE_add.3 head/secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/man3/ERR_clear_error.3 head/secure/lib/libcrypto/man/man3/ERR_error_string.3 head/secure/lib/libcrypto/man/man3/ERR_get_error.3 head/secure/lib/libcrypto/man/man3/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/man3/ERR_load_strings.3 head/secure/lib/libcrypto/man/man3/ERR_print_errors.3 head/secure/lib/libcrypto/man/man3/ERR_put_error.3 head/secure/lib/libcrypto/man/man3/ERR_remove_state.3 head/secure/lib/libcrypto/man/man3/ERR_set_mark.3 head/secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/man3/EVP_CIPHER_CTX_get_cipher_data.3 head/secure/lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 head/secure/lib/libcrypto/man/man3/EVP_DigestInit.3 head/secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 head/secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 head/secure/lib/libcrypto/man/man3/EVP_OpenInit.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_get_default_digest_nid.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_meth_get_count.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/man3/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/man3/EVP_SealInit.3 head/secure/lib/libcrypto/man/man3/EVP_SignInit.3 head/secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/man3/EVP_aes.3 head/secure/lib/libcrypto/man/man3/EVP_aria.3 head/secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_blake2b512.3 head/secure/lib/libcrypto/man/man3/EVP_camellia.3 head/secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_chacha20.3 head/secure/lib/libcrypto/man/man3/EVP_des.3 head/secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_md2.3 head/secure/lib/libcrypto/man/man3/EVP_md4.3 head/secure/lib/libcrypto/man/man3/EVP_md5.3 head/secure/lib/libcrypto/man/man3/EVP_mdc2.3 head/secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_rc4.3 head/secure/lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_ripemd160.3 head/secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_sha1.3 head/secure/lib/libcrypto/man/man3/EVP_sha224.3 head/secure/lib/libcrypto/man/man3/EVP_sha3_224.3 head/secure/lib/libcrypto/man/man3/EVP_sm3.3 head/secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 head/secure/lib/libcrypto/man/man3/EVP_whirlpool.3 head/secure/lib/libcrypto/man/man3/HMAC.3 head/secure/lib/libcrypto/man/man3/MD5.3 head/secure/lib/libcrypto/man/man3/MDC2_Init.3 head/secure/lib/libcrypto/man/man3/Makefile head/secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 head/secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 head/secure/lib/libcrypto/man/man3/OCSP_request_add1_nonce.3 head/secure/lib/libcrypto/man/man3/OCSP_resp_find_status.3 head/secure/lib/libcrypto/man/man3/OCSP_response_status.3 head/secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 head/secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 head/secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 head/secure/lib/libcrypto/man/man3/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/man3/OPENSSL_config.3 head/secure/lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 head/secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/man3/OPENSSL_init_crypto.3 head/secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 head/secure/lib/libcrypto/man/man3/OPENSSL_instrument_bus.3 head/secure/lib/libcrypto/man/man3/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 head/secure/lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 head/secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 head/secure/lib/libcrypto/man/man3/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 head/secure/lib/libcrypto/man/man3/PEM_read.3 head/secure/lib/libcrypto/man/man3/PEM_read_CMS.3 head/secure/lib/libcrypto/man/man3/PEM_read_bio_PrivateKey.3 head/secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 head/secure/lib/libcrypto/man/man3/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/man3/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/man3/PKCS12_create.3 head/secure/lib/libcrypto/man/man3/PKCS12_newpass.3 head/secure/lib/libcrypto/man/man3/PKCS12_parse.3 head/secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 head/secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/man3/PKCS7_sign.3 head/secure/lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/man3/PKCS7_verify.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_generate.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_get0_master.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_new.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_reseed.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_set_callbacks.3 head/secure/lib/libcrypto/man/man3/RAND_DRBG_set_ex_data.3 head/secure/lib/libcrypto/man/man3/RAND_add.3 head/secure/lib/libcrypto/man/man3/RAND_bytes.3 head/secure/lib/libcrypto/man/man3/RAND_cleanup.3 head/secure/lib/libcrypto/man/man3/RAND_egd.3 head/secure/lib/libcrypto/man/man3/RAND_load_file.3 head/secure/lib/libcrypto/man/man3/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/man3/RC4_set_key.3 head/secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 head/secure/lib/libcrypto/man/man3/RSA_blinding_on.3 head/secure/lib/libcrypto/man/man3/RSA_check_key.3 head/secure/lib/libcrypto/man/man3/RSA_generate_key.3 head/secure/lib/libcrypto/man/man3/RSA_get0_key.3 head/secure/lib/libcrypto/man/man3/RSA_meth_new.3 head/secure/lib/libcrypto/man/man3/RSA_new.3 head/secure/lib/libcrypto/man/man3/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/man3/RSA_print.3 head/secure/lib/libcrypto/man/man3/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/man3/RSA_set_method.3 head/secure/lib/libcrypto/man/man3/RSA_sign.3 head/secure/lib/libcrypto/man/man3/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/man3/RSA_size.3 head/secure/lib/libcrypto/man/man3/SCT_new.3 head/secure/lib/libcrypto/man/man3/SCT_print.3 head/secure/lib/libcrypto/man/man3/SCT_validate.3 head/secure/lib/libcrypto/man/man3/SHA256_Init.3 head/secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 head/secure/lib/libcrypto/man/man3/SSL_COMP_add_compression_method.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 head/secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_add_session.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_config.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_flush_sessions.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_free.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_get_verify_mode.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_has_client_custom_ext.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_load_verify_locations.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_new.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sess_number.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set1_verify_cert_store.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_alpn_select_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_store.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_cipher_list.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_client_hello_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ct_validation_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ctlog_list_file.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ex_data.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_generate_session_id.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_info_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_keylog_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_min_proto_version.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_msg_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_num_tickets.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_options.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_read_ahead.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_record_padding_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_security_level.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_id_context.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_ticket_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_split_send_fragment.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_ssl_version.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_stateless_cookie_generate_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_servername_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_status_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_use_srtp.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_use_certificate.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libcrypto/man/man3/SSL_CTX_use_serverinfo.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_cipher.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_hostname.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_id_context.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_compress_id.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_ex_data.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_protocol_version.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_get_time.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_has_ticket.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_is_resumable.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 head/secure/lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 head/secure/lib/libcrypto/man/man3/SSL_accept.3 head/secure/lib/libcrypto/man/man3/SSL_alert_type_string.3 head/secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 head/secure/lib/libcrypto/man/man3/SSL_check_chain.3 head/secure/lib/libcrypto/man/man3/SSL_clear.3 head/secure/lib/libcrypto/man/man3/SSL_connect.3 head/secure/lib/libcrypto/man/man3/SSL_do_handshake.3 head/secure/lib/libcrypto/man/man3/SSL_export_keying_material.3 head/secure/lib/libcrypto/man/man3/SSL_extension_supported.3 head/secure/lib/libcrypto/man/man3/SSL_free.3 head/secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 head/secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 head/secure/lib/libcrypto/man/man3/SSL_get_all_async_fds.3 head/secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 head/secure/lib/libcrypto/man/man3/SSL_get_client_random.3 head/secure/lib/libcrypto/man/man3/SSL_get_current_cipher.3 head/secure/lib/libcrypto/man/man3/SSL_get_default_timeout.3 head/secure/lib/libcrypto/man/man3/SSL_get_error.3 head/secure/lib/libcrypto/man/man3/SSL_get_extms_support.3 head/secure/lib/libcrypto/man/man3/SSL_get_fd.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_cert_chain.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_certificate.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_signature_nid.3 head/secure/lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 head/secure/lib/libcrypto/man/man3/SSL_get_psk_identity.3 head/secure/lib/libcrypto/man/man3/SSL_get_rbio.3 head/secure/lib/libcrypto/man/man3/SSL_get_session.3 head/secure/lib/libcrypto/man/man3/SSL_get_shared_sigalgs.3 head/secure/lib/libcrypto/man/man3/SSL_get_verify_result.3 head/secure/lib/libcrypto/man/man3/SSL_get_version.3 head/secure/lib/libcrypto/man/man3/SSL_in_init.3 head/secure/lib/libcrypto/man/man3/SSL_key_update.3 head/secure/lib/libcrypto/man/man3/SSL_library_init.3 head/secure/lib/libcrypto/man/man3/SSL_load_client_CA_file.3 head/secure/lib/libcrypto/man/man3/SSL_new.3 head/secure/lib/libcrypto/man/man3/SSL_pending.3 head/secure/lib/libcrypto/man/man3/SSL_read.3 head/secure/lib/libcrypto/man/man3/SSL_read_early_data.3 head/secure/lib/libcrypto/man/man3/SSL_rstate_string.3 head/secure/lib/libcrypto/man/man3/SSL_session_reused.3 head/secure/lib/libcrypto/man/man3/SSL_set1_host.3 head/secure/lib/libcrypto/man/man3/SSL_set_bio.3 head/secure/lib/libcrypto/man/man3/SSL_set_connect_state.3 head/secure/lib/libcrypto/man/man3/SSL_set_fd.3 head/secure/lib/libcrypto/man/man3/SSL_set_session.3 head/secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 head/secure/lib/libcrypto/man/man3/SSL_set_verify_result.3 head/secure/lib/libcrypto/man/man3/SSL_shutdown.3 head/secure/lib/libcrypto/man/man3/SSL_state_string.3 head/secure/lib/libcrypto/man/man3/SSL_want.3 head/secure/lib/libcrypto/man/man3/SSL_write.3 head/secure/lib/libcrypto/man/man3/UI_STRING.3 head/secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 head/secure/lib/libcrypto/man/man3/UI_create_method.3 head/secure/lib/libcrypto/man/man3/UI_new.3 head/secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 head/secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 head/secure/lib/libcrypto/man/man3/X509_CRL_get0_by_serial.3 head/secure/lib/libcrypto/man/man3/X509_EXTENSION_set_object.3 head/secure/lib/libcrypto/man/man3/X509_LOOKUP.3 head/secure/lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 head/secure/lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 head/secure/lib/libcrypto/man/man3/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/man3/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 head/secure/lib/libcrypto/man/man3/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 head/secure/lib/libcrypto/man/man3/X509_SIG_get0.3 head/secure/lib/libcrypto/man/man3/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/man3/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/man3/X509_STORE_add_cert.3 head/secure/lib/libcrypto/man/man3/X509_STORE_get0_param.3 head/secure/lib/libcrypto/man/man3/X509_STORE_new.3 head/secure/lib/libcrypto/man/man3/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/man3/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/man3/X509_check_ca.3 head/secure/lib/libcrypto/man/man3/X509_check_host.3 head/secure/lib/libcrypto/man/man3/X509_check_issued.3 head/secure/lib/libcrypto/man/man3/X509_check_private_key.3 head/secure/lib/libcrypto/man/man3/X509_cmp.3 head/secure/lib/libcrypto/man/man3/X509_cmp_time.3 head/secure/lib/libcrypto/man/man3/X509_digest.3 head/secure/lib/libcrypto/man/man3/X509_dup.3 head/secure/lib/libcrypto/man/man3/X509_get0_notBefore.3 head/secure/lib/libcrypto/man/man3/X509_get0_signature.3 head/secure/lib/libcrypto/man/man3/X509_get0_uids.3 head/secure/lib/libcrypto/man/man3/X509_get_extension_flags.3 head/secure/lib/libcrypto/man/man3/X509_get_pubkey.3 head/secure/lib/libcrypto/man/man3/X509_get_serialNumber.3 head/secure/lib/libcrypto/man/man3/X509_get_subject_name.3 head/secure/lib/libcrypto/man/man3/X509_get_version.3 head/secure/lib/libcrypto/man/man3/X509_new.3 head/secure/lib/libcrypto/man/man3/X509_sign.3 head/secure/lib/libcrypto/man/man3/X509_verify_cert.3 head/secure/lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 head/secure/lib/libcrypto/man/man3/d2i_DHparams.3 head/secure/lib/libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 head/secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 head/secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 head/secure/lib/libcrypto/man/man3/d2i_X509.3 head/secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 head/secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 head/secure/lib/libcrypto/man/man5/x509v3_config.5 head/secure/lib/libcrypto/man/man7/Ed25519.7 head/secure/lib/libcrypto/man/man7/RAND.7 head/secure/lib/libcrypto/man/man7/RAND_DRBG.7 head/secure/lib/libcrypto/man/man7/RSA-PSS.7 head/secure/lib/libcrypto/man/man7/SM2.7 head/secure/lib/libcrypto/man/man7/X25519.7 head/secure/lib/libcrypto/man/man7/bio.7 head/secure/lib/libcrypto/man/man7/ct.7 head/secure/lib/libcrypto/man/man7/des_modes.7 head/secure/lib/libcrypto/man/man7/evp.7 head/secure/lib/libcrypto/man/man7/ossl_store-file.7 head/secure/lib/libcrypto/man/man7/ossl_store.7 head/secure/lib/libcrypto/man/man7/passphrase-encoding.7 head/secure/lib/libcrypto/man/man7/proxy-certificates.7 head/secure/lib/libcrypto/man/man7/scrypt.7 head/secure/lib/libcrypto/man/man7/ssl.7 head/secure/lib/libcrypto/man/man7/x509.7 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/engine.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/list.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/prime.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/srp.1 head/secure/usr.bin/openssl/man/storeutl.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/CHANGES Tue Apr 21 19:38:32 2020 (r360175) @@ -7,6 +7,27 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1f and 1.1.1g [21 Apr 2020] + + *) Fixed segmentation fault in SSL_check_chain() + Server or client applications that call the SSL_check_chain() function + during or after a TLS 1.3 handshake may crash due to a NULL pointer + dereference as a result of incorrect handling of the + "signature_algorithms_cert" TLS extension. The crash occurs if an invalid + or unrecognised signature algorithm is received from the peer. This could + be exploited by a malicious peer in a Denial of Service attack. + (CVE-2020-1967) + [Benjamin Kaduk] + + *) Added AES consttime code for no-asm configurations + an optional constant time support for AES was added + when building openssl for no-asm. + Enable with: ./config no-asm -DOPENSSL_AES_CONST_TIME + Disable with: ./config no-asm -DOPENSSL_NO_AES_CONST_TIME + At this time this feature is by default disabled. + It will be enabled by default in 3.0. + [Bernd Edlinger] + Changes between 1.1.1e and 1.1.1f [31 Mar 2020] *) Revert the change of EOF detection while reading in libssl to avoid Modified: head/crypto/openssl/INSTALL ============================================================================== --- head/crypto/openssl/INSTALL Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/INSTALL Tue Apr 21 19:38:32 2020 (r360175) @@ -535,9 +535,9 @@ conjunction with the "-DPEDANTIC" option (or the --strict-warnings option). - no-ui - Don't build with the "UI" capability (i.e. the set of - features enabling text based prompts). + no-ui-console + Don't build with the "UI" console method (i.e. the "UI" + method that enables text based console prompts). enable-unit-test Enable additional unit test APIs. This should not typically Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/NEWS Tue Apr 21 19:38:32 2020 (r360175) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1f and OpenSSL 1.1.1g [21 Apr 2020] + + o Fixed segmentation fault in SSL_check_chain() (CVE-2020-1967) + Major changes between OpenSSL 1.1.1e and OpenSSL 1.1.1f [31 Mar 2020] o Revert the unexpected EOF reporting via SSL_ERROR_SSL Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/README Tue Apr 21 19:38:32 2020 (r360175) @@ -1,5 +1,5 @@ - OpenSSL 1.1.1f 31 Mar 2020 + OpenSSL 1.1.1g 21 Apr 2020 Copyright (c) 1998-2020 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/apps/build.info ============================================================================== --- head/crypto/openssl/apps/build.info Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/apps/build.info Tue Apr 21 19:38:32 2020 (r360175) @@ -1,16 +1,17 @@ {- our @apps_openssl_src = qw(openssl.c - asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c - dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c - genpkey.c genrsa.c nseq.c ocsp.c passwd.c pkcs12.c pkcs7.c pkcs8.c - pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c + asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c + enc.c errstr.c + genpkey.c nseq.c passwd.c pkcs7.c pkcs8.c + pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c s_client.c s_server.c s_time.c sess_id.c smime.c speed.c spkac.c - srp.c ts.c verify.c version.c x509.c rehash.c storeutl.c); + verify.c version.c x509.c rehash.c storeutl.c); our @apps_lib_src = ( qw(apps.c opt.c s_cb.c s_socket.c app_rand.c bf_prefix.c), split(/\s+/, $target{apps_aux_src}) ); our @apps_init_src = split(/\s+/, $target{apps_init_src}); "" -} + IF[{- !$disabled{apps} -}] LIBS_NO_INST=libapps.a SOURCE[libapps.a]={- join(" ", @apps_lib_src) -} @@ -21,11 +22,51 @@ IF[{- !$disabled{apps} -}] SOURCE[openssl]={- join(" ", @apps_openssl_src) -} INCLUDE[openssl]=.. ../include DEPEND[openssl]=libapps.a ../libssl - -IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}] - GENERATE[openssl.rc]=../util/mkrc.pl openssl - SOURCE[openssl]=openssl.rc -ENDIF + IF[{- !$disabled{'des'} -}] + SOURCE[openssl]=pkcs12.c + DEPEND[pkcs12.o]=progs.h + ENDIF + IF[{- !$disabled{'ec'} -}] + SOURCE[openssl]=ec.c ecparam.c + DEPEND[ec.o]=progs.h + DEPEND[ecparam.o]=progs.h + ENDIF + IF[{- !$disabled{'ocsp'} -}] + SOURCE[openssl]=ocsp.c + DEPEND[ocsp.o]=progs.h + ENDIF + IF[{- !$disabled{'srp'} -}] + SOURCE[openssl]=srp.c + DEPEND[srp.o]=progs.h + ENDIF + IF[{- !$disabled{'ts'} -}] + SOURCE[openssl]=ts.c + DEPEND[ts.o]=progs.h + ENDIF + IF[{- !$disabled{'dh'} -}] + SOURCE[openssl]=dhparam.c + DEPEND[dhparam.o]=progs.h + ENDIF + IF[{- !$disabled{'dsa'} -}] + SOURCE[openssl]=dsa.c dsaparam.c gendsa.c + DEPEND[dsa.o]=progs.h + DEPEND[dsaparam.o]=progs.h + DEPEND[gendsa.o]=progs.h + ENDIF + IF[{- !$disabled{'engine'} -}] + SOURCE[openssl]=engine.c + DEPEND[engine.o]=progs.h + ENDIF + IF[{- !$disabled{'rsa'} -}] + SOURCE[openssl]=rsa.c rsautl.c genrsa.c + DEPEND[rsa.o]=progs.h + DEPEND[rsautl.o]=progs.h + DEPEND[genrsa.o]=progs.h + ENDIF + IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}] + GENERATE[openssl.rc]=../util/mkrc.pl openssl + SOURCE[openssl]=openssl.rc + ENDIF {- join("\n ", map { (my $x = $_) =~ s|\.c$|.o|; "DEPEND[$x]=progs.h" } @apps_openssl_src) -} Modified: head/crypto/openssl/apps/dhparam.c ============================================================================== --- head/crypto/openssl/apps/dhparam.c Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/apps/dhparam.c Tue Apr 21 19:38:32 2020 (r360175) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,29 +8,25 @@ */ #include -#ifdef OPENSSL_NO_DH -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include +#ifndef OPENSSL_NO_DSA +# include +#endif -# ifndef OPENSSL_NO_DSA -# include -# endif +#define DEFBITS 2048 -# define DEFBITS 2048 - static int dh_cb(int p, int n, BN_GENCB *cb); typedef enum OPTION_choice { @@ -56,13 +52,13 @@ const OPTIONS dhparam_options[] = { {"C", OPT_C, '-', "Print C code"}, {"2", OPT_2, '-', "Generate parameters using 2 as the generator value"}, {"5", OPT_5, '-', "Generate parameters using 5 as the generator value"}, -# ifndef OPENSSL_NO_DSA +#ifndef OPENSSL_NO_DSA {"dsaparam", OPT_DSAPARAM, '-', "Read or generate DSA parameters, convert to DH"}, -# endif -# ifndef OPENSSL_NO_ENGINE +#endif +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -146,13 +142,13 @@ int dhparam_main(int argc, char **argv) if (g && !num) num = DEFBITS; -# ifndef OPENSSL_NO_DSA +#ifndef OPENSSL_NO_DSA if (dsaparam && g) { BIO_printf(bio_err, "generator may not be chosen for DSA parameters\n"); goto end; } -# endif +#endif out = bio_open_default(outfile, 'w', outformat); if (out == NULL) @@ -173,7 +169,7 @@ int dhparam_main(int argc, char **argv) BN_GENCB_set(cb, dh_cb, bio_err); -# ifndef OPENSSL_NO_DSA +#ifndef OPENSSL_NO_DSA if (dsaparam) { DSA *dsa = DSA_new(); @@ -196,7 +192,7 @@ int dhparam_main(int argc, char **argv) goto end; } } else -# endif +#endif { dh = DH_new(); BIO_printf(bio_err, @@ -217,7 +213,7 @@ int dhparam_main(int argc, char **argv) if (in == NULL) goto end; -# ifndef OPENSSL_NO_DSA +#ifndef OPENSSL_NO_DSA if (dsaparam) { DSA *dsa; @@ -239,7 +235,7 @@ int dhparam_main(int argc, char **argv) goto end; } } else -# endif +#endif { if (informat == FORMAT_ASN1) { /* @@ -376,4 +372,3 @@ static int dh_cb(int p, int n, BN_GENCB *cb) (void)BIO_flush(BN_GENCB_get_arg(cb)); return 1; } -#endif Modified: head/crypto/openssl/apps/dsa.c ============================================================================== --- head/crypto/openssl/apps/dsa.c Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/apps/dsa.c Tue Apr 21 19:38:32 2020 (r360175) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,24 +8,20 @@ */ #include -#ifdef OPENSSL_NO_DSA -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include -# include - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_INFORM, OPT_OUTFORM, OPT_IN, OPT_OUT, OPT_ENGINE, @@ -49,14 +45,14 @@ const OPTIONS dsa_options[] = { {"passin", OPT_PASSIN, 's', "Input file pass phrase source"}, {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, {"", OPT_CIPHER, '-', "Any supported cipher"}, -# ifndef OPENSSL_NO_RC4 +#ifndef OPENSSL_NO_RC4 {"pvk-strong", OPT_PVK_STRONG, '-', "Enable 'Strong' PVK encoding level (default)"}, {"pvk-weak", OPT_PVK_WEAK, '-', "Enable 'Weak' PVK encoding level"}, {"pvk-none", OPT_PVK_NONE, '-', "Don't enforce PVK encoding"}, -# endif -# ifndef OPENSSL_NO_ENGINE +#endif +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -71,9 +67,9 @@ int dsa_main(int argc, char **argv) OPTION_CHOICE o; int informat = FORMAT_PEM, outformat = FORMAT_PEM, text = 0, noout = 0; int i, modulus = 0, pubin = 0, pubout = 0, ret = 1; -# ifndef OPENSSL_NO_RC4 +#ifndef OPENSSL_NO_RC4 int pvk_encr = 2; -# endif +#endif int private = 0; prog = opt_init(argc, argv, dsa_options); @@ -214,7 +210,7 @@ int dsa_main(int argc, char **argv) i = PEM_write_bio_DSAPrivateKey(out, dsa, enc, NULL, 0, NULL, passout); } -# ifndef OPENSSL_NO_RSA +#ifndef OPENSSL_NO_RSA } else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) { EVP_PKEY *pk; pk = EVP_PKEY_new(); @@ -229,13 +225,13 @@ int dsa_main(int argc, char **argv) goto end; } assert(private); -# ifdef OPENSSL_NO_RC4 +# ifdef OPENSSL_NO_RC4 BIO_printf(bio_err, "PVK format not supported\n"); EVP_PKEY_free(pk); goto end; -# else +# else i = i2b_PVK_bio(out, pk, pvk_encr, 0, passout); -# endif +# endif } else if (pubin || pubout) { i = i2b_PublicKey_bio(out, pk); } else { @@ -243,7 +239,7 @@ int dsa_main(int argc, char **argv) i = i2b_PrivateKey_bio(out, pk); } EVP_PKEY_free(pk); -# endif +#endif } else { BIO_printf(bio_err, "bad output format specified for outfile\n"); goto end; @@ -262,4 +258,3 @@ int dsa_main(int argc, char **argv) OPENSSL_free(passout); return ret; } -#endif Modified: head/crypto/openssl/apps/dsaparam.c ============================================================================== --- head/crypto/openssl/apps/dsaparam.c Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/apps/dsaparam.c Tue Apr 21 19:38:32 2020 (r360175) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,23 +8,19 @@ */ #include -#ifdef OPENSSL_NO_DSA -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include - static int dsa_cb(int p, int n, BN_GENCB *cb); typedef enum OPTION_choice { @@ -44,9 +40,9 @@ const OPTIONS dsaparam_options[] = { {"noout", OPT_NOOUT, '-', "No output"}, {"genkey", OPT_GENKEY, '-', "Generate a DSA key"}, OPT_R_OPTIONS, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -255,4 +251,3 @@ static int dsa_cb(int p, int n, BN_GENCB *cb) (void)BIO_flush(BN_GENCB_get_arg(cb)); return 1; } -#endif Modified: head/crypto/openssl/apps/ec.c ============================================================================== --- head/crypto/openssl/apps/ec.c Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/apps/ec.c Tue Apr 21 19:38:32 2020 (r360175) @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,20 +8,16 @@ */ #include -#ifdef OPENSSL_NO_EC -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include - static OPT_PAIR conv_forms[] = { {"compressed", POINT_CONVERSION_COMPRESSED}, {"uncompressed", POINT_CONVERSION_UNCOMPRESSED}, @@ -62,9 +58,9 @@ const OPTIONS ec_options[] = { "Specifies the way the ec parameters are encoded"}, {"conv_form", OPT_CONV_FORM, 's', "Specifies the point conversion form "}, {"", OPT_CIPHER, '-', "Any supported cipher"}, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -280,4 +276,3 @@ int ec_main(int argc, char **argv) OPENSSL_free(passout); return ret; } -#endif Modified: head/crypto/openssl/apps/ecparam.c ============================================================================== --- head/crypto/openssl/apps/ecparam.c Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/apps/ecparam.c Tue Apr 21 19:38:32 2020 (r360175) @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (the "License"). You may not use @@ -9,23 +9,19 @@ */ #include -#ifdef OPENSSL_NO_EC -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_INFORM, OPT_OUTFORM, OPT_IN, OPT_OUT, OPT_TEXT, OPT_C, @@ -55,9 +51,9 @@ const OPTIONS ecparam_options[] = { "Specifies the way the ec parameters are encoded"}, {"genkey", OPT_GENKEY, '-', "Generate ec key"}, OPT_R_OPTIONS, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -446,5 +442,3 @@ int ecparam_main(int argc, char **argv) BIO_free_all(out); return ret; } - -#endif Modified: head/crypto/openssl/apps/engine.c ============================================================================== --- head/crypto/openssl/apps/engine.c Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/apps/engine.c Tue Apr 21 19:38:32 2020 (r360175) @@ -1,5 +1,5 @@ /* - * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,20 +8,16 @@ */ #include -#ifdef OPENSSL_NO_ENGINE -NON_EMPTY_TRANSLATION_UNIT -#else +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include +#include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include -# include - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_C, OPT_T, OPT_TT, OPT_PRE, OPT_POST, @@ -486,4 +482,3 @@ int engine_main(int argc, char **argv) BIO_free_all(out); return ret; } -#endif Modified: head/crypto/openssl/apps/gendsa.c ============================================================================== --- head/crypto/openssl/apps/gendsa.c Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/apps/gendsa.c Tue Apr 21 19:38:32 2020 (r360175) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,23 +8,19 @@ */ #include -#ifdef OPENSSL_NO_DSA -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_OUT, OPT_PASSOUT, OPT_ENGINE, OPT_CIPHER, @@ -39,9 +35,9 @@ const OPTIONS gendsa_options[] = { {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, OPT_R_OPTIONS, {"", OPT_CIPHER, '-', "Encrypt the output with any supported cipher"}, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -143,4 +139,3 @@ int gendsa_main(int argc, char **argv) OPENSSL_free(passout); return ret; } -#endif Modified: head/crypto/openssl/apps/genrsa.c ============================================================================== --- head/crypto/openssl/apps/genrsa.c Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/apps/genrsa.c Tue Apr 21 19:38:32 2020 (r360175) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,28 +8,24 @@ */ #include -#ifdef OPENSSL_NO_RSA -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include -# include -# include +#define DEFBITS 2048 +#define DEFPRIMES 2 -# define DEFBITS 2048 -# define DEFPRIMES 2 - static int genrsa_cb(int p, int n, BN_GENCB *cb); typedef enum OPTION_choice { @@ -48,9 +44,9 @@ const OPTIONS genrsa_options[] = { OPT_R_OPTIONS, {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, {"", OPT_CIPHER, '-', "Encrypt the output with any supported cipher"}, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif {"primes", OPT_PRIMES, 'p', "Specify number of primes"}, {NULL} }; @@ -198,4 +194,3 @@ static int genrsa_cb(int p, int n, BN_GENCB *cb) (void)BIO_flush(BN_GENCB_get_arg(cb)); return 1; } -#endif Modified: head/crypto/openssl/apps/ocsp.c ============================================================================== --- head/crypto/openssl/apps/ocsp.c Tue Apr 21 19:08:22 2020 (r360174) +++ head/crypto/openssl/apps/ocsp.c Tue Apr 21 19:38:32 2020 (r360175) @@ -1,5 +1,5 @@ /* - * Copyright 2001-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -9,65 +9,62 @@ #include -#ifdef OPENSSL_NO_OCSP -NON_EMPTY_TRANSLATION_UNIT -#else -# ifdef OPENSSL_SYS_VMS -# define _XOPEN_SOURCE_EXTENDED/* So fd_set and friends get properly defined +#ifdef OPENSSL_SYS_VMS +# define _XOPEN_SOURCE_EXTENDED/* So fd_set and friends get properly defined * on OpenVMS */ -# endif +#endif -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include /* Needs to be included before the openssl headers */ -# include "apps.h" -# include "progs.h" -# include "internal/sockets.h" -# include -# include -# include -# include -# include -# include -# include -# include +#include "apps.h" +#include "progs.h" +#include "internal/sockets.h" +#include +#include +#include +#include +#include +#include +#include +#include #ifndef HAVE_FORK -# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) -# define HAVE_FORK 0 -# else -# define HAVE_FORK 1 -# endif +#if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) +# define HAVE_FORK 0 +#else +# define HAVE_FORK 1 #endif +#endif #if HAVE_FORK -# undef NO_FORK +#undef NO_FORK #else -# define NO_FORK +#define NO_FORK #endif -# if !defined(NO_FORK) && !defined(OPENSSL_NO_SOCK) \ +#if !defined(NO_FORK) && !defined(OPENSSL_NO_SOCK) \ && !defined(OPENSSL_NO_POSIX_IO) -# define OCSP_DAEMON -# include -# include -# include -# include -# define MAXERRLEN 1000 /* limit error text sent to syslog to 1000 bytes */ -# else -# undef LOG_INFO -# undef LOG_WARNING -# undef LOG_ERR -# define LOG_INFO 0 -# define LOG_WARNING 1 -# define LOG_ERR 2 -# endif +# define OCSP_DAEMON +# include +# include +# include +# include +# define MAXERRLEN 1000 /* limit error text sent to syslog to 1000 bytes */ +#else +# undef LOG_INFO +# undef LOG_WARNING +# undef LOG_ERR +# define LOG_INFO 0 +# define LOG_WARNING 1 +# define LOG_ERR 2 +#endif -# if defined(OPENSSL_SYS_VXWORKS) +#if defined(OPENSSL_SYS_VXWORKS) /* not supported */ int setpgid(pid_t pid, pid_t pgid) { @@ -80,9 +77,9 @@ pid_t fork(void) errno = ENOSYS; return (pid_t) -1; } -# endif +#endif /* Maximum leeway in validity period: default 5 minutes */ -# define MAX_VALIDITY_PERIOD (5 * 60) +#define MAX_VALIDITY_PERIOD (5 * 60) static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, const EVP_MD *cert_id_md, X509 *issuer, @@ -109,20 +106,20 @@ static void log_message(int level, const char *fmt, .. static char *prog; static int multi = 0; -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON static int acfd = (int) INVALID_SOCKET; static int index_changed(CA_DB *); static void spawn_loop(void); static int print_syslog(const char *str, size_t len, void *levPtr); static void socket_timeout(int signum); -# endif +#endif -# ifndef OPENSSL_NO_SOCK +#ifndef OPENSSL_NO_SOCK static OCSP_RESPONSE *query_responder(BIO *cbio, const char *host, const char *path, const STACK_OF(CONF_VALUE) *headers, OCSP_REQUEST *req, int req_timeout); -# endif +#endif typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, @@ -160,9 +157,9 @@ const OPTIONS ocsp_options[] = { "Don't include any certificates in response"}, {"resp_key_id", OPT_RESP_KEY_ID, '-', "Identify response by signing certificate key ID"}, -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON {"multi", OPT_MULTI, 'p', "run multiple responder processes"}, -# endif +#endif {"no_certs", OPT_NO_CERTS, '-', "Don't include any certificates in signed request"}, {"no_signature_verify", OPT_NO_SIGNATURE_VERIFY, '-', @@ -511,9 +508,9 @@ int ocsp_main(int argc, char **argv) trailing_md = 1; break; case OPT_MULTI: -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON multi = atoi(opt_arg()); -# endif +#endif break; } } @@ -593,7 +590,7 @@ int ocsp_main(int argc, char **argv) } } -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON if (multi && acbio != NULL) spawn_loop(); if (acbio != NULL && req_timeout > 0) @@ -606,7 +603,7 @@ int ocsp_main(int argc, char **argv) redo_accept: if (acbio != NULL) { -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON if (index_changed(rdb)) { CA_DB *newrdb = load_index(ridx_filename, NULL); @@ -619,7 +616,7 @@ redo_accept: ridx_filename); } } -# endif +#endif req = NULL; if (!do_responder(&req, &cbio, acbio, req_timeout)) @@ -688,16 +685,16 @@ redo_accept: if (cbio != NULL) send_ocsp_response(cbio, resp); } else if (host != NULL) { -# ifndef OPENSSL_NO_SOCK +#ifndef OPENSSL_NO_SOCK resp = process_responder(req, host, path, port, use_ssl, headers, req_timeout); if (resp == NULL) goto end; -# else +#else BIO_printf(bio_err, "Error creating connect BIO - sockets not supported.\n"); goto end; -# endif +#endif } else if (respin != NULL) { derbio = bio_open_default(respin, 'r', FORMAT_ASN1); if (derbio == NULL) @@ -840,7 +837,7 @@ log_message(int level, const char *fmt, ...) va_list ap; va_start(ap, fmt); -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON if (multi) { char buf[1024]; if (vsnprintf(buf, sizeof(buf), fmt, ap) > 0) { @@ -849,7 +846,7 @@ log_message(int level, const char *fmt, ...) if (level >= LOG_ERR) ERR_print_errors_cb(print_syslog, &level); } -# endif +#endif if (!multi) { BIO_printf(bio_err, "%s: ", prog); BIO_vprintf(bio_err, fmt, ap); @@ -858,7 +855,7 @@ log_message(int level, const char *fmt, ...) va_end(ap); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Apr 21 21:33:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 456BA2BB786; Tue, 21 Apr 2020 21:33:07 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496GyC15YRz4Fwd; Tue, 21 Apr 2020 21:33:07 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20DB87EAB; Tue, 21 Apr 2020 21:33:07 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LLX7ui078206; Tue, 21 Apr 2020 21:33:07 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LLX6GU078204; Tue, 21 Apr 2020 21:33:06 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202004212133.03LLX6GU078204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 21 Apr 2020 21:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360176 - in head/sys/amd64: include vmm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/amd64: include vmm X-SVN-Commit-Revision: 360176 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 21:33:07 -0000 Author: cem Date: Tue Apr 21 21:33:06 2020 New Revision: 360176 URL: https://svnweb.freebsd.org/changeset/base/360176 Log: vmm(4): Decode 3-byte VEX-prefixed instructions Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D24462 Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Tue Apr 21 19:38:32 2020 (r360175) +++ head/sys/amd64/include/vmm.h Tue Apr 21 21:33:06 2020 (r360176) @@ -541,7 +541,8 @@ struct vie { rm:4; uint8_t ss:2, /* SIB byte */ - _sparebits:2, + vex_present:1, /* VEX prefixed */ + vex_l:1, /* L bit */ index:4, /* SIB byte */ base:4; /* SIB byte */ @@ -550,7 +551,11 @@ struct vie { uint8_t scale; - uint8_t _sparebytes[3]; + uint8_t vex_reg:4, /* vvvv: first source register specifier */ + vex_pp:2, /* pp */ + _sparebits:2; + + uint8_t _sparebytes[2]; int base_register; /* VM_REG_GUEST_xyz */ int index_register; /* VM_REG_GUEST_xyz */ Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Tue Apr 21 19:38:32 2020 (r360175) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Tue Apr 21 21:33:06 2020 (r360176) @@ -94,10 +94,13 @@ enum { #define VIE_OP_F_NO_MODRM (1 << 3) #define VIE_OP_F_NO_GLA_VERIFICATION (1 << 4) +static const struct vie_op three_byte_opcodes_0f38[256] = { +}; + static const struct vie_op two_byte_opcodes[256] = { [0xAE] = { - .op_byte = 0xAE, - .op_type = VIE_OP_TYPE_TWOB_GRP15, + .op_byte = 0xAE, + .op_type = VIE_OP_TYPE_TWOB_GRP15, }, [0xB6] = { .op_byte = 0xB6, @@ -2286,6 +2289,81 @@ decode_prefixes(struct vie *vie, enum vm_cpu_mode cpu_ } /* + * § 2.3.5, "The VEX Prefix", SDM Vol 2. + */ + if ((cpu_mode == CPU_MODE_64BIT || cpu_mode == CPU_MODE_COMPATIBILITY) + && x == 0xC4) { + const struct vie_op *optab; + + /* 3-byte VEX prefix. */ + vie->vex_present = 1; + + vie_advance(vie); + if (vie_peek(vie, &x)) + return (-1); + + /* + * 2nd byte: [R', X', B', mmmmm[4:0]]. Bits are inverted + * relative to REX encoding. + */ + vie->rex_r = x & 0x80 ? 0 : 1; + vie->rex_x = x & 0x40 ? 0 : 1; + vie->rex_b = x & 0x20 ? 0 : 1; + + switch (x & 0x1F) { + case 0x2: + /* 0F 38. */ + optab = three_byte_opcodes_0f38; + break; + case 0x1: + /* 0F class - nothing handled here yet. */ + /* FALLTHROUGH */ + case 0x3: + /* 0F 3A class - nothing handled here yet. */ + /* FALLTHROUGH */ + default: + /* Reserved (#UD). */ + return (-1); + } + + vie_advance(vie); + if (vie_peek(vie, &x)) + return (-1); + + /* 3rd byte: [W, vvvv[6:3], L, pp[1:0]]. */ + vie->rex_w = x & 0x80 ? 1 : 0; + + vie->vex_reg = ((~(unsigned)x & 0x78u) >> 3); + vie->vex_l = !!(x & 0x4); + vie->vex_pp = (x & 0x3); + + /* PP: 1=66 2=F3 3=F2 prefixes. */ + switch (vie->vex_pp) { + case 0x1: + vie->opsize_override = 1; + break; + case 0x2: + vie->repz_present = 1; + break; + case 0x3: + vie->repnz_present = 1; + break; + } + + vie_advance(vie); + + /* Opcode, sans literal prefix prefix. */ + if (vie_peek(vie, &x)) + return (-1); + + vie->op = optab[x]; + if (vie->op.op_type == VIE_OP_TYPE_NONE) + return (-1); + + vie_advance(vie); + } + + /* * Section "Operand-Size And Address-Size Attributes", Intel SDM, Vol 1 */ if (cpu_mode == CPU_MODE_64BIT) { @@ -2336,6 +2414,10 @@ decode_opcode(struct vie *vie) if (vie_peek(vie, &x)) return (-1); + + /* Already did this via VEX prefix. */ + if (vie->op.op_type != VIE_OP_TYPE_NONE) + return (0); vie->op = one_byte_opcodes[x]; From owner-svn-src-all@freebsd.org Tue Apr 21 21:34:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CDBE82BB809; Tue, 21 Apr 2020 21:34:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496Gzh53CLz4G5Q; Tue, 21 Apr 2020 21:34:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A87F97ECD; Tue, 21 Apr 2020 21:34:24 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LLYO8K078297; Tue, 21 Apr 2020 21:34:24 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LLYO1B078296; Tue, 21 Apr 2020 21:34:24 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202004212134.03LLYO1B078296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 21 Apr 2020 21:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360177 - head/sys/amd64/vmm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/amd64/vmm X-SVN-Commit-Revision: 360177 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 21:34:24 -0000 Author: cem Date: Tue Apr 21 21:34:24 2020 New Revision: 360177 URL: https://svnweb.freebsd.org/changeset/base/360177 Log: vmm(4): Decode and emulate BEXTR Clang 10 -march=native kernels on znver1 emit BEXTR for APIC reads, apparently. Decode and emulate the instruction. Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D24463 Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Tue Apr 21 21:33:06 2020 (r360176) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Tue Apr 21 21:34:24 2020 (r360177) @@ -84,6 +84,7 @@ enum { VIE_OP_TYPE_TWOB_GRP15, VIE_OP_TYPE_ADD, VIE_OP_TYPE_TEST, + VIE_OP_TYPE_BEXTR, VIE_OP_TYPE_LAST }; @@ -95,6 +96,10 @@ enum { #define VIE_OP_F_NO_GLA_VERIFICATION (1 << 4) static const struct vie_op three_byte_opcodes_0f38[256] = { + [0xF7] = { + .op_byte = 0xF7, + .op_type = VIE_OP_TYPE_BEXTR, + }, }; static const struct vie_op two_byte_opcodes[256] = { @@ -1318,6 +1323,83 @@ emulate_test(void *vm, int vcpuid, uint64_t gpa, struc } static int +emulate_bextr(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, + struct vm_guest_paging *paging, mem_region_read_t memread, + mem_region_write_t memwrite, void *arg) +{ + uint64_t src1, src2, dst, rflags; + unsigned start, len; + int error, size; + + size = vie->opsize; + error = EINVAL; + + /* + * VEX.LZ.0F38.W0 F7 /r BEXTR r32a, r/m32, r32b + * VEX.LZ.0F38.W1 F7 /r BEXTR r64a, r/m64, r64b + * + * Destination operand is ModRM:reg. Source operands are ModRM:r/m and + * Vex.vvvv. + * + * Operand size is always 32-bit if not in 64-bit mode (W1 is ignored). + */ + if (size != 4 && paging->cpu_mode != CPU_MODE_64BIT) + size = 4; + + /* + * Extracts contiguous bits from the first /source/ operand (second + * operand) using an index and length specified in the second /source/ + * operand (third operand). + */ + error = memread(vm, vcpuid, gpa, &src1, size, arg); + if (error) + return (error); + error = vie_read_register(vm, vcpuid, gpr_map[vie->vex_reg], &src2); + if (error) + return (error); + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RFLAGS, &rflags); + if (error) + return (error); + + start = (src2 & 0xff); + len = (src2 & 0xff00) >> 8; + + /* If no bits are extracted, the destination register is cleared. */ + dst = 0; + + /* If START exceeds the operand size, no bits are extracted. */ + if (start > size * 8) + goto done; + /* Length is bounded by both the destination size and start offset. */ + if (start + len > size * 8) + len = (size * 8) - start; + if (len == 0) + goto done; + + if (start > 0) + src1 = (src1 >> start); + if (len < 64) + src1 = src1 & ((1ull << len) - 1); + dst = src1; + +done: + error = vie_update_register(vm, vcpuid, gpr_map[vie->reg], dst, size); + if (error) + return (error); + + /* + * AMD: OF, CF cleared; SF/AF/PF undefined; ZF set by result. + * Intel: ZF is set by result; AF/SF/PF undefined; all others cleared. + */ + rflags &= ~RFLAGS_STATUS_BITS; + if (dst == 0) + rflags |= PSL_Z; + error = vie_update_register(vm, vcpuid, VM_REG_GUEST_RFLAGS, rflags, + 8); + return (error); +} + +static int emulate_add(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, mem_region_read_t memread, mem_region_write_t memwrite, void *arg) { @@ -1744,6 +1826,10 @@ vmm_emulate_instruction(void *vm, int vcpuid, uint64_t break; case VIE_OP_TYPE_TEST: error = emulate_test(vm, vcpuid, gpa, vie, + memread, memwrite, memarg); + break; + case VIE_OP_TYPE_BEXTR: + error = emulate_bextr(vm, vcpuid, gpa, vie, paging, memread, memwrite, memarg); break; default: From owner-svn-src-all@freebsd.org Tue Apr 21 21:48:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FBD92BBF5C; Tue, 21 Apr 2020 21:48:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496HJ42p3vz4H3N; Tue, 21 Apr 2020 21:48:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B1F480E7; Tue, 21 Apr 2020 21:48:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LLmaRB085008; Tue, 21 Apr 2020 21:48:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LLmaj0085007; Tue, 21 Apr 2020 21:48:36 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004212148.03LLmaj0085007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 21 Apr 2020 21:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360178 - head/lib/libvmmapi X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/lib/libvmmapi X-SVN-Commit-Revision: 360178 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 21:48:36 -0000 Author: jhb Date: Tue Apr 21 21:48:35 2020 New Revision: 360178 URL: https://svnweb.freebsd.org/changeset/base/360178 Log: Map negative types passed to vm_capability_type2name to NULL. Submitted by: vangyzen Modified: head/lib/libvmmapi/vmmapi.c Modified: head/lib/libvmmapi/vmmapi.c ============================================================================== --- head/lib/libvmmapi/vmmapi.c Tue Apr 21 21:34:24 2020 (r360177) +++ head/lib/libvmmapi/vmmapi.c Tue Apr 21 21:48:35 2020 (r360178) @@ -841,7 +841,7 @@ vm_capability_name2type(const char *capname) const char * vm_capability_type2name(int type) { - if (type < nitems(capstrmap)) + if (type >= 0 && type < nitems(capstrmap)) return (capstrmap[type]); return (NULL); From owner-svn-src-all@freebsd.org Tue Apr 21 23:38:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F34362BE121; Tue, 21 Apr 2020 23:38:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496KlL61qyz4NST; Tue, 21 Apr 2020 23:38:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFCEA95C8; Tue, 21 Apr 2020 23:38:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03LNcsmO053073; Tue, 21 Apr 2020 23:38:54 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03LNcsbD053072; Tue, 21 Apr 2020 23:38:54 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004212338.03LNcsbD053072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 21 Apr 2020 23:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360179 - head/sys/cam/scsi X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/cam/scsi X-SVN-Commit-Revision: 360179 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 23:38:55 -0000 Author: jhb Date: Tue Apr 21 23:38:54 2020 New Revision: 360179 URL: https://svnweb.freebsd.org/changeset/base/360179 Log: Don't pass a user buffer pointer as the data pointer in a CCB. Allocate a temporary buffer in the kernel to serve as the CCB data pointer for a pass-through transaction and use copyin/copyout to shuffle the data to/from the user buffer. Reviewed by: scottl, brooks Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24489 Modified: head/sys/cam/scsi/scsi_sg.c Modified: head/sys/cam/scsi/scsi_sg.c ============================================================================== --- head/sys/cam/scsi/scsi_sg.c Tue Apr 21 21:48:35 2020 (r360178) +++ head/sys/cam/scsi/scsi_sg.c Tue Apr 21 23:38:54 2020 (r360179) @@ -508,6 +508,7 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int struct cam_periph *periph; struct sg_softc *softc; struct sg_io_hdr *req; + void *data_ptr; int dir, error; periph = (struct cam_periph *)dev->si_drv1; @@ -552,12 +553,20 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int break; } + if (req->dxfer_len > MAXPHYS) { + error = EINVAL; + break; + } + + data_ptr = malloc(req->dxfer_len, M_DEVBUF, M_WAITOK); + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); csio = &ccb->csio; error = copyin(req->cmdp, &csio->cdb_io.cdb_bytes, req->cmd_len); if (error) { + free(data_ptr, M_DEVBUF); xpt_release_ccb(ccb); break; } @@ -570,7 +579,7 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int dir = CAM_DIR_IN; break; case SG_DXFER_TO_FROM_DEV: - dir = CAM_DIR_IN | CAM_DIR_OUT; + dir = CAM_DIR_BOTH; break; case SG_DXFER_NONE: default: @@ -578,12 +587,21 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int break; } + if (dir == CAM_DIR_IN || dir == CAM_DIR_BOTH) { + error = copyin(req->dxferp, data_ptr, req->dxfer_len); + if (error) { + free(data_ptr, M_DEVBUF); + xpt_release_ccb(ccb); + break; + } + } + cam_fill_csio(csio, /*retries*/1, /*cbfcnp*/NULL, dir|CAM_DEV_QFRZDIS, MSG_SIMPLE_Q_TAG, - req->dxferp, + data_ptr, req->dxfer_len, req->mx_sb_len, req->cmd_len, @@ -593,6 +611,7 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int if (error) { req->host_status = DID_ERROR; req->driver_status = DRIVER_INVALID; + free(data_ptr, M_DEVBUF); xpt_release_ccb(ccb); break; } @@ -611,6 +630,10 @@ sgioctl(struct cdev *dev, u_long cmd, caddr_t arg, int req->sb_len_wr); } + if ((dir == CAM_DIR_OUT || dir == CAM_DIR_BOTH) && error == 0) + error = copyout(data_ptr, req->dxferp, req->dxfer_len); + + free(data_ptr, M_DEVBUF); xpt_release_ccb(ccb); break; From owner-svn-src-all@freebsd.org Wed Apr 22 00:16:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 255092BF38E; Wed, 22 Apr 2020 00:16:43 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496LZz0GKPz4QPD; Wed, 22 Apr 2020 00:16:43 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 026049D8D; Wed, 22 Apr 2020 00:16:43 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M0Gg6U077393; Wed, 22 Apr 2020 00:16:42 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M0GgEm077388; Wed, 22 Apr 2020 00:16:42 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202004220016.03M0GgEm077388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Wed, 22 Apr 2020 00:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360180 - in head/sys/netinet: . tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: in head/sys/netinet: . tcp_stacks X-SVN-Commit-Revision: 360180 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 00:16:43 -0000 Author: rscheff Date: Wed Apr 22 00:16:42 2020 New Revision: 360180 URL: https://svnweb.freebsd.org/changeset/base/360180 Log: revert rS360143 - Correctly set up initial cwnd due to syzkaller panics found Reported by: tuexen Approved by: tuexen (mentor) Sponsored by: NetApp, Inc. Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_stacks/bbr.c head/sys/netinet/tcp_stacks/rack.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Tue Apr 21 23:38:54 2020 (r360179) +++ head/sys/netinet/tcp_input.c Wed Apr 22 00:16:42 2020 (r360180) @@ -2374,6 +2374,12 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru if (IS_FASTOPEN(tp->t_flags) && tp->t_tfo_pending) { tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; + + /* + * Account for the ACK of our SYN prior to + * regular ACK processing below. + */ + tp->snd_una++; } if (tp->t_flags & TF_NEEDFIN) { tcp_state_change(tp, TCPS_FIN_WAIT_1); @@ -2393,12 +2399,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru cc_conn_init(tp); tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp)); } - if (SEQ_GT(th->th_ack, tp->snd_una)) - /* - * Account for the ACK of our SYN prior to - * regular ACK processing below. - */ - tp->snd_una++; /* * If segment contains data or ACK, will call tcp_reass() * later; if not, do so now to pass queued data to user. Modified: head/sys/netinet/tcp_stacks/bbr.c ============================================================================== --- head/sys/netinet/tcp_stacks/bbr.c Tue Apr 21 23:38:54 2020 (r360179) +++ head/sys/netinet/tcp_stacks/bbr.c Wed Apr 22 00:16:42 2020 (r360180) @@ -9325,6 +9325,11 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, str tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; + /* + * Account for the ACK of our SYN prior to regular + * ACK processing below. + */ + tp->snd_una++; } /* * Make transitions: SYN-RECEIVED -> ESTABLISHED SYN-RECEIVED* -> @@ -9347,12 +9352,6 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, str if (!IS_FASTOPEN(tp->t_flags)) cc_conn_init(tp); } - if (SEQ_GT(th->th_ack, tp->snd_una)) - /* - * Account for the ACK of our SYN prior to - * regular ACK processing below. - */ - tp->snd_una++; /* * If segment contains data or ACK, will call tcp_reass() later; if * not, do so now to pass queued data to user. Modified: head/sys/netinet/tcp_stacks/rack.c ============================================================================== --- head/sys/netinet/tcp_stacks/rack.c Tue Apr 21 23:38:54 2020 (r360179) +++ head/sys/netinet/tcp_stacks/rack.c Wed Apr 22 00:16:42 2020 (r360180) @@ -6539,6 +6539,12 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, st if (IS_FASTOPEN(tp->t_flags) && tp->t_tfo_pending) { tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; + + /* + * Account for the ACK of our SYN prior to + * regular ACK processing below. + */ + tp->snd_una++; } if (tp->t_flags & TF_NEEDFIN) { tcp_state_change(tp, TCPS_FIN_WAIT_1); @@ -6556,12 +6562,6 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, st if (!IS_FASTOPEN(tp->t_flags)) cc_conn_init(tp); } - if (SEQ_GT(th->th_ack, tp->snd_una)) - /* - * Account for the ACK of our SYN prior to - * regular ACK processing below. - */ - tp->snd_una++; /* * If segment contains data or ACK, will call tcp_reass() later; if * not, do so now to pass queued data to user. From owner-svn-src-all@freebsd.org Wed Apr 22 00:42:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 121EC2C02D1; Wed, 22 Apr 2020 00:42:11 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496M8M02Rnz4RyJ; Wed, 22 Apr 2020 00:42:11 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D61F0A21D; Wed, 22 Apr 2020 00:42:10 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M0gAZb094724; Wed, 22 Apr 2020 00:42:10 GMT (envelope-from karels@FreeBSD.org) Received: (from karels@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M0gAIE094722; Wed, 22 Apr 2020 00:42:10 GMT (envelope-from karels@FreeBSD.org) Message-Id: <202004220042.03M0gAIE094722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: karels set sender to karels@FreeBSD.org using -f From: Mike Karels Date: Wed, 22 Apr 2020 00:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360181 - in head/sys: arm64/broadcom/genet arm64/conf arm64/include conf X-SVN-Group: head X-SVN-Commit-Author: karels X-SVN-Commit-Paths: in head/sys: arm64/broadcom/genet arm64/conf arm64/include conf X-SVN-Commit-Revision: 360181 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 00:42:11 -0000 Author: karels Date: Wed Apr 22 00:42:10 2020 New Revision: 360181 URL: https://svnweb.freebsd.org/changeset/base/360181 Log: Add genet driver for Raspberry Pi 4B Ethernet Add driver for Broadcom "GENET" version 5, as found in BCM-2711 on Raspberry Pi 4B. The driver is derived in part from the bcmgenet.c driver in NetBSD, along with bcmgenetreg.h. Reviewed by: manu Obtained from: in part from NetBSD Relnotes: yes, note addition Differential Revision: https://reviews.freebsd.org/D24436 Added: head/sys/arm64/broadcom/genet/ head/sys/arm64/broadcom/genet/if_genet.c (contents, props changed) head/sys/arm64/broadcom/genet/if_genetreg.h (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/arm64/include/bus.h head/sys/conf/files.arm64 Added: head/sys/arm64/broadcom/genet/if_genet.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/broadcom/genet/if_genet.c Wed Apr 22 00:42:10 2020 (r360181) @@ -0,0 +1,1678 @@ +/*- + * Copyright (c) 2020 Michael J Karels + * Copyright (c) 2016, 2020 Jared McNeill + * + * 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, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * RPi4 (BCM 2711) Gigabit Ethernet ("GENET") controller + * + * This driver is derived in large part from bcmgenet.c from NetBSD by + * Jared McNeill. Parts of the structure and other common code in + * this driver have been copied from if_awg.c for the Allwinner EMAC, + * also by Jared McNeill. + */ + +#include "opt_device_polling.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#define __BIT(_x) (1 << (_x)) +#include "if_genetreg.h" + +#include +#include +#include + +#include +#include +#include + +#include "syscon_if.h" +#include "miibus_if.h" +#include "gpio_if.h" + +#define RD4(sc, reg) bus_read_4((sc)->res[_RES_MAC], (reg)) +#define WR4(sc, reg, val) bus_write_4((sc)->res[_RES_MAC], (reg), (val)) + +#define GEN_LOCK(sc) mtx_lock(&(sc)->mtx) +#define GEN_UNLOCK(sc) mtx_unlock(&(sc)->mtx) +#define GEN_ASSERT_LOCKED(sc) mtx_assert(&(sc)->mtx, MA_OWNED) +#define GEN_ASSERT_UNLOCKED(sc) mtx_assert(&(sc)->mtx, MA_NOTOWNED) + +#define TX_DESC_COUNT GENET_DMA_DESC_COUNT +#define RX_DESC_COUNT GENET_DMA_DESC_COUNT + +#define TX_NEXT(n, count) (((n) + 1) & ((count) - 1)) +#define RX_NEXT(n, count) (((n) + 1) & ((count) - 1)) + + +#define TX_MAX_SEGS 20 + +/* Maximum number of mbufs to send to if_input */ +static int gen_rx_batch = 16 /* RX_BATCH_DEFAULT */; +TUNABLE_INT("hw.gen.rx_batch", &gen_rx_batch); + +static struct ofw_compat_data compat_data[] = { + { "brcm,genet-v1", 1 }, + { "brcm,genet-v2", 2 }, + { "brcm,genet-v3", 3 }, + { "brcm,genet-v4", 4 }, + { "brcm,genet-v5", 5 }, + { NULL, 0 } +}; + +enum { + _RES_MAC, /* what to call this? */ + _RES_IRQ1, + _RES_IRQ2, + _RES_NITEMS +}; + +static struct resource_spec gen_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 1, RF_ACTIVE }, + { -1, 0 } +}; + +/* structure per ring entry */ +struct gen_ring_ent { + bus_dmamap_t map; + struct mbuf *mbuf; +}; + +struct tx_queue { + int hwindex; /* hardware index */ + int nentries; + u_int queued; /* or avail? */ + u_int cur; + u_int next; + u_int prod_idx; + u_int cons_idx; + struct gen_ring_ent *entries; +}; + +struct rx_queue { + int hwindex; /* hardware index */ + int nentries; + u_int cur; + u_int prod_idx; + u_int cons_idx; + struct gen_ring_ent *entries; +}; + +struct gen_softc { + struct resource *res[_RES_NITEMS]; + struct mtx mtx; + if_t ifp; + device_t dev; + device_t miibus; + mii_contype_t phy_mode; + + struct callout stat_ch; + struct task link_task; + void *ih; + void *ih2; + int type; + int if_flags; + int link; + bus_dma_tag_t tx_buf_tag; + /* + * The genet chip has multiple queues for transmit and receive. + * This driver uses only one (queue 16, the default), but is cast + * with multiple rings. The additional rings are used for different + * priorities. + */ +#define DEF_TXQUEUE 0 +#define NTXQUEUE 1 + struct tx_queue tx_queue[NTXQUEUE]; + struct gen_ring_ent tx_ring_ent[TX_DESC_COUNT]; /* ring entries */ + + bus_dma_tag_t rx_buf_tag; +#define DEF_RXQUEUE 0 +#define NRXQUEUE 1 + struct rx_queue rx_queue[NRXQUEUE]; + struct gen_ring_ent rx_ring_ent[RX_DESC_COUNT]; /* ring entries */ +}; + +static void gen_init(void *softc); +static void gen_start(if_t ifp); +static void gen_destroy(struct gen_softc *sc); +static int gen_encap(struct gen_softc *sc, struct mbuf **mp); +static int gen_parse_tx(struct mbuf *m, int csum_flags); +static int gen_ioctl(if_t ifp, u_long cmd, caddr_t data); +static int gen_get_phy_mode(device_t dev); +static bool gen_get_eaddr(device_t dev, struct ether_addr *eaddr); +static void gen_set_enaddr(struct gen_softc *sc); +static void gen_setup_rxfilter(struct gen_softc *sc); +static void gen_reset(struct gen_softc *sc); +static void gen_enable(struct gen_softc *sc); +static void gen_dma_disable(device_t dev); +static int gen_bus_dma_init(struct gen_softc *sc); +static void gen_bus_dma_teardown(struct gen_softc *sc); +static void gen_enable_intr(struct gen_softc *sc); +static void gen_init_txrings(struct gen_softc *sc); +static void gen_init_rxrings(struct gen_softc *sc); +static void gen_intr(void *softc); +static int gen_rxintr(struct gen_softc *sc, struct rx_queue *q); +static void gen_txintr(struct gen_softc *sc, struct tx_queue *q); +static void gen_intr2(void *softc); +static int gen_newbuf_rx(struct gen_softc *sc, struct rx_queue *q, int index); +static int gen_mapbuf_rx(struct gen_softc *sc, struct rx_queue *q, int index, + struct mbuf *m); +static void gen_link_task(void *arg, int pending); +static void gen_media_status(if_t ifp, struct ifmediareq *ifmr); +static int gen_media_change(if_t ifp); +static void gen_tick(void *softc); + +static int +gen_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "RPi4 Gigabit Ethernet"); + return (BUS_PROBE_DEFAULT); +} + +static int +gen_attach(device_t dev) +{ + struct ether_addr eaddr; + struct gen_softc *sc; + int major, minor, error; + bool eaddr_found; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; + + if (bus_alloc_resources(dev, gen_spec, sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + error = ENXIO; + goto fail; + } + + major = (RD4(sc, GENET_SYS_REV_CTRL) & REV_MAJOR) >> REV_MAJOR_SHIFT; + if (major != REV_MAJOR_V5) { + device_printf(dev, "version %d is not supported\n", major); + error = ENXIO; + goto fail; + } + minor = (RD4(sc, GENET_SYS_REV_CTRL) & REV_MINOR) >> REV_MINOR_SHIFT; + device_printf(dev, "GENET version 5.%d phy 0x%04x\n", minor, + RD4(sc, GENET_SYS_REV_CTRL) & REV_PHY); + + mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); + callout_init_mtx(&sc->stat_ch, &sc->mtx, 0); + TASK_INIT(&sc->link_task, 0, gen_link_task, sc); + + error = gen_get_phy_mode(dev); + if (error != 0) + goto fail; + + bzero(&eaddr, sizeof(eaddr)); + eaddr_found = gen_get_eaddr(dev, &eaddr); + + /* reset core */ + gen_reset(sc); + + gen_dma_disable(dev); + + /* Setup DMA */ + error = gen_bus_dma_init(sc); + if (error != 0) { + device_printf(dev, "cannot setup bus dma\n"); + goto fail; + } + + /* Install interrupt handlers */ + error = bus_setup_intr(dev, sc->res[_RES_IRQ1], + INTR_TYPE_NET | INTR_MPSAFE, NULL, gen_intr, sc, &sc->ih); + if (error != 0) { + device_printf(dev, "cannot setup interrupt handler1\n"); + goto fail; + } + + error = bus_setup_intr(dev, sc->res[_RES_IRQ2], + INTR_TYPE_NET | INTR_MPSAFE, NULL, gen_intr2, sc, &sc->ih2); + if (error != 0) { + device_printf(dev, "cannot setup interrupt handler2\n"); + goto fail; + } + + /* Setup ethernet interface */ + sc->ifp = if_alloc(IFT_ETHER); + if_setsoftc(sc->ifp, sc); + if_initname(sc->ifp, device_get_name(dev), device_get_unit(dev)); + if_setflags(sc->ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); + if_setstartfn(sc->ifp, gen_start); + if_setioctlfn(sc->ifp, gen_ioctl); + if_setinitfn(sc->ifp, gen_init); + if_setsendqlen(sc->ifp, TX_DESC_COUNT - 1); + if_setsendqready(sc->ifp); +#define GEN_CSUM_FEATURES (CSUM_UDP | CSUM_TCP) + if_sethwassist(sc->ifp, GEN_CSUM_FEATURES); + if_setcapabilities(sc->ifp, IFCAP_VLAN_MTU | IFCAP_HWCSUM | + IFCAP_HWCSUM_IPV6); + if_setcapenable(sc->ifp, if_getcapabilities(sc->ifp)); + + /* Attach MII driver */ + error = mii_attach(dev, &sc->miibus, sc->ifp, gen_media_change, + gen_media_status, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, + MIIF_DOPAUSE); + if (error != 0) { + device_printf(dev, "cannot attach PHY\n"); + goto fail; + } + + /* If address was not found, create one based on the hostid and name. */ + if (eaddr_found == 0) + ether_gen_addr(sc->ifp, &eaddr); + /* Attach ethernet interface */ + ether_ifattach(sc->ifp, eaddr.octet); + +fail: + if (error) + gen_destroy(sc); + return (error); +} + +/* Free resources after failed attach. This is not a complete detach. */ +static void +gen_destroy(struct gen_softc *sc) +{ + + if (sc->miibus) { /* can't happen */ + device_delete_child(sc->dev, sc->miibus); + sc->miibus = NULL; + } + bus_teardown_intr(sc->dev, sc->res[_RES_IRQ1], sc->ih); + bus_teardown_intr(sc->dev, sc->res[_RES_IRQ2], sc->ih2); + gen_bus_dma_teardown(sc); + callout_drain(&sc->stat_ch); + if (mtx_initialized(&sc->mtx)) + mtx_destroy(&sc->mtx); + bus_release_resources(sc->dev, gen_spec, sc->res); + if (sc->ifp != NULL) { + if_free(sc->ifp); + sc->ifp = NULL; + } +} + +static int +gen_get_phy_mode(device_t dev) +{ + struct gen_softc *sc; + phandle_t node; + mii_contype_t type; + int error = 0; + + sc = device_get_softc(dev); + node = ofw_bus_get_node(dev); + type = mii_fdt_get_contype(node); + + switch (type) { + case MII_CONTYPE_RGMII: + case MII_CONTYPE_RGMII_RXID: + case MII_CONTYPE_RGMII_TXID: + sc->phy_mode = type; + break; + default: + device_printf(dev, "unknown phy-mode '%s'\n", + mii_fdt_contype_to_name(type)); + error = ENXIO; + break; + } + + return (error); +} + +static bool +gen_get_eaddr(device_t dev, struct ether_addr *eaddr) +{ + struct gen_softc *sc; + uint32_t maclo, machi, val; + phandle_t node; + + sc = device_get_softc(dev); + + node = ofw_bus_get_node(dev); + if (OF_getprop(node, "mac-address", eaddr->octet, + ETHER_ADDR_LEN) != -1 || + OF_getprop(node, "local-mac-address", eaddr->octet, + ETHER_ADDR_LEN) != -1 || + OF_getprop(node, "address", eaddr->octet, ETHER_ADDR_LEN) != -1) + return (true); + + device_printf(dev, "No Ethernet address found in fdt!\n"); + maclo = machi = 0; + + val = RD4(sc, GENET_SYS_RBUF_FLUSH_CTRL); + if ((val & GENET_SYS_RBUF_FLUSH_RESET) == 0) { + maclo = htobe32(RD4(sc, GENET_UMAC_MAC0)); + machi = htobe16(RD4(sc, GENET_UMAC_MAC1) & 0xffff); + } + + if (maclo == 0 && machi == 0) { + if (bootverbose) + device_printf(dev, + "No Ethernet address found in controller\n"); + return (false); + } else { + eaddr->octet[0] = maclo & 0xff; + eaddr->octet[1] = (maclo >> 8) & 0xff; + eaddr->octet[2] = (maclo >> 16) & 0xff; + eaddr->octet[3] = (maclo >> 24) & 0xff; + eaddr->octet[4] = machi & 0xff; + eaddr->octet[5] = (machi >> 8) & 0xff; + return (true); + } +} + +static void +gen_reset(struct gen_softc *sc) +{ + uint32_t val; + + val = RD4(sc, GENET_SYS_RBUF_FLUSH_CTRL); + val |= GENET_SYS_RBUF_FLUSH_RESET; + WR4(sc, GENET_SYS_RBUF_FLUSH_CTRL, val); + DELAY(10); + + val &= ~GENET_SYS_RBUF_FLUSH_RESET; + WR4(sc, GENET_SYS_RBUF_FLUSH_CTRL, val); + DELAY(10); + + WR4(sc, GENET_SYS_RBUF_FLUSH_CTRL, 0); + DELAY(10); + + WR4(sc, GENET_UMAC_CMD, 0); + WR4(sc, GENET_UMAC_CMD, + GENET_UMAC_CMD_LCL_LOOP_EN | GENET_UMAC_CMD_SW_RESET); + DELAY(10); + WR4(sc, GENET_UMAC_CMD, 0); + + WR4(sc, GENET_UMAC_MIB_CTRL, GENET_UMAC_MIB_RESET_RUNT | + GENET_UMAC_MIB_RESET_RX | GENET_UMAC_MIB_RESET_TX); + WR4(sc, GENET_UMAC_MIB_CTRL, 0); + + WR4(sc, GENET_UMAC_MAX_FRAME_LEN, 1536); + + val = RD4(sc, GENET_RBUF_CTRL); + val |= GENET_RBUF_ALIGN_2B; + WR4(sc, GENET_RBUF_CTRL, val); + + WR4(sc, GENET_RBUF_TBUF_SIZE_CTRL, 1); +} + +static void +gen_enable(struct gen_softc *sc) +{ + u_int val; + + /* Enable transmitter and receiver */ + val = RD4(sc, GENET_UMAC_CMD); + val |= GENET_UMAC_CMD_TXEN; + val |= GENET_UMAC_CMD_RXEN; + WR4(sc, GENET_UMAC_CMD, val); + + /* Enable interrupts */ + gen_enable_intr(sc); + WR4(sc, GENET_INTRL2_CPU_CLEAR_MASK, + GENET_IRQ_TXDMA_DONE | GENET_IRQ_RXDMA_DONE); +} + +static void +gen_enable_offload(struct gen_softc *sc) +{ + uint32_t check_ctrl, buf_ctrl; + + check_ctrl = RD4(sc, GENET_RBUF_CHECK_CTRL); + buf_ctrl = RD4(sc, GENET_RBUF_CTRL); + if ((if_getcapenable(sc->ifp) & IFCAP_RXCSUM) != 0) { + check_ctrl |= GENET_RBUF_CHECK_CTRL_EN; + buf_ctrl |= GENET_RBUF_64B_EN; + } else { + check_ctrl &= ~GENET_RBUF_CHECK_CTRL_EN; + buf_ctrl &= ~GENET_RBUF_64B_EN; + } + WR4(sc, GENET_RBUF_CHECK_CTRL, check_ctrl); + WR4(sc, GENET_RBUF_CTRL, buf_ctrl); + + buf_ctrl = RD4(sc, GENET_TBUF_CTRL); + if ((if_getcapenable(sc->ifp) & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) != + 0) + buf_ctrl |= GENET_RBUF_64B_EN; + else + buf_ctrl &= ~GENET_RBUF_64B_EN; + WR4(sc, GENET_TBUF_CTRL, buf_ctrl); +} + +static void +gen_dma_disable(device_t dev) +{ + struct gen_softc *sc = device_get_softc(dev); + int val; + + val = RD4(sc, GENET_TX_DMA_CTRL); + val &= ~GENET_TX_DMA_CTRL_EN; + val &= ~GENET_TX_DMA_CTRL_RBUF_EN(GENET_DMA_DEFAULT_QUEUE); + WR4(sc, GENET_TX_DMA_CTRL, val); + + val = RD4(sc, GENET_RX_DMA_CTRL); + val &= ~GENET_RX_DMA_CTRL_EN; + val &= ~GENET_RX_DMA_CTRL_RBUF_EN(GENET_DMA_DEFAULT_QUEUE); + WR4(sc, GENET_RX_DMA_CTRL, val); +} + +static int +gen_bus_dma_init(struct gen_softc *sc) +{ + struct device *dev = sc->dev; + int i, error; + + error = bus_dma_tag_create( + bus_get_dma_tag(dev), /* Parent tag */ + 4, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_40BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MCLBYTES, TX_MAX_SEGS, /* maxsize, nsegs */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->tx_buf_tag); + if (error != 0) { + device_printf(dev, "cannot create TX buffer tag\n"); + return (error); + } + + for (i = 0; i < TX_DESC_COUNT; i++) { + error = bus_dmamap_create(sc->tx_buf_tag, 0, + &sc->tx_ring_ent[i].map); + if (error != 0) { + device_printf(dev, "cannot create TX buffer map\n"); + return (error); + } + } + + error = bus_dma_tag_create( + bus_get_dma_tag(dev), /* Parent tag */ + 4, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_40BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MCLBYTES, 1, /* maxsize, nsegs */ + MCLBYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockarg */ + &sc->rx_buf_tag); + if (error != 0) { + device_printf(dev, "cannot create RX buffer tag\n"); + return (error); + } + + for (i = 0; i < RX_DESC_COUNT; i++) { + error = bus_dmamap_create(sc->rx_buf_tag, 0, + &sc->rx_ring_ent[i].map); + if (error != 0) { + device_printf(dev, "cannot create RX buffer map\n"); + return (error); + } + } + return (0); +} + +static void +gen_bus_dma_teardown(struct gen_softc *sc) +{ + int i, error; + + if (sc->tx_buf_tag != NULL) { + for (i = 0; i < TX_DESC_COUNT; i++) { + error = bus_dmamap_destroy(sc->tx_buf_tag, + sc->tx_ring_ent[i].map); + sc->tx_ring_ent[i].map = NULL; + if (error) + device_printf(sc->dev, + "%s: bus_dmamap_destroy failed: %d\n", + __func__, error); + } + error = bus_dma_tag_destroy(sc->tx_buf_tag); + sc->tx_buf_tag = NULL; + if (error) + device_printf(sc->dev, + "%s: bus_dma_tag_destroy failed: %d\n", __func__, + error); + } + + if (sc->tx_buf_tag != NULL) { + for (i = 0; i < RX_DESC_COUNT; i++) { + error = bus_dmamap_destroy(sc->rx_buf_tag, + sc->rx_ring_ent[i].map); + sc->rx_ring_ent[i].map = NULL; + if (error) + device_printf(sc->dev, + "%s: bus_dmamap_destroy failed: %d\n", + __func__, error); + } + error = bus_dma_tag_destroy(sc->rx_buf_tag); + sc->rx_buf_tag = NULL; + if (error) + device_printf(sc->dev, + "%s: bus_dma_tag_destroy failed: %d\n", __func__, + error); + } +} + +static void +gen_enable_intr(struct gen_softc *sc) +{ + + WR4(sc, GENET_INTRL2_CPU_CLEAR_MASK, + GENET_IRQ_TXDMA_DONE | GENET_IRQ_RXDMA_DONE); +} + +/* + * "queue" is the software queue index (0-4); "qid" is the hardware index + * (0-16). "base" is the starting index in the ring array. + */ +static void +gen_init_txring(struct gen_softc *sc, int queue, int qid, int base, + int nentries) +{ + struct tx_queue *q; + uint32_t val; + + q = &sc->tx_queue[queue]; + q->entries = &sc->tx_ring_ent[base]; + q->hwindex = qid; + q->nentries = nentries; + + /* TX ring */ + + q->queued = 0; + q->cons_idx = q->prod_idx = 0; + + WR4(sc, GENET_TX_SCB_BURST_SIZE, 0x08); + + WR4(sc, GENET_TX_DMA_READ_PTR_LO(qid), 0); + WR4(sc, GENET_TX_DMA_READ_PTR_HI(qid), 0); + WR4(sc, GENET_TX_DMA_CONS_INDEX(qid), 0); + WR4(sc, GENET_TX_DMA_PROD_INDEX(qid), 0); + WR4(sc, GENET_TX_DMA_RING_BUF_SIZE(qid), + (nentries << GENET_TX_DMA_RING_BUF_SIZE_DESC_SHIFT) | + (MCLBYTES & GENET_TX_DMA_RING_BUF_SIZE_BUF_LEN_MASK)); + WR4(sc, GENET_TX_DMA_START_ADDR_LO(qid), 0); + WR4(sc, GENET_TX_DMA_START_ADDR_HI(qid), 0); + WR4(sc, GENET_TX_DMA_END_ADDR_LO(qid), + TX_DESC_COUNT * GENET_DMA_DESC_SIZE / 4 - 1); + WR4(sc, GENET_TX_DMA_END_ADDR_HI(qid), 0); + WR4(sc, GENET_TX_DMA_MBUF_DONE_THRES(qid), 1); + WR4(sc, GENET_TX_DMA_FLOW_PERIOD(qid), 0); + WR4(sc, GENET_TX_DMA_WRITE_PTR_LO(qid), 0); + WR4(sc, GENET_TX_DMA_WRITE_PTR_HI(qid), 0); + + WR4(sc, GENET_TX_DMA_RING_CFG, __BIT(qid)); /* enable */ + + /* Enable transmit DMA */ + val = RD4(sc, GENET_TX_DMA_CTRL); + val |= GENET_TX_DMA_CTRL_EN; + val |= GENET_TX_DMA_CTRL_RBUF_EN(qid); + WR4(sc, GENET_TX_DMA_CTRL, val); +} + +/* + * "queue" is the software queue index (0-4); "qid" is the hardware index + * (0-16). "base" is the starting index in the ring array. + */ +static void +gen_init_rxring(struct gen_softc *sc, int queue, int qid, int base, + int nentries) +{ + struct rx_queue *q; + uint32_t val; + int i; + + q = &sc->rx_queue[queue]; + q->entries = &sc->rx_ring_ent[base]; + q->hwindex = qid; + q->nentries = nentries; + q->cons_idx = q->prod_idx = 0; + + WR4(sc, GENET_RX_SCB_BURST_SIZE, 0x08); + + WR4(sc, GENET_RX_DMA_WRITE_PTR_LO(qid), 0); + WR4(sc, GENET_RX_DMA_WRITE_PTR_HI(qid), 0); + WR4(sc, GENET_RX_DMA_PROD_INDEX(qid), 0); + WR4(sc, GENET_RX_DMA_CONS_INDEX(qid), 0); + WR4(sc, GENET_RX_DMA_RING_BUF_SIZE(qid), + (nentries << GENET_RX_DMA_RING_BUF_SIZE_DESC_SHIFT) | + (MCLBYTES & GENET_RX_DMA_RING_BUF_SIZE_BUF_LEN_MASK)); + WR4(sc, GENET_RX_DMA_START_ADDR_LO(qid), 0); + WR4(sc, GENET_RX_DMA_START_ADDR_HI(qid), 0); + WR4(sc, GENET_RX_DMA_END_ADDR_LO(qid), + RX_DESC_COUNT * GENET_DMA_DESC_SIZE / 4 - 1); + WR4(sc, GENET_RX_DMA_END_ADDR_HI(qid), 0); + WR4(sc, GENET_RX_DMA_XON_XOFF_THRES(qid), + (5 << GENET_RX_DMA_XON_XOFF_THRES_LO_SHIFT) | (RX_DESC_COUNT >> 4)); + WR4(sc, GENET_RX_DMA_READ_PTR_LO(qid), 0); + WR4(sc, GENET_RX_DMA_READ_PTR_HI(qid), 0); + + WR4(sc, GENET_RX_DMA_RING_CFG, __BIT(qid)); /* enable */ + + /* fill ring */ + for (i = 0; i < RX_DESC_COUNT; i++) + gen_newbuf_rx(sc, &sc->rx_queue[DEF_RXQUEUE], i); + + /* Enable receive DMA */ + val = RD4(sc, GENET_RX_DMA_CTRL); + val |= GENET_RX_DMA_CTRL_EN; + val |= GENET_RX_DMA_CTRL_RBUF_EN(qid); + WR4(sc, GENET_RX_DMA_CTRL, val); +} + +static void +gen_init_txrings(struct gen_softc *sc) +{ + int base = 0; +#ifdef PRI_RINGS + int i; + + /* init priority rings */ + for (i = 0; i < PRI_RINGS; i++) { + gen_init_txring(sc, i, i, base, TX_DESC_PRICOUNT); + sc->tx_queue[i].queue = i; + base += TX_DESC_PRICOUNT; + dma_ring_conf |= 1 << i; + dma_control |= DMA_RENABLE(i); + } +#endif + + /* init GENET_DMA_DEFAULT_QUEUE (16) */ + gen_init_txring(sc, DEF_TXQUEUE, GENET_DMA_DEFAULT_QUEUE, base, + TX_DESC_COUNT); + sc->tx_queue[DEF_TXQUEUE].hwindex = GENET_DMA_DEFAULT_QUEUE; +} + +static void +gen_init_rxrings(struct gen_softc *sc) +{ + int base = 0; +#ifdef PRI_RINGS + int i; + + /* init priority rings */ + for (i = 0; i < PRI_RINGS; i++) { + gen_init_rxring(sc, i, i, base, TX_DESC_PRICOUNT); + sc->rx_queue[i].queue = i; + base += TX_DESC_PRICOUNT; + dma_ring_conf |= 1 << i; + dma_control |= DMA_RENABLE(i); + } +#endif + + /* init GENET_DMA_DEFAULT_QUEUE (16) */ + gen_init_rxring(sc, DEF_RXQUEUE, GENET_DMA_DEFAULT_QUEUE, base, + RX_DESC_COUNT); + sc->rx_queue[DEF_RXQUEUE].hwindex = GENET_DMA_DEFAULT_QUEUE; + +} + +static void +gen_init_locked(struct gen_softc *sc) +{ + struct mii_data *mii; + if_t ifp; + + mii = device_get_softc(sc->miibus); + ifp = sc->ifp; + + GEN_ASSERT_LOCKED(sc); + + if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) + return; + + if (sc->phy_mode == MII_CONTYPE_RGMII || + sc->phy_mode == MII_CONTYPE_RGMII_RXID) + WR4(sc, GENET_SYS_PORT_CTRL, + GENET_SYS_PORT_MODE_EXT_GPHY); + + gen_set_enaddr(sc); + + /* Setup RX filter */ + gen_setup_rxfilter(sc); + + gen_init_txrings(sc); + gen_init_rxrings(sc); + gen_enable(sc); + gen_enable_offload(sc); + + if_setdrvflagbits(ifp, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); + + mii_mediachg(mii); + callout_reset(&sc->stat_ch, hz, gen_tick, sc); +} + +static void +gen_init(void *softc) +{ + struct gen_softc *sc; + + sc = softc; + GEN_LOCK(sc); + gen_init_locked(sc); + GEN_UNLOCK(sc); +} + +static uint8_t ether_broadcastaddr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + +static void +gen_setup_rxfilter_mdf(struct gen_softc *sc, u_int n, const uint8_t *ea) +{ + uint32_t addr0 = (ea[0] << 8) | ea[1]; + uint32_t addr1 = (ea[2] << 24) | (ea[3] << 16) | (ea[4] << 8) | ea[5]; + + WR4(sc, GENET_UMAC_MDF_ADDR0(n), addr0); + WR4(sc, GENET_UMAC_MDF_ADDR1(n), addr1); +} + +static u_int +gen_setup_multi(void *arg, struct sockaddr_dl *sdl, u_int count) +{ + struct gen_softc *sc = arg; + + /* "count + 2" to account for unicast and broadcast */ + gen_setup_rxfilter_mdf(sc, count + 2, LLADDR(sdl)); + return (1); /* increment to count */ +} + +static void +gen_setup_rxfilter(struct gen_softc *sc) +{ + struct ifnet *ifp = sc->ifp; + uint32_t cmd, mdf_ctrl; + u_int n; + + GEN_ASSERT_LOCKED(sc); + + cmd = RD4(sc, GENET_UMAC_CMD); + + /* + * Count the required number of hardware filters. We need one + * for each multicast address, plus one for our own address and + * the broadcast address. + */ + n = if_llmaddr_count(ifp) + 2; + + if (n > GENET_MAX_MDF_FILTER) + ifp->if_flags |= IFF_ALLMULTI; + else + ifp->if_flags &= ~IFF_ALLMULTI; + + if ((ifp->if_flags & (IFF_PROMISC|IFF_ALLMULTI)) != 0) { + cmd |= GENET_UMAC_CMD_PROMISC; + mdf_ctrl = 0; + } else { + cmd &= ~GENET_UMAC_CMD_PROMISC; + gen_setup_rxfilter_mdf(sc, 0, ether_broadcastaddr); + gen_setup_rxfilter_mdf(sc, 1, IF_LLADDR(ifp)); + (void) if_foreach_llmaddr(ifp, gen_setup_multi, sc); + mdf_ctrl = (__BIT(GENET_MAX_MDF_FILTER) - 1) &~ + (__BIT(GENET_MAX_MDF_FILTER - n) - 1); + } + + WR4(sc, GENET_UMAC_CMD, cmd); + WR4(sc, GENET_UMAC_MDF_CTRL, mdf_ctrl); +} + +static void +gen_set_enaddr(struct gen_softc *sc) +{ + uint8_t *enaddr; + uint32_t val; + if_t ifp; + + GEN_ASSERT_LOCKED(sc); + + ifp = sc->ifp; + + /* Write our unicast address */ + enaddr = IF_LLADDR(ifp); + /* Write hardware address */ + val = enaddr[3] | (enaddr[2] << 8) | (enaddr[1] << 16) | + (enaddr[0] << 24); + WR4(sc, GENET_UMAC_MAC0, val); + val = enaddr[5] | (enaddr[4] << 8); + WR4(sc, GENET_UMAC_MAC1, val); +} + +static void +gen_start_locked(struct gen_softc *sc) +{ + struct mbuf *m; + if_t ifp; + int cnt, err; + + GEN_ASSERT_LOCKED(sc); + + if (!sc->link) + return; + + ifp = sc->ifp; + + if ((if_getdrvflags(ifp) & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING) + return; + + for (cnt = 0; ; cnt++) { + m = if_dequeue(ifp); + if (m == NULL) + break; + + err = gen_encap(sc, &m); + if (err != 0) { + if (err == ENOBUFS) + if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0); + if (m != NULL) + if_sendq_prepend(ifp, m); + break; + } + if_bpfmtap(ifp, m); + } +} + +static void +gen_start(if_t ifp) +{ + struct gen_softc *sc; + + sc = if_getsoftc(ifp); + + GEN_LOCK(sc); + gen_start_locked(sc); + GEN_UNLOCK(sc); +} + +static int +gen_encap(struct gen_softc *sc, struct mbuf **mp) +{ + bus_dmamap_t map; + bus_dma_segment_t segs[TX_MAX_SEGS]; + int error, nsegs, cur, first, i, index, offset; + uint32_t csuminfo, length_status, csum_flags = 0, csumdata; + struct mbuf *m; + struct statusblock *sb = NULL; + struct tx_queue *q; + struct gen_ring_ent *ent; + + GEN_ASSERT_LOCKED(sc); + + q = &sc->tx_queue[DEF_TXQUEUE]; + + m = *mp; + if ((if_getcapenable(sc->ifp) & (IFCAP_TXCSUM | IFCAP_TXCSUM_IPV6)) != + 0) { + csum_flags = m->m_pkthdr.csum_flags; + csumdata = m->m_pkthdr.csum_data; + M_PREPEND(m, sizeof(struct statusblock), M_NOWAIT); + if (m == NULL) { + if (sc->ifp->if_flags & IFF_DEBUG) + device_printf(sc->dev, "prepend fail\n"); + *mp = NULL; + return (ENOMEM); + } + offset = gen_parse_tx(m, csum_flags); + sb = mtod(m, struct statusblock *); + if (csum_flags != 0) { + csuminfo = (offset << TXCSUM_OFF_SHIFT) | + (offset + csumdata); + if (csum_flags & (CSUM_TCP | CSUM_UDP)) + csuminfo |= TXCSUM_LEN_VALID; + if (csum_flags & CSUM_UDP) + csuminfo |= TXCSUM_UDP; + sb->txcsuminfo = csuminfo; + } else + sb->txcsuminfo = 0; + } + + *mp = m; + + cur = first = q->cur; + ent = &q->entries[cur]; + map = ent->map; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Apr 22 03:45:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF7C62C4B2C; Wed, 22 Apr 2020 03:45:52 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496RDJ4t55z4cqP; Wed, 22 Apr 2020 03:45:52 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A26F0C80C; Wed, 22 Apr 2020 03:45:52 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M3jqVb008174; Wed, 22 Apr 2020 03:45:52 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M3jqrS008173; Wed, 22 Apr 2020 03:45:52 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004220345.03M3jqrS008173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 22 Apr 2020 03:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360182 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 360182 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 03:45:52 -0000 Author: kevans Date: Wed Apr 22 03:45:52 2020 New Revision: 360182 URL: https://svnweb.freebsd.org/changeset/base/360182 Log: kqueue(2): add a note about EV_RECEIPT In the below-referenced PR, a case is attached of a simple reproducer that exhibits suboptimal behavior: EVFILT_READ and EVFILT_WRITE being set in the same kevent(2) call will only honor the first one. This is, in-fact, how it's supposed to work. A read of the manpage leads me to believe we could be more clear about this; right now there's a logical leap to make in the relevant statement: "When passed as input, it forces EV_ERROR to always be returned." -- the logical leap being that this indicates the caller should have allocated space for the change to be returned with EV_ERROR indicated in the events, or subsequent filters will get dropped on the floor. Another possible workaround that accomplishes similar effect without needing space for all events is just setting EV_RECEIPT on the final change being passed in; if any errored before it, the kqueue would not be drained. If we made it to the final change with EV_RECEIPT set, then we would return that one with EV_ERROR and still not drain the kqueue. This would seem to not be all that advisable. PR: 229741 MFC after: 1 week Modified: head/lib/libc/sys/kqueue.2 Modified: head/lib/libc/sys/kqueue.2 ============================================================================== --- head/lib/libc/sys/kqueue.2 Wed Apr 22 00:42:10 2020 (r360181) +++ head/lib/libc/sys/kqueue.2 Wed Apr 22 03:45:52 2020 (r360182) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 27, 2018 +.Dd April 21, 2020 .Dt KQUEUE 2 .Os .Sh NAME @@ -63,8 +63,7 @@ the event no longer holds, the kevent is removed from is not returned. .Pp Multiple events which trigger the filter do not result in multiple -kevents being placed on the kqueue; instead, the filter will aggregate -the events into a single struct kevent. +kevents being placed on the kqueue; instead, the filter wiApril 21, 2020the events into a single struct kevent. Calling .Fn close on a file descriptor will remove any kevents that reference the descriptor. @@ -233,6 +232,11 @@ to always be returned. When a filter is successfully added the .Va data field will be zero. +Note that if this flag is encountered and there is no remaining space in +.Fa eventlist +to hold the +.Dv EV_ERROR +event, then subsequent changes will not get processed. .It Dv EV_ONESHOT Causes the event to return only the first occurrence of the filter being triggered. From owner-svn-src-all@freebsd.org Wed Apr 22 04:05:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C18B2C50D2; Wed, 22 Apr 2020 04:05:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496RfR2JF6z4dv1; Wed, 22 Apr 2020 04:05:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4A2CCCBDD; Wed, 22 Apr 2020 04:05:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M453DO020603; Wed, 22 Apr 2020 04:05:03 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M453RV020602; Wed, 22 Apr 2020 04:05:03 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004220405.03M453RV020602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 22 Apr 2020 04:05:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360183 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 360183 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 04:05:03 -0000 Author: kevans Date: Wed Apr 22 04:05:02 2020 New Revision: 360183 URL: https://svnweb.freebsd.org/changeset/base/360183 Log: kqueue(2): de-vandalize the random sentence in the middle A last minute change appears to have inadvertently vandalized unrelated parts of the manpage with the date. =-( Reported by: rpokala Modified: head/lib/libc/sys/kqueue.2 Modified: head/lib/libc/sys/kqueue.2 ============================================================================== --- head/lib/libc/sys/kqueue.2 Wed Apr 22 03:45:52 2020 (r360182) +++ head/lib/libc/sys/kqueue.2 Wed Apr 22 04:05:02 2020 (r360183) @@ -63,7 +63,8 @@ the event no longer holds, the kevent is removed from is not returned. .Pp Multiple events which trigger the filter do not result in multiple -kevents being placed on the kqueue; instead, the filter wiApril 21, 2020the events into a single struct kevent. +kevents being placed on the kqueue; instead, the filter will aggregate +the events into a single struct kevent. Calling .Fn close on a file descriptor will remove any kevents that reference the descriptor. From owner-svn-src-all@freebsd.org Wed Apr 22 05:08:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D3402C5EAE; Wed, 22 Apr 2020 05:08:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496T3v08lrz3CTN; Wed, 22 Apr 2020 05:08:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F0148D70C; Wed, 22 Apr 2020 05:08:42 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M58gWb057267; Wed, 22 Apr 2020 05:08:42 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M58gA0057266; Wed, 22 Apr 2020 05:08:42 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202004220508.03M58gA0057266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 22 Apr 2020 05:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360184 - stable/12/sys/dev/evdev X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/sys/dev/evdev X-SVN-Commit-Revision: 360184 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 05:08:43 -0000 Author: delphij Date: Wed Apr 22 05:08:42 2020 New Revision: 360184 URL: https://svnweb.freebsd.org/changeset/base/360184 Log: MFC r360104: Use LIST_FOREACH_SAFE instead of LIST_FOREACH as we are removing elements in the middle. This fixes a panic when detaching USB mouse. PR: 245732 Reviewed by: wulf Modified: stable/12/sys/dev/evdev/evdev.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/evdev/evdev.c ============================================================================== --- stable/12/sys/dev/evdev/evdev.c Wed Apr 22 04:05:02 2020 (r360183) +++ stable/12/sys/dev/evdev/evdev.c Wed Apr 22 05:08:42 2020 (r360184) @@ -356,7 +356,7 @@ evdev_register_mtx(struct evdev_dev *evdev, struct mtx int evdev_unregister(struct evdev_dev *evdev) { - struct evdev_client *client; + struct evdev_client *client, *tmp; int ret; debugf(evdev, "%s: unregistered evdev provider: %s\n", evdev->ev_shortname, evdev->ev_name); @@ -366,7 +366,7 @@ evdev_unregister(struct evdev_dev *evdev) EVDEV_LOCK(evdev); evdev->ev_cdev->si_drv1 = NULL; /* Wake up sleepers */ - LIST_FOREACH(client, &evdev->ev_clients, ec_link) { + LIST_FOREACH_SAFE(client, &evdev->ev_clients, ec_link, tmp) { evdev_revoke_client(client); evdev_dispose_client(evdev, client); EVDEV_CLIENT_LOCKQ(client); From owner-svn-src-all@freebsd.org Wed Apr 22 05:14:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 870EF2C60D2; Wed, 22 Apr 2020 05:14:53 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496TC132KLz3Cx2; Wed, 22 Apr 2020 05:14:53 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6354CD8E5; Wed, 22 Apr 2020 05:14:53 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M5ErC0063315; Wed, 22 Apr 2020 05:14:53 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M5Er6m063314; Wed, 22 Apr 2020 05:14:53 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202004220514.03M5Er6m063314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 22 Apr 2020 05:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360185 - stable/11/sys/dev/evdev X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/sys/dev/evdev X-SVN-Commit-Revision: 360185 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 05:14:53 -0000 Author: delphij Date: Wed Apr 22 05:14:52 2020 New Revision: 360185 URL: https://svnweb.freebsd.org/changeset/base/360185 Log: MFC r360104: Use LIST_FOREACH_SAFE instead of LIST_FOREACH as we are removing elements in the middle. This fixes a panic when detaching USB mouse. PR: 245732 Reviewed by: wulf Modified: stable/11/sys/dev/evdev/evdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/evdev/evdev.c ============================================================================== --- stable/11/sys/dev/evdev/evdev.c Wed Apr 22 05:08:42 2020 (r360184) +++ stable/11/sys/dev/evdev/evdev.c Wed Apr 22 05:14:52 2020 (r360185) @@ -354,7 +354,7 @@ evdev_register_mtx(struct evdev_dev *evdev, struct mtx int evdev_unregister(struct evdev_dev *evdev) { - struct evdev_client *client; + struct evdev_client *client, *tmp; int ret; debugf(evdev, "%s: unregistered evdev provider: %s\n", evdev->ev_shortname, evdev->ev_name); @@ -364,7 +364,7 @@ evdev_unregister(struct evdev_dev *evdev) EVDEV_LOCK(evdev); evdev->ev_cdev->si_drv1 = NULL; /* Wake up sleepers */ - LIST_FOREACH(client, &evdev->ev_clients, ec_link) { + LIST_FOREACH_SAFE(client, &evdev->ev_clients, ec_link, tmp) { evdev_revoke_client(client); evdev_dispose_client(evdev, client); EVDEV_CLIENT_LOCKQ(client); From owner-svn-src-all@freebsd.org Wed Apr 22 05:54:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 88FF32C6A94; Wed, 22 Apr 2020 05:54:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496V532q1cz3FMq; Wed, 22 Apr 2020 05:54:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B860E051; Wed, 22 Apr 2020 05:54:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M5slCq087838; Wed, 22 Apr 2020 05:54:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M5skV0087832; Wed, 22 Apr 2020 05:54:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202004220554.03M5skV0087832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 22 Apr 2020 05:54:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360186 - stable/12/usr.bin/gzip X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/usr.bin/gzip X-SVN-Commit-Revision: 360186 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 05:54:47 -0000 Author: delphij Date: Wed Apr 22 05:54:46 2020 New Revision: 360186 URL: https://svnweb.freebsd.org/changeset/base/360186 Log: MFC r358988: Remove unneeded checks for prelen. Modified: stable/12/usr.bin/gzip/gzip.c stable/12/usr.bin/gzip/unlz.c stable/12/usr.bin/gzip/unpack.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/gzip/gzip.c ============================================================================== --- stable/12/usr.bin/gzip/gzip.c Wed Apr 22 05:14:52 2020 (r360185) +++ stable/12/usr.bin/gzip/gzip.c Wed Apr 22 05:54:46 2020 (r360186) @@ -1443,7 +1443,7 @@ file_uncompress(char *file, char *outfile, size_t outs struct stat isb, osb; off_t size; ssize_t rbytes; - unsigned char header1[4]; + unsigned char fourbytes[4]; enum filetype method; int fd, ofd, zfd = -1; int error; @@ -1477,8 +1477,8 @@ file_uncompress(char *file, char *outfile, size_t outs goto lose; } - rbytes = read(fd, header1, sizeof header1); - if (rbytes != sizeof header1) { + rbytes = read(fd, fourbytes, sizeof fourbytes); + if (rbytes != sizeof fourbytes) { /* we don't want to fail here. */ #ifndef SMALL if (fflag) @@ -1492,7 +1492,7 @@ file_uncompress(char *file, char *outfile, size_t outs } infile_newdata(rbytes); - method = file_gettype(header1); + method = file_gettype(fourbytes); #ifndef SMALL if (fflag == 0 && method == FT_UNKNOWN) { maybe_warnx("%s: not in gzip format", file); @@ -1516,7 +1516,7 @@ file_uncompress(char *file, char *outfile, size_t outs infile_newdata(rv); timestamp = le32dec(&ts[0]); - if (header1[3] & ORIG_NAME) { + if (fourbytes[3] & ORIG_NAME) { rbytes = pread(fd, name, sizeof(name) - 1, GZIP_ORIGNAME); if (rbytes < 0) { maybe_warn("can't read %s", file); @@ -1818,7 +1818,7 @@ static void handle_stdin(void) { struct stat isb; - unsigned char header1[4]; + unsigned char fourbytes[4]; size_t in_size; off_t usize, gsize; enum filetype method; @@ -1849,16 +1849,16 @@ handle_stdin(void) goto out; } - bytes_read = read_retry(STDIN_FILENO, header1, sizeof header1); + bytes_read = read_retry(STDIN_FILENO, fourbytes, sizeof fourbytes); if (bytes_read == -1) { maybe_warn("can't read stdin"); goto out; - } else if (bytes_read != sizeof(header1)) { + } else if (bytes_read != sizeof(fourbytes)) { maybe_warnx("(stdin): unexpected end of file"); goto out; } - method = file_gettype(header1); + method = file_gettype(fourbytes); switch (method) { default: #ifndef SMALL @@ -1866,17 +1866,17 @@ handle_stdin(void) maybe_warnx("unknown compression format"); goto out; } - usize = cat_fd(header1, sizeof header1, &gsize, STDIN_FILENO); + usize = cat_fd(fourbytes, sizeof fourbytes, &gsize, STDIN_FILENO); break; #endif case FT_GZIP: usize = gz_uncompress(STDIN_FILENO, STDOUT_FILENO, - (char *)header1, sizeof header1, &gsize, "(stdin)"); + (char *)fourbytes, sizeof fourbytes, &gsize, "(stdin)"); break; #ifndef NO_BZIP2_SUPPORT case FT_BZIP2: usize = unbzip2(STDIN_FILENO, STDOUT_FILENO, - (char *)header1, sizeof header1, &gsize); + (char *)fourbytes, sizeof fourbytes, &gsize); break; #endif #ifndef NO_COMPRESS_SUPPORT @@ -1886,27 +1886,27 @@ handle_stdin(void) goto out; } - usize = zuncompress(in, stdout, (char *)header1, - sizeof header1, &gsize); + usize = zuncompress(in, stdout, (char *)fourbytes, + sizeof fourbytes, &gsize); fclose(in); break; #endif #ifndef NO_PACK_SUPPORT case FT_PACK: usize = unpack(STDIN_FILENO, STDOUT_FILENO, - (char *)header1, sizeof header1, &gsize); + (char *)fourbytes, sizeof fourbytes, &gsize); break; #endif #ifndef NO_XZ_SUPPORT case FT_XZ: usize = unxz(STDIN_FILENO, STDOUT_FILENO, - (char *)header1, sizeof header1, &gsize); + (char *)fourbytes, sizeof fourbytes, &gsize); break; #endif #ifndef NO_LZ_SUPPORT case FT_LZ: usize = unlz(STDIN_FILENO, STDOUT_FILENO, - (char *)header1, sizeof header1, &gsize); + (char *)fourbytes, sizeof fourbytes, &gsize); break; #endif } Modified: stable/12/usr.bin/gzip/unlz.c ============================================================================== --- stable/12/usr.bin/gzip/unlz.c Wed Apr 22 05:14:52 2020 (r360185) +++ stable/12/usr.bin/gzip/unlz.c Wed Apr 22 05:54:46 2020 (r360186) @@ -618,8 +618,6 @@ unlz(int fin, int fout, char *pre, size_t prelen, off_ char header[HDR_SIZE]; - if (prelen > sizeof(header)) - return -1; if (pre && prelen) memcpy(header, pre, prelen); Modified: stable/12/usr.bin/gzip/unpack.c ============================================================================== --- stable/12/usr.bin/gzip/unpack.c Wed Apr 22 05:14:52 2020 (r360185) +++ stable/12/usr.bin/gzip/unpack.c Wed Apr 22 05:54:46 2020 (r360186) @@ -156,9 +156,6 @@ unpack_parse_header(int in, int out, char *pre, size_t ssize_t bytesread; /* Bytes read from the file */ int i, j, thisbyte; - if (prelen > sizeof hdr) - maybe_err("prelen too long"); - /* Prepend the header buffer if we already read some data */ if (prelen != 0) memcpy(hdr, pre, prelen); From owner-svn-src-all@freebsd.org Wed Apr 22 06:32:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4AD9B2C7DF7; Wed, 22 Apr 2020 06:32:52 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496Vx00r1tz3Hkn; Wed, 22 Apr 2020 06:32:52 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 17C31E810; Wed, 22 Apr 2020 06:32:52 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M6WpWC012268; Wed, 22 Apr 2020 06:32:51 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M6WpEU012267; Wed, 22 Apr 2020 06:32:51 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202004220632.03M6WpEU012267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed, 22 Apr 2020 06:32:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360187 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 360187 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 06:32:52 -0000 Author: 0mp (doc,ports committer) Date: Wed Apr 22 06:32:51 2020 New Revision: 360187 URL: https://svnweb.freebsd.org/changeset/base/360187 Log: Improve formatting of synopsis section This patch is about sorting the arguments and using proper mdoc(7) macros to stylize arguments and command modifiers for much better readability. Further style fixes in other sections within the bhyve manual page are going to be worked on in upcoming patches. Reviewed by: rgrimes MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24526 Modified: head/usr.sbin/bhyve/bhyve.8 Modified: head/usr.sbin/bhyve/bhyve.8 ============================================================================== --- head/usr.sbin/bhyve/bhyve.8 Wed Apr 22 05:54:46 2020 (r360186) +++ head/usr.sbin/bhyve/bhyve.8 Wed Apr 22 06:32:51 2020 (r360187) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 13, 2019 +.Dd April 22, 2020 .Dt BHYVE 8 .Os .Sh NAME @@ -32,23 +32,40 @@ .Nd "run a guest operating system inside a virtual machine" .Sh SYNOPSIS .Nm -.Op Fl abehuwxACHPSWY +.Op Fl AabCeHhPSuWwxY .Oo -.Fl c\~ Ns +.Sm off +.Fl c\~ .Oo -.Op Ar cpus= Ns -.Ar numcpus Ns -.Oc Ns -.Op Ar ,sockets=n Ns -.Op Ar ,cores=n Ns -.Op Ar ,threads=n +.Op Cm cpus= +.Ar numcpus .Oc -.Op Fl g Ar gdbport -.Op Fl l Ar help|lpcdev Ns Op , Ns Ar conf -.Op Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t -.Op Fl p Ar vcpu:hostcpu -.Op Fl s Ar help|slot,emulation Ns Op , Ns Ar conf +.Op Cm ,sockets= Ar n +.Op Cm ,cores= Ar n +.Op Cm ,threads= Ar n +.Oc +.Sm on .Op Fl G Ar port +.Op Fl g Ar gdbport +.Oo Fl l +.Sm off +.Cm help | Ar lpcdev Op Cm \&, Ar conf +.Sm on +.Oc +.Oo Fl m +.Sm off +.Ar memsize +.Oo +.Cm K No | Cm k No | Cm M No | Cm m No | Cm G No | Cm g No | Cm T No | Cm t +.Oc +.Sm on +.Oc +.Op Fl p Ar vcpu Ns Cm \&: Ns Ar hostcpu +.Oo Fl s +.Sm off +.Cm help | Ar slot Cm \&, Ar emulation Op Cm \&, Ar conf +.Sm on +.Oc .Op Fl U Ar uuid .Ar vmname .Sh DESCRIPTION From owner-svn-src-all@freebsd.org Wed Apr 22 07:12:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43A642A8F17; Wed, 22 Apr 2020 07:12:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496WpW16SGz3KjX; Wed, 22 Apr 2020 07:12:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 216C9EF02; Wed, 22 Apr 2020 07:12:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M7CJ17035985; Wed, 22 Apr 2020 07:12:19 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M7CJMA035984; Wed, 22 Apr 2020 07:12:19 GMT (envelope-from np@FreeBSD.org) Message-Id: <202004220712.03M7CJMA035984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 22 Apr 2020 07:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360188 - stable/12/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/iw_cxgbe X-SVN-Commit-Revision: 360188 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 07:12:19 -0000 Author: np Date: Wed Apr 22 07:12:18 2020 New Revision: 360188 URL: https://svnweb.freebsd.org/changeset/base/360188 Log: MFC r359952: cxgbe/iw_cxgbe: Do not start the EP timer if soaccept fails. This fixes a panic that would occur when the timer tried to close a stale socket. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/iw_cxgbe/cm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/12/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Apr 22 06:32:51 2020 (r360187) +++ stable/12/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Apr 22 07:12:18 2020 (r360188) @@ -1013,7 +1013,6 @@ process_newconn(struct c4iw_listen_ep *master_lep, str c4iw_get_ep(&real_lep->com); init_timer(&new_ep->timer); new_ep->com.state = MPA_REQ_WAIT; - START_EP_TIMER(new_ep); setiwsockopt(new_so); ret = soaccept(new_so, (struct sockaddr **)&remote); @@ -1023,13 +1022,14 @@ process_newconn(struct c4iw_listen_ep *master_lep, str __func__, master_lep->com.so, new_so, ret); if (remote != NULL) free(remote, M_SONAME); - uninit_iwarp_socket(new_so); soclose(new_so); c4iw_put_ep(&new_ep->com); c4iw_put_ep(&real_lep->com); return; } free(remote, M_SONAME); + + START_EP_TIMER(new_ep); /* MPA request might have been queued up on the socket already, so we * initialize the socket/upcall_handler under lock to prevent processing From owner-svn-src-all@freebsd.org Wed Apr 22 07:24:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3EF532A9277; Wed, 22 Apr 2020 07:24:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496X4b0mFhz3LVG; Wed, 22 Apr 2020 07:24:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15882F242; Wed, 22 Apr 2020 07:24:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M7OUhJ043145; Wed, 22 Apr 2020 07:24:30 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M7OUT1043144; Wed, 22 Apr 2020 07:24:30 GMT (envelope-from np@FreeBSD.org) Message-Id: <202004220724.03M7OUT1043144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 22 Apr 2020 07:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360189 - stable/12/sys/dev/cxgbe/tom X-SVN-Group: stable-12 X-SVN-Commit-Author: np X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 360189 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 07:24:31 -0000 Author: np Date: Wed Apr 22 07:24:30 2020 New Revision: 360189 URL: https://svnweb.freebsd.org/changeset/base/360189 Log: MFC r359897: cxgbe(4): Make sure 'flags' is at the same offset in structs toepcb and synq_entry. TAILQ_ENTRY isn't always the same size as two pointers. Reported by: rmacklem@ Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tom.h Wed Apr 22 07:12:18 2020 (r360188) +++ stable/12/sys/dev/cxgbe/tom/t4_tom.h Wed Apr 22 07:24:30 2020 (r360189) @@ -187,11 +187,11 @@ struct aiotx_buffer { }; struct toepcb { - TAILQ_ENTRY(toepcb) link; /* toep_list */ - u_int flags; /* miscellaneous flags */ - int refcount; struct tom_data *td; struct inpcb *inp; /* backpointer to host stack's PCB */ + u_int flags; /* miscellaneous flags */ + TAILQ_ENTRY(toepcb) link; /* toep_list */ + int refcount; struct vnet *vnet; struct vi_info *vi; /* virtual interface */ struct sge_wrq *ofld_txq; From owner-svn-src-all@freebsd.org Wed Apr 22 07:47:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9CFA2A9EC5; Wed, 22 Apr 2020 07:47:04 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496XZc5X8sz3Mkk; Wed, 22 Apr 2020 07:47:04 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B880AF65D; Wed, 22 Apr 2020 07:47:04 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M7l4uM055486; Wed, 22 Apr 2020 07:47:04 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M7l4we055485; Wed, 22 Apr 2020 07:47:04 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <202004220747.03M7l4we055485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Wed, 22 Apr 2020 07:47:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360190 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: brueffer X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 360190 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 07:47:05 -0000 Author: brueffer Date: Wed Apr 22 07:47:04 2020 New Revision: 360190 URL: https://svnweb.freebsd.org/changeset/base/360190 Log: Correct efi(8) reference. Submitted by: Gordon Bergling Differential Revision: https://reviews.freebsd.org/D24441 Modified: head/share/man/man4/smbios.4 Modified: head/share/man/man4/smbios.4 ============================================================================== --- head/share/man/man4/smbios.4 Wed Apr 22 07:24:30 2020 (r360189) +++ head/share/man/man4/smbios.4 Wed Apr 22 07:47:04 2020 (r360190) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 6, 2020 +.Dd April 22, 2020 .Dt SMBIOS 4 .Os .Sh NAME @@ -46,7 +46,7 @@ smbios_load="YES" .Sh DESCRIPTION The System Management BIOS (SMBIOS) describes hardware components. .Sh SEE ALSO -.Xr efi 4 +.Xr efi 8 .Rs .%T System Management BIOS (SMBIOS) Reference Specification .%N DMTF DSP0134 From owner-svn-src-all@freebsd.org Wed Apr 22 07:53:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 307432AA183; Wed, 22 Apr 2020 07:53:45 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496XkK0XbZz3N8s; Wed, 22 Apr 2020 07:53:45 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0DC3AF83E; Wed, 22 Apr 2020 07:53:45 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M7ri7K061768; Wed, 22 Apr 2020 07:53:44 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M7riFt061764; Wed, 22 Apr 2020 07:53:44 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202004220753.03M7riFt061764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 22 Apr 2020 07:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360191 - in head/sys: dev/cxgbe/tom netinet X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: dev/cxgbe/tom netinet X-SVN-Commit-Revision: 360191 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 07:53:45 -0000 Author: melifaro Date: Wed Apr 22 07:53:43 2020 New Revision: 360191 URL: https://svnweb.freebsd.org/changeset/base/360191 Log: Convert TOE routing lookups to the new routing KPI. Reviewed by: np Differential Revision: https://reviews.freebsd.org/D24388 Modified: head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_tom.h head/sys/netinet/tcp_offload.c head/sys/netinet/toecore.c head/sys/netinet/toecore.h Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Wed Apr 22 07:47:04 2020 (r360190) +++ head/sys/dev/cxgbe/tom/t4_connect.c Wed Apr 22 07:53:43 2020 (r360191) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -226,13 +227,13 @@ act_open_cpl_size(struct adapter *sc, int isipv6) * rtalloc1, RT_UNLOCK on rt. */ int -t4_connect(struct toedev *tod, struct socket *so, struct rtentry *rt, +t4_connect(struct toedev *tod, struct socket *so, struct nhop_object *nh, struct sockaddr *nam) { struct adapter *sc = tod->tod_softc; struct toepcb *toep = NULL; struct wrqe *wr = NULL; - struct ifnet *rt_ifp = rt->rt_ifp; + struct ifnet *rt_ifp = nh->nh_ifp; struct vi_info *vi; int qid_atid, rc, isipv6; struct inpcb *inp = sotoinpcb(so); @@ -277,7 +278,7 @@ t4_connect(struct toedev *tod, struct socket *so, stru DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); toep->l2te = t4_l2t_get(vi->pi, rt_ifp, - rt->rt_flags & RTF_GATEWAY ? rt->rt_gateway : nam); + nh->nh_flags & NHF_GATEWAY ? &nh->gw_sa : nam); if (toep->l2te == NULL) DONT_OFFLOAD_ACTIVE_OPEN(ENOMEM); Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Wed Apr 22 07:47:04 2020 (r360190) +++ head/sys/dev/cxgbe/tom/t4_tom.h Wed Apr 22 07:53:43 2020 (r360191) @@ -370,7 +370,7 @@ int add_tid_to_history(struct adapter *, u_int); /* t4_connect.c */ void t4_init_connect_cpl_handlers(void); void t4_uninit_connect_cpl_handlers(void); -int t4_connect(struct toedev *, struct socket *, struct rtentry *, +int t4_connect(struct toedev *, struct socket *, struct nhop_object *, struct sockaddr *); void act_open_failure_cleanup(struct adapter *, u_int, u_int); Modified: head/sys/netinet/tcp_offload.c ============================================================================== --- head/sys/netinet/tcp_offload.c Wed Apr 22 07:47:04 2020 (r360190) +++ head/sys/netinet/tcp_offload.c Wed Apr 22 07:53:43 2020 (r360191) @@ -41,8 +41,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include +#include #include #include #define TCPOUTFLAGS @@ -60,7 +63,8 @@ tcp_offload_connect(struct socket *so, struct sockaddr { struct ifnet *ifp; struct toedev *tod; - struct rtentry *rt; + struct nhop_object *nh; + struct epoch_tracker et; int error = EOPNOTSUPP; INP_WLOCK_ASSERT(sotoinpcb(so)); @@ -70,13 +74,20 @@ tcp_offload_connect(struct socket *so, struct sockaddr if (registered_toedevs == 0) return (error); - rt = rtalloc1(nam, 0, 0); - if (rt) - RT_UNLOCK(rt); - else + NET_EPOCH_ENTER(et); + nh = NULL; + if (nam->sa_family == AF_INET) + nh = fib4_lookup(0, ((struct sockaddr_in *)nam)->sin_addr, + NHR_NONE, 0, 0); + else if (nam->sa_family == AF_INET6) + nh = fib6_lookup(0, &((struct sockaddr_in6 *)nam)->sin6_addr, + NHR_NONE, 0, 0); + if (nh == NULL) { + NET_EPOCH_EXIT(et); return (EHOSTUNREACH); + } - ifp = rt->rt_ifp; + ifp = nh->nh_ifp; if (nam->sa_family == AF_INET && !(ifp->if_capenable & IFCAP_TOE4)) goto done; @@ -85,9 +96,9 @@ tcp_offload_connect(struct socket *so, struct sockaddr tod = TOEDEV(ifp); if (tod != NULL) - error = tod->tod_connect(tod, so, rt, nam); + error = tod->tod_connect(tod, so, nh, nam); done: - RTFREE(rt); + NET_EPOCH_EXIT(et); return (error); } Modified: head/sys/netinet/toecore.c ============================================================================== --- head/sys/netinet/toecore.c Wed Apr 22 07:47:04 2020 (r360190) +++ head/sys/netinet/toecore.c Wed Apr 22 07:53:43 2020 (r360191) @@ -77,7 +77,7 @@ static eventhandler_tag lle_event_eh; static int toedev_connect(struct toedev *tod __unused, struct socket *so __unused, - struct rtentry *rt __unused, struct sockaddr *nam __unused) + struct nhop_object *nh __unused, struct sockaddr *nam __unused) { return (ENOTSUP); @@ -138,7 +138,7 @@ toedev_l2_update(struct toedev *tod __unused, struct i static void toedev_route_redirect(struct toedev *tod __unused, struct ifnet *ifp __unused, - struct rtentry *rt0 __unused, struct rtentry *rt1 __unused) + struct nhop_object *nh0 __unused, struct nhop_object *nh1 __unused) { return; Modified: head/sys/netinet/toecore.h ============================================================================== --- head/sys/netinet/toecore.h Wed Apr 22 07:47:04 2020 (r360190) +++ head/sys/netinet/toecore.h Wed Apr 22 07:53:43 2020 (r360191) @@ -41,6 +41,7 @@ struct tcpopt; struct tcphdr; struct in_conninfo; struct tcp_info; +struct nhop_object; struct ktls_session; struct toedev { @@ -51,7 +52,7 @@ struct toedev { * Active open. If a failure occurs, it is reported back by the driver * via toe_connect_failed. */ - int (*tod_connect)(struct toedev *, struct socket *, struct rtentry *, + int (*tod_connect)(struct toedev *, struct socket *, struct nhop_object *, struct sockaddr *); /* Passive open. */ @@ -95,7 +96,7 @@ struct toedev { /* XXX. Route has been redirected. */ void (*tod_route_redirect)(struct toedev *, struct ifnet *, - struct rtentry *, struct rtentry *); + struct nhop_object *, struct nhop_object *); /* Syncache interaction. */ void (*tod_syncache_added)(struct toedev *, void *); From owner-svn-src-all@freebsd.org Wed Apr 22 09:53:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 97BF32AE5CB; Wed, 22 Apr 2020 09:53:41 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496bNj3bjMz41SC; Wed, 22 Apr 2020 09:53:41 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76D8B18F04; Wed, 22 Apr 2020 09:53:41 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M9rfMm038513; Wed, 22 Apr 2020 09:53:41 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M9rfUC038512; Wed, 22 Apr 2020 09:53:41 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202004220953.03M9rfUC038512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 22 Apr 2020 09:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360192 - head/tests/sys/kqueue/libkqueue X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/kqueue/libkqueue X-SVN-Commit-Revision: 360192 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 09:53:41 -0000 Author: lwhsu Date: Wed Apr 22 09:53:41 2020 New Revision: 360192 URL: https://svnweb.freebsd.org/changeset/base/360192 Log: Enable timer tests in sys.kqueue.libkqueue.kqueue_test.main on i386 They were fixed in r360140 PR: 245768 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/kqueue/libkqueue/kqueue_test.sh Modified: head/tests/sys/kqueue/libkqueue/kqueue_test.sh ============================================================================== --- head/tests/sys/kqueue/libkqueue/kqueue_test.sh Wed Apr 22 07:53:43 2020 (r360191) +++ head/tests/sys/kqueue/libkqueue/kqueue_test.sh Wed Apr 22 09:53:41 2020 (r360192) @@ -1,13 +1,8 @@ #!/bin/sh # $FreeBSD$ -skip="" # Temporarily disable evfilt_proc tests: https://bugs.freebsd.org/233586 -skip="${skip} --no-proc" -if [ "$(uname -p)" = "i386" ]; then - # Temporarily disable timer tests on i386: https://bugs.freebsd.org/245768 - skip="${skip} --no-timer" -fi +skip="--no-proc" i=1 "$(dirname $0)/kqtest" ${skip} | while read line; do From owner-svn-src-all@freebsd.org Wed Apr 22 12:47:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0CCE52B3EB9; Wed, 22 Apr 2020 12:47:47 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496gFZ6YvLz4D9D; Wed, 22 Apr 2020 12:47:46 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC7FE1AF0B; Wed, 22 Apr 2020 12:47:46 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MClklH044367; Wed, 22 Apr 2020 12:47:46 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MClkE4044366; Wed, 22 Apr 2020 12:47:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202004221247.03MClkE4044366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 22 Apr 2020 12:47:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360193 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 360193 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 12:47:47 -0000 Author: tuexen Date: Wed Apr 22 12:47:46 2020 New Revision: 360193 URL: https://svnweb.freebsd.org/changeset/base/360193 Log: Improve input validation when processing AUTH chunks. Thanks to Natalie Silvanovich from Google for finding and reporting the issue found by her in the SCTP userland stack. MFC after: 3 days Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Wed Apr 22 09:53:41 2020 (r360192) +++ head/sys/netinet/sctp_input.c Wed Apr 22 12:47:46 2020 (r360193) @@ -2273,8 +2273,11 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in if (auth_skipped) { struct sctp_auth_chunk *auth; - auth = (struct sctp_auth_chunk *) - sctp_m_getptr(m, auth_offset, auth_len, auth_chunk_buf); + if (auth_len <= SCTP_PARAM_BUFFER_SIZE) { + auth = (struct sctp_auth_chunk *)sctp_m_getptr(m, auth_offset, auth_len, auth_chunk_buf); + } else { + auth = NULL; + } if ((auth == NULL) || sctp_handle_auth(stcb, auth, m, auth_offset)) { /* auth HMAC failed, dump the assoc and packet */ SCTPDBG(SCTP_DEBUG_AUTH1, From owner-svn-src-all@freebsd.org Wed Apr 22 12:54:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55ADD2B4153 for ; Wed, 22 Apr 2020 12:54:58 +0000 (UTC) (envelope-from bounces+3957096-e364-svn-src-all=freebsd.org@mailsg.leadlovers.info) Received: from o275.mailsg.leadlovers.com (o275.mailsg.leadlovers.com [167.89.84.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 496gPs3nW7z4DfR for ; Wed, 22 Apr 2020 12:54:57 +0000 (UTC) (envelope-from bounces+3957096-e364-svn-src-all=freebsd.org@mailsg.leadlovers.info) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadlovers.info; h=from:to:subject:mime-version:content-type:content-transfer-encoding; s=m1; bh=0Y4ORQhAwY/+UDyongnKXdc0xu/XfrN918rR6qZz71M=; b=ikg6aZa KaHFtXmdPcDi8tJVZ1q+cjDZdg2lcyMybtY/LGDAjabwkgY5TtX7hYPie0yb6hTC cAJR25ukeR82uL2vCbgr0eG91vOxUOkVRjCGzwpPcZRXl4sVAIS8k7BH2eMPvDSn V6SwV/91J/cz/AtseGXlY8WZwjXf9/3Xng8Y= Received: by filter0387p1iad2.sendgrid.net with SMTP id filter0387p1iad2-19720-5EA03EA0-6 2020-04-22 12:54:56.232084856 +0000 UTC m=+569368.089747426 Received: from int-bank.ru (unknown) by ismtpd0040p1las1.sendgrid.net (SG) with ESMTP id xABIdO1QTjWDRoyoblv-Xg for ; Wed, 22 Apr 2020 12:54:56.057 +0000 (UTC) From: Server Admin To: svn-src-all@freebsd.org Subject: Pending Messages on Server Date: Wed, 22 Apr 2020 12:54:56 +0000 (UTC) Message-ID: <20200422055455.2B679DC3741B4A8F@freebsd.org> X-SG-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PH/gna6Vwiz8Xn+Lg7pbC2vaI7GVVp5uAxxhY 5a5o0lsOOwC/81+UqpRP9O0UqyT/ifggF/HVv+X4jyQCnShkUMl8ujFZRDAUo9jtfHrh9SWA0OApnZ JVCSd5SMkg79IXD4ZGFqArtBGq8RoVSvKphFULJFmrTYBeHCE2efaE2H9iDiaPgMtcqF18iSEdYezw Yc3uGVYMVzA5ez6Npb144k X-Rspamd-Queue-Id: 496gPs3nW7z4DfR X-Spamd-Bar: +++++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=leadlovers.info header.s=m1 header.b=ikg6aZa ; dmarc=none; spf=pass (mx1.freebsd.org: domain of bounces@mailsg.leadlovers.info designates 167.89.84.237 as permitted sender) smtp.mailfrom=bounces@mailsg.leadlovers.info X-Spamd-Result: default: False [11.61 / 15.00]; R_SPF_ALLOW(0.00)[+ip4:167.89.0.0/17:c]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[leadlovers.info:+]; FORGED_SENDER(0.30)[cpshared8.tedata.net@freebsd.org,bounces@mailsg.leadlovers.info]; DBL_SPAM(6.50)[dns-cloud.net.khpj7ygk5idzvmvt5x4ziurxhy.dbl.dq.spamhaus.net]; MIME_TRACE(0.00)[0:~]; ASN(0.00)[asn:11377, ipnet:167.89.64.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[3957096-e364-svn-src-all=freebsd.org]; TO_DOM_EQ_FROM_DOM(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[leadlovers.info:s=m1]; FROM_NEQ_ENVFROM(0.00)[cpshared8.tedata.net@freebsd.org,bounces@mailsg.leadlovers.info]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HEADER_FORGED_MDN(2.00)[]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(1.00)[1.000,0]; RCPT_COUNT_ONE(0.00)[1]; BAD_REP_POLICIES(0.10)[]; RCVD_TLS_LAST(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; RCVD_IN_DNSWL_NONE(0.00)[237.84.89.167.list.dnswl.org : 127.0.15.0]; MIME_HTML_ONLY(0.20)[]; IP_SCORE(0.51)[ip: (5.91), ipnet: 167.89.64.0/19(0.31), asn: 11377(-3.64), country: US(-0.05)]; RWL_MAILSPIKE_POSSIBLE(0.00)[237.84.89.167.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; GREYLIST(0.00)[pass,body] X-Spam: Yes MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 12:54:58 -0000 From owner-svn-src-all@freebsd.org Wed Apr 22 13:52:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92D9C2B5788; Wed, 22 Apr 2020 13:52:41 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496hhT3MKlz4HN0; Wed, 22 Apr 2020 13:52:41 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E7671BC22; Wed, 22 Apr 2020 13:52:41 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MDqf63087322; Wed, 22 Apr 2020 13:52:41 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MDqfvw087321; Wed, 22 Apr 2020 13:52:41 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202004221352.03MDqfvw087321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed, 22 Apr 2020 13:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360194 - stable/12/usr.bin/find X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/usr.bin/find X-SVN-Commit-Revision: 360194 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 13:52:41 -0000 Author: 0mp (doc,ports committer) Date: Wed Apr 22 13:52:40 2020 New Revision: 360194 URL: https://svnweb.freebsd.org/changeset/base/360194 Log: MFC 360074: Use the Ic macro for find(1) primaries consistently Modified: stable/12/usr.bin/find/find.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/find/find.1 ============================================================================== --- stable/12/usr.bin/find/find.1 Wed Apr 22 12:47:46 2020 (r360193) +++ stable/12/usr.bin/find/find.1 Wed Apr 22 13:52:40 2020 (r360194) @@ -31,7 +31,7 @@ .\" @(#)find.1 8.7 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd January 24, 2017 +.Dd April 18, 2020 .Dt FIND 1 .Os .Sh NAME @@ -480,7 +480,7 @@ is being executed and the latter matches any file syst mounted read-only. .It Ic -gid Ar gname The same thing as -.Ar -group Ar gname +.Ic -group Ar gname for compatibility with GNU find. GNU find imposes a restriction that .Ar gname From owner-svn-src-all@freebsd.org Wed Apr 22 13:53:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FE0B2B57FD; Wed, 22 Apr 2020 13:53:23 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496hjH1pXXz4HV3; Wed, 22 Apr 2020 13:53:23 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 392621BC24; Wed, 22 Apr 2020 13:53:23 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MDrNMJ087406; Wed, 22 Apr 2020 13:53:23 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MDrNuI087405; Wed, 22 Apr 2020 13:53:23 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202004221353.03MDrNuI087405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Wed, 22 Apr 2020 13:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360195 - stable/11/usr.bin/find X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/usr.bin/find X-SVN-Commit-Revision: 360195 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 13:53:23 -0000 Author: 0mp (doc,ports committer) Date: Wed Apr 22 13:53:22 2020 New Revision: 360195 URL: https://svnweb.freebsd.org/changeset/base/360195 Log: MFC 360074: Use the Ic macro for find(1) primaries consistently Modified: stable/11/usr.bin/find/find.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/find/find.1 ============================================================================== --- stable/11/usr.bin/find/find.1 Wed Apr 22 13:52:40 2020 (r360194) +++ stable/11/usr.bin/find/find.1 Wed Apr 22 13:53:22 2020 (r360195) @@ -31,7 +31,7 @@ .\" @(#)find.1 8.7 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd January 24, 2017 +.Dd April 18, 2020 .Dt FIND 1 .Os .Sh NAME @@ -480,7 +480,7 @@ is being executed and the latter matches any file syst mounted read-only. .It Ic -gid Ar gname The same thing as -.Ar -group Ar gname +.Ic -group Ar gname for compatibility with GNU find. GNU find imposes a restriction that .Ar gname From owner-svn-src-all@freebsd.org Wed Apr 22 14:33:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE3312B62A0; Wed, 22 Apr 2020 14:33:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496jbV5G87z4KLT; Wed, 22 Apr 2020 14:33:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9583C1C3BC; Wed, 22 Apr 2020 14:33:26 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MEXQSC012627; Wed, 22 Apr 2020 14:33:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MEXQ6p012625; Wed, 22 Apr 2020 14:33:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004221433.03MEXQ6p012625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 22 Apr 2020 14:33:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360196 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 360196 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 14:33:26 -0000 Author: hselasky Date: Wed Apr 22 14:33:25 2020 New Revision: 360196 URL: https://svnweb.freebsd.org/changeset/base/360196 Log: Factor code in LinuxKPI to allow attach and detach using any BSD device. This allows non-LinuxKPI based infiniband device drivers to attach correctly to ibcore. No functional change intended. Reviewed by: np @ Differential Revision: https://reviews.freebsd.org/D24514 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h head/sys/compat/linuxkpi/common/src/linux_pci.c Modified: head/sys/compat/linuxkpi/common/include/linux/pci.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Apr 22 13:53:22 2020 (r360195) +++ head/sys/compat/linuxkpi/common/include/linux/pci.h Wed Apr 22 14:33:25 2020 (r360196) @@ -954,4 +954,15 @@ pcie_get_width_cap(struct pci_dev *dev) return (PCIE_LNK_WIDTH_UNKNOWN); } +/* + * The following functions can be used to attach/detach the LinuxKPI's + * PCI device runtime. The pci_driver and pci_device_id pointer is + * allowed to be NULL. Other pointers must be all valid. + * The pci_dev structure should be zero-initialized before passed + * to the linux_pci_attach_device function. + */ +extern int linux_pci_attach_device(device_t, struct pci_driver *, + const struct pci_device_id *, struct pci_dev *); +extern int linux_pci_detach_device(struct pci_dev *); + #endif /* _LINUX_PCI_H_ */ Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_pci.c Wed Apr 22 13:53:22 2020 (r360195) +++ head/sys/compat/linuxkpi/common/src/linux_pci.c Wed Apr 22 14:33:25 2020 (r360196) @@ -213,22 +213,33 @@ linux_pci_probe(device_t dev) static int linux_pci_attach(device_t dev) { + const struct pci_device_id *id; + struct pci_driver *pdrv; + struct pci_dev *pdev; + + pdrv = linux_pci_find(dev, &id); + pdev = device_get_softc(dev); + + MPASS(pdrv != NULL); + MPASS(pdev != NULL); + + return (linux_pci_attach_device(dev, pdrv, id, pdev)); +} + +int +linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, + const struct pci_device_id *id, struct pci_dev *pdev) +{ struct resource_list_entry *rle; struct pci_bus *pbus; - struct pci_dev *pdev; struct pci_devinfo *dinfo; - struct pci_driver *pdrv; - const struct pci_device_id *id; device_t parent; int error; linux_set_current(curthread); - pdrv = linux_pci_find(dev, &id); - pdev = device_get_softc(dev); - - parent = device_get_parent(dev); - if (pdrv->isdrm) { + if (pdrv != NULL && pdrv->isdrm) { + parent = device_get_parent(dev); dinfo = device_get_ivars(parent); device_set_ivars(dev, dinfo); } else { @@ -270,9 +281,11 @@ linux_pci_attach(device_t dev) list_add(&pdev->links, &pci_devices); spin_unlock(&pci_lock); - error = pdrv->probe(pdev, id); - if (error) - goto out_probe; + if (pdrv != NULL) { + error = pdrv->probe(pdev, id); + if (error) + goto out_probe; + } return (0); out_probe: @@ -291,18 +304,30 @@ linux_pci_detach(device_t dev) { struct pci_dev *pdev; - linux_set_current(curthread); pdev = device_get_softc(dev); - pdev->pdrv->remove(pdev); + MPASS(pdev != NULL); + device_set_desc(dev, NULL); + + return (linux_pci_detach_device(pdev)); +} + +int +linux_pci_detach_device(struct pci_dev *pdev) +{ + + linux_set_current(curthread); + + if (pdev->pdrv != NULL) + pdev->pdrv->remove(pdev); + free(pdev->bus, M_DEVBUF); linux_pdev_dma_uninit(pdev); spin_lock(&pci_lock); list_del(&pdev->links); spin_unlock(&pci_lock); - device_set_desc(dev, NULL); put_device(&pdev->dev); return (0); From owner-svn-src-all@freebsd.org Wed Apr 22 14:38:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFB182B636C; Wed, 22 Apr 2020 14:38:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496jjX5WjMz4KY2; Wed, 22 Apr 2020 14:38:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B40AC1C3C5; Wed, 22 Apr 2020 14:38:40 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MEceUn012911; Wed, 22 Apr 2020 14:38:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MEcdHk012906; Wed, 22 Apr 2020 14:38:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004221438.03MEcdHk012906@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 22 Apr 2020 14:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360197 - head/usr.sbin/bluetooth/hccontrol X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 360197 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 14:38:40 -0000 Author: hselasky Date: Wed Apr 22 14:38:39 2020 New Revision: 360197 URL: https://svnweb.freebsd.org/changeset/base/360197 Log: Add support for Read_Local_Supported_Commands command to hccontrol(8). Submitted by: Marc Veldman PR: 245811 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.8 head/usr.sbin/bluetooth/hccontrol/hccontrol.h head/usr.sbin/bluetooth/hccontrol/info.c head/usr.sbin/bluetooth/hccontrol/util.c Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.8 ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/hccontrol.8 Wed Apr 22 14:33:25 2020 (r360196) +++ head/usr.sbin/bluetooth/hccontrol/hccontrol.8 Wed Apr 22 14:38:39 2020 (r360197) @@ -134,6 +134,7 @@ are: .It Cm Read_Page_Scan_Mode .It Cm Write_Page_Scan_Mode .It Cm Read_Local_Version_Information +.It Cm Read_Local_Supported_Commands .It Cm Read_Local_Supported_Features .It Cm Read_Buffer_Size .It Cm Read_Country_Code Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.h ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/hccontrol.h Wed Apr 22 14:33:25 2020 (r360196) +++ head/usr.sbin/bluetooth/hccontrol/hccontrol.h Wed Apr 22 14:38:39 2020 (r360197) @@ -72,6 +72,7 @@ char const * hci_hmode2str (int, char *, int); char const * hci_ver2str (int); char const * hci_lmpver2str (int); char const * hci_manufacturer2str(int); +char const * hci_commands2str (uint8_t *, char *, int); char const * hci_features2str (uint8_t *, char *, int); char const * hci_le_features2str (uint8_t *, char *, int); char const * hci_cc2str (int); Modified: head/usr.sbin/bluetooth/hccontrol/info.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/info.c Wed Apr 22 14:33:25 2020 (r360196) +++ head/usr.sbin/bluetooth/hccontrol/info.c Wed Apr 22 14:38:39 2020 (r360197) @@ -72,6 +72,38 @@ hci_read_local_version_information(int s, int argc, ch return (OK); } /* hci_read_local_version_information */ +/* Send Read_Local_Supported_Commands command to the unit */ +static int +hci_read_local_supported_commands(int s, int argc, char **argv) +{ + ng_hci_read_local_commands_rp rp; + int n; + char buffer[16384]; + + n = sizeof(rp); + if (hci_simple_request(s, NG_HCI_OPCODE(NG_HCI_OGF_INFO, + NG_HCI_OCF_READ_LOCAL_COMMANDS), + (char *) &rp, &n) == ERROR) + return (ERROR); + + if (rp.status != 0x00) { + fprintf(stdout, "Status: %s [%#02x]\n", + hci_status2str(rp.status), rp.status); + return (FAILED); + } + + fprintf(stdout, "Supported commands:"); + for (n = 0; n < sizeof(rp.features); n++) { + if (n % 8 == 0) + fprintf(stdout, "\n"); + fprintf(stdout, "%#02x ", rp.features[n]); + } + fprintf(stdout, "\n%s\n", hci_commands2str(rp.features, + buffer, sizeof(buffer))); + + return (OK); +} /* hci_read_local_supported_commands */ + /* Send Read_Local_Supported_Features command to the unit */ static int hci_read_local_supported_features(int s, int argc, char **argv) @@ -186,6 +218,11 @@ struct hci_command info_commands[] = { "\nThis command will read the values for the version information for the\n" \ "local Bluetooth unit.", &hci_read_local_version_information +}, +{ +"read_local_supported_commands", +"\nThis command will read the commands the local Bluetooth unit supports.\n", +&hci_read_local_supported_commands }, { "read_local_supported_features", Modified: head/usr.sbin/bluetooth/hccontrol/util.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/util.c Wed Apr 22 14:33:25 2020 (r360196) +++ head/usr.sbin/bluetooth/hccontrol/util.c Wed Apr 22 14:38:39 2020 (r360197) @@ -2430,6 +2430,501 @@ hci_manufacturer2str(int m) } /* hci_manufacturer2str */ char const * +hci_commands2str(uint8_t *commands, char *buffer, int size) +{ + static char const * const t[][8] = { + { /* byte 0 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 1 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 2 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 3 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 4 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 5 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 6 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 7 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 8 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 9 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 10 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 11 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 12 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 13 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 14 */ + /* 0 */ " ", + /* 1 */ "", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 15 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 16 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 17 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 18 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 19 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 20 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 21 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 22 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 23 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 24 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 25 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 26 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 27 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 28 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 29 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 30 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 31 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 32 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 33 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 34 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 35 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 36 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 37 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 38 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 39 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 40 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 41 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 42 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 43 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 44 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }, + { /* byte 45 */ + /* 0 */ " ", + /* 1 */ " ", + /* 2 */ " ", + /* 3 */ " ", + /* 4 */ " ", + /* 5 */ " ", + /* 6 */ " ", + /* 7 */ " " + }}; + + if (buffer != NULL && size > 0) { + int n, i, len0, len1; + + memset(buffer, 0, size); + size--; + + + for (n = 0; n < SIZE(t); n++) { + for (i = 0; i < SIZE(t[n]); i++) { + len0 = strlen(buffer); + if (len0 >= size) + goto done; + + if (commands[n] & (1 << i)) { + if (len1 + strlen(t[n][i]) > 60) { + len1 = 0; + buffer[len0 - 1] = '\n'; + } + + len1 += strlen(t[n][i]); + strncat(buffer, t[n][i], size - len0); + } + + } + } + } +done: + return (buffer); +} /* hci_commands2str */ + +char const * hci_features2str(uint8_t *features, char *buffer, int size) { static char const * const t[][8] = { From owner-svn-src-all@freebsd.org Wed Apr 22 14:45:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E88F12B6BA2; Wed, 22 Apr 2020 14:45:00 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496jrr5xX8z4LLC; Wed, 22 Apr 2020 14:45:00 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C71971C5B3; Wed, 22 Apr 2020 14:45:00 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MEj02U018987; Wed, 22 Apr 2020 14:45:00 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MEj0qf018986; Wed, 22 Apr 2020 14:45:00 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202004221445.03MEj0qf018986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 22 Apr 2020 14:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360198 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 360198 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 14:45:01 -0000 Author: lwhsu Date: Wed Apr 22 14:45:00 2020 New Revision: 360198 URL: https://svnweb.freebsd.org/changeset/base/360198 Log: Temporarily skip sys.opencrypto.blake2_test.blake2{b,s}_vectors_x86 in CI PR: 245825 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/opencrypto/blake2_test.c Modified: head/tests/sys/opencrypto/blake2_test.c ============================================================================== --- head/tests/sys/opencrypto/blake2_test.c Wed Apr 22 14:38:39 2020 (r360197) +++ head/tests/sys/opencrypto/blake2_test.c Wed Apr 22 14:45:00 2020 (r360198) @@ -187,12 +187,18 @@ ATF_TC_BODY(blake2s_vectors, tc) ATF_TC_WITHOUT_HEAD(blake2b_vectors_x86); ATF_TC_BODY(blake2b_vectors_x86, tc) { + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/245825"); + test_blake2b_vectors(CRYPTO_FLAG_HARDWARE, "nexus/blake2"); } ATF_TC_WITHOUT_HEAD(blake2s_vectors_x86); ATF_TC_BODY(blake2s_vectors_x86, tc) { + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/245825"); + test_blake2s_vectors(CRYPTO_FLAG_HARDWARE, "nexus/blake2"); } #endif From owner-svn-src-all@freebsd.org Wed Apr 22 17:04:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8E762BABB6; Wed, 22 Apr 2020 17:04:31 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496mxq4R1jz4W63; Wed, 22 Apr 2020 17:04:31 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 934941E088; Wed, 22 Apr 2020 17:04:31 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MH4VsN006765; Wed, 22 Apr 2020 17:04:31 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MH4VlV006764; Wed, 22 Apr 2020 17:04:31 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202004221704.03MH4VlV006764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Wed, 22 Apr 2020 17:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360199 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 360199 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 17:04:31 -0000 Author: freqlabs Date: Wed Apr 22 17:04:31 2020 New Revision: 360199 URL: https://svnweb.freebsd.org/changeset/base/360199 Log: menu.lua: Give names to menu entries Make menu customizations easier by naming the entries and using the names to build the table entries. Reviewed by: kevans Approved by: mav (mentor) MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D24527 Modified: head/stand/lua/menu.lua Modified: head/stand/lua/menu.lua ============================================================================== --- head/stand/lua/menu.lua Wed Apr 22 14:45:00 2020 (r360198) +++ head/stand/lua/menu.lua Wed Apr 22 17:04:31 2020 (r360199) @@ -212,30 +212,50 @@ menu.boot_options = { menu.welcome = { entries = function() local menu_entries = menu.welcome.all_entries - -- Swap the first two menu items on single user boot + local multi_user = menu_entries.multi_user + local single_user = menu_entries.single_user + local boot_entry_1, boot_entry_2 if core.isSingleUserBoot() then - -- We'll cache the swapped menu, for performance - if menu.welcome.swapped_menu ~= nil then - return menu.welcome.swapped_menu + -- Swap the first two menu items on single user boot. + -- We'll cache the alternate entries for performance. + local alts = menu_entries.alts + if alts == nil then + single_user = core.deepCopyTable(single_user) + multi_user = core.deepCopyTable(multi_user) + single_user.name = single_user.alternate_name + multi_user.name = multi_user.alternate_name + menu_entries.alts = { + single_user = single_user, + multi_user = multi_user, + } + else + single_user = alts.single_user + multi_user = alts.multi_user end - -- Shallow copy the table - menu_entries = core.deepCopyTable(menu_entries) - - -- Swap the first two menu entries - menu_entries[1], menu_entries[2] = - menu_entries[2], menu_entries[1] - - -- Then set their names to their alternate names - menu_entries[1].name, menu_entries[2].name = - menu_entries[1].alternate_name, - menu_entries[2].alternate_name - menu.welcome.swapped_menu = menu_entries + boot_entry_1, boot_entry_2 = single_user, multi_user + else + boot_entry_1, boot_entry_2 = multi_user, single_user end - return menu_entries + return { + boot_entry_1, + boot_entry_2, + menu_entries.prompt, + menu_entries.reboot, + { + entry_type = core.MENU_SEPARATOR, + }, + { + entry_type = core.MENU_SEPARATOR, + name = "Options:", + }, + menu_entries.kernel_options, + menu_entries.boot_options, + menu_entries.boot_envs, + menu_entries.chainload, + } end, all_entries = { - -- boot multi user - { + multi_user = { entry_type = core.MENU_ENTRY, name = color.highlight("B") .. "oot Multi user " .. color.highlight("[Enter]"), @@ -248,8 +268,7 @@ menu.welcome = { end, alias = {"b", "B"}, }, - -- boot single user - { + single_user = { entry_type = core.MENU_ENTRY, name = "Boot " .. color.highlight("S") .. "ingle user", -- Not a standard menu entry function! @@ -261,8 +280,7 @@ menu.welcome = { end, alias = {"s", "S"}, }, - -- escape to interpreter - { + prompt = { entry_type = core.MENU_RETURN, name = color.highlight("Esc") .. "ape to loader prompt", func = function() @@ -270,8 +288,7 @@ menu.welcome = { end, alias = {core.KEYSTR_ESCAPE}, }, - -- reboot - { + reboot = { entry_type = core.MENU_ENTRY, name = color.highlight("R") .. "eboot", func = function() @@ -279,15 +296,7 @@ menu.welcome = { end, alias = {"r", "R"}, }, - { - entry_type = core.MENU_SEPARATOR, - }, - { - entry_type = core.MENU_SEPARATOR, - name = "Options:", - }, - -- kernel options - { + kernel_options = { entry_type = core.MENU_CAROUSEL_ENTRY, carousel_id = "kernel", items = core.kernelList, @@ -319,15 +328,13 @@ menu.welcome = { end, alias = {"k", "K"}, }, - -- boot options - { + boot_options = { entry_type = core.MENU_SUBMENU, name = "Boot " .. color.highlight("O") .. "ptions", submenu = menu.boot_options, alias = {"o", "O"}, }, - -- boot environments - { + boot_envs = { entry_type = core.MENU_SUBMENU, visible = function() return core.isZFSBoot() and @@ -337,8 +344,7 @@ menu.welcome = { submenu = menu.boot_environments, alias = {"e", "E"}, }, - -- chainload - { + chainload = { entry_type = core.MENU_ENTRY, name = function() return 'Chain' .. color.highlight("L") .. From owner-svn-src-all@freebsd.org Wed Apr 22 17:14:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 879752BAEAD; Wed, 22 Apr 2020 17:14:03 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496n8q33DFz4WZX; Wed, 22 Apr 2020 17:14:03 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4AC4F1E260; Wed, 22 Apr 2020 17:14:03 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MHE3xl012727; Wed, 22 Apr 2020 17:14:03 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MHE2eo012726; Wed, 22 Apr 2020 17:14:02 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202004221714.03MHE2eo012726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 22 Apr 2020 17:14:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360200 - in stable/12/sys: compat/freebsd32 kern X-SVN-Group: stable-12 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in stable/12/sys: compat/freebsd32 kern X-SVN-Commit-Revision: 360200 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 17:14:03 -0000 Author: brooks Date: Wed Apr 22 17:14:02 2020 New Revision: 360200 URL: https://svnweb.freebsd.org/changeset/base/360200 Log: MFC r359938: Remove bogus use of useracc() in (clock_)nanosleep. There's no point in pre-checking that we can access the user's rmtp pointer before we do it in copyout(). While here, improve style(9) compliance. Reviewed by: imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24409 Modified: stable/12/sys/compat/freebsd32/freebsd32_misc.c stable/12/sys/kern/kern_time.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/12/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 22 17:04:31 2020 (r360199) +++ stable/12/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 22 17:14:02 2020 (r360200) @@ -2648,7 +2648,7 @@ freebsd32_user_clock_nanosleep(struct thread *td, cloc { struct timespec32 rmt32, rqt32; struct timespec rmt, rqt; - int error; + int error, error2; error = copyin(ua_rqtp, &rqt32, sizeof(rqt32)); if (error) @@ -2657,18 +2657,13 @@ freebsd32_user_clock_nanosleep(struct thread *td, cloc CP(rqt32, rqt, tv_sec); CP(rqt32, rqt, tv_nsec); - if (ua_rmtp != NULL && (flags & TIMER_ABSTIME) == 0 && - !useracc(ua_rmtp, sizeof(rmt32), VM_PROT_WRITE)) - return (EFAULT); error = kern_clock_nanosleep(td, clock_id, flags, &rqt, &rmt); if (error == EINTR && ua_rmtp != NULL && (flags & TIMER_ABSTIME) == 0) { - int error2; - CP(rmt, rmt32, tv_sec); CP(rmt, rmt32, tv_nsec); error2 = copyout(&rmt32, ua_rmtp, sizeof(rmt32)); - if (error2) + if (error2 != 0) error = error2; } return (error); Modified: stable/12/sys/kern/kern_time.c ============================================================================== --- stable/12/sys/kern/kern_time.c Wed Apr 22 17:04:31 2020 (r360199) +++ stable/12/sys/kern/kern_time.c Wed Apr 22 17:14:02 2020 (r360200) @@ -622,20 +622,15 @@ user_clock_nanosleep(struct thread *td, clockid_t cloc const struct timespec *ua_rqtp, struct timespec *ua_rmtp) { struct timespec rmt, rqt; - int error; + int error, error2; error = copyin(ua_rqtp, &rqt, sizeof(rqt)); if (error) return (error); - if (ua_rmtp != NULL && (flags & TIMER_ABSTIME) == 0 && - !useracc(ua_rmtp, sizeof(rmt), VM_PROT_WRITE)) - return (EFAULT); error = kern_clock_nanosleep(td, clock_id, flags, &rqt, &rmt); if (error == EINTR && ua_rmtp != NULL && (flags & TIMER_ABSTIME) == 0) { - int error2; - error2 = copyout(&rmt, ua_rmtp, sizeof(rmt)); - if (error2) + if (error2 != 0) error = error2; } return (error); From owner-svn-src-all@freebsd.org Wed Apr 22 18:39:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60C3E2BD343; Wed, 22 Apr 2020 18:39:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496q3k1xcCz4cv9; Wed, 22 Apr 2020 18:39:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 394791F273; Wed, 22 Apr 2020 18:39:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MIdkhl063251; Wed, 22 Apr 2020 18:39:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MIdj0K063249; Wed, 22 Apr 2020 18:39:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202004221839.03MIdj0K063249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 22 Apr 2020 18:39:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360201 - head/libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/libexec/rtld-elf X-SVN-Commit-Revision: 360201 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 18:39:46 -0000 Author: kib Date: Wed Apr 22 18:39:45 2020 New Revision: 360201 URL: https://svnweb.freebsd.org/changeset/base/360201 Log: rtld: ignore static TLS segments when tracing. For PIE binaries, ldd(1) performs dlopen(RTLD_TRACE) on the binary. It is legal for binary to use initial exec TLS mode, but when such binary (actually dso) is dlopened, we might not have enough free space in the finalized static TLS segment. Make ldd operational by skipping TLS space allocation, we are not going to execute any code from the dso anyway. Reported by: tobik PR: 245677 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Apr 22 17:14:02 2020 (r360200) +++ head/libexec/rtld-elf/rtld.c Wed Apr 22 18:39:45 2020 (r360201) @@ -3367,7 +3367,7 @@ rtld_dlopen(const char *name, int fd, int mode) if (mode & RTLD_NOLOAD) lo_flags |= RTLD_LO_NOLOAD; if (ld_tracing != NULL) - lo_flags |= RTLD_LO_TRACE; + lo_flags |= RTLD_LO_TRACE | RTLD_LO_IGNSTLS; return (dlopen_object(name, fd, obj_main, lo_flags, mode & (RTLD_MODEMASK | RTLD_GLOBAL), NULL)); @@ -3418,15 +3418,15 @@ dlopen_object(const char *name, int fd, Obj_Entry *ref /* We loaded something new. */ assert(globallist_next(old_obj_tail) == obj); result = 0; - if ((lo_flags & RTLD_LO_EARLY) == 0 && obj->static_tls && - !allocate_tls_offset(obj)) { + if ((lo_flags & (RTLD_LO_EARLY | RTLD_LO_IGNSTLS)) == 0 && + obj->static_tls && !allocate_tls_offset(obj)) { _rtld_error("%s: No space available " "for static Thread Local Storage", obj->path); result = -1; } if (result != -1) result = load_needed_objects(obj, lo_flags & (RTLD_LO_DLOPEN | - RTLD_LO_EARLY)); + RTLD_LO_EARLY | RTLD_LO_IGNSTLS)); init_dag(obj); ref_dag(obj); if (result != -1) Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Wed Apr 22 17:14:02 2020 (r360200) +++ head/libexec/rtld-elf/rtld.h Wed Apr 22 18:39:45 2020 (r360201) @@ -308,6 +308,7 @@ TAILQ_HEAD(obj_entry_q, Struct_Obj_Entry); #define RTLD_LO_FILTEES 0x10 /* Loading filtee. */ #define RTLD_LO_EARLY 0x20 /* Do not call ctors, postpone it to the initialization during the image start. */ +#define RTLD_LO_IGNSTLS 0x40 /* Do not allocate static TLS */ /* * Symbol cache entry used during relocation to avoid multiple lookups From owner-svn-src-all@freebsd.org Wed Apr 22 19:44:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A28A2BF58A; Wed, 22 Apr 2020 19:44:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496rVV2CgJz3DvT; Wed, 22 Apr 2020 19:44:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 472B520045; Wed, 22 Apr 2020 19:44:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MJiYjo007154; Wed, 22 Apr 2020 19:44:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MJiYLn007153; Wed, 22 Apr 2020 19:44:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004221944.03MJiYLn007153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2020 19:44:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360202 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 360202 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 19:44:34 -0000 Author: jhb Date: Wed Apr 22 19:44:33 2020 New Revision: 360202 URL: https://svnweb.freebsd.org/changeset/base/360202 Log: Deprecate 3des support in IPsec for FreeBSD 13. RFC 8221 does not outright ban 3des as the algorithms deprecated for 13 in r348205, but it is listed as a SHOULD NOT and will likely be a MUST NOT by the time 13 ships. Discussed with: bjk MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24341 Modified: head/sys/netipsec/xform_esp.c Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Wed Apr 22 18:39:45 2020 (r360201) +++ head/sys/netipsec/xform_esp.c Wed Apr 22 19:44:33 2020 (r360202) @@ -94,7 +94,7 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_esp, IPSECCTL_STATS, st struct espstat, espstat, "ESP statistics (struct espstat, netipsec/esp_var.h"); -static struct timeval deswarn, blfwarn, castwarn, camelliawarn; +static struct timeval deswarn, blfwarn, castwarn, camelliawarn, tdeswarn; static int esp_input_cb(struct cryptop *op); static int esp_output_cb(struct cryptop *crp); @@ -162,6 +162,10 @@ esp_init(struct secasvar *sav, struct xformsw *xsp) switch (sav->alg_enc) { case SADB_EALG_DESCBC: if (ratecheck(&deswarn, &ipsec_warn_interval)) + gone_in(13, "DES cipher for IPsec"); + break; + case SADB_EALG_3DESCBC: + if (ratecheck(&tdeswarn, &ipsec_warn_interval)) gone_in(13, "DES cipher for IPsec"); break; case SADB_X_EALG_BLOWFISHCBC: From owner-svn-src-all@freebsd.org Wed Apr 22 20:43:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CDD792C0EF9; Wed, 22 Apr 2020 20:43:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496spG54l9z3JHs; Wed, 22 Apr 2020 20:43:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 906D420C24; Wed, 22 Apr 2020 20:43:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MKhIhu044170; Wed, 22 Apr 2020 20:43:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MKhIvs044169; Wed, 22 Apr 2020 20:43:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004222043.03MKhIvs044169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2020 20:43:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360203 - head/tests/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/tests/sys/opencrypto X-SVN-Commit-Revision: 360203 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 20:43:18 -0000 Author: jhb Date: Wed Apr 22 20:43:18 2020 New Revision: 360203 URL: https://svnweb.freebsd.org/changeset/base/360203 Log: Update blake2 accelerated software tests to work after OCF refactoring. - Lookup device drivers to test by name instead of assuming that the software / hardware flags will select specific drivers. - Set the sysctl to permit software /dev/crypto requests when testing the accelerated software blake2 driver. PR: 245825 Reported by: lwhsu Reviewed by: cem, lwhsu Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24540 Modified: head/tests/sys/opencrypto/blake2_test.c Modified: head/tests/sys/opencrypto/blake2_test.c ============================================================================== --- head/tests/sys/opencrypto/blake2_test.c Wed Apr 22 19:44:33 2020 (r360202) +++ head/tests/sys/opencrypto/blake2_test.c Wed Apr 22 20:43:18 2020 (r360203) @@ -75,6 +75,17 @@ initialize_constant_buffers(void) } static int +lookup_crid(int fd, const char *devname) +{ + struct crypt_find_op find; + + find.crid = -1; + strlcpy(find.name, devname, sizeof(find.name)); + ATF_REQUIRE(ioctl(fd, CIOCFINDDEV, &find) != -1); + return (find.crid); +} + +static int get_handle_fd(void) { int dc_fd, fd; @@ -124,10 +135,10 @@ do_cryptop(int fd, int ses, size_t inlen, void *out) } static void -test_blake2b_vectors(int crid, const char *modname) +test_blake2b_vectors(const char *devname, const char *modname) { uint8_t hash[BLAKE2B_OUTBYTES]; - int fd, ses; + int crid, fd, ses; size_t i; ATF_REQUIRE_KERNEL_MODULE(modname); @@ -135,6 +146,7 @@ test_blake2b_vectors(int crid, const char *modname) initialize_constant_buffers(); fd = get_handle_fd(); + crid = lookup_crid(fd, devname); ses = create_session(fd, CRYPTO_BLAKE2B, crid, key2b, sizeof(key2b)); for (i = 0; i < sizeof(katbuf); i++) { @@ -147,10 +159,10 @@ test_blake2b_vectors(int crid, const char *modname) } static void -test_blake2s_vectors(int crid, const char *modname) +test_blake2s_vectors(const char *devname, const char *modname) { uint8_t hash[BLAKE2S_OUTBYTES]; - int fd, ses; + int crid, fd, ses; size_t i; ATF_REQUIRE_KERNEL_MODULE(modname); @@ -158,6 +170,7 @@ test_blake2s_vectors(int crid, const char *modname) initialize_constant_buffers(); fd = get_handle_fd(); + crid = lookup_crid(fd, devname); ses = create_session(fd, CRYPTO_BLAKE2S, crid, key2s, sizeof(key2s)); for (i = 0; i < sizeof(katbuf); i++) { @@ -173,33 +186,29 @@ ATF_TC_WITHOUT_HEAD(blake2b_vectors); ATF_TC_BODY(blake2b_vectors, tc) { ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1); - test_blake2b_vectors(CRYPTO_FLAG_SOFTWARE, "nexus/cryptosoft"); + test_blake2b_vectors("cryptosoft0", "nexus/cryptosoft"); } ATF_TC_WITHOUT_HEAD(blake2s_vectors); ATF_TC_BODY(blake2s_vectors, tc) { ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1); - test_blake2s_vectors(CRYPTO_FLAG_SOFTWARE, "nexus/cryptosoft"); + test_blake2s_vectors("cryptosoft0", "nexus/cryptosoft"); } #if defined(__i386__) || defined(__amd64__) ATF_TC_WITHOUT_HEAD(blake2b_vectors_x86); ATF_TC_BODY(blake2b_vectors_x86, tc) { - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/245825"); - - test_blake2b_vectors(CRYPTO_FLAG_HARDWARE, "nexus/blake2"); + ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1); + test_blake2b_vectors("blaketwo0", "nexus/blake2"); } ATF_TC_WITHOUT_HEAD(blake2s_vectors_x86); ATF_TC_BODY(blake2s_vectors_x86, tc) { - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/245825"); - - test_blake2s_vectors(CRYPTO_FLAG_HARDWARE, "nexus/blake2"); + ATF_REQUIRE_SYSCTL_INT("kern.cryptodevallowsoft", 1); + test_blake2s_vectors("blaketwo0", "nexus/blake2"); } #endif From owner-svn-src-all@freebsd.org Wed Apr 22 20:50:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 276D62C1296; Wed, 22 Apr 2020 20:50:25 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496syT0LX8z3Jgx; Wed, 22 Apr 2020 20:50:25 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02AFA20C38; Wed, 22 Apr 2020 20:50:25 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MKoOZp044607; Wed, 22 Apr 2020 20:50:24 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MKoOUq044606; Wed, 22 Apr 2020 20:50:24 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202004222050.03MKoOUq044606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Wed, 22 Apr 2020 20:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360204 - head/tests/sys/netipsec/tunnel X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/netipsec/tunnel X-SVN-Commit-Revision: 360204 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 20:50:25 -0000 Author: lwhsu Date: Wed Apr 22 20:50:24 2020 New Revision: 360204 URL: https://svnweb.freebsd.org/changeset/base/360204 Log: Temporarily skip sys.netipsec.tunnel.empty.v{4,6} in CI PR: 245832 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/netipsec/tunnel/empty.sh Modified: head/tests/sys/netipsec/tunnel/empty.sh ============================================================================== --- head/tests/sys/netipsec/tunnel/empty.sh Wed Apr 22 20:43:18 2020 (r360203) +++ head/tests/sys/netipsec/tunnel/empty.sh Wed Apr 22 20:50:24 2020 (r360204) @@ -11,6 +11,10 @@ v4_head() v4_body() { + if [ "$(atf_config_get ci false)" = "true" ]; then + atf_skip "https://bugs.freebsd.org/245832" + fi + # Can't use filename "null" for this script: PR 223564 ist_test 4 null "" } @@ -29,6 +33,10 @@ v6_head() v6_body() { + if [ "$(atf_config_get ci false)" = "true" ]; then + atf_skip "https://bugs.freebsd.org/245832" + fi + ist_test 6 null "" } From owner-svn-src-all@freebsd.org Wed Apr 22 21:00:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBEEE2C1659; Wed, 22 Apr 2020 21:00:15 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496t9q63pGz3KJK; Wed, 22 Apr 2020 21:00:15 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C978620E34; Wed, 22 Apr 2020 21:00:15 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ML0FDE050819; Wed, 22 Apr 2020 21:00:15 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ML0Fwd050816; Wed, 22 Apr 2020 21:00:15 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202004222100.03ML0Fwd050816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 22 Apr 2020 21:00:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360205 - in head/sys/fs: nfs nfsclient X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys/fs: nfs nfsclient X-SVN-Commit-Revision: 360205 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 21:00:16 -0000 Author: rmacklem Date: Wed Apr 22 21:00:14 2020 New Revision: 360205 URL: https://svnweb.freebsd.org/changeset/base/360205 Log: Make the NFSv4.n client's recovery from NFSERR_BADSESSION RFC5661 conformant. RFC5661 specifies that a client's recovery upon receipt of NFSERR_BADSESSION should first consist of a CreateSession operation using the extant ClientID. If that fails, then a full recovery beginning with the ExchangeID operation is to be done. Without this patch, the FreeBSD client did not attempt the CreateSession operation with the extant ClientID and went directly to a full recovery beginning with ExchangeID. I have had this patch several years, but since no extant NFSv4.n server required the CreateSession with extant ClientID, I have never committed it. I an committing it now, since I suspect some future NFSv4.n server will require this and it should not negatively impact recovery for extant NFSv4.n servers, since they should all return NFSERR_STATECLIENTID for this first CreateSession. The patched client has been tested for recovery against both the FreeBSD and Linux NFSv4.n servers and no problems have been observed. MFC after: 1 month Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clstate.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Wed Apr 22 20:50:24 2020 (r360204) +++ head/sys/fs/nfs/nfs_var.h Wed Apr 22 21:00:14 2020 (r360205) @@ -454,7 +454,7 @@ int nfsrpc_closerpc(struct nfsrv_descript *, struct nf int nfsrpc_openconfirm(vnode_t, u_int8_t *, int, struct nfsclopen *, struct ucred *, NFSPROC_T *); int nfsrpc_setclient(struct nfsmount *, struct nfsclclient *, int, - struct ucred *, NFSPROC_T *); + bool *, struct ucred *, NFSPROC_T *); int nfsrpc_getattr(vnode_t, struct ucred *, NFSPROC_T *, struct nfsvattr *, void *); int nfsrpc_getattrnovp(struct nfsmount *, u_int8_t *, int, int, Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Wed Apr 22 20:50:24 2020 (r360204) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Wed Apr 22 21:00:14 2020 (r360205) @@ -932,7 +932,7 @@ nfsmout: */ APPLESTATIC int nfsrpc_setclient(struct nfsmount *nmp, struct nfsclclient *clp, int reclaim, - struct ucred *cred, NFSPROC_T *p) + bool *retokp, struct ucred *cred, NFSPROC_T *p) { u_int32_t *tl; struct nfsrv_descript nfsd; @@ -944,26 +944,81 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclcli nfsquad_t confirm; u_int32_t lease; static u_int32_t rev = 0; - struct nfsclds *dsp; + struct nfsclds *dsp, *odsp; struct in6_addr a6; struct nfsclsession *tsep; if (nfsboottime.tv_sec == 0) NFSSETBOOTTIME(nfsboottime); - clp->nfsc_rev = rev++; if (NFSHASNFSV4N(nmp)) { - /* - * Either there was no previous session or the - * previous session has failed, so... - * do an ExchangeID followed by the CreateSession. - */ - error = nfsrpc_exchangeid(nmp, clp, &nmp->nm_sockreq, 0, - NFSV4EXCH_USEPNFSMDS | NFSV4EXCH_USENONPNFS, &dsp, cred, p); - NFSCL_DEBUG(1, "aft exch=%d\n", error); - if (error == 0) + error = NFSERR_BADSESSION; + odsp = dsp = NULL; + if (retokp != NULL) { + NFSLOCKMNT(nmp); + odsp = TAILQ_FIRST(&nmp->nm_sess); + NFSUNLOCKMNT(nmp); + } + if (odsp != NULL) { + /* + * When a session already exists, first try a + * CreateSession with the extant ClientID. + */ + dsp = malloc(sizeof(struct nfsclds) + + odsp->nfsclds_servownlen + 1, M_NFSCLDS, + M_WAITOK | M_ZERO); + dsp->nfsclds_expire = NFSD_MONOSEC + clp->nfsc_renew; + dsp->nfsclds_servownlen = odsp->nfsclds_servownlen; + dsp->nfsclds_sess.nfsess_clientid = + odsp->nfsclds_sess.nfsess_clientid; + dsp->nfsclds_sess.nfsess_sequenceid = + odsp->nfsclds_sess.nfsess_sequenceid; + dsp->nfsclds_flags = odsp->nfsclds_flags; + if (dsp->nfsclds_servownlen > 0) + memcpy(dsp->nfsclds_serverown, + odsp->nfsclds_serverown, + dsp->nfsclds_servownlen + 1); + mtx_init(&dsp->nfsclds_mtx, "nfsds", NULL, MTX_DEF); + mtx_init(&dsp->nfsclds_sess.nfsess_mtx, "nfssession", + NULL, MTX_DEF); + nfscl_initsessionslots(&dsp->nfsclds_sess); error = nfsrpc_createsession(nmp, &dsp->nfsclds_sess, &nmp->nm_sockreq, NULL, dsp->nfsclds_sess.nfsess_sequenceid, 1, cred, p); + NFSCL_DEBUG(1, "create session for extant " + "ClientID=%d\n", error); + if (error != 0) { + nfscl_freenfsclds(dsp); + dsp = NULL; + /* + * If *retokp is true, return any error other + * than NFSERR_STALECLIENTID, + * NFSERR_BADSESSION or NFSERR_STALEDONTRECOVER + * so that nfscl_recover() will not loop. + */ + if (*retokp) + return (NFSERR_IO); + } else + *retokp = true; + } else if (retokp != NULL && *retokp) + return (NFSERR_IO); + if (error != 0) { + /* + * Either there was no previous session or the + * CreateSession attempt failed, so... + * do an ExchangeID followed by the CreateSession. + */ + clp->nfsc_rev = rev++; + error = nfsrpc_exchangeid(nmp, clp, &nmp->nm_sockreq, 0, + NFSV4EXCH_USEPNFSMDS | NFSV4EXCH_USENONPNFS, &dsp, + cred, p); + NFSCL_DEBUG(1, "aft exch=%d\n", error); + if (error == 0) + error = nfsrpc_createsession(nmp, + &dsp->nfsclds_sess, &nmp->nm_sockreq, NULL, + dsp->nfsclds_sess.nfsess_sequenceid, 1, + cred, p); + NFSCL_DEBUG(1, "aft createsess=%d\n", error); + } if (error == 0) { NFSLOCKMNT(nmp); /* @@ -988,9 +1043,8 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclcli wakeup(&tsep->nfsess_slots); wakeup(&nmp->nm_sess); NFSUNLOCKMNT(nmp); - } else + } else if (dsp != NULL) nfscl_freenfsclds(dsp); - NFSCL_DEBUG(1, "aft createsess=%d\n", error); if (error == 0 && reclaim == 0) { error = nfsrpc_reclaimcomplete(nmp, cred, p); NFSCL_DEBUG(1, "aft reclaimcomp=%d\n", error); @@ -1000,7 +1054,9 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclcli error = 0; } return (error); - } + } else if (retokp != NULL && *retokp) + return (NFSERR_IO); + clp->nfsc_rev = rev++; /* * Allocate a single session structure for NFSv4.0, because some of Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Wed Apr 22 20:50:24 2020 (r360204) +++ head/sys/fs/nfsclient/nfs_clstate.c Wed Apr 22 21:00:14 2020 (r360205) @@ -110,7 +110,8 @@ static void nfscl_expireclient(struct nfsclclient *, s struct ucred *, NFSPROC_T *); static int nfscl_expireopen(struct nfsclclient *, struct nfsclopen *, struct nfsmount *, struct ucred *, NFSPROC_T *); -static void nfscl_recover(struct nfsclclient *, struct ucred *, NFSPROC_T *); +static void nfscl_recover(struct nfsclclient *, bool *, struct ucred *, + NFSPROC_T *); static void nfscl_insertlock(struct nfscllockowner *, struct nfscllock *, struct nfscllock *, int); static int nfscl_updatelock(struct nfscllockowner *, struct nfscllock **, @@ -907,7 +908,7 @@ nfscl_getcl(struct mount *mp, struct ucred *cred, NFSP clidinusedelay = 120; trystalecnt = 3; do { - error = nfsrpc_setclient(nmp, clp, 0, cred, p); + error = nfsrpc_setclient(nmp, clp, 0, NULL, cred, p); if (error == NFSERR_STALECLIENTID || error == NFSERR_STALEDONTRECOVER || error == NFSERR_BADSESSION || @@ -1950,7 +1951,7 @@ nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p) (void)nfsrpc_destroysession(nmp, clp, cred, p); (void)nfsrpc_destroyclient(nmp, clp, cred, p); } else - (void)nfsrpc_setclient(nmp, clp, 0, cred, p); + (void)nfsrpc_setclient(nmp, clp, 0, NULL, cred, p); nfscl_cleanclient(clp); nmp->nm_clp = NULL; NFSFREECRED(cred); @@ -1966,7 +1967,8 @@ nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p) * corresponding state. */ static void -nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p) +nfscl_recover(struct nfsclclient *clp, bool *retokp, struct ucred *cred, + NFSPROC_T *p) { struct nfsclowner *owp, *nowp; struct nfsclopen *op, *nop; @@ -2010,8 +2012,9 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *c LIST_INIT(&clp->nfsc_layouthash[i]); trycnt = 5; + tcred = NULL; do { - error = nfsrpc_setclient(nmp, clp, 1, cred, p); + error = nfsrpc_setclient(nmp, clp, 1, retokp, cred, p); } while ((error == NFSERR_STALECLIENTID || error == NFSERR_BADSESSION || error == NFSERR_STALEDONTRECOVER) && --trycnt > 0); @@ -2044,6 +2047,13 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *c NFSUNLOCKREQ(); /* + * If nfsrpc_setclient() returns *retokp == true, + * no more recovery is needed. + */ + if (*retokp) + goto out; + + /* * Now, mark all delegations "need reclaim". */ TAILQ_FOREACH(dp, &clp->nfsc_deleg, nfsdl_list) @@ -2276,12 +2286,14 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *c if (NFSHASNFSV4N(nmp)) (void)nfsrpc_reclaimcomplete(nmp, cred, p); +out: NFSLOCKCLSTATE(); clp->nfsc_flags &= ~NFSCLFLAGS_RECVRINPROG; wakeup(&clp->nfsc_flags); nfsv4_unlock(&clp->nfsc_lock, 0); NFSUNLOCKCLSTATE(); - NFSFREECRED(tcred); + if (tcred != NULL) + NFSFREECRED(tcred); } /* @@ -2330,7 +2342,7 @@ nfscl_hasexpired(struct nfsclclient *clp, u_int32_t cl cred = newnfs_getcred(); trycnt = 5; do { - error = nfsrpc_setclient(nmp, clp, 0, cred, p); + error = nfsrpc_setclient(nmp, clp, 0, NULL, cred, p); } while ((error == NFSERR_STALECLIENTID || error == NFSERR_BADSESSION || error == NFSERR_STALEDONTRECOVER) && --trycnt > 0); @@ -2539,6 +2551,7 @@ nfscl_renewthread(struct nfsclclient *clp, NFSPROC_T * struct nfscllayouthead rlh; struct nfsclrecalllayout *recallp; struct nfsclds *dsp; + bool retok; cred = newnfs_getcred(); NFSLOCKCLSTATE(); @@ -2549,21 +2562,23 @@ nfscl_renewthread(struct nfsclclient *clp, NFSPROC_T * cbpathdown = 0; if (clp->nfsc_flags & NFSCLFLAGS_RECOVER) { /* - * Only allow one recover within 1/2 of the lease + * Only allow one full recover within 1/2 of the lease * duration (nfsc_renew). + * retok is value/result. If passed in set to true, + * it indicates only a CreateSession operation should + * be attempted. + * If it is returned true, it indicates that the + * recovery only required a CreateSession. */ + retok = true; if (recover_done_time < NFSD_MONOSEC) { recover_done_time = NFSD_MONOSEC + clp->nfsc_renew; - NFSCL_DEBUG(1, "Doing recovery..\n"); - nfscl_recover(clp, cred, p); - } else { - NFSCL_DEBUG(1, "Clear Recovery dt=%u ms=%jd\n", - recover_done_time, (intmax_t)NFSD_MONOSEC); - NFSLOCKCLSTATE(); - clp->nfsc_flags &= ~NFSCLFLAGS_RECOVER; - NFSUNLOCKCLSTATE(); + retok = false; } + NFSCL_DEBUG(1, "Doing recovery, only " + "createsession=%d\n", retok); + nfscl_recover(clp, &retok, cred, p); } if (clp->nfsc_expire <= NFSD_MONOSEC && (clp->nfsc_flags & NFSCLFLAGS_HASCLIENTID)) { From owner-svn-src-all@freebsd.org Wed Apr 22 21:03:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 20E642C186C; Wed, 22 Apr 2020 21:03:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496tFT020pz3Kgm; Wed, 22 Apr 2020 21:03:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F044321008; Wed, 22 Apr 2020 21:03:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ML3OMN056347; Wed, 22 Apr 2020 21:03:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ML3OME056346; Wed, 22 Apr 2020 21:03:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004222103.03ML3OME056346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 22 Apr 2020 21:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360206 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 360206 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 21:03:25 -0000 Author: jhb Date: Wed Apr 22 21:03:24 2020 New Revision: 360206 URL: https://svnweb.freebsd.org/changeset/base/360206 Log: Fix name of 3DES cipher in deprecation warning. Submitted by: cem MFC after: 1 week Modified: head/sys/netipsec/xform_esp.c Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Wed Apr 22 21:00:14 2020 (r360205) +++ head/sys/netipsec/xform_esp.c Wed Apr 22 21:03:24 2020 (r360206) @@ -166,7 +166,7 @@ esp_init(struct secasvar *sav, struct xformsw *xsp) break; case SADB_EALG_3DESCBC: if (ratecheck(&tdeswarn, &ipsec_warn_interval)) - gone_in(13, "DES cipher for IPsec"); + gone_in(13, "3DES cipher for IPsec"); break; case SADB_X_EALG_BLOWFISHCBC: if (ratecheck(&blfwarn, &ipsec_warn_interval)) From owner-svn-src-all@freebsd.org Wed Apr 22 21:08:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 564382C194B; Wed, 22 Apr 2020 21:08:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496tLx1cFMz3KsP; Wed, 22 Apr 2020 21:08:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E12E2100D; Wed, 22 Apr 2020 21:08:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ML88TZ056622; Wed, 22 Apr 2020 21:08:08 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ML88FG056621; Wed, 22 Apr 2020 21:08:08 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202004222108.03ML88FG056621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 22 Apr 2020 21:08:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360207 - stable/12/sys/fs/nfsserver X-SVN-Group: stable-12 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/12/sys/fs/nfsserver X-SVN-Commit-Revision: 360207 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 21:08:09 -0000 Author: rmacklem Date: Wed Apr 22 21:08:08 2020 New Revision: 360207 URL: https://svnweb.freebsd.org/changeset/base/360207 Log: MFC: r359720 Fix an interoperability issue w.r.t. the Linux client and the NFSv4 server. Luoqi Chen reported a problem on freebsd-fs@ where a Linux NFSv4 client was able to open and write to a file when the file's permissions were not set to allow the owner write access. Since NFS servers check file permissions on every write RPC, it is standard practice to allow the owner of the file to do writes, regardless of file permissions. This provides POSIX like behaviour, since POSIX only checks permissions upon open(2). The traditional way NFS clients handle this is to check access via the Access operation/RPC and use that to determine if an open(2) on the client is allowed. It appears that, for NFSv4, the Linux client expects the NFSv4 Open (not a POSIX open) operation to fail with NFSERR_ACCES if the file is not being created and file permissions do not allow owner access, unlike NFSv3. Since both the Linux and OpenSolaris NFSv4 servers seem to exhibit this behaviour, this patch changes the FreeBSD NFSv4 server to do the same. A sysctl called vfs.nfsd.v4openaccess can be set to 0 to return the NFSv4 server to its previous behaviour. Since both the Linux and FreeBSD NFSv4 clients seem to exhibit correct behaviour with the access check for file owner in Open enabled, it is enabled by default. Reported by: luoqi.chen@gmail.com Modified: stable/12/sys/fs/nfsserver/nfs_nfsdserv.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- stable/12/sys/fs/nfsserver/nfs_nfsdserv.c Wed Apr 22 21:03:24 2020 (r360206) +++ stable/12/sys/fs/nfsserver/nfs_nfsdserv.c Wed Apr 22 21:08:08 2020 (r360207) @@ -74,6 +74,10 @@ SYSCTL_INT(_vfs_nfsd, OID_AUTO, async, CTLFLAG_RW, &nf extern int nfsrv_doflexfile; SYSCTL_INT(_vfs_nfsd, OID_AUTO, default_flexfile, CTLFLAG_RW, &nfsrv_doflexfile, 0, "Make Flex File Layout the default for pNFS"); +static bool nfsrv_openaccess = true; +SYSCTL_BOOL(_vfs_nfsd, OID_AUTO, v4openaccess, CTLFLAG_RW, + &nfsrv_openaccess, 0, + "Enable Linux style NFSv4 Open access check"); /* * This list defines the GSS mechanisms supported. @@ -2727,7 +2731,7 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int is u_int32_t *tl; int i, retext; struct nfsstate *stp = NULL; - int error = 0, create, claim, exclusive_flag = 0; + int error = 0, create, claim, exclusive_flag = 0, override; u_int32_t rflags = NFSV4OPEN_LOCKTYPEPOSIX, acemask; int how = NFSCREATE_UNCHECKED; int32_t cverf[2], tverf[2] = { 0, 0 }; @@ -3030,15 +3034,38 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int is */ nd->nd_repstat = (vp->v_type == VDIR) ? NFSERR_ISDIR : NFSERR_SYMLINK; } + + /* + * If the Open is being done for a file that already exists, apply + * normal permission checking including for the file owner, if + * vfs.nfsd.v4openaccess is set. + * Previously, the owner was always allowed to open the file to + * be consistent with the NFS tradition of always allowing the + * owner of the file to write to the file regardless of permissions. + * It now appears that the Linux client expects the owner + * permissions to be checked for opens that are not creating the + * file. I believe the correct approach is to use the Access + * operation's results to be consistent with NFSv3, but that is + * not what the current Linux client appears to be doing. + * Since both the Linux and OpenSolaris NFSv4 servers do this check, + * I have enabled it by default. + * If this semantic change causes a problem, it can be disabled by + * setting the sysctl vfs.nfsd.v4openaccess to 0 to re-enable the + * previous semantics. + */ + if (nfsrv_openaccess && create == NFSV4OPEN_NOCREATE) + override = NFSACCCHK_NOOVERRIDE; + else + override = NFSACCCHK_ALLOWOWNER; if (!nd->nd_repstat && (stp->ls_flags & NFSLCK_WRITEACCESS)) nd->nd_repstat = nfsvno_accchk(vp, VWRITE, nd->nd_cred, - exp, p, NFSACCCHK_ALLOWOWNER, NFSACCCHK_VPISLOCKED, NULL); + exp, p, override, NFSACCCHK_VPISLOCKED, NULL); if (!nd->nd_repstat && (stp->ls_flags & NFSLCK_READACCESS)) { nd->nd_repstat = nfsvno_accchk(vp, VREAD, nd->nd_cred, - exp, p, NFSACCCHK_ALLOWOWNER, NFSACCCHK_VPISLOCKED, NULL); + exp, p, override, NFSACCCHK_VPISLOCKED, NULL); if (nd->nd_repstat) nd->nd_repstat = nfsvno_accchk(vp, VEXEC, - nd->nd_cred, exp, p, NFSACCCHK_ALLOWOWNER, + nd->nd_cred, exp, p, override, NFSACCCHK_VPISLOCKED, NULL); } From owner-svn-src-all@freebsd.org Wed Apr 22 21:15:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 455D22C1DB7; Wed, 22 Apr 2020 21:15:27 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496tWM15CLz3LcV; Wed, 22 Apr 2020 21:15:27 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 207A521237; Wed, 22 Apr 2020 21:15:27 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MLFRfN063234; Wed, 22 Apr 2020 21:15:27 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MLFQaj063233; Wed, 22 Apr 2020 21:15:26 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202004222115.03MLFQaj063233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 22 Apr 2020 21:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360208 - stable/11/sys/fs/nfsserver X-SVN-Group: stable-11 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/11/sys/fs/nfsserver X-SVN-Commit-Revision: 360208 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 21:15:27 -0000 Author: rmacklem Date: Wed Apr 22 21:15:26 2020 New Revision: 360208 URL: https://svnweb.freebsd.org/changeset/base/360208 Log: MFC: r359720 Fix an interoperability issue w.r.t. the Linux client and the NFSv4 server. Luoqi Chen reported a problem on freebsd-fs@ where a Linux NFSv4 client was able to open and write to a file when the file's permissions were not set to allow the owner write access. Since NFS servers check file permissions on every write RPC, it is standard practice to allow the owner of the file to do writes, regardless of file permissions. This provides POSIX like behaviour, since POSIX only checks permissions upon open(2). The traditional way NFS clients handle this is to check access via the Access operation/RPC and use that to determine if an open(2) on the client is allowed. It appears that, for NFSv4, the Linux client expects the NFSv4 Open (not a POSIX open) operation to fail with NFSERR_ACCES if the file is not being created and file permissions do not allow owner access, unlike NFSv3. Since both the Linux and OpenSolaris NFSv4 servers seem to exhibit this behaviour, this patch changes the FreeBSD NFSv4 server to do the same. A sysctl called vfs.nfsd.v4openaccess can be set to 0 to return the NFSv4 server to its previous behaviour. Since both the Linux and FreeBSD NFSv4 clients seem to exhibit correct behaviour with the access check for file owner in Open enabled, it is enabled by default. Reported by: luoqi.chen@gmail.com Modified: stable/11/sys/fs/nfsserver/nfs_nfsdserv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- stable/11/sys/fs/nfsserver/nfs_nfsdserv.c Wed Apr 22 21:08:08 2020 (r360207) +++ stable/11/sys/fs/nfsserver/nfs_nfsdserv.c Wed Apr 22 21:15:26 2020 (r360208) @@ -62,6 +62,10 @@ static int nfs_async = 0; SYSCTL_DECL(_vfs_nfsd); SYSCTL_INT(_vfs_nfsd, OID_AUTO, async, CTLFLAG_RW, &nfs_async, 0, "Tell client that writes were synced even though they were not"); +static bool nfsrv_openaccess = true; +SYSCTL_BOOL(_vfs_nfsd, OID_AUTO, v4openaccess, CTLFLAG_RW, + &nfsrv_openaccess, 0, + "Enable Linux style NFSv4 Open access check"); /* * This list defines the GSS mechanisms supported. @@ -2587,7 +2591,7 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int is u_int32_t *tl; int i, retext; struct nfsstate *stp = NULL; - int error = 0, create, claim, exclusive_flag = 0; + int error = 0, create, claim, exclusive_flag = 0, override; u_int32_t rflags = NFSV4OPEN_LOCKTYPEPOSIX, acemask; int how = NFSCREATE_UNCHECKED; int32_t cverf[2], tverf[2] = { 0, 0 }; @@ -2890,15 +2894,38 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int is */ nd->nd_repstat = (vp->v_type == VDIR) ? NFSERR_ISDIR : NFSERR_SYMLINK; } + + /* + * If the Open is being done for a file that already exists, apply + * normal permission checking including for the file owner, if + * vfs.nfsd.v4openaccess is set. + * Previously, the owner was always allowed to open the file to + * be consistent with the NFS tradition of always allowing the + * owner of the file to write to the file regardless of permissions. + * It now appears that the Linux client expects the owner + * permissions to be checked for opens that are not creating the + * file. I believe the correct approach is to use the Access + * operation's results to be consistent with NFSv3, but that is + * not what the current Linux client appears to be doing. + * Since both the Linux and OpenSolaris NFSv4 servers do this check, + * I have enabled it by default. + * If this semantic change causes a problem, it can be disabled by + * setting the sysctl vfs.nfsd.v4openaccess to 0 to re-enable the + * previous semantics. + */ + if (nfsrv_openaccess && create == NFSV4OPEN_NOCREATE) + override = NFSACCCHK_NOOVERRIDE; + else + override = NFSACCCHK_ALLOWOWNER; if (!nd->nd_repstat && (stp->ls_flags & NFSLCK_WRITEACCESS)) nd->nd_repstat = nfsvno_accchk(vp, VWRITE, nd->nd_cred, - exp, p, NFSACCCHK_ALLOWOWNER, NFSACCCHK_VPISLOCKED, NULL); + exp, p, override, NFSACCCHK_VPISLOCKED, NULL); if (!nd->nd_repstat && (stp->ls_flags & NFSLCK_READACCESS)) { nd->nd_repstat = nfsvno_accchk(vp, VREAD, nd->nd_cred, - exp, p, NFSACCCHK_ALLOWOWNER, NFSACCCHK_VPISLOCKED, NULL); + exp, p, override, NFSACCCHK_VPISLOCKED, NULL); if (nd->nd_repstat) nd->nd_repstat = nfsvno_accchk(vp, VEXEC, - nd->nd_cred, exp, p, NFSACCCHK_ALLOWOWNER, + nd->nd_cred, exp, p, override, NFSACCCHK_VPISLOCKED, NULL); } From owner-svn-src-all@freebsd.org Wed Apr 22 21:22:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B08D52C20EB; Wed, 22 Apr 2020 21:22:33 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496tgY4FVrz3MG0; Wed, 22 Apr 2020 21:22:33 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8D1E92141A; Wed, 22 Apr 2020 21:22:33 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MLMXrR069515; Wed, 22 Apr 2020 21:22:33 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MLMXZH069514; Wed, 22 Apr 2020 21:22:33 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202004222122.03MLMXZH069514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 22 Apr 2020 21:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360209 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 360209 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 21:22:33 -0000 Author: tuexen Date: Wed Apr 22 21:22:33 2020 New Revision: 360209 URL: https://svnweb.freebsd.org/changeset/base/360209 Log: Improve input validation when processing AUTH chunks. Thanks to Natalie Silvanovich from Google for finding and reporting the issue found by her in the SCTP userland stack. MFC after: 3 days X-MFC with: https://svnweb.freebsd.org/changeset/base/360193 Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Wed Apr 22 21:15:26 2020 (r360208) +++ head/sys/netinet/sctp_input.c Wed Apr 22 21:22:33 2020 (r360209) @@ -2094,7 +2094,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in int init_offset, initack_offset, initack_limit; int retval; int error = 0; - uint8_t auth_chunk_buf[SCTP_PARAM_BUFFER_SIZE]; + uint8_t auth_chunk_buf[SCTP_CHUNK_BUFFER_SIZE]; #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) struct socket *so; @@ -2273,7 +2273,7 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, in if (auth_skipped) { struct sctp_auth_chunk *auth; - if (auth_len <= SCTP_PARAM_BUFFER_SIZE) { + if (auth_len <= SCTP_CHUNK_BUFFER_SIZE) { auth = (struct sctp_auth_chunk *)sctp_m_getptr(m, auth_offset, auth_len, auth_chunk_buf); } else { auth = NULL; @@ -4670,11 +4670,13 @@ sctp_process_control(struct mbuf *m, int iphlen, int * if (auth_skipped && (stcb != NULL)) { struct sctp_auth_chunk *auth; - auth = (struct sctp_auth_chunk *) - sctp_m_getptr(m, auth_offset, - auth_len, chunk_buf); - got_auth = 1; - auth_skipped = 0; + if (auth_len <= SCTP_CHUNK_BUFFER_SIZE) { + auth = (struct sctp_auth_chunk *)sctp_m_getptr(m, auth_offset, auth_len, chunk_buf); + got_auth = 1; + auth_skipped = 0; + } else { + auth = NULL; + } if ((auth == NULL) || sctp_handle_auth(stcb, auth, m, auth_offset)) { /* auth HMAC failed so dump it */ From owner-svn-src-all@freebsd.org Wed Apr 22 21:45:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAEE22C3E33; Wed, 22 Apr 2020 21:45:43 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496vBH5wFHz41w7; Wed, 22 Apr 2020 21:45:43 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C659621838; Wed, 22 Apr 2020 21:45:43 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MLjhAm090822; Wed, 22 Apr 2020 21:45:43 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MLjhl0090820; Wed, 22 Apr 2020 21:45:43 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <202004222145.03MLjhl0090820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 22 Apr 2020 21:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360210 - head/bin/sh X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/bin/sh X-SVN-Commit-Revision: 360210 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 21:45:44 -0000 Author: jilles Date: Wed Apr 22 21:45:43 2020 New Revision: 360210 URL: https://svnweb.freebsd.org/changeset/base/360210 Log: sh: Remove remnants to compile out fc completely r360139 made compiling with NO_HISTORY work. This #define does not remove the fc and bind builtins completely but makes them always write an error message. However, there was also some code in builtins.def and mkbuiltins to remove the fc builtin entirely (but not the bind builtin). The additional build system complication to make this work seems not worth it, so remove that code. Modified: head/bin/sh/builtins.def head/bin/sh/mkbuiltins Modified: head/bin/sh/builtins.def ============================================================================== --- head/bin/sh/builtins.def Wed Apr 22 21:22:33 2020 (r360209) +++ head/bin/sh/builtins.def Wed Apr 22 21:45:43 2020 (r360210) @@ -39,8 +39,6 @@ # of a C routine. # The -j flag specifies that this command is to be excluded from systems # without job control. -# The -h flag specifies that this command is to be excluded from systems -# based on the NO_HISTORY compile-time symbol. # The -n flag specifies that this command can safely be run in the same # process when it is the only command in a command substitution. Some # commands have special logic defined in safe_builtin(). @@ -71,7 +69,7 @@ fgcmd -j fg freebsd_wordexpcmd freebsd_wordexp getoptscmd getopts hashcmd hash -histcmd -h fc +histcmd fc jobidcmd -n jobid jobscmd -n jobs killcmd -n kill Modified: head/bin/sh/mkbuiltins ============================================================================== --- head/bin/sh/mkbuiltins Wed Apr 22 21:22:33 2020 (r360209) +++ head/bin/sh/mkbuiltins Wed Apr 22 21:45:43 2020 (r360210) @@ -35,11 +35,6 @@ # $FreeBSD$ temp=`mktemp -t ka` -havehist=1 -if [ "X$1" = "X-h" ]; then - havehist=0 - shift -fi srcdir=$1 havejobs=0 if grep '^#define[ ]*JOBS[ ]*1' $srcdir/shell.h > /dev/null @@ -56,8 +51,8 @@ cat <<\! #include "builtins.h" ! -awk '/^[^#]/ {if(('$havejobs' || $2 != "-j") && ('$havehist' || $2 != "-h")) \ - print $0}' $srcdir/builtins.def | sed 's/-[hj]//' > $temp +awk '/^[^#]/ {if('$havejobs' || $2 != "-j") \ + print $0}' $srcdir/builtins.def | sed 's/-j//' > $temp echo 'int (*const builtinfunc[])(int, char **) = {' awk '/^[^#]/ { printf "\t%s,\n", $1}' $temp echo '}; From owner-svn-src-all@freebsd.org Wed Apr 22 21:54:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23D4D2C40D1; Wed, 22 Apr 2020 21:54:22 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496vNF6y9Dz42Nt; Wed, 22 Apr 2020 21:54:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D05E021A6A; Wed, 22 Apr 2020 21:54:21 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03MLsL13097392; Wed, 22 Apr 2020 21:54:21 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03MLsLXE097390; Wed, 22 Apr 2020 21:54:21 GMT (envelope-from np@FreeBSD.org) Message-Id: <202004222154.03MLsLXE097390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 22 Apr 2020 21:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360211 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/iw_cxgbe X-SVN-Commit-Revision: 360211 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 21:54:22 -0000 Author: np Date: Wed Apr 22 21:54:21 2020 New Revision: 360211 URL: https://svnweb.freebsd.org/changeset/base/360211 Log: cxgbe/iw_cxgbe: Create a LinuxKPI pci device for an adapter and use it as the dma_device during RDMA registration. cxgbe's struct device cannot be used as-is because it's a native FreeBSD driver and ibcore is LinuxKPI based. MFC after: 1 week MFC after: r360196 Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h head/sys/dev/cxgbe/iw_cxgbe/provider.c Modified: head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed Apr 22 21:45:43 2020 (r360210) +++ head/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed Apr 22 21:54:21 2020 (r360211) @@ -261,6 +261,7 @@ out: struct c4iw_dev { struct ib_device ibdev; + struct pci_dev pdev; struct c4iw_rdev rdev; u32 device_cap_flags; struct idr cqidr; Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/provider.c Wed Apr 22 21:45:43 2020 (r360210) +++ head/sys/dev/cxgbe/iw_cxgbe/provider.c Wed Apr 22 21:54:21 2020 (r360211) @@ -434,6 +434,9 @@ c4iw_register_device(struct c4iw_dev *dev) CTR3(KTR_IW_CXGBE, "%s c4iw_dev %p, adapter %p", __func__, dev, sc); BUG_ON(!sc->port[0]); + ret = linux_pci_attach_device(sc->dev, NULL, NULL, &dev->pdev); + if (ret) + return (ret); strlcpy(ibdev->name, device_get_nameunit(sc->dev), sizeof(ibdev->name)); memset(&ibdev->node_guid, 0, sizeof(ibdev->node_guid)); memcpy(&ibdev->node_guid, sc->port[0]->vi[0].hw_addr, ETHER_ADDR_LEN); @@ -465,7 +468,7 @@ c4iw_register_device(struct c4iw_dev *dev) strlcpy(ibdev->node_desc, C4IW_NODE_DESC, sizeof(ibdev->node_desc)); ibdev->phys_port_cnt = sc->params.nports; ibdev->num_comp_vectors = 1; - ibdev->dma_device = NULL; + ibdev->dma_device = &dev->pdev.dev; ibdev->query_device = c4iw_query_device; ibdev->query_port = c4iw_query_port; ibdev->modify_port = c4iw_modify_port; @@ -517,8 +520,10 @@ c4iw_register_device(struct c4iw_dev *dev) ibdev->iwcm = iwcm; ret = ib_register_device(&dev->ibdev, NULL); - if (ret) + if (ret) { kfree(iwcm); + linux_pci_detach_device(&dev->pdev); + } return (ret); } @@ -531,6 +536,7 @@ c4iw_unregister_device(struct c4iw_dev *dev) dev->rdev.adap); ib_unregister_device(&dev->ibdev); kfree(dev->ibdev.iwcm); + linux_pci_detach_device(&dev->pdev); return; } #endif From owner-svn-src-all@freebsd.org Thu Apr 23 03:46:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F30022CB522; Thu, 23 Apr 2020 03:46:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4973Bn63rnz4LD8; Thu, 23 Apr 2020 03:46:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB5B325E21; Thu, 23 Apr 2020 03:46:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03N3kf80013080; Thu, 23 Apr 2020 03:46:41 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03N3kfxr013079; Thu, 23 Apr 2020 03:46:41 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202004230346.03N3kfxr013079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 23 Apr 2020 03:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360213 - head/bin/rm X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/bin/rm X-SVN-Commit-Revision: 360213 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 03:46:42 -0000 Author: delphij Date: Thu Apr 23 03:46:41 2020 New Revision: 360213 URL: https://svnweb.freebsd.org/changeset/base/360213 Log: Remove include of stdint.h. It was added in r241014 for uintmax_t, which is gone in r340330 and is therefore no longer necessary. MFC after: 2 weeks Modified: head/bin/rm/rm.c Modified: head/bin/rm/rm.c ============================================================================== --- head/bin/rm/rm.c Wed Apr 22 23:53:28 2020 (r360212) +++ head/bin/rm/rm.c Thu Apr 23 03:46:41 2020 (r360213) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-all@freebsd.org Thu Apr 23 04:27:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05BBD2CC179; Thu, 23 Apr 2020 04:27:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49746N6Hh0z4N3q; Thu, 23 Apr 2020 04:27:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3006265BE; Thu, 23 Apr 2020 04:27:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03N4RuBt038660; Thu, 23 Apr 2020 04:27:56 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03N4RteP038656; Thu, 23 Apr 2020 04:27:55 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202004230427.03N4RteP038656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 23 Apr 2020 04:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360214 - in stable/12: etc/mtree share/mk share/zoneinfo share/zoneinfo/tests X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable/12: etc/mtree share/mk share/zoneinfo share/zoneinfo/tests X-SVN-Commit-Revision: 360214 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 04:27:57 -0000 Author: delphij Date: Thu Apr 23 04:27:55 2020 New Revision: 360214 URL: https://svnweb.freebsd.org/changeset/base/360214 Log: MFC r359736: Always install backward compatibility timezones, as they are installed on all major Linux distributions as well as NetBSD and OpenBSD. Modified: stable/12/etc/mtree/BSD.usr.dist stable/12/share/mk/src.opts.mk stable/12/share/zoneinfo/Makefile stable/12/share/zoneinfo/tests/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/etc/mtree/BSD.usr.dist ============================================================================== --- stable/12/etc/mtree/BSD.usr.dist Thu Apr 23 03:46:41 2020 (r360213) +++ stable/12/etc/mtree/BSD.usr.dist Thu Apr 23 04:27:55 2020 (r360214) @@ -1253,15 +1253,25 @@ .. Australia .. + Brazil + .. + Canada + .. + Chile + .. Etc .. Europe .. Indian .. + Mexico + .. Pacific .. SystemV + .. + US .. .. .. Modified: stable/12/share/mk/src.opts.mk ============================================================================== --- stable/12/share/mk/src.opts.mk Thu Apr 23 03:46:41 2020 (r360213) +++ stable/12/share/mk/src.opts.mk Thu Apr 23 04:27:55 2020 (r360214) @@ -214,7 +214,6 @@ __DEFAULT_NO_OPTIONS = \ SORT_THREADS \ SVN \ ZONEINFO_LEAPSECONDS_SUPPORT \ - ZONEINFO_OLD_TIMEZONES_SUPPORT \ # LEFT/RIGHT. Left options which default to "yes" unless their corresponding # RIGHT option is disabled. @@ -535,7 +534,6 @@ MK_GOOGLETEST:= no .if ${MK_ZONEINFO} == "no" MK_ZONEINFO_LEAPSECONDS_SUPPORT:= no -MK_ZONEINFO_OLD_TIMEZONES_SUPPORT:= no .endif .if ${MK_CROSS_COMPILER} == "no" Modified: stable/12/share/zoneinfo/Makefile ============================================================================== --- stable/12/share/zoneinfo/Makefile Thu Apr 23 03:46:41 2020 (r360213) +++ stable/12/share/zoneinfo/Makefile Thu Apr 23 04:27:55 2020 (r360214) @@ -40,11 +40,6 @@ CONTRIBDIR= ${SRCTOP}/contrib/tzdata/ MK_ZONEINFO_LEAPSECONDS_SUPPORT= yes .endif -.if defined(OLDTIMEZONES) -.warning "Using backwards compatibility variable for OLDTIMEZONES; please use WITH_ZONEINFO_OLD_TIMEZONES_SUPPORT instead" -MK_ZONEINFO_OLD_TIMEZONES_SUPPORT= yes -.endif - .if ${MK_ZONEINFO_LEAPSECONDS_SUPPORT} != "no" LEAPFILE= -L ${CONTRIBDIR}leapseconds .else @@ -53,12 +48,9 @@ LEAPFILE= TZFILES= africa antarctica asia australasia etcetera europe \ factory northamerica southamerica +TZFILES+= backward systemv POSIXRULES= America/New_York -.if ${MK_ZONEINFO_OLD_TIMEZONES_SUPPORT} != "no" -TZFILES+= backward systemv -.endif - TZFILES:= ${TZFILES:S/^/${CONTRIBDIR}/} TZBUILDDIR= ${.OBJDIR}/builddir @@ -78,10 +70,7 @@ TZBUILDSUBDIRS= \ Indian \ Pacific \ SystemV - -.if ${MK_ZONEINFO_OLD_TIMEZONES_SUPPORT} != "no" TZBUILDSUBDIRS+= US Mexico Chile Canada Brazil -.endif .if !defined(_SKIP_BUILD) all: zoneinfo Modified: stable/12/share/zoneinfo/tests/Makefile ============================================================================== --- stable/12/share/zoneinfo/tests/Makefile Thu Apr 23 03:46:41 2020 (r360213) +++ stable/12/share/zoneinfo/tests/Makefile Thu Apr 23 04:27:55 2020 (r360214) @@ -8,10 +8,8 @@ PACKAGE= tests FILESGROUPS+= TESTFILES -.if ${MK_ZONEINFO_OLD_TIMEZONES_SUPPORT} != "no" ATF_TESTS_SH+= backward_test TESTFILES+= backward -.endif TESTFILES+= zoneinfo_common.sh TESTFILESPACKAGE= ${PACKAGE} From owner-svn-src-all@freebsd.org Thu Apr 23 04:51:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5EE6A2CCA19; Thu, 23 Apr 2020 04:51:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4974dd1k4Dz4P0w; Thu, 23 Apr 2020 04:51:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 365A6269F8; Thu, 23 Apr 2020 04:51:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03N4pXU7050840; Thu, 23 Apr 2020 04:51:33 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03N4pX2n050839; Thu, 23 Apr 2020 04:51:33 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202004230451.03N4pX2n050839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 23 Apr 2020 04:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360215 - stable/12/lib/libc/nls X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/lib/libc/nls X-SVN-Commit-Revision: 360215 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 04:51:33 -0000 Author: delphij Date: Thu Apr 23 04:51:32 2020 New Revision: 360215 URL: https://svnweb.freebsd.org/changeset/base/360215 Log: MFC r359118: Fix race condition in catopen(3). Modified: stable/12/lib/libc/nls/msgcat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/nls/msgcat.c ============================================================================== --- stable/12/lib/libc/nls/msgcat.c Thu Apr 23 04:27:55 2020 (r360214) +++ stable/12/lib/libc/nls/msgcat.c Thu Apr 23 04:51:32 2020 (r360215) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include /* for ntohl() */ +#include #include #include @@ -76,19 +77,25 @@ __FBSDID("$FreeBSD$"); #define NLERR ((nl_catd) -1) #define NLRETERR(errc) { errno = errc; return (NLERR); } -#define SAVEFAIL(n, l, e) { WLOCK(NLERR); \ - np = malloc(sizeof(struct catentry)); \ +#define SAVEFAIL(n, l, e) { np = calloc(1, sizeof(struct catentry)); \ if (np != NULL) { \ np->name = strdup(n); \ - np->path = NULL; \ np->catd = NLERR; \ - np->refcount = 0; \ np->lang = (l == NULL) ? NULL : \ strdup(l); \ np->caterrno = e; \ - SLIST_INSERT_HEAD(&cache, np, list); \ + if (np->name == NULL || \ + (l != NULL && np->lang == NULL)) { \ + free(np->name); \ + free(np->lang); \ + free(np); \ + } else { \ + WLOCK(NLERR); \ + SLIST_INSERT_HEAD(&cache, np, \ + list); \ + UNLOCK; \ + } \ } \ - UNLOCK; \ errno = e; \ } @@ -152,7 +159,7 @@ catopen(const char *name, int type) NLRETERR(np->caterrno); } else { /* Found cached successful entry */ - np->refcount++; + atomic_add_int(&np->refcount, 1); UNLOCK; return (np->catd); } @@ -355,8 +362,7 @@ catclose(nl_catd catd) WLOCK(-1); SLIST_FOREACH(np, &cache, list) { if (catd == np->catd) { - np->refcount--; - if (np->refcount == 0) + if (atomic_fetchadd_int(&np->refcount, -1) == 1) catfree(np); break; } @@ -376,6 +382,7 @@ load_msgcat(const char *path, const char *name, const nl_catd catd; struct catentry *np; void *data; + char *copy_path, *copy_name, *copy_lang; int fd; /* path/name will never be NULL here */ @@ -387,7 +394,7 @@ load_msgcat(const char *path, const char *name, const RLOCK(NLERR); SLIST_FOREACH(np, &cache, list) { if ((np->path != NULL) && (strcmp(np->path, path) == 0)) { - np->refcount++; + atomic_add_int(&np->refcount, 1); UNLOCK; return (np->catd); } @@ -432,7 +439,20 @@ load_msgcat(const char *path, const char *name, const NLRETERR(EFTYPE); } - if ((catd = malloc(sizeof (*catd))) == NULL) { + copy_name = strdup(name); + copy_path = strdup(path); + copy_lang = (lang == NULL) ? NULL : strdup(lang); + catd = malloc(sizeof (*catd)); + np = calloc(1, sizeof(struct catentry)); + + if (copy_name == NULL || copy_path == NULL || + (lang != NULL && copy_lang == NULL) || + catd == NULL || np == NULL) { + free(copy_name); + free(copy_path); + free(copy_lang); + free(catd); + free(np); munmap(data, (size_t)st.st_size); SAVEFAIL(name, lang, ENOMEM); NLRETERR(ENOMEM); @@ -442,16 +462,13 @@ load_msgcat(const char *path, const char *name, const catd->__size = (int)st.st_size; /* Caching opened catalog */ + np->name = copy_name; + np->path = copy_path; + np->catd = catd; + np->lang = copy_lang; + atomic_store_int(&np->refcount, 1); WLOCK(NLERR); - if ((np = malloc(sizeof(struct catentry))) != NULL) { - np->name = strdup(name); - np->path = strdup(path); - np->catd = catd; - np->lang = (lang == NULL) ? NULL : strdup(lang); - np->refcount = 1; - np->caterrno = 0; - SLIST_INSERT_HEAD(&cache, np, list); - } + SLIST_INSERT_HEAD(&cache, np, list); UNLOCK; return (catd); } From owner-svn-src-all@freebsd.org Thu Apr 23 06:55:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C817A2A9082; Thu, 23 Apr 2020 06:55:33 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4977Nj4xfGz4YJv; Thu, 23 Apr 2020 06:55:33 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4B4C304; Thu, 23 Apr 2020 06:55:33 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03N6tX5e033189; Thu, 23 Apr 2020 06:55:33 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03N6tXbk033188; Thu, 23 Apr 2020 06:55:33 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202004230655.03N6tXbk033188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 23 Apr 2020 06:55:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360217 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 360217 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 06:55:33 -0000 Author: melifaro Date: Thu Apr 23 06:55:33 2020 New Revision: 360217 URL: https://svnweb.freebsd.org/changeset/base/360217 Log: Unbreak LINT-NOINET[6] builds broken in r360191. Reported by: np Modified: head/sys/netinet/tcp_offload.c Modified: head/sys/netinet/tcp_offload.c ============================================================================== --- head/sys/netinet/tcp_offload.c Thu Apr 23 04:59:07 2020 (r360216) +++ head/sys/netinet/tcp_offload.c Thu Apr 23 06:55:33 2020 (r360217) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" +#include "opt_inet6.h" #include #include @@ -76,12 +77,19 @@ tcp_offload_connect(struct socket *so, struct sockaddr NET_EPOCH_ENTER(et); nh = NULL; +#ifdef INET if (nam->sa_family == AF_INET) nh = fib4_lookup(0, ((struct sockaddr_in *)nam)->sin_addr, NHR_NONE, 0, 0); - else if (nam->sa_family == AF_INET6) +#endif +#if defined(INET) && defined(INET6) + else +#endif +#ifdef INET6 + if (nam->sa_family == AF_INET6) nh = fib6_lookup(0, &((struct sockaddr_in6 *)nam)->sin6_addr, NHR_NONE, 0, 0); +#endif if (nh == NULL) { NET_EPOCH_EXIT(et); return (EHOSTUNREACH); From owner-svn-src-all@freebsd.org Thu Apr 23 08:04:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6801F2ABBEA; Thu, 23 Apr 2020 08:04:21 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4978w52WCnz4dKx; Thu, 23 Apr 2020 08:04:21 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FBAF10E6; Thu, 23 Apr 2020 08:04:21 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03N84LVT076186; Thu, 23 Apr 2020 08:04:21 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03N84KBJ076181; Thu, 23 Apr 2020 08:04:20 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202004230804.03N84KBJ076181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 23 Apr 2020 08:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360218 - in head/sys: net netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: net netinet6 X-SVN-Commit-Revision: 360218 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 08:04:21 -0000 Author: melifaro Date: Thu Apr 23 08:04:20 2020 New Revision: 360218 URL: https://svnweb.freebsd.org/changeset/base/360218 Log: Convert rtentry field accesses into nhop field accesses. One of the goals of the new routing KPI defined in r359823 is to entirely hide`struct rtentry` from the consumers. It will allow to improve routing subsystem internals and deliver more features much faster. This commit is mostly mechanical change to eliminate direct struct rtentry field accesses. The only notable difference is AF_LINK gateway encoding. AF_LINK gw is used in routing stack for operations with interface routes and host loopback routes. In the former case it indicates _some_ non-NULL gateway, as the interface is the same as in rt_ifp in kernel and rtm_ifindex in rtsock reporting. In the latter case the interface index inside gateway was used by the IPv6 datapath to verify address scope for link-local interfaces. Kernel uses struct sockaddr_dl for this type of gateway. This structure allows for specifying rich interface data, such as mac address and interface name. However, this results in relatively large structure size - 52 bytes. Routing stack fils in only 2 fields - sdl_index and sdl_type, which reside in the first 8 bytes of the structure. In the new KPI, struct nhop_object tries to be cache-efficient, hence embodies gateway address inside the structure. In the AF_LINK case it stores stortened version of the structure - struct sockaddr_dl_short, which occupies 16 bytes. After D24340 changes, the data inside AF_LINK gateway will not be used in the kernel at all, leaving rtsock as the only potential concern. The difference in rtsock reporting: (old) got message of size 240 on Thu Apr 16 03:12:13 2020 RTM_ADD: Add Route: len 240, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 10.0.0.0 link#5 255.255.255.0 (new) got message of size 200 on Sun Apr 19 09:46:32 2020 RTM_ADD: Add Route: len 200, pid: 0, seq 0, errno 0, flags: locks: inits: sockaddrs: 10.0.0.0 link#5 255.255.255.0 Note 40 bytes different (52-16 + alignment). However, gateway is still a valid AF_LINK gateway with proper data filled in. It is worth noting that these particular messages (interface routes) are mostly ignored by routing daemons: * bird/quagga/frr uses RTM_NEWADDR and ignores prefix route addition messages. * quagga/frr ignores routes without gateway More detailed overview on how rtsock messages are used by the routing daemons to reconstruct the kernel view, can be found in D22974. Differential Revision: https://reviews.freebsd.org/D24519 Modified: head/sys/net/radix_mpath.c head/sys/net/route.c head/sys/net/rtsock.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netinet6/nd6_rtr.c Modified: head/sys/net/radix_mpath.c ============================================================================== --- head/sys/net/radix_mpath.c Thu Apr 23 06:55:33 2020 (r360217) +++ head/sys/net/radix_mpath.c Thu Apr 23 08:04:20 2020 (r360218) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -110,22 +111,24 @@ struct rtentry * rt_mpath_matchgate(struct rtentry *rt, struct sockaddr *gate) { struct radix_node *rn; + struct nhop_object *nh; - if (!gate || !rt->rt_gateway) - return NULL; + if (gate == NULL) + return (NULL); /* beyond here, we use rn as the master copy */ rn = (struct radix_node *)rt; do { rt = (struct rtentry *)rn; + nh = rt->rt_nhop; /* - * we are removing an address alias that has + * we are removing an address alias that has * the same prefix as another address * we need to compare the interface address because - * rt_gateway is a special sockadd_dl structure + * gateway is a special sockaddr_dl structure */ - if (rt->rt_gateway->sa_family == AF_LINK) { - if (!memcmp(rt->rt_ifa->ifa_addr, gate, gate->sa_len)) + if (nh->gw_sa.sa_family == AF_LINK) { + if (!memcmp(nh->nh_ifa->ifa_addr, gate, gate->sa_len)) break; } @@ -134,8 +137,8 @@ rt_mpath_matchgate(struct rtentry *rt, struct sockaddr * 1) Routes with 'real' IPv4/IPv6 gateway * 2) Loopback host routes (another AF_LINK/sockadd_dl check) * */ - if (rt->rt_gateway->sa_len == gate->sa_len && - !memcmp(rt->rt_gateway, gate, gate->sa_len)) + if (nh->gw_sa.sa_len == gate->sa_len && + !memcmp(&nh->gw_sa, gate, gate->sa_len)) break; } while ((rn = rn_mpath_next(rn)) != NULL); Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Thu Apr 23 06:55:33 2020 (r360217) +++ head/sys/net/route.c Thu Apr 23 08:04:20 2020 (r360218) @@ -827,6 +827,7 @@ rt_exportinfo(struct rtentry *rt, struct rt_addrinfo * { struct rt_metrics *rmx; struct sockaddr *src, *dst; + struct nhop_object *nh; int sa_len; if (flags & NHR_COPY) { @@ -858,7 +859,7 @@ rt_exportinfo(struct rtentry *rt, struct rt_addrinfo * } /* Copy gateway is set && dst is non-zero */ - src = rt->rt_gateway; + src = &rt->rt_nhop->gw_sa; dst = info->rti_info[RTAX_GATEWAY]; if ((rt->rt_flags & RTF_GATEWAY) && src != NULL && dst != NULL){ if (src->sa_len > dst->sa_len) @@ -874,20 +875,21 @@ rt_exportinfo(struct rtentry *rt, struct rt_addrinfo * info->rti_addrs |= RTA_NETMASK; } if (rt->rt_flags & RTF_GATEWAY) { - info->rti_info[RTAX_GATEWAY] = rt->rt_gateway; + info->rti_info[RTAX_GATEWAY] = &rt->rt_nhop->gw_sa; info->rti_addrs |= RTA_GATEWAY; } } + nh = rt->rt_nhop; rmx = info->rti_rmx; if (rmx != NULL) { info->rti_mflags |= RTV_MTU; - rmx->rmx_mtu = rt->rt_mtu; + rmx->rmx_mtu = nh->nh_mtu; } - info->rti_flags = rt->rt_flags; - info->rti_ifp = rt->rt_ifp; - info->rti_ifa = rt->rt_ifa; + info->rti_flags = rt->rt_flags | nhop_get_rtflags(nh); + info->rti_ifp = nh->nh_ifp; + info->rti_ifa = nh->nh_ifa; if (flags & NHR_REF) { if_ref(info->rti_ifp); ifa_ref(info->rti_ifa); @@ -1021,7 +1023,7 @@ rt_checkdelroute(struct radix_node *rn, void *arg) info->rti_info[RTAX_DST] = rt_key(rt); info->rti_info[RTAX_NETMASK] = rt_mask(rt); - info->rti_info[RTAX_GATEWAY] = rt->rt_gateway; + info->rti_info[RTAX_GATEWAY] = &rt->rt_nhop->gw_sa; rt = rt_unlinkrte(di->rnh, info, &error); if (rt == NULL) { @@ -1216,7 +1218,7 @@ rt_unlinkrte(struct rib_head *rnh, struct rt_addrinfo * Ease the caller work by filling in remaining info * from that particular entry. */ - info->rti_info[RTAX_GATEWAY] = rt->rt_gateway; + info->rti_info[RTAX_GATEWAY] = &rt->rt_nhop->gw_sa; } /* @@ -1471,7 +1473,7 @@ rt_print(char *buf, int buflen, struct rtentry *rt) if (rt->rt_flags & RTF_GATEWAY) { buf[i++] = '>'; - i += p_sockaddr(buf + i, buflen - i, rt->rt_gateway); + i += p_sockaddr(buf + i, buflen - i, &rt->rt_nhop->gw_sa); } return (i); @@ -1528,8 +1530,8 @@ rt_mpath_unlink(struct rib_head *rnh, struct rt_addrin * one route in the chain. */ if (gw && - (rt->rt_gateway->sa_len != gw->sa_len || - memcmp(rt->rt_gateway, gw, gw->sa_len))) { + (rt->rt_nhop->gw_sa.sa_len != gw->sa_len || + memcmp(&rt->rt_nhop->gw_sa, gw, gw->sa_len))) { *perror = ESRCH; return (NULL); } @@ -2078,7 +2080,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi char tempbuf[_SOCKADDR_TMPSIZE]; int didwork = 0; int a_failure = 0; - struct sockaddr_dl *sdl = NULL; + struct sockaddr_dl_short *sdl = NULL; struct rib_head *rnh; if (flags & RTF_HOST) { @@ -2130,10 +2132,10 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi dst = (struct sockaddr *)tempbuf; } } else if (cmd == RTM_ADD) { - sdl = (struct sockaddr_dl *)tempbuf; - bzero(sdl, sizeof(struct sockaddr_dl)); + sdl = (struct sockaddr_dl_short *)tempbuf; + bzero(sdl, sizeof(struct sockaddr_dl_short)); sdl->sdl_family = AF_LINK; - sdl->sdl_len = sizeof(struct sockaddr_dl); + sdl->sdl_len = sizeof(struct sockaddr_dl_short); sdl->sdl_type = ifa->ifa_ifp->if_type; sdl->sdl_index = ifa->ifa_ifp->if_index; } @@ -2165,8 +2167,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi rt = RNTORT(rn); /* * for interface route the - * rt->rt_gateway is sockaddr_intf - * for cloning ARP entries, so + * rt->rt_gateway is sockaddr_dl, so * rt_mpath_matchgate must use the * interface address */ Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Thu Apr 23 06:55:33 2020 (r360217) +++ head/sys/net/rtsock.c Thu Apr 23 08:04:20 2020 (r360218) @@ -457,15 +457,15 @@ union sockaddr_union { static int rtm_get_jailed(struct rt_addrinfo *info, struct ifnet *ifp, - struct rtentry *rt, union sockaddr_union *saun, struct ucred *cred) + struct nhop_object *nh, union sockaddr_union *saun, struct ucred *cred) { #if defined(INET) || defined(INET6) struct epoch_tracker et; #endif /* First, see if the returned address is part of the jail. */ - if (prison_if(cred, rt->rt_ifa->ifa_addr) == 0) { - info->rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr; + if (prison_if(cred, nh->nh_ifa->ifa_addr) == 0) { + info->rti_info[RTAX_IFA] = nh->nh_ifa->ifa_addr; return (0); } @@ -499,7 +499,7 @@ rtm_get_jailed(struct rt_addrinfo *info, struct ifnet /* * As a last resort return the 'default' jail address. */ - ia = ((struct sockaddr_in *)rt->rt_ifa->ifa_addr)-> + ia = ((struct sockaddr_in *)nh->nh_ifa->ifa_addr)-> sin_addr; if (prison_get_ip4(cred, &ia) != 0) return (ESRCH); @@ -542,7 +542,7 @@ rtm_get_jailed(struct rt_addrinfo *info, struct ifnet /* * As a last resort return the 'default' jail address. */ - ia6 = ((struct sockaddr_in6 *)rt->rt_ifa->ifa_addr)-> + ia6 = ((struct sockaddr_in6 *)nh->nh_ifa->ifa_addr)-> sin6_addr; if (prison_get_ip6(cred, &ia6) != 0) return (ESRCH); @@ -635,7 +635,7 @@ fill_addrinfo(struct rt_msghdr *rtm, int len, u_int fi * is not reachable locally. This behavior is fixed as * part of the new L2/L3 redesign and rewrite work. The * signature of this interface address route is the - * AF_LINK sa_family type of the rt_gateway, and the + * AF_LINK sa_family type of the gateway, and the * rt_ifp has the IFF_LOOPBACK flag set. */ if (rib_lookup_info(fibnum, gdst, NHR_REF, 0, &ginfo) == 0) { @@ -711,12 +711,15 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, * the actual PPP host entry is found, perform * another search to retrieve the prefix route of * the local end point of the PPP link. + * TODO: move this logic to userland. */ if (rtm->rtm_flags & RTF_ANNOUNCE) { struct sockaddr laddr; + struct nhop_object *nh; - if (rt->rt_ifp != NULL && - rt->rt_ifp->if_type == IFT_PROPVIRTUAL) { + nh = rt->rt_nhop; + if (nh->nh_ifp != NULL && + nh->nh_ifp->if_type == IFT_PROPVIRTUAL) { struct epoch_tracker et; struct ifaddr *ifa; @@ -729,9 +732,9 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, &laddr, ifa->ifa_netmask); } else - rt_maskedcopy(rt->rt_ifa->ifa_addr, + rt_maskedcopy(nh->nh_ifa->ifa_addr, &laddr, - rt->rt_ifa->ifa_netmask); + nh->nh_ifa->ifa_netmask); /* * refactor rt and no lock operation necessary */ @@ -741,7 +744,7 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, RIB_RUNLOCK(rnh); return (ESRCH); } - } + } RT_LOCK(rt); RT_ADDREF(rt); RIB_RUNLOCK(rnh); @@ -768,6 +771,7 @@ update_rtm_from_rte(struct rt_addrinfo *info, struct r struct walkarg w; union sockaddr_union saun; struct rt_msghdr *rtm, *orig_rtm = NULL; + struct nhop_object *nh; struct ifnet *ifp; int error, len; @@ -775,23 +779,24 @@ update_rtm_from_rte(struct rt_addrinfo *info, struct r rtm = *prtm; + nh = rt->rt_nhop; info->rti_info[RTAX_DST] = rt_key(rt); - info->rti_info[RTAX_GATEWAY] = rt->rt_gateway; + info->rti_info[RTAX_GATEWAY] = &nh->gw_sa; info->rti_info[RTAX_NETMASK] = rtsock_fix_netmask(rt_key(rt), rt_mask(rt), &netmask_ss); info->rti_info[RTAX_GENMASK] = 0; - ifp = rt->rt_ifp; + ifp = nh->nh_ifp; if (rtm->rtm_addrs & (RTA_IFP | RTA_IFA)) { if (ifp) { info->rti_info[RTAX_IFP] = ifp->if_addr->ifa_addr; - error = rtm_get_jailed(info, ifp, rt, + error = rtm_get_jailed(info, ifp, nh, &saun, curthread->td_ucred); if (error != 0) return (error); if (ifp->if_flags & IFF_POINTOPOINT) info->rti_info[RTAX_BRD] = - rt->rt_ifa->ifa_dstaddr; + nh->nh_ifa->ifa_dstaddr; rtm->rtm_index = ifp->if_index; } else { info->rti_info[RTAX_IFP] = NULL; @@ -1075,7 +1080,7 @@ rt_getmetrics(const struct rtentry *rt, struct rt_metr { bzero(out, sizeof(*out)); - out->rmx_mtu = rt->rt_mtu; + out->rmx_mtu = rt->rt_nhop->nh_mtu; out->rmx_weight = rt->rt_weight; out->rmx_pksent = counter_u64_fetch(rt->rt_pksent); out->rmx_nhidx = nhop_get_idx(rt->rt_nhop); @@ -1496,7 +1501,7 @@ rtsock_routemsg(int cmd, struct rtentry *rt, struct if bzero((caddr_t)&info, sizeof(info)); info.rti_info[RTAX_DST] = rt_key(rt); info.rti_info[RTAX_NETMASK] = rtsock_fix_netmask(rt_key(rt), rt_mask(rt), &ss); - info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; + info.rti_info[RTAX_GATEWAY] = &rt->rt_nhop->gw_sa; info.rti_flags = rt->rt_flags; info.rti_ifp = ifp; @@ -1725,7 +1730,7 @@ sysctl_dumpentry(struct radix_node *rn, void *vw) return (0); bzero((caddr_t)&info, sizeof(info)); info.rti_info[RTAX_DST] = rt_key(rt); - info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; + info.rti_info[RTAX_GATEWAY] = &rt->rt_nhop->gw_sa; info.rti_info[RTAX_NETMASK] = rtsock_fix_netmask(rt_key(rt), rt_mask(rt), &ss); info.rti_info[RTAX_GENMASK] = 0; @@ -2244,7 +2249,7 @@ rt_dumpentry_ddb(struct radix_node *rn, void *arg __un rt = (void *)rn; rt_dumpaddr_ddb("dst", rt_key(rt)); - rt_dumpaddr_ddb("gateway", rt->rt_gateway); + rt_dumpaddr_ddb("gateway", &rt->rt_nhop->gw_sa); rt_dumpaddr_ddb("netmask", rtsock_fix_netmask(rt_key(rt), rt_mask(rt), &ss)); if (rt->rt_ifp != NULL && (rt->rt_ifp->if_flags & IFF_DYING) == 0) { Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Thu Apr 23 06:55:33 2020 (r360217) +++ head/sys/netinet6/nd6.c Thu Apr 23 08:04:20 2020 (r360218) @@ -1565,29 +1565,26 @@ nd6_rtrequest(int req, struct rtentry *rt, struct rt_a { struct sockaddr_in6 *gateway; struct nd_defrouter *dr; - struct ifnet *ifp; + struct nhop_object *nh; - gateway = (struct sockaddr_in6 *)rt->rt_gateway; - ifp = rt->rt_ifp; + nh = rt->rt_nhop; + gateway = &nh->gw6_sa; switch (req) { case RTM_ADD: break; case RTM_DELETE: - if (!ifp) - return; /* * Only indirect routes are interesting. */ - if ((rt->rt_flags & RTF_GATEWAY) == 0) + if ((nh->nh_flags & NHF_GATEWAY) == 0) return; /* * check for default route */ - if (IN6_ARE_ADDR_EQUAL(&in6addr_any, - &SIN6(rt_key(rt))->sin6_addr)) { - dr = defrouter_lookup(&gateway->sin6_addr, ifp); + if (nh->nh_flags & NHF_DEFAULT) { + dr = defrouter_lookup(&gateway->sin6_addr, nh->nh_ifp); if (dr != NULL) { dr->installed = 0; defrouter_rele(dr); Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Thu Apr 23 06:55:33 2020 (r360217) +++ head/sys/netinet6/nd6.h Thu Apr 23 08:04:20 2020 (r360218) @@ -401,8 +401,9 @@ void nd6_dad_stop(struct ifaddr *); void nd6_rs_input(struct mbuf *, int, int); void nd6_ra_input(struct mbuf *, int, int); void nd6_ifnet_link_event(void *, struct ifnet *, int); -struct nd_defrouter *defrouter_lookup(struct in6_addr *, struct ifnet *); -struct nd_defrouter *defrouter_lookup_locked(struct in6_addr *, struct ifnet *); +struct nd_defrouter *defrouter_lookup(const struct in6_addr *, struct ifnet *); +struct nd_defrouter *defrouter_lookup_locked(const struct in6_addr *, + struct ifnet *); void defrouter_reset(void); void defrouter_select_fib(int fibnum); void defrouter_rele(struct nd_defrouter *); Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Thu Apr 23 06:55:33 2020 (r360217) +++ head/sys/netinet6/nd6_rtr.c Thu Apr 23 08:04:20 2020 (r360218) @@ -784,7 +784,7 @@ defrouter_del(struct nd_defrouter *dr) struct nd_defrouter * -defrouter_lookup_locked(struct in6_addr *addr, struct ifnet *ifp) +defrouter_lookup_locked(const struct in6_addr *addr, struct ifnet *ifp) { struct nd_defrouter *dr; @@ -798,7 +798,7 @@ defrouter_lookup_locked(struct in6_addr *addr, struct } struct nd_defrouter * -defrouter_lookup(struct in6_addr *addr, struct ifnet *ifp) +defrouter_lookup(const struct in6_addr *addr, struct ifnet *ifp) { struct nd_defrouter *dr; @@ -2006,7 +2006,7 @@ restart: static int nd6_prefix_onlink_rtrequest(struct nd_prefix *pr, struct ifaddr *ifa) { - struct sockaddr_dl sdl; + struct sockaddr_dl_short sdl; struct rtentry *rt; struct sockaddr_in6 mask6; u_long rtflags; @@ -2021,8 +2021,8 @@ nd6_prefix_onlink_rtrequest(struct nd_prefix *pr, stru mask6.sin6_addr = pr->ndpr_mask; rtflags = (ifa->ifa_flags & ~IFA_RTSELF) | RTF_UP; - bzero(&sdl, sizeof(struct sockaddr_dl)); - sdl.sdl_len = sizeof(struct sockaddr_dl); + bzero(&sdl, sizeof(struct sockaddr_dl_short)); + sdl.sdl_len = sizeof(struct sockaddr_dl_short); sdl.sdl_family = AF_LINK; sdl.sdl_type = ifa->ifa_ifp->if_type; sdl.sdl_index = ifa->ifa_ifp->if_index; From owner-svn-src-all@freebsd.org Thu Apr 23 09:37:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DFDCF2AF5D7; Thu, 23 Apr 2020 09:37:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497BzQ3qpFz4l73; Thu, 23 Apr 2020 09:37:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EB912256; Thu, 23 Apr 2020 09:37:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03N9bMh5032631; Thu, 23 Apr 2020 09:37:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03N9bMoW032630; Thu, 23 Apr 2020 09:37:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202004230937.03N9bMoW032630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Apr 2020 09:37:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360219 - head/sys/nlm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/nlm X-SVN-Commit-Revision: 360219 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 09:37:22 -0000 Author: kib Date: Thu Apr 23 09:37:22 2020 New Revision: 360219 URL: https://svnweb.freebsd.org/changeset/base/360219 Log: Make nfslockd depend on xdr. This is needed after r360036. Reported by: netchild Sponsored by: The FreeBSD Foundation Modified: head/sys/nlm/nlm_prot_impl.c Modified: head/sys/nlm/nlm_prot_impl.c ============================================================================== --- head/sys/nlm/nlm_prot_impl.c Thu Apr 23 08:04:20 2020 (r360218) +++ head/sys/nlm/nlm_prot_impl.c Thu Apr 23 09:37:22 2020 (r360219) @@ -2410,6 +2410,7 @@ static moduledata_t nfslockd_mod = { DECLARE_MODULE(nfslockd, nfslockd_mod, SI_SUB_VFS, SI_ORDER_ANY); /* So that loader and kldload(2) can find us, wherever we are.. */ +MODULE_DEPEND(nfslockd, xdr, 1, 1, 1); MODULE_DEPEND(nfslockd, krpc, 1, 1, 1); MODULE_DEPEND(nfslockd, nfscommon, 1, 1, 1); MODULE_VERSION(nfslockd, 1); From owner-svn-src-all@freebsd.org Thu Apr 23 09:48:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 605512AFC03; Thu, 23 Apr 2020 09:48:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497CCl1vGFz4lhr; Thu, 23 Apr 2020 09:48:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A9E1244F; Thu, 23 Apr 2020 09:48:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03N9m3Pl038783; Thu, 23 Apr 2020 09:48:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03N9m3d0038782; Thu, 23 Apr 2020 09:48:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202004230948.03N9m3d0038782@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 23 Apr 2020 09:48:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360220 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 360220 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 09:48:03 -0000 Author: kib Date: Thu Apr 23 09:48:02 2020 New Revision: 360220 URL: https://svnweb.freebsd.org/changeset/base/360220 Log: MFC r359758: libc: Fix possible overflow in binuptime(). Modified: stable/12/lib/libc/sys/__vdso_gettimeofday.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/__vdso_gettimeofday.c ============================================================================== --- stable/12/lib/libc/sys/__vdso_gettimeofday.c Thu Apr 23 09:37:22 2020 (r360219) +++ stable/12/lib/libc/sys/__vdso_gettimeofday.c Thu Apr 23 09:48:02 2020 (r360220) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include "libc_private.h" @@ -62,7 +63,8 @@ binuptime(struct bintime *bt, struct vdso_timekeep *tk { struct vdso_timehands *th; uint32_t curr, gen; - u_int delta; + uint64_t scale, x; + u_int delta, scale_bits; int error; do { @@ -78,7 +80,19 @@ binuptime(struct bintime *bt, struct vdso_timekeep *tk continue; if (error != 0) return (error); - bintime_addx(bt, th->th_scale * delta); + scale = th->th_scale; +#ifdef _LP64 + scale_bits = ffsl(scale); +#else + scale_bits = ffsll(scale); +#endif + if (__predict_false(scale_bits + fls(delta) > 63)) { + x = (scale >> 32) * delta; + scale &= 0xffffffff; + bt->sec += x >> 32; + bintime_addx(bt, x << 32); + } + bintime_addx(bt, scale * delta); if (abs) bintime_add(bt, &th->th_boottime); From owner-svn-src-all@freebsd.org Thu Apr 23 13:46:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF8D02B6CFE; Thu, 23 Apr 2020 13:46:50 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497JWG4wL9z3HS4; Thu, 23 Apr 2020 13:46:50 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0DE7555A; Thu, 23 Apr 2020 13:46:50 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NDkoor087348; Thu, 23 Apr 2020 13:46:50 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NDkYIt087333; Thu, 23 Apr 2020 13:46:34 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202004231346.03NDkYIt087333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 23 Apr 2020 13:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360221 - in head/contrib/sqlite3: . tea tea/generic tea/win X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/contrib/sqlite3: . tea tea/generic tea/win X-SVN-Commit-Revision: 360221 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 13:46:50 -0000 Author: cy Date: Thu Apr 23 13:46:34 2020 New Revision: 360221 URL: https://svnweb.freebsd.org/changeset/base/360221 Log: In preparation for update to sqlite3-3.31.1 (3310100), recommit r357201: MFV r357163, which was reverted by r357522 due to segfault under PowerPc. Update sqlite3-3.30.1 (3300100) --> sqlite3-3.31.0 (3310000) MFC after: 1 month Modified: head/contrib/sqlite3/Makefile.msc head/contrib/sqlite3/configure head/contrib/sqlite3/configure.ac head/contrib/sqlite3/shell.c head/contrib/sqlite3/sqlite3.c head/contrib/sqlite3/sqlite3.h head/contrib/sqlite3/sqlite3ext.h head/contrib/sqlite3/tea/configure head/contrib/sqlite3/tea/configure.ac head/contrib/sqlite3/tea/generic/tclsqlite3.c head/contrib/sqlite3/tea/win/makefile.vc Modified: head/contrib/sqlite3/Makefile.msc ============================================================================== --- head/contrib/sqlite3/Makefile.msc Thu Apr 23 09:48:02 2020 (r360220) +++ head/contrib/sqlite3/Makefile.msc Thu Apr 23 13:46:34 2020 (r360221) @@ -210,6 +210,12 @@ OPTIMIZATIONS = 2 SESSION = 0 !ENDIF +# Set this to non-0 to enable support for the rbu extension. +# +!IFNDEF RBU +RBU = 0 +!ENDIF + # Set the source code file to be used by executables and libraries when # they need the amalgamation. # @@ -282,7 +288,6 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENAB OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1 -OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_INTROSPECTION_PRAGMAS=1 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DESERIALIZE=1 !ENDIF OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1 @@ -296,6 +301,13 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENAB OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1 !ENDIF +# Should the rbu extension be enabled? If so, add compilation options +# to enable it. +# +!IF $(RBU)!=0 +OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1 +!ENDIF + # These are the "extended" SQLite compilation options used when compiling for # the Windows 10 platform. # @@ -978,7 +990,7 @@ Replace.exe: sqlite3.def: Replace.exe $(LIBOBJ) echo EXPORTS > sqlite3.def dumpbin /all $(LIBOBJ) \ - | .\Replace.exe "^\s+/EXPORT:_?(sqlite3(?:session|changeset|changegroup|rebaser)?_[^@,]*)(?:@\d+|,DATA)?$$" $$1 true \ + | .\Replace.exe "^\s+/EXPORT:_?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@,]*)(?:@\d+|,DATA)?$$" $$1 true \ | sort >> sqlite3.def $(SQLITE3EXE): shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H) Modified: head/contrib/sqlite3/configure ============================================================================== --- head/contrib/sqlite3/configure Thu Apr 23 09:48:02 2020 (r360220) +++ head/contrib/sqlite3/configure Thu Apr 23 13:46:34 2020 (r360221) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.30.1. +# Generated by GNU Autoconf 2.69 for sqlite 3.31.0. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.30.1' -PACKAGE_STRING='sqlite 3.30.1' +PACKAGE_VERSION='3.31.0' +PACKAGE_STRING='sqlite 3.31.0' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.30.1 to adapt to many kinds of systems. +\`configure' configures sqlite 3.31.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1412,7 +1412,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.30.1:";; + short | recursive ) echo "Configuration of sqlite 3.31.0:";; esac cat <<\_ACEOF @@ -1537,7 +1537,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.30.1 +sqlite configure 3.31.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.30.1, which was +It was created by sqlite $as_me 3.31.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2818,7 +2818,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.30.1' + VERSION='3.31.0' cat >>confdefs.h <<_ACEOF @@ -13653,7 +13653,7 @@ else fi if test x"$enable_rtree" = "xyes"; then - BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_ENABLE_RTREE" + BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY" fi #----------------------------------------------------------------------- @@ -14438,7 +14438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.30.1, which was +This file was extended by sqlite $as_me 3.31.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14495,7 +14495,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.30.1 +sqlite config.status 3.31.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/sqlite3/configure.ac ============================================================================== --- head/contrib/sqlite3/configure.ac Thu Apr 23 09:48:02 2020 (r360220) +++ head/contrib/sqlite3/configure.ac Thu Apr 23 13:46:34 2020 (r360221) @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.30.1, http://www.sqlite.org) +AC_INIT(sqlite, 3.31.0, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) @@ -161,7 +161,7 @@ AC_ARG_ENABLE(rtree, [AS_HELP_STRING( [--enable-rtree], [include rtree support [default=yes]])], [], [enable_rtree=yes]) if test x"$enable_rtree" = "xyes"; then - BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_ENABLE_RTREE" + BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY" fi #----------------------------------------------------------------------- Modified: head/contrib/sqlite3/shell.c ============================================================================== --- head/contrib/sqlite3/shell.c Thu Apr 23 09:48:02 2020 (r360220) +++ head/contrib/sqlite3/shell.c Thu Apr 23 13:46:34 2020 (r360221) @@ -2007,19 +2007,23 @@ int sqlite3_shathree_init( int rc = SQLITE_OK; SQLITE_EXTENSION_INIT2(pApi); (void)pzErrMsg; /* Unused parameter */ - rc = sqlite3_create_function(db, "sha3", 1, SQLITE_UTF8, 0, - sha3Func, 0, 0); + rc = sqlite3_create_function(db, "sha3", 1, + SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC, + 0, sha3Func, 0, 0); if( rc==SQLITE_OK ){ - rc = sqlite3_create_function(db, "sha3", 2, SQLITE_UTF8, 0, - sha3Func, 0, 0); + rc = sqlite3_create_function(db, "sha3", 2, + SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC, + 0, sha3Func, 0, 0); } if( rc==SQLITE_OK ){ - rc = sqlite3_create_function(db, "sha3_query", 1, SQLITE_UTF8, 0, - sha3QueryFunc, 0, 0); + rc = sqlite3_create_function(db, "sha3_query", 1, + SQLITE_UTF8 | SQLITE_DIRECTONLY, + 0, sha3QueryFunc, 0, 0); } if( rc==SQLITE_OK ){ - rc = sqlite3_create_function(db, "sha3_query", 2, SQLITE_UTF8, 0, - sha3QueryFunc, 0, 0); + rc = sqlite3_create_function(db, "sha3_query", 2, + SQLITE_UTF8 | SQLITE_DIRECTONLY, + 0, sha3QueryFunc, 0, 0); } return rc; } @@ -2613,6 +2617,7 @@ static int fsdirConnect( pNew = (fsdir_tab*)sqlite3_malloc( sizeof(*pNew) ); if( pNew==0 ) return SQLITE_NOMEM; memset(pNew, 0, sizeof(*pNew)); + sqlite3_vtab_config(db, SQLITE_VTAB_DIRECTONLY); } *ppVtab = (sqlite3_vtab*)pNew; return rc; @@ -3006,10 +3011,12 @@ int sqlite3_fileio_init( int rc = SQLITE_OK; SQLITE_EXTENSION_INIT2(pApi); (void)pzErrMsg; /* Unused parameter */ - rc = sqlite3_create_function(db, "readfile", 1, SQLITE_UTF8, 0, + rc = sqlite3_create_function(db, "readfile", 1, + SQLITE_UTF8|SQLITE_DIRECTONLY, 0, readfileFunc, 0, 0); if( rc==SQLITE_OK ){ - rc = sqlite3_create_function(db, "writefile", -1, SQLITE_UTF8, 0, + rc = sqlite3_create_function(db, "writefile", -1, + SQLITE_UTF8|SQLITE_DIRECTONLY, 0, writefileFunc, 0, 0); } if( rc==SQLITE_OK ){ @@ -3144,6 +3151,7 @@ static int completionConnect( #define COMPLETION_COLUMN_WHOLELINE 2 /* Entire line seen so far */ #define COMPLETION_COLUMN_PHASE 3 /* ePhase - used for debugging only */ + sqlite3_vtab_config(db, SQLITE_VTAB_INNOCUOUS); rc = sqlite3_declare_vtab(db, "CREATE TABLE x(" " candidate TEXT," @@ -4578,6 +4586,7 @@ static int zipfileConnect( zipfileDequote(pNew->zFile); } } + sqlite3_vtab_config(db, SQLITE_VTAB_DIRECTONLY); *ppVtab = (sqlite3_vtab*)pNew; return rc; } @@ -5190,25 +5199,25 @@ static int zipfileDeflate( u8 **ppOut, int *pnOut, /* Output */ char **pzErr /* OUT: Error message */ ){ - sqlite3_int64 nAlloc = compressBound(nIn); - u8 *aOut; int rc = SQLITE_OK; + sqlite3_int64 nAlloc; + z_stream str; + u8 *aOut; + memset(&str, 0, sizeof(str)); + str.next_in = (Bytef*)aIn; + str.avail_in = nIn; + deflateInit2(&str, 9, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY); + + nAlloc = deflateBound(&str, nIn); aOut = (u8*)sqlite3_malloc64(nAlloc); if( aOut==0 ){ rc = SQLITE_NOMEM; }else{ int res; - z_stream str; - memset(&str, 0, sizeof(str)); - str.next_in = (Bytef*)aIn; - str.avail_in = nIn; str.next_out = aOut; str.avail_out = nAlloc; - - deflateInit2(&str, 9, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY); res = deflate(&str, Z_FINISH); - if( res==Z_STREAM_END ){ *ppOut = aOut; *pnOut = (int)str.total_out; @@ -5517,10 +5526,10 @@ static int zipfileBestIndex( idx = i; } } + pIdxInfo->estimatedCost = 1000.0; if( idx>=0 ){ pIdxInfo->aConstraintUsage[idx].argvIndex = 1; pIdxInfo->aConstraintUsage[idx].omit = 1; - pIdxInfo->estimatedCost = 1000.0; pIdxInfo->idxNum = 1; }else if( unusable ){ return SQLITE_CONSTRAINT; @@ -5642,8 +5651,8 @@ static int zipfileGetMode( ** identical, ignoring any trailing '/' character in either path. */ static int zipfileComparePath(const char *zA, const char *zB, int nB){ int nA = (int)strlen(zA); - if( zA[nA-1]=='/' ) nA--; - if( zB[nB-1]=='/' ) nB--; + if( nA>0 && zA[nA-1]=='/' ) nA--; + if( nB>0 && zB[nB-1]=='/' ) nB--; if( nA==nB && memcmp(zA, zB, nA)==0 ) return 0; return 1; } @@ -5653,6 +5662,10 @@ static int zipfileBegin(sqlite3_vtab *pVtab){ int rc = SQLITE_OK; assert( pTab->pWriteFd==0 ); + if( pTab->zFile==0 || pTab->zFile[0]==0 ){ + pTab->base.zErrMsg = sqlite3_mprintf("zipfile: missing filename"); + return SQLITE_ERROR; + } /* Open a write fd on the file. Also load the entire central directory ** structure into memory. During the transaction any new file data is @@ -5827,6 +5840,7 @@ static int zipfileUpdate( if( rc==SQLITE_OK ){ zPath = (const char*)sqlite3_value_text(apVal[2]); + if( zPath==0 ) zPath = ""; nPath = (int)strlen(zPath); mTime = zipfileGetTime(apVal[4]); } @@ -5836,11 +5850,15 @@ static int zipfileUpdate( ** '/'. This appears to be required for compatibility with info-zip ** (the unzip command on unix). It does not create directories ** otherwise. */ - if( zPath[nPath-1]!='/' ){ + if( nPath<=0 || zPath[nPath-1]!='/' ){ zFree = sqlite3_mprintf("%s/", zPath); - if( zFree==0 ){ rc = SQLITE_NOMEM; } zPath = (const char*)zFree; - nPath++; + if( zFree==0 ){ + rc = SQLITE_NOMEM; + nPath = 0; + }else{ + nPath = (int)strlen(zPath); + } } } @@ -6233,19 +6251,19 @@ void zipfileStep(sqlite3_context *pCtx, int nVal, sqli ** at the end of the path. Or, if this is not a directory and the path ** ends in '/' it is an error. */ if( bIsDir==0 ){ - if( zName[nName-1]=='/' ){ + if( nName>0 && zName[nName-1]=='/' ){ zErr = sqlite3_mprintf("non-directory name must not end with /"); rc = SQLITE_ERROR; goto zipfile_step_out; } }else{ - if( zName[nName-1]!='/' ){ + if( nName==0 || zName[nName-1]!='/' ){ zName = zFree = sqlite3_mprintf("%s/", zName); - nName++; if( zName==0 ){ rc = SQLITE_NOMEM; goto zipfile_step_out; } + nName = (int)strlen(zName); }else{ while( nName>1 && zName[nName-2]=='/' ) nName--; } @@ -6501,10 +6519,12 @@ int sqlite3_sqlar_init( int rc = SQLITE_OK; SQLITE_EXTENSION_INIT2(pApi); (void)pzErrMsg; /* Unused parameter */ - rc = sqlite3_create_function(db, "sqlar_compress", 1, SQLITE_UTF8, 0, + rc = sqlite3_create_function(db, "sqlar_compress", 1, + SQLITE_UTF8|SQLITE_INNOCUOUS, 0, sqlarCompressFunc, 0, 0); if( rc==SQLITE_OK ){ - rc = sqlite3_create_function(db, "sqlar_uncompress", 2, SQLITE_UTF8, 0, + rc = sqlite3_create_function(db, "sqlar_uncompress", 2, + SQLITE_UTF8|SQLITE_INNOCUOUS, 0, sqlarUncompressFunc, 0, 0); } return rc; @@ -6525,8 +6545,8 @@ int sqlite3_sqlar_init( ** ************************************************************************* */ - - +#if !defined(SQLITEEXPERT_H) +#define SQLITEEXPERT_H 1 /* #include "sqlite3.h" */ typedef struct sqlite3expert sqlite3expert; @@ -6680,8 +6700,8 @@ const char *sqlite3_expert_report(sqlite3expert*, int */ void sqlite3_expert_destroy(sqlite3expert*); +#endif /* !defined(SQLITEEXPERT_H) */ - /************************* End ../ext/expert/sqlite3expert.h ********************/ /************************* Begin ../ext/expert/sqlite3expert.c ******************/ /* @@ -9566,6 +9586,7 @@ struct ShellState { int outCount; /* Revert to stdout when reaching zero */ int cnt; /* Number of records displayed so far */ int lineno; /* Line number of last line read from in */ + int openFlags; /* Additional flags to open. (SQLITE_OPEN_NOFOLLOW) */ FILE *in; /* Read commands from this stream */ FILE *out; /* Write results here */ FILE *traceOut; /* Output for sqlite3_trace() */ @@ -10400,19 +10421,22 @@ static int shell_callback( const int *colWidth; int showHdr; char *rowSep; + int nWidth; if( p->cMode==MODE_Column ){ colWidth = p->colWidth; + nWidth = ArraySize(p->colWidth); showHdr = p->showHeader; rowSep = p->rowSeparator; }else{ colWidth = aExplainWidths; + nWidth = ArraySize(aExplainWidths); showHdr = 1; rowSep = SEP_Row; } if( p->cnt++==0 ){ for(i=0; icolWidth) ){ + if( idb, SQLITE_DBCONFIG_DEFENSIVE, -1, &defensiveMode); + sqlite3_db_config(p->db, SQLITE_DBCONFIG_DEFENSIVE, 0, 0); sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, -1, &wrSchema); sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, 1, 0); sqlite3_exec(p->db, @@ -11311,6 +11338,7 @@ static void bind_table_init(ShellState *p){ ") WITHOUT ROWID;", 0, 0, 0); sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, wrSchema, 0); + sqlite3_db_config(p->db, SQLITE_DBCONFIG_DEFENSIVE, defensiveMode, 0); } /* @@ -12053,9 +12081,7 @@ static const char *(azHelp[]) = { ".excel Display the output of next command in spreadsheet", ".exit ?CODE? Exit this program with return-code CODE", ".expert EXPERIMENTAL. Suggest indexes for queries", -/* Because explain mode comes on automatically now, the ".explain" mode -** is removed from the help screen. It is still supported for legacy, however */ -/*".explain ?on|off|auto? Turn EXPLAIN output mode on or off",*/ + ".explain ?on|off|auto? Change the EXPLAIN formatting mode. Default: auto", ".filectrl CMD ... Run various sqlite3_file_control() operations", " Run \".filectrl\" with no arguments for details", ".fullschema ?--indent? Show schema and the content of sqlite_stat tables", @@ -12106,6 +12132,7 @@ static const char *(azHelp[]) = { " --maxsize N Maximum size for --hexdb or --deserialized database", #endif " --new Initialize FILE to an empty database", + " --nofollow Do not follow symbolic links", " --readonly Open FILE readonly", " --zip FILE is a ZIP archive", ".output ?FILE? Send output to FILE or stdout if FILE is omitted", @@ -12670,7 +12697,7 @@ static void open_db(ShellState *p, int openFlags){ switch( p->openMode ){ case SHELL_OPEN_APPENDVFS: { sqlite3_open_v2(p->zDbFilename, &p->db, - SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, "apndvfs"); + SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|p->openFlags, "apndvfs"); break; } case SHELL_OPEN_HEXDB: @@ -12683,12 +12710,14 @@ static void open_db(ShellState *p, int openFlags){ break; } case SHELL_OPEN_READONLY: { - sqlite3_open_v2(p->zDbFilename, &p->db, SQLITE_OPEN_READONLY, 0); + sqlite3_open_v2(p->zDbFilename, &p->db, + SQLITE_OPEN_READONLY|p->openFlags, 0); break; } case SHELL_OPEN_UNSPEC: case SHELL_OPEN_NORMAL: { - sqlite3_open(p->zDbFilename, &p->db); + sqlite3_open_v2(p->zDbFilename, &p->db, + SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|p->openFlags, 0); break; } } @@ -13462,7 +13491,7 @@ static unsigned int get4byteInt(unsigned char *a){ } /* -** Implementation of the ".info" command. +** Implementation of the ".dbinfo" command. ** ** Return 1 on error, 2 to exit, and 0 otherwise. */ @@ -15699,20 +15728,22 @@ static int do_meta_command(char *zLine, ShellState *p) const char *zName; int op; } aDbConfig[] = { + { "defensive", SQLITE_DBCONFIG_DEFENSIVE }, + { "dqs_ddl", SQLITE_DBCONFIG_DQS_DDL }, + { "dqs_dml", SQLITE_DBCONFIG_DQS_DML }, { "enable_fkey", SQLITE_DBCONFIG_ENABLE_FKEY }, + { "enable_qpsg", SQLITE_DBCONFIG_ENABLE_QPSG }, { "enable_trigger", SQLITE_DBCONFIG_ENABLE_TRIGGER }, { "enable_view", SQLITE_DBCONFIG_ENABLE_VIEW }, { "fts3_tokenizer", SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER }, + { "legacy_alter_table", SQLITE_DBCONFIG_LEGACY_ALTER_TABLE }, + { "legacy_file_format", SQLITE_DBCONFIG_LEGACY_FILE_FORMAT }, { "load_extension", SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION }, { "no_ckpt_on_close", SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE }, - { "enable_qpsg", SQLITE_DBCONFIG_ENABLE_QPSG }, - { "trigger_eqp", SQLITE_DBCONFIG_TRIGGER_EQP }, { "reset_database", SQLITE_DBCONFIG_RESET_DATABASE }, - { "defensive", SQLITE_DBCONFIG_DEFENSIVE }, + { "trigger_eqp", SQLITE_DBCONFIG_TRIGGER_EQP }, + { "trusted_schema", SQLITE_DBCONFIG_TRUSTED_SCHEMA }, { "writable_schema", SQLITE_DBCONFIG_WRITABLE_SCHEMA }, - { "legacy_alter_table", SQLITE_DBCONFIG_LEGACY_ALTER_TABLE }, - { "dqs_dml", SQLITE_DBCONFIG_DQS_DML }, - { "dqs_ddl", SQLITE_DBCONFIG_DQS_DDL }, }; int ii, v; open_db(p, 0); @@ -15722,7 +15753,7 @@ static int do_meta_command(char *zLine, ShellState *p) sqlite3_db_config(p->db, aDbConfig[ii].op, booleanValue(azArg[2]), 0); } sqlite3_db_config(p->db, aDbConfig[ii].op, -1, &v); - utf8_printf(p->out, "%18s %s\n", aDbConfig[ii].zName, v ? "on" : "off"); + utf8_printf(p->out, "%19s %s\n", aDbConfig[ii].zName, v ? "on" : "off"); if( nArg>1 ) break; } if( nArg>1 && ii==ArraySize(aDbConfig) ){ @@ -16303,10 +16334,19 @@ static int do_meta_command(char *zLine, ShellState *p) char *zCollist = 0; sqlite3_stmt *pStmt; int tnum = 0; + int isWO = 0; /* True if making an imposter of a WITHOUT ROWID table */ + int lenPK = 0; /* Length of the PRIMARY KEY string for isWO tables */ int i; if( !(nArg==3 || (nArg==2 && sqlite3_stricmp(azArg[1],"off")==0)) ){ utf8_printf(stderr, "Usage: .imposter INDEX IMPOSTER\n" " .imposter off\n"); + /* Also allowed, but not documented: + ** + ** .imposter TABLE IMPOSTER + ** + ** where TABLE is a WITHOUT ROWID table. In that case, the + ** imposter is another WITHOUT ROWID table with the columns in + ** storage order. */ rc = 1; goto meta_command_exit; } @@ -16315,19 +16355,22 @@ static int do_meta_command(char *zLine, ShellState *p) sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->db, "main", 0, 1); goto meta_command_exit; } - zSql = sqlite3_mprintf("SELECT rootpage FROM sqlite_master" - " WHERE name='%q' AND type='index'", azArg[1]); + zSql = sqlite3_mprintf( + "SELECT rootpage, 0 FROM sqlite_master" + " WHERE name='%q' AND type='index'" + "UNION ALL " + "SELECT rootpage, 1 FROM sqlite_master" + " WHERE name='%q' AND type='table'" + " AND sql LIKE '%%without%%rowid%%'", + azArg[1], azArg[1] + ); sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0); sqlite3_free(zSql); if( sqlite3_step(pStmt)==SQLITE_ROW ){ tnum = sqlite3_column_int(pStmt, 0); + isWO = sqlite3_column_int(pStmt, 1); } sqlite3_finalize(pStmt); - if( tnum==0 ){ - utf8_printf(stderr, "no such index: \"%s\"\n", azArg[1]); - rc = 1; - goto meta_command_exit; - } zSql = sqlite3_mprintf("PRAGMA index_xinfo='%q'", azArg[1]); rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0); sqlite3_free(zSql); @@ -16344,6 +16387,9 @@ static int do_meta_command(char *zLine, ShellState *p) zCol = zLabel; } } + if( isWO && lenPK==0 && sqlite3_column_int(pStmt,5)==0 && zCollist ){ + lenPK = (int)strlen(zCollist); + } if( zCollist==0 ){ zCollist = sqlite3_mprintf("\"%w\"", zCol); }else{ @@ -16351,9 +16397,16 @@ static int do_meta_command(char *zLine, ShellState *p) } } sqlite3_finalize(pStmt); + if( i==0 || tnum==0 ){ + utf8_printf(stderr, "no such index: \"%s\"\n", azArg[1]); + rc = 1; + sqlite3_free(zCollist); + goto meta_command_exit; + } + if( lenPK==0 ) lenPK = 100000; zSql = sqlite3_mprintf( - "CREATE TABLE \"%w\"(%s,PRIMARY KEY(%s))WITHOUT ROWID", - azArg[2], zCollist, zCollist); + "CREATE TABLE \"%w\"(%s,PRIMARY KEY(%.*s))WITHOUT ROWID", + azArg[2], zCollist, lenPK, zCollist); sqlite3_free(zCollist); rc = sqlite3_test_control(SQLITE_TESTCTRL_IMPOSTER, p->db, "main", 1, tnum); if( rc==SQLITE_OK ){ @@ -16364,7 +16417,8 @@ static int do_meta_command(char *zLine, ShellState *p) }else{ utf8_printf(stdout, "%s;\n", zSql); raw_printf(stdout, - "WARNING: writing to an imposter table will corrupt the index!\n" + "WARNING: writing to an imposter table will corrupt the \"%s\" %s!\n", + azArg[1], isWO ? "table" : "index" ); } }else{ @@ -16562,6 +16616,7 @@ static int do_meta_command(char *zLine, ShellState *p) sqlite3_free(p->zFreeOnClose); p->zFreeOnClose = 0; p->openMode = SHELL_OPEN_UNSPEC; + p->openFlags = 0; p->szMax = 0; /* Check for command-line arguments */ for(iName=1; iNameopenMode = SHELL_OPEN_APPENDVFS; }else if( optionMatch(z, "readonly") ){ p->openMode = SHELL_OPEN_READONLY; + }else if( optionMatch(z, "nofollow") ){ + p->openFlags |= SQLITE_OPEN_NOFOLLOW; #ifdef SQLITE_ENABLE_DESERIALIZE }else if( optionMatch(z, "deserialize") ){ p->openMode = SHELL_OPEN_DESERIALIZE; @@ -17732,7 +17789,7 @@ static int do_meta_command(char *zLine, ShellState *p) { "extra_schema_checks",SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS,"BOOLEAN" }, /*{ "fault_install", SQLITE_TESTCTRL_FAULT_INSTALL, "" },*/ { "imposter", SQLITE_TESTCTRL_IMPOSTER, "SCHEMA ON/OFF ROOTPAGE"}, - { "internal_functions", SQLITE_TESTCTRL_INTERNAL_FUNCTIONS, "BOOLEAN" }, + { "internal_functions", SQLITE_TESTCTRL_INTERNAL_FUNCTIONS, "" }, { "localtime_fault", SQLITE_TESTCTRL_LOCALTIME_FAULT,"BOOLEAN" }, { "never_corrupt", SQLITE_TESTCTRL_NEVER_CORRUPT, "BOOLEAN" }, { "optimizations", SQLITE_TESTCTRL_OPTIMIZATIONS, "DISABLE-MASK" }, @@ -17848,7 +17905,6 @@ static int do_meta_command(char *zLine, ShellState *p) /* sqlite3_test_control(int, int) */ case SQLITE_TESTCTRL_ASSERT: case SQLITE_TESTCTRL_ALWAYS: - case SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: if( nArg==3 ){ int opt = booleanValue(azArg[2]); rc2 = sqlite3_test_control(testctrl, opt); @@ -17866,6 +17922,12 @@ static int do_meta_command(char *zLine, ShellState *p) } break; + /* sqlite3_test_control(sqlite3*) */ + case SQLITE_TESTCTRL_INTERNAL_FUNCTIONS: + rc2 = sqlite3_test_control(testctrl, p->db); + isOk = 3; + break; + case SQLITE_TESTCTRL_IMPOSTER: if( nArg==5 ){ rc2 = sqlite3_test_control(testctrl, p->db, @@ -18496,6 +18558,7 @@ static const char zOptions[] = " -multiplex enable the multiplexor VFS\n" #endif " -newline SEP set output row separator. Default: '\\n'\n" + " -nofollow refuse to open symbolic links to database files\n" " -nullvalue TEXT set text string for NULL values. Default ''\n" " -pagecache SIZE N use N slots of SZ bytes each for page cache memory\n" " -quote set output mode to 'quote'\n" @@ -18806,6 +18869,8 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ #endif }else if( strcmp(z,"-readonly")==0 ){ data.openMode = SHELL_OPEN_READONLY; + }else if( strcmp(z,"-nofollow")==0 ){ + data.openFlags = SQLITE_OPEN_NOFOLLOW; #if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB) }else if( strncmp(z, "-A",2)==0 ){ /* All remaining command-line arguments are passed to the ".archive" @@ -18909,6 +18974,8 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ #endif }else if( strcmp(z,"-readonly")==0 ){ data.openMode = SHELL_OPEN_READONLY; + }else if( strcmp(z,"-nofollow")==0 ){ + data.openFlags |= SQLITE_OPEN_NOFOLLOW; }else if( strcmp(z,"-ascii")==0 ){ data.mode = MODE_Ascii; sqlite3_snprintf(sizeof(data.colSeparator), data.colSeparator, Modified: head/contrib/sqlite3/sqlite3.c ============================================================================== --- head/contrib/sqlite3/sqlite3.c Thu Apr 23 09:48:02 2020 (r360220) +++ head/contrib/sqlite3/sqlite3.c Thu Apr 23 13:46:34 2020 (r360221) @@ -1,6 +1,6 @@ /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.30.1. By combining all the individual C code files into this +** version 3.31.0. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a single translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -1165,9 +1165,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.30.1" -#define SQLITE_VERSION_NUMBER 3030001 -#define SQLITE_SOURCE_ID "2019-10-10 20:19:45 18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3df1b0b" +#define SQLITE_VERSION "3.31.0" +#define SQLITE_VERSION_NUMBER 3031000 +#define SQLITE_SOURCE_ID "2020-01-22 18:38:59 f6affdd41608946fcfcea914ece149038a8b25a62bbe719ed2561c649b86d824" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -1558,6 +1558,7 @@ SQLITE_API int sqlite3_exec( #define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8)) #define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4<<8)) #define SQLITE_CANTOPEN_DIRTYWAL (SQLITE_CANTOPEN | (5<<8)) /* Not Used */ +#define SQLITE_CANTOPEN_SYMLINK (SQLITE_CANTOPEN | (6<<8)) #define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8)) #define SQLITE_CORRUPT_SEQUENCE (SQLITE_CORRUPT | (2<<8)) #define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8)) @@ -1577,11 +1578,13 @@ SQLITE_API int sqlite3_exec( #define SQLITE_CONSTRAINT_UNIQUE (SQLITE_CONSTRAINT | (8<<8)) #define SQLITE_CONSTRAINT_VTAB (SQLITE_CONSTRAINT | (9<<8)) #define SQLITE_CONSTRAINT_ROWID (SQLITE_CONSTRAINT |(10<<8)) +#define SQLITE_CONSTRAINT_PINNED (SQLITE_CONSTRAINT |(11<<8)) #define SQLITE_NOTICE_RECOVER_WAL (SQLITE_NOTICE | (1<<8)) #define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8)) #define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8)) #define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8)) #define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8)) +#define SQLITE_OK_SYMLINK (SQLITE_OK | (2<<8)) /* ** CAPI3REF: Flags For File Open Operations @@ -1610,6 +1613,7 @@ SQLITE_API int sqlite3_exec( #define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */ #define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */ #define SQLITE_OPEN_WAL 0x00080000 /* VFS only */ +#define SQLITE_OPEN_NOFOLLOW 0x01000000 /* Ok for sqlite3_open_v2() */ /* Reserved: 0x00F00000 */ @@ -2021,16 +2025,16 @@ struct sqlite3_io_methods { ** ^The [SQLITE_FCNTL_BUSYHANDLER] ** file-control may be invoked by SQLite on the database file handle ** shortly after it is opened in order to provide a custom VFS with access -** to the connections busy-handler callback. The argument is of type (void **) +** to the connection's busy-handler callback. The argument is of type (void**) ** - an array of two (void *) values. The first (void *) actually points -** to a function of type (int (*)(void *)). In order to invoke the connections +** to a function of type (int (*)(void *)). In order to invoke the connection's ** busy-handler, this function should be invoked with the second (void *) in ** the array as the only argument. If it returns non-zero, then the operation ** should be retried. If it returns zero, the custom VFS should abandon the ** current operation. ** **
  • [[SQLITE_FCNTL_TEMPFILENAME]] -** ^Application can invoke the [SQLITE_FCNTL_TEMPFILENAME] file-control +** ^Applications can invoke the [SQLITE_FCNTL_TEMPFILENAME] file-control ** to have SQLite generate a ** temporary filename using the same algorithm that is followed to generate ** temporary filenames for TEMP tables and other internal uses. The @@ -2143,12 +2147,18 @@ struct sqlite3_io_methods { ** not provide a mechanism to detect changes to MAIN only. Also, the ** [sqlite3_total_changes()] interface responds to internal changes only and ** omits changes made by other database connections. The -** [PRAGMA data_version] command provide a mechanism to detect changes to +** [PRAGMA data_version] command provides a mechanism to detect changes to ** a single attached database that occur due to other database connections, ** but omits changes implemented by the database connection on which it is ** called. This file control is the only mechanism to detect changes that ** happen either internally or externally and that are associated with ** a particular attached database. +** +**
  • [[SQLITE_FCNTL_CKPT_DONE]] +** The [SQLITE_FCNTL_CKPT_DONE] opcode is invoked from within a checkpoint +** in wal mode after the client has finished copying pages from the wal +** file to the database file, but before the *-shm file is updated to +** record the fact that the pages have been checkpointed. ** */ #define SQLITE_FCNTL_LOCKSTATE 1 @@ -2186,6 +2196,7 @@ struct sqlite3_io_methods { #define SQLITE_FCNTL_LOCK_TIMEOUT 34 #define SQLITE_FCNTL_DATA_VERSION 35 #define SQLITE_FCNTL_SIZE_LIMIT 36 +#define SQLITE_FCNTL_CKPT_DONE 37 /* deprecated names */ #define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE @@ -2231,10 +2242,10 @@ typedef struct sqlite3_api_routines sqlite3_api_routin ** to 3 with SQLite [version 3.7.6] on [dateof:3.7.6]. Additional fields ** may be appended to the sqlite3_vfs object and the iVersion value ** may increase again in future versions of SQLite. -** Note that the structure -** of the sqlite3_vfs object changes in the transition from +** Note that due to an oversight, the structure +** of the sqlite3_vfs object changed in the transition from ** SQLite [version 3.5.9] to [version 3.6.0] on [dateof:3.6.0] -** and yet the iVersion field was not modified. +** and yet the iVersion field was not increased. ** ** The szOsFile field is the size of the subclassed [sqlite3_file] ** structure used by this VFS. mxPathname is the maximum length of @@ -2325,7 +2336,7 @@ typedef struct sqlite3_api_routines sqlite3_api_routin ** for exclusive access. ** ** ^At least szOsFile bytes of memory are allocated by SQLite -** to hold the [sqlite3_file] structure passed as the third +** to hold the [sqlite3_file] structure passed as the third ** argument to xOpen. The xOpen method does not have to ** allocate the structure; it should just fill it in. Note that ** the xOpen method must set the sqlite3_file.pMethods to either @@ -2662,7 +2673,7 @@ SQLITE_API int sqlite3_db_config(sqlite3*, int op, ... ** that causes the corresponding memory allocation to fail. ** ** The xInit method initializes the memory allocator. For example, -** it might allocate any require mutexes or initialize internal data +** it might allocate any required mutexes or initialize internal data ** structures. The xShutdown method is invoked (indirectly) by ** [sqlite3_shutdown()] and should deallocate any resources acquired ** by xInit. The pAppData pointer is used as the only parameter to @@ -2784,6 +2795,7 @@ struct sqlite3_mem_methods { ** memory allocation statistics. ^(When memory allocation statistics are ** disabled, the following SQLite interfaces become non-operational: **
      +**
    • [sqlite3_hard_heap_limit64()] **
    • [sqlite3_memory_used()] **
    • [sqlite3_memory_highwater()] **
    • [sqlite3_soft_heap_limit64()] @@ -2802,7 +2814,7 @@ struct sqlite3_mem_methods { **
      ^The SQLITE_CONFIG_PAGECACHE option specifies a memory pool ** that SQLite can use for the database page cache with the default page ** cache implementation. -** This configuration option is a no-op if an application-define page +** This configuration option is a no-op if an application-defined page ** cache implementation is loaded using the [SQLITE_CONFIG_PCACHE2]. ** ^There are three arguments to SQLITE_CONFIG_PAGECACHE: A pointer to ** 8-byte aligned memory (pMem), the size of each page cache line (sz), @@ -3287,7 +3299,7 @@ struct sqlite3_mem_methods { ** [[SQLITE_DBCONFIG_DQS_DML]] **
      SQLITE_DBCONFIG_DQS_DML **
      The SQLITE_DBCONFIG_DQS_DML option activates or deactivates -** the legacy [double-quoted string literal] misfeature for DML statement +** the legacy [double-quoted string literal] misfeature for DML statements ** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The ** default value of this setting is determined by the [-DSQLITE_DQS] ** compile-time option. @@ -3301,6 +3313,49 @@ struct sqlite3_mem_methods { ** default value of this setting is determined by the [-DSQLITE_DQS] ** compile-time option. **
      +** +** [[SQLITE_DBCONFIG_TRUSTED_SCHEMA]] +**
      SQLITE_DBCONFIG_TRUSTED_SCHEMA +**
      The SQLITE_DBCONFIG_TRUSTED_SCHEMA option tells SQLite to +** assume that database schemas (the contents of the [sqlite_master] tables) +** are untainted by malicious content. +** When the SQLITE_DBCONFIG_TRUSTED_SCHEMA option is disabled, SQLite +** takes additional defensive steps to protect the application from harm +** including: +**
        +**
      • Prohibit the use of SQL functions inside triggers, views, +** CHECK constraints, DEFAULT clauses, expression indexes, +** partial indexes, or generated columns +** unless those functions are tagged with [SQLITE_INNOCUOUS]. +**
      • Prohibit the use of virtual tables inside of triggers or views +** unless those virtual tables are tagged with [SQLITE_VTAB_INNOCUOUS]. +**
      +** This setting defaults to "on" for legacy compatibility, however +** all applications are advised to turn it off if possible. This setting +** can also be controlled using the [PRAGMA trusted_schema] statement. +**
      +** +** [[SQLITE_DBCONFIG_LEGACY_FILE_FORMAT]] +**
      SQLITE_DBCONFIG_LEGACY_FILE_FORMAT +**
      The SQLITE_DBCONFIG_LEGACY_FILE_FORMAT option activates or deactivates +** the legacy file format flag. When activated, this flag causes all newly +** created database file to have a schema format version number (the 4-byte +** integer found at offset 44 into the database header) of 1. This in turn +** means that the resulting database file will be readable and writable by +** any SQLite version back to 3.0.0 ([dateof:3.0.0]). Without this setting, +** newly created databases are generally not understandable by SQLite versions +** prior to 3.3.0 ([dateof:3.3.0]). As these words are written, there +** is now scarcely any need to generated database files that are compatible +** all the way back to version 3.0.0, and so this setting is of little +** practical use, but is provided so that SQLite can continue to claim the +** ability to generate new database files that are compatible with version +** 3.0.0. +**

      Note that when the SQLITE_DBCONFIG_LEGACY_FILE_FORMAT setting is on, +** the [VACUUM] command will fail with an obscure error when attempting to +** process a table with generated columns and a descending index. This is +** not considered a bug since SQLite versions 3.3.0 and earlier do not support +** either generated columns or decending indexes. +**

      ** */ #define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */ @@ -3319,7 +3374,9 @@ struct sqlite3_mem_methods { #define SQLITE_DBCONFIG_DQS_DML 1013 /* int int* */ #define SQLITE_DBCONFIG_DQS_DDL 1014 /* int int* */ #define SQLITE_DBCONFIG_ENABLE_VIEW 1015 /* int int* */ -#define SQLITE_DBCONFIG_MAX 1015 /* Largest DBCONFIG */ +#define SQLITE_DBCONFIG_LEGACY_FILE_FORMAT 1016 /* int int* */ +#define SQLITE_DBCONFIG_TRUSTED_SCHEMA 1017 /* int int* */ +#define SQLITE_DBCONFIG_MAX 1017 /* Largest DBCONFIG */ /* ** CAPI3REF: Enable Or Disable Extended Result Codes @@ -3525,7 +3582,7 @@ SQLITE_API int sqlite3_total_changes(sqlite3*); ** ^The sqlite3_interrupt(D) call is in effect until all currently running ** SQL statements on [database connection] D complete. ^Any new SQL statements ** that are started after the sqlite3_interrupt() call and before the -** running statements reaches zero are interrupted as if they had been +** running statement count reaches zero are interrupted as if they had been ** running prior to the sqlite3_interrupt() call. ^New SQL statements ** that are started after the running statement count reaches zero are ** not effected by the sqlite3_interrupt(). @@ -3693,9 +3750,9 @@ SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); ** Cindy | 21 ** ** -** There are two column (M==2) and three rows (N==3). Thus the +** There are two columns (M==2) and three rows (N==3). Thus the ** result table has 8 entries. Suppose the result table is stored -** in an array names azResult. Then azResult holds this content: +** in an array named azResult. Then azResult holds this content: ** **
       **        azResult[0] = "Name";
      @@ -3788,7 +3845,7 @@ SQLITE_API char *sqlite3_vsnprintf(int,char*,const cha
       **
       ** The SQLite core uses these three routines for all of its own
       ** internal memory allocation needs. "Core" in the previous sentence
      -** does not include operating-system specific VFS implementation.  The
      +** does not include operating-system specific [VFS] implementation.  The
       ** Windows VFS uses native malloc() and free() for some operations.
       **
       ** ^The sqlite3_malloc() routine returns a pointer to a block
      @@ -3849,19 +3906,6 @@ SQLITE_API char *sqlite3_vsnprintf(int,char*,const cha
       ** 4 byte boundary if the [SQLITE_4_BYTE_ALIGNED_MALLOC] compile-time
       ** option is used.
       **
      -** In SQLite version 3.5.0 and 3.5.1, it was possible to define
      -** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in
      -** implementation of these routines to be omitted.  That capability
      -** is no longer provided.  Only built-in memory allocators can be used.
      -**
      -** Prior to SQLite version 3.7.10, the Windows OS interface layer called
      -** the system malloc() and free() directly when converting
      -** filenames between the UTF-8 encoding used by SQLite
      -** and whatever filename encoding is used by the particular Windows
      -** installation.  Memory allocation errors were detected, but
      -** they were reported back as [SQLITE_CANTOPEN] or
      -** [SQLITE_IOERR] rather than [SQLITE_NOMEM].
      -**
       ** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()]
       ** must be either NULL or else pointers obtained from a prior
       ** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have
      @@ -3910,7 +3954,7 @@ SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int 
       ** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
       ** select random [ROWID | ROWIDs] when inserting new records into a table that
       ** already uses the largest possible [ROWID].  The PRNG is also used for
      -** the build-in random() and randomblob() SQL functions.  This interface allows
      +** the built-in random() and randomblob() SQL functions.  This interface allows
       ** applications to access the same PRNG for other purposes.
       **
       ** ^A call to this routine stores N bytes of randomness into buffer P.
      @@ -4284,10 +4328,8 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int
       ** The sqlite3_open_v2() interface works like sqlite3_open()
       ** except that it accepts two additional parameters for additional control
       ** over the new database connection.  ^(The flags parameter to
      -** sqlite3_open_v2() can take one of
      -** the following three values, optionally combined with the 
      -** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE],
      -** [SQLITE_OPEN_PRIVATECACHE], and/or [SQLITE_OPEN_URI] flags:)^
      +** sqlite3_open_v2() must include, at a minimum, one of the following
      +** three flag combinations:)^
       **
       ** 
      ** ^(
      [SQLITE_OPEN_READONLY]
      @@ -4305,23 +4347,51 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int ** sqlite3_open() and sqlite3_open16().)^ **
      ** +** In addition to the required flags, the following optional flags are +** also supported: +** +**
      +** ^(
      [SQLITE_OPEN_URI]
      +**
      The filename can be interpreted as a URI if this flag is set.
      )^ +** +** ^(
      [SQLITE_OPEN_MEMORY]
      +**
      The database will be opened as an in-memory database. The database +** is named by the "filename" argument for the purposes of cache-sharing, +** if shared cache mode is enabled, but the "filename" is otherwise ignored. +**
      )^ +** *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Apr 23 13:58:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68A702B7292; Thu, 23 Apr 2020 13:58:28 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497Jmh2WXcz3JFV; Thu, 23 Apr 2020 13:58:28 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 517F7574B; Thu, 23 Apr 2020 13:58:28 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NDwSmA093280; Thu, 23 Apr 2020 13:58:28 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NDwBF6093267; Thu, 23 Apr 2020 13:58:11 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202004231358.03NDwBF6093267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 23 Apr 2020 13:58:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360222 - in head/contrib/sqlite3: . tea X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/contrib/sqlite3: . tea X-SVN-Commit-Revision: 360222 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 13:58:28 -0000 Author: cy Date: Thu Apr 23 13:58:11 2020 New Revision: 360222 URL: https://svnweb.freebsd.org/changeset/base/360222 Log: MFV r360158: Update sqlite3-3.31.0 (3310000) --> sqlite3-3.31.1 (3310100) Tested by: Mark Millard With to be committed PowerPC patch MFC after: 1 month X-MFC with: r360221 Modified: head/contrib/sqlite3/configure head/contrib/sqlite3/configure.ac head/contrib/sqlite3/sqlite3.c head/contrib/sqlite3/sqlite3.h head/contrib/sqlite3/sqlite3ext.h head/contrib/sqlite3/tea/configure head/contrib/sqlite3/tea/configure.ac Directory Properties: head/contrib/sqlite3/ (props changed) Modified: head/contrib/sqlite3/configure ============================================================================== --- head/contrib/sqlite3/configure Thu Apr 23 13:46:34 2020 (r360221) +++ head/contrib/sqlite3/configure Thu Apr 23 13:58:11 2020 (r360222) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.31.0. +# Generated by GNU Autoconf 2.69 for sqlite 3.31.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.31.0' -PACKAGE_STRING='sqlite 3.31.0' +PACKAGE_VERSION='3.31.1' +PACKAGE_STRING='sqlite 3.31.1' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1341,7 +1341,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.31.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.31.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1412,7 +1412,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.31.0:";; + short | recursive ) echo "Configuration of sqlite 3.31.1:";; esac cat <<\_ACEOF @@ -1537,7 +1537,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.31.0 +sqlite configure 3.31.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1952,7 +1952,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.31.0, which was +It was created by sqlite $as_me 3.31.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2818,7 +2818,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.31.0' + VERSION='3.31.1' cat >>confdefs.h <<_ACEOF @@ -14438,7 +14438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.31.0, which was +This file was extended by sqlite $as_me 3.31.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14495,7 +14495,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.31.0 +sqlite config.status 3.31.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/sqlite3/configure.ac ============================================================================== --- head/contrib/sqlite3/configure.ac Thu Apr 23 13:46:34 2020 (r360221) +++ head/contrib/sqlite3/configure.ac Thu Apr 23 13:58:11 2020 (r360222) @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.31.0, http://www.sqlite.org) +AC_INIT(sqlite, 3.31.1, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) Modified: head/contrib/sqlite3/sqlite3.c ============================================================================== --- head/contrib/sqlite3/sqlite3.c Thu Apr 23 13:46:34 2020 (r360221) +++ head/contrib/sqlite3/sqlite3.c Thu Apr 23 13:58:11 2020 (r360222) @@ -1,6 +1,6 @@ /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.31.0. By combining all the individual C code files into this +** version 3.31.1. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a single translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -1165,9 +1165,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.31.0" -#define SQLITE_VERSION_NUMBER 3031000 -#define SQLITE_SOURCE_ID "2020-01-22 18:38:59 f6affdd41608946fcfcea914ece149038a8b25a62bbe719ed2561c649b86d824" +#define SQLITE_VERSION "3.31.1" +#define SQLITE_VERSION_NUMBER 3031001 +#define SQLITE_SOURCE_ID "2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837bb4d6" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -56233,30 +56233,48 @@ SQLITE_PRIVATE int sqlite3PagerOpen( ** Database file handle (pVfs->szOsFile bytes) ** Sub-journal file handle (journalFileSize bytes) ** Main journal file handle (journalFileSize bytes) - ** \0\1\0 journal prefix (3 bytes) - ** Journal filename (nPathname+8+1 bytes) - ** \2\0 WAL prefix (2 bytes) - ** WAL filename (nPathname+4+1 bytes) - ** \3\0 database prefix (2 bytes) + ** \0\0\0\0 database prefix (4 bytes) ** Database file name (nPathname+1 bytes) ** URI query parameters (nUriByte bytes) - ** \0\0 terminator (2 bytes) + ** Journal filename (nPathname+8+1 bytes) + ** WAL filename (nPathname+4+1 bytes) + ** \0\0\0 terminator (3 bytes) + ** + ** Some 3rd-party software, over which we have no control, depends on + ** the specific order of the filenames and the \0 separators between them + ** so that it can (for example) find the database filename given the WAL + ** filename without using the sqlite3_filename_database() API. This is a + ** misuse of SQLite and a bug in the 3rd-party software, but the 3rd-party + ** software is in widespread use, so we try to avoid changing the filename + ** order and formatting if possible. In particular, the details of the + ** filename format expected by 3rd-party software should be as follows: + ** + ** - Main Database Path + ** - \0 + ** - Multiple URI components consisting of: + ** - Key + ** - \0 + ** - Value + ** - \0 + ** - \0 + ** - Journal Path + ** - \0 + ** - WAL Path (zWALName) + ** - \0 */ pPtr = (u8 *)sqlite3MallocZero( ROUND8(sizeof(*pPager)) + /* Pager structure */ ROUND8(pcacheSize) + /* PCache object */ ROUND8(pVfs->szOsFile) + /* The main db file */ journalFileSize * 2 + /* The two journal files */ - 3 + /* Journal prefix */ + 4 + /* Database prefix */ + nPathname + 1 + /* database filename */ + nUriByte + /* query parameters */ nPathname + 8 + 1 + /* Journal filename */ #ifndef SQLITE_OMIT_WAL - 2 + /* WAL prefix */ nPathname + 4 + 1 + /* WAL filename */ #endif - 2 + /* Database prefix */ - nPathname + 1 + /* database filename */ - nUriByte + /* query parameters */ - 2 /* Terminator */ + 3 /* Terminator */ ); assert( EIGHT_BYTE_ALIGNMENT(SQLITE_INT_TO_PTR(journalFileSize)) ); if( !pPtr ){ @@ -56270,9 +56288,20 @@ SQLITE_PRIVATE int sqlite3PagerOpen( pPager->jfd = (sqlite3_file*)pPtr; pPtr += journalFileSize; assert( EIGHT_BYTE_ALIGNMENT(pPager->jfd) ); + /* Fill in the Pager.zFilename and pPager.zQueryParam fields */ + pPtr += 4; /* Skip zero prefix */ + pPager->zFilename = (char*)pPtr; + if( nPathname>0 ){ + memcpy(pPtr, zPathname, nPathname); pPtr += nPathname + 1; + if( zUri ){ + memcpy(pPtr, zUri, nUriByte); pPtr += nUriByte; + }else{ + pPtr++; + } + } + /* Fill in Pager.zJournal */ - pPtr[1] = '\001'; pPtr += 3; if( nPathname>0 ){ pPager->zJournal = (char*)pPtr; memcpy(pPtr, zPathname, nPathname); pPtr += nPathname; @@ -56283,12 +56312,10 @@ SQLITE_PRIVATE int sqlite3PagerOpen( #endif }else{ pPager->zJournal = 0; - pPtr++; } #ifndef SQLITE_OMIT_WAL /* Fill in Pager.zWal */ - pPtr[0] = '\002'; pPtr[1] = 0; pPtr += 2; if( nPathname>0 ){ pPager->zWal = (char*)pPtr; memcpy(pPtr, zPathname, nPathname); pPtr += nPathname; @@ -56299,21 +56326,9 @@ SQLITE_PRIVATE int sqlite3PagerOpen( #endif }else{ pPager->zWal = 0; - pPtr++; } #endif - /* Fill in the Pager.zFilename and pPager.zQueryParam fields */ - pPtr[0] = '\003'; pPtr[1] = 0; pPtr += 2; - pPager->zFilename = (char*)pPtr; - if( nPathname>0 ){ - memcpy(pPtr, zPathname, nPathname); pPtr += nPathname + 1; - if( zUri ){ - memcpy(pPtr, zUri, nUriByte); /* pPtr += nUriByte; // not needed */ - } - /* Double-zero terminator implied by the sqlite3MallocZero */ - } - if( nPathname ) sqlite3DbFree(0, zPathname); pPager->pVfs = pVfs; pPager->vfsFlags = vfsFlags; @@ -58433,8 +58448,8 @@ SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager ** sqlite3_uri_parameter() and sqlite3_filename_database() and friends. */ SQLITE_PRIVATE const char *sqlite3PagerFilename(const Pager *pPager, int nullIfMemDb){ - static const char zFake[] = { 0x00, 0x01, 0x00, 0x00, 0x00 }; - return (nullIfMemDb && pPager->memDb) ? &zFake[3] : pPager->zFilename; + static const char zFake[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + return (nullIfMemDb && pPager->memDb) ? &zFake[4] : pPager->zFilename; } /* @@ -117491,6 +117506,9 @@ SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3 *db, assert( !ExprHasProperty(pExpr, EP_xIsSelect) ); nExpr = pExpr->x.pList->nExpr; pDef = sqlite3FindFunction(db, pExpr->u.zToken, nExpr, SQLITE_UTF8, 0); +#ifdef SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION + if( pDef==0 ) return 0; +#endif if( NEVER(pDef==0) || (pDef->funcFlags & SQLITE_FUNC_LIKE)==0 ){ return 0; } @@ -122767,11 +122785,11 @@ typedef int (*sqlite3_loadext_entry)( /* Version 3.26.0 and later */ #define sqlite3_normalized_sql sqlite3_api->normalized_sql /* Version 3.28.0 and later */ -#define sqlite3_stmt_isexplain sqlite3_api->isexplain -#define sqlite3_value_frombind sqlite3_api->frombind +#define sqlite3_stmt_isexplain sqlite3_api->stmt_isexplain +#define sqlite3_value_frombind sqlite3_api->value_frombind /* Version 3.30.0 and later */ #define sqlite3_drop_modules sqlite3_api->drop_modules -/* Version 3.31.0 andn later */ +/* Version 3.31.0 and later */ #define sqlite3_hard_heap_limit64 sqlite3_api->hard_heap_limit64 #define sqlite3_uri_key sqlite3_api->uri_key #define sqlite3_filename_database sqlite3_api->filename_database @@ -163283,6 +163301,21 @@ SQLITE_API int sqlite3_test_control(int op, ...){ } /* +** The Pager stores the Database filename, Journal filename, and WAL filename +** consecutively in memory, in that order. The database filename is prefixed +** by four zero bytes. Locate the start of the database filename by searching +** backwards for the first byte following four consecutive zero bytes. +** +** This only works if the filename passed in was obtained from the Pager. +*/ +static const char *databaseName(const char *zName){ + while( zName[-1]!=0 || zName[-2]!=0 || zName[-3]!=0 || zName[-4]!=0 ){ + zName--; + } + return zName; +} + +/* ** This is a utility routine, useful to VFS implementations, that checks ** to see if a database file was a URI that contained a specific query ** parameter, and if so obtains the value of the query parameter. @@ -163295,6 +163328,7 @@ SQLITE_API int sqlite3_test_control(int op, ...){ */ SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam){ if( zFilename==0 || zParam==0 ) return 0; + zFilename = databaseName(zFilename); zFilename += sqlite3Strlen30(zFilename) + 1; while( zFilename[0] ){ int x = strcmp(zFilename, zParam); @@ -163310,6 +163344,7 @@ SQLITE_API const char *sqlite3_uri_parameter(const cha */ SQLITE_API const char *sqlite3_uri_key(const char *zFilename, int N){ if( zFilename==0 || N<0 ) return 0; + zFilename = databaseName(zFilename); zFilename += sqlite3Strlen30(zFilename) + 1; while( zFilename[0] && (N--)>0 ){ zFilename += sqlite3Strlen30(zFilename) + 1; @@ -163344,25 +163379,6 @@ SQLITE_API sqlite3_int64 sqlite3_uri_int64( } /* -** The Pager stores the Journal filename, WAL filename, and Database filename -** consecutively in memory, in that order, with prefixes \000\001\000, -** \002\000, and \003\000, in that order. Thus the three names look like query -** parameters if you start at the first prefix. -** -** This routine backs up a filename to the start of the first prefix. -** -** This only works if the filenamed passed in was obtained from the Pager. -*/ -static const char *startOfNameList(const char *zName){ - while( zName[0]!='\001' || zName[1]!=0 ){ - zName -= 3; - while( zName[0]!='\000' ){ zName--; } - zName++; - } - return zName-1; -} - -/* ** Translate a filename that was handed to a VFS routine into the corresponding ** database, journal, or WAL file. ** @@ -163373,14 +163389,26 @@ static const char *startOfNameList(const char *zName){ ** corruption. */ SQLITE_API const char *sqlite3_filename_database(const char *zFilename){ + return databaseName(zFilename); return sqlite3_uri_parameter(zFilename - 3, "\003"); } SQLITE_API const char *sqlite3_filename_journal(const char *zFilename){ - const char *z = sqlite3_uri_parameter(startOfNameList(zFilename), "\001"); - return ALWAYS(z) && z[0] ? z : 0; + zFilename = databaseName(zFilename); + zFilename += sqlite3Strlen30(zFilename) + 1; + while( zFilename[0] ){ + zFilename += sqlite3Strlen30(zFilename) + 1; + zFilename += sqlite3Strlen30(zFilename) + 1; + } + return zFilename + 1; } SQLITE_API const char *sqlite3_filename_wal(const char *zFilename){ - return sqlite3_uri_parameter(startOfNameList(zFilename), "\002"); +#ifdef SQLITE_OMIT_WAL + return 0; +#else + zFilename = sqlite3_filename_journal(zFilename); + zFilename += sqlite3Strlen30(zFilename) + 1; + return zFilename; +#endif } /* @@ -219999,8 +220027,8 @@ static int fts5QueryCksum( ** contain valid utf-8, return non-zero. */ static int fts5TestUtf8(const char *z, int n){ - assert_nc( n>0 ); int i = 0; + assert_nc( n>0 ); while( inormalized_sql /* Version 3.28.0 and later */ -#define sqlite3_stmt_isexplain sqlite3_api->isexplain -#define sqlite3_value_frombind sqlite3_api->frombind +#define sqlite3_stmt_isexplain sqlite3_api->stmt_isexplain +#define sqlite3_value_frombind sqlite3_api->value_frombind /* Version 3.30.0 and later */ #define sqlite3_drop_modules sqlite3_api->drop_modules -/* Version 3.31.0 andn later */ +/* Version 3.31.0 and later */ #define sqlite3_hard_heap_limit64 sqlite3_api->hard_heap_limit64 #define sqlite3_uri_key sqlite3_api->uri_key #define sqlite3_filename_database sqlite3_api->filename_database Modified: head/contrib/sqlite3/tea/configure ============================================================================== --- head/contrib/sqlite3/tea/configure Thu Apr 23 13:46:34 2020 (r360221) +++ head/contrib/sqlite3/tea/configure Thu Apr 23 13:58:11 2020 (r360222) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.31.0. +# Generated by GNU Autoconf 2.69 for sqlite 3.31.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.31.0' -PACKAGE_STRING='sqlite 3.31.0' +PACKAGE_VERSION='3.31.1' +PACKAGE_STRING='sqlite 3.31.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1303,7 +1303,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.31.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.31.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1365,7 +1365,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.31.0:";; + short | recursive ) echo "Configuration of sqlite 3.31.1:";; esac cat <<\_ACEOF @@ -1467,7 +1467,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.31.0 +sqlite configure 3.31.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1878,7 +1878,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.31.0, which was +It was created by sqlite $as_me 3.31.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -9373,7 +9373,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.31.0, which was +This file was extended by sqlite $as_me 3.31.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9426,7 +9426,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.31.0 +sqlite config.status 3.31.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/sqlite3/tea/configure.ac ============================================================================== --- head/contrib/sqlite3/tea/configure.ac Thu Apr 23 13:46:34 2020 (r360221) +++ head/contrib/sqlite3/tea/configure.ac Thu Apr 23 13:58:11 2020 (r360222) @@ -19,7 +19,7 @@ dnl to configure the system for the local environment. # so you can encode the package version directly into the source files. #----------------------------------------------------------------------- -AC_INIT([sqlite], [3.31.0]) +AC_INIT([sqlite], [3.31.1]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. From owner-svn-src-all@freebsd.org Thu Apr 23 14:08:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69CAB2B76C1; Thu, 23 Apr 2020 14:08:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497K0T25Wxz3JwT; Thu, 23 Apr 2020 14:08:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 43221593E; Thu, 23 Apr 2020 14:08:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NE8fOS099399; Thu, 23 Apr 2020 14:08:41 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NE8eGU099398; Thu, 23 Apr 2020 14:08:40 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202004231408.03NE8eGU099398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 23 Apr 2020 14:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360223 - head/contrib/sqlite3 X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/sqlite3 X-SVN-Commit-Revision: 360223 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 14:08:41 -0000 Author: cy Date: Thu Apr 23 14:08:40 2020 New Revision: 360223 URL: https://svnweb.freebsd.org/changeset/base/360223 Log: Fix PowerPC segfault. The segfault fix was originally developed by our upstream, sqlite.org, to address S/390 and Sparc segfaults, both of which are big endian. Our PowerPC is also big endian, which this patch also fixes. Reported by: Mark Millard Tested by: Mark Millard Obtained from: https://www.sqlite.org/src/vinfo/04885763c4cd00cb?diff=1 https://sqlite.org/forum/forumpost/672291a5b2 MFC after: 1 month X-MFC with: r360221, 360221 Modified: head/contrib/sqlite3/sqlite3.c Modified: head/contrib/sqlite3/sqlite3.c ============================================================================== --- head/contrib/sqlite3/sqlite3.c Thu Apr 23 13:58:11 2020 (r360222) +++ head/contrib/sqlite3/sqlite3.c Thu Apr 23 14:08:40 2020 (r360223) @@ -121302,12 +121302,14 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks( x = *sqlite3VdbeGetOp(v, addrConflictCk); if( x.opcode!=OP_IdxRowid ){ int p2; /* New P2 value for copied conflict check opcode */ + const char *zP4; if( sqlite3OpcodeProperty[x.opcode]&OPFLG_JUMP ){ p2 = lblRecheckOk; }else{ p2 = x.p2; } - sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, x.p4.z, x.p4type); + zP4 = x.p4type==P4_INT32 ? SQLITE_INT_TO_PTR(x.p4.i) : x.p4.z; + sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, zP4, x.p4type); sqlite3VdbeChangeP5(v, x.p5); VdbeCoverageIf(v, p2!=x.p2); } From owner-svn-src-all@freebsd.org Thu Apr 23 17:30:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F2F4D2BE065; Thu, 23 Apr 2020 17:30:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497PSq6DVwz45Sl; Thu, 23 Apr 2020 17:30:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D05D48143; Thu, 23 Apr 2020 17:30:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NHU33R031685; Thu, 23 Apr 2020 17:30:03 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NHU3sc031684; Thu, 23 Apr 2020 17:30:03 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202004231730.03NHU3sc031684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 23 Apr 2020 17:30:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360224 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 360224 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 17:30:04 -0000 Author: cem Date: Thu Apr 23 17:30:03 2020 New Revision: 360224 URL: https://svnweb.freebsd.org/changeset/base/360224 Log: acpi_ec(4): Don't probe erroneously if success occurred In r360131, acpi_ec probe was changed to not clobber an error status prior to several error cases that did not explicitly set the error variable before goto'ing the exit path. However, I did not notice that the error variable was not set to success in the success path. That caused all successful probes to fail, which is obviously undesirable. PR: 245778 Reported by: Neel Chauhan , Evilham Tested by: Evilham X-MFC-With: r360131 Modified: head/sys/dev/acpica/acpi_ec.c Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Thu Apr 23 14:08:40 2020 (r360223) +++ head/sys/dev/acpica/acpi_ec.c Thu Apr 23 17:30:03 2020 (r360224) @@ -443,6 +443,8 @@ acpi_ec_probe(device_t dev) if (buf.Pointer) AcpiOsFree(buf.Pointer); + + ret = rc; out: if (ret <= 0) { snprintf(desc, sizeof(desc), "Embedded Controller: GPE %#x%s%s", From owner-svn-src-all@freebsd.org Thu Apr 23 17:46:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC2642BEA5B; Thu, 23 Apr 2020 17:46:30 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497Pqp40XDz46pf; Thu, 23 Apr 2020 17:46:30 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A61B8538; Thu, 23 Apr 2020 17:46:30 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NHkUw9043685; Thu, 23 Apr 2020 17:46:30 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NHkUNO043683; Thu, 23 Apr 2020 17:46:30 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202004231746.03NHkUNO043683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 23 Apr 2020 17:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360225 - in stable/11/sys: compat/freebsd32 kern X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in stable/11/sys: compat/freebsd32 kern X-SVN-Commit-Revision: 360225 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 17:46:30 -0000 Author: brooks Date: Thu Apr 23 17:46:29 2020 New Revision: 360225 URL: https://svnweb.freebsd.org/changeset/base/360225 Log: MFC r359938: Remove bogus use of useracc() in (clock_)nanosleep. There's no point in pre-checking that we can access the user's rmtp pointer before we do it in copyout(). While here, improve style(9) compliance. Reviewed by: imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24409 Modified: stable/11/sys/compat/freebsd32/freebsd32_misc.c stable/11/sys/kern/kern_time.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/11/sys/compat/freebsd32/freebsd32_misc.c Thu Apr 23 17:30:03 2020 (r360224) +++ stable/11/sys/compat/freebsd32/freebsd32_misc.c Thu Apr 23 17:46:29 2020 (r360225) @@ -2325,7 +2325,7 @@ freebsd32_user_clock_nanosleep(struct thread *td, cloc { struct timespec32 rmt32, rqt32; struct timespec rmt, rqt; - int error; + int error, error2; error = copyin(ua_rqtp, &rqt32, sizeof(rqt32)); if (error) @@ -2334,18 +2334,13 @@ freebsd32_user_clock_nanosleep(struct thread *td, cloc CP(rqt32, rqt, tv_sec); CP(rqt32, rqt, tv_nsec); - if (ua_rmtp != NULL && (flags & TIMER_ABSTIME) == 0 && - !useracc(ua_rmtp, sizeof(rmt32), VM_PROT_WRITE)) - return (EFAULT); error = kern_clock_nanosleep(td, clock_id, flags, &rqt, &rmt); if (error == EINTR && ua_rmtp != NULL && (flags & TIMER_ABSTIME) == 0) { - int error2; - CP(rmt, rmt32, tv_sec); CP(rmt, rmt32, tv_nsec); error2 = copyout(&rmt32, ua_rmtp, sizeof(rmt32)); - if (error2) + if (error2 != 0) error = error2; } return (error); Modified: stable/11/sys/kern/kern_time.c ============================================================================== --- stable/11/sys/kern/kern_time.c Thu Apr 23 17:30:03 2020 (r360224) +++ stable/11/sys/kern/kern_time.c Thu Apr 23 17:46:29 2020 (r360225) @@ -613,20 +613,15 @@ user_clock_nanosleep(struct thread *td, clockid_t cloc const struct timespec *ua_rqtp, struct timespec *ua_rmtp) { struct timespec rmt, rqt; - int error; + int error, error2; error = copyin(ua_rqtp, &rqt, sizeof(rqt)); if (error) return (error); - if (ua_rmtp != NULL && (flags & TIMER_ABSTIME) == 0 && - !useracc(ua_rmtp, sizeof(rmt), VM_PROT_WRITE)) - return (EFAULT); error = kern_clock_nanosleep(td, clock_id, flags, &rqt, &rmt); if (error == EINTR && ua_rmtp != NULL && (flags & TIMER_ABSTIME) == 0) { - int error2; - error2 = copyout(&rmt, ua_rmtp, sizeof(rmt)); - if (error2) + if (error2 != 0) error = error2; } return (error); From owner-svn-src-all@freebsd.org Thu Apr 23 17:56:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB6472BEE85; Thu, 23 Apr 2020 17:56:49 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497Q3j4X2Bz47fj; Thu, 23 Apr 2020 17:56:49 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 790DF870B; Thu, 23 Apr 2020 17:56:49 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NHunAc050091; Thu, 23 Apr 2020 17:56:49 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NHunhq050090; Thu, 23 Apr 2020 17:56:49 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202004231756.03NHunhq050090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 23 Apr 2020 17:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360226 - in head/sbin: decryptcore dumpon X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sbin: decryptcore dumpon X-SVN-Commit-Revision: 360226 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 17:56:49 -0000 Author: cem Date: Thu Apr 23 17:56:48 2020 New Revision: 360226 URL: https://svnweb.freebsd.org/changeset/base/360226 Log: EKCD: Preload error strings, PRNG seed; use OAEP padding Preload OpenSSL ERR string data so that the formatted error messages are vaguely meaningful. Add OpenSSL error information to the RSA_public_encrypt() operation failure case in one-time key generation. For obsolescent OpenSSL versions (*cough* FIPS *cough*), pre-seed the PRNG before entering Cap mode, as old versions of OpenSSL are unaware of kernel RNG interfaces aside from /dev/random (such as the long-supported kern.arnd, or the slightly more recent getentropy(3) or getrandom(2)). (RSA_public_encrypt() wants a seeded PRNG to randomize the "PS" portion of PKCS 1.5 padding or the "MGF" pseudo-random function in OAEP padding.) Switch dumpon to encrypt the one-time key with OAEP padding (recommended since 1998; RFC2437) rather than the obsolescent PKCS 1.5 padding (1993; RFC2313). Switch decryptcore to attempt OAEP decryption first, and try PKCS 1.5 decryption on failure. This is intended only for transition convenience, and we should obsolete support for non-OAEP padding in a release or two. Reviewed by: markj MFC After: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24534 Modified: head/sbin/decryptcore/decryptcore.c head/sbin/dumpon/dumpon.c Modified: head/sbin/decryptcore/decryptcore.c ============================================================================== --- head/sbin/decryptcore/decryptcore.c Thu Apr 23 17:46:29 2020 (r360225) +++ head/sbin/decryptcore/decryptcore.c Thu Apr 23 17:56:48 2020 (r360226) @@ -219,6 +219,10 @@ decrypt(int ofd, const char *privkeyfile, const char * if (RSA_private_decrypt(kdk->kdk_encryptedkeysize, kdk->kdk_encryptedkey, key, privkey, + RSA_PKCS1_OAEP_PADDING) != sizeof(key) && + /* Fallback to deprecated, formerly-used PKCS 1.5 padding. */ + RSA_private_decrypt(kdk->kdk_encryptedkeysize, + kdk->kdk_encryptedkey, key, privkey, RSA_PKCS1_PADDING) != sizeof(key)) { pjdlog_error("Unable to decrypt key: %s", ERR_error_string(ERR_get_error(), NULL)); Modified: head/sbin/dumpon/dumpon.c ============================================================================== --- head/sbin/dumpon/dumpon.c Thu Apr 23 17:46:29 2020 (r360225) +++ head/sbin/dumpon/dumpon.c Thu Apr 23 17:56:48 2020 (r360226) @@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_CRYPTO #include #include +#include #include #endif @@ -224,6 +225,18 @@ genkey(const char *pubkeyfile, struct diocskerneldump_ if (fp == NULL) err(1, "Unable to open %s", pubkeyfile); + /* + * Obsolescent OpenSSL only knows about /dev/random, and needs to + * pre-seed before entering cap mode. For whatever reason, + * RSA_pub_encrypt uses the internal PRNG. + */ +#if OPENSSL_VERSION_NUMBER < 0x10100000L + { + unsigned char c[1]; + RAND_bytes(c, 1); + } +#endif + if (caph_enter() < 0) err(1, "Unable to enter capability mode"); @@ -286,8 +299,9 @@ genkey(const char *pubkeyfile, struct diocskerneldump_ arc4random_buf(kdap->kda_key, sizeof(kdap->kda_key)); if (RSA_public_encrypt(sizeof(kdap->kda_key), kdap->kda_key, kdap->kda_encryptedkey, pubkey, - RSA_PKCS1_PADDING) != (int)kdap->kda_encryptedkeysize) { - errx(1, "Unable to encrypt the one-time key."); + RSA_PKCS1_OAEP_PADDING) != (int)kdap->kda_encryptedkeysize) { + errx(1, "Unable to encrypt the one-time key: %s", + ERR_error_string(ERR_get_error(), NULL)); } RSA_free(pubkey); } @@ -470,8 +484,11 @@ main(int argc, char *argv[]) usage(); #ifdef HAVE_CRYPTO - if (cipher != KERNELDUMP_ENC_NONE && pubkeyfile == NULL) + if (cipher != KERNELDUMP_ENC_NONE && pubkeyfile == NULL) { errx(EX_USAGE, "-C option requires a public key file."); + } else if (pubkeyfile != NULL) { + ERR_load_crypto_strings(); + } #else if (pubkeyfile != NULL) errx(EX_UNAVAILABLE,"Unable to use the public key." From owner-svn-src-all@freebsd.org Thu Apr 23 18:04:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51E312BF1F2; Thu, 23 Apr 2020 18:04:53 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497QF11M81z48TZ; Thu, 23 Apr 2020 18:04:53 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2554788F2; Thu, 23 Apr 2020 18:04:53 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NI4qGl055911; Thu, 23 Apr 2020 18:04:52 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NI4qFY055910; Thu, 23 Apr 2020 18:04:52 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202004231804.03NI4qFY055910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 23 Apr 2020 18:04:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360227 - head/sbin/dumpon X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sbin/dumpon X-SVN-Commit-Revision: 360227 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 18:04:53 -0000 Author: cem Date: Thu Apr 23 18:04:52 2020 New Revision: 360227 URL: https://svnweb.freebsd.org/changeset/base/360227 Log: dumpon.8: Update minimum key size language dumpon(8) has not accepted 1024-bit RSA keys since prior to r339784 (2018-10). The manual page language was not updated at that time (oops). The minimum accepted is 2048 bits, which is also a good default choice. Sponsored by: Dell EMC Isilon Modified: head/sbin/dumpon/dumpon.8 Modified: head/sbin/dumpon/dumpon.8 ============================================================================== --- head/sbin/dumpon/dumpon.8 Thu Apr 23 17:56:48 2020 (r360226) +++ head/sbin/dumpon/dumpon.8 Thu Apr 23 18:04:52 2020 (r360227) @@ -28,7 +28,7 @@ .\" From: @(#)swapon.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 23, 2019 +.Dd April 23, 2020 .Dt DUMPON 8 .Os .Sh NAME @@ -130,7 +130,7 @@ The goal of the mechanism is to provide confidentialit .Pp The .Va pubkey -file should be a PEM-formatted RSA key of at least 1024 bits. +file should be a PEM-formatted RSA key of at least 2048 bits. .It Fl C Ar cipher Select the symmetric algorithm used for encrypted kernel crash dump. The default is From owner-svn-src-all@freebsd.org Thu Apr 23 19:16:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7F492C0D50; Thu, 23 Apr 2020 19:16:20 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497RqS3wX6z4DHc; Thu, 23 Apr 2020 19:16:20 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D8FF968C; Thu, 23 Apr 2020 19:16:20 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NJGKUA099900; Thu, 23 Apr 2020 19:16:20 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NJGKpY099899; Thu, 23 Apr 2020 19:16:20 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202004231916.03NJGKpY099899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 23 Apr 2020 19:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360228 - head/sys/arm64/rockchip X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm64/rockchip X-SVN-Commit-Revision: 360228 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 19:16:20 -0000 Author: manu Date: Thu Apr 23 19:16:20 2020 New Revision: 360228 URL: https://svnweb.freebsd.org/changeset/base/360228 Log: arm64: rockchip: Fix TSADC on RK3328 The TSADC familiy is a little bit more complex than V2 and V3. Early revision do not use syscon and do not use qsel (RK3288). Next revision still do not use syscon but uses qsel (RK3328). Final revision use both. Submitted by: peterj MFC after: 1 month Modified: head/sys/arm64/rockchip/rk_tsadc.c Modified: head/sys/arm64/rockchip/rk_tsadc.c ============================================================================== --- head/sys/arm64/rockchip/rk_tsadc.c Thu Apr 23 18:04:52 2020 (r360227) +++ head/sys/arm64/rockchip/rk_tsadc.c Thu Apr 23 19:16:20 2020 (r360228) @@ -98,24 +98,19 @@ struct tsensor { int channel; }; -enum tsadc_type { - RK_TSADC_V2, - RK_TSADC_V3 -}; - struct rk_calib_entry { uint32_t raw; int temp; }; struct tsadc_calib_info { - bool decrement_mode; struct rk_calib_entry *table; int nentries; }; struct tsadc_conf { - enum tsadc_type type; + int use_syscon; + int q_sel_ntc; int shutdown_temp; int shutdown_mode; int shutdown_pol; @@ -188,7 +183,8 @@ struct tsensor rk3288_tsensors[] = { }; struct tsadc_conf rk3288_tsadc_conf = { - .type = RK_TSADC_V2, + .use_syscon = 0, + .q_sel_ntc = 0, .shutdown_temp = 95000, .shutdown_mode = 1, /* GPIO */ .shutdown_pol = 0, /* Low */ @@ -241,7 +237,8 @@ static struct tsensor rk3328_tsensors[] = { }; static struct tsadc_conf rk3328_tsadc_conf = { - .type = RK_TSADC_V3, + .use_syscon = 0, + .q_sel_ntc = 1, .shutdown_temp = 95000, .shutdown_mode = 0, /* CRU */ .shutdown_pol = 0, /* Low */ @@ -296,7 +293,8 @@ static struct tsensor rk3399_tsensors[] = { }; static struct tsadc_conf rk3399_tsadc_conf = { - .type = RK_TSADC_V3, + .use_syscon = 1, + .q_sel_ntc = 1, .shutdown_temp = 95000, .shutdown_mode = 1, /* GPIO */ .shutdown_pol = 0, /* Low */ @@ -444,11 +442,11 @@ tsadc_init(struct tsadc_softc *sc) val |= TSADC_AUTO_CON_POL_HI; else val &= ~TSADC_AUTO_CON_POL_HI; - if (sc->conf->type == RK_TSADC_V3) + if (sc->conf->q_sel_ntc) val |= TSADC_AUTO_Q_SEL; WR4(sc, TSADC_AUTO_CON, val); - if (sc->conf->type == RK_TSADC_V2) { + if (!sc->conf->use_syscon) { /* V2 init */ WR4(sc, TSADC_AUTO_PERIOD, 250); /* 250 ms */ WR4(sc, TSADC_AUTO_PERIOD_HT, 50); /* 50 ms */ From owner-svn-src-all@freebsd.org Thu Apr 23 19:20:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A2F62C0E60; Thu, 23 Apr 2020 19:20:59 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497Rwq3dskz4Dft; Thu, 23 Apr 2020 19:20:59 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DF6697E2; Thu, 23 Apr 2020 19:20:59 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NJKxqX000423; Thu, 23 Apr 2020 19:20:59 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NJKwXO000421; Thu, 23 Apr 2020 19:20:58 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202004231920.03NJKwXO000421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 23 Apr 2020 19:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360229 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 360229 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 19:20:59 -0000 Author: allanjude Date: Thu Apr 23 19:20:58 2020 New Revision: 360229 URL: https://svnweb.freebsd.org/changeset/base/360229 Log: Add VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend This will advertise support for TRIM to the guest virtio-blk driver and perform the DIOCGDELETE ioctl on the backing storage if it supports it. Thanks to Jason King and others at Joyent and illumos for expanding on my original patch, adding improvements including better error handling and making sure to following the virtio spec. Submitted by: Jason King (improvements) Reviewed by: jhb Obtained from: illumos-joyent (improvements) MFC after: 1 month Relnotes: yes Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D21707 Modified: head/usr.sbin/bhyve/block_if.c head/usr.sbin/bhyve/pci_virtio_block.c Modified: head/usr.sbin/bhyve/block_if.c ============================================================================== --- head/usr.sbin/bhyve/block_if.c Thu Apr 23 19:16:20 2020 (r360228) +++ head/usr.sbin/bhyve/block_if.c Thu Apr 23 19:20:58 2020 (r360229) @@ -3,6 +3,7 @@ * * Copyright (c) 2013 Peter Grehan * All rights reserved. + * Copyright 2020 Joyent, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -410,6 +411,8 @@ blockif_open(const char *optstr, const char *ident) off_t size, psectsz, psectoff; int extra, fd, i, sectsz; int nocache, sync, ro, candelete, geom, ssopt, pssopt; + int nodelete; + #ifndef WITHOUT_CAPSICUM cap_rights_t rights; cap_ioctl_t cmds[] = { DIOCGFLUSH, DIOCGDELETE }; @@ -422,6 +425,7 @@ blockif_open(const char *optstr, const char *ident) nocache = 0; sync = 0; ro = 0; + nodelete = 0; /* * The first element in the optstring is always a pathname. @@ -434,6 +438,8 @@ blockif_open(const char *optstr, const char *ident) continue; else if (!strcmp(cp, "nocache")) nocache = 1; + else if (!strcmp(cp, "nodelete")) + nodelete = 1; else if (!strcmp(cp, "sync") || !strcmp(cp, "direct")) sync = 1; else if (!strcmp(cp, "ro")) @@ -500,7 +506,7 @@ blockif_open(const char *optstr, const char *ident) ioctl(fd, DIOCGSTRIPEOFFSET, &psectoff); strlcpy(arg.name, "GEOM::candelete", sizeof(arg.name)); arg.len = sizeof(arg.value.i); - if (ioctl(fd, DIOCGATTR, &arg) == 0) + if (nodelete == 0 && ioctl(fd, DIOCGATTR, &arg) == 0) candelete = arg.value.i; if (ioctl(fd, DIOCGPROVIDERNAME, name) == 0) geom = 1; Modified: head/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_block.c Thu Apr 23 19:16:20 2020 (r360228) +++ head/usr.sbin/bhyve/pci_virtio_block.c Thu Apr 23 19:20:58 2020 (r360229) @@ -3,7 +3,7 @@ * * Copyright (c) 2011 NetApp, Inc. * All rights reserved. - * Copyright (c) 2019 Joyent, Inc. + * Copyright 2020 Joyent, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -57,26 +57,37 @@ __FBSDID("$FreeBSD$"); #include "virtio.h" #include "block_if.h" -#define VTBLK_RINGSZ 128 +#define VTBLK_BSIZE 512 +#define VTBLK_RINGSZ 128 _Static_assert(VTBLK_RINGSZ <= BLOCKIF_RING_MAX, "Each ring entry must be able to queue a request"); -#define VTBLK_S_OK 0 -#define VTBLK_S_IOERR 1 +#define VTBLK_S_OK 0 +#define VTBLK_S_IOERR 1 #define VTBLK_S_UNSUPP 2 #define VTBLK_BLK_ID_BYTES 20 + 1 /* Capability bits */ -#define VTBLK_F_SEG_MAX (1 << 2) /* Maximum request segments */ -#define VTBLK_F_BLK_SIZE (1 << 6) /* cfg block size valid */ -#define VTBLK_F_FLUSH (1 << 9) /* Cache flush support */ -#define VTBLK_F_TOPOLOGY (1 << 10) /* Optimal I/O alignment */ +#define VTBLK_F_BARRIER (1 << 0) /* Does host support barriers? */ +#define VTBLK_F_SIZE_MAX (1 << 1) /* Indicates maximum segment size */ +#define VTBLK_F_SEG_MAX (1 << 2) /* Indicates maximum # of segments */ +#define VTBLK_F_GEOMETRY (1 << 4) /* Legacy geometry available */ +#define VTBLK_F_RO (1 << 5) /* Disk is read-only */ +#define VTBLK_F_BLK_SIZE (1 << 6) /* Block size of disk is available*/ +#define VTBLK_F_SCSI (1 << 7) /* Supports scsi command passthru */ +#define VTBLK_F_FLUSH (1 << 9) /* Writeback mode enabled after reset */ +#define VTBLK_F_WCE (1 << 9) /* Legacy alias for FLUSH */ +#define VTBLK_F_TOPOLOGY (1 << 10) /* Topology information is available */ +#define VTBLK_F_CONFIG_WCE (1 << 11) /* Writeback mode available in config */ +#define VTBLK_F_MQ (1 << 12) /* Multi-Queue */ +#define VTBLK_F_DISCARD (1 << 13) /* Trim blocks */ +#define VTBLK_F_WRITE_ZEROES (1 << 14) /* Write zeros */ /* * Host capabilities */ -#define VTBLK_S_HOSTCAPS \ +#define VTBLK_S_HOSTCAPS \ ( VTBLK_F_SEG_MAX | \ VTBLK_F_BLK_SIZE | \ VTBLK_F_FLUSH | \ @@ -84,6 +95,18 @@ _Static_assert(VTBLK_RINGSZ <= BLOCKIF_RING_MAX, "Each VIRTIO_RING_F_INDIRECT_DESC ) /* indirect descriptors */ /* + * The current blockif_delete() interface only allows a single delete + * request at a time. + */ +#define VTBLK_MAX_DISCARD_SEG 1 + +/* + * An arbitrary limit to prevent excessive latency due to large + * delete requests. + */ +#define VTBLK_MAX_DISCARD_SECT ((16 << 20) / VTBLK_BSIZE) /* 16 MiB */ + +/* * Config space "registers" */ struct vtblk_config { @@ -103,6 +126,15 @@ struct vtblk_config { uint32_t opt_io_size; } vbc_topology; uint8_t vbc_writeback; + uint8_t unused0[1]; + uint16_t num_queues; + uint32_t max_discard_sectors; + uint32_t max_discard_seg; + uint32_t discard_sector_alignment; + uint32_t max_write_zeroes_sectors; + uint32_t max_write_zeroes_seg; + uint8_t write_zeroes_may_unmap; + uint8_t unused1[3]; } __packed; /* @@ -111,9 +143,14 @@ struct vtblk_config { struct virtio_blk_hdr { #define VBH_OP_READ 0 #define VBH_OP_WRITE 1 +#define VBH_OP_SCSI_CMD 2 +#define VBH_OP_SCSI_CMD_OUT 3 #define VBH_OP_FLUSH 4 #define VBH_OP_FLUSH_OUT 5 #define VBH_OP_IDENT 8 +#define VBH_OP_DISCARD 11 +#define VBH_OP_WRITE_ZEROES 13 + #define VBH_FLAG_BARRIER 0x80000000 /* OR'ed into vbh_type */ uint32_t vbh_type; uint32_t vbh_ioprio; @@ -124,8 +161,8 @@ struct virtio_blk_hdr { * Debug printf */ static int pci_vtblk_debug; -#define DPRINTF(params) if (pci_vtblk_debug) PRINTLN params -#define WPRINTF(params) PRINTLN params +#define DPRINTF(params) if (pci_vtblk_debug) PRINTLN params +#define WPRINTF(params) PRINTLN params struct pci_vtblk_ioreq { struct blockif_req io_req; @@ -134,6 +171,15 @@ struct pci_vtblk_ioreq { uint16_t io_idx; }; +struct virtio_blk_discard_write_zeroes { + uint64_t sector; + uint32_t num_sectors; + struct { + uint32_t unmap:1; + uint32_t reserved:31; + } flags; +}; + /* * Per-device softc */ @@ -142,6 +188,7 @@ struct pci_vtblk_softc { pthread_mutex_t vsc_mtx; struct vqueue_info vbsc_vq; struct vtblk_config vbsc_cfg; + struct virtio_consts vbsc_consts; struct blockif_ctxt *bc; char vbsc_ident[VTBLK_BLK_ID_BYTES]; struct pci_vtblk_ioreq vbsc_ios[VTBLK_RINGSZ]; @@ -174,9 +221,8 @@ pci_vtblk_reset(void *vsc) } static void -pci_vtblk_done(struct blockif_req *br, int err) +pci_vtblk_done_locked(struct pci_vtblk_ioreq *io, int err) { - struct pci_vtblk_ioreq *io = br->br_param; struct pci_vtblk_softc *sc = io->io_sc; /* convert errno into a virtio block error return */ @@ -191,9 +237,18 @@ pci_vtblk_done(struct blockif_req *br, int err) * Return the descriptor back to the host. * We wrote 1 byte (our status) to host. */ - pthread_mutex_lock(&sc->vsc_mtx); vq_relchain(&sc->vbsc_vq, io->io_idx, 1); vq_endchains(&sc->vbsc_vq, 0); +} + +static void +pci_vtblk_done(struct blockif_req *br, int err) +{ + struct pci_vtblk_ioreq *io = br->br_param; + struct pci_vtblk_softc *sc = io->io_sc; + + pthread_mutex_lock(&sc->vsc_mtx); + pci_vtblk_done_locked(io, err); pthread_mutex_unlock(&sc->vsc_mtx); } @@ -208,6 +263,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vque int writeop, type; struct iovec iov[BLOCKIF_IOV_MAX + 2]; uint16_t idx, flags[BLOCKIF_IOV_MAX + 2]; + struct virtio_blk_discard_write_zeroes *discard; n = vq_getchain(vq, &idx, iov, BLOCKIF_IOV_MAX + 2, flags); @@ -224,11 +280,11 @@ pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vque io = &sc->vbsc_ios[idx]; assert((flags[0] & VRING_DESC_F_WRITE) == 0); assert(iov[0].iov_len == sizeof(struct virtio_blk_hdr)); - vbh = iov[0].iov_base; + vbh = (struct virtio_blk_hdr *)iov[0].iov_base; memcpy(&io->io_req.br_iov, &iov[1], sizeof(struct iovec) * (n - 2)); io->io_req.br_iovcnt = n - 2; - io->io_req.br_offset = vbh->vbh_sector * DEV_BSIZE; - io->io_status = iov[--n].iov_base; + io->io_req.br_offset = vbh->vbh_sector * VTBLK_BSIZE; + io->io_status = (uint8_t *)iov[--n].iov_base; assert(iov[n].iov_len == 1); assert(flags[n] & VRING_DESC_F_WRITE); @@ -238,7 +294,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vque * we don't advertise the capability. */ type = vbh->vbh_type & ~VBH_FLAG_BARRIER; - writeop = (type == VBH_OP_WRITE); + writeop = (type == VBH_OP_WRITE || type == VBH_OP_DISCARD); iolen = 0; for (i = 1; i < n; i++) { @@ -254,7 +310,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vque io->io_req.br_resid = iolen; DPRINTF(("virtio-block: %s op, %zd bytes, %d segs, offset %ld", - writeop ? "write" : "read/ident", iolen, i - 1, + writeop ? "write/discard" : "read/ident", iolen, i - 1, io->io_req.br_offset)); switch (type) { @@ -264,6 +320,46 @@ pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vque case VBH_OP_WRITE: err = blockif_write(sc->bc, &io->io_req); break; + case VBH_OP_DISCARD: + /* + * We currently only support a single request, if the guest + * has submitted a request that doesn't conform to the + * requirements, we return a error. + */ + if (iov[1].iov_len != sizeof (*discard)) { + pci_vtblk_done_locked(io, EINVAL); + return; + } + + /* The segments to discard are provided rather than data */ + discard = (struct virtio_blk_discard_write_zeroes *) + iov[1].iov_base; + + /* + * virtio v1.1 5.2.6.2: + * The device MUST set the status byte to VIRTIO_BLK_S_UNSUPP + * for discard and write zeroes commands if any unknown flag is + * set. Furthermore, the device MUST set the status byte to + * VIRTIO_BLK_S_UNSUPP for discard commands if the unmap flag + * is set. + * + * Currently there are no known flags for a DISCARD request. + */ + if (discard->flags.unmap != 0 || discard->flags.reserved != 0) { + pci_vtblk_done_locked(io, ENOTSUP); + return; + } + + /* Make sure the request doesn't exceed our size limit */ + if (discard->num_sectors > VTBLK_MAX_DISCARD_SECT) { + pci_vtblk_done_locked(io, EINVAL); + return; + } + + io->io_req.br_offset = discard->sector * VTBLK_BSIZE; + io->io_req.br_resid = discard->num_sectors * VTBLK_BSIZE; + err = blockif_delete(sc->bc, &io->io_req); + break; case VBH_OP_FLUSH: case VBH_OP_FLUSH_OUT: err = blockif_flush(sc->bc, &io->io_req); @@ -274,10 +370,10 @@ pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vque memset(iov[1].iov_base, 0, iov[1].iov_len); strncpy(iov[1].iov_base, sc->vbsc_ident, MIN(iov[1].iov_len, sizeof(sc->vbsc_ident))); - pci_vtblk_done(&io->io_req, 0); + pci_vtblk_done_locked(io, 0); return; default: - pci_vtblk_done(&io->io_req, EOPNOTSUPP); + pci_vtblk_done_locked(io, EOPNOTSUPP); return; } assert(err == 0); @@ -332,10 +428,14 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_devinst * io->io_idx = i; } + bcopy(&vtblk_vi_consts, &sc->vbsc_consts, sizeof (vtblk_vi_consts)); + if (blockif_candelete(sc->bc)) + sc->vbsc_consts.vc_hv_caps |= VTBLK_F_DISCARD; + pthread_mutex_init(&sc->vsc_mtx, NULL); /* init virtio softc and virtqueues */ - vi_softc_linkup(&sc->vbsc_vs, &vtblk_vi_consts, sc, pi, &sc->vbsc_vq); + vi_softc_linkup(&sc->vbsc_vs, &sc->vbsc_consts, sc, pi, &sc->vbsc_vq); sc->vbsc_vs.vs_mtx = &sc->vsc_mtx; sc->vbsc_vq.vq_qsize = VTBLK_RINGSZ; @@ -353,7 +453,7 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_devinst * digest[0], digest[1], digest[2], digest[3], digest[4], digest[5]); /* setup virtio block config space */ - sc->vbsc_cfg.vbc_capacity = size / DEV_BSIZE; /* 512-byte units */ + sc->vbsc_cfg.vbc_capacity = size / VTBLK_BSIZE; /* 512-byte units */ sc->vbsc_cfg.vbc_size_max = 0; /* not negotiated */ /* @@ -375,6 +475,9 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_devinst * sc->vbsc_cfg.vbc_topology.min_io_size = 0; sc->vbsc_cfg.vbc_topology.opt_io_size = 0; sc->vbsc_cfg.vbc_writeback = 0; + sc->vbsc_cfg.max_discard_sectors = VTBLK_MAX_DISCARD_SECT; + sc->vbsc_cfg.max_discard_seg = VTBLK_MAX_DISCARD_SEG; + sc->vbsc_cfg.discard_sector_alignment = sectsz / VTBLK_BSIZE; /* * Should we move some of this into virtio.c? Could From owner-svn-src-all@freebsd.org Thu Apr 23 20:15:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 268D72C21FC; Thu, 23 Apr 2020 20:15:00 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497T776z4vz4HKv; Thu, 23 Apr 2020 20:14:59 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA940A1FE; Thu, 23 Apr 2020 20:14:59 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NKEx1U039433; Thu, 23 Apr 2020 20:14:59 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NKExnc039432; Thu, 23 Apr 2020 20:14:59 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <202004232014.03NKExnc039432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 23 Apr 2020 20:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360230 - head/usr.sbin/trim X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/usr.sbin/trim X-SVN-Commit-Revision: 360230 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 20:15:00 -0000 Author: allanjude Date: Thu Apr 23 20:14:59 2020 New Revision: 360230 URL: https://svnweb.freebsd.org/changeset/base/360230 Log: trim(8): candelete() returns wrong results because fd is opened O_WRONLY This was discovered while using trim(8) to test bhyve trim Reviewed by: asomers Differential Revision: https://reviews.freebsd.org/D24371 Modified: head/usr.sbin/trim/trim.c Modified: head/usr.sbin/trim/trim.c ============================================================================== --- head/usr.sbin/trim/trim.c Thu Apr 23 19:20:58 2020 (r360229) +++ head/usr.sbin/trim/trim.c Thu Apr 23 20:14:59 2020 (r360230) @@ -220,7 +220,7 @@ trim(const char *path, off_t offset, off_t length, boo return (0); } - fd = opendev(path, O_WRONLY | O_DIRECT); + fd = opendev(path, O_RDWR | O_DIRECT); arg[0] = offset; arg[1] = length; From owner-svn-src-all@freebsd.org Thu Apr 23 21:16:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 970122C3BDC; Thu, 23 Apr 2020 21:16:52 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497VVX3X06z4LRd; Thu, 23 Apr 2020 21:16:52 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 743C5AD7D; Thu, 23 Apr 2020 21:16:52 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NLGqZZ076571; Thu, 23 Apr 2020 21:16:52 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NLGq7N076570; Thu, 23 Apr 2020 21:16:52 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202004232116.03NLGq7N076570@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 23 Apr 2020 21:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360231 - head/lib/libc/net X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/lib/libc/net X-SVN-Commit-Revision: 360231 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 21:16:52 -0000 Author: kp Date: Thu Apr 23 21:16:51 2020 New Revision: 360231 URL: https://svnweb.freebsd.org/changeset/base/360231 Log: libc: Shortcut if_indextoname() if index == 0 If the index we're trying to convert is 0 we can avoid a potentially expensive call to getifaddrs(). No interface has an ifindex of zero, so we can handle this as an error: set the errno to ENXIO and return NULL. Submitted by: Nick Rogers Reviewed by: lutz at donnerhacke.de MFC after: 2 weeks Sponsored by: RG Nets Differential Revision: https://reviews.freebsd.org/D24524 Modified: head/lib/libc/net/if_indextoname.c Modified: head/lib/libc/net/if_indextoname.c ============================================================================== --- head/lib/libc/net/if_indextoname.c Thu Apr 23 20:14:59 2020 (r360230) +++ head/lib/libc/net/if_indextoname.c Thu Apr 23 21:16:51 2020 (r360231) @@ -66,6 +66,11 @@ if_indextoname(unsigned int ifindex, char *ifname) struct ifaddrs *ifaddrs, *ifa; int error = 0; + if (ifindex == 0) { + errno = ENXIO; + return(NULL); + } + if (getifaddrs(&ifaddrs) < 0) return(NULL); /* getifaddrs properly set errno */ From owner-svn-src-all@freebsd.org Thu Apr 23 23:54:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 739B42C7598; Thu, 23 Apr 2020 23:54:24 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497Z0J2VNXz4VQR; Thu, 23 Apr 2020 23:54:24 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50F2FCDD5; Thu, 23 Apr 2020 23:54:24 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NNsOdq074881; Thu, 23 Apr 2020 23:54:24 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NNsOH0074880; Thu, 23 Apr 2020 23:54:24 GMT (envelope-from np@FreeBSD.org) Message-Id: <202004232354.03NNsOH0074880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 23 Apr 2020 23:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360232 - head/sys/dev/cxgbe/crypto X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/crypto X-SVN-Commit-Revision: 360232 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 23:54:24 -0000 Author: np Date: Thu Apr 23 23:54:23 2020 New Revision: 360232 URL: https://svnweb.freebsd.org/changeset/base/360232 Log: cxgbe/crypto: Fix the key size in a couple of places to catch up with the recent OCF refactor. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/crypto/t4_kern_tls.c Modified: head/sys/dev/cxgbe/crypto/t4_kern_tls.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_kern_tls.c Thu Apr 23 21:16:51 2020 (r360231) +++ head/sys/dev/cxgbe/crypto/t4_kern_tls.c Thu Apr 23 23:54:23 2020 (r360232) @@ -812,11 +812,11 @@ ktls_setup_keys(struct tlspcb *tlsp, const struct ktls if (tlsp->enc_mode == SCMD_CIPH_MODE_AES_GCM) { memcpy(khdr->txsalt, tls->params.iv, SALT_SIZE); t4_init_gmac_hash(tls->params.cipher_key, - tls->params.cipher_key_len * 8, + tls->params.cipher_key_len, (char *)key + tls->params.cipher_key_len); } else { t4_init_hmac_digest(axf, partial_digest_len, - tls->params.auth_key, tls->params.auth_key_len * 8, + tls->params.auth_key, tls->params.auth_key_len, (char *)key + tls->params.cipher_key_len); } From owner-svn-src-all@freebsd.org Thu Apr 23 23:57:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4ED1F2C78DE; Thu, 23 Apr 2020 23:57:45 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497Z491ht0z4Vcc; Thu, 23 Apr 2020 23:57:45 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3474CCDDB; Thu, 23 Apr 2020 23:57:45 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03NNvjZW075112; Thu, 23 Apr 2020 23:57:45 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03NNvhdL075102; Thu, 23 Apr 2020 23:57:43 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <202004232357.03NNvhdL075102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Thu, 23 Apr 2020 23:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360233 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src lib/libc/stdlib/jemalloc X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src lib/libc/stdlib/jemalloc X-SVN-Commit-Revision: 360233 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 23:57:45 -0000 Author: vangyzen Date: Thu Apr 23 23:57:43 2020 New Revision: 360233 URL: https://svnweb.freebsd.org/changeset/base/360233 Log: Update jemalloc to version 5.2.1 Revert r354606 to restore r354605. Apply one line from jemalloc commit d01b425e5d1e1 in hash_x86_128() to fix the build with gcc, which only allows a fallthrough attribute to appear before a case or default label. Submitted by: jasone in r354605 Discussed with: jasone Reviewed by: bdrewery MFC after: never, due to gcc 4.2.1 Relnotes: yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24522 Added: head/contrib/jemalloc/include/jemalloc/internal/bin_types.h - copied unchanged from r354605, head/contrib/jemalloc/include/jemalloc/internal/bin_types.h head/contrib/jemalloc/include/jemalloc/internal/hook.h - copied unchanged from r354605, head/contrib/jemalloc/include/jemalloc/internal/hook.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs_FreeBSD.h - copied unchanged from r354605, head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs_FreeBSD.h head/contrib/jemalloc/include/jemalloc/internal/quantum.h - copied unchanged from r354605, head/contrib/jemalloc/include/jemalloc/internal/quantum.h head/contrib/jemalloc/include/jemalloc/internal/safety_check.h - copied unchanged from r354605, head/contrib/jemalloc/include/jemalloc/internal/safety_check.h head/contrib/jemalloc/include/jemalloc/internal/sc.h - copied unchanged from r354605, head/contrib/jemalloc/include/jemalloc/internal/sc.h head/contrib/jemalloc/include/jemalloc/internal/seq.h - copied unchanged from r354605, head/contrib/jemalloc/include/jemalloc/internal/seq.h head/contrib/jemalloc/include/jemalloc/internal/test_hooks.h - copied unchanged from r354605, head/contrib/jemalloc/include/jemalloc/internal/test_hooks.h head/contrib/jemalloc/src/hook.c - copied unchanged from r354605, head/contrib/jemalloc/src/hook.c head/contrib/jemalloc/src/safety_check.c - copied unchanged from r354605, head/contrib/jemalloc/src/safety_check.c head/contrib/jemalloc/src/sc.c - copied unchanged from r354605, head/contrib/jemalloc/src/sc.c head/contrib/jemalloc/src/test_hooks.c - copied unchanged from r354605, head/contrib/jemalloc/src/test_hooks.c Deleted: head/contrib/jemalloc/include/jemalloc/internal/hooks.h head/contrib/jemalloc/include/jemalloc/internal/size_classes.h head/contrib/jemalloc/src/hooks.c Modified: head/contrib/jemalloc/COPYING head/contrib/jemalloc/ChangeLog head/contrib/jemalloc/FREEBSD-Xlist head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/VERSION head/contrib/jemalloc/doc/jemalloc.3 head/contrib/jemalloc/include/jemalloc/internal/arena_externs.h head/contrib/jemalloc/include/jemalloc/internal/arena_inlines_b.h head/contrib/jemalloc/include/jemalloc/internal/arena_stats.h head/contrib/jemalloc/include/jemalloc/internal/arena_structs_b.h head/contrib/jemalloc/include/jemalloc/internal/arena_types.h head/contrib/jemalloc/include/jemalloc/internal/atomic.h head/contrib/jemalloc/include/jemalloc/internal/atomic_gcc_atomic.h head/contrib/jemalloc/include/jemalloc/internal/atomic_gcc_sync.h head/contrib/jemalloc/include/jemalloc/internal/background_thread_externs.h head/contrib/jemalloc/include/jemalloc/internal/background_thread_inlines.h head/contrib/jemalloc/include/jemalloc/internal/background_thread_structs.h head/contrib/jemalloc/include/jemalloc/internal/base_structs.h head/contrib/jemalloc/include/jemalloc/internal/bin.h head/contrib/jemalloc/include/jemalloc/internal/bin_stats.h head/contrib/jemalloc/include/jemalloc/internal/bit_util.h head/contrib/jemalloc/include/jemalloc/internal/bitmap.h head/contrib/jemalloc/include/jemalloc/internal/cache_bin.h head/contrib/jemalloc/include/jemalloc/internal/ctl.h head/contrib/jemalloc/include/jemalloc/internal/emitter.h head/contrib/jemalloc/include/jemalloc/internal/extent_externs.h head/contrib/jemalloc/include/jemalloc/internal/extent_inlines.h head/contrib/jemalloc/include/jemalloc/internal/extent_structs.h head/contrib/jemalloc/include/jemalloc/internal/extent_types.h head/contrib/jemalloc/include/jemalloc/internal/hash.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_externs.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_a.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_b.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_inlines_c.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_types.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_preamble.h head/contrib/jemalloc/include/jemalloc/internal/large_externs.h head/contrib/jemalloc/include/jemalloc/internal/malloc_io.h head/contrib/jemalloc/include/jemalloc/internal/mutex.h head/contrib/jemalloc/include/jemalloc/internal/mutex_prof.h head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h head/contrib/jemalloc/include/jemalloc/internal/prof_externs.h head/contrib/jemalloc/include/jemalloc/internal/prof_inlines_a.h head/contrib/jemalloc/include/jemalloc/internal/prof_inlines_b.h head/contrib/jemalloc/include/jemalloc/internal/prof_structs.h head/contrib/jemalloc/include/jemalloc/internal/public_namespace.h head/contrib/jemalloc/include/jemalloc/internal/rtree.h head/contrib/jemalloc/include/jemalloc/internal/rtree_tsd.h head/contrib/jemalloc/include/jemalloc/internal/stats.h head/contrib/jemalloc/include/jemalloc/internal/sz.h head/contrib/jemalloc/include/jemalloc/internal/tcache_externs.h head/contrib/jemalloc/include/jemalloc/internal/tcache_inlines.h head/contrib/jemalloc/include/jemalloc/internal/tcache_structs.h head/contrib/jemalloc/include/jemalloc/internal/tcache_types.h head/contrib/jemalloc/include/jemalloc/internal/ticker.h head/contrib/jemalloc/include/jemalloc/internal/tsd.h head/contrib/jemalloc/include/jemalloc/internal/tsd_generic.h head/contrib/jemalloc/include/jemalloc/internal/tsd_malloc_thread_cleanup.h head/contrib/jemalloc/include/jemalloc/internal/tsd_tls.h head/contrib/jemalloc/include/jemalloc/internal/witness.h head/contrib/jemalloc/include/jemalloc/jemalloc.h head/contrib/jemalloc/src/arena.c head/contrib/jemalloc/src/background_thread.c head/contrib/jemalloc/src/base.c head/contrib/jemalloc/src/bin.c head/contrib/jemalloc/src/ckh.c head/contrib/jemalloc/src/ctl.c head/contrib/jemalloc/src/extent.c head/contrib/jemalloc/src/extent_dss.c head/contrib/jemalloc/src/extent_mmap.c head/contrib/jemalloc/src/jemalloc.c head/contrib/jemalloc/src/large.c head/contrib/jemalloc/src/malloc_io.c head/contrib/jemalloc/src/mutex.c head/contrib/jemalloc/src/pages.c head/contrib/jemalloc/src/prof.c head/contrib/jemalloc/src/rtree.c head/contrib/jemalloc/src/stats.c head/contrib/jemalloc/src/sz.c head/contrib/jemalloc/src/tcache.c head/contrib/jemalloc/src/tsd.c head/lib/libc/stdlib/jemalloc/Makefile.inc Modified: head/contrib/jemalloc/COPYING ============================================================================== --- head/contrib/jemalloc/COPYING Thu Apr 23 23:54:23 2020 (r360232) +++ head/contrib/jemalloc/COPYING Thu Apr 23 23:57:43 2020 (r360233) @@ -1,10 +1,10 @@ Unless otherwise specified, files in the jemalloc source distribution are subject to the following license: -------------------------------------------------------------------------------- -Copyright (C) 2002-2018 Jason Evans . +Copyright (C) 2002-present Jason Evans . All rights reserved. Copyright (C) 2007-2012 Mozilla Foundation. All rights reserved. -Copyright (C) 2009-2018 Facebook, Inc. All rights reserved. +Copyright (C) 2009-present Facebook, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Modified: head/contrib/jemalloc/ChangeLog ============================================================================== --- head/contrib/jemalloc/ChangeLog Thu Apr 23 23:54:23 2020 (r360232) +++ head/contrib/jemalloc/ChangeLog Thu Apr 23 23:57:43 2020 (r360233) @@ -4,7 +4,143 @@ brevity. Much more detail can be found in the git rev https://github.com/jemalloc/jemalloc -* 5.1.0 (May 4th, 2018) +* 5.2.1 (August 5, 2019) + + This release is primarily about Windows. A critical virtual memory leak is + resolved on all Windows platforms. The regression was present in all releases + since 5.0.0. + + Bug fixes: + - Fix a severe virtual memory leak on Windows. This regression was first + released in 5.0.0. (@Ignition, @j0t, @frederik-h, @davidtgoldblatt, + @interwq) + - Fix size 0 handling in posix_memalign(). This regression was first released + in 5.2.0. (@interwq) + - Fix the prof_log unit test which may observe unexpected backtraces from + compiler optimizations. The test was first added in 5.2.0. (@marxin, + @gnzlbg, @interwq) + - Fix the declaration of the extent_avail tree. This regression was first + released in 5.1.0. (@zoulasc) + - Fix an incorrect reference in jeprof. This functionality was first released + in 3.0.0. (@prehistoric-penguin) + - Fix an assertion on the deallocation fast-path. This regression was first + released in 5.2.0. (@yinan1048576) + - Fix the TLS_MODEL attribute in headers. This regression was first released + in 5.0.0. (@zoulasc, @interwq) + + Optimizations and refactors: + - Implement opt.retain on Windows and enable by default on 64-bit. (@interwq, + @davidtgoldblatt) + - Optimize away a branch on the operator delete[] path. (@mgrice) + - Add format annotation to the format generator function. (@zoulasc) + - Refactor and improve the size class header generation. (@yinan1048576) + - Remove best fit. (@djwatson) + - Avoid blocking on background thread locks for stats. (@oranagra, @interwq) + +* 5.2.0 (April 2, 2019) + + This release includes a few notable improvements, which are summarized below: + 1) improved fast-path performance from the optimizations by @djwatson; 2) + reduced virtual memory fragmentation and metadata usage; and 3) bug fixes on + setting the number of background threads. In addition, peak / spike memory + usage is improved with certain allocation patterns. As usual, the release and + prior dev versions have gone through large-scale production testing. + + New features: + - Implement oversize_threshold, which uses a dedicated arena for allocations + crossing the specified threshold to reduce fragmentation. (@interwq) + - Add extents usage information to stats. (@tyleretzel) + - Log time information for sampled allocations. (@tyleretzel) + - Support 0 size in sdallocx. (@djwatson) + - Output rate for certain counters in malloc_stats. (@zinoale) + - Add configure option --enable-readlinkat, which allows the use of readlinkat + over readlink. (@davidtgoldblatt) + - Add configure options --{enable,disable}-{static,shared} to allow not + building unwanted libraries. (@Ericson2314) + - Add configure option --disable-libdl to enable fully static builds. + (@interwq) + - Add mallctl interfaces: + + opt.oversize_threshold (@interwq) + + stats.arenas..extent_avail (@tyleretzel) + + stats.arenas..extents..n{dirty,muzzy,retained} (@tyleretzel) + + stats.arenas..extents..{dirty,muzzy,retained}_bytes + (@tyleretzel) + + Portability improvements: + - Update MSVC builds. (@maksqwe, @rustyx) + - Workaround a compiler optimizer bug on s390x. (@rkmisra) + - Make use of pthread_set_name_np(3) on FreeBSD. (@trasz) + - Implement malloc_getcpu() to enable percpu_arena for windows. (@santagada) + - Link against -pthread instead of -lpthread. (@paravoid) + - Make background_thread not dependent on libdl. (@interwq) + - Add stringify to fix a linker directive issue on MSVC. (@daverigby) + - Detect and fall back when 8-bit atomics are unavailable. (@interwq) + - Fall back to the default pthread_create if dlsym(3) fails. (@interwq) + + Optimizations and refactors: + - Refactor the TSD module. (@davidtgoldblatt) + - Avoid taking extents_muzzy mutex when muzzy is disabled. (@interwq) + - Avoid taking large_mtx for auto arenas on the tcache flush path. (@interwq) + - Optimize ixalloc by avoiding a size lookup. (@interwq) + - Implement opt.oversize_threshold which uses a dedicated arena for requests + crossing the threshold, also eagerly purges the oversize extents. Default + the threshold to 8 MiB. (@interwq) + - Clean compilation with -Wextra. (@gnzlbg, @jasone) + - Refactor the size class module. (@davidtgoldblatt) + - Refactor the stats emitter. (@tyleretzel) + - Optimize pow2_ceil. (@rkmisra) + - Avoid runtime detection of lazy purging on FreeBSD. (@trasz) + - Optimize mmap(2) alignment handling on FreeBSD. (@trasz) + - Improve error handling for THP state initialization. (@jsteemann) + - Rework the malloc() fast path. (@djwatson) + - Rework the free() fast path. (@djwatson) + - Refactor and optimize the tcache fill / flush paths. (@djwatson) + - Optimize sync / lwsync on PowerPC. (@chmeeedalf) + - Bypass extent_dalloc() when retain is enabled. (@interwq) + - Optimize the locking on large deallocation. (@interwq) + - Reduce the number of pages committed from sanity checking in debug build. + (@trasz, @interwq) + - Deprecate OSSpinLock. (@interwq) + - Lower the default number of background threads to 4 (when the feature + is enabled). (@interwq) + - Optimize the trylock spin wait. (@djwatson) + - Use arena index for arena-matching checks. (@interwq) + - Avoid forced decay on thread termination when using background threads. + (@interwq) + - Disable muzzy decay by default. (@djwatson, @interwq) + - Only initialize libgcc unwinder when profiling is enabled. (@paravoid, + @interwq) + + Bug fixes (all only relevant to jemalloc 5.x): + - Fix background thread index issues with max_background_threads. (@djwatson, + @interwq) + - Fix stats output for opt.lg_extent_max_active_fit. (@interwq) + - Fix opt.prof_prefix initialization. (@davidtgoldblatt) + - Properly trigger decay on tcache destroy. (@interwq, @amosbird) + - Fix tcache.flush. (@interwq) + - Detect whether explicit extent zero out is necessary with huge pages or + custom extent hooks, which may change the purge semantics. (@interwq) + - Fix a side effect caused by extent_max_active_fit combined with decay-based + purging, where freed extents can accumulate and not be reused for an + extended period of time. (@interwq, @mpghf) + - Fix a missing unlock on extent register error handling. (@zoulasc) + + Testing: + - Simplify the Travis script output. (@gnzlbg) + - Update the test scripts for FreeBSD. (@devnexen) + - Add unit tests for the producer-consumer pattern. (@interwq) + - Add Cirrus-CI config for FreeBSD builds. (@jasone) + - Add size-matching sanity checks on tcache flush. (@davidtgoldblatt, + @interwq) + + Incompatible changes: + - Remove --with-lg-page-sizes. (@davidtgoldblatt) + + Documentation: + - Attempt to build docs by default, however skip doc building when xsltproc + is missing. (@interwq, @cmuellner) + +* 5.1.0 (May 4, 2018) This release is primarily about fine-tuning, ranging from several new features to numerous notable performance and portability enhancements. The release and Modified: head/contrib/jemalloc/FREEBSD-Xlist ============================================================================== --- head/contrib/jemalloc/FREEBSD-Xlist Thu Apr 23 23:54:23 2020 (r360232) +++ head/contrib/jemalloc/FREEBSD-Xlist Thu Apr 23 23:57:43 2020 (r360233) @@ -1,6 +1,7 @@ $FreeBSD$ .appveyor.yml .autom4te.cfg +.cirrus.yml .git* .travis.yml FREEBSD-* Modified: head/contrib/jemalloc/FREEBSD-diffs ============================================================================== --- head/contrib/jemalloc/FREEBSD-diffs Thu Apr 23 23:54:23 2020 (r360232) +++ head/contrib/jemalloc/FREEBSD-diffs Thu Apr 23 23:57:43 2020 (r360233) @@ -1,5 +1,5 @@ diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in -index 1e12fd3a..c42a7e10 100644 +index 7fecda7c..d5ca5e86 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in @@ -53,11 +53,22 @@ @@ -26,7 +26,7 @@ index 1e12fd3a..c42a7e10 100644 Standard API -@@ -3376,4 +3387,18 @@ malloc_conf = "narenas:1";]]> +@@ -3510,4 +3521,18 @@ malloc_conf = "narenas:1";]]> The posix_memalign() function conforms to IEEE Std 1003.1-2001 (POSIX.1). @@ -45,26 +45,8 @@ index 1e12fd3a..c42a7e10 100644 + 11.0. + -diff --git a/include/jemalloc/internal/hooks.h b/include/jemalloc/internal/hooks.h -index cd49afcb..85e2a991 100644 ---- a/include/jemalloc/internal/hooks.h -+++ b/include/jemalloc/internal/hooks.h -@@ -6,13 +6,6 @@ extern JEMALLOC_EXPORT void (*hooks_libc_hook)(); - - #define JEMALLOC_HOOK(fn, hook) ((void)(hook != NULL && (hook(), 0)), fn) - --#define open JEMALLOC_HOOK(open, hooks_libc_hook) --#define read JEMALLOC_HOOK(read, hooks_libc_hook) --#define write JEMALLOC_HOOK(write, hooks_libc_hook) --#define readlink JEMALLOC_HOOK(readlink, hooks_libc_hook) --#define close JEMALLOC_HOOK(close, hooks_libc_hook) --#define creat JEMALLOC_HOOK(creat, hooks_libc_hook) --#define secure_getenv JEMALLOC_HOOK(secure_getenv, hooks_libc_hook) - /* Note that this is undef'd and re-define'd in src/prof.c. */ - #define _Unwind_Backtrace JEMALLOC_HOOK(_Unwind_Backtrace, hooks_libc_hook) - diff --git a/include/jemalloc/internal/jemalloc_internal_decls.h b/include/jemalloc/internal/jemalloc_internal_decls.h -index be70df51..84cd70da 100644 +index 7d6053e2..a0e4f5af 100644 --- a/include/jemalloc/internal/jemalloc_internal_decls.h +++ b/include/jemalloc/internal/jemalloc_internal_decls.h @@ -1,6 +1,9 @@ @@ -77,8 +59,23 @@ index be70df51..84cd70da 100644 #include #ifdef _WIN32 # include +diff --git a/include/jemalloc/internal/jemalloc_internal_defs_FreeBSD.h b/include/jemalloc/internal/jemalloc_internal_defs_FreeBSD.h +new file mode 100644 +index 00000000..0dab1296 +--- /dev/null ++++ b/include/jemalloc/internal/jemalloc_internal_defs_FreeBSD.h +@@ -0,0 +1,9 @@ ++#ifndef __clang__ ++# undef JEMALLOC_INTERNAL_UNREACHABLE ++# define JEMALLOC_INTERNAL_UNREACHABLE abort ++ ++# undef JEMALLOC_C11_ATOMICS ++# undef JEMALLOC_GCC_ATOMIC_ATOMICS ++# undef JEMALLOC_GCC_U8_ATOMIC_ATOMICS ++# undef JEMALLOC_GCC_U8_SYNC_ATOMICS ++#endif diff --git a/include/jemalloc/internal/jemalloc_preamble.h.in b/include/jemalloc/internal/jemalloc_preamble.h.in -index e621fbc8..dbdd5d6b 100644 +index 3418cbfa..53e30dc4 100644 --- a/include/jemalloc/internal/jemalloc_preamble.h.in +++ b/include/jemalloc/internal/jemalloc_preamble.h.in @@ -8,6 +8,9 @@ @@ -107,10 +104,10 @@ index e621fbc8..dbdd5d6b 100644 static const bool config_prof = #ifdef JEMALLOC_PROF diff --git a/include/jemalloc/internal/mutex.h b/include/jemalloc/internal/mutex.h -index 6520c251..0013cbe9 100644 +index 7c24f072..94af1618 100644 --- a/include/jemalloc/internal/mutex.h +++ b/include/jemalloc/internal/mutex.h -@@ -121,9 +121,6 @@ struct malloc_mutex_s { +@@ -135,9 +135,6 @@ struct malloc_mutex_s { #ifdef JEMALLOC_LAZY_LOCK extern bool isthreaded; @@ -120,7 +117,7 @@ index 6520c251..0013cbe9 100644 #endif bool malloc_mutex_init(malloc_mutex_t *mutex, const char *name, -@@ -131,6 +128,7 @@ bool malloc_mutex_init(malloc_mutex_t *mutex, const char *name, +@@ -145,6 +142,7 @@ bool malloc_mutex_init(malloc_mutex_t *mutex, const char *name, void malloc_mutex_prefork(tsdn_t *tsdn, malloc_mutex_t *mutex); void malloc_mutex_postfork_parent(tsdn_t *tsdn, malloc_mutex_t *mutex); void malloc_mutex_postfork_child(tsdn_t *tsdn, malloc_mutex_t *mutex); @@ -128,20 +125,38 @@ index 6520c251..0013cbe9 100644 bool malloc_mutex_boot(void); void malloc_mutex_prof_data_reset(tsdn_t *tsdn, malloc_mutex_t *mutex); +diff --git a/include/jemalloc/internal/test_hooks.h b/include/jemalloc/internal/test_hooks.h +index a6351e59..0780c52f 100644 +--- a/include/jemalloc/internal/test_hooks.h ++++ b/include/jemalloc/internal/test_hooks.h +@@ -6,13 +6,6 @@ extern JEMALLOC_EXPORT void (*test_hooks_libc_hook)(); + + #define JEMALLOC_HOOK(fn, hook) ((void)(hook != NULL && (hook(), 0)), fn) + +-#define open JEMALLOC_HOOK(open, test_hooks_libc_hook) +-#define read JEMALLOC_HOOK(read, test_hooks_libc_hook) +-#define write JEMALLOC_HOOK(write, test_hooks_libc_hook) +-#define readlink JEMALLOC_HOOK(readlink, test_hooks_libc_hook) +-#define close JEMALLOC_HOOK(close, test_hooks_libc_hook) +-#define creat JEMALLOC_HOOK(creat, test_hooks_libc_hook) +-#define secure_getenv JEMALLOC_HOOK(secure_getenv, test_hooks_libc_hook) + /* Note that this is undef'd and re-define'd in src/prof.c. */ + #define _Unwind_Backtrace JEMALLOC_HOOK(_Unwind_Backtrace, test_hooks_libc_hook) + diff --git a/include/jemalloc/internal/tsd.h b/include/jemalloc/internal/tsd.h -index 0b9841aa..f03eee61 100644 +index 9ba26004..ecfda5d6 100644 --- a/include/jemalloc/internal/tsd.h +++ b/include/jemalloc/internal/tsd.h -@@ -122,7 +122,8 @@ struct tsd_s { - t use_a_getter_or_setter_instead_##n; +@@ -198,7 +198,8 @@ struct tsd_s { + t TSD_MANGLE(n); MALLOC_TSD #undef O -}; +/* AddressSanitizer requires TLS data to be aligned to at least 8 bytes. */ +} JEMALLOC_ALIGNED(16); - /* - * Wrapper around tsd_t that makes it possible to avoid implicit conversion + JEMALLOC_ALWAYS_INLINE uint8_t + tsd_state_get(tsd_t *tsd) { diff --git a/include/jemalloc/jemalloc_FreeBSD.h b/include/jemalloc/jemalloc_FreeBSD.h new file mode 100644 index 00000000..b752b0e7 @@ -345,10 +360,10 @@ index f9438912..47d032c1 100755 +#include "jemalloc_FreeBSD.h" EOF diff --git a/src/jemalloc.c b/src/jemalloc.c -index f93c16fa..e0ad297b 100644 +index ed13718d..fefb719a 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c -@@ -21,6 +21,10 @@ +@@ -23,6 +23,10 @@ /******************************************************************************/ /* Data. */ @@ -359,10 +374,37 @@ index f93c16fa..e0ad297b 100644 /* Runtime configuration options. */ const char *je_malloc_conf #ifndef _WIN32 -@@ -3160,6 +3164,103 @@ je_malloc_usable_size(JEMALLOC_USABLE_SIZE_CONST void *ptr) { +@@ -2660,25 +2664,6 @@ je_realloc(void *ptr, size_t arg_size) { + LOG("core.realloc.entry", "ptr: %p, size: %zu\n", ptr, size); + + if (unlikely(size == 0)) { +- if (ptr != NULL) { +- /* realloc(ptr, 0) is equivalent to free(ptr). */ +- UTRACE(ptr, 0, 0); +- tcache_t *tcache; +- tsd_t *tsd = tsd_fetch(); +- if (tsd_reentrancy_level_get(tsd) == 0) { +- tcache = tcache_get(tsd); +- } else { +- tcache = NULL; +- } +- +- uintptr_t args[3] = {(uintptr_t)ptr, size}; +- hook_invoke_dalloc(hook_dalloc_realloc, ptr, args); +- +- ifree(tsd, ptr, tcache, true); +- +- LOG("core.realloc.exit", "result: %p", NULL); +- return NULL; +- } + size = 1; + } + +@@ -3750,6 +3735,103 @@ je_malloc_usable_size(JEMALLOC_USABLE_SIZE_CONST void *ptr) { + * End non-standard functions. */ /******************************************************************************/ - /* ++/* + * Begin compatibility functions. + */ + @@ -459,11 +501,10 @@ index f93c16fa..e0ad297b 100644 + * End compatibility functions. + */ +/******************************************************************************/ -+/* + /* * The following functions are used by threading libraries for protection of * malloc during fork(). - */ -@@ -3323,4 +3424,11 @@ jemalloc_postfork_child(void) { +@@ -3919,4 +4001,11 @@ jemalloc_postfork_child(void) { ctl_postfork_child(tsd_tsdn(tsd)); } @@ -476,7 +517,7 @@ index f93c16fa..e0ad297b 100644 + /******************************************************************************/ diff --git a/src/malloc_io.c b/src/malloc_io.c -index 7bdc13f9..c8802c70 100644 +index d7cb0f52..cda589c4 100644 --- a/src/malloc_io.c +++ b/src/malloc_io.c @@ -75,6 +75,20 @@ wrtmessage(void *cbopaque, const char *s) { @@ -501,7 +542,7 @@ index 7bdc13f9..c8802c70 100644 * Wrapper around malloc_message() that avoids the need for * je_malloc_message(...) throughout the code. diff --git a/src/mutex.c b/src/mutex.c -index 30222b3e..b2c36283 100644 +index 3f920f5b..88a7730c 100644 --- a/src/mutex.c +++ b/src/mutex.c @@ -41,6 +41,17 @@ pthread_create(pthread_t *__restrict thread, @@ -523,9 +564,10 @@ index 30222b3e..b2c36283 100644 void @@ -131,6 +142,16 @@ mutex_addr_comp(const witness_t *witness1, void *mutex1, + } } - bool ++bool +malloc_mutex_first_thread(void) { + +#ifndef JEMALLOC_MUTEX_INIT_CB @@ -535,7 +577,6 @@ index 30222b3e..b2c36283 100644 +#endif +} + -+bool + bool malloc_mutex_init(malloc_mutex_t *mutex, const char *name, witness_rank_t rank, malloc_mutex_lock_order_t lock_order) { - mutex_prof_data_init(&mutex->prof_data); Modified: head/contrib/jemalloc/VERSION ============================================================================== --- head/contrib/jemalloc/VERSION Thu Apr 23 23:54:23 2020 (r360232) +++ head/contrib/jemalloc/VERSION Thu Apr 23 23:57:43 2020 (r360233) @@ -1 +1 @@ -5.1.0-0-g61efbda7098de6fe64c362d309824864308c36d4 +5.2.1-0-gea6b3e973b477b8061e0076bb257dbd7f3faa756 Modified: head/contrib/jemalloc/doc/jemalloc.3 ============================================================================== --- head/contrib/jemalloc/doc/jemalloc.3 Thu Apr 23 23:54:23 2020 (r360232) +++ head/contrib/jemalloc/doc/jemalloc.3 Thu Apr 23 23:57:43 2020 (r360233) @@ -1,13 +1,13 @@ '\" t .\" Title: JEMALLOC .\" Author: Jason Evans -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 05/08/2018 +.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Date: 11/10/2019 .\" Manual: User Manual -.\" Source: jemalloc 5.1.0-0-g61efbda7098de6fe64c362d309824864308c36d4 +.\" Source: jemalloc 5.2.1-0-gea6b3e973b477b8061e0076bb257dbd7f3faa756 .\" Language: English .\" -.TH "JEMALLOC" "3" "05/08/2018" "jemalloc 5.1.0-0-g61efbda7098d" "User Manual" +.TH "JEMALLOC" "3" "11/10/2019" "jemalloc 5.2.1-0-gea6b3e973b47" "User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,7 +31,7 @@ jemalloc \- general purpose memory allocation functions .SH "LIBRARY" .PP -This manual describes jemalloc 5\&.1\&.0\-0\-g61efbda7098de6fe64c362d309824864308c36d4\&. More information can be found at the +This manual describes jemalloc 5\&.2\&.1\-0\-gea6b3e973b477b8061e0076bb257dbd7f3faa756\&. More information can be found at the \m[blue]\fBjemalloc website\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP The following configuration options are enabled in libc\*(Aqs built\-in jemalloc: @@ -396,7 +396,7 @@ string, in which case the statistics are presented in as a character within the \fIopts\fR string\&. Note that -malloc_message() +malloc_stats_print() uses the mallctl*() functions internally, so inconsistent statistics can be reported if multiple threads use these functions simultaneously\&. If @@ -411,7 +411,9 @@ and \(lql\(rq can be specified to omit per size class statistics for bins and large objects, respectively; \(lqx\(rq -can be specified to omit all mutex statistics\&. Unrecognized characters are silently ignored\&. Note that thread caching may prevent some statistics from being completely up to date, since extra locking would be required to merge counters that track thread cache operations\&. +can be specified to omit all mutex statistics; +\(lqe\(rq +can be used to omit extent statistics\&. Unrecognized characters are silently ignored\&. Note that thread caching may prevent some statistics from being completely up to date, since extra locking would be required to merge counters that track thread cache operations\&. .PP The malloc_usable_size() @@ -826,6 +828,17 @@ in these cases\&. This option is disabled by default u is specified during configuration, in which case it is enabled by default\&. .RE .PP +opt\&.confirm_conf (\fBbool\fR) r\- +.RS 4 +Confirm\-runtime\-options\-when\-program\-starts enabled/disabled\&. If true, the string specified via +\fB\-\-with\-malloc\-conf\fR, the string pointed to by the global variable +\fImalloc_conf\fR, the +\(lqname\(rq +of the file referenced by the symbolic link named +/etc/malloc\&.conf, and the value of the environment variable +\fBMALLOC_CONF\fR, will be printed in order\&. Then, each option being set will be individually printed\&. This option is disabled by default\&. +.RE +.PP opt\&.abort_conf (\fBbool\fR) r\- .RS 4 Abort\-on\-invalid\-configuration enabled/disabled\&. If true, invalid runtime options are fatal\&. The process will call @@ -852,9 +865,10 @@ If true, retain unused virtual memory for later reuse \fBmunmap\fR(2) or equivalent (see stats\&.retained -for related details)\&. This option is disabled by default unless discarding virtual memory is known to trigger platform\-specific performance problems, e\&.g\&. for [64\-bit] Linux, which has a quirk in its virtual memory allocation algorithm that causes semi\-permanent VM map holes under normal jemalloc operation\&. Although -\fBmunmap\fR(2) -causes issues on 32\-bit Linux as well, retaining virtual memory for 32\-bit Linux is disabled by default due to the practical possibility of address space exhaustion\&. +for related details)\&. It also makes jemalloc use +\fBmmap\fR(2) +or equivalent in a more greedy way, mapping larger chunks in one go\&. This option is disabled by default unless discarding virtual memory is known to trigger platform\-specific performance problems, namely 1) for [64\-bit] Linux, which has a quirk in its virtual memory allocation algorithm that causes semi\-permanent VM map holes under normal jemalloc operation; and 2) for [64\-bit] Windows, which disallows split / merged regions with +\fI\fBMEM_RELEASE\fR\fR\&. Although the same issues may present on 32\-bit platforms as well, retaining virtual memory for 32\-bit Linux and Windows is disabled by default due to the practical possibility of address space exhaustion\&. .RE .PP opt\&.dss (\fBconst char *\fR) r\- @@ -882,6 +896,13 @@ opt\&.narenas (\fBunsigned\fR) r\- Maximum number of arenas to use for automatic multiplexing of threads and arenas\&. The default is four times the number of CPUs, or one if there is a single CPU\&. .RE .PP +opt\&.oversize_threshold (\fBsize_t\fR) r\- +.RS 4 +The threshold in bytes of which requests are considered oversize\&. Allocation requests with greater sizes are fulfilled from a dedicated arena (automatically managed, however not within +narenas), in order to reduce fragmentation by not mixing huge allocations with small ones\&. In addition, the decay API guarantees on the extents greater than the specified threshold may be overridden\&. Note that requests with arena index specified via +\fBMALLOCX_ARENA\fR, or threads associated with explicit arenas will not be considered\&. The default threshold is 8MiB\&. Values not within large size classes disables this feature\&. +.RE +.PP opt\&.percpu_arena (\fBconst char *\fR) r\- .RS 4 Per CPU arena mode\&. Use the @@ -893,14 +914,14 @@ setting uses one arena per physical CPU, which means t \(lqdisabled\(rq\&. .RE .PP -opt\&.background_thread (\fBconst bool\fR) r\- +opt\&.background_thread (\fBbool\fR) r\- .RS 4 Internal background worker threads enabled/disabled\&. Because of potential circular dependencies, enabling background thread using this option may cause crash or deadlock during initialization\&. For a reliable way to use this feature, see background_thread for dynamic control options and details\&. This option is disabled by default\&. .RE .PP -opt\&.max_background_threads (\fBconst size_t\fR) r\- +opt\&.max_background_threads (\fBsize_t\fR) r\- .RS 4 Maximum number of background threads that will be created if background_thread @@ -917,7 +938,9 @@ and arena\&.\&.dirty_decay_ms for related dynamic control options\&. See opt\&.muzzy_decay_ms -for a description of muzzy pages\&. +for a description of muzzy pages\&.for a description of muzzy pages\&. Note that when the +oversize_threshold +feature is enabled, the arenas reserved for oversize requests may have its own default decay settings\&. .RE .PP opt\&.muzzy_decay_ms (\fBssize_t\fR) r\- @@ -1293,7 +1316,7 @@ arena\&.\&.extent_hooks (\fBextent_hooks_t *\fR) rw .RS 4 Get or set the extent management hook functions for arena \&. The functions must be capable of operating on all extant extents associated with arena , usually by passing unknown extents to the replaced functions\&. In practice, it is feasible to control allocation for arenas explicitly created via arenas\&.create -such that all extents originate from an application\-supplied extent allocator (by specifying the custom extent hook functions during arena creation), but the automatically created arenas will have already created extents prior to the application having an opportunity to take over extent allocation\&. +such that all extents originate from an application\-supplied extent allocator (by specifying the custom extent hook functions during arena creation)\&. However, the API guarantees for the automatically created arenas may be relaxed \-\- hooks set there may be called in a "best effort" fashion; in addition there may be extents created prior to the application having an opportunity to take over extent allocation\&. .sp .if n \{\ .RS 4 @@ -1876,6 +1899,11 @@ stats\&.retained for details\&. .RE .PP +stats\&.arenas\&.\&.extent_avail (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Number of allocated (but unused) extent structs in this arena\&. +.RE +.PP stats\&.arenas\&.\&.base (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] .RS 4 Number of bytes dedicated to bootstrap\-sensitive allocator metadata structures\&. @@ -1956,6 +1984,16 @@ stats\&.arenas\&.\&.small\&.nrequests (\fBuint64_t\ Cumulative number of allocation requests satisfied by all bin size classes\&. .RE .PP +stats\&.arenas\&.\&.small\&.nfills (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Cumulative number of tcache fills by all small size classes\&. +.RE +.PP +stats\&.arenas\&.\&.small\&.nflushes (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Cumulative number of tcache flushes by all small size classes\&. +.RE +.PP stats\&.arenas\&.\&.large\&.allocated (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] .RS 4 Number of bytes currently allocated by large objects\&. @@ -1980,6 +2018,16 @@ stats\&.arenas\&.\&.large\&.nrequests (\fBuint64_t\ Cumulative number of allocation requests satisfied by all large size classes\&. .RE .PP +stats\&.arenas\&.\&.large\&.nfills (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Cumulative number of tcache fills by all large size classes\&. +.RE +.PP +stats\&.arenas\&.\&.large\&.nflushes (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Cumulative number of tcache flushes by all large size classes\&. +.RE +.PP stats\&.arenas\&.\&.bins\&.\&.nmalloc (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] .RS 4 Cumulative number of times a bin region of the corresponding size class was allocated from the arena, whether to fill the relevant tcache if @@ -2029,6 +2077,11 @@ stats\&.arenas\&.\&.bins\&.\&.curslabs (\fBsize_ Current number of slabs\&. .RE .PP +stats\&.arenas\&.\&.bins\&.\&.nonfull_slabs (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Current number of nonfull slabs\&. +.RE +.PP stats\&.arenas\&.\&.bins\&.\&.mutex\&.{counter} (\fBcounter specific type\fR) r\- [\fB\-\-enable\-stats\fR] .RS 4 Statistics on @@ -2037,6 +2090,16 @@ mutex (arena bin scope; bin operation related)\&. {counter} is one of the counters in mutex profiling counters\&. +.RE +.PP +stats\&.arenas\&.\&.extents\&.\&.n{extent_type} (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Number of extents of the given type in this arena in the bucket corresponding to page size index \&. The extent type is one of dirty, muzzy, or retained\&. +.RE +.PP +stats\&.arenas\&.\&.extents\&.\&.{extent_type}_bytes (\fBsize_t\fR) r\- [\fB\-\-enable\-stats\fR] +.RS 4 +Sum of the bytes managed by extents of the given type in this arena in the bucket corresponding to page size index \&. The extent type is one of dirty, muzzy, or retained\&. .RE .PP stats\&.arenas\&.\&.lextents\&.\&.nmalloc (\fBuint64_t\fR) r\- [\fB\-\-enable\-stats\fR] Modified: head/contrib/jemalloc/include/jemalloc/internal/arena_externs.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/arena_externs.h Thu Apr 23 23:54:23 2020 (r360232) +++ head/contrib/jemalloc/include/jemalloc/internal/arena_externs.h Thu Apr 23 23:57:43 2020 (r360233) @@ -3,8 +3,8 @@ #include "jemalloc/internal/bin.h" #include "jemalloc/internal/extent_dss.h" +#include "jemalloc/internal/hook.h" #include "jemalloc/internal/pages.h" -#include "jemalloc/internal/size_classes.h" #include "jemalloc/internal/stats.h" extern ssize_t opt_dirty_decay_ms; @@ -16,13 +16,17 @@ extern const char *percpu_arena_mode_names[]; extern const uint64_t h_steps[SMOOTHSTEP_NSTEPS]; extern malloc_mutex_t arenas_lock; +extern size_t opt_oversize_threshold; +extern size_t oversize_threshold; + void arena_basic_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads, const char **dss, ssize_t *dirty_decay_ms, ssize_t *muzzy_decay_ms, size_t *nactive, size_t *ndirty, size_t *nmuzzy); void arena_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads, const char **dss, ssize_t *dirty_decay_ms, ssize_t *muzzy_decay_ms, size_t *nactive, size_t *ndirty, size_t *nmuzzy, arena_stats_t *astats, - bin_stats_t *bstats, arena_stats_large_t *lstats); + bin_stats_t *bstats, arena_stats_large_t *lstats, + arena_stats_extents_t *estats); void arena_extents_dirty_dalloc(tsdn_t *tsdn, arena_t *arena, extent_hooks_t **r_extent_hooks, extent_t *extent); #ifdef JEMALLOC_JET @@ -56,16 +60,17 @@ void *arena_malloc_hard(tsdn_t *tsdn, arena_t *arena, szind_t ind, bool zero); void *arena_palloc(tsdn_t *tsdn, arena_t *arena, size_t usize, size_t alignment, bool zero, tcache_t *tcache); -void arena_prof_promote(tsdn_t *tsdn, const void *ptr, size_t usize); +void arena_prof_promote(tsdn_t *tsdn, void *ptr, size_t usize); void arena_dalloc_promoted(tsdn_t *tsdn, void *ptr, tcache_t *tcache, bool slow_path); -void arena_dalloc_bin_junked_locked(tsdn_t *tsdn, arena_t *arena, - extent_t *extent, void *ptr); +void arena_dalloc_bin_junked_locked(tsdn_t *tsdn, arena_t *arena, bin_t *bin, + szind_t binind, extent_t *extent, void *ptr); void arena_dalloc_small(tsdn_t *tsdn, void *ptr); bool arena_ralloc_no_move(tsdn_t *tsdn, void *ptr, size_t oldsize, size_t size, - size_t extra, bool zero); + size_t extra, bool zero, size_t *newsize); void *arena_ralloc(tsdn_t *tsdn, arena_t *arena, void *ptr, size_t oldsize, - size_t size, size_t alignment, bool zero, tcache_t *tcache); + size_t size, size_t alignment, bool zero, tcache_t *tcache, + hook_ralloc_args_t *hook_args); dss_prec_t arena_dss_prec_get(arena_t *arena); bool arena_dss_prec_set(arena_t *arena, dss_prec_t dss_prec); ssize_t arena_dirty_decay_ms_default_get(void); @@ -79,7 +84,12 @@ void arena_nthreads_inc(arena_t *arena, bool internal) void arena_nthreads_dec(arena_t *arena, bool internal); size_t arena_extent_sn_next(arena_t *arena); arena_t *arena_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t *extent_hooks); -void arena_boot(void); +bool arena_init_huge(void); +bool arena_is_huge(unsigned arena_ind); +arena_t *arena_choose_huge(tsd_t *tsd); +bin_t *arena_bin_choose_lock(tsdn_t *tsdn, arena_t *arena, szind_t binind, + unsigned *binshard); +void arena_boot(sc_data_t *sc_data); void arena_prefork0(tsdn_t *tsdn, arena_t *arena); void arena_prefork1(tsdn_t *tsdn, arena_t *arena); void arena_prefork2(tsdn_t *tsdn, arena_t *arena); Modified: head/contrib/jemalloc/include/jemalloc/internal/arena_inlines_b.h ============================================================================== --- head/contrib/jemalloc/include/jemalloc/internal/arena_inlines_b.h Thu Apr 23 23:54:23 2020 (r360232) +++ head/contrib/jemalloc/include/jemalloc/internal/arena_inlines_b.h Thu Apr 23 23:57:43 2020 (r360233) @@ -4,10 +4,36 @@ #include "jemalloc/internal/jemalloc_internal_types.h" #include "jemalloc/internal/mutex.h" #include "jemalloc/internal/rtree.h" -#include "jemalloc/internal/size_classes.h" +#include "jemalloc/internal/sc.h" #include "jemalloc/internal/sz.h" #include "jemalloc/internal/ticker.h" +JEMALLOC_ALWAYS_INLINE bool +arena_has_default_hooks(arena_t *arena) { + return (extent_hooks_get(arena) == &extent_hooks_default); +} + +JEMALLOC_ALWAYS_INLINE arena_t * +arena_choose_maybe_huge(tsd_t *tsd, arena_t *arena, size_t size) { + if (arena != NULL) { + return arena; + } + + /* + * For huge allocations, use the dedicated huge arena if both are true: + * 1) is using auto arena selection (i.e. arena == NULL), and 2) the + * thread is not assigned to a manual arena. + */ + if (unlikely(size >= oversize_threshold)) { + arena_t *tsd_arena = tsd_arena_get(tsd); + if (tsd_arena == NULL || arena_is_auto(tsd_arena)) { + return arena_choose_huge(tsd); + } + } + + return arena_choose(tsd, NULL); +} + JEMALLOC_ALWAYS_INLINE prof_tctx_t * arena_prof_tctx_get(tsdn_t *tsdn, const void *ptr, alloc_ctx_t *alloc_ctx) { cassert(config_prof); @@ -28,7 +54,7 @@ arena_prof_tctx_get(tsdn_t *tsdn, const void *ptr, all } JEMALLOC_ALWAYS_INLINE void -arena_prof_tctx_set(tsdn_t *tsdn, const void *ptr, UNUSED size_t usize, +arena_prof_tctx_set(tsdn_t *tsdn, const void *ptr, size_t usize, alloc_ctx_t *alloc_ctx, prof_tctx_t *tctx) { cassert(config_prof); assert(ptr != NULL); @@ -47,7 +73,7 @@ arena_prof_tctx_set(tsdn_t *tsdn, const void *ptr, UNU } static inline void -arena_prof_tctx_reset(tsdn_t *tsdn, const void *ptr, UNUSED prof_tctx_t *tctx) { +arena_prof_tctx_reset(tsdn_t *tsdn, const void *ptr, prof_tctx_t *tctx) { cassert(config_prof); assert(ptr != NULL); @@ -57,7 +83,33 @@ arena_prof_tctx_reset(tsdn_t *tsdn, const void *ptr, U large_prof_tctx_reset(tsdn, extent); } +JEMALLOC_ALWAYS_INLINE nstime_t +arena_prof_alloc_time_get(tsdn_t *tsdn, const void *ptr, + alloc_ctx_t *alloc_ctx) { + cassert(config_prof); + assert(ptr != NULL); + + extent_t *extent = iealloc(tsdn, ptr); + /* + * Unlike arena_prof_prof_tctx_{get, set}, we only call this once we're + * sure we have a sampled allocation. + */ + assert(!extent_slab_get(extent)); + return large_prof_alloc_time_get(extent); +} + JEMALLOC_ALWAYS_INLINE void +arena_prof_alloc_time_set(tsdn_t *tsdn, const void *ptr, alloc_ctx_t *alloc_ctx, + nstime_t t) { + cassert(config_prof); + assert(ptr != NULL); + + extent_t *extent = iealloc(tsdn, ptr); + assert(!extent_slab_get(extent)); + large_prof_alloc_time_set(extent, t); +} + +JEMALLOC_ALWAYS_INLINE void arena_decay_ticks(tsdn_t *tsdn, arena_t *arena, unsigned nticks) { tsd_t *tsd; ticker_t *decay_ticker; @@ -83,14 +135,33 @@ arena_decay_tick(tsdn_t *tsdn, arena_t *arena) { arena_decay_ticks(tsdn, arena, 1); } +/* Purge a single extent to retained / unmapped directly. */ +JEMALLOC_ALWAYS_INLINE void +arena_decay_extent(tsdn_t *tsdn,arena_t *arena, extent_hooks_t **r_extent_hooks, + extent_t *extent) { + size_t extent_size = extent_size_get(extent); + extent_dalloc_wrapper(tsdn, arena, + r_extent_hooks, extent); + if (config_stats) { + /* Update stats accordingly. */ + arena_stats_lock(tsdn, &arena->stats); + arena_stats_add_u64(tsdn, &arena->stats, + &arena->decay_dirty.stats->nmadvise, 1); + arena_stats_add_u64(tsdn, &arena->stats, + &arena->decay_dirty.stats->purged, extent_size >> LG_PAGE); + arena_stats_sub_zu(tsdn, &arena->stats, &arena->stats.mapped, + extent_size); + arena_stats_unlock(tsdn, &arena->stats); + } +} + JEMALLOC_ALWAYS_INLINE void * arena_malloc(tsdn_t *tsdn, arena_t *arena, size_t size, szind_t ind, bool zero, tcache_t *tcache, bool slow_path) { assert(!tsdn_null(tsdn) || tcache == NULL); - assert(size != 0); if (likely(tcache != NULL)) { - if (likely(size <= SMALL_MAXCLASS)) { + if (likely(size <= SC_SMALL_MAXCLASS)) { return tcache_alloc_small(tsdn_tsd(tsdn), arena, tcache, size, ind, zero, slow_path); } @@ -119,7 +190,7 @@ arena_salloc(tsdn_t *tsdn, const void *ptr) { szind_t szind = rtree_szind_read(tsdn, &extents_rtree, rtree_ctx, (uintptr_t)ptr, true); - assert(szind != NSIZES); + assert(szind != SC_NSIZES); return sz_index2size(szind); } @@ -152,12 +223,22 @@ arena_vsalloc(tsdn_t *tsdn, const void *ptr) { /* Only slab members should be looked up via interior pointers. */ assert(extent_addr_get(extent) == ptr || extent_slab_get(extent)); - assert(szind != NSIZES); + assert(szind != SC_NSIZES); return sz_index2size(szind); } static inline void +arena_dalloc_large_no_tcache(tsdn_t *tsdn, void *ptr, szind_t szind) { + if (config_prof && unlikely(szind < SC_NBINS)) { + arena_dalloc_promoted(tsdn, ptr, NULL, true); + } else { + extent_t *extent = iealloc(tsdn, ptr); + large_dalloc(tsdn, extent); + } +} + +static inline void arena_dalloc_no_tcache(tsdn_t *tsdn, void *ptr) { assert(ptr != NULL); @@ -173,7 +254,7 @@ arena_dalloc_no_tcache(tsdn_t *tsdn, void *ptr) { extent_t *extent = rtree_extent_read(tsdn, &extents_rtree, rtree_ctx, (uintptr_t)ptr, true); assert(szind == extent_szind_get(extent)); - assert(szind < NSIZES); + assert(szind < SC_NSIZES); assert(slab == extent_slab_get(extent)); } @@ -181,6 +262,21 @@ arena_dalloc_no_tcache(tsdn_t *tsdn, void *ptr) { /* Small allocation. */ arena_dalloc_small(tsdn, ptr); } else { + arena_dalloc_large_no_tcache(tsdn, ptr, szind); + } +} + +JEMALLOC_ALWAYS_INLINE void +arena_dalloc_large(tsdn_t *tsdn, void *ptr, tcache_t *tcache, szind_t szind, + bool slow_path) { + if (szind < nhbins) { + if (config_prof && unlikely(szind < SC_NBINS)) { + arena_dalloc_promoted(tsdn, ptr, tcache, slow_path); + } else { + tcache_dalloc_large(tsdn_tsd(tsdn), tcache, ptr, szind, + slow_path); + } + } else { extent_t *extent = iealloc(tsdn, ptr); large_dalloc(tsdn, extent); } @@ -203,7 +299,7 @@ arena_dalloc(tsdn_t *tsdn, void *ptr, tcache_t *tcache if (alloc_ctx != NULL) { szind = alloc_ctx->szind; slab = alloc_ctx->slab; - assert(szind != NSIZES); + assert(szind != SC_NSIZES); } else { rtree_ctx = tsd_rtree_ctx(tsdn_tsd(tsdn)); rtree_szind_slab_read(tsdn, &extents_rtree, rtree_ctx, @@ -215,7 +311,7 @@ arena_dalloc(tsdn_t *tsdn, void *ptr, tcache_t *tcache extent_t *extent = rtree_extent_read(tsdn, &extents_rtree, rtree_ctx, (uintptr_t)ptr, true); assert(szind == extent_szind_get(extent)); - assert(szind < NSIZES); + assert(szind < SC_NSIZES); assert(slab == extent_slab_get(extent)); } @@ -224,25 +320,14 @@ arena_dalloc(tsdn_t *tsdn, void *ptr, tcache_t *tcache tcache_dalloc_small(tsdn_tsd(tsdn), tcache, ptr, szind, slow_path); } else { - if (szind < nhbins) { - if (config_prof && unlikely(szind < NBINS)) { - arena_dalloc_promoted(tsdn, ptr, tcache, - slow_path); - } else { - tcache_dalloc_large(tsdn_tsd(tsdn), tcache, ptr, - szind, slow_path); - } - } else { - extent_t *extent = iealloc(tsdn, ptr); - large_dalloc(tsdn, extent); - } + arena_dalloc_large(tsdn, ptr, tcache, szind, slow_path); } } static inline void arena_sdalloc_no_tcache(tsdn_t *tsdn, void *ptr, size_t size) { assert(ptr != NULL); - assert(size <= LARGE_MAXCLASS); + assert(size <= SC_LARGE_MAXCLASS); szind_t szind; bool slab; @@ -252,7 +337,7 @@ arena_sdalloc_no_tcache(tsdn_t *tsdn, void *ptr, size_ * object, so base szind and slab on the given size. */ szind = sz_size2index(size); - slab = (szind < NBINS); + slab = (szind < SC_NBINS); } if ((config_prof && opt_prof) || config_debug) { @@ -264,7 +349,7 @@ arena_sdalloc_no_tcache(tsdn_t *tsdn, void *ptr, size_ (uintptr_t)ptr, true, &szind, &slab); assert(szind == sz_size2index(size)); - assert((config_prof && opt_prof) || slab == (szind < NBINS)); + assert((config_prof && opt_prof) || slab == (szind < SC_NBINS)); if (config_debug) { extent_t *extent = rtree_extent_read(tsdn, @@ -278,8 +363,7 @@ arena_sdalloc_no_tcache(tsdn_t *tsdn, void *ptr, size_ /* Small allocation. */ arena_dalloc_small(tsdn, ptr); } else { - extent_t *extent = iealloc(tsdn, ptr); - large_dalloc(tsdn, extent); + arena_dalloc_large_no_tcache(tsdn, ptr, szind); } } @@ -288,7 +372,7 @@ arena_sdalloc(tsdn_t *tsdn, void *ptr, size_t size, tc alloc_ctx_t *alloc_ctx, bool slow_path) { assert(!tsdn_null(tsdn) || tcache == NULL); assert(ptr != NULL); - assert(size <= LARGE_MAXCLASS); + assert(size <= SC_LARGE_MAXCLASS); if (unlikely(tcache == NULL)) { arena_sdalloc_no_tcache(tsdn, ptr, size); @@ -297,7 +381,7 @@ arena_sdalloc(tsdn_t *tsdn, void *ptr, size_t size, tc szind_t szind; bool slab; - UNUSED alloc_ctx_t local_ctx; + alloc_ctx_t local_ctx; if (config_prof && opt_prof) { if (alloc_ctx == NULL) { /* Uncommon case and should be a static check. */ @@ -318,7 +402,7 @@ arena_sdalloc(tsdn_t *tsdn, void *ptr, size_t size, tc * object, so base szind and slab on the given size. */ szind = sz_size2index(size); - slab = (szind < NBINS); + slab = (szind < SC_NBINS); } if (config_debug) { @@ -336,18 +420,7 @@ arena_sdalloc(tsdn_t *tsdn, void *ptr, size_t size, tc tcache_dalloc_small(tsdn_tsd(tsdn), tcache, ptr, szind, slow_path); } else { - if (szind < nhbins) { - if (config_prof && unlikely(szind < NBINS)) { - arena_dalloc_promoted(tsdn, ptr, tcache, - slow_path); - } else { - tcache_dalloc_large(tsdn_tsd(tsdn), - tcache, ptr, szind, slow_path); - } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Apr 24 00:08:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8FE652C7ED3; Fri, 24 Apr 2020 00:08:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497ZJm3HVpz4WQF; Fri, 24 Apr 2020 00:08:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53046CFE2; Fri, 24 Apr 2020 00:08:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O08edR081847; Fri, 24 Apr 2020 00:08:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O08dqr081843; Fri, 24 Apr 2020 00:08:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202004240008.03O08dqr081843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 24 Apr 2020 00:08:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360234 - in stable/11: . gnu/usr.bin/groff/tmac lib/clang sys/conf X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable/11: . gnu/usr.bin/groff/tmac lib/clang sys/conf X-SVN-Commit-Revision: 360234 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 00:08:40 -0000 Author: gjb Date: Fri Apr 24 00:08:39 2020 New Revision: 360234 URL: https://svnweb.freebsd.org/changeset/base/360234 Log: Rename stable/11 to 11.4-PRERELEASE, marking the start of the 11.4 release cycle. Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/11/Makefile.inc1 stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in stable/11/lib/clang/llvm.build.mk stable/11/sys/conf/newvers.sh Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Thu Apr 23 23:57:43 2020 (r360233) +++ stable/11/Makefile.inc1 Fri Apr 24 00:08:39 2020 (r360234) @@ -605,7 +605,7 @@ XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -s .endif .else TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.3 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.4 XCFLAGS+= -target ${TARGET_TRIPLE} .endif XCFLAGS+= --sysroot=${WORLDTMP} Modified: stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in ============================================================================== --- stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in Thu Apr 23 23:57:43 2020 (r360233) +++ stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in Fri Apr 24 00:08:39 2020 (r360234) @@ -50,7 +50,7 @@ .ds doc-str-Lb-libstdthreads C11 Threads Library (libstdthreads, \-lstdthreads) . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~11.3 +.ds doc-default-operating-system FreeBSD\~11.4 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-2.2.9 2.2.9 @@ -69,6 +69,7 @@ .ds doc-operating-system-FreeBSD-11.1 11.1 .ds doc-operating-system-FreeBSD-11.2 11.2 .ds doc-operating-system-FreeBSD-11.3 11.3 +.ds doc-operating-system-FreeBSD-11.4 11.4 . .\" Definitions for other *BSDs not (yet) in doc-common .ds doc-operating-system-NetBSD-7.0 7.0 Modified: stable/11/lib/clang/llvm.build.mk ============================================================================== --- stable/11/lib/clang/llvm.build.mk Thu Apr 23 23:57:43 2020 (r360233) +++ stable/11/lib/clang/llvm.build.mk Fri Apr 24 00:08:39 2020 (r360234) @@ -35,7 +35,7 @@ TARGET_ABI= -gnueabi TARGET_ABI= .endif VENDOR= unknown -OS_VERSION= freebsd11.3 +OS_VERSION= freebsd11.4 LLVM_TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION}${TARGET_ABI} LLVM_BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${VENDOR}-${OS_VERSION} Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Apr 23 23:57:43 2020 (r360233) +++ stable/11/sys/conf/newvers.sh Fri Apr 24 00:08:39 2020 (r360234) @@ -43,8 +43,8 @@ # included if the tree is modified. TYPE="FreeBSD" -REVISION="11.3" -BRANCH="STABLE" +REVISION="11.4" +BRANCH="PRERELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Fri Apr 24 01:27:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 75B612C9DAF; Fri, 24 Apr 2020 01:27:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497c3f2CHnz4bS0; Fri, 24 Apr 2020 01:27:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42457DF2E; Fri, 24 Apr 2020 01:27:26 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O1RQEV031385; Fri, 24 Apr 2020 01:27:26 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O1RQZN031384; Fri, 24 Apr 2020 01:27:26 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004240127.03O1RQZN031384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 Apr 2020 01:27:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360235 - head/sys/bsm X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/bsm X-SVN-Commit-Revision: 360235 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 01:27:26 -0000 Author: kevans Date: Fri Apr 24 01:27:25 2020 New Revision: 360235 URL: https://svnweb.freebsd.org/changeset/base/360235 Log: bsm: add AUE_CLOSERANGE AUE_CLOSERANGE has been accepted upstream as 43265; AUE_REALPATHAT has now been upstreamed. Modified: head/sys/bsm/audit_kevents.h Modified: head/sys/bsm/audit_kevents.h ============================================================================== --- head/sys/bsm/audit_kevents.h Fri Apr 24 00:08:39 2020 (r360234) +++ head/sys/bsm/audit_kevents.h Fri Apr 24 01:27:25 2020 (r360235) @@ -658,6 +658,7 @@ #define AUE_EXECVEAT 43262 /* FreeBSD/Linux. */ #define AUE_SHMRENAME 43263 /* FreeBSD-specific. */ #define AUE_REALPATHAT 43264 /* FreeBSD-specific. */ +#define AUE_CLOSERANGE 43265 /* FreeBSD-specific. */ /* * Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the From owner-svn-src-all@freebsd.org Fri Apr 24 01:30:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55A2A2C9E7D; Fri, 24 Apr 2020 01:30:01 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497c6d1ZLpz4bbG; Fri, 24 Apr 2020 01:30:01 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 313A0DF33; Fri, 24 Apr 2020 01:30:01 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O1U1Mm031578; Fri, 24 Apr 2020 01:30:01 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O1U03c031576; Fri, 24 Apr 2020 01:30:00 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004240130.03O1U03c031576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 Apr 2020 01:30:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360236 - in head/sys: compat/freebsd32 kern X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/sys: compat/freebsd32 kern X-SVN-Commit-Revision: 360236 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 01:30:01 -0000 Author: kevans Date: Fri Apr 24 01:30:00 2020 New Revision: 360236 URL: https://svnweb.freebsd.org/changeset/base/360236 Log: close_range(2): use newly assigned AUE_CLOSERANGE Modified: head/sys/compat/freebsd32/syscalls.master head/sys/kern/syscalls.master Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Fri Apr 24 01:27:25 2020 (r360235) +++ head/sys/compat/freebsd32/syscalls.master Fri Apr 24 01:30:00 2020 (r360236) @@ -1162,7 +1162,7 @@ 573 AUE_NULL NOPROTO { int sigfastblock(int cmd, uint32_t *ptr); } 574 AUE_REALPATHAT NOPROTO { int __realpathat(int fd, const char *path, \ char *buf, size_t size, int flags); } -575 AUE_NULL NOPROTO { int close_range(u_int lowfd, u_int highfd, \ +575 AUE_CLOSERANGE NOPROTO { int close_range(u_int lowfd, u_int highfd, \ int flags); } ; vim: syntax=off Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Fri Apr 24 01:27:25 2020 (r360235) +++ head/sys/kern/syscalls.master Fri Apr 24 01:30:00 2020 (r360236) @@ -3227,7 +3227,7 @@ int flags ); } -575 AUE_NULL STD { +575 AUE_CLOSERANGE STD { int close_range( u_int lowfd, u_int highfd, From owner-svn-src-all@freebsd.org Fri Apr 24 01:30:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FF512C9EE2; Fri, 24 Apr 2020 01:30:34 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497c7G1Szjz4bk5; Fri, 24 Apr 2020 01:30:34 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 13BCBDF36; Fri, 24 Apr 2020 01:30:34 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O1UXMS031649; Fri, 24 Apr 2020 01:30:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O1UXYL031646; Fri, 24 Apr 2020 01:30:33 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004240130.03O1UXYL031646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 Apr 2020 01:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360237 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/sys: compat/freebsd32 kern sys X-SVN-Commit-Revision: 360237 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 01:30:34 -0000 Author: kevans Date: Fri Apr 24 01:30:33 2020 New Revision: 360237 URL: https://svnweb.freebsd.org/changeset/base/360237 Log: sysent: re-roll after 360236 (AUE_CLOSERANGE used) Modified: head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/kern/init_sysent.c head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Fri Apr 24 01:30:00 2020 (r360236) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Fri Apr 24 01:30:33 2020 (r360237) @@ -664,5 +664,5 @@ struct sysent freebsd32_sysent[] = { { AS(shm_rename_args), (sy_call_t *)sys_shm_rename, AUE_SHMRENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 572 = shm_rename */ { AS(sigfastblock_args), (sy_call_t *)sys_sigfastblock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 573 = sigfastblock */ { AS(__realpathat_args), (sy_call_t *)sys___realpathat, AUE_REALPATHAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 574 = __realpathat */ - { AS(close_range_args), (sy_call_t *)sys_close_range, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 575 = close_range */ + { AS(close_range_args), (sy_call_t *)sys_close_range, AUE_CLOSERANGE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 575 = close_range */ }; Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Fri Apr 24 01:30:00 2020 (r360236) +++ head/sys/kern/init_sysent.c Fri Apr 24 01:30:33 2020 (r360237) @@ -630,5 +630,5 @@ struct sysent sysent[] = { { AS(shm_rename_args), (sy_call_t *)sys_shm_rename, AUE_SHMRENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 572 = shm_rename */ { AS(sigfastblock_args), (sy_call_t *)sys_sigfastblock, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 573 = sigfastblock */ { AS(__realpathat_args), (sy_call_t *)sys___realpathat, AUE_REALPATHAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 574 = __realpathat */ - { AS(close_range_args), (sy_call_t *)sys_close_range, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 575 = close_range */ + { AS(close_range_args), (sy_call_t *)sys_close_range, AUE_CLOSERANGE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 575 = close_range */ }; Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Fri Apr 24 01:30:00 2020 (r360236) +++ head/sys/sys/sysproto.h Fri Apr 24 01:30:33 2020 (r360237) @@ -3151,7 +3151,7 @@ int freebsd12_closefrom(struct thread *, struct freebs #define SYS_AUE_shm_rename AUE_SHMRENAME #define SYS_AUE_sigfastblock AUE_NULL #define SYS_AUE___realpathat AUE_REALPATHAT -#define SYS_AUE_close_range AUE_NULL +#define SYS_AUE_close_range AUE_CLOSERANGE #undef PAD_ #undef PADL_ From owner-svn-src-all@freebsd.org Fri Apr 24 04:53:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F30602CF0F0; Fri, 24 Apr 2020 04:53:26 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497hdL6XbLz3KVx; Fri, 24 Apr 2020 04:53:26 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB1E2187C0; Fri, 24 Apr 2020 04:53:26 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O4rQJr061916; Fri, 24 Apr 2020 04:53:26 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O4rNVV061901; Fri, 24 Apr 2020 04:53:23 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202004240453.03O4rNVV061901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Fri, 24 Apr 2020 04:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r360238 - vendor/tzdata/dist X-SVN-Group: vendor X-SVN-Commit-Author: philip X-SVN-Commit-Paths: vendor/tzdata/dist X-SVN-Commit-Revision: 360238 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 04:53:27 -0000 Author: philip Date: Fri Apr 24 04:53:23 2020 New Revision: 360238 URL: https://svnweb.freebsd.org/changeset/base/360238 Log: Import tzdata 2020a Modified: vendor/tzdata/dist/Makefile vendor/tzdata/dist/NEWS vendor/tzdata/dist/africa vendor/tzdata/dist/asia vendor/tzdata/dist/backward vendor/tzdata/dist/backzone vendor/tzdata/dist/europe vendor/tzdata/dist/leap-seconds.list vendor/tzdata/dist/leapseconds vendor/tzdata/dist/leapseconds.awk vendor/tzdata/dist/northamerica vendor/tzdata/dist/theory.html vendor/tzdata/dist/version vendor/tzdata/dist/zone.tab vendor/tzdata/dist/zone1970.tab Modified: vendor/tzdata/dist/Makefile ============================================================================== --- vendor/tzdata/dist/Makefile Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/Makefile Fri Apr 24 04:53:23 2020 (r360238) @@ -150,6 +150,15 @@ TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t REDO= posix_right +# Whether to put an "Expires" line in the leapseconds file. +# Use EXPIRES_LINE=1 to put the line in, 0 to omit it. +# The EXPIRES_LINE value matters only if REDO's value contains "right". +# If you change EXPIRES_LINE, remove the leapseconds file before running "make". +# zic's support for the Expires line was introduced in tzdb 2020a, +# and EXPIRES_LINE defaults to 0 for now so that the leapseconds file +# can be given to older zic implementations. +EXPIRES_LINE= 0 + # To install data in text form that has all the information of the TZif data, # (optionally incorporating leap second information), use # TZDATA_TEXT= tzdata.zi leapseconds @@ -295,8 +304,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # than TM_GMTOFF and TM_ZONE. However, most of them are standardized. # # # # To omit or support the external variable "tzname", add one of: -# # -DHAVE_TZNAME=0 -# # -DHAVE_TZNAME=1 +# # -DHAVE_TZNAME=0 # do not support "tzname" +# # -DHAVE_TZNAME=1 # support "tzname", which is defined by system library +# # -DHAVE_TZNAME=2 # support and define "tzname" # # to the "CFLAGS=" line. "tzname" is required by POSIX 1988 and later. # # If not defined, the code attempts to guess HAVE_TZNAME from other macros. # # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause @@ -304,16 +314,20 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # # presumably due to memory allocation issues. # # # # To omit or support the external variables "timezone" and "daylight", add -# # -DUSG_COMPAT=0 -# # -DUSG_COMPAT=1 +# # -DUSG_COMPAT=0 # do not support +# # -DUSG_COMPAT=1 # support, and variables are defined by system library +# # -DUSG_COMPAT=2 # support and define variables # # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by # # Unix Systems Group code and are required by POSIX 2008 (with XSI) and later. # # If not defined, the code attempts to guess USG_COMPAT from other macros. # # # # To support the external variable "altzone", add -# # -DALTZONE +# # -DALTZONE=0 # do not support +# # -DALTZONE=1 # support "altzone", which is defined by system library +# # -DALTZONE=2 # support and define "altzone" # # to the end of the "CFLAGS=" line; although "altzone" appeared in # # System V Release 3.1 it has not been standardized. +# # If not defined, the code attempts to guess ALTZONE from other macros. # # If you want functions that were inspired by early versions of X3J11's work, # add @@ -321,9 +335,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # to the end of the "CFLAGS=" line. This arranges for the functions # "tzsetwall", "offtime", "timelocal", "timegm", "timeoff", # "posix2time", and "time2posix" to be added to the time conversion library. -# "tzsetwall" is like "tzset" except that it arranges for local wall clock -# time (rather than the timezone specified in the TZ environment variable) -# to be used. +# "tzsetwall" is deprecated and is intended to be removed soon; see NEWS. # "offtime" is like "gmtime" except that it accepts a second (long) argument # that gives an offset to add to the time_t when converting it. # "timelocal" is equivalent to "mktime". @@ -333,7 +345,6 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # that gives an offset to use when converting to a time_t. # "posix2time" and "time2posix" are described in an included manual page. # X3J11's work does not describe any of these functions. -# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0. # These functions may well disappear in future releases of the time # conversion package. # @@ -505,11 +516,11 @@ RANLIB= : TZCOBJS= zic.o TZDOBJS= zdump.o localtime.o asctime.o strftime.o DATEOBJS= date.o localtime.o strftime.o asctime.o -LIBSRCS= localtime.c asctime.c difftime.c -LIBOBJS= localtime.o asctime.o difftime.o +LIBSRCS= localtime.c asctime.c difftime.c strftime.c +LIBOBJS= localtime.o asctime.o difftime.o strftime.o HEADERS= tzfile.h private.h NONLIBSRCS= zic.c zdump.c -NEWUCBSRCS= date.c strftime.c +NEWUCBSRCS= date.c SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \ tzselect.ksh workman.sh MANS= newctime.3 newstrftime.3 newtzset.3 time2posix.3 \ @@ -651,7 +662,8 @@ yearistype: yearistype.sh chmod +x yearistype leapseconds: $(LEAP_DEPS) - $(AWK) -f leapseconds.awk leap-seconds.list >$@.out + $(AWK) -v EXPIRES_LINE=$(EXPIRES_LINE) \ + -f leapseconds.awk leap-seconds.list >$@.out mv $@.out $@ # Arguments to pass to submakes of install_data. Modified: vendor/tzdata/dist/NEWS ============================================================================== --- vendor/tzdata/dist/NEWS Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/NEWS Fri Apr 24 04:53:23 2020 (r360238) @@ -1,5 +1,87 @@ News for the tz database +Release 2020a - 2020-04-23 16:03:47 -0700 + + Briefly: + Morocco springs forward on 2020-05-31, not 2020-05-24. + Canada's Yukon advanced to -07 year-round on 2020-03-08. + America/Nuuk renamed from America/Godthab. + zic now supports expiration dates for leap second lists. + + Changes to future timestamps + + Morocco's second spring-forward transition in 2020 will be May 31, + not May 24 as predicted earlier. (Thanks to Semlali Naoufal.) + Adjust future-year predictions to use the first Sunday after the + day after Ramadan, not the first Sunday after Ramadan. + + Canada's Yukon, represented by America/Whitehorse and + America/Dawson, advanced to -07 year-round, beginning with its + spring-forward transition on 2020-03-08, and will not fall back on + 2020-11-01. Although a government press release calls this + "permanent Pacific Daylight Saving Time", we prefer MST for + consistency with nearby Dawson Creek, Creston, and Fort Nelson. + (Thanks to Tim Parenti.) + + Changes to past timestamps + + Shanghai observed DST in 1919. (Thanks to Phake Nick.) + + Changes to timezone identifiers + + To reflect current usage in English better, America/Godthab has + been renamed to America/Nuuk. A backwards-compatibility link + remains for the old name. + + Changes to code + + localtime.c no longer mishandles timestamps after the last + transition in a TZif file with leap seconds and with daylight + saving time transitions projected into the indefinite future. + For example, with TZ='America/Los_Angeles' with leap seconds, + zdump formerly reported a DST transition on 2038-03-14 + from 01:59:32.999... to 02:59:33 instead of the correct transition + from 01:59:59.999... to 03:00:00. + + zic -L now supports an Expires line in the leapseconds file, and + truncates the TZif output accordingly. This propagates leap + second expiration information into the TZif file, and avoids the + abovementioned localtime.c bug as well as similar bugs present in + many client implementations. If no Expires line is present, zic + -L instead truncates the TZif output based on the #expires comment + present in leapseconds files distributed by tzdb 2018f and later; + however, this usage is obsolescent. For now, the distributed + leapseconds file has an Expires line that is commented out, so + that the file can be fed to older versions of zic which ignore the + commented-out line. Future tzdb distributions are planned to + contain a leapseconds file with an Expires line. + + The configuration macros HAVE_TZNAME and USG_COMPAT should now be + set to 1 if the system library supports the feature, and 2 if not. + As before, these macros are nonzero if tzcode should support the + feature, zero otherwise. + + The configuration macro ALTZONE now has the same values with the + same meaning as HAVE_TZNAME and USG_COMPAT. + + The code's defense against CRLF in leap-seconds.list is now + portable to POSIX awk. (Problem reported by Deborah Goldsmith.) + + Although the undocumented tzsetwall function is not changed in + this release, it is now deprecated in preparation for removal in + future releases. Due to POSIX requirements, tzsetwall has not + worked for some time. Any code that uses it should instead use + tzalloc(NULL) or, if portability trumps thread-safety, should + unset the TZ environment variable. + + Changes to commentary + + The Îles-de-la-Madeleine and the Listuguj reserve are noted as + following America/Halifax, and comments about Yukon's "south" and + "north" have been corrected to say "east" and "west". (Thanks to + Jeffery Nichols.) + + Release 2019c - 2019-09-11 08:59:48 -0700 Briefly: Modified: vendor/tzdata/dist/africa ============================================================================== --- vendor/tzdata/dist/africa Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/africa Fri Apr 24 04:53:23 2020 (r360238) @@ -867,19 +867,25 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis # Morocco will be on GMT starting from Sunday, May 5th 2019 at 3am. # The switch to GMT+1 will occur on Sunday, June 9th 2019 at 2am.... # http://fr.le360.ma/societe/voici-la-date-du-retour-a-lheure-legale-au-maroc-188222 + +# From Semlali Naoufal (2020-04-14): +# Following the announcement by the Moroccan government, the switch to +# GMT time will take place on Sunday, April 19, 2020 from 3 a.m. and +# the return to GMT+1 time will take place on Sunday, May 31, 2020 at 2 a.m.... +# https://maroc-diplomatique.net/maroc-le-retour-a-lheure-gmt-est-prevu-dimanche-prochain/ +# http://aujourdhui.ma/actualite/gmt1-retour-a-lheure-normale-dimanche-prochain-1 # -# From Paul Eggert (2019-05-20): -# This agrees with our 2018-11-01 guess that the Moroccan government -# would continue the practice of falling back at 03:00 the last Sunday -# before Ramadan, and of springing forward at 02:00 the first Sunday after -# Ramadan, as this has been the practice since 2012. To implement this, -# transition dates for 2019 through 2087 were determined by running the -# following program under GNU Emacs 26.2. -# (let ((islamic-year 1440)) +# From Paul Eggert (2020-04-14): +# For now, guess that in the future Morocco will fall back at 03:00 +# the last Sunday before Ramadan, and spring forward at 02:00 the +# first Sunday after the day after Ramadan. To implement this, +# transition dates for 2021 through 2087 were determined by running +# the following program under GNU Emacs 26.3. +# (let ((islamic-year 1442)) # (require 'cal-islam) # (while (< islamic-year 1511) # (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) -# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (b (1+ (calendar-islamic-to-absolute (list 10 1 islamic-year)))) # (sunday 0)) # (while (/= sunday (mod (setq a (1- a)) 7))) # (while (/= sunday (mod b 7)) @@ -939,7 +945,7 @@ Rule Morocco 2018 only - Jun 17 2:00 1:00 - Rule Morocco 2019 only - May 5 3:00 -1:00 - Rule Morocco 2019 only - Jun 9 2:00 0 - Rule Morocco 2020 only - Apr 19 3:00 -1:00 - -Rule Morocco 2020 only - May 24 2:00 0 - +Rule Morocco 2020 only - May 31 2:00 0 - Rule Morocco 2021 only - Apr 11 3:00 -1:00 - Rule Morocco 2021 only - May 16 2:00 0 - Rule Morocco 2022 only - Mar 27 3:00 -1:00 - @@ -955,7 +961,7 @@ Rule Morocco 2026 only - Mar 22 2:00 0 - Rule Morocco 2027 only - Feb 7 3:00 -1:00 - Rule Morocco 2027 only - Mar 14 2:00 0 - Rule Morocco 2028 only - Jan 23 3:00 -1:00 - -Rule Morocco 2028 only - Feb 27 2:00 0 - +Rule Morocco 2028 only - Mar 5 2:00 0 - Rule Morocco 2029 only - Jan 14 3:00 -1:00 - Rule Morocco 2029 only - Feb 18 2:00 0 - Rule Morocco 2029 only - Dec 30 3:00 -1:00 - @@ -971,7 +977,7 @@ Rule Morocco 2033 only - Dec 25 2:00 0 - Rule Morocco 2034 only - Nov 5 3:00 -1:00 - Rule Morocco 2034 only - Dec 17 2:00 0 - Rule Morocco 2035 only - Oct 28 3:00 -1:00 - -Rule Morocco 2035 only - Dec 2 2:00 0 - +Rule Morocco 2035 only - Dec 9 2:00 0 - Rule Morocco 2036 only - Oct 19 3:00 -1:00 - Rule Morocco 2036 only - Nov 23 2:00 0 - Rule Morocco 2037 only - Oct 4 3:00 -1:00 - @@ -987,7 +993,7 @@ Rule Morocco 2041 only - Sep 29 2:00 0 - Rule Morocco 2042 only - Aug 10 3:00 -1:00 - Rule Morocco 2042 only - Sep 21 2:00 0 - Rule Morocco 2043 only - Aug 2 3:00 -1:00 - -Rule Morocco 2043 only - Sep 6 2:00 0 - +Rule Morocco 2043 only - Sep 13 2:00 0 - Rule Morocco 2044 only - Jul 24 3:00 -1:00 - Rule Morocco 2044 only - Aug 28 2:00 0 - Rule Morocco 2045 only - Jul 9 3:00 -1:00 - @@ -1003,7 +1009,7 @@ Rule Morocco 2049 only - Jul 4 2:00 0 - Rule Morocco 2050 only - May 15 3:00 -1:00 - Rule Morocco 2050 only - Jun 26 2:00 0 - Rule Morocco 2051 only - May 7 3:00 -1:00 - -Rule Morocco 2051 only - Jun 11 2:00 0 - +Rule Morocco 2051 only - Jun 18 2:00 0 - Rule Morocco 2052 only - Apr 28 3:00 -1:00 - Rule Morocco 2052 only - Jun 2 2:00 0 - Rule Morocco 2053 only - Apr 13 3:00 -1:00 - @@ -1019,7 +1025,7 @@ Rule Morocco 2057 only - Apr 8 2:00 0 - Rule Morocco 2058 only - Feb 17 3:00 -1:00 - Rule Morocco 2058 only - Mar 31 2:00 0 - Rule Morocco 2059 only - Feb 9 3:00 -1:00 - -Rule Morocco 2059 only - Mar 16 2:00 0 - +Rule Morocco 2059 only - Mar 23 2:00 0 - Rule Morocco 2060 only - Feb 1 3:00 -1:00 - Rule Morocco 2060 only - Mar 7 2:00 0 - Rule Morocco 2061 only - Jan 16 3:00 -1:00 - @@ -1029,13 +1035,13 @@ Rule Morocco 2062 only - Feb 12 2:00 0 - Rule Morocco 2062 only - Dec 31 3:00 -1:00 - Rule Morocco 2063 only - Feb 4 2:00 0 - Rule Morocco 2063 only - Dec 16 3:00 -1:00 - -Rule Morocco 2064 only - Jan 20 2:00 0 - +Rule Morocco 2064 only - Jan 27 2:00 0 - Rule Morocco 2064 only - Dec 7 3:00 -1:00 - Rule Morocco 2065 only - Jan 11 2:00 0 - Rule Morocco 2065 only - Nov 22 3:00 -1:00 - Rule Morocco 2066 only - Jan 3 2:00 0 - Rule Morocco 2066 only - Nov 14 3:00 -1:00 - -Rule Morocco 2066 only - Dec 19 2:00 0 - +Rule Morocco 2066 only - Dec 26 2:00 0 - Rule Morocco 2067 only - Nov 6 3:00 -1:00 - Rule Morocco 2067 only - Dec 11 2:00 0 - Rule Morocco 2068 only - Oct 21 3:00 -1:00 - @@ -1045,13 +1051,13 @@ Rule Morocco 2069 only - Nov 17 2:00 0 - Rule Morocco 2070 only - Oct 5 3:00 -1:00 - Rule Morocco 2070 only - Nov 9 2:00 0 - Rule Morocco 2071 only - Sep 20 3:00 -1:00 - -Rule Morocco 2071 only - Oct 25 2:00 0 - +Rule Morocco 2071 only - Nov 1 2:00 0 - Rule Morocco 2072 only - Sep 11 3:00 -1:00 - Rule Morocco 2072 only - Oct 16 2:00 0 - Rule Morocco 2073 only - Aug 27 3:00 -1:00 - Rule Morocco 2073 only - Oct 8 2:00 0 - Rule Morocco 2074 only - Aug 19 3:00 -1:00 - -Rule Morocco 2074 only - Sep 23 2:00 0 - +Rule Morocco 2074 only - Sep 30 2:00 0 - Rule Morocco 2075 only - Aug 11 3:00 -1:00 - Rule Morocco 2075 only - Sep 15 2:00 0 - Rule Morocco 2076 only - Jul 26 3:00 -1:00 - @@ -1061,7 +1067,7 @@ Rule Morocco 2077 only - Aug 22 2:00 0 - Rule Morocco 2078 only - Jul 10 3:00 -1:00 - Rule Morocco 2078 only - Aug 14 2:00 0 - Rule Morocco 2079 only - Jun 25 3:00 -1:00 - -Rule Morocco 2079 only - Jul 30 2:00 0 - +Rule Morocco 2079 only - Aug 6 2:00 0 - Rule Morocco 2080 only - Jun 16 3:00 -1:00 - Rule Morocco 2080 only - Jul 21 2:00 0 - Rule Morocco 2081 only - Jun 1 3:00 -1:00 - @@ -1077,7 +1083,7 @@ Rule Morocco 2085 only - May 27 2:00 0 - Rule Morocco 2086 only - Apr 14 3:00 -1:00 - Rule Morocco 2086 only - May 19 2:00 0 - Rule Morocco 2087 only - Mar 30 3:00 -1:00 - -Rule Morocco 2087 only - May 4 2:00 0 - +Rule Morocco 2087 only - May 11 2:00 0 - # For dates after the somewhat-arbitrary cutoff of 2087, assume that # Morocco will no longer observe DST. At some point this table will # need to be extended, though quite possibly Morocco will change the @@ -1179,7 +1185,7 @@ Link Africa/Maputo Africa/Lusaka # Zambia Rule Namibia 1994 only - Mar 21 0:00 -1:00 WAT Rule Namibia 1994 2017 - Sep Sun>=1 2:00 0 CAT Rule Namibia 1995 2017 - Apr Sun>=1 2:00 -1:00 WAT -# Rearguard section, for parsers that do not support negative DST. +# Rearguard section, for parsers lacking negative DST; see ziguard.awk. #Rule Namibia 1994 only - Mar 21 0:00 0 WAT #Rule Namibia 1994 2017 - Sep Sun>=1 2:00 1:00 CAT #Rule Namibia 1995 2017 - Apr Sun>=1 2:00 0 WAT @@ -1193,7 +1199,7 @@ Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 2:00 - SAST 1990 Mar 21 # independence # Vanguard section, for zic and other parsers that support negative DST. 2:00 Namibia %s -# Rearguard section, for parsers that do not support negative DST. +# Rearguard section, for parsers lacking negative DST; see ziguard.awk. # 2:00 - CAT 1994 Mar 21 0:00 # From Paul Eggert (2017-04-07): # The official date of the 2017 rule change was 2017-10-24. See: Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/asia Fri Apr 24 04:53:23 2020 (r360238) @@ -286,6 +286,27 @@ Zone Asia/Yangon 6:24:47 - LMT 1880 # or Rangoo # China +# From Phake Nick (2020-04-15): +# According to this news report: +# http://news.sina.com.cn/c/2004-09-01/19524201403.shtml +# on April 11, 1919, newspaper in Shanghai said clocks in Shanghai will spring +# forward for an hour starting from midnight of that Saturday. The report did +# not mention what happened in Shanghai thereafter, but it mentioned that a +# similar trial in Tianjin which ended at October 1st as citizens are told to +# recede the clock on September 30 from 12:00pm to 11:00pm. The trial at +# Tianjin got terminated in 1920. +# +# From Paul Eggert (2020-04-15): +# The Returns of Trade and Trade Reports, page 711, says "Daylight saving was +# given a trial during the year, and from the 12th April to the 1st October +# the clocks were all set one hour ahead of sun time. Though the scheme was +# generally esteemed a success, it was announced early in 1920 that it would +# not be repeated." +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Shang 1919 only - Apr 12 24:00 1:00 D +Rule Shang 1919 only - Sep 30 24:00 0 S + # From Paul Eggert (2018-10-02): # The following comes from Table 1 of: # Li Yu. Research on the daylight saving movement in 1940s Shanghai. @@ -294,7 +315,90 @@ Zone Asia/Yangon 6:24:47 - LMT 1880 # or Rangoo # The table lists dates only; I am guessing 00:00 and 24:00 transition times. # Also, the table lists the planned end of DST in 1949, but the corresponding # zone line cuts this off on May 28, when the Communists took power. + +# From Phake Nick (2020-04-15): # +# For the history of time in Shanghai between 1940-1942, the situation is +# actually slightly more complex than the table [below].... At the time, +# there were three different authorities in Shanghai, including Shanghai +# International Settlement, a settlement established by western countries with +# its own westernized form of government, Shanghai French Concession, similar +# to the international settlement but is controlled by French, and then the +# rest of the city of Shanghai, which have already been controlled by Japanese +# force through a puppet local government (Wang Jingwei regime). It was +# additionally complicated by the circumstances that, according to the 1940s +# Shanghai summer time essay cited in the database, some +# departments/businesses/people in the Shanghai city itself during that time +# period, refused to change their clock and instead only changed their opening +# hours. +# +# For example, as quoted in the article, in 1940, other than the authority +# itself, power, tram, bus companies, cinema, department stores, and other +# public service organizations have all decided to follow the summer time and +# spring forward the clock. On the other hand, the custom office refused to +# spring forward the clock because of worry on mechanical wear to the physical +# clock, postal office refused to spring forward because of disruption to +# business and log-keeping, although they did changed their office hour to +# match rest of the city. So is travel agents, and also weather +# observatory. It is said both time standards had their own supporters in the +# city at the time, those who prefer new time standard would have moved their +# clock while those who prefer the old time standard would keep their clock +# unchange, and there were different clocks that use different time standard +# in the city at the time for people who use different time standard to adjust +# their clock to their preferred time. +# +# a. For the 1940 May 31 spring forward, the essay claim that it was +# coordinared between the international settlement authority and the French +# concession authority and have gathered support from Hong Kong and Xiamen, +# that it would spring forward an hour from May 31 "midnight", and the essay +# claim "Hong Kong government implemented the spring forward in the same time +# on the same date as Shanghai". +# +# b. For the 1940 fall back, it was said that they initially intended to do +# so on September 30 00:59 at night, however they postponed it to October 12 +# after discussion with relevant parties. However schools restored to the +# original schedule ten days earlier. +# +# c. For the 1941 spring forward, it is said to start from March 15 +# "following the previous year's method", and in addition to that the essay +# cited an announcement in 1941 from the Wang regime which said the Special +# City of Shanghai under Wang regime control will follow the DST rule set by +# the Settlements, irrespective of the original DST plan announced by the Wang +# regime for other area under its control(April 1 to September 30). (no idea +# to situation before that announcement) +# +# d. For the 1941 fall back, it was said that the fall back would occurs at +# the end of September (A newspaper headline cited by the essay, published on +# October 1, 1941, have the headlines which said "French Concession would +# rewind to the old clock this morning), but it ultimately didn't happen due +# to disagreement between the international settlement authority and the +# French concession authority, and the fall back ultimately occurred on +# November 1. +# +# e. In 1941 December, Japan have officially started war with the United +# States and the United Kingdom, and in Shanghai they have marched into the +# international settlement, taken over its control +# +# f. For the 1942 spring forward, the essay said that the spring forward +# started on January 31. It said this time the custom office and postal +# department will also change their clocks, unlike before. +# +# g. The essay itself didn't cover any specific changes thereafter until the +# end of the war, it quoted a November 1942 command from the government of the +# Wang regime, which claim the daylight saving time applies year round during +# the war. However, the essay ambiguously said the period is "February 1 to +# September 30", which I don't really understand what is the meaning of such +# period in the context of year round implementation here.. More researches +# might be needed to show exactly what happened during that period of time. + +# From Phake Nick (2020-04-15): +# According to a Japanese tour bus pamphlet in Nanjing area believed to be +# from around year 1941: http://www.tt-museum.jp/tairiku_0280_nan1941.html , +# the schedule listed was in the format of Japanese time. Which indicate some +# use of the Japanese time (instead of syncing by DST) might have occurred in +# the Yangtze river delta area during that period of time although the scope +# of such use will need to be investigated to determine. +# # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Shang 1940 only - Jun 1 0:00 1:00 D Rule Shang 1940 only - Oct 12 24:00 0 S @@ -572,7 +676,7 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 6:00 - +06 -# Hong Kong (Xianggang) +# Hong Kong # Milne gives 7:36:41.7; round this. @@ -582,9 +686,7 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # it is not [an] observatory, but the official meteorological agency of HK, # and also serves as the official timing agency), there are some missing # and incorrect rules. Although the exact switch over time is missing, I -# think 3:30 is correct. The official DST record for Hong Kong can be -# obtained from -# http://www.hko.gov.hk/gts/time/Summertime.htm +# think 3:30 is correct. # From Phake Nick (2018-10-27): # According to Singaporean newspaper @@ -695,10 +797,10 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # Resolution of the Legislative Council passed on 9 May 1979 # https://www.legco.gov.hk/yr78-79/english/lc_sitg/hansard/h790509.pdf#page=39 -# From Paul Eggert (2019-05-31): +# From Paul Eggert (2020-04-15): # Here are the dates given at -# https://www.hko.gov.hk/gts/time/Summertime.htm -# as of 2014-06-19: +# https://www.hko.gov.hk/en/gts/time/Summertime.htm +# as of 2020-02-10: # Year Period # 1941 15 Jun to 30 Sep # 1942 Whole year @@ -1828,6 +1930,47 @@ Zone Asia/Jerusalem 2:20:54 - LMT 1880 # '9:00' and 'JST' is from Guy Harris. +# From Paul Eggert (2020-01-19): +# Starting in the 7th century, Japan generally followed an ancient Chinese +# timekeeping system that divided night and day into six hours each, +# with hour length depending on season. In 1873 the government +# started requiring the use of a Western style 24-hour clock. See: +# Yulia Frumer, "Making Time: Astronomical Time Measurement in Tokugawa Japan" +# . As the tzdb code and +# data support only 24-hour clocks, its tables model timestamps before +# 1873 using Western-style local mean time. + +# From Hideyuki Suzuki (1998-11-09): +# 'Tokyo' usually stands for the former location of Tokyo Astronomical +# Observatory: 139° 44' 40.90" E (9h 18m 58.727s), 35° 39' 16.0" N. +# This data is from 'Rika Nenpyou (Chronological Scientific Tables) 1996' +# edited by National Astronomical Observatory of Japan.... +# JST (Japan Standard Time) has been used since 1888-01-01 00:00 (JST). +# The law is enacted on 1886-07-07. + +# From Hideyuki Suzuki (1998-11-16): +# The ordinance No. 51 (1886) established "standard time" in Japan, +# which stands for the time on 135° E. +# In the ordinance No. 167 (1895), "standard time" was renamed to "central +# standard time". And the same ordinance also established "western standard +# time", which stands for the time on 120° E.... But "western standard +# time" was abolished in the ordinance No. 529 (1937). In the ordinance No. +# 167, there is no mention regarding for what place western standard time is +# standard.... +# +# I wrote "ordinance" above, but I don't know how to translate. +# In Japanese it's "chokurei", which means ordinance from emperor. + +# From Yu-Cheng Chuang (2013-07-12): +# ...the Meiji Emperor announced Ordinance No. 167 of Meiji Year 28 "The clause +# about standard time" ... The adoption began from Jan 1, 1896. +# https://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時) +# +# ...the Showa Emperor announced Ordinance No. 529 of Showa Year 12 ... which +# means the whole Japan territory, including later occupations, adopt Japan +# Central Time (UT+9). The adoption began on Oct 1, 1937. +# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 + # From Paul Eggert (1995-03-06): # Today's _Asahi Evening News_ (page 4) reports that Japan had # daylight saving between 1948 and 1951, but "the system was discontinued @@ -1876,37 +2019,6 @@ Rule Japan 1948 1951 - Sep Sat>=8 25:00 0 S Rule Japan 1949 only - Apr Sat>=1 24:00 1:00 D Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D -# From Hideyuki Suzuki (1998-11-09): -# 'Tokyo' usually stands for the former location of Tokyo Astronomical -# Observatory: 139° 44' 40.90" E (9h 18m 58.727s), 35° 39' 16.0" N. -# This data is from 'Rika Nenpyou (Chronological Scientific Tables) 1996' -# edited by National Astronomical Observatory of Japan.... -# JST (Japan Standard Time) has been used since 1888-01-01 00:00 (JST). -# The law is enacted on 1886-07-07. - -# From Hideyuki Suzuki (1998-11-16): -# The ordinance No. 51 (1886) established "standard time" in Japan, -# which stands for the time on 135° E. -# In the ordinance No. 167 (1895), "standard time" was renamed to "central -# standard time". And the same ordinance also established "western standard -# time", which stands for the time on 120° E.... But "western standard -# time" was abolished in the ordinance No. 529 (1937). In the ordinance No. -# 167, there is no mention regarding for what place western standard time is -# standard.... -# -# I wrote "ordinance" above, but I don't know how to translate. -# In Japanese it's "chokurei", which means ordinance from emperor. - -# From Yu-Cheng Chuang (2013-07-12): -# ...the Meiji Emperor announced Ordinance No. 167 of Meiji Year 28 "The clause -# about standard time" ... The adoption began from Jan 1, 1896. -# https://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時) -# -# ...the Showa Emperor announced Ordinance No. 529 of Showa Year 12 ... which -# means the whole Japan territory, including later occupations, adopt Japan -# Central Time (UT+9). The adoption began on Oct 1, 1937. -# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 - # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u 9:00 Japan J%sT @@ -3086,22 +3198,9 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # [T]he Palestinian cabinet decision (Mar 8th 2016) published on # http://www.palestinecabinet.gov.ps/WebSite/Upload/Decree/GOV_17/16032016134830.pdf # states that summer time will end on Oct 29th at 01:00. -# -# From Tim Parenti (2016-10-19): -# Predict fall transitions on October's last Saturday at 01:00 from now on. -# This is consistent with the 2016 transition as well as our spring -# predictions. -# -# From Paul Eggert (2016-10-19): -# It's also consistent with predictions in the following URLs today: -# https://www.timeanddate.com/time/change/gaza-strip/gaza -# https://www.timeanddate.com/time/change/west-bank/hebron # From Sharef Mustafa (2018-03-16): -# Palestine summer time will start on Mar 24th 2018 by advancing the -# clock by 60 minutes as per Palestinian cabinet decision published on -# the official website, though the decree did not specify the exact -# time of the time shift. +# Palestine summer time will start on Mar 24th 2018 ... # http://www.palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e7a42ab7-ee23-435a-b9c8-a4f7e81f3817 # From Even Scharning (2019-03-23): @@ -3111,15 +3210,20 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # From Sharif Mustafa (2019-03-26): # The Palestinian cabinet announced today that the switch to DST will # be on Fri Mar 29th 2019 by advancing the clock by 60 minutes. -# The decree signing date is Mar 12th but it was not published till today. -# The decree does not specify the exact time of switch. # http://palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e54e9ea1-50ee-4137-84df-0d6c78da259b # # From Even Scharning (2019-04-10): # Our source in Palestine said it happened Friday 29 at 00:00 local time.... + +# From Sharef Mustafa (2019-10-18): +# Palestine summer time will end on midnight Oct 26th 2019 ... +# http://www.palestinecabinet.gov.ps/website/ar/ViewDetails?ID=43948 # # From Paul Eggert (2019-04-10): # For now, guess spring-ahead transitions are March's last Friday at 00:00. +# +# From Tim Parenti (2016-10-19): +# Predict fall transitions on October's last Saturday at 01:00 from now on. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S Modified: vendor/tzdata/dist/backward ============================================================================== --- vendor/tzdata/dist/backward Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/backward Fri Apr 24 04:53:23 2020 (r360238) @@ -17,6 +17,7 @@ Link America/Atikokan America/Coral_Harbour Link America/Argentina/Cordoba America/Cordoba Link America/Tijuana America/Ensenada Link America/Indiana/Indianapolis America/Fort_Wayne +Link America/Nuuk America/Godthab Link America/Indiana/Indianapolis America/Indianapolis Link America/Argentina/Jujuy America/Jujuy Link America/Indiana/Knox America/Knox_IN Modified: vendor/tzdata/dist/backzone ============================================================================== --- vendor/tzdata/dist/backzone Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/backzone Fri Apr 24 04:53:23 2020 (r360238) @@ -33,6 +33,35 @@ # assumes rules from other files. In the tz distribution, use # 'make PACKRATDATA=backzone zones' to compile and install this file. + +# From Paul Eggert (2020-04-15): +# The following remarks should be incorporated into this table sometime. +# Patches in 'git format-patch' format would be welcome. +# +# From Phake Nick (2020-04-15): +# ... the historical timezone data for those China zones seems to be +# incorrect. The transition to GMT+8 date given there for these zones +# were 1980 which also contradict the file description that they do +# not disagree with normal zone after 1970. According to sources that +# have also been cited in the asia file, except Xinjiang and Tibet, +# they should have adopted the Beijing Time from around 1949/1950 +# depends on exactly when each of those cities were taken over by the +# communist army. And they should also follow the DST setting of +# Asia/Shanghai after that point of time. In addition, +# http://gaz.ncl.edu.tw/detail.jsp?sysid=E1091792 the document from +# Chongqing Nationalist government say in year 1945 all of China +# should adopt summer time due to the war (not sure whether it +# continued after WWII ends)(Probably only enforced in area under +# their rule at the time?) The Asia/Harbin's 1932 and 1940 entry +# should also be incorrect. As per sources recorded at +# https://wiki.suikawiki.org/n/%E6%BA%80%E5%B7%9E%E5%9B%BD%E3%81%AE%E6%A8%99%E6%BA%96%E6%99%82 +# , in 1932 Harbin should have adopted UTC+8:00 instead of data +# currently listed in the tz database according to official +# announcement from Manchuko. And they should have adopted GMT+9 in +# 1937 January 1st according to official announcement at the time +# being cited on the webpage. + + # Zones are sorted by zone name. Each zone is preceded by the # name of the country that the zone is in, along with any other # commentary and rules associated with the entry. Modified: vendor/tzdata/dist/europe ============================================================================== --- vendor/tzdata/dist/europe Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/europe Fri Apr 24 04:53:23 2020 (r360238) @@ -549,12 +549,13 @@ Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2 0:00 1:00 IST 1947 Nov 2 2:00s 0:00 - GMT 1948 Apr 18 2:00s 0:00 GB-Eire GMT/IST 1968 Oct 27 -# The next line is for when negative SAVE values are used. +# Vanguard section, for zic and other parsers that support negative DST. 1:00 Eire IST/GMT -# These three lines are for when SAVE values are always nonnegative. +# Rearguard section, for parsers lacking negative DST; see ziguard.awk. # 1:00 - IST 1971 Oct 31 2:00u # 0:00 GB-Eire GMT/IST 1996 # 0:00 EU GMT/IST +# End of rearguard section. ############################################################################### @@ -1018,7 +1019,7 @@ Zone Europe/Prague 0:57:44 - LMT 1850 1:00 Czech CE%sT 1946 Dec 1 3:00 # Vanguard section, for zic and other parsers that support negative DST. 1:00 -1:00 GMT 1947 Feb 23 2:00 -# Rearguard section, for parsers that do not support negative DST. +# Rearguard section, for parsers lacking negative DST; see ziguard.awk. # 0:00 - GMT 1947 Feb 23 2:00 # End of rearguard section. 1:00 Czech CE%sT 1979 @@ -1175,14 +1176,17 @@ Zone America/Danmarkshavn -1:14:40 - LMT 1916 Jul 28 -3:00 - -03 1980 Apr 6 2:00 -3:00 EU -03/-02 1996 0:00 - GMT +# +# Use the old name Scoresbysund, as the current name Ittoqqortoormiit +# exceeds tzdb's 14-letter limit and has no common English abbreviation. Zone America/Scoresbysund -1:27:52 - LMT 1916 Jul 28 # Ittoqqortoormiit -2:00 - -02 1980 Apr 6 2:00 -2:00 C-Eur -02/-01 1981 Mar 29 -1:00 EU -01/+00 -Zone America/Godthab -3:26:56 - LMT 1916 Jul 28 # Nuuk +Zone America/Nuuk -3:26:56 - LMT 1916 Jul 28 # Godthåb -3:00 - -03 1980 Apr 6 2:00 -3:00 EU -03/-02 -Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base +Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik -4:00 Thule A%sT # Estonia @@ -1552,7 +1556,7 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 Oct # # From January 1st, 1908 the whole of Iceland was standardised at 1 hour # behind GMT. Previously, local mean solar time was used in different parts -# of Iceland, the almanak had been based on Reykjavik mean solar time which +# of Iceland, the almanak had been based on Reykjavík mean solar time which # was 1 hour and 28 minutes behind GMT. # # "first day of winter" referred to [below] means the first day of the 26 weeks Modified: vendor/tzdata/dist/leap-seconds.list ============================================================================== --- vendor/tzdata/dist/leap-seconds.list Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/leap-seconds.list Fri Apr 24 04:53:23 2020 (r360238) @@ -62,7 +62,7 @@ # Terry Quinn, "The BIPM and the Accurate Measurement # of Time," Proc. of the IEEE, Vol. 79, pp. 894-905, # July, 1991. -# reprinted in: +# reprinted in: # Christine Hackman and Donald B Sullivan (eds.) # Time and Frequency Measurement # American Association of Physics Teachers (1996) @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C58 -# File expires on: 28 June 2020 +# Updated through IERS Bulletin C59 +# File expires on: 28 December 2020 # -#@ 3802291200 +#@ 3818102400 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h f28827d2 f263b6c3 ec0f19eb a3e0dbf0 97f3fa30 +#h a1c168ae 27c79a7d 9dddcfc3 bcfe616b 2e2c44ea Modified: vendor/tzdata/dist/leapseconds ============================================================================== --- vendor/tzdata/dist/leapseconds Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/leapseconds Fri Apr 24 04:53:23 2020 (r360238) @@ -64,9 +64,15 @@ Leap 2012 Jun 30 23:59:60 + S Leap 2015 Jun 30 23:59:60 + S Leap 2016 Dec 31 23:59:60 + S +# UTC timestamp when this leap second list expires. +# Any additional leap seconds will come after this. +# This Expires line is commented out for now, +# so that pre-2020a zic implementations do not reject this file. +#Expires 2020 Dec 28 00:00:00 + # POSIX timestamps for the data in this file: #updated 1467936000 (2016-07-08 00:00:00 UTC) -#expires 1593302400 (2020-06-28 00:00:00 UTC) +#expires 1609113600 (2020-12-28 00:00:00 UTC) -# Updated through IERS Bulletin C58 -# File expires on: 28 June 2020 +# Updated through IERS Bulletin C59 +# File expires on: 28 December 2020 Modified: vendor/tzdata/dist/leapseconds.awk ============================================================================== --- vendor/tzdata/dist/leapseconds.awk Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/leapseconds.awk Fri Apr 24 04:53:23 2020 (r360238) @@ -68,12 +68,12 @@ BEGIN { monthabbr[11] = "Nov" monthabbr[12] = "Dec" - # Strip trailing CR, in case the input has CRLF form a la NIST. - RS = "\r?\n" - sstamp_init() } +# In case the input has CRLF form a la NIST. +{ sub(/\r$/, "") } + /^#[ \t]*[Uu]pdated through/ || /^#[ \t]*[Ff]ile expires on/ { last_lines = last_lines $0 "\n" } @@ -100,6 +100,17 @@ BEGIN { } END { + sstamp_to_ymdhMs(expires, ss_NTP) + + print "" + print "# UTC timestamp when this leap second list expires." + print "# Any additional leap seconds will come after this." + print "# This Expires line is commented out for now," + print "# so that pre-2020a zic implementations do not reject this file." + printf "%sExpires %.4d\t%s\t%.2d\t%.2d:%.2d:%.2d\n", \ + EXPIRES_LINE ? "" : "#", \ + ss_year, monthabbr[ss_month], ss_mday, ss_hour, ss_min, ss_sec + # The difference between the NTP and POSIX epochs is 70 years # (including 17 leap days), each 24 hours of 60 minutes of 60 # seconds each. Modified: vendor/tzdata/dist/northamerica ============================================================================== --- vendor/tzdata/dist/northamerica Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/northamerica Fri Apr 24 04:53:23 2020 (r360238) @@ -86,7 +86,7 @@ # For more about the first ten years of DST in the United States, see # Robert Garland, Ten years of daylight saving from the Pittsburgh standpoint # (Carnegie Library of Pittsburgh, 1927). -# http://www.clpgh.org/exhibit/dst.html +# https://web.archive.org/web/20160517155308/http://www.clpgh.org/exhibit/dst.html # # Shanks says that DST was called "War Time" in the US in 1918 and 1919. # However, DST was imposed by the Standard Time Act of 1918, which @@ -1470,7 +1470,8 @@ Zone America/Goose_Bay -4:01:40 - LMT 1884 # Happy Val -4:00 Canada A%sT -# west Labrador, Nova Scotia, Prince Edward I +# west Labrador, Nova Scotia, Prince Edward I, +# Îles-de-la-Madeleine, Listuguj reserve # From Brian Inglis (2015-07-20): # From the historical weather station records available at: @@ -1489,6 +1490,13 @@ Zone America/Goose_Bay -4:01:40 - LMT 1884 # Happy Val # in Canada to observe DST in 1971 but not 1970; for now we'll assume # this is a typo. +# From Jeffery Nichols (2020-01-09): +# America/Halifax ... also applies to Îles-de-la-Madeleine and the Listuguj +# reserve in Quebec. Officially, this came into effect on January 1, 2007 +# (Legal Time Act, CQLR c T-5.1), but the legislative debates surrounding that +# bill say that it is "accommodating the customs and practices" of those +# regions, which suggests that they have always been in-line with Halifax. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Halifax 1916 only - Apr 1 0:00 1:00 D Rule Halifax 1916 only - Oct 1 0:00 0 S @@ -1582,19 +1590,20 @@ Zone America/Moncton -4:19:08 - LMT 1883 Dec 9 # Quebec -# From Paul Eggert (2015-03-24): +# From Paul Eggert (2020-01-10): # See America/Toronto for most of Quebec, including Montreal. +# See America/Halifax for the Îles de la Madeleine and the Listuguj reserve. # # Matthews and Vincent (1998) also write that Quebec east of the -63 # meridian is supposed to observe AST, but residents as far east as # Natashquan use EST/EDT, and residents east of Natashquan use AST. # The Quebec department of justice writes in # "The situation in Minganie and Basse-Côte-Nord" -# http://www.justice.gouv.qc.ca/english/publications/generale/temps-minganie-a.htm +# https://www.justice.gouv.qc.ca/en/department/ministre/functions-and-responsabilities/legal-time-in-quebec/the-situation-in-minganie-and-basse-cote-nord/ # that the coastal strip from just east of Natashquan to Blanc-Sablon # observes Atlantic standard time all year round. -# https://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en -# says this common practice was codified into law as of 2007. +# This common practice was codified into law as of 2007; see Legal Time Act, +# CQLR c T-5.1 . # For lack of better info, guess this practice began around 1970, contra to # Shanks & Pottenger who have this region observing AST/ADT. @@ -1613,6 +1622,15 @@ Zone America/Blanc-Sablon -3:48:28 - LMT 1884 # Nipigon (EST) and Rainy River (CST) are the largest that we know of. # Far west Ontario is like Winnipeg; far east Quebec is like Halifax. +# From Jeffery Nichols (2020-02-06): +# According to the [Shanks] atlas, those western Ontario zones are huge, +# covering most of Ontario northwest of Sault Ste Marie and Timmins. +# The zones seem to include towns bigger than the ones they're named after, +# like Dryden in America/Rainy_River and Wawa (and maybe Attawapiskat) in +# America/Nipigon. I assume it's too much trouble to change the name of the +# zone (like when you found out that America/Glace_Bay includes Sydney, Nova +# Scotia).... + # From Mark Brader (2003-07-26): # [According to the Toronto Star] Orillia, Ontario, adopted DST # effective Saturday, 1912-06-22, 22:00; the article mentions that @@ -2419,6 +2437,18 @@ Zone America/Creston -7:46:04 - LMT 1884 # obtained in November 2008 should be ignored... # I apologize for reporting incorrect information in 2008. +# From Tim Parenti (2020-03-05): +# The government of Yukon announced [yesterday] the cessation of seasonal time +# changes. "After clocks are pushed ahead one hour on March 8, the territory +# will remain on [UTC-07]. ... [The government] found 93 per cent of +# respondents wanted to end seasonal time changes and, of that group, 70 per +# cent wanted 'permanent Pacific Daylight Saving Time.'" +# https://www.cbc.ca/news/canada/north/yukon-end-daylight-saving-time-1.5486358 +# +# Although the government press release prefers PDT, we prefer MST for +# consistency with nearby Dawson Creek, Creston, and Fort Nelson. +# https://yukon.ca/en/news/yukon-end-seasonal-time-change + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule NT_YK 1918 only - Apr 14 2:00 1:00 D Rule NT_YK 1918 only - Oct 27 2:00 0 S @@ -2473,11 +2503,13 @@ Zone America/Inuvik 0 - -00 1953 # Inuvik founded Zone America/Whitehorse -9:00:12 - LMT 1900 Aug 20 -9:00 NT_YK Y%sT 1967 May 28 0:00 -8:00 NT_YK P%sT 1980 - -8:00 Canada P%sT + -8:00 Canada P%sT 2020 Mar 8 2:00 + -7:00 - MST Zone America/Dawson -9:17:40 - LMT 1900 Aug 20 -9:00 NT_YK Y%sT 1973 Oct 28 0:00 -8:00 NT_YK P%sT 1980 - -8:00 Canada P%sT + -8:00 Canada P%sT 2020 Mar 8 2:00 + -7:00 - MST ############################################################################### Modified: vendor/tzdata/dist/theory.html ============================================================================== --- vendor/tzdata/dist/theory.html Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/theory.html Fri Apr 24 04:53:23 2020 (r360238) @@ -298,6 +298,10 @@ in decreasing order of importance: If a name is changed, put its old spelling in the 'backward' file. This means old spellings will continue to work. + Ordinarily a name change should occur only in the rare case when + a location's consensus English-language spelling changes; for example, + in 2008 Asia/Calcutta was renamed to Asia/Kolkata + due to long-time widespread use of the new city name instead of the old.
    @@ -1054,23 +1058,6 @@ an older zic. The functions were inspired by NetBSD.
  • - A function tzsetwall has been added to arrange for the - system's best approximation to local (wall clock) time to be delivered - by subsequent calls to localtime. - Source code for portable applications that "must" run on local - time should call tzsetwall; - if such code is moved to "old" systems that do not - provide tzsetwall, you will not be able to generate an - executable program. - (These functions also arrange for local time to - be used if tzset is called – directly or - indirectly – and there is no TZ environment - variable; portable applications should not, however, rely on this - behavior since it is not the way SVR2 - systems behave.) -
  • -
  • Negative time_t values are supported, on systems where time_t is signed.
  • @@ -1137,7 +1124,7 @@ The vestigial APIs are: may now examine localtime(&clock)->tm_zone (if TM_ZONE is defined) or tzname[localtime(&clock)->tm_isdst] - (if HAVE_TZNAME is defined) to learn the correct time + (if HAVE_TZNAME is nonzero) to learn the correct time zone abbreviation to use.
  • Modified: vendor/tzdata/dist/version ============================================================================== --- vendor/tzdata/dist/version Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/version Fri Apr 24 04:53:23 2020 (r360238) @@ -1 +1 @@ -2019c +2020a Modified: vendor/tzdata/dist/zone.tab ============================================================================== --- vendor/tzdata/dist/zone.tab Fri Apr 24 01:30:33 2020 (r360237) +++ vendor/tzdata/dist/zone.tab Fri Apr 24 04:53:23 2020 (r360238) @@ -131,8 +131,8 @@ CA +4906-11631 America/Creston MST - BC (Creston) CA +5946-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John) CA +5848-12242 America/Fort_Nelson MST - BC (Ft Nelson) CA +4916-12307 America/Vancouver Pacific - BC (most areas) -CA +6043-13503 America/Whitehorse Pacific - Yukon (south) -CA +6404-13925 America/Dawson Pacific - Yukon (north) +CA +6043-13503 America/Whitehorse Pacific - Yukon (east) +CA +6404-13925 America/Dawson Pacific - Yukon (west) CC -1210+09655 Indian/Cocos *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Apr 24 04:54:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A638C2CF1CB; Fri, 24 Apr 2020 04:54:47 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497hfv3zDJz3KfD; Fri, 24 Apr 2020 04:54:47 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A1BE187C1; Fri, 24 Apr 2020 04:54:47 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O4slq7062011; Fri, 24 Apr 2020 04:54:47 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O4slcU062010; Fri, 24 Apr 2020 04:54:47 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202004240454.03O4slcU062010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Fri, 24 Apr 2020 04:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r360239 - vendor/tzdata/tzdata2020a X-SVN-Group: vendor X-SVN-Commit-Author: philip X-SVN-Commit-Paths: vendor/tzdata/tzdata2020a X-SVN-Commit-Revision: 360239 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 04:54:47 -0000 Author: philip Date: Fri Apr 24 04:54:47 2020 New Revision: 360239 URL: https://svnweb.freebsd.org/changeset/base/360239 Log: Tag import of tzdata 2020a Added: vendor/tzdata/tzdata2020a/ - copied from r360238, vendor/tzdata/dist/ From owner-svn-src-all@freebsd.org Fri Apr 24 05:06:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FF792CF4AA; Fri, 24 Apr 2020 05:06:01 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497hvs2jkxz3LB1; Fri, 24 Apr 2020 05:06:01 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 57E54189B4; Fri, 24 Apr 2020 05:06:01 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O561nZ068087; Fri, 24 Apr 2020 05:06:01 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O55w4m068065; Fri, 24 Apr 2020 05:05:58 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202004240505.03O55w4m068065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Fri, 24 Apr 2020 05:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360240 - head/contrib/tzdata X-SVN-Group: head X-SVN-Commit-Author: philip X-SVN-Commit-Paths: head/contrib/tzdata X-SVN-Commit-Revision: 360240 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 05:06:01 -0000 Author: philip Date: Fri Apr 24 05:05:58 2020 New Revision: 360240 URL: https://svnweb.freebsd.org/changeset/base/360240 Log: Import tzdata 2020a Changes: https://github.com/eggert/tz/blob/2020a/NEWS MFC after: 3 days Modified: head/contrib/tzdata/Makefile head/contrib/tzdata/NEWS head/contrib/tzdata/africa head/contrib/tzdata/asia head/contrib/tzdata/backward head/contrib/tzdata/backzone head/contrib/tzdata/europe head/contrib/tzdata/leap-seconds.list head/contrib/tzdata/leapseconds head/contrib/tzdata/leapseconds.awk head/contrib/tzdata/northamerica head/contrib/tzdata/theory.html head/contrib/tzdata/version head/contrib/tzdata/zone.tab head/contrib/tzdata/zone1970.tab Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/Makefile ============================================================================== --- head/contrib/tzdata/Makefile Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/Makefile Fri Apr 24 05:05:58 2020 (r360240) @@ -150,6 +150,15 @@ TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t REDO= posix_right +# Whether to put an "Expires" line in the leapseconds file. +# Use EXPIRES_LINE=1 to put the line in, 0 to omit it. +# The EXPIRES_LINE value matters only if REDO's value contains "right". +# If you change EXPIRES_LINE, remove the leapseconds file before running "make". +# zic's support for the Expires line was introduced in tzdb 2020a, +# and EXPIRES_LINE defaults to 0 for now so that the leapseconds file +# can be given to older zic implementations. +EXPIRES_LINE= 0 + # To install data in text form that has all the information of the TZif data, # (optionally incorporating leap second information), use # TZDATA_TEXT= tzdata.zi leapseconds @@ -295,8 +304,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # than TM_GMTOFF and TM_ZONE. However, most of them are standardized. # # # # To omit or support the external variable "tzname", add one of: -# # -DHAVE_TZNAME=0 -# # -DHAVE_TZNAME=1 +# # -DHAVE_TZNAME=0 # do not support "tzname" +# # -DHAVE_TZNAME=1 # support "tzname", which is defined by system library +# # -DHAVE_TZNAME=2 # support and define "tzname" # # to the "CFLAGS=" line. "tzname" is required by POSIX 1988 and later. # # If not defined, the code attempts to guess HAVE_TZNAME from other macros. # # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause @@ -304,16 +314,20 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # # presumably due to memory allocation issues. # # # # To omit or support the external variables "timezone" and "daylight", add -# # -DUSG_COMPAT=0 -# # -DUSG_COMPAT=1 +# # -DUSG_COMPAT=0 # do not support +# # -DUSG_COMPAT=1 # support, and variables are defined by system library +# # -DUSG_COMPAT=2 # support and define variables # # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by # # Unix Systems Group code and are required by POSIX 2008 (with XSI) and later. # # If not defined, the code attempts to guess USG_COMPAT from other macros. # # # # To support the external variable "altzone", add -# # -DALTZONE +# # -DALTZONE=0 # do not support +# # -DALTZONE=1 # support "altzone", which is defined by system library +# # -DALTZONE=2 # support and define "altzone" # # to the end of the "CFLAGS=" line; although "altzone" appeared in # # System V Release 3.1 it has not been standardized. +# # If not defined, the code attempts to guess ALTZONE from other macros. # # If you want functions that were inspired by early versions of X3J11's work, # add @@ -321,9 +335,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # to the end of the "CFLAGS=" line. This arranges for the functions # "tzsetwall", "offtime", "timelocal", "timegm", "timeoff", # "posix2time", and "time2posix" to be added to the time conversion library. -# "tzsetwall" is like "tzset" except that it arranges for local wall clock -# time (rather than the timezone specified in the TZ environment variable) -# to be used. +# "tzsetwall" is deprecated and is intended to be removed soon; see NEWS. # "offtime" is like "gmtime" except that it accepts a second (long) argument # that gives an offset to add to the time_t when converting it. # "timelocal" is equivalent to "mktime". @@ -333,7 +345,6 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # that gives an offset to use when converting to a time_t. # "posix2time" and "time2posix" are described in an included manual page. # X3J11's work does not describe any of these functions. -# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0. # These functions may well disappear in future releases of the time # conversion package. # @@ -505,11 +516,11 @@ RANLIB= : TZCOBJS= zic.o TZDOBJS= zdump.o localtime.o asctime.o strftime.o DATEOBJS= date.o localtime.o strftime.o asctime.o -LIBSRCS= localtime.c asctime.c difftime.c -LIBOBJS= localtime.o asctime.o difftime.o +LIBSRCS= localtime.c asctime.c difftime.c strftime.c +LIBOBJS= localtime.o asctime.o difftime.o strftime.o HEADERS= tzfile.h private.h NONLIBSRCS= zic.c zdump.c -NEWUCBSRCS= date.c strftime.c +NEWUCBSRCS= date.c SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \ tzselect.ksh workman.sh MANS= newctime.3 newstrftime.3 newtzset.3 time2posix.3 \ @@ -651,7 +662,8 @@ yearistype: yearistype.sh chmod +x yearistype leapseconds: $(LEAP_DEPS) - $(AWK) -f leapseconds.awk leap-seconds.list >$@.out + $(AWK) -v EXPIRES_LINE=$(EXPIRES_LINE) \ + -f leapseconds.awk leap-seconds.list >$@.out mv $@.out $@ # Arguments to pass to submakes of install_data. Modified: head/contrib/tzdata/NEWS ============================================================================== --- head/contrib/tzdata/NEWS Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/NEWS Fri Apr 24 05:05:58 2020 (r360240) @@ -1,5 +1,87 @@ News for the tz database +Release 2020a - 2020-04-23 16:03:47 -0700 + + Briefly: + Morocco springs forward on 2020-05-31, not 2020-05-24. + Canada's Yukon advanced to -07 year-round on 2020-03-08. + America/Nuuk renamed from America/Godthab. + zic now supports expiration dates for leap second lists. + + Changes to future timestamps + + Morocco's second spring-forward transition in 2020 will be May 31, + not May 24 as predicted earlier. (Thanks to Semlali Naoufal.) + Adjust future-year predictions to use the first Sunday after the + day after Ramadan, not the first Sunday after Ramadan. + + Canada's Yukon, represented by America/Whitehorse and + America/Dawson, advanced to -07 year-round, beginning with its + spring-forward transition on 2020-03-08, and will not fall back on + 2020-11-01. Although a government press release calls this + "permanent Pacific Daylight Saving Time", we prefer MST for + consistency with nearby Dawson Creek, Creston, and Fort Nelson. + (Thanks to Tim Parenti.) + + Changes to past timestamps + + Shanghai observed DST in 1919. (Thanks to Phake Nick.) + + Changes to timezone identifiers + + To reflect current usage in English better, America/Godthab has + been renamed to America/Nuuk. A backwards-compatibility link + remains for the old name. + + Changes to code + + localtime.c no longer mishandles timestamps after the last + transition in a TZif file with leap seconds and with daylight + saving time transitions projected into the indefinite future. + For example, with TZ='America/Los_Angeles' with leap seconds, + zdump formerly reported a DST transition on 2038-03-14 + from 01:59:32.999... to 02:59:33 instead of the correct transition + from 01:59:59.999... to 03:00:00. + + zic -L now supports an Expires line in the leapseconds file, and + truncates the TZif output accordingly. This propagates leap + second expiration information into the TZif file, and avoids the + abovementioned localtime.c bug as well as similar bugs present in + many client implementations. If no Expires line is present, zic + -L instead truncates the TZif output based on the #expires comment + present in leapseconds files distributed by tzdb 2018f and later; + however, this usage is obsolescent. For now, the distributed + leapseconds file has an Expires line that is commented out, so + that the file can be fed to older versions of zic which ignore the + commented-out line. Future tzdb distributions are planned to + contain a leapseconds file with an Expires line. + + The configuration macros HAVE_TZNAME and USG_COMPAT should now be + set to 1 if the system library supports the feature, and 2 if not. + As before, these macros are nonzero if tzcode should support the + feature, zero otherwise. + + The configuration macro ALTZONE now has the same values with the + same meaning as HAVE_TZNAME and USG_COMPAT. + + The code's defense against CRLF in leap-seconds.list is now + portable to POSIX awk. (Problem reported by Deborah Goldsmith.) + + Although the undocumented tzsetwall function is not changed in + this release, it is now deprecated in preparation for removal in + future releases. Due to POSIX requirements, tzsetwall has not + worked for some time. Any code that uses it should instead use + tzalloc(NULL) or, if portability trumps thread-safety, should + unset the TZ environment variable. + + Changes to commentary + + The Îles-de-la-Madeleine and the Listuguj reserve are noted as + following America/Halifax, and comments about Yukon's "south" and + "north" have been corrected to say "east" and "west". (Thanks to + Jeffery Nichols.) + + Release 2019c - 2019-09-11 08:59:48 -0700 Briefly: Modified: head/contrib/tzdata/africa ============================================================================== --- head/contrib/tzdata/africa Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/africa Fri Apr 24 05:05:58 2020 (r360240) @@ -867,19 +867,25 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis # Morocco will be on GMT starting from Sunday, May 5th 2019 at 3am. # The switch to GMT+1 will occur on Sunday, June 9th 2019 at 2am.... # http://fr.le360.ma/societe/voici-la-date-du-retour-a-lheure-legale-au-maroc-188222 + +# From Semlali Naoufal (2020-04-14): +# Following the announcement by the Moroccan government, the switch to +# GMT time will take place on Sunday, April 19, 2020 from 3 a.m. and +# the return to GMT+1 time will take place on Sunday, May 31, 2020 at 2 a.m.... +# https://maroc-diplomatique.net/maroc-le-retour-a-lheure-gmt-est-prevu-dimanche-prochain/ +# http://aujourdhui.ma/actualite/gmt1-retour-a-lheure-normale-dimanche-prochain-1 # -# From Paul Eggert (2019-05-20): -# This agrees with our 2018-11-01 guess that the Moroccan government -# would continue the practice of falling back at 03:00 the last Sunday -# before Ramadan, and of springing forward at 02:00 the first Sunday after -# Ramadan, as this has been the practice since 2012. To implement this, -# transition dates for 2019 through 2087 were determined by running the -# following program under GNU Emacs 26.2. -# (let ((islamic-year 1440)) +# From Paul Eggert (2020-04-14): +# For now, guess that in the future Morocco will fall back at 03:00 +# the last Sunday before Ramadan, and spring forward at 02:00 the +# first Sunday after the day after Ramadan. To implement this, +# transition dates for 2021 through 2087 were determined by running +# the following program under GNU Emacs 26.3. +# (let ((islamic-year 1442)) # (require 'cal-islam) # (while (< islamic-year 1511) # (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) -# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) +# (b (1+ (calendar-islamic-to-absolute (list 10 1 islamic-year)))) # (sunday 0)) # (while (/= sunday (mod (setq a (1- a)) 7))) # (while (/= sunday (mod b 7)) @@ -939,7 +945,7 @@ Rule Morocco 2018 only - Jun 17 2:00 1:00 - Rule Morocco 2019 only - May 5 3:00 -1:00 - Rule Morocco 2019 only - Jun 9 2:00 0 - Rule Morocco 2020 only - Apr 19 3:00 -1:00 - -Rule Morocco 2020 only - May 24 2:00 0 - +Rule Morocco 2020 only - May 31 2:00 0 - Rule Morocco 2021 only - Apr 11 3:00 -1:00 - Rule Morocco 2021 only - May 16 2:00 0 - Rule Morocco 2022 only - Mar 27 3:00 -1:00 - @@ -955,7 +961,7 @@ Rule Morocco 2026 only - Mar 22 2:00 0 - Rule Morocco 2027 only - Feb 7 3:00 -1:00 - Rule Morocco 2027 only - Mar 14 2:00 0 - Rule Morocco 2028 only - Jan 23 3:00 -1:00 - -Rule Morocco 2028 only - Feb 27 2:00 0 - +Rule Morocco 2028 only - Mar 5 2:00 0 - Rule Morocco 2029 only - Jan 14 3:00 -1:00 - Rule Morocco 2029 only - Feb 18 2:00 0 - Rule Morocco 2029 only - Dec 30 3:00 -1:00 - @@ -971,7 +977,7 @@ Rule Morocco 2033 only - Dec 25 2:00 0 - Rule Morocco 2034 only - Nov 5 3:00 -1:00 - Rule Morocco 2034 only - Dec 17 2:00 0 - Rule Morocco 2035 only - Oct 28 3:00 -1:00 - -Rule Morocco 2035 only - Dec 2 2:00 0 - +Rule Morocco 2035 only - Dec 9 2:00 0 - Rule Morocco 2036 only - Oct 19 3:00 -1:00 - Rule Morocco 2036 only - Nov 23 2:00 0 - Rule Morocco 2037 only - Oct 4 3:00 -1:00 - @@ -987,7 +993,7 @@ Rule Morocco 2041 only - Sep 29 2:00 0 - Rule Morocco 2042 only - Aug 10 3:00 -1:00 - Rule Morocco 2042 only - Sep 21 2:00 0 - Rule Morocco 2043 only - Aug 2 3:00 -1:00 - -Rule Morocco 2043 only - Sep 6 2:00 0 - +Rule Morocco 2043 only - Sep 13 2:00 0 - Rule Morocco 2044 only - Jul 24 3:00 -1:00 - Rule Morocco 2044 only - Aug 28 2:00 0 - Rule Morocco 2045 only - Jul 9 3:00 -1:00 - @@ -1003,7 +1009,7 @@ Rule Morocco 2049 only - Jul 4 2:00 0 - Rule Morocco 2050 only - May 15 3:00 -1:00 - Rule Morocco 2050 only - Jun 26 2:00 0 - Rule Morocco 2051 only - May 7 3:00 -1:00 - -Rule Morocco 2051 only - Jun 11 2:00 0 - +Rule Morocco 2051 only - Jun 18 2:00 0 - Rule Morocco 2052 only - Apr 28 3:00 -1:00 - Rule Morocco 2052 only - Jun 2 2:00 0 - Rule Morocco 2053 only - Apr 13 3:00 -1:00 - @@ -1019,7 +1025,7 @@ Rule Morocco 2057 only - Apr 8 2:00 0 - Rule Morocco 2058 only - Feb 17 3:00 -1:00 - Rule Morocco 2058 only - Mar 31 2:00 0 - Rule Morocco 2059 only - Feb 9 3:00 -1:00 - -Rule Morocco 2059 only - Mar 16 2:00 0 - +Rule Morocco 2059 only - Mar 23 2:00 0 - Rule Morocco 2060 only - Feb 1 3:00 -1:00 - Rule Morocco 2060 only - Mar 7 2:00 0 - Rule Morocco 2061 only - Jan 16 3:00 -1:00 - @@ -1029,13 +1035,13 @@ Rule Morocco 2062 only - Feb 12 2:00 0 - Rule Morocco 2062 only - Dec 31 3:00 -1:00 - Rule Morocco 2063 only - Feb 4 2:00 0 - Rule Morocco 2063 only - Dec 16 3:00 -1:00 - -Rule Morocco 2064 only - Jan 20 2:00 0 - +Rule Morocco 2064 only - Jan 27 2:00 0 - Rule Morocco 2064 only - Dec 7 3:00 -1:00 - Rule Morocco 2065 only - Jan 11 2:00 0 - Rule Morocco 2065 only - Nov 22 3:00 -1:00 - Rule Morocco 2066 only - Jan 3 2:00 0 - Rule Morocco 2066 only - Nov 14 3:00 -1:00 - -Rule Morocco 2066 only - Dec 19 2:00 0 - +Rule Morocco 2066 only - Dec 26 2:00 0 - Rule Morocco 2067 only - Nov 6 3:00 -1:00 - Rule Morocco 2067 only - Dec 11 2:00 0 - Rule Morocco 2068 only - Oct 21 3:00 -1:00 - @@ -1045,13 +1051,13 @@ Rule Morocco 2069 only - Nov 17 2:00 0 - Rule Morocco 2070 only - Oct 5 3:00 -1:00 - Rule Morocco 2070 only - Nov 9 2:00 0 - Rule Morocco 2071 only - Sep 20 3:00 -1:00 - -Rule Morocco 2071 only - Oct 25 2:00 0 - +Rule Morocco 2071 only - Nov 1 2:00 0 - Rule Morocco 2072 only - Sep 11 3:00 -1:00 - Rule Morocco 2072 only - Oct 16 2:00 0 - Rule Morocco 2073 only - Aug 27 3:00 -1:00 - Rule Morocco 2073 only - Oct 8 2:00 0 - Rule Morocco 2074 only - Aug 19 3:00 -1:00 - -Rule Morocco 2074 only - Sep 23 2:00 0 - +Rule Morocco 2074 only - Sep 30 2:00 0 - Rule Morocco 2075 only - Aug 11 3:00 -1:00 - Rule Morocco 2075 only - Sep 15 2:00 0 - Rule Morocco 2076 only - Jul 26 3:00 -1:00 - @@ -1061,7 +1067,7 @@ Rule Morocco 2077 only - Aug 22 2:00 0 - Rule Morocco 2078 only - Jul 10 3:00 -1:00 - Rule Morocco 2078 only - Aug 14 2:00 0 - Rule Morocco 2079 only - Jun 25 3:00 -1:00 - -Rule Morocco 2079 only - Jul 30 2:00 0 - +Rule Morocco 2079 only - Aug 6 2:00 0 - Rule Morocco 2080 only - Jun 16 3:00 -1:00 - Rule Morocco 2080 only - Jul 21 2:00 0 - Rule Morocco 2081 only - Jun 1 3:00 -1:00 - @@ -1077,7 +1083,7 @@ Rule Morocco 2085 only - May 27 2:00 0 - Rule Morocco 2086 only - Apr 14 3:00 -1:00 - Rule Morocco 2086 only - May 19 2:00 0 - Rule Morocco 2087 only - Mar 30 3:00 -1:00 - -Rule Morocco 2087 only - May 4 2:00 0 - +Rule Morocco 2087 only - May 11 2:00 0 - # For dates after the somewhat-arbitrary cutoff of 2087, assume that # Morocco will no longer observe DST. At some point this table will # need to be extended, though quite possibly Morocco will change the @@ -1179,7 +1185,7 @@ Link Africa/Maputo Africa/Lusaka # Zambia Rule Namibia 1994 only - Mar 21 0:00 -1:00 WAT Rule Namibia 1994 2017 - Sep Sun>=1 2:00 0 CAT Rule Namibia 1995 2017 - Apr Sun>=1 2:00 -1:00 WAT -# Rearguard section, for parsers that do not support negative DST. +# Rearguard section, for parsers lacking negative DST; see ziguard.awk. #Rule Namibia 1994 only - Mar 21 0:00 0 WAT #Rule Namibia 1994 2017 - Sep Sun>=1 2:00 1:00 CAT #Rule Namibia 1995 2017 - Apr Sun>=1 2:00 0 WAT @@ -1193,7 +1199,7 @@ Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 2:00 - SAST 1990 Mar 21 # independence # Vanguard section, for zic and other parsers that support negative DST. 2:00 Namibia %s -# Rearguard section, for parsers that do not support negative DST. +# Rearguard section, for parsers lacking negative DST; see ziguard.awk. # 2:00 - CAT 1994 Mar 21 0:00 # From Paul Eggert (2017-04-07): # The official date of the 2017 rule change was 2017-10-24. See: Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/asia Fri Apr 24 05:05:58 2020 (r360240) @@ -286,6 +286,27 @@ Zone Asia/Yangon 6:24:47 - LMT 1880 # or Rangoo # China +# From Phake Nick (2020-04-15): +# According to this news report: +# http://news.sina.com.cn/c/2004-09-01/19524201403.shtml +# on April 11, 1919, newspaper in Shanghai said clocks in Shanghai will spring +# forward for an hour starting from midnight of that Saturday. The report did +# not mention what happened in Shanghai thereafter, but it mentioned that a +# similar trial in Tianjin which ended at October 1st as citizens are told to +# recede the clock on September 30 from 12:00pm to 11:00pm. The trial at +# Tianjin got terminated in 1920. +# +# From Paul Eggert (2020-04-15): +# The Returns of Trade and Trade Reports, page 711, says "Daylight saving was +# given a trial during the year, and from the 12th April to the 1st October +# the clocks were all set one hour ahead of sun time. Though the scheme was +# generally esteemed a success, it was announced early in 1920 that it would +# not be repeated." +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Shang 1919 only - Apr 12 24:00 1:00 D +Rule Shang 1919 only - Sep 30 24:00 0 S + # From Paul Eggert (2018-10-02): # The following comes from Table 1 of: # Li Yu. Research on the daylight saving movement in 1940s Shanghai. @@ -294,7 +315,90 @@ Zone Asia/Yangon 6:24:47 - LMT 1880 # or Rangoo # The table lists dates only; I am guessing 00:00 and 24:00 transition times. # Also, the table lists the planned end of DST in 1949, but the corresponding # zone line cuts this off on May 28, when the Communists took power. + +# From Phake Nick (2020-04-15): # +# For the history of time in Shanghai between 1940-1942, the situation is +# actually slightly more complex than the table [below].... At the time, +# there were three different authorities in Shanghai, including Shanghai +# International Settlement, a settlement established by western countries with +# its own westernized form of government, Shanghai French Concession, similar +# to the international settlement but is controlled by French, and then the +# rest of the city of Shanghai, which have already been controlled by Japanese +# force through a puppet local government (Wang Jingwei regime). It was +# additionally complicated by the circumstances that, according to the 1940s +# Shanghai summer time essay cited in the database, some +# departments/businesses/people in the Shanghai city itself during that time +# period, refused to change their clock and instead only changed their opening +# hours. +# +# For example, as quoted in the article, in 1940, other than the authority +# itself, power, tram, bus companies, cinema, department stores, and other +# public service organizations have all decided to follow the summer time and +# spring forward the clock. On the other hand, the custom office refused to +# spring forward the clock because of worry on mechanical wear to the physical +# clock, postal office refused to spring forward because of disruption to +# business and log-keeping, although they did changed their office hour to +# match rest of the city. So is travel agents, and also weather +# observatory. It is said both time standards had their own supporters in the +# city at the time, those who prefer new time standard would have moved their +# clock while those who prefer the old time standard would keep their clock +# unchange, and there were different clocks that use different time standard +# in the city at the time for people who use different time standard to adjust +# their clock to their preferred time. +# +# a. For the 1940 May 31 spring forward, the essay claim that it was +# coordinared between the international settlement authority and the French +# concession authority and have gathered support from Hong Kong and Xiamen, +# that it would spring forward an hour from May 31 "midnight", and the essay +# claim "Hong Kong government implemented the spring forward in the same time +# on the same date as Shanghai". +# +# b. For the 1940 fall back, it was said that they initially intended to do +# so on September 30 00:59 at night, however they postponed it to October 12 +# after discussion with relevant parties. However schools restored to the +# original schedule ten days earlier. +# +# c. For the 1941 spring forward, it is said to start from March 15 +# "following the previous year's method", and in addition to that the essay +# cited an announcement in 1941 from the Wang regime which said the Special +# City of Shanghai under Wang regime control will follow the DST rule set by +# the Settlements, irrespective of the original DST plan announced by the Wang +# regime for other area under its control(April 1 to September 30). (no idea +# to situation before that announcement) +# +# d. For the 1941 fall back, it was said that the fall back would occurs at +# the end of September (A newspaper headline cited by the essay, published on +# October 1, 1941, have the headlines which said "French Concession would +# rewind to the old clock this morning), but it ultimately didn't happen due +# to disagreement between the international settlement authority and the +# French concession authority, and the fall back ultimately occurred on +# November 1. +# +# e. In 1941 December, Japan have officially started war with the United +# States and the United Kingdom, and in Shanghai they have marched into the +# international settlement, taken over its control +# +# f. For the 1942 spring forward, the essay said that the spring forward +# started on January 31. It said this time the custom office and postal +# department will also change their clocks, unlike before. +# +# g. The essay itself didn't cover any specific changes thereafter until the +# end of the war, it quoted a November 1942 command from the government of the +# Wang regime, which claim the daylight saving time applies year round during +# the war. However, the essay ambiguously said the period is "February 1 to +# September 30", which I don't really understand what is the meaning of such +# period in the context of year round implementation here.. More researches +# might be needed to show exactly what happened during that period of time. + +# From Phake Nick (2020-04-15): +# According to a Japanese tour bus pamphlet in Nanjing area believed to be +# from around year 1941: http://www.tt-museum.jp/tairiku_0280_nan1941.html , +# the schedule listed was in the format of Japanese time. Which indicate some +# use of the Japanese time (instead of syncing by DST) might have occurred in +# the Yangtze river delta area during that period of time although the scope +# of such use will need to be investigated to determine. +# # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Shang 1940 only - Jun 1 0:00 1:00 D Rule Shang 1940 only - Oct 12 24:00 0 S @@ -572,7 +676,7 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 6:00 - +06 -# Hong Kong (Xianggang) +# Hong Kong # Milne gives 7:36:41.7; round this. @@ -582,9 +686,7 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # it is not [an] observatory, but the official meteorological agency of HK, # and also serves as the official timing agency), there are some missing # and incorrect rules. Although the exact switch over time is missing, I -# think 3:30 is correct. The official DST record for Hong Kong can be -# obtained from -# http://www.hko.gov.hk/gts/time/Summertime.htm +# think 3:30 is correct. # From Phake Nick (2018-10-27): # According to Singaporean newspaper @@ -695,10 +797,10 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # Resolution of the Legislative Council passed on 9 May 1979 # https://www.legco.gov.hk/yr78-79/english/lc_sitg/hansard/h790509.pdf#page=39 -# From Paul Eggert (2019-05-31): +# From Paul Eggert (2020-04-15): # Here are the dates given at -# https://www.hko.gov.hk/gts/time/Summertime.htm -# as of 2014-06-19: +# https://www.hko.gov.hk/en/gts/time/Summertime.htm +# as of 2020-02-10: # Year Period # 1941 15 Jun to 30 Sep # 1942 Whole year @@ -1828,6 +1930,47 @@ Zone Asia/Jerusalem 2:20:54 - LMT 1880 # '9:00' and 'JST' is from Guy Harris. +# From Paul Eggert (2020-01-19): +# Starting in the 7th century, Japan generally followed an ancient Chinese +# timekeeping system that divided night and day into six hours each, +# with hour length depending on season. In 1873 the government +# started requiring the use of a Western style 24-hour clock. See: +# Yulia Frumer, "Making Time: Astronomical Time Measurement in Tokugawa Japan" +# . As the tzdb code and +# data support only 24-hour clocks, its tables model timestamps before +# 1873 using Western-style local mean time. + +# From Hideyuki Suzuki (1998-11-09): +# 'Tokyo' usually stands for the former location of Tokyo Astronomical +# Observatory: 139° 44' 40.90" E (9h 18m 58.727s), 35° 39' 16.0" N. +# This data is from 'Rika Nenpyou (Chronological Scientific Tables) 1996' +# edited by National Astronomical Observatory of Japan.... +# JST (Japan Standard Time) has been used since 1888-01-01 00:00 (JST). +# The law is enacted on 1886-07-07. + +# From Hideyuki Suzuki (1998-11-16): +# The ordinance No. 51 (1886) established "standard time" in Japan, +# which stands for the time on 135° E. +# In the ordinance No. 167 (1895), "standard time" was renamed to "central +# standard time". And the same ordinance also established "western standard +# time", which stands for the time on 120° E.... But "western standard +# time" was abolished in the ordinance No. 529 (1937). In the ordinance No. +# 167, there is no mention regarding for what place western standard time is +# standard.... +# +# I wrote "ordinance" above, but I don't know how to translate. +# In Japanese it's "chokurei", which means ordinance from emperor. + +# From Yu-Cheng Chuang (2013-07-12): +# ...the Meiji Emperor announced Ordinance No. 167 of Meiji Year 28 "The clause +# about standard time" ... The adoption began from Jan 1, 1896. +# https://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時) +# +# ...the Showa Emperor announced Ordinance No. 529 of Showa Year 12 ... which +# means the whole Japan territory, including later occupations, adopt Japan +# Central Time (UT+9). The adoption began on Oct 1, 1937. +# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 + # From Paul Eggert (1995-03-06): # Today's _Asahi Evening News_ (page 4) reports that Japan had # daylight saving between 1948 and 1951, but "the system was discontinued @@ -1876,37 +2019,6 @@ Rule Japan 1948 1951 - Sep Sat>=8 25:00 0 S Rule Japan 1949 only - Apr Sat>=1 24:00 1:00 D Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D -# From Hideyuki Suzuki (1998-11-09): -# 'Tokyo' usually stands for the former location of Tokyo Astronomical -# Observatory: 139° 44' 40.90" E (9h 18m 58.727s), 35° 39' 16.0" N. -# This data is from 'Rika Nenpyou (Chronological Scientific Tables) 1996' -# edited by National Astronomical Observatory of Japan.... -# JST (Japan Standard Time) has been used since 1888-01-01 00:00 (JST). -# The law is enacted on 1886-07-07. - -# From Hideyuki Suzuki (1998-11-16): -# The ordinance No. 51 (1886) established "standard time" in Japan, -# which stands for the time on 135° E. -# In the ordinance No. 167 (1895), "standard time" was renamed to "central -# standard time". And the same ordinance also established "western standard -# time", which stands for the time on 120° E.... But "western standard -# time" was abolished in the ordinance No. 529 (1937). In the ordinance No. -# 167, there is no mention regarding for what place western standard time is -# standard.... -# -# I wrote "ordinance" above, but I don't know how to translate. -# In Japanese it's "chokurei", which means ordinance from emperor. - -# From Yu-Cheng Chuang (2013-07-12): -# ...the Meiji Emperor announced Ordinance No. 167 of Meiji Year 28 "The clause -# about standard time" ... The adoption began from Jan 1, 1896. -# https://ja.wikisource.org/wiki/標準時ニ關スル件_(公布時) -# -# ...the Showa Emperor announced Ordinance No. 529 of Showa Year 12 ... which -# means the whole Japan territory, including later occupations, adopt Japan -# Central Time (UT+9). The adoption began on Oct 1, 1937. -# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件 - # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u 9:00 Japan J%sT @@ -3086,22 +3198,9 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # [T]he Palestinian cabinet decision (Mar 8th 2016) published on # http://www.palestinecabinet.gov.ps/WebSite/Upload/Decree/GOV_17/16032016134830.pdf # states that summer time will end on Oct 29th at 01:00. -# -# From Tim Parenti (2016-10-19): -# Predict fall transitions on October's last Saturday at 01:00 from now on. -# This is consistent with the 2016 transition as well as our spring -# predictions. -# -# From Paul Eggert (2016-10-19): -# It's also consistent with predictions in the following URLs today: -# https://www.timeanddate.com/time/change/gaza-strip/gaza -# https://www.timeanddate.com/time/change/west-bank/hebron # From Sharef Mustafa (2018-03-16): -# Palestine summer time will start on Mar 24th 2018 by advancing the -# clock by 60 minutes as per Palestinian cabinet decision published on -# the official website, though the decree did not specify the exact -# time of the time shift. +# Palestine summer time will start on Mar 24th 2018 ... # http://www.palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e7a42ab7-ee23-435a-b9c8-a4f7e81f3817 # From Even Scharning (2019-03-23): @@ -3111,15 +3210,20 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # From Sharif Mustafa (2019-03-26): # The Palestinian cabinet announced today that the switch to DST will # be on Fri Mar 29th 2019 by advancing the clock by 60 minutes. -# The decree signing date is Mar 12th but it was not published till today. -# The decree does not specify the exact time of switch. # http://palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e54e9ea1-50ee-4137-84df-0d6c78da259b # # From Even Scharning (2019-04-10): # Our source in Palestine said it happened Friday 29 at 00:00 local time.... + +# From Sharef Mustafa (2019-10-18): +# Palestine summer time will end on midnight Oct 26th 2019 ... +# http://www.palestinecabinet.gov.ps/website/ar/ViewDetails?ID=43948 # # From Paul Eggert (2019-04-10): # For now, guess spring-ahead transitions are March's last Friday at 00:00. +# +# From Tim Parenti (2016-10-19): +# Predict fall transitions on October's last Saturday at 01:00 from now on. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S Modified: head/contrib/tzdata/backward ============================================================================== --- head/contrib/tzdata/backward Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/backward Fri Apr 24 05:05:58 2020 (r360240) @@ -17,6 +17,7 @@ Link America/Atikokan America/Coral_Harbour Link America/Argentina/Cordoba America/Cordoba Link America/Tijuana America/Ensenada Link America/Indiana/Indianapolis America/Fort_Wayne +Link America/Nuuk America/Godthab Link America/Indiana/Indianapolis America/Indianapolis Link America/Argentina/Jujuy America/Jujuy Link America/Indiana/Knox America/Knox_IN Modified: head/contrib/tzdata/backzone ============================================================================== --- head/contrib/tzdata/backzone Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/backzone Fri Apr 24 05:05:58 2020 (r360240) @@ -33,6 +33,35 @@ # assumes rules from other files. In the tz distribution, use # 'make PACKRATDATA=backzone zones' to compile and install this file. + +# From Paul Eggert (2020-04-15): +# The following remarks should be incorporated into this table sometime. +# Patches in 'git format-patch' format would be welcome. +# +# From Phake Nick (2020-04-15): +# ... the historical timezone data for those China zones seems to be +# incorrect. The transition to GMT+8 date given there for these zones +# were 1980 which also contradict the file description that they do +# not disagree with normal zone after 1970. According to sources that +# have also been cited in the asia file, except Xinjiang and Tibet, +# they should have adopted the Beijing Time from around 1949/1950 +# depends on exactly when each of those cities were taken over by the +# communist army. And they should also follow the DST setting of +# Asia/Shanghai after that point of time. In addition, +# http://gaz.ncl.edu.tw/detail.jsp?sysid=E1091792 the document from +# Chongqing Nationalist government say in year 1945 all of China +# should adopt summer time due to the war (not sure whether it +# continued after WWII ends)(Probably only enforced in area under +# their rule at the time?) The Asia/Harbin's 1932 and 1940 entry +# should also be incorrect. As per sources recorded at +# https://wiki.suikawiki.org/n/%E6%BA%80%E5%B7%9E%E5%9B%BD%E3%81%AE%E6%A8%99%E6%BA%96%E6%99%82 +# , in 1932 Harbin should have adopted UTC+8:00 instead of data +# currently listed in the tz database according to official +# announcement from Manchuko. And they should have adopted GMT+9 in +# 1937 January 1st according to official announcement at the time +# being cited on the webpage. + + # Zones are sorted by zone name. Each zone is preceded by the # name of the country that the zone is in, along with any other # commentary and rules associated with the entry. Modified: head/contrib/tzdata/europe ============================================================================== --- head/contrib/tzdata/europe Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/europe Fri Apr 24 05:05:58 2020 (r360240) @@ -549,12 +549,13 @@ Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2 0:00 1:00 IST 1947 Nov 2 2:00s 0:00 - GMT 1948 Apr 18 2:00s 0:00 GB-Eire GMT/IST 1968 Oct 27 -# The next line is for when negative SAVE values are used. +# Vanguard section, for zic and other parsers that support negative DST. 1:00 Eire IST/GMT -# These three lines are for when SAVE values are always nonnegative. +# Rearguard section, for parsers lacking negative DST; see ziguard.awk. # 1:00 - IST 1971 Oct 31 2:00u # 0:00 GB-Eire GMT/IST 1996 # 0:00 EU GMT/IST +# End of rearguard section. ############################################################################### @@ -1018,7 +1019,7 @@ Zone Europe/Prague 0:57:44 - LMT 1850 1:00 Czech CE%sT 1946 Dec 1 3:00 # Vanguard section, for zic and other parsers that support negative DST. 1:00 -1:00 GMT 1947 Feb 23 2:00 -# Rearguard section, for parsers that do not support negative DST. +# Rearguard section, for parsers lacking negative DST; see ziguard.awk. # 0:00 - GMT 1947 Feb 23 2:00 # End of rearguard section. 1:00 Czech CE%sT 1979 @@ -1175,14 +1176,17 @@ Zone America/Danmarkshavn -1:14:40 - LMT 1916 Jul 28 -3:00 - -03 1980 Apr 6 2:00 -3:00 EU -03/-02 1996 0:00 - GMT +# +# Use the old name Scoresbysund, as the current name Ittoqqortoormiit +# exceeds tzdb's 14-letter limit and has no common English abbreviation. Zone America/Scoresbysund -1:27:52 - LMT 1916 Jul 28 # Ittoqqortoormiit -2:00 - -02 1980 Apr 6 2:00 -2:00 C-Eur -02/-01 1981 Mar 29 -1:00 EU -01/+00 -Zone America/Godthab -3:26:56 - LMT 1916 Jul 28 # Nuuk +Zone America/Nuuk -3:26:56 - LMT 1916 Jul 28 # Godthåb -3:00 - -03 1980 Apr 6 2:00 -3:00 EU -03/-02 -Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base +Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik -4:00 Thule A%sT # Estonia @@ -1552,7 +1556,7 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 Oct # # From January 1st, 1908 the whole of Iceland was standardised at 1 hour # behind GMT. Previously, local mean solar time was used in different parts -# of Iceland, the almanak had been based on Reykjavik mean solar time which +# of Iceland, the almanak had been based on Reykjavík mean solar time which # was 1 hour and 28 minutes behind GMT. # # "first day of winter" referred to [below] means the first day of the 26 weeks Modified: head/contrib/tzdata/leap-seconds.list ============================================================================== --- head/contrib/tzdata/leap-seconds.list Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/leap-seconds.list Fri Apr 24 05:05:58 2020 (r360240) @@ -62,7 +62,7 @@ # Terry Quinn, "The BIPM and the Accurate Measurement # of Time," Proc. of the IEEE, Vol. 79, pp. 894-905, # July, 1991. -# reprinted in: +# reprinted in: # Christine Hackman and Donald B Sullivan (eds.) # Time and Frequency Measurement # American Association of Physics Teachers (1996) @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C58 -# File expires on: 28 June 2020 +# Updated through IERS Bulletin C59 +# File expires on: 28 December 2020 # -#@ 3802291200 +#@ 3818102400 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h f28827d2 f263b6c3 ec0f19eb a3e0dbf0 97f3fa30 +#h a1c168ae 27c79a7d 9dddcfc3 bcfe616b 2e2c44ea Modified: head/contrib/tzdata/leapseconds ============================================================================== --- head/contrib/tzdata/leapseconds Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/leapseconds Fri Apr 24 05:05:58 2020 (r360240) @@ -64,9 +64,15 @@ Leap 2012 Jun 30 23:59:60 + S Leap 2015 Jun 30 23:59:60 + S Leap 2016 Dec 31 23:59:60 + S +# UTC timestamp when this leap second list expires. +# Any additional leap seconds will come after this. +# This Expires line is commented out for now, +# so that pre-2020a zic implementations do not reject this file. +#Expires 2020 Dec 28 00:00:00 + # POSIX timestamps for the data in this file: #updated 1467936000 (2016-07-08 00:00:00 UTC) -#expires 1593302400 (2020-06-28 00:00:00 UTC) +#expires 1609113600 (2020-12-28 00:00:00 UTC) -# Updated through IERS Bulletin C58 -# File expires on: 28 June 2020 +# Updated through IERS Bulletin C59 +# File expires on: 28 December 2020 Modified: head/contrib/tzdata/leapseconds.awk ============================================================================== --- head/contrib/tzdata/leapseconds.awk Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/leapseconds.awk Fri Apr 24 05:05:58 2020 (r360240) @@ -68,12 +68,12 @@ BEGIN { monthabbr[11] = "Nov" monthabbr[12] = "Dec" - # Strip trailing CR, in case the input has CRLF form a la NIST. - RS = "\r?\n" - sstamp_init() } +# In case the input has CRLF form a la NIST. +{ sub(/\r$/, "") } + /^#[ \t]*[Uu]pdated through/ || /^#[ \t]*[Ff]ile expires on/ { last_lines = last_lines $0 "\n" } @@ -100,6 +100,17 @@ BEGIN { } END { + sstamp_to_ymdhMs(expires, ss_NTP) + + print "" + print "# UTC timestamp when this leap second list expires." + print "# Any additional leap seconds will come after this." + print "# This Expires line is commented out for now," + print "# so that pre-2020a zic implementations do not reject this file." + printf "%sExpires %.4d\t%s\t%.2d\t%.2d:%.2d:%.2d\n", \ + EXPIRES_LINE ? "" : "#", \ + ss_year, monthabbr[ss_month], ss_mday, ss_hour, ss_min, ss_sec + # The difference between the NTP and POSIX epochs is 70 years # (including 17 leap days), each 24 hours of 60 minutes of 60 # seconds each. Modified: head/contrib/tzdata/northamerica ============================================================================== --- head/contrib/tzdata/northamerica Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/northamerica Fri Apr 24 05:05:58 2020 (r360240) @@ -86,7 +86,7 @@ # For more about the first ten years of DST in the United States, see # Robert Garland, Ten years of daylight saving from the Pittsburgh standpoint # (Carnegie Library of Pittsburgh, 1927). -# http://www.clpgh.org/exhibit/dst.html +# https://web.archive.org/web/20160517155308/http://www.clpgh.org/exhibit/dst.html # # Shanks says that DST was called "War Time" in the US in 1918 and 1919. # However, DST was imposed by the Standard Time Act of 1918, which @@ -1470,7 +1470,8 @@ Zone America/Goose_Bay -4:01:40 - LMT 1884 # Happy Val -4:00 Canada A%sT -# west Labrador, Nova Scotia, Prince Edward I +# west Labrador, Nova Scotia, Prince Edward I, +# Îles-de-la-Madeleine, Listuguj reserve # From Brian Inglis (2015-07-20): # From the historical weather station records available at: @@ -1489,6 +1490,13 @@ Zone America/Goose_Bay -4:01:40 - LMT 1884 # Happy Val # in Canada to observe DST in 1971 but not 1970; for now we'll assume # this is a typo. +# From Jeffery Nichols (2020-01-09): +# America/Halifax ... also applies to Îles-de-la-Madeleine and the Listuguj +# reserve in Quebec. Officially, this came into effect on January 1, 2007 +# (Legal Time Act, CQLR c T-5.1), but the legislative debates surrounding that +# bill say that it is "accommodating the customs and practices" of those +# regions, which suggests that they have always been in-line with Halifax. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Halifax 1916 only - Apr 1 0:00 1:00 D Rule Halifax 1916 only - Oct 1 0:00 0 S @@ -1582,19 +1590,20 @@ Zone America/Moncton -4:19:08 - LMT 1883 Dec 9 # Quebec -# From Paul Eggert (2015-03-24): +# From Paul Eggert (2020-01-10): # See America/Toronto for most of Quebec, including Montreal. +# See America/Halifax for the Îles de la Madeleine and the Listuguj reserve. # # Matthews and Vincent (1998) also write that Quebec east of the -63 # meridian is supposed to observe AST, but residents as far east as # Natashquan use EST/EDT, and residents east of Natashquan use AST. # The Quebec department of justice writes in # "The situation in Minganie and Basse-Côte-Nord" -# http://www.justice.gouv.qc.ca/english/publications/generale/temps-minganie-a.htm +# https://www.justice.gouv.qc.ca/en/department/ministre/functions-and-responsabilities/legal-time-in-quebec/the-situation-in-minganie-and-basse-cote-nord/ # that the coastal strip from just east of Natashquan to Blanc-Sablon # observes Atlantic standard time all year round. -# https://www.assnat.qc.ca/Media/Process.aspx?MediaId=ANQ.Vigie.Bll.DocumentGenerique_8845en -# says this common practice was codified into law as of 2007. +# This common practice was codified into law as of 2007; see Legal Time Act, +# CQLR c T-5.1 . # For lack of better info, guess this practice began around 1970, contra to # Shanks & Pottenger who have this region observing AST/ADT. @@ -1613,6 +1622,15 @@ Zone America/Blanc-Sablon -3:48:28 - LMT 1884 # Nipigon (EST) and Rainy River (CST) are the largest that we know of. # Far west Ontario is like Winnipeg; far east Quebec is like Halifax. +# From Jeffery Nichols (2020-02-06): +# According to the [Shanks] atlas, those western Ontario zones are huge, +# covering most of Ontario northwest of Sault Ste Marie and Timmins. +# The zones seem to include towns bigger than the ones they're named after, +# like Dryden in America/Rainy_River and Wawa (and maybe Attawapiskat) in +# America/Nipigon. I assume it's too much trouble to change the name of the +# zone (like when you found out that America/Glace_Bay includes Sydney, Nova +# Scotia).... + # From Mark Brader (2003-07-26): # [According to the Toronto Star] Orillia, Ontario, adopted DST # effective Saturday, 1912-06-22, 22:00; the article mentions that @@ -2419,6 +2437,18 @@ Zone America/Creston -7:46:04 - LMT 1884 # obtained in November 2008 should be ignored... # I apologize for reporting incorrect information in 2008. +# From Tim Parenti (2020-03-05): +# The government of Yukon announced [yesterday] the cessation of seasonal time +# changes. "After clocks are pushed ahead one hour on March 8, the territory +# will remain on [UTC-07]. ... [The government] found 93 per cent of +# respondents wanted to end seasonal time changes and, of that group, 70 per +# cent wanted 'permanent Pacific Daylight Saving Time.'" +# https://www.cbc.ca/news/canada/north/yukon-end-daylight-saving-time-1.5486358 +# +# Although the government press release prefers PDT, we prefer MST for +# consistency with nearby Dawson Creek, Creston, and Fort Nelson. +# https://yukon.ca/en/news/yukon-end-seasonal-time-change + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule NT_YK 1918 only - Apr 14 2:00 1:00 D Rule NT_YK 1918 only - Oct 27 2:00 0 S @@ -2473,11 +2503,13 @@ Zone America/Inuvik 0 - -00 1953 # Inuvik founded Zone America/Whitehorse -9:00:12 - LMT 1900 Aug 20 -9:00 NT_YK Y%sT 1967 May 28 0:00 -8:00 NT_YK P%sT 1980 - -8:00 Canada P%sT + -8:00 Canada P%sT 2020 Mar 8 2:00 + -7:00 - MST Zone America/Dawson -9:17:40 - LMT 1900 Aug 20 -9:00 NT_YK Y%sT 1973 Oct 28 0:00 -8:00 NT_YK P%sT 1980 - -8:00 Canada P%sT + -8:00 Canada P%sT 2020 Mar 8 2:00 + -7:00 - MST ############################################################################### Modified: head/contrib/tzdata/theory.html ============================================================================== --- head/contrib/tzdata/theory.html Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/theory.html Fri Apr 24 05:05:58 2020 (r360240) @@ -298,6 +298,10 @@ in decreasing order of importance: If a name is changed, put its old spelling in the 'backward' file. This means old spellings will continue to work. + Ordinarily a name change should occur only in the rare case when + a location's consensus English-language spelling changes; for example, + in 2008 Asia/Calcutta was renamed to Asia/Kolkata + due to long-time widespread use of the new city name instead of the old.
  • @@ -1054,23 +1058,6 @@ an older zic. The functions were inspired by NetBSD.
  • - A function tzsetwall has been added to arrange for the - system's best approximation to local (wall clock) time to be delivered - by subsequent calls to localtime. - Source code for portable applications that "must" run on local - time should call tzsetwall; - if such code is moved to "old" systems that do not - provide tzsetwall, you will not be able to generate an - executable program. - (These functions also arrange for local time to - be used if tzset is called – directly or - indirectly – and there is no TZ environment - variable; portable applications should not, however, rely on this - behavior since it is not the way SVR2 - systems behave.) -
  • -
  • Negative time_t values are supported, on systems where time_t is signed.
  • @@ -1137,7 +1124,7 @@ The vestigial APIs are: may now examine localtime(&clock)->tm_zone (if TM_ZONE is defined) or tzname[localtime(&clock)->tm_isdst] - (if HAVE_TZNAME is defined) to learn the correct time + (if HAVE_TZNAME is nonzero) to learn the correct time zone abbreviation to use.
  • Modified: head/contrib/tzdata/version ============================================================================== --- head/contrib/tzdata/version Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/version Fri Apr 24 05:05:58 2020 (r360240) @@ -1 +1 @@ -2019c +2020a Modified: head/contrib/tzdata/zone.tab ============================================================================== --- head/contrib/tzdata/zone.tab Fri Apr 24 04:54:47 2020 (r360239) +++ head/contrib/tzdata/zone.tab Fri Apr 24 05:05:58 2020 (r360240) @@ -131,8 +131,8 @@ CA +4906-11631 America/Creston MST - BC (Creston) CA +5946-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John) CA +5848-12242 America/Fort_Nelson MST - BC (Ft Nelson) CA +4916-12307 America/Vancouver Pacific - BC (most areas) -CA +6043-13503 America/Whitehorse Pacific - Yukon (south) -CA +6404-13925 America/Dawson Pacific - Yukon (north) +CA +6043-13503 America/Whitehorse Pacific - Yukon (east) +CA +6404-13925 America/Dawson Pacific - Yukon (west) CC -1210+09655 Indian/Cocos *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Apr 24 06:48:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23CBB2A9A60 for ; Fri, 24 Apr 2020 06:48:43 +0000 (UTC) (envelope-from nonameless@ukr.net) Received: from frv196.fwdcdn.com (frv196.fwdcdn.com [212.42.77.196]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "*.ukr.net", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497lBK6XH9z3Qhg for ; Fri, 24 Apr 2020 06:48:41 +0000 (UTC) (envelope-from nonameless@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=ffe; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id: References:In-Reply-To:Cc:To:Subject:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=3gaqNC4QiuDKMct0NUspM4ZdxNvG1TwZhQkR6gsaE8M=; b=OGYssHIsCRT505oCsP0XKH3BCi FDQ4TH7G//VVv55PiC1EjiAdQhwuRvGMrdDzB3hPDUJcwAjhPLEJF2bJbMMVTMXlfaI4U83OEyBgW EqmH4GpeHQgPng2K91G2MTffK4SjZx1U9yfxTk0YgALZaKtHxWlROIGdtrPjxFoukyss=; Received: from [10.10.80.12] (helo=frv55.fwdcdn.com) by frv196.fwdcdn.com with smtp ID 1jRs8X-0003KZ-6p for svn-src-all@freebsd.org; Fri, 24 Apr 2020 09:48:33 +0300 Date: Fri, 24 Apr 2020 09:48:33 +0300 From: nonameless@ukr.net Subject: Re: svn commit: r360233 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc =?us-ascii?q?contrib=2Fjemalloc=2Finclude=2Fjemalloc=2Finte?= =?us-ascii?q?rnal?= contrib/jemalloc/src lib/libc/stdlib/jemalloc To: Eric van Gyzen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Received: from nonameless@ukr.net by frv55.fwdcdn.com; Fri, 24 Apr 2020 09:48:33 +0300 In-Reply-To: <202004232357.03NNvhdL075102@repo.freebsd.org> References: <202004232357.03NNvhdL075102@repo.freebsd.org> X-Reply-Action: reply Message-Id: <1587710845.521247000.x5jm3h0z@frv55.fwdcdn.com> X-Mailer: mail.ukr.net 5.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: binary X-Rspamd-Queue-Id: 497lBK6XH9z3Qhg X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ukr.net header.s=ffe header.b=OGYssHIs; dmarc=pass (policy=none) header.from=ukr.net; spf=pass (mx1.freebsd.org: domain of nonameless@ukr.net designates 212.42.77.196 as permitted sender) smtp.mailfrom=nonameless@ukr.net X-Spamd-Result: default: False [-2.80 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[ukr.net:s=ffe]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.42.77.0/24]; FREEMAIL_FROM(0.00)[ukr.net]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ipnet: 212.42.77.0/24(-4.87), asn: 8856(-3.90), country: UA(0.07)]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; DWL_DNSWL_LOW(-1.00)[ukr.net.dwl.dnswl.org : 127.0.5.1]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[ukr.net:+]; DMARC_POLICY_ALLOW(-0.50)[ukr.net,none]; FROM_NO_DN(0.00)[]; SUBJ_EXCESS_QP(1.20)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[ukr.net]; ASN(0.00)[asn:8856, ipnet:212.42.77.0/24, country:UA]; RCVD_TLS_LAST(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 06:48:43 -0000 > Author: vangyzen > Date: Thu Apr 23 23:57:43 2020 > New Revision: 360233 > URL: https://svnweb.freebsd.org/changeset/base/360233 > > Log: > Update jemalloc to version 5.2.1 > > Revert r354606 to restore r354605. > > Apply one line from jemalloc commit d01b425e5d1e1 in hash_x86_128() > to fix the build with gcc, which only allows a fallthrough attribute > to appear before a case or default label. > > Submitted by: jasone in r354605 > Discussed with: jasone > Reviewed by: bdrewery > MFC after: never, due to gcc 4.2.1 > Relnotes: yes > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D24522 > > ... Thank you! From owner-svn-src-all@freebsd.org Fri Apr 24 07:49:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F68D2AB2EE; Fri, 24 Apr 2020 07:49:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497mXL3k3fz3ynv; Fri, 24 Apr 2020 07:49:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 769FD1A82F; Fri, 24 Apr 2020 07:49:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O7nMcY066345; Fri, 24 Apr 2020 07:49:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O7nMSc066344; Fri, 24 Apr 2020 07:49:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202004240749.03O7nMSc066344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 24 Apr 2020 07:49:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360241 - head/sys/dev/ichiic X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/ichiic X-SVN-Commit-Revision: 360241 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 07:49:22 -0000 Author: avg Date: Fri Apr 24 07:49:21 2020 New Revision: 360241 URL: https://svnweb.freebsd.org/changeset/base/360241 Log: ig4: ensure that drivers always attach in correct order Use DRIVER_MODULE_ORDERED(SI_ORDER_ANY) so that ig4's ACPI attachment happens after iicbus and acpi_iicbus drivers are registered. I have seen a problem where iicbus attached under ig4 instead of acpi_iicbus when ig4.ko was loaded with kldload. I believe that that happened because ig4 driver was a first driver to register, it attached and created an iicbus child. Then iicbus driver was registered and, since it was the only driver that could attach to the iicbus child device, it did exactly that. After that acpi_iicbus driver was registered. It would be able to attach to the iicbus device, but it was already attached, so nothing happened. MFC after: 2 weeks Modified: head/sys/dev/ichiic/ig4_acpi.c Modified: head/sys/dev/ichiic/ig4_acpi.c ============================================================================== --- head/sys/dev/ichiic/ig4_acpi.c Fri Apr 24 05:05:58 2020 (r360240) +++ head/sys/dev/ichiic/ig4_acpi.c Fri Apr 24 07:49:21 2020 (r360241) @@ -192,5 +192,6 @@ static driver_t ig4iic_acpi_driver = { sizeof(struct ig4iic_softc), }; -DRIVER_MODULE(ig4iic, acpi, ig4iic_acpi_driver, ig4iic_devclass, 0, 0); +DRIVER_MODULE_ORDERED(ig4iic, acpi, ig4iic_acpi_driver, ig4iic_devclass, 0, 0, + SI_ORDER_ANY); MODULE_DEPEND(ig4iic, acpi, 1, 1, 1); From owner-svn-src-all@freebsd.org Fri Apr 24 07:55:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B9622AB55D; Fri, 24 Apr 2020 07:55:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497mgb6QQnz40G9; Fri, 24 Apr 2020 07:55:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D30EC1AA01; Fri, 24 Apr 2020 07:55:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O7td0J072416; Fri, 24 Apr 2020 07:55:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O7tdmq072415; Fri, 24 Apr 2020 07:55:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202004240755.03O7tdmq072415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 24 Apr 2020 07:55:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360242 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 360242 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 07:55:40 -0000 Author: avg Date: Fri Apr 24 07:55:39 2020 New Revision: 360242 URL: https://svnweb.freebsd.org/changeset/base/360242 Log: acpi_iicbus: set device description in the probe method Kernel prints the device announcement before the attach method is called, so if the correct description is not set by the probe method, then the announcement would have an incorrect one. MFC after: 1 week Modified: head/sys/dev/iicbus/acpi_iicbus.c Modified: head/sys/dev/iicbus/acpi_iicbus.c ============================================================================== --- head/sys/dev/iicbus/acpi_iicbus.c Fri Apr 24 07:49:21 2020 (r360241) +++ head/sys/dev/iicbus/acpi_iicbus.c Fri Apr 24 07:55:39 2020 (r360242) @@ -573,6 +573,7 @@ acpi_iicbus_probe(device_t dev) if (handle == NULL) return (ENXIO); + device_set_desc(dev, "Philips I2C bus (ACPI-hinted)"); return (BUS_PROBE_DEFAULT); } @@ -581,8 +582,6 @@ acpi_iicbus_attach(device_t dev) { struct acpi_iicbus_softc *sc = device_get_softc(dev); int error; - - device_set_desc(dev, "Philips I2C bus (ACPI-hinted)"); if (ACPI_FAILURE(acpi_iicbus_enumerate_children(dev))) device_printf(dev, "children enumeration failed\n"); From owner-svn-src-all@freebsd.org Fri Apr 24 08:08:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 37E4F2ABC96; Fri, 24 Apr 2020 08:08:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497mxr0bFTz4178; Fri, 24 Apr 2020 08:08:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B0381AC5B; Fri, 24 Apr 2020 08:08:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O87x2b079020; Fri, 24 Apr 2020 08:07:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O87xQE079018; Fri, 24 Apr 2020 08:07:59 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004240807.03O87xQE079018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 24 Apr 2020 08:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360243 - head/usr.sbin/bluetooth/hccontrol X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 360243 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 08:08:00 -0000 Author: hselasky Date: Fri Apr 24 08:07:59 2020 New Revision: 360243 URL: https://svnweb.freebsd.org/changeset/base/360243 Log: Add support for LE advertising to hccontrol(8). Submitted by: Marc Veldman PR: 245848 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.8 head/usr.sbin/bluetooth/hccontrol/le.c Modified: head/usr.sbin/bluetooth/hccontrol/hccontrol.8 ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/hccontrol.8 Fri Apr 24 07:55:39 2020 (r360242) +++ head/usr.sbin/bluetooth/hccontrol/hccontrol.8 Fri Apr 24 08:07:59 2020 (r360243) @@ -25,7 +25,7 @@ .\" $Id: hccontrol.8,v 1.6 2003/08/06 21:26:38 max Exp $ .\" $FreeBSD$ .\" -.Dd February 7, 2015 +.Dd April 24, 2020 .Dt HCCONTROL 8 .Os .Sh NAME @@ -133,6 +133,8 @@ are: .It Cm Write_Page_Scan_Period_Mode .It Cm Read_Page_Scan_Mode .It Cm Write_Page_Scan_Mode +.It Cm Read_LE_Host_Support +.It Cm Write_LE_Host_Support .It Cm Read_Local_Version_Information .It Cm Read_Local_Supported_Commands .It Cm Read_Local_Supported_Features @@ -143,6 +145,15 @@ are: .It Cm Reset_Failed_Contact_Counter .It Cm Get_Link_Quality .It Cm Read_RSSI +.It Cm LE_Read_Local_Supported_Features +.It Cm LE_Set_Advertising_Parameters +.It Cm LE_Read_Advertising_Physical_Channel_Tx_Power +.It Cm LE_Set_Advertising_Data +.It Cm LE_Set_Scan_Response_Data +.It Cm LE_Set_Advertising_Enable +.It Cm LE_Set_Scan_Parameters +.It Cm LE_Set_Scan_Enable +.It Cm LE_Read_Supported_States .El .Pp The currently supported node commands in @@ -170,6 +181,18 @@ are: .It Cm Write_Node_Role_Switch .It Cm Read_Node_List .El +.Sh EXAMPLES +Make the blutooth LE host, ubt0hci, scannable through +.Xr hccontrol 8 commands: +.Pp +.Bd -literal -offset indent +hccontrol -n ubt0hci le_set_advertising_enable disable +hccontrol -n ubt0hci le_set_advertising_param +hccontrol -n ubt0hci le_read_advertising_channel_tx_power +hccontrol -n ubt0hci le_set_advertising_data +hccontrol -n ubt0hci le_set_scan_response -n FBSD_Host +hccontrol -n ubt0hci le_set_advertising_enable enable +.Ed .Sh EXIT STATUS .Ex -std .Sh SEE ALSO Modified: head/usr.sbin/bluetooth/hccontrol/le.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/le.c Fri Apr 24 07:55:39 2020 (r360242) +++ head/usr.sbin/bluetooth/hccontrol/le.c Fri Apr 24 08:07:59 2020 (r360243) @@ -57,6 +57,9 @@ static int le_read_local_supported_features(int s, int static int set_le_event_mask(int s, uint64_t mask); static int set_event_mask(int s, uint64_t mask); static int le_enable(int s, int argc, char *argv[]); +static int le_set_advertising_enable(int s, int argc, char *argv[]); +static int le_set_advertising_param(int s, int argc, char *argv[]); +static int le_read_advertising_channel_tx_power(int s, int argc, char *argv[]); static int le_set_scan_param(int s, int argc, char *argv[]) @@ -339,6 +342,170 @@ int le_enable(int s, int argc, char *argv[]) return OK; } +static int +le_set_advertising_enable(int s, int argc, char *argv[]) +{ + ng_hci_le_set_advertise_enable_cp cp; + ng_hci_le_set_advertise_enable_rp rp; + int n, enable = 0; + + if (argc != 1) + return USAGE; + + if (strcmp(argv[0], "enable") == 0) + enable = 1; + else if (strcmp(argv[0], "disable") != 0) + return USAGE; + + n = sizeof(rp); + cp.advertising_enable = enable; + if (hci_request(s, NG_HCI_OPCODE(NG_HCI_OGF_LE, + NG_HCI_OCF_LE_SET_ADVERTISE_ENABLE), + (void *)&cp, sizeof(cp), (void *)&rp, &n) == ERROR) + return (ERROR); + + if (rp.status != 0x00) { + fprintf(stdout, "Status: %s [%#02x]\n", + hci_status2str(rp.status), rp.status); + return (FAILED); + } + fprintf(stdout, "LE Advertising %s\n", (enable ? "enabled" : "disabled")); + + return (OK); +} + +static int +le_set_advertising_param(int s, int argc, char *argv[]) +{ + ng_hci_le_set_advertising_parameters_cp cp; + ng_hci_le_set_advertising_parameters_rp rp; + + int n, ch; + + cp.advertising_interval_min = 0x800; + cp.advertising_interval_max = 0x800; + cp.advertising_type = 0; + cp.own_address_type = 0; + cp.direct_address_type = 0; + + cp.advertising_channel_map = 7; + cp.advertising_filter_policy = 0; + + optreset = 1; + optind = 0; + while ((ch = getopt(argc, argv , "m:M:t:o:p:a:c:f:")) != -1) { + switch(ch) { + case 'm': + cp.advertising_interval_min = + (uint16_t)(strtod(optarg, NULL)/0.625); + break; + case 'M': + cp.advertising_interval_max = + (uint16_t)(strtod(optarg, NULL)/0.625); + break; + case 't': + cp.advertising_type = + (uint8_t)strtod(optarg, NULL); + break; + case 'o': + cp.own_address_type = + (uint8_t)strtod(optarg, NULL); + break; + case 'p': + cp.direct_address_type = + (uint8_t)strtod(optarg, NULL); + break; + case 'a': + if (!bt_aton(optarg, &cp.direct_address)) { + struct hostent *he = NULL; + + if ((he = bt_gethostbyname(optarg)) == NULL) + return (USAGE); + + memcpy(&cp.direct_address, he->h_addr, sizeof(cp.direct_address)); + } + break; + case 'c': + cp.advertising_channel_map = + (uint8_t)strtod(optarg, NULL); + break; + case 'f': + cp.advertising_filter_policy = + (uint8_t)strtod(optarg, NULL); + break; + } + } + + n = sizeof(rp); + if (hci_request(s, NG_HCI_OPCODE(NG_HCI_OGF_LE, + NG_HCI_OCF_LE_SET_ADVERTISING_PARAMETERS), + (void *)&cp, sizeof(cp), (void *)&rp, &n) == ERROR) + return (ERROR); + + if (rp.status != 0x00) { + fprintf(stdout, "Status: %s [%#02x]\n", + hci_status2str(rp.status), rp.status); + return (FAILED); + } + + return (OK); +} + +static int +le_read_advertising_channel_tx_power(int s, int argc, char *argv[]) +{ + ng_hci_le_read_advertising_channel_tx_power_rp rp; + int n; + + n = sizeof(rp); + + if (hci_simple_request(s, NG_HCI_OPCODE(NG_HCI_OGF_LE, + NG_HCI_OCF_LE_READ_ADVERTISING_CHANNEL_TX_POWER), + (void *)&rp, &n) == ERROR) + return (ERROR); + + if (rp.status != 0x00) { + fprintf(stdout, "Status: %s [%#02x]\n", + hci_status2str(rp.status), rp.status); + return (FAILED); + } + + fprintf(stdout, "Advertising transmit power level: %d dBm\n", + (int8_t)rp.transmit_power_level); + + return (OK); +} + +static int +le_set_advertising_data(int s, int argc, char *argv[]) +{ + ng_hci_le_set_advertising_data_cp cp; + ng_hci_le_set_advertising_data_rp rp; + int n, len; + + n = sizeof(rp); + + char buf[NG_HCI_ADVERTISING_DATA_SIZE]; + + len = sizeof(buf); + parse_param(argc, argv, buf, &len); + memset(cp.advertising_data, 0, sizeof(cp.advertising_data)); + cp.advertising_data_length = len; + + if (hci_request(s, NG_HCI_OPCODE(NG_HCI_OGF_LE, + NG_HCI_OCF_LE_SET_ADVERTISING_DATA), + (void *)&cp, sizeof(cp), (void *)&rp, &n) == ERROR) + return (ERROR); + + if (rp.status != 0x00) { + fprintf(stdout, "Status: %s [%#02x]\n", + hci_status2str(rp.status), rp.status); + return (FAILED); + } + + return (OK); +} + struct hci_command le_commands[] = { { "le_enable", @@ -377,5 +544,32 @@ struct hci_command le_commands[] = { "le_set_scan_param [active|passive] interval(ms) window(ms) [public|random] [all|whitelist] \n" "set LE device scan parameter", &le_set_scan_param + }, + { + "le_set_advertising_enable", + "le_set_advertising_enable [enable|disable] \n" + "start or stop advertising", + &le_set_advertising_enable + }, + { + "le_read_advertising_channel_tx_power", + "le_read_advertising_channel_tx_power\n" + "read host advertising transmit poser level (dBm)", + &le_read_advertising_channel_tx_power + }, + { + "le_set_advertising_param", + "le_set_advertising_param [-m min_interval(ms)] [-M max_interval(ms)]\n" + "[-t advertising_type] [-o own_address_type] [-p peer_address_type]\n" + "[-c advertising_channel_map] [-f advertising_filter_policy]\n" + "[-a peer_address]\n" + "set LE device advertising parameters", + &le_set_advertising_param + }, + { + "le_set_advertising_data", + "le_set_advertising_data -n $name -f $flag -u $uuid16,$uuid16 \n" + "set LE device advertising packed data", + &le_set_advertising_data }, }; From owner-svn-src-all@freebsd.org Fri Apr 24 08:31:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A842A2AC109; Fri, 24 Apr 2020 08:31:13 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497nSd3lJxz41wL; Fri, 24 Apr 2020 08:31:13 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B0641B050; Fri, 24 Apr 2020 08:31:13 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O8VDss091261; Fri, 24 Apr 2020 08:31:13 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O8VD4o091260; Fri, 24 Apr 2020 08:31:13 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202004240831.03O8VD4o091260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 24 Apr 2020 08:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360244 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 360244 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 08:31:13 -0000 Author: lwhsu Date: Fri Apr 24 08:31:13 2020 New Revision: 360244 URL: https://svnweb.freebsd.org/changeset/base/360244 Log: MFC r360165: Also update est(4) as r360162 and r360164 Modified: stable/12/share/man/man4/est.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/est.4 ============================================================================== --- stable/12/share/man/man4/est.4 Fri Apr 24 08:07:59 2020 (r360243) +++ stable/12/share/man/man4/est.4 Fri Apr 24 08:31:13 2020 (r360244) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 18, 2012 +.Dd April 21, 2020 .Dt EST 4 .Os .Sh NAME @@ -66,7 +66,7 @@ Attempt to infer information from direct probing of th Should only be used in diagnostic cases. .Pq default 0 .It hw.est.strict -Validate frequency requested is accepted by the cpu when set. +Validate frequency requested is accepted by the CPU when set. It appears that this will only work on single core cpus. .Pq default 0 .El @@ -75,17 +75,17 @@ The following .Xr sysctl 8 values are available .Bl -tag -width indent -.It Va dev.est.%d.\%desc +.It Va dev.est.%d.%desc Description of support, almost always Enhanced SpeedStep Frequency Control. .It dev.est.0.%desc: Enhanced SpeedStep Frequency Control -.It Va dev.est.%d.\%driver +.It Va dev.est.%d.%driver Driver in use, always est. .It dev.est.0.%driver: est -.It Va dev.est.%d.\%parent -.It dev.est.0.%parent: cpu0 -The cpu that is exposing these frequencies. +.It Va dev.est.%d.%parent +The CPU that is exposing these frequencies. For example .Va cpu0 . +.It dev.est.0.%parent: cpu0 .It Va dev.est.%d.freq_settings . The valid frequencies that are allowed by this CPU and their step values. .It dev.est.0.freq_settings: 2201/45000 2200/45000 2000/39581 1900/37387 From owner-svn-src-all@freebsd.org Fri Apr 24 08:31:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59CC12AC148; Fri, 24 Apr 2020 08:31:32 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497nT01nn7z423j; Fri, 24 Apr 2020 08:31:32 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35B4C1B19E; Fri, 24 Apr 2020 08:31:32 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O8VWI4094624; Fri, 24 Apr 2020 08:31:32 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O8VWJw094623; Fri, 24 Apr 2020 08:31:32 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202004240831.03O8VWJw094623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 24 Apr 2020 08:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360245 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 360245 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 08:31:32 -0000 Author: lwhsu Date: Fri Apr 24 08:31:31 2020 New Revision: 360245 URL: https://svnweb.freebsd.org/changeset/base/360245 Log: MFC r360165: Also update est(4) as r360162 and r360164 Modified: stable/11/share/man/man4/est.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/est.4 ============================================================================== --- stable/11/share/man/man4/est.4 Fri Apr 24 08:31:13 2020 (r360244) +++ stable/11/share/man/man4/est.4 Fri Apr 24 08:31:31 2020 (r360245) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 18, 2012 +.Dd April 21, 2020 .Dt EST 4 .Os .Sh NAME @@ -66,7 +66,7 @@ Attempt to infer information from direct probing of th Should only be used in diagnostic cases. .Pq default 0 .It hw.est.strict -Validate frequency requested is accepted by the cpu when set. +Validate frequency requested is accepted by the CPU when set. It appears that this will only work on single core cpus. .Pq default 0 .El @@ -75,17 +75,17 @@ The following .Xr sysctl 8 values are available .Bl -tag -width indent -.It Va dev.est.%d.\%desc +.It Va dev.est.%d.%desc Description of support, almost always Enhanced SpeedStep Frequency Control. .It dev.est.0.%desc: Enhanced SpeedStep Frequency Control -.It Va dev.est.%d.\%driver +.It Va dev.est.%d.%driver Driver in use, always est. .It dev.est.0.%driver: est -.It Va dev.est.%d.\%parent -.It dev.est.0.%parent: cpu0 -The cpu that is exposing these frequencies. +.It Va dev.est.%d.%parent +The CPU that is exposing these frequencies. For example .Va cpu0 . +.It dev.est.0.%parent: cpu0 .It Va dev.est.%d.freq_settings . The valid frequencies that are allowed by this CPU and their step values. .It dev.est.0.freq_settings: 2201/45000 2200/45000 2000/39581 1900/37387 From owner-svn-src-all@freebsd.org Fri Apr 24 09:32:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8E192AD87D; Fri, 24 Apr 2020 09:32:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497pq845wWz450d; Fri, 24 Apr 2020 09:32:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87FCF1BC0F; Fri, 24 Apr 2020 09:32:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03O9WKwn034543; Fri, 24 Apr 2020 09:32:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03O9WKmE034542; Fri, 24 Apr 2020 09:32:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202004240932.03O9WKmE034542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 24 Apr 2020 09:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360246 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 360246 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 09:32:20 -0000 Author: avg Date: Fri Apr 24 09:32:20 2020 New Revision: 360246 URL: https://svnweb.freebsd.org/changeset/base/360246 Log: acpi_video: fix a crash in detach with an LCD output The crash happened because of a video output object was removed from a wrong container, crt_units instead of lcd_units. MFC after: 1 week Modified: head/sys/dev/acpica/acpi_video.c Modified: head/sys/dev/acpica/acpi_video.c ============================================================================== --- head/sys/dev/acpica/acpi_video.c Fri Apr 24 08:31:31 2020 (r360245) +++ head/sys/dev/acpica/acpi_video.c Fri Apr 24 09:32:20 2020 (r360246) @@ -642,7 +642,10 @@ acpi_video_vo_destroy(struct acpi_video_output *vo) switch (vo->adr & DOD_DEVID_MASK) { case DOD_DEVID_MONITOR: - voqh = &crt_units; + if ((vo->adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD) + voqh = &lcd_units; + else + voqh = &crt_units; break; case DOD_DEVID_TV: voqh = &tv_units; From owner-svn-src-all@freebsd.org Fri Apr 24 10:03:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECED32AE7D1; Fri, 24 Apr 2020 10:03:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497qVl5wftz470h; Fri, 24 Apr 2020 10:03:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C5B9D1C2F1; Fri, 24 Apr 2020 10:03:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OA3B1H053201; Fri, 24 Apr 2020 10:03:11 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OA3B2x053200; Fri, 24 Apr 2020 10:03:11 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202004241003.03OA3B2x053200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 24 Apr 2020 10:03:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360247 - head/stand X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/stand X-SVN-Commit-Revision: 360247 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 10:03:12 -0000 Author: andrew Date: Fri Apr 24 10:03:11 2020 New Revision: 360247 URL: https://svnweb.freebsd.org/changeset/base/360247 Log: Build the arm64 loader with -ffixed-x18 This stops the compiler from using the x18 register. Some UEFI implementations assume this will be preserved when calling the Boot Services. MFC after: 2 weeks Sponsored by: Innovate UK Modified: head/stand/defs.mk Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Fri Apr 24 09:32:20 2020 (r360246) +++ head/stand/defs.mk Fri Apr 24 10:03:11 2020 (r360247) @@ -119,7 +119,7 @@ SSP_CFLAGS= # currently has no /boot/loader, but may soon. CFLAGS+= -ffreestanding ${CFLAGS_NO_SIMD} .if ${MACHINE_CPUARCH} == "aarch64" -CFLAGS+= -mgeneral-regs-only -fPIC +CFLAGS+= -mgeneral-regs-only -ffixed-x18 -fPIC .elif ${MACHINE_CPUARCH} == "riscv" CFLAGS+= -march=rv64imac -mabi=lp64 .else From owner-svn-src-all@freebsd.org Fri Apr 24 10:20:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9CE492AEB70; Fri, 24 Apr 2020 10:20:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497qvC2Chfz47kl; Fri, 24 Apr 2020 10:20:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46E881C503; Fri, 24 Apr 2020 10:20:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OAKtcK059565; Fri, 24 Apr 2020 10:20:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OAKtLT059548; Fri, 24 Apr 2020 10:20:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <202004241020.03OAKtLT059548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 24 Apr 2020 10:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360248 - head/sys/crypto/ccp X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/crypto/ccp X-SVN-Commit-Revision: 360248 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 10:20:55 -0000 Author: avg Date: Fri Apr 24 10:20:54 2020 New Revision: 360248 URL: https://svnweb.freebsd.org/changeset/base/360248 Log: ccp: add a new hardware ID, found on AMD Ryzen 3 3200U pciconf reports the device as: Family 17h (Models 10h-1fh) Platform Security Processor dmesg: ccp0: mem 0xfe500000-0xfe5fffff,0xfe68c000-0xfe68dfff at device 0.2 on pci4 crypto: assign ccp0 driver id 1, flags 0x1000000 MFC after: 1 week Modified: head/sys/crypto/ccp/ccp.c Modified: head/sys/crypto/ccp/ccp.c ============================================================================== --- head/sys/crypto/ccp/ccp.c Fri Apr 24 10:03:11 2020 (r360247) +++ head/sys/crypto/ccp/ccp.c Fri Apr 24 10:20:54 2020 (r360248) @@ -78,6 +78,7 @@ static struct pciid { } ccp_ids[] = { { 0x14561022, "AMD CCP-5a" }, { 0x14681022, "AMD CCP-5b" }, + { 0x15df1022, "AMD CCP-5a" }, }; static struct random_source random_ccp = { From owner-svn-src-all@freebsd.org Fri Apr 24 11:03:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF0A52AF901; Fri, 24 Apr 2020 11:03:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497rr34wkKz49mh; Fri, 24 Apr 2020 11:03:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A44261CE59; Fri, 24 Apr 2020 11:03:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OB3Ff4090128; Fri, 24 Apr 2020 11:03:15 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OB3FmJ090127; Fri, 24 Apr 2020 11:03:15 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202004241103.03OB3FmJ090127@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 24 Apr 2020 11:03:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360249 - head/sys/dev/pci X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/dev/pci X-SVN-Commit-Revision: 360249 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 11:03:15 -0000 Author: andrew Date: Fri Apr 24 11:03:15 2020 New Revision: 360249 URL: https://svnweb.freebsd.org/changeset/base/360249 Log: Remove PCI_IO_WINDOW_OFFSET from the pci host generic fdt attachment. It doesn't seem to be needed, and breaks booting under bhyve/arm64. Discussed with: br MFC after: 2 weeks Sponsored by: Innovate UK Modified: head/sys/dev/pci/pci_host_generic_fdt.c Modified: head/sys/dev/pci/pci_host_generic_fdt.c ============================================================================== --- head/sys/dev/pci/pci_host_generic_fdt.c Fri Apr 24 10:20:54 2020 (r360248) +++ head/sys/dev/pci/pci_host_generic_fdt.c Fri Apr 24 11:03:15 2020 (r360249) @@ -65,8 +65,6 @@ __FBSDID("$FreeBSD$"); #include "pcib_if.h" -#define PCI_IO_WINDOW_OFFSET 0x1000 - #define SPACE_CODE_SHIFT 24 #define SPACE_CODE_MASK 0x3 #define SPACE_CODE_IO_SPACE 0x1 @@ -170,8 +168,7 @@ pci_host_generic_attach(device_t dev) pci_base, pci_base + size - 1); } else if (sc->base.ranges[tuple].flags & FLAG_IO) { error = rman_manage_region(&sc->base.io_rman, - pci_base + PCI_IO_WINDOW_OFFSET, - pci_base + PCI_IO_WINDOW_OFFSET + size - 1); + pci_base, pci_base + size - 1); } else continue; if (error) { From owner-svn-src-all@freebsd.org Fri Apr 24 12:54:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 72F662B3461; Fri, 24 Apr 2020 12:54:36 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497vJX2Px1z4Hrn; Fri, 24 Apr 2020 12:54:36 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 49AFF1E347; Fri, 24 Apr 2020 12:54:36 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OCsasu057543; Fri, 24 Apr 2020 12:54:36 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OCsaDh057542; Fri, 24 Apr 2020 12:54:36 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004241254.03OCsaDh057542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 Apr 2020 12:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360250 - head X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 360250 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 12:54:36 -0000 Author: kevans Date: Fri Apr 24 12:54:35 2020 New Revision: 360250 URL: https://svnweb.freebsd.org/changeset/base/360250 Log: UPDATING: add a note about closefrom(2) marked COMPAT12 Some of the consumers in-base may make it enticing enough to ensure that COMPAT_FREEBSD12, which is notably a fairly light option at the moment, is included in custom kernel configs. Suggested by: netchild Casualty: mail jail Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Apr 24 11:03:15 2020 (r360249) +++ head/UPDATING Fri Apr 24 12:54:35 2020 (r360250) @@ -26,6 +26,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20200224: + closefrom(2) has been moved under COMPAT12, and replaced in libc with a + stub that calls close_range(2). If using a custom kernel configuration, + you may want to ensure that the COMPAT_FREEBSD12 option is included, as + a slightly older -CURRENT userland and older FreeBSD userlands may not + be functional without closefrom(2). + 20200414: Upstream DTS from Linux 5.6 was merged and they now have the SID and THS (Secure ID controller and THermal Sensor) node present. From owner-svn-src-all@freebsd.org Fri Apr 24 12:57:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC6392B3539; Fri, 24 Apr 2020 12:57:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497vMM64Pjz4J3k; Fri, 24 Apr 2020 12:57:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBB851E34B; Fri, 24 Apr 2020 12:57:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OCv3IH057726; Fri, 24 Apr 2020 12:57:03 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OCv3eL057725; Fri, 24 Apr 2020 12:57:03 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004241257.03OCv3eL057725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 Apr 2020 12:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360251 - head X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 360251 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 12:57:04 -0000 Author: kevans Date: Fri Apr 24 12:57:03 2020 New Revision: 360251 URL: https://svnweb.freebsd.org/changeset/base/360251 Log: UPDATING: Fix the date of the closefrom(2) entry Apologies; my internal calendar says it's still February, but that doesn't seem to match reality where we've apparently advanced two months. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Apr 24 12:54:35 2020 (r360250) +++ head/UPDATING Fri Apr 24 12:57:03 2020 (r360251) @@ -26,7 +26,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) -20200224: +20200424: closefrom(2) has been moved under COMPAT12, and replaced in libc with a stub that calls close_range(2). If using a custom kernel configuration, you may want to ensure that the COMPAT_FREEBSD12 option is included, as From owner-svn-src-all@freebsd.org Fri Apr 24 13:20:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36F582B4029; Fri, 24 Apr 2020 13:20:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497vtZ0lMBz4KXl; Fri, 24 Apr 2020 13:20:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14DE41E748; Fri, 24 Apr 2020 13:20:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ODKbYD070112; Fri, 24 Apr 2020 13:20:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ODKbvJ070111; Fri, 24 Apr 2020 13:20:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004241320.03ODKbvJ070111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2020 13:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360252 - stable/12/sys/riscv/riscv X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/riscv/riscv X-SVN-Commit-Revision: 360252 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 13:20:38 -0000 Author: markj Date: Fri Apr 24 13:20:37 2020 New Revision: 360252 URL: https://svnweb.freebsd.org/changeset/base/360252 Log: MFC r356675 (by mhorne): RISC-V: fix global symbol lookups for mpentry with lld Modified: stable/12/sys/riscv/riscv/locore.S Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/riscv/riscv/locore.S ============================================================================== --- stable/12/sys/riscv/riscv/locore.S Fri Apr 24 12:57:03 2020 (r360251) +++ stable/12/sys/riscv/riscv/locore.S Fri Apr 24 13:20:37 2020 (r360252) @@ -287,7 +287,7 @@ ENTRY(mpentry) li t1, 4 mulw t1, t1, a0 /* Get the pointer */ - la t0, __riscv_boot_ap + lla t0, __riscv_boot_ap add t0, t0, t1 1: @@ -296,7 +296,7 @@ ENTRY(mpentry) beqz t1, 1b /* Setup stack pointer */ - la t0, secondary_stacks + lla t0, secondary_stacks li t1, (PAGE_SIZE * KSTACK_PAGES) mulw t2, t1, a0 add t0, t0, t2 @@ -306,14 +306,14 @@ ENTRY(mpentry) add sp, t0, t1 /* Setup supervisor trap vector */ - la t0, mpva + lla t0, mpva sub t0, t0, s9 li t1, KERNBASE add t0, t0, t1 csrw stvec, t0 /* Set page tables base register */ - la s2, pagetable_l1 + lla s2, pagetable_l1 srli s2, s2, PAGE_SHIFT li t0, SATP_MODE_SV39 or s2, s2, t0 From owner-svn-src-all@freebsd.org Fri Apr 24 13:22:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D61A12B4144; Fri, 24 Apr 2020 13:22:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497vwP52MHz4KwL; Fri, 24 Apr 2020 13:22:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A7FA31E7DC; Fri, 24 Apr 2020 13:22:13 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ODMDYa075739; Fri, 24 Apr 2020 13:22:13 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ODMDo1075737; Fri, 24 Apr 2020 13:22:13 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004241322.03ODMDo1075737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2020 13:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360253 - stable/12/sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/conf X-SVN-Commit-Revision: 360253 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 13:22:13 -0000 Author: markj Date: Fri Apr 24 13:22:13 2020 New Revision: 360253 URL: https://svnweb.freebsd.org/changeset/base/360253 Log: MFC r360046: Always compile minidump_machdep.c on arm. Modified: stable/12/sys/conf/files.arm Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files.arm ============================================================================== --- stable/12/sys/conf/files.arm Fri Apr 24 13:20:37 2020 (r360252) +++ stable/12/sys/conf/files.arm Fri Apr 24 13:22:13 2020 (r360253) @@ -54,7 +54,7 @@ arm/arm/machdep_kdb.c standard arm/arm/machdep_intr.c standard arm/arm/machdep_ptrace.c standard arm/arm/mem.c optional mem -arm/arm/minidump_machdep.c optional mem +arm/arm/minidump_machdep.c standard arm/arm/mp_machdep.c optional smp arm/arm/mpcore_timer.c optional mpcore_timer arm/arm/nexus.c standard From owner-svn-src-all@freebsd.org Fri Apr 24 13:23:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E94AC2B41DF; Fri, 24 Apr 2020 13:23:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497vxc5pgWz4L4X; Fri, 24 Apr 2020 13:23:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C27711E915; Fri, 24 Apr 2020 13:23:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ODNGwx076254; Fri, 24 Apr 2020 13:23:16 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ODNGv1076253; Fri, 24 Apr 2020 13:23:16 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004241323.03ODNGv1076253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2020 13:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360254 - stable/12/sys/compat/linuxkpi/common/src X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 360254 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 13:23:17 -0000 Author: markj Date: Fri Apr 24 13:23:16 2020 New Revision: 360254 URL: https://svnweb.freebsd.org/changeset/base/360254 Log: MFC r360052: Remove a vestigal reference to kmem_object. Modified: stable/12/sys/compat/linuxkpi/common/src/linux_page.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_page.c Fri Apr 24 13:22:13 2020 (r360253) +++ stable/12/sys/compat/linuxkpi/common/src/linux_page.c Fri Apr 24 13:23:16 2020 (r360254) @@ -75,7 +75,7 @@ void * linux_page_address(struct page *page) { - if (page->object != kmem_object && page->object != kernel_object) { + if (page->object != kernel_object) { return (PMAP_HAS_DMAP ? ((void *)(uintptr_t)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page))) : NULL); From owner-svn-src-all@freebsd.org Fri Apr 24 13:24:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4BAD62B4277; Fri, 24 Apr 2020 13:24:21 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497vyr6xnCz4LBk; Fri, 24 Apr 2020 13:24:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFB111E916; Fri, 24 Apr 2020 13:24:20 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ODOKHl076359; Fri, 24 Apr 2020 13:24:20 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ODOKZR076356; Fri, 24 Apr 2020 13:24:20 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004241324.03ODOKZR076356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2020 13:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360255 - in stable/12/sys: kern sys X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: kern sys X-SVN-Commit-Revision: 360255 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 13:24:21 -0000 Author: markj Date: Fri Apr 24 13:24:19 2020 New Revision: 360255 URL: https://svnweb.freebsd.org/changeset/base/360255 Log: MFC r359779: sbappendcontrol() needs to avoid clearing M_NOTREADY on data mbufs. Modified: stable/12/sys/kern/uipc_sockbuf.c stable/12/sys/kern/uipc_usrreq.c stable/12/sys/sys/sockbuf.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/uipc_sockbuf.c ============================================================================== --- stable/12/sys/kern/uipc_sockbuf.c Fri Apr 24 13:23:16 2020 (r360254) +++ stable/12/sys/kern/uipc_sockbuf.c Fri Apr 24 13:24:19 2020 (r360255) @@ -957,11 +957,11 @@ sbappendaddr(struct sockbuf *sb, const struct sockaddr void sbappendcontrol_locked(struct sockbuf *sb, struct mbuf *m0, - struct mbuf *control) + struct mbuf *control, int flags) { struct mbuf *m, *mlast; - m_clrprotoflags(m0); + sbm_clrprotoflags(m0, flags); m_last(control)->m_next = m0; SBLASTRECORDCHK(sb); @@ -979,11 +979,12 @@ sbappendcontrol_locked(struct sockbuf *sb, struct mbuf } void -sbappendcontrol(struct sockbuf *sb, struct mbuf *m0, struct mbuf *control) +sbappendcontrol(struct sockbuf *sb, struct mbuf *m0, struct mbuf *control, + int flags) { SOCKBUF_LOCK(sb); - sbappendcontrol_locked(sb, m0, control); + sbappendcontrol_locked(sb, m0, control, flags); SOCKBUF_UNLOCK(sb); } Modified: stable/12/sys/kern/uipc_usrreq.c ============================================================================== --- stable/12/sys/kern/uipc_usrreq.c Fri Apr 24 13:23:16 2020 (r360254) +++ stable/12/sys/kern/uipc_usrreq.c Fri Apr 24 13:24:19 2020 (r360255) @@ -1193,7 +1193,7 @@ uipc_send(struct socket *so, int flags, struct mbuf *m case SOCK_STREAM: if (control != NULL) { sbappendcontrol_locked(&so2->so_rcv, m, - control); + control, flags); control = NULL; } else sbappend_locked(&so2->so_rcv, m, flags); Modified: stable/12/sys/sys/sockbuf.h ============================================================================== --- stable/12/sys/sys/sockbuf.h Fri Apr 24 13:23:16 2020 (r360254) +++ stable/12/sys/sys/sockbuf.h Fri Apr 24 13:24:19 2020 (r360255) @@ -140,9 +140,9 @@ int sbappendaddr_locked(struct sockbuf *sb, const stru int sbappendaddr_nospacecheck_locked(struct sockbuf *sb, const struct sockaddr *asa, struct mbuf *m0, struct mbuf *control); void sbappendcontrol(struct sockbuf *sb, struct mbuf *m0, - struct mbuf *control); + struct mbuf *control, int flags); void sbappendcontrol_locked(struct sockbuf *sb, struct mbuf *m0, - struct mbuf *control); + struct mbuf *control, int flags); void sbappendrecord(struct sockbuf *sb, struct mbuf *m0); void sbappendrecord_locked(struct sockbuf *sb, struct mbuf *m0); void sbcompress(struct sockbuf *sb, struct mbuf *m, struct mbuf *n); From owner-svn-src-all@freebsd.org Fri Apr 24 13:25:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46C5E2B4300; Fri, 24 Apr 2020 13:25:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497vzg1731z4LJg; Fri, 24 Apr 2020 13:25:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21B2A1E917; Fri, 24 Apr 2020 13:25:03 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ODP2rL076464; Fri, 24 Apr 2020 13:25:02 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ODP2jc076462; Fri, 24 Apr 2020 13:25:02 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004241325.03ODP2jc076462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 Apr 2020 13:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360256 - in stable/12/sys: kern sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/12/sys: kern sys X-SVN-Commit-Revision: 360256 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 13:25:03 -0000 Author: kevans Date: Fri Apr 24 13:25:02 2020 New Revision: 360256 URL: https://svnweb.freebsd.org/changeset/base/360256 Log: MFC r360140, r360155: kqueue timer/data fixes r360140: kqueue: fix conversion of timer data to sbintime This unbreaks the i386 kqueue timer tests after a recent change switched NOTE_ABSTIME over to using microseconds. Notably, the data argument (which holds useconds) is an int64_t, but we were passing it to timer2sbintime which takes an intptr_t. Perhaps in a previous incarnation, intptr_t would have made sense, but now it just leads to the timestamp getting truncated and subsequently rejected when it no longer fits in an intptr_t. r360155: kevent32: fix the split of data into data1/data2 The current situation results in intermittent breakage if data gets split up with the sign bit set on the data1 half of it, as PAIR32TO64 will then: data1 | (data2 << 32) -> resulting in data1 getting sign-extended when it's implicitly widened and clobbering the result. AFAICT, there's no compelling reason for these to be signed. This was most exposed by flakiness in the kqueue timer tests under compat32 after the ABSTIME test got switched over to using a better clock and microseconds. Modified: stable/12/sys/kern/kern_event.c stable/12/sys/sys/event.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_event.c ============================================================================== --- stable/12/sys/kern/kern_event.c Fri Apr 24 13:24:19 2020 (r360255) +++ stable/12/sys/kern/kern_event.c Fri Apr 24 13:25:02 2020 (r360256) @@ -619,7 +619,7 @@ knote_fork(struct knlist *list, int pid) (NOTE_SECONDS | NOTE_MSECONDS | NOTE_USECONDS | NOTE_NSECONDS) static sbintime_t -timer2sbintime(intptr_t data, int flags) +timer2sbintime(int64_t data, int flags) { int64_t secs; Modified: stable/12/sys/sys/event.h ============================================================================== --- stable/12/sys/sys/event.h Fri Apr 24 13:24:19 2020 (r360255) +++ stable/12/sys/sys/event.h Fri Apr 24 13:25:02 2020 (r360256) @@ -111,7 +111,7 @@ struct kevent32 { #ifndef __amd64__ uint32_t pad0; #endif - int32_t data1, data2; + uint32_t data1, data2; uint32_t udata; /* opaque user data identifier */ #ifndef __amd64__ uint32_t pad1; From owner-svn-src-all@freebsd.org Fri Apr 24 13:29:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C55492B43B0; Fri, 24 Apr 2020 13:29:08 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497w4N4plNz4LTN; Fri, 24 Apr 2020 13:29:08 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C02B1E918; Fri, 24 Apr 2020 13:29:08 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ODT8Yd076692; Fri, 24 Apr 2020 13:29:08 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ODT8qt076691; Fri, 24 Apr 2020 13:29:08 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004241329.03ODT8qt076691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 Apr 2020 13:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360257 - stable/12/tests/sys/kqueue/libkqueue X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/tests/sys/kqueue/libkqueue X-SVN-Commit-Revision: 360257 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 13:29:08 -0000 Author: kevans Date: Fri Apr 24 13:29:08 2020 New Revision: 360257 URL: https://svnweb.freebsd.org/changeset/base/360257 Log: MFC r360033, r360108: better precision in kqueue timer tests r360033: tests: kqueue: use a more precise timer for the NOTE_ABSTIME test Originally noticed while attempting to run the kqueue tests under qemu-user-static, this apparently just happens sometimes when running in a jail in general -- the timer will fire off "too early," but it's really just the result of imprecise measurements (noted by cem). Kicking this over to NOTE_USECONDS still tests the correct thing while allowing it to work more consistently; a basic sanity test reveals that we often end up coming in just less than 200 microseconds after the timer fired off. r360108: tests: kqueue: fix some issues with now() on ILP32 platforms There were ultimately two separate problems here: - a 32-bit long cannot represent microseconds since 1970 (noted by ian) - time_t is 32-bit on i386, so now() was wrong anyways even with the correct return type. For the first, just explicitly use a uint64_t for now() and all of the callers. For the second, we need to explicitly cast tv_sec to uint64_t before it gets multiplied in the SEC_TO_US macro. Casting this instance rather than generally in the macro was arbitrarily chosen simply because all other uses are converting small relative time values. The tests now pass on i386, at least; presumably other ILP32 will be fine now as well. Modified: stable/12/tests/sys/kqueue/libkqueue/timer.c Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/kqueue/libkqueue/timer.c ============================================================================== --- stable/12/tests/sys/kqueue/libkqueue/timer.c Fri Apr 24 13:25:02 2020 (r360256) +++ stable/12/tests/sys/kqueue/libkqueue/timer.c Fri Apr 24 13:29:08 2020 (r360257) @@ -30,13 +30,14 @@ /* Get the current time with microsecond precision. Used for * sub-second timing to make some timer tests run faster. */ -static long +static uint64_t now(void) { struct timeval tv; gettimeofday(&tv, NULL); - return SEC_TO_US(tv.tv_sec) + tv.tv_usec; + /* Promote potentially 32-bit time_t to uint64_t before conversion. */ + return SEC_TO_US((uint64_t)tv.tv_sec) + tv.tv_usec; } /* Sleep for a given number of milliseconds. The timeout is assumed to @@ -216,17 +217,17 @@ test_abstime(void) { const char *test_id = "kevent(EVFILT_TIMER, EV_ONESHOT, NOTE_ABSTIME)"; struct kevent kev; - time_t start; - time_t stop; - const int timeout = 3; + uint64_t end, start, stop; + const int timeout_sec = 3; test_begin(test_id); test_no_kevents(); - start = time(NULL); + start = now(); + end = start + SEC_TO_US(timeout_sec); EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD | EV_ONESHOT, - NOTE_ABSTIME | NOTE_SECONDS, start + timeout, NULL); + NOTE_ABSTIME | NOTE_USECONDS, end, NULL); if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) err(1, "%s", test_id); @@ -235,10 +236,10 @@ test_abstime(void) kev.data = 1; kev.fflags = 0; kevent_cmp(&kev, kevent_get(kqfd)); - stop = time(NULL); - if (stop < start + timeout) - err(1, "too early %jd %jd", (intmax_t)stop, (intmax_t)(start + timeout)); + stop = now(); + if (stop < end) + err(1, "too early %jd %jd", (intmax_t)stop, (intmax_t)end); /* Check if the event occurs again */ sleep(3); test_no_kevents(); @@ -252,7 +253,7 @@ test_update(void) const char *test_id = "kevent(EVFILT_TIMER (UPDATE), EV_ADD | EV_ONESHOT)"; struct kevent kev; long elapsed; - long start; + uint64_t start; test_begin(test_id); @@ -297,7 +298,7 @@ test_update_equal(void) const char *test_id = "kevent(EVFILT_TIMER (UPDATE=), EV_ADD | EV_ONESHOT)"; struct kevent kev; long elapsed; - long start; + uint64_t start; test_begin(test_id); @@ -341,7 +342,7 @@ test_update_expired(void) const char *test_id = "kevent(EVFILT_TIMER (UPDATE EXP), EV_ADD | EV_ONESHOT)"; struct kevent kev; long elapsed; - long start; + uint64_t start; test_begin(test_id); @@ -392,8 +393,7 @@ test_update_periodic(void) const char *test_id = "kevent(EVFILT_TIMER (UPDATE), periodic)"; struct kevent kev; long elapsed; - long start; - long stop; + uint64_t start, stop; test_begin(test_id); @@ -450,8 +450,7 @@ test_update_timing(void) int iteration; int sleeptime; long elapsed; - long start; - long stop; + uint64_t start, stop; test_begin(test_id); From owner-svn-src-all@freebsd.org Fri Apr 24 13:31:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C404F2B4647; Fri, 24 Apr 2020 13:31:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497w7156Mqz4Lsq; Fri, 24 Apr 2020 13:31:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA14E1E973; Fri, 24 Apr 2020 13:31:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ODVPYQ080638; Fri, 24 Apr 2020 13:31:25 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ODVMUM080623; Fri, 24 Apr 2020 13:31:22 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004241331.03ODVMUM080623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 Apr 2020 13:31:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360258 - in stable/12/sys: dev/altera/jtag_uart dev/bvm dev/cfe dev/ofw dev/rp dev/xen/console kern netgraph sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/12/sys: dev/altera/jtag_uart dev/bvm dev/cfe dev/ofw dev/rp dev/xen/console kern netgraph sys X-SVN-Commit-Revision: 360258 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 13:31:25 -0000 Author: kevans Date: Fri Apr 24 13:31:22 2020 New Revision: 360258 URL: https://svnweb.freebsd.org/changeset/base/360258 Log: MFC r360051: tty: convert tty_lock_assert to tty_assert_locked A later change, currently being iterated on in D24459, will in-fact change the lock type to an sx so that TTY drivers can sleep on it if they need to. Committing this ahead of time to make the review in question a little more palatable. tty_lock_assert() is unfortunately still needed for now in two places to make sure that the tty lock has not been recursed upon, for those scenarios where it's supplied by the TTY driver and possibly a mutex that is allowed to recurse. Modified: stable/12/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c stable/12/sys/dev/bvm/bvm_console.c stable/12/sys/dev/cfe/cfe_console.c stable/12/sys/dev/ofw/ofw_console.c stable/12/sys/dev/rp/rp.c stable/12/sys/dev/xen/console/xen_console.c stable/12/sys/kern/tty.c stable/12/sys/kern/tty_info.c stable/12/sys/kern/tty_ttydisc.c stable/12/sys/netgraph/ng_tty.c stable/12/sys/sys/tty.h stable/12/sys/sys/ttydevsw.h stable/12/sys/sys/ttydisc.h stable/12/sys/sys/ttyhook.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c ============================================================================== --- stable/12/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c Fri Apr 24 13:31:22 2020 (r360258) @@ -266,7 +266,7 @@ aju_handle_input(struct altera_jtag_uart_softc *sc, st { int c; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); AJU_LOCK_ASSERT(sc); while (aju_readable(sc)) { @@ -298,7 +298,7 @@ aju_handle_output(struct altera_jtag_uart_softc *sc, s uint32_t v; uint8_t ch; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); AJU_LOCK_ASSERT(sc); AJU_UNLOCK(sc); @@ -364,7 +364,7 @@ aju_outwakeup(struct tty *tp) { struct altera_jtag_uart_softc *sc = tty_softc(tp); - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); AJU_LOCK(sc); aju_handle_output(sc, tp); Modified: stable/12/sys/dev/bvm/bvm_console.c ============================================================================== --- stable/12/sys/dev/bvm/bvm_console.c Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/dev/bvm/bvm_console.c Fri Apr 24 13:31:22 2020 (r360258) @@ -130,7 +130,7 @@ static void bvm_tty_close(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); callout_stop(&bvm_timer); } @@ -159,7 +159,7 @@ bvm_timeout(void *v) tp = (struct tty *)v; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); while ((c = bvm_cngetc(NULL)) != -1) ttydisc_rint(tp, c, 0); ttydisc_rint_done(tp); Modified: stable/12/sys/dev/cfe/cfe_console.c ============================================================================== --- stable/12/sys/dev/cfe/cfe_console.c Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/dev/cfe/cfe_console.c Fri Apr 24 13:31:22 2020 (r360258) @@ -142,7 +142,7 @@ cfe_timeout(void *v) tp = (struct tty *)v; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); while ((c = cfe_cngetc(NULL)) != -1) ttydisc_rint(tp, c, 0); ttydisc_rint_done(tp); Modified: stable/12/sys/dev/ofw/ofw_console.c ============================================================================== --- stable/12/sys/dev/ofw/ofw_console.c Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/dev/ofw/ofw_console.c Fri Apr 24 13:31:22 2020 (r360258) @@ -152,7 +152,7 @@ ofw_timeout(void *v) tp = (struct tty *)v; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); while ((c = ofw_cngetc(NULL)) != -1) ttydisc_rint(tp, c, 0); ttydisc_rint_done(tp); Modified: stable/12/sys/dev/rp/rp.c ============================================================================== --- stable/12/sys/dev/rp/rp.c Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/dev/rp/rp.c Fri Apr 24 13:31:22 2020 (r360258) @@ -674,7 +674,7 @@ static void rp_do_poll(void *arg) rp = arg; tp = rp->rp_tty; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); ctl = rp->rp_ctlp; CtlMask = ctl->ctlmask(ctl); if (CtlMask & (1 << rp->rp_aiop)) { Modified: stable/12/sys/dev/xen/console/xen_console.c ============================================================================== --- stable/12/sys/dev/xen/console/xen_console.c Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/dev/xen/console/xen_console.c Fri Apr 24 13:31:22 2020 (r360258) @@ -513,7 +513,7 @@ xencons_tx(struct tty *tp) cons = tty_softc(tp); - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); /* * Don't transmit any character if the buffer is full. Otherwise, Modified: stable/12/sys/kern/tty.c ============================================================================== --- stable/12/sys/kern/tty.c Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/kern/tty.c Fri Apr 24 13:31:22 2020 (r360258) @@ -221,7 +221,7 @@ static void ttydev_leave(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (tty_opened(tp) || tp->t_flags & TF_OPENCLOSE) { /* Device is still opened somewhere. */ @@ -405,7 +405,7 @@ static __inline int tty_is_ctty(struct tty *tp, struct proc *p) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); return (p->p_session == tp->t_session && p->p_flag & P_CONTROLT); } @@ -419,7 +419,7 @@ tty_wait_background(struct tty *tp, struct thread *td, int error; MPASS(sig == SIGTTIN || sig == SIGTTOU); - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); for (;;) { PROC_LOCK(p); @@ -689,7 +689,7 @@ tty_kqops_read_event(struct knote *kn, long hint __unu { struct tty *tp = kn->kn_hook; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (tty_gone(tp) || tp->t_flags & TF_ZOMBIE) { kn->kn_flags |= EV_EOF; @@ -713,7 +713,7 @@ tty_kqops_write_event(struct knote *kn, long hint __un { struct tty *tp = kn->kn_hook; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (tty_gone(tp)) { kn->kn_flags |= EV_EOF; @@ -1112,7 +1112,7 @@ tty_rel_free(struct tty *tp) { struct cdev *dev; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); #define TF_ACTIVITY (TF_GONE|TF_OPENED|TF_HOOK|TF_OPENCLOSE) if (tp->t_sessioncnt != 0 || (tp->t_flags & TF_ACTIVITY) != TF_GONE) { @@ -1143,7 +1143,7 @@ tty_rel_pgrp(struct tty *tp, struct pgrp *pg) { MPASS(tp->t_sessioncnt > 0); - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (tp->t_pgrp == pg) tp->t_pgrp = NULL; @@ -1170,7 +1170,7 @@ void tty_rel_gone(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); /* Simulate carrier removal. */ @@ -1258,7 +1258,7 @@ static void tty_to_xtty(struct tty *tp, struct xtty *xt) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); xt->xt_size = sizeof(struct xtty); xt->xt_insize = ttyinq_getsize(&tp->t_inq); @@ -1450,7 +1450,7 @@ tty_signal_sessleader(struct tty *tp, int sig) { struct proc *p; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(sig >= 1 && sig < NSIG); /* Make signals start output again. */ @@ -1469,7 +1469,7 @@ tty_signal_pgrp(struct tty *tp, int sig) { ksiginfo_t ksi; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(sig >= 1 && sig < NSIG); /* Make signals start output again. */ @@ -1947,7 +1947,7 @@ tty_ioctl(struct tty *tp, u_long cmd, void *data, int { int error; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (tty_gone(tp)) return (ENXIO); @@ -2114,7 +2114,7 @@ void ttyhook_unregister(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(tp->t_flags & TF_HOOK); /* Disconnect the hook. */ Modified: stable/12/sys/kern/tty_info.c ============================================================================== --- stable/12/sys/kern/tty_info.c Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/kern/tty_info.c Fri Apr 24 13:31:22 2020 (r360258) @@ -225,7 +225,7 @@ tty_info(struct tty *tp) char comm[MAXCOMLEN + 1]; struct rusage ru; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (tty_checkoutq(tp) == 0) return; Modified: stable/12/sys/kern/tty_ttydisc.c ============================================================================== --- stable/12/sys/kern/tty_ttydisc.c Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/kern/tty_ttydisc.c Fri Apr 24 13:31:22 2020 (r360258) @@ -326,7 +326,7 @@ ttydisc_read(struct tty *tp, struct uio *uio, int iofl { int error; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (uio->uio_resid == 0) return (0); @@ -458,7 +458,7 @@ ttydisc_write(struct tty *tp, struct uio *uio, int iof int error = 0; unsigned int oblen = 0; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (tp->t_flags & TF_ZOMBIE) return (EIO); @@ -573,7 +573,7 @@ done: void ttydisc_optimize(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (ttyhook_hashook(tp, rint_bypass)) { tp->t_flags |= TF_BYPASS; @@ -594,7 +594,7 @@ void ttydisc_modem(struct tty *tp, int open) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (open) cv_broadcast(&tp->t_dcdwait); @@ -842,7 +842,7 @@ ttydisc_rint(struct tty *tp, char c, int flags) char ob[3] = { 0xff, 0x00 }; size_t ol; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); atomic_add_long(&tty_nin, 1); @@ -1085,7 +1085,7 @@ ttydisc_rint_bypass(struct tty *tp, const void *buf, s { size_t ret; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(tp->t_flags & TF_BYPASS); @@ -1106,7 +1106,7 @@ void ttydisc_rint_done(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (ttyhook_hashook(tp, rint_done)) ttyhook_rint_done(tp); @@ -1122,7 +1122,7 @@ ttydisc_rint_poll(struct tty *tp) { size_t l; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (ttyhook_hashook(tp, rint_poll)) return ttyhook_rint_poll(tp); @@ -1165,7 +1165,7 @@ size_t ttydisc_getc(struct tty *tp, void *buf, size_t len) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (tp->t_flags & TF_STOPPED) return (0); @@ -1192,7 +1192,7 @@ ttydisc_getc_uio(struct tty *tp, struct uio *uio) size_t len; char buf[TTY_STACKBUF]; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (tp->t_flags & TF_STOPPED) return (0); @@ -1233,7 +1233,7 @@ size_t ttydisc_getc_poll(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (tp->t_flags & TF_STOPPED) return (0); @@ -1253,7 +1253,7 @@ ttydisc_getc_poll(struct tty *tp) int tty_putchar(struct tty *tp, char c) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (tty_gone(tp)) return (-1); Modified: stable/12/sys/netgraph/ng_tty.c ============================================================================== --- stable/12/sys/netgraph/ng_tty.c Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/netgraph/ng_tty.c Fri Apr 24 13:31:22 2020 (r360258) @@ -412,7 +412,7 @@ ngt_rint_bypass(struct tty *tp, const void *buf, size_ size_t total = 0; int error = 0, length; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (sc->hook == NULL) return (0); @@ -460,7 +460,7 @@ ngt_rint(struct tty *tp, char c, int flags) struct mbuf *m; int error = 0; - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); if (sc->hook == NULL) return (0); Modified: stable/12/sys/sys/tty.h ============================================================================== --- stable/12/sys/sys/tty.h Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/sys/tty.h Fri Apr 24 13:31:22 2020 (r360258) @@ -170,8 +170,11 @@ void tty_rel_gone(struct tty *tp); #define tty_lock(tp) mtx_lock((tp)->t_mtx) #define tty_unlock(tp) mtx_unlock((tp)->t_mtx) #define tty_lock_owned(tp) mtx_owned((tp)->t_mtx) -#define tty_lock_assert(tp,ma) mtx_assert((tp)->t_mtx, (ma)) +#define tty_assert_locked(tp) mtx_assert((tp)->t_mtx, MA_OWNED) #define tty_getlock(tp) ((tp)->t_mtx) + +/* XXX Should migrate users to tty_assert_locked! */ +#define tty_lock_assert(tp, ma) mtx_assert((tp)->t_mtx, (ma)) /* Device node creation. */ int tty_makedevf(struct tty *tp, struct ucred *cred, int flags, Modified: stable/12/sys/sys/ttydevsw.h ============================================================================== --- stable/12/sys/sys/ttydevsw.h Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/sys/ttydevsw.h Fri Apr 24 13:31:22 2020 (r360258) @@ -86,7 +86,7 @@ static __inline int ttydevsw_open(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); return (tp->t_devsw->tsw_open(tp)); @@ -96,7 +96,7 @@ static __inline void ttydevsw_close(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); tp->t_devsw->tsw_close(tp); @@ -106,7 +106,7 @@ static __inline void ttydevsw_outwakeup(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); /* Prevent spurious wakeups. */ @@ -120,7 +120,7 @@ static __inline void ttydevsw_inwakeup(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); /* Prevent spurious wakeups. */ @@ -134,7 +134,7 @@ static __inline int ttydevsw_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); return (tp->t_devsw->tsw_ioctl(tp, cmd, data, td)); @@ -145,7 +145,7 @@ ttydevsw_cioctl(struct tty *tp, int unit, u_long cmd, struct thread *td) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); return (tp->t_devsw->tsw_cioctl(tp, unit, cmd, data, td)); @@ -183,7 +183,7 @@ static __inline void ttydevsw_pktnotify(struct tty *tp, char event) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); tp->t_devsw->tsw_pktnotify(tp, event); @@ -202,7 +202,7 @@ static __inline bool ttydevsw_busy(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); return (tp->t_devsw->tsw_busy(tp)); Modified: stable/12/sys/sys/ttydisc.h ============================================================================== --- stable/12/sys/sys/ttydisc.h Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/sys/ttydisc.h Fri Apr 24 13:31:22 2020 (r360258) @@ -72,7 +72,7 @@ static __inline size_t ttydisc_read_poll(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); return ttyinq_bytescanonicalized(&tp->t_inq); } @@ -81,7 +81,7 @@ static __inline size_t ttydisc_write_poll(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); return ttyoutq_bytesleft(&tp->t_outq); } Modified: stable/12/sys/sys/ttyhook.h ============================================================================== --- stable/12/sys/sys/ttyhook.h Fri Apr 24 13:29:08 2020 (r360257) +++ stable/12/sys/sys/ttyhook.h Fri Apr 24 13:31:22 2020 (r360258) @@ -78,7 +78,7 @@ void ttyhook_unregister(struct tty *); static __inline int ttyhook_rint(struct tty *tp, char c, int flags) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); return tp->t_hook->th_rint(tp, c, flags); @@ -87,7 +87,7 @@ ttyhook_rint(struct tty *tp, char c, int flags) static __inline size_t ttyhook_rint_bypass(struct tty *tp, const void *buf, size_t len) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); return tp->t_hook->th_rint_bypass(tp, buf, len); @@ -96,7 +96,7 @@ ttyhook_rint_bypass(struct tty *tp, const void *buf, s static __inline void ttyhook_rint_done(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); tp->t_hook->th_rint_done(tp); @@ -105,7 +105,7 @@ ttyhook_rint_done(struct tty *tp) static __inline size_t ttyhook_rint_poll(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); return tp->t_hook->th_rint_poll(tp); @@ -114,7 +114,7 @@ ttyhook_rint_poll(struct tty *tp) static __inline size_t ttyhook_getc_inject(struct tty *tp, void *buf, size_t len) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); return tp->t_hook->th_getc_inject(tp, buf, len); @@ -123,7 +123,7 @@ ttyhook_getc_inject(struct tty *tp, void *buf, size_t static __inline void ttyhook_getc_capture(struct tty *tp, const void *buf, size_t len) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); tp->t_hook->th_getc_capture(tp, buf, len); @@ -132,7 +132,7 @@ ttyhook_getc_capture(struct tty *tp, const void *buf, static __inline size_t ttyhook_getc_poll(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); MPASS(!tty_gone(tp)); return tp->t_hook->th_getc_poll(tp); @@ -141,7 +141,7 @@ ttyhook_getc_poll(struct tty *tp) static __inline void ttyhook_close(struct tty *tp) { - tty_lock_assert(tp, MA_OWNED); + tty_assert_locked(tp); tp->t_hook->th_close(tp); } From owner-svn-src-all@freebsd.org Fri Apr 24 13:49:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D03582B57FF; Fri, 24 Apr 2020 13:49:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497wXJ57shz4NfF; Fri, 24 Apr 2020 13:49:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A73A51ECD1; Fri, 24 Apr 2020 13:49:52 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ODnqL0088736; Fri, 24 Apr 2020 13:49:52 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ODnpwo088732; Fri, 24 Apr 2020 13:49:51 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004241349.03ODnpwo088732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2020 13:49:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360259 - in stable/12/sys: arm64/arm64 riscv/riscv X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: arm64/arm64 riscv/riscv X-SVN-Commit-Revision: 360259 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 13:49:52 -0000 Author: markj Date: Fri Apr 24 13:49:51 2020 New Revision: 360259 URL: https://svnweb.freebsd.org/changeset/base/360259 Log: MFC r359280: Remove the secondary_stacks array in arm64 and riscv kernels. Modified: stable/12/sys/arm64/arm64/locore.S stable/12/sys/arm64/arm64/mp_machdep.c stable/12/sys/riscv/riscv/locore.S stable/12/sys/riscv/riscv/mp_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/arm64/locore.S ============================================================================== --- stable/12/sys/arm64/arm64/locore.S Fri Apr 24 13:31:22 2020 (r360258) +++ stable/12/sys/arm64/arm64/locore.S Fri Apr 24 13:49:51 2020 (r360259) @@ -183,11 +183,10 @@ ENTRY(mpentry) br x15 mp_virtdone: - ldr x4, =secondary_stacks - mov x5, #(PAGE_SIZE * KSTACK_PAGES) - mul x5, x0, x5 - add sp, x4, x5 - + /* Start using the AP boot stack */ + ldr x4, =bootstack + ldr x4, [x4] + mov sp, x4 b init_secondary END(mpentry) #endif Modified: stable/12/sys/arm64/arm64/mp_machdep.c ============================================================================== --- stable/12/sys/arm64/arm64/mp_machdep.c Fri Apr 24 13:31:22 2020 (r360258) +++ stable/12/sys/arm64/arm64/mp_machdep.c Fri Apr 24 13:49:51 2020 (r360259) @@ -122,7 +122,6 @@ static void ipi_preempt(void *); static void ipi_rendezvous(void *); static void ipi_stop(void *); -struct mtx ap_boot_mtx; struct pcb stoppcbs[MAXCPU]; static device_t cpu_list[MAXCPU]; @@ -137,10 +136,18 @@ static int cpu0 = -1; void mpentry(unsigned long cpuid); void init_secondary(uint64_t); -uint8_t secondary_stacks[MAXCPU - 1][PAGE_SIZE * KSTACK_PAGES] __aligned(16); +/* Synchronize AP startup. */ +static struct mtx ap_boot_mtx; +/* Stacks for AP initialization, discarded once idle threads are started. */ +void *bootstack; +static void *bootstacks[MAXCPU]; + +/* Count of started APs, used to synchronize access to bootstack. */ +static volatile int aps_started; + /* Set to 1 once we're ready to let the APs out of the pen. */ -volatile int aps_ready = 0; +static volatile int aps_ready; /* Temporary variables for init_secondary() */ void *dpcpu[MAXCPU - 1]; @@ -277,14 +284,14 @@ init_secondary(uint64_t cpu) "mov x18, %0 \n" "msr tpidr_el1, %0" :: "r"(pcpup)); - /* Spin until the BSP releases the APs */ - while (!aps_ready) + /* Signal the BSP and spin until it has released all APs. */ + atomic_add_int(&aps_started, 1); + while (!atomic_load_int(&aps_ready)) __asm __volatile("wfe"); /* Initialize curthread */ KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); pcpup->pc_curthread = pcpup->pc_idlethread; - pcpup->pc_curpcb = pcpup->pc_idlethread->td_pcb; /* * Identify current CPU. This is necessary to setup @@ -314,6 +321,11 @@ init_secondary(uint64_t cpu) } mtx_unlock_spin(&ap_boot_mtx); + /* + * Assert that smp_after_idle_runnable condition is reasonable. + */ + MPASS(PCPU_GET(curpcb) == NULL); + /* Enter the scheduler */ sched_throw(NULL); @@ -321,6 +333,24 @@ init_secondary(uint64_t cpu) /* NOTREACHED */ } +static void +smp_after_idle_runnable(void *arg __unused) +{ + struct pcpu *pc; + int cpu; + + for (cpu = 1; cpu < mp_ncpus; cpu++) { + if (bootstacks[cpu] != NULL) { + pc = pcpu_find(cpu); + while (atomic_load_ptr(&pc->pc_curpcb) == NULL) + cpu_spinwait(); + kmem_free((vm_offset_t)bootstacks[cpu], PAGE_SIZE); + } + } +} +SYSINIT(smp_after_idle_runnable, SI_SUB_SMP, SI_ORDER_ANY, + smp_after_idle_runnable, NULL); + /* * Send IPI thru interrupt controller. */ @@ -451,7 +481,7 @@ start_cpu(u_int id, uint64_t target_cpu) struct pcpu *pcpup; vm_paddr_t pa; u_int cpuid; - int err; + int err, naps; /* Check we are able to start this cpu */ if (id > mp_maxid) @@ -465,7 +495,7 @@ start_cpu(u_int id, uint64_t target_cpu) /* * Rotate the CPU IDs to put the boot CPU as CPU 0. We keep the other - * CPUs ordered as the are likely grouped into clusters so it can be + * CPUs ordered as they are likely grouped into clusters so it can be * useful to keep that property, e.g. for the GICv3 driver to send * an IPI to all CPUs in the cluster. */ @@ -480,29 +510,41 @@ start_cpu(u_int id, uint64_t target_cpu) dpcpu[cpuid - 1] = (void *)kmem_malloc(DPCPU_SIZE, M_WAITOK | M_ZERO); dpcpu_init(dpcpu[cpuid - 1], cpuid); + bootstacks[cpuid] = (void *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); + + naps = atomic_load_int(&aps_started); + bootstack = (char *)bootstacks[cpuid] + PAGE_SIZE; + printf("Starting CPU %u (%lx)\n", cpuid, target_cpu); pa = pmap_extract(kernel_pmap, (vm_offset_t)mpentry); - err = psci_cpu_on(target_cpu, pa, cpuid); if (err != PSCI_RETVAL_SUCCESS) { /* * Panic here if INVARIANTS are enabled and PSCI failed to - * start the requested CPU. If psci_cpu_on returns PSCI_MISSING + * start the requested CPU. psci_cpu_on() returns PSCI_MISSING * to indicate we are unable to use it to start the given CPU. */ KASSERT(err == PSCI_MISSING || (mp_quirks & MP_QUIRK_CPULIST) == MP_QUIRK_CPULIST, - ("Failed to start CPU %u (%lx)\n", id, target_cpu)); + ("Failed to start CPU %u (%lx), error %d\n", + id, target_cpu, err)); pcpu_destroy(pcpup); kmem_free((vm_offset_t)dpcpu[cpuid - 1], DPCPU_SIZE); dpcpu[cpuid - 1] = NULL; + kmem_free((vm_offset_t)bootstacks[cpuid], PAGE_SIZE); + bootstacks[cpuid] = NULL; mp_ncpus--; /* Notify the user that the CPU failed to start */ - printf("Failed to start CPU %u (%lx)\n", id, target_cpu); - } else + printf("Failed to start CPU %u (%lx), error %d\n", + id, target_cpu, err); + } else { + /* Wait for the AP to switch to its boot stack. */ + while (atomic_load_int(&aps_started) < naps + 1) + cpu_spinwait(); CPU_SET(cpuid, &all_cpus); + } return (true); } Modified: stable/12/sys/riscv/riscv/locore.S ============================================================================== --- stable/12/sys/riscv/riscv/locore.S Fri Apr 24 13:31:22 2020 (r360258) +++ stable/12/sys/riscv/riscv/locore.S Fri Apr 24 13:49:51 2020 (r360259) @@ -296,14 +296,8 @@ ENTRY(mpentry) beqz t1, 1b /* Setup stack pointer */ - lla t0, secondary_stacks - li t1, (PAGE_SIZE * KSTACK_PAGES) - mulw t2, t1, a0 - add t0, t0, t2 - add t0, t0, t1 - sub t0, t0, s9 - li t1, KERNBASE - add sp, t0, t1 + lla t0, bootstack + ld sp, 0(t0) /* Setup supervisor trap vector */ lla t0, mpva Modified: stable/12/sys/riscv/riscv/mp_machdep.c ============================================================================== --- stable/12/sys/riscv/riscv/mp_machdep.c Fri Apr 24 13:31:22 2020 (r360258) +++ stable/12/sys/riscv/riscv/mp_machdep.c Fri Apr 24 13:49:51 2020 (r360259) @@ -86,7 +86,6 @@ static device_attach_t riscv64_cpu_attach; static int ipi_handler(void *); -struct mtx ap_boot_mtx; struct pcb stoppcbs[MAXCPU]; extern uint32_t boot_hart; @@ -97,13 +96,19 @@ static uint32_t cpu_reg[MAXCPU][2]; #endif static device_t cpu_list[MAXCPU]; -void mpentry(unsigned long cpuid); void init_secondary(uint64_t); -uint8_t secondary_stacks[MAXCPU][PAGE_SIZE * KSTACK_PAGES] __aligned(16); +static struct mtx ap_boot_mtx; +/* Stacks for AP initialization, discarded once idle threads are started. */ +void *bootstack; +static void *bootstacks[MAXCPU]; + +/* Count of started APs, used to synchronize access to bootstack. */ +static volatile int aps_started; + /* Set to 1 once we're ready to let the APs out of the pen. */ -volatile int aps_ready = 0; +static volatile int aps_ready; /* Temporary variables for init_secondary() */ void *dpcpu[MAXCPU - 1]; @@ -237,14 +242,14 @@ init_secondary(uint64_t hart) csr_set(sie, SIE_SSIE); csr_set(sip, SIE_SSIE); - /* Spin until the BSP releases the APs */ - while (!aps_ready) + /* Signal the BSP and spin until it has released all APs. */ + atomic_add_int(&aps_started, 1); + while (!atomic_load_int(&aps_ready)) __asm __volatile("wfi"); /* Initialize curthread */ KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); pcpup->pc_curthread = pcpup->pc_idlethread; - pcpup->pc_curpcb = pcpup->pc_idlethread->td_pcb; /* * Identify current CPU. This is necessary to setup @@ -278,6 +283,11 @@ init_secondary(uint64_t hart) mtx_unlock_spin(&ap_boot_mtx); + /* + * Assert that smp_after_idle_runnable condition is reasonable. + */ + MPASS(PCPU_GET(curpcb) == NULL); + /* Enter the scheduler */ sched_throw(NULL); @@ -285,6 +295,24 @@ init_secondary(uint64_t hart) /* NOTREACHED */ } +static void +smp_after_idle_runnable(void *arg __unused) +{ + struct pcpu *pc; + int cpu; + + for (cpu = 1; cpu < mp_ncpus; cpu++) { + if (bootstacks[cpu] != NULL) { + pc = pcpu_find(cpu); + while (atomic_load_ptr(&pc->pc_curpcb) == NULL) + cpu_spinwait(); + kmem_free((vm_offset_t)bootstacks[cpu], PAGE_SIZE); + } + } +} +SYSINIT(smp_after_idle_runnable, SI_SUB_SMP, SI_ORDER_ANY, + smp_after_idle_runnable, NULL); + static int ipi_handler(void *arg) { @@ -377,6 +405,7 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size struct pcpu *pcpup; uint64_t hart; u_int cpuid; + int naps; /* Check if this hart supports MMU. */ if (OF_getproplen(node, "mmu-type") < 0) @@ -423,8 +452,17 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size dpcpu[cpuid - 1] = (void *)kmem_malloc(DPCPU_SIZE, M_WAITOK | M_ZERO); dpcpu_init(dpcpu[cpuid - 1], cpuid); + bootstacks[cpuid] = (void *)kmem_malloc(PAGE_SIZE, M_WAITOK | M_ZERO); + + naps = atomic_load_int(&aps_started); + bootstack = (char *)bootstacks[cpuid] + PAGE_SIZE; + printf("Starting CPU %u (hart %lx)\n", cpuid, hart); - __riscv_boot_ap[hart] = 1; + atomic_store_32(&__riscv_boot_ap[hart], 1); + + /* Wait for the AP to switch to its boot stack. */ + while (atomic_load_int(&aps_started) < naps + 1) + cpu_spinwait(); CPU_SET(cpuid, &all_cpus); CPU_SET(hart, &all_harts); From owner-svn-src-all@freebsd.org Fri Apr 24 13:53:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D41FE2B5CFD; Fri, 24 Apr 2020 13:53:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497wcj3sppz4PGs; Fri, 24 Apr 2020 13:53:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7FBE81EEC0; Fri, 24 Apr 2020 13:53:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03ODrf73094668; Fri, 24 Apr 2020 13:53:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03ODrepp094665; Fri, 24 Apr 2020 13:53:40 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004241353.03ODrepp094665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2020 13:53:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360260 - in head/stand: efi/loader/arch/amd64 i386/libi386 userboot/userboot X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/stand: efi/loader/arch/amd64 i386/libi386 userboot/userboot X-SVN-Commit-Revision: 360260 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 13:53:41 -0000 Author: markj Date: Fri Apr 24 13:53:40 2020 New Revision: 360260 URL: https://svnweb.freebsd.org/changeset/base/360260 Log: Stop setting PG_U in bootstrap mappings. These mappings are never visible to userspace as they get replaced when the amd64 pmap is bootstrapped, but there is no need to set PG_U in the first place. Reviewed by: alc, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24547 Modified: head/stand/efi/loader/arch/amd64/elf64_freebsd.c head/stand/i386/libi386/elf64_freebsd.c head/stand/userboot/userboot/elf64_freebsd.c Modified: head/stand/efi/loader/arch/amd64/elf64_freebsd.c ============================================================================== --- head/stand/efi/loader/arch/amd64/elf64_freebsd.c Fri Apr 24 13:49:51 2020 (r360259) +++ head/stand/efi/loader/arch/amd64/elf64_freebsd.c Fri Apr 24 13:53:40 2020 (r360260) @@ -172,15 +172,15 @@ elf64_exec(struct preloaded_file *fp) for (i = 0; i < 512; i++) { /* Each slot of the L4 pages points to the same L3 page. */ PT4[i] = (pml4_entry_t)PT3; - PT4[i] |= PG_V | PG_RW | PG_U; + PT4[i] |= PG_V | PG_RW; /* Each slot of the L3 pages points to the same L2 page. */ PT3[i] = (pdp_entry_t)PT2; - PT3[i] |= PG_V | PG_RW | PG_U; + PT3[i] |= PG_V | PG_RW; /* The L2 page slots are mapped with 2MB pages for 1GB. */ PT2[i] = i * (2 * 1024 * 1024); - PT2[i] |= PG_V | PG_RW | PG_PS | PG_U; + PT2[i] |= PG_V | PG_RW | PG_PS; } printf("Start @ 0x%lx ...\n", ehdr->e_entry); Modified: head/stand/i386/libi386/elf64_freebsd.c ============================================================================== --- head/stand/i386/libi386/elf64_freebsd.c Fri Apr 24 13:49:51 2020 (r360259) +++ head/stand/i386/libi386/elf64_freebsd.c Fri Apr 24 13:53:40 2020 (r360260) @@ -48,7 +48,6 @@ struct file_format amd64_elf_obj = { elf64_obj_loadfil #define PG_V 0x001 #define PG_RW 0x002 -#define PG_U 0x004 #define PG_PS 0x080 typedef uint64_t p4_entry_t; @@ -96,15 +95,15 @@ elf64_exec(struct preloaded_file *fp) for (i = 0; i < 512; i++) { /* Each slot of the level 4 pages points to the same level 3 page */ PT4[i] = (p4_entry_t)VTOP((uintptr_t)&PT3[0]); - PT4[i] |= PG_V | PG_RW | PG_U; + PT4[i] |= PG_V | PG_RW; /* Each slot of the level 3 pages points to the same level 2 page */ PT3[i] = (p3_entry_t)VTOP((uintptr_t)&PT2[0]); - PT3[i] |= PG_V | PG_RW | PG_U; + PT3[i] |= PG_V | PG_RW; /* The level 2 page slots are mapped with 2MB pages for 1GB. */ PT2[i] = i * (2 * 1024 * 1024); - PT2[i] |= PG_V | PG_RW | PG_PS | PG_U; + PT2[i] |= PG_V | PG_RW | PG_PS; } entry_lo = ehdr->e_entry & 0xffffffff; Modified: head/stand/userboot/userboot/elf64_freebsd.c ============================================================================== --- head/stand/userboot/userboot/elf64_freebsd.c Fri Apr 24 13:49:51 2020 (r360259) +++ head/stand/userboot/userboot/elf64_freebsd.c Fri Apr 24 13:53:40 2020 (r360260) @@ -60,7 +60,6 @@ struct file_format amd64_elf_obj = { elf64_obj_loadfil #define PG_V 0x001 #define PG_RW 0x002 -#define PG_U 0x004 #define PG_PS 0x080 typedef uint64_t p4_entry_t; @@ -127,15 +126,15 @@ elf64_exec(struct preloaded_file *fp) for (i = 0; i < 512; i++) { /* Each slot of the level 4 pages points to the same level 3 page */ PT4[i] = (p4_entry_t) 0x3000; - PT4[i] |= PG_V | PG_RW | PG_U; + PT4[i] |= PG_V | PG_RW; /* Each slot of the level 3 pages points to the same level 2 page */ PT3[i] = (p3_entry_t) 0x4000; - PT3[i] |= PG_V | PG_RW | PG_U; + PT3[i] |= PG_V | PG_RW; /* The level 2 page slots are mapped with 2MB pages for 1GB. */ PT2[i] = i * (2 * 1024 * 1024); - PT2[i] |= PG_V | PG_RW | PG_PS | PG_U; + PT2[i] |= PG_V | PG_RW | PG_PS; } #ifdef DEBUG From owner-svn-src-all@freebsd.org Fri Apr 24 14:27:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 481EC2B6D98; Fri, 24 Apr 2020 14:27:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497xMc19stz4RN3; Fri, 24 Apr 2020 14:27:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F42A1F4A3; Fri, 24 Apr 2020 14:27:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OERNfp013223; Fri, 24 Apr 2020 14:27:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OERNVG013222; Fri, 24 Apr 2020 14:27:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004241427.03OERNVG013222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2020 14:27:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360261 - in stable/12/sys: arm64/arm64 riscv/riscv X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: arm64/arm64 riscv/riscv X-SVN-Commit-Revision: 360261 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 14:27:24 -0000 Author: markj Date: Fri Apr 24 14:27:23 2020 New Revision: 360261 URL: https://svnweb.freebsd.org/changeset/base/360261 Log: Fix the build after r360259. stable/12 is missing r357940. For some reason this warning wasn't hit when I compiled locally. This is a direct commit to stable/12. Reported by: Jenkins Modified: stable/12/sys/arm64/arm64/mp_machdep.c stable/12/sys/riscv/riscv/mp_machdep.c Modified: stable/12/sys/arm64/arm64/mp_machdep.c ============================================================================== --- stable/12/sys/arm64/arm64/mp_machdep.c Fri Apr 24 13:53:40 2020 (r360260) +++ stable/12/sys/arm64/arm64/mp_machdep.c Fri Apr 24 14:27:23 2020 (r360261) @@ -342,7 +342,7 @@ smp_after_idle_runnable(void *arg __unused) for (cpu = 1; cpu < mp_ncpus; cpu++) { if (bootstacks[cpu] != NULL) { pc = pcpu_find(cpu); - while (atomic_load_ptr(&pc->pc_curpcb) == NULL) + while ((void *)atomic_load_ptr(&pc->pc_curpcb) == NULL) cpu_spinwait(); kmem_free((vm_offset_t)bootstacks[cpu], PAGE_SIZE); } Modified: stable/12/sys/riscv/riscv/mp_machdep.c ============================================================================== --- stable/12/sys/riscv/riscv/mp_machdep.c Fri Apr 24 13:53:40 2020 (r360260) +++ stable/12/sys/riscv/riscv/mp_machdep.c Fri Apr 24 14:27:23 2020 (r360261) @@ -304,7 +304,7 @@ smp_after_idle_runnable(void *arg __unused) for (cpu = 1; cpu < mp_ncpus; cpu++) { if (bootstacks[cpu] != NULL) { pc = pcpu_find(cpu); - while (atomic_load_ptr(&pc->pc_curpcb) == NULL) + while ((void *)atomic_load_ptr(&pc->pc_curpcb) == NULL) cpu_spinwait(); kmem_free((vm_offset_t)bootstacks[cpu], PAGE_SIZE); } From owner-svn-src-all@freebsd.org Fri Apr 24 14:29:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 190F62B6F32 for ; Fri, 24 Apr 2020 14:29:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497xPk2821z4Rcg for ; Fri, 24 Apr 2020 14:29:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2f.google.com with SMTP id t8so4728631qvw.5 for ; Fri, 24 Apr 2020 07:29:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HfwlhWLl/F18kSMsFHza/H7cyGmF3NjietkOAYPmSs8=; b=ncp+jbBNs6qjY25ZXT9uAtmbOQP/TaKIVEIhrIy9J2LJDo5f5fuUTJD0kAIU6Q5jKP Cv4nldhMHMrodTwpASHtZih/sbAXdH2M9EsO0EXu4e8BHwh4HlvvDNpl/4KCKbnHDf6W K5vdoNTTqDZDSkep2sWcemp4qkMCh2AY26IBMZBuvxabHphVu70/mI6Pzi67l5yWZ1UR LxjG0TWTwMmrRmvu10Gvh11D+5tEIwvrpNyPk+gj8dKXNGUQH1IEKFj5LAGpth2bE6FA +fJNa/M18lVkSLm97bUqLN1a1ThL4Tme4YXz1pbYiC83RW6gj+TaVS8ofqo5sRGEv0Nh GRZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HfwlhWLl/F18kSMsFHza/H7cyGmF3NjietkOAYPmSs8=; b=lecQUmXIEmFm3BJKQ4O/+/F9l9ZTvcO9nNY1N6lGdF+yilSp2Vt9n3hdQcbVN7FtVm iY6VHPp6D2nD1Nf8CtcJuSdYofbcjn3OFlSze10DK00ODOv3xiOJJXYJyvqwosenAI10 TFqDgcI14kXxphBoKZBcnVOOx/q/ieZVawOU4E3Vz8ZF+j6qsBfUkoPg5U4MqEsnrxMm NF9c2fSjMN6EwkVnihWtyRd8rvx0qoLpyYuX5uqzOMltbTWpXg8zl1VKOWdJn+OjVONA wVX1yXCEQLLXWZok+90RoRI7pucu8LNX8kH3h2OMwAvX82n1m1XjS/QXTEEKoX8QBnBc rTAA== X-Gm-Message-State: AGi0PuavQM6FSfG3b2vVhdAj3NMo+PmcXT+hw+D7KG/AlFcmoIZ567Sk 2TdTVk4K3hx5PvJCVHl2blhe4kC+GCje6OZj2p6dGA== X-Google-Smtp-Source: APiQypIUeQNWJrF0GnEV9feeFxOGpsWkiPAFz4aClOwlRK2+FZ5VX0VowxNsSP6vfonC8A8h4ltapfGHx7RPQ3F2l98= X-Received: by 2002:a0c:f8cf:: with SMTP id h15mr9091832qvo.22.1587738553027; Fri, 24 Apr 2020 07:29:13 -0700 (PDT) MIME-Version: 1.0 References: <202004240749.03O7nMSc066344@repo.freebsd.org> In-Reply-To: <202004240749.03O7nMSc066344@repo.freebsd.org> From: Warner Losh Date: Fri, 24 Apr 2020 08:29:01 -0600 Message-ID: Subject: Re: svn commit: r360241 - head/sys/dev/ichiic To: Andriy Gapon Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 497xPk2821z4Rcg X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=ncp+jbBN; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f2f) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.48 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[f.2.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-1.48)[ip: (-6.59), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 14:29:15 -0000 On Fri, Apr 24, 2020 at 1:49 AM Andriy Gapon wrote: > Author: avg > Date: Fri Apr 24 07:49:21 2020 > New Revision: 360241 > URL: https://svnweb.freebsd.org/changeset/base/360241 > > Log: > ig4: ensure that drivers always attach in correct order > > Use DRIVER_MODULE_ORDERED(SI_ORDER_ANY) so that ig4's ACPI attachment > happens after iicbus and acpi_iicbus drivers are registered. > > I have seen a problem where iicbus attached under ig4 instead of > acpi_iicbus when ig4.ko was loaded with kldload. I believe that that > happened because ig4 driver was a first driver to register, it attached > and created an iicbus child. Then iicbus driver was registered and, > since it was the only driver that could attach to the iicbus child > device, it did exactly that. After that acpi_iicbus driver was > registered. It would be able to attach to the iicbus device, but it was > already attached, so nothing happened. > Can you post more details of which devices are affected? From the description and the patch, I don't see how this could fix things. Warner > MFC after: 2 weeks > > Modified: > head/sys/dev/ichiic/ig4_acpi.c > > Modified: head/sys/dev/ichiic/ig4_acpi.c > > ============================================================================== > --- head/sys/dev/ichiic/ig4_acpi.c Fri Apr 24 05:05:58 2020 > (r360240) > +++ head/sys/dev/ichiic/ig4_acpi.c Fri Apr 24 07:49:21 2020 > (r360241) > @@ -192,5 +192,6 @@ static driver_t ig4iic_acpi_driver = { > sizeof(struct ig4iic_softc), > }; > > -DRIVER_MODULE(ig4iic, acpi, ig4iic_acpi_driver, ig4iic_devclass, 0, 0); > +DRIVER_MODULE_ORDERED(ig4iic, acpi, ig4iic_acpi_driver, ig4iic_devclass, > 0, 0, > + SI_ORDER_ANY); > MODULE_DEPEND(ig4iic, acpi, 1, 1, 1); > From owner-svn-src-all@freebsd.org Fri Apr 24 14:47:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E03912B7998; Fri, 24 Apr 2020 14:47:16 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497xpW6SJSz4Sln; Fri, 24 Apr 2020 14:47:15 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f196.google.com with SMTP id l19so10197269lje.10; Fri, 24 Apr 2020 07:47:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=b68u3vqIN5erxELnSbHU/36Olb/TJD1HLZvp04lhpo0=; b=HM4GgEZxtpCBBp+fuYmvFNHofP0W9daeHfi0akr/n/rG4i05g82HitTFO7m3Zj04gd grb3+p6KdwRMFzudo1GTWMf3EBZQmvS1AbehWw2FhMWSO0o8aZwGyOD3UrfpQYiZ/1sV 0b+Bkymod8uA4NPuKDJoEmPsey5q3LL7pWjLBGO8PegX1rrRNNR3jFuDgeSaOOASfm/H hgwY10ky1FL0Y84bXyHG+U+RX4Qljvz/ugf5Fd1BPP5gGLOmHTCeDaRIpofHWSc95dgy TAVAEI/luJQ9Hieie3CrOYwZgNFmuNqX31huNJe+7qf6yXFAUSHCQCtOG4tstW/y97ns c82w== X-Gm-Message-State: AGi0PuYFSzUTanlX3LqHFvcXKYf3M7C2pkwihMm+GwLecHHpieHaqcnC JkVTlxxR/mCx0af9vMgiCwKrucgmvU0= X-Google-Smtp-Source: APiQypIfaCdX13/og2XgtUVLA6lXGUWAoN6Aka1uKq/4cMxBZvIzqKSqUx2Z3zDpURQQ0lfzXJsdYg== X-Received: by 2002:a2e:9850:: with SMTP id e16mr5772258ljj.163.1587739633667; Fri, 24 Apr 2020 07:47:13 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id o16sm4736336ljp.53.2020.04.24.07.47.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Apr 2020 07:47:12 -0700 (PDT) Subject: Re: svn commit: r360241 - head/sys/dev/ichiic To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head References: <202004240749.03O7nMSc066344@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABtB5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz6JAlQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryLkCDQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAYkCPAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <32586115-2c82-2497-ba4c-b3471887518d@FreeBSD.org> Date: Fri, 24 Apr 2020 17:47:11 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 497xpW6SJSz4Sln X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.196 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-2.01 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-1.00)[-0.996,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[196.208.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; IP_SCORE(-0.02)[ip: (0.78), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[196.208.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[96.151.72.93.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 14:47:16 -0000 On 24/04/2020 17:29, Warner Losh wrote: > > > On Fri, Apr 24, 2020 at 1:49 AM Andriy Gapon > wrote: > > Author: avg > Date: Fri Apr 24 07:49:21 2020 > New Revision: 360241 > URL: https://svnweb.freebsd.org/changeset/base/360241 > > Log: >   ig4: ensure that drivers always attach in correct order > >   Use DRIVER_MODULE_ORDERED(SI_ORDER_ANY) so that ig4's ACPI attachment >   happens after iicbus and acpi_iicbus drivers are registered. > >   I have seen a problem where iicbus attached under ig4 instead of >   acpi_iicbus when ig4.ko was loaded with kldload.  I believe that that >   happened because ig4 driver was a first driver to register, it attached >   and created an iicbus child.  Then iicbus driver was registered and, >   since it was the only driver that could attach to the iicbus child >   device, it did exactly that.  After that acpi_iicbus driver was >   registered.  It would be able to attach to the iicbus device, but it was >   already attached, so nothing happened. > > > Can you post more details of which devices are affected? From the description > and the patch, I don't see how this could fix things. I think I listed them all: ig4iic with acpi attachment, iicbus and acpi_iicbus. acpi \--- ig4iic \---- iicbus vs acpi_iicbus I tried to explain the problem and the fix in the commit message. If you want to discuss any specifics, let's continue with specifics. If there is anything unclear in my explanation, I can clarify, but I need to understand what needs to be clarified. >   MFC after:    2 weeks > > Modified: >   head/sys/dev/ichiic/ig4_acpi.c > > Modified: head/sys/dev/ichiic/ig4_acpi.c > ============================================================================== > --- head/sys/dev/ichiic/ig4_acpi.c      Fri Apr 24 05:05:58 2020        > (r360240) > +++ head/sys/dev/ichiic/ig4_acpi.c      Fri Apr 24 07:49:21 2020        > (r360241) > @@ -192,5 +192,6 @@ static driver_t ig4iic_acpi_driver = { >         sizeof(struct ig4iic_softc), >  }; > > -DRIVER_MODULE(ig4iic, acpi, ig4iic_acpi_driver, ig4iic_devclass, 0, 0); > +DRIVER_MODULE_ORDERED(ig4iic, acpi, ig4iic_acpi_driver, ig4iic_devclass, 0, 0, > +    SI_ORDER_ANY); >  MODULE_DEPEND(ig4iic, acpi, 1, 1, 1); > -- Andriy Gapon From owner-svn-src-all@freebsd.org Fri Apr 24 14:47:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C930C2B7A33; Fri, 24 Apr 2020 14:47:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497xqH52SVz4SvK; Fri, 24 Apr 2020 14:47:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A823D1F86D; Fri, 24 Apr 2020 14:47:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OEltEX025800; Fri, 24 Apr 2020 14:47:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OEltWD025798; Fri, 24 Apr 2020 14:47:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004241447.03OEltWD025798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Apr 2020 14:47:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360262 - stable/12/sys/dev/hwpmc X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/hwpmc X-SVN-Commit-Revision: 360262 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 14:47:55 -0000 Author: mav Date: Fri Apr 24 14:47:55 2020 New Revision: 360262 URL: https://svnweb.freebsd.org/changeset/base/360262 Log: MFC r354470 (by gallatin): hwpmc : fix AMD perf counter MSR access - amd_intr() does not account for the offset (0x200) in the counter MSR address and ends up accessing invalid regions while reading counter value after the 4th counter (0xC001000[8,9,..]) and erroneously updates the counter values for counters [1-4]. - amd_intr() should only check core pmcs for interrupts since other types of pmcs (L3,DF) cannot generate interrupts. - fix pmc NMI's being ignored due to NMI latency on newer AMD processors Note that this fixes a kernel panic due to GPFs accessing MSRs on higher core count AMD cpus (seen on both Rome 7502P, and Threadripper 2990WX 32-core CPUs) Modified: stable/12/sys/dev/hwpmc/hwpmc_amd.c stable/12/sys/dev/hwpmc/hwpmc_amd.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- stable/12/sys/dev/hwpmc/hwpmc_amd.c Fri Apr 24 14:27:23 2020 (r360261) +++ stable/12/sys/dev/hwpmc/hwpmc_amd.c Fri Apr 24 14:47:55 2020 (r360262) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -53,6 +54,10 @@ __FBSDID("$FreeBSD$"); enum pmc_class amd_pmc_class; #endif +#define OVERFLOW_WAIT_COUNT 50 + +DPCPU_DEFINE_STATIC(uint32_t, nmi_counter); + /* AMD K7 & K8 PMCs */ struct amd_descr { struct pmc_descr pm_descr; /* "base class" */ @@ -739,6 +744,7 @@ amd_stop_pmc(int cpu, int ri) struct pmc_hw *phw; const struct amd_descr *pd; uint64_t config; + int i; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); @@ -761,6 +767,21 @@ amd_stop_pmc(int cpu, int ri) /* turn off the PMC ENABLE bit */ config = pm->pm_md.pm_amd.pm_amd_evsel & ~AMD_PMC_ENABLE; wrmsr(pd->pm_evsel, config); + + /* + * Due to NMI latency on newer AMD processors + * NMI interrupts are ignored, which leads to + * panic or messages based on kernel configuraiton + */ + + /* Wait for the count to be reset */ + for (i = 0; i < OVERFLOW_WAIT_COUNT; i++) { + if (rdmsr(pd->pm_perfctr) & (1 << (pd->pm_descr.pd_width - 1))) + break; + + DELAY(1); + } + return 0; } @@ -779,6 +800,7 @@ amd_intr(struct trapframe *tf) struct pmc *pm; struct amd_cpu *pac; pmc_value_t v; + uint32_t active = 0, count = 0; cpu = curcpu; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -798,19 +820,21 @@ amd_intr(struct trapframe *tf) * * If found, we call a helper to process the interrupt. * - * If multiple PMCs interrupt at the same time, the AMD64 - * processor appears to deliver as many NMIs as there are - * outstanding PMC interrupts. So we process only one NMI - * interrupt at a time. + * PMCs interrupting at the same time are collapsed into + * a single interrupt. Check all the valid pmcs for + * overflow. */ - for (i = 0; retval == 0 && i < AMD_NPMCS; i++) { + for (i = 0; i < AMD_CORE_NPMCS; i++) { if ((pm = pac->pc_amdpmcs[i].phw_pmc) == NULL || !PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { continue; } + /* Consider pmc with valid handle as active */ + active++; + if (!AMD_PMC_HAS_OVERFLOWED(i)) continue; @@ -820,8 +844,8 @@ amd_intr(struct trapframe *tf) continue; /* Stop the PMC, reload count. */ - evsel = AMD_PMC_EVSEL_0 + i; - perfctr = AMD_PMC_PERFCTR_0 + i; + evsel = amd_pmcdesc[i].pm_evsel; + perfctr = amd_pmcdesc[i].pm_perfctr; v = pm->pm_sc.pm_reloadcount; config = rdmsr(evsel); @@ -837,6 +861,26 @@ amd_intr(struct trapframe *tf) error = pmc_process_interrupt(PMC_HR, pm, tf); if (error == 0) wrmsr(evsel, config); + } + + /* + * Due to NMI latency, there can be a scenario in which + * multiple pmcs gets serviced in an earlier NMI and we + * do not find an overflow in the subsequent NMI. + * + * For such cases we keep a per-cpu count of active NMIs + * and compare it with min(active pmcs, 2) to determine + * if this NMI was for a pmc overflow which was serviced + * in an earlier request or should be ignored. + */ + + if (retval) { + DPCPU_SET(nmi_counter, min(2, active)); + } else { + if ((count = DPCPU_GET(nmi_counter))) { + retval = 1; + DPCPU_SET(nmi_counter, --count); + } } if (retval) Modified: stable/12/sys/dev/hwpmc/hwpmc_amd.h ============================================================================== --- stable/12/sys/dev/hwpmc/hwpmc_amd.h Fri Apr 24 14:27:23 2020 (r360261) +++ stable/12/sys/dev/hwpmc/hwpmc_amd.h Fri Apr 24 14:47:55 2020 (r360262) @@ -76,6 +76,7 @@ #define AMD_PMC_PERFCTR_EP_DF_3 0xC0010247 #define AMD_NPMCS 16 +#define AMD_CORE_NPMCS 6 #define AMD_PMC_COUNTERMASK 0xFF000000 From owner-svn-src-all@freebsd.org Fri Apr 24 14:53:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A3232B7CDF; Fri, 24 Apr 2020 14:53:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497xyD0Gmxz4TK3; Fri, 24 Apr 2020 14:53:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 048B11FA3F; Fri, 24 Apr 2020 14:53:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OErttM031726; Fri, 24 Apr 2020 14:53:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OErtBg031725; Fri, 24 Apr 2020 14:53:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004241453.03OErtBg031725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 24 Apr 2020 14:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360263 - head/usr.sbin/bluetooth/hccontrol X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 360263 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 14:53:56 -0000 Author: hselasky Date: Fri Apr 24 14:53:55 2020 New Revision: 360263 URL: https://svnweb.freebsd.org/changeset/base/360263 Log: Rename two commands to match the Bluetooth specification in hccontrol(8). Fix some bad spelling while at it. Submitted by: Marc Veldman PR: 245868 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c Modified: head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c Fri Apr 24 14:47:55 2020 (r360262) +++ head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c Fri Apr 24 14:53:55 2020 (r360263) @@ -1491,7 +1491,7 @@ hci_write_page_scan_mode(int s, int argc, char **argv) } /* hci_write_page_scan_mode */ static int -hci_read_le_host_supported_command(int s, int argc, char **argv) +hci_read_le_host_support(int s, int argc, char **argv) { ng_hci_read_le_host_supported_rp rp; int n; @@ -1508,13 +1508,13 @@ hci_read_le_host_supported_command(int s, int argc, ch } fprintf(stdout, "LE Host support: %#02x\n", rp.le_supported_host); - fprintf(stdout, "Simulateneouse LE Host : %#02x\n", rp.simultaneous_le_host); + fprintf(stdout, "Simultaneous LE Host : %#02x\n", rp.simultaneous_le_host); return (OK); } static int -hci_write_le_host_supported_command(int s, int argc, char **argv) +hci_write_le_host_support(int s, int argc, char **argv) { ng_hci_write_le_host_supported_cp cp; ng_hci_write_le_host_supported_rp rp; @@ -1948,14 +1948,14 @@ struct hci_command host_controller_baseband_commands[] &hci_write_page_scan_mode }, { -"read_le_host_supported_command", \ -"Read if this host is in le supported mode and stimulatenouse le supported mode", -&hci_read_le_host_supported_command, +"read_le_host_support", \ +"Read if this host is in LE supported mode and simultaneous LE supported mode", +&hci_read_le_host_support, }, { -"write_le_host_supported_command", \ -"write_le_host_supported_command le_host[0|1] stimultajeous_le[0|1]", -&hci_write_le_host_supported_command, +"write_le_host_support", \ +"write_le_host_support le_host[0|1] simultaneous_le[0|1]", +&hci_write_le_host_support, }, { NULL, } From owner-svn-src-all@freebsd.org Fri Apr 24 15:02:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4C3C2B804C; Fri, 24 Apr 2020 15:02:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497y7f5JVVz4Tpq; Fri, 24 Apr 2020 15:02:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B16BE1FC0D; Fri, 24 Apr 2020 15:02:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OF269V038026; Fri, 24 Apr 2020 15:02:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OF26H4038024; Fri, 24 Apr 2020 15:02:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004241502.03OF26H4038024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Apr 2020 15:02:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360265 - in stable/12/sys: dev/hwpmc sys X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12/sys: dev/hwpmc sys X-SVN-Commit-Revision: 360265 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 15:02:06 -0000 Author: mav Date: Fri Apr 24 15:02:05 2020 New Revision: 360265 URL: https://svnweb.freebsd.org/changeset/base/360265 Log: MFC r359667 (by mw): Add hwpmc support for Intel Atom Goldmont microarchitecture Recognize new micro-architecture in hwpmc_intel driver. Based on Intel document 325462-071US. Tested with tools/test/hwpmc/pmctest.py on Atom E3930 SoC. Modified: stable/12/sys/dev/hwpmc/hwpmc_intel.c stable/12/sys/sys/pmc.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- stable/12/sys/dev/hwpmc/hwpmc_intel.c Fri Apr 24 14:55:07 2020 (r360264) +++ stable/12/sys/dev/hwpmc/hwpmc_intel.c Fri Apr 24 15:02:05 2020 (r360265) @@ -203,6 +203,10 @@ pmc_intel_initialize(void) cputype = PMC_CPU_INTEL_ATOM_SILVERMONT; nclasses = 3; break; + case 0x5C: /* Per Intel document 325462-071US 10/2019. */ + cputype = PMC_CPU_INTEL_ATOM_GOLDMONT; + nclasses = 3; + break; } break; } @@ -230,6 +234,7 @@ pmc_intel_initialize(void) */ case PMC_CPU_INTEL_ATOM: case PMC_CPU_INTEL_ATOM_SILVERMONT: + case PMC_CPU_INTEL_ATOM_GOLDMONT: case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_BROADWELL_XEON: case PMC_CPU_INTEL_SKYLAKE_XEON: @@ -293,6 +298,7 @@ pmc_intel_finalize(struct pmc_mdep *md) switch (md->pmd_cputype) { case PMC_CPU_INTEL_ATOM: case PMC_CPU_INTEL_ATOM_SILVERMONT: + case PMC_CPU_INTEL_ATOM_GOLDMONT: case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_BROADWELL_XEON: case PMC_CPU_INTEL_SKYLAKE_XEON: Modified: stable/12/sys/sys/pmc.h ============================================================================== --- stable/12/sys/sys/pmc.h Fri Apr 24 14:55:07 2020 (r360264) +++ stable/12/sys/sys/pmc.h Fri Apr 24 15:02:05 2020 (r360265) @@ -110,6 +110,7 @@ extern char pmc_cpuid[PMC_CPUID_LEN]; __PMC_CPU(INTEL_BROADWELL_XEON, 0x97, "Intel Broadwell Xeon") \ __PMC_CPU(INTEL_SKYLAKE, 0x98, "Intel Skylake") \ __PMC_CPU(INTEL_SKYLAKE_XEON, 0x99, "Intel Skylake Xeon") \ + __PMC_CPU(INTEL_ATOM_GOLDMONT, 0x9A, "Intel Atom Goldmont") \ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ From owner-svn-src-all@freebsd.org Fri Apr 24 15:09:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A1B392B820A; Fri, 24 Apr 2020 15:09:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497yJC3Z4jz4VKY; Fri, 24 Apr 2020 15:09:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 752091FC44; Fri, 24 Apr 2020 15:09:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OF9VXZ038510; Fri, 24 Apr 2020 15:09:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OF9VFk038509; Fri, 24 Apr 2020 15:09:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004241509.03OF9VFk038509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Apr 2020 15:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360266 - head/sys/dev/hwpmc X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/dev/hwpmc X-SVN-Commit-Revision: 360266 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 15:09:31 -0000 Author: mav Date: Fri Apr 24 15:09:30 2020 New Revision: 360266 URL: https://svnweb.freebsd.org/changeset/base/360266 Log: Add family 0x5F (Denverton) to PMC_CPU_INTEL_ATOM_GOLDMONT. According to the 325462-071US document, they should be the same. MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_intel.c Modified: head/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_intel.c Fri Apr 24 15:02:05 2020 (r360265) +++ head/sys/dev/hwpmc/hwpmc_intel.c Fri Apr 24 15:09:30 2020 (r360266) @@ -204,6 +204,7 @@ pmc_intel_initialize(void) nclasses = 3; break; case 0x5C: /* Per Intel document 325462-071US 10/2019. */ + case 0x5F: cputype = PMC_CPU_INTEL_ATOM_GOLDMONT; nclasses = 3; break; From owner-svn-src-all@freebsd.org Fri Apr 24 15:12:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0BAF2B8305 for ; Fri, 24 Apr 2020 15:12:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497yMB1vxfz4Vf0 for ; Fri, 24 Apr 2020 15:12:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x741.google.com with SMTP id s63so10466725qke.4 for ; Fri, 24 Apr 2020 08:12:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=42kiS6Dp06mBKrDgwNMYm6AYvLDx0Px0MXAWSx6mDkQ=; b=2FboUID5zUgxLwMSqyIHDNk7ZCbDfPqm7tjkCRvebdyUG1VG5DVyalIKxIU/bdX2VA 7oorT+NVJlZceTTYe70N62ELzNeKaiGSPNubOczB82V2HZCTZo2En+zbT4YfYbuPpnw3 FJ+PFPcLepkJR7ElYeHSxKeT55ql0xQwCB1aclOyFEhpRW6XkMJJLgjcJHMgJFjOJF0K vHvg8W8dbfyNa/jj/x7nknp1ls27BJj7hlORR0A1kjnAIOKN1ICAtBToVjPb54Og358Z nXDgrH6M5fPJgjNVLwMRM0YGe9cAkjxmmleVqK+oAw+NND1s7RxqYndu1dUwhX2sqjVP RIUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=42kiS6Dp06mBKrDgwNMYm6AYvLDx0Px0MXAWSx6mDkQ=; b=My+QeMP1wKMh10Upu7lF5icjBg4F1ncOnU9qB/Il/xrZs+BjO+5OVmfvruF0lMTGXR XwRJXj0RzJkn9+RKfAb0JYkuSOqxjqHg80FNSSeiRxpottWfD0z/2+pWFmbT46AqfZEu GZkLmRYvYY2zAQRdLpMcmCuAbAJ5N6ekUzCSF4zil2YRHHgaCDnsogWfCDXlxFH/sYQz 8qcvTj6l15RJTZBTo93flhzHY2zJOuCszDEzfYFQRLiWkm/yyzA90nsbBwQY6v2PLJgp ATf+1J9zNrbjvhNdGI8P2P/A+Y51vxpr1cCCkOtkkOFENtaOHD6Jgv8fG03LaCTVVSDy fpVQ== X-Gm-Message-State: AGi0Pua9JzFaHLuVFNWG/98ymTq84sdkTp/YhQSDVLtPQ3IB2lrCDBbo /pO11ZUeBG+xat4G63oXODsDRB08iFf6SMZHXjXhOA== X-Google-Smtp-Source: APiQypLzHhTzXZ9PBmxnyJzaApyCPrZI9HvqMrOiqapVvPxi3s+RkcomKpG92JQqMj1rgG9MqULCt8RAZ33V38oIEp8= X-Received: by 2002:a37:ac6:: with SMTP id 189mr9662212qkk.60.1587741123760; Fri, 24 Apr 2020 08:12:03 -0700 (PDT) MIME-Version: 1.0 References: <202004240749.03O7nMSc066344@repo.freebsd.org> <32586115-2c82-2497-ba4c-b3471887518d@FreeBSD.org> In-Reply-To: <32586115-2c82-2497-ba4c-b3471887518d@FreeBSD.org> From: Warner Losh Date: Fri, 24 Apr 2020 09:11:52 -0600 Message-ID: Subject: Re: svn commit: r360241 - head/sys/dev/ichiic To: Andriy Gapon , John Baldwin Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 497yMB1vxfz4Vf0 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=2FboUID5; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::741) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.13 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.984,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[1.4.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.16)[ip: (0.01), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 15:12:07 -0000 On Fri, Apr 24, 2020 at 8:47 AM Andriy Gapon wrote: > On 24/04/2020 17:29, Warner Losh wrote: > > > > > > On Fri, Apr 24, 2020 at 1:49 AM Andriy Gapon > > wrote: > > > > Author: avg > > Date: Fri Apr 24 07:49:21 2020 > > New Revision: 360241 > > URL: https://svnweb.freebsd.org/changeset/base/360241 > > > > Log: > > ig4: ensure that drivers always attach in correct order > > > > Use DRIVER_MODULE_ORDERED(SI_ORDER_ANY) so that ig4's ACPI > attachment > > happens after iicbus and acpi_iicbus drivers are registered. > > > > I have seen a problem where iicbus attached under ig4 instead of > > acpi_iicbus when ig4.ko was loaded with kldload. I believe that > that > > happened because ig4 driver was a first driver to register, it > attached > > and created an iicbus child. Then iicbus driver was registered > and, > > since it was the only driver that could attach to the iicbus child > > device, it did exactly that. After that acpi_iicbus driver was > > registered. It would be able to attach to the iicbus device, but > it was > > already attached, so nothing happened. > > > > > > Can you post more details of which devices are affected? From the > description > > and the patch, I don't see how this could fix things. > > I think I listed them all: ig4iic with acpi attachment, iicbus and > acpi_iicbus. > acpi > \--- ig4iic > \---- iicbus vs acpi_iicbus > > I tried to explain the problem and the fix in the commit message. If you > want > to discuss any specifics, let's continue with specifics. If there is > anything > unclear in my explanation, I can clarify, but I need to understand what > needs to > be clarified. > That won't fix the stated problem. If changing the module order fixes something, it's the wrong fix. Which is why I asked to make sure I understood the issue (it was unclear if it was at the level indicated, or for the children of the iicbus). iicbus returns BUS_PROBE_GENERIC (-100) from its probe routine, while acpi_iicbus returns BUS_PROBE_DEFAULT (-20). This means that acpi_iicbus should always win. So something else is going on. We don't specify order on other devices except for some weird, special needs drivers (this is not such a driver). Unless I'm mistaken, the real problem is that the following line is missing instead. MODULE_DEPEND(ig4iic, acpi_iicbus, 1, 1, 1); which makes the module dependencies explicit. Can you add that to ig4_acpi.c, revert your change and see if that works? It will ensure that the acpi_iicbus driver is loaded first. If things break because it isn't, it sounds like a hard dependency for ig4. Since we're already pulling in acpi, that doesn't seem unreasonable to me. Warner > > > MFC after: 2 weeks > > > > Modified: > > head/sys/dev/ichiic/ig4_acpi.c > > > > Modified: head/sys/dev/ichiic/ig4_acpi.c > > > ============================================================================== > > --- head/sys/dev/ichiic/ig4_acpi.c Fri Apr 24 05:05:58 2020 > > > (r360240) > > +++ head/sys/dev/ichiic/ig4_acpi.c Fri Apr 24 07:49:21 2020 > > > (r360241) > > @@ -192,5 +192,6 @@ static driver_t ig4iic_acpi_driver = { > > sizeof(struct ig4iic_softc), > > }; > > > > -DRIVER_MODULE(ig4iic, acpi, ig4iic_acpi_driver, ig4iic_devclass, 0, > 0); > > +DRIVER_MODULE_ORDERED(ig4iic, acpi, ig4iic_acpi_driver, > ig4iic_devclass, 0, 0, > > + SI_ORDER_ANY); > > MODULE_DEPEND(ig4iic, acpi, 1, 1, 1); > > > > > -- > Andriy Gapon > From owner-svn-src-all@freebsd.org Fri Apr 24 15:27:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8923D2B87A4; Fri, 24 Apr 2020 15:27:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497yjS36pQz4WTJ; Fri, 24 Apr 2020 15:27:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 666361FFEC; Fri, 24 Apr 2020 15:27:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OFRuSZ050721; Fri, 24 Apr 2020 15:27:56 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OFRuv5050720; Fri, 24 Apr 2020 15:27:56 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202004241527.03OFRuv5050720@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 24 Apr 2020 15:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360267 - stable/12/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/sys/netpfil/pf X-SVN-Commit-Revision: 360267 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 15:27:56 -0000 Author: kp Date: Fri Apr 24 15:27:55 2020 New Revision: 360267 URL: https://svnweb.freebsd.org/changeset/base/360267 Log: MFC r360042: pf: Do not allow negative ps_len in DIOCGETSTATES Userspace may pass a negative ps_len value to us, which causes an assertion failure in malloc(). Treat negative values as zero, i.e. return the required size. Reported-by: syzbot+53370d9d0358ee2a059a@syzkaller.appspotmail.com Modified: stable/12/sys/netpfil/pf/pf_ioctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- stable/12/sys/netpfil/pf/pf_ioctl.c Fri Apr 24 15:09:30 2020 (r360266) +++ stable/12/sys/netpfil/pf/pf_ioctl.c Fri Apr 24 15:27:55 2020 (r360267) @@ -2163,7 +2163,7 @@ relock_DIOCKILLSTATES: struct pfsync_state *pstore, *p; int i, nr; - if (ps->ps_len == 0) { + if (ps->ps_len <= 0) { nr = uma_zone_get_cur(V_pf_state_z); ps->ps_len = sizeof(struct pfsync_state) * nr; break; From owner-svn-src-all@freebsd.org Fri Apr 24 15:27:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ACEA22B87AE; Fri, 24 Apr 2020 15:27:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497yjT3vbVz4WTK; Fri, 24 Apr 2020 15:27:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 812D21FFED; Fri, 24 Apr 2020 15:27:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OFRvhr050764; Fri, 24 Apr 2020 15:27:57 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OFRv1s050763; Fri, 24 Apr 2020 15:27:57 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202004241527.03OFRv1s050763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 24 Apr 2020 15:27:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360268 - stable/11/sys/netpfil/pf X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/11/sys/netpfil/pf X-SVN-Commit-Revision: 360268 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 15:27:57 -0000 Author: kp Date: Fri Apr 24 15:27:56 2020 New Revision: 360268 URL: https://svnweb.freebsd.org/changeset/base/360268 Log: MFC r360042: pf: Do not allow negative ps_len in DIOCGETSTATES Userspace may pass a negative ps_len value to us, which causes an assertion failure in malloc(). Treat negative values as zero, i.e. return the required size. Reported-by: syzbot+53370d9d0358ee2a059a@syzkaller.appspotmail.com Modified: stable/11/sys/netpfil/pf/pf_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- stable/11/sys/netpfil/pf/pf_ioctl.c Fri Apr 24 15:27:55 2020 (r360267) +++ stable/11/sys/netpfil/pf/pf_ioctl.c Fri Apr 24 15:27:56 2020 (r360268) @@ -1759,7 +1759,7 @@ relock_DIOCKILLSTATES: struct pfsync_state *pstore, *p; int i, nr; - if (ps->ps_len == 0) { + if (ps->ps_len <= 0) { nr = uma_zone_get_cur(V_pf_state_z); ps->ps_len = sizeof(struct pfsync_state) * nr; break; From owner-svn-src-all@freebsd.org Fri Apr 24 16:05:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3674C2B9A16; Fri, 24 Apr 2020 16:05:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497zXv6zXyz4Z4d; Fri, 24 Apr 2020 16:05:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6721207BE; Fri, 24 Apr 2020 16:05:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OG5ZXl075735; Fri, 24 Apr 2020 16:05:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OG5Z5R075734; Fri, 24 Apr 2020 16:05:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004241605.03OG5Z5R075734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Apr 2020 16:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360269 - head/lib/libpmc/pmu-events/arch/x86 X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/lib/libpmc/pmu-events/arch/x86 X-SVN-Commit-Revision: 360269 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 16:05:36 -0000 Author: mav Date: Fri Apr 24 16:05:35 2020 New Revision: 360269 URL: https://svnweb.freebsd.org/changeset/base/360269 Log: Map family 0x5F (Denverton) to goldmont. According to the 325462-071US document, they should be the same. MFC after: 1 week Modified: head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Modified: head/lib/libpmc/pmu-events/arch/x86/mapfile.csv ============================================================================== --- head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Fri Apr 24 15:27:56 2020 (r360268) +++ head/lib/libpmc/pmu-events/arch/x86/mapfile.csv Fri Apr 24 16:05:35 2020 (r360269) @@ -9,6 +9,7 @@ GenuineIntel-6-27,v4,bonnell,core GenuineIntel-6-36,v4,bonnell,core GenuineIntel-6-35,v4,bonnell,core GenuineIntel-6-5C,v8,goldmont,core +GenuineIntel-6-5F,v8,goldmont,core GenuineIntel-6-7A,v1,goldmontplus,core GenuineIntel-6-3C,v24,haswell,core GenuineIntel-6-45,v24,haswell,core From owner-svn-src-all@freebsd.org Fri Apr 24 16:07:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57E5E2B9AE3; Fri, 24 Apr 2020 16:07:42 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497zbK3PqJz4ZJ7; Fri, 24 Apr 2020 16:07:41 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf1-f67.google.com with SMTP id m2so8123637lfo.6; Fri, 24 Apr 2020 09:07:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=6InkqwFP4H0NiNFR0K7iz9aXFXR2yuodPYg63Fb/MdA=; b=Srn8ov8E+A0wTViwzj8MsJK4iERbCR/+/CLqRtziw+OdjgcgpOlkOvpLk3gcmsoEP8 dtpUfZ/2CClEGq2ib7d1feHL9iP/ATlbfoVdWR9SXyjvYPEALaQjXbNORink2BSJGKd/ P2vv47T+0YgFNI8fBckX465+HaU+esYloypeaUbqpRKDCVC8Tez/chdJWxX6ZlhE1A06 6Bijwmf/GH7iBwk77oObHqWqUiusCNh/4BGxTY4Ci7XriXUMw3juHSHELpnESl1J/rlo XEXldIIynlZ4gSyigWkTJap0B3t19fmqX5ihfN2cCtik3aWZ9tMeg5tOVm0c1p4PTNUK myVw== X-Gm-Message-State: AGi0PuZsnNOEKSu8+7RmVf/EwLvbZfo4zlrOJvm+IC37oOFJt4zM628a oLm7+ZvNFD3HpoDooALLvH/c4D/K4dg= X-Google-Smtp-Source: APiQypKX2KNu6Su+WxsFGRjqPRnoO/+scc/rPcbnmq8gQsMZqTyiBCQMymRIVA1Srj2wY0igfz71dA== X-Received: by 2002:a19:7411:: with SMTP id v17mr6842688lfe.27.1587744458457; Fri, 24 Apr 2020 09:07:38 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id i3sm4511106ljg.82.2020.04.24.09.07.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Apr 2020 09:07:37 -0700 (PDT) Subject: Re: svn commit: r360241 - head/sys/dev/ichiic To: Warner Losh , John Baldwin Cc: src-committers , svn-src-all , svn-src-head References: <202004240749.03O7nMSc066344@repo.freebsd.org> <32586115-2c82-2497-ba4c-b3471887518d@FreeBSD.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABtB5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz6JAlQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryLkCDQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAYkCPAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <02449f05-6c43-9cb0-b427-34034a3c358f@FreeBSD.org> Date: Fri, 24 Apr 2020 19:07:35 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 497zbK3PqJz4ZJ7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.167.67 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-2.21 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[67.167.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; IP_SCORE(-0.22)[ip: (-0.22), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[67.167.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[96.151.72.93.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 16:07:42 -0000 On 24/04/2020 18:11, Warner Losh wrote: > > > On Fri, Apr 24, 2020 at 8:47 AM Andriy Gapon > wrote: > > On 24/04/2020 17:29, Warner Losh wrote: > > > > > > On Fri, Apr 24, 2020 at 1:49 AM Andriy Gapon > > >> wrote: > > > >     Author: avg > >     Date: Fri Apr 24 07:49:21 2020 > >     New Revision: 360241 > >     URL: https://svnweb.freebsd.org/changeset/base/360241 > > > >     Log: > >       ig4: ensure that drivers always attach in correct order > > > >       Use DRIVER_MODULE_ORDERED(SI_ORDER_ANY) so that ig4's ACPI attachment > >       happens after iicbus and acpi_iicbus drivers are registered. > > > >       I have seen a problem where iicbus attached under ig4 instead of > >       acpi_iicbus when ig4.ko was loaded with kldload.  I believe that that > >       happened because ig4 driver was a first driver to register, it attached > >       and created an iicbus child.  Then iicbus driver was registered and, > >       since it was the only driver that could attach to the iicbus child > >       device, it did exactly that.  After that acpi_iicbus driver was > >       registered.  It would be able to attach to the iicbus device, but it was > >       already attached, so nothing happened. > > > > > > Can you post more details of which devices are affected? From the description > > and the patch, I don't see how this could fix things. > > I think I listed them all: ig4iic with acpi attachment, iicbus and acpi_iicbus. > acpi >  \--- ig4iic >        \---- iicbus vs acpi_iicbus > > I tried to explain the problem and the fix in the commit message.  If you want > to discuss any specifics, let's continue with specifics.  If there is anything > unclear in my explanation, I can clarify, but I need to understand what needs to > be clarified. > > > That won't fix the stated problem. It will. It does. You made me write an essay to explain why :) > If changing the module order fixes something, > it's the wrong fix. Which is why I asked to make sure I understood the issue (it > was unclear if it was at the level indicated, or for the children of the iicbus). > > iicbus returns BUS_PROBE_GENERIC (-100) from its probe routine, while > acpi_iicbus returns BUS_PROBE_DEFAULT (-20). This means that acpi_iicbus should > always win. So something else is going on. We don't specify order on other > devices except for some weird, special needs drivers (this is not such a driver). This driver, along with all of other I2C controller drivers, has a particular quirk, so it can be called weird. It does not matter what the probe routines return if one of the drivers is not added to "newbus" at all (even if its code is loaded). Its probe method is not executed. And that's what I tried to explain in the commit message. Now, why this driver as well as all SMBus and I2C controller drivers are somewhat weird... There is a multitude of drivers for SMBus and I2C controllers. Those drivers have different names. So, using newbus speak, smbus and iicbus drivers can attach to [newbus] devices under many different [newbus] buses. For that reason, the corresponding DRIVER_MODULE declarations are not consolidated in smbus.c and iicbus.c; instead, they are spread over individual controller drivers. So, loading of smbus or iicbus module does not result in a call to devclass_add_driver() that would register these drivers under some bus. And that's an unusual thing comparing to the most straightforward drivers. Let's use ig4 as an example. Across its source files we had the following DRIVER_MODULE declarations: DRIVER_MODULE(ig4iic, acpi, ... -- in ig4_acpi.c DRIVER_MODULE(iicbus, ig4iic, ... -- in ig4_iic.c DRIVER_MODULE(acpi_iicbus, ig4iic, ... -- in ig4_iic.c The first one is needed to register ig4iic driver under acpi bus. Other two are needed to register iicbus and acpi_iicbus drivers under ig4iic bus. The order is not explicitly defined, so the corresponding declaration can be processed in any order when ig4.ko is loaded and so the corresponding devclass_add_driver() can be called in any order. So, I observed in practice the scenario where the drivers were added in the written order. First, ig4iic was added under acpi, it found the corresponding device, probed and attached to it. In its attach method it added a new device named "iicbus" as a child. Then, iicbus driver was added under ig4iic bus. That driver found the child device and attached to it. Only then acpi_iicbus was added and it was too late to the party. So, this is really about an order in which DRIVER_MODULE-s (which translate to sysinit-s) _within a kld_ are processed. Essentially, about an order of objects in the corresponding section of a loadable ELF object. MODULE_DEPEND does not affect that order. Just as an aside, for a contrast, gpiobus uses a different model. There, all controller drivers must have "gpio" as their driver names (driver->name). So, a single DRIVER_MODULE(gpiobus, gpio, ...) in the gpiobus.c code is sufficient for gpiobus driver to be added under all controllers. And that registration always happens before a controller driver is added because of MODULE_DEPEND between it and gpiobus. > Unless I'm mistaken, the real problem is that the following line is missing instead. > MODULE_DEPEND(ig4iic, acpi_iicbus, 1, 1, 1); > which makes the module dependencies explicit. Can you add that to ig4_acpi.c, > revert your change and see if that works? It will ensure that the acpi_iicbus > driver is loaded first. If things break because it isn't, it sounds like a hard > dependency for ig4. Since we're already pulling in acpi, that doesn't seem > unreasonable to me. Just for clarity, acpi_iicbus is compiled into iicbus.ko (on relevant platforms, of course), same as iicbus. It's not a separate kld. -- Andriy Gapon From owner-svn-src-all@freebsd.org Fri Apr 24 16:19:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44D062B9F7B; Fri, 24 Apr 2020 16:19:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497zrS0hSkz4b3B; Fri, 24 Apr 2020 16:19:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 12701209BA; Fri, 24 Apr 2020 16:19:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OGJ4wA082440; Fri, 24 Apr 2020 16:19:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OGJ3Nf082434; Fri, 24 Apr 2020 16:19:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004241619.03OGJ3Nf082434@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Apr 2020 16:19:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360270 - in stable/12/lib/libpmc/pmu-events/arch/x86: . bonnell broadwell broadwellde broadwellx cascadelakex goldmont goldmontplus haswell haswellx icelake ivybridge ivytown jaketown ... X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12/lib/libpmc/pmu-events/arch/x86: . bonnell broadwell broadwellde broadwellx cascadelakex goldmont goldmontplus haswell haswellx icelake ivybridge ivytown jaketown knightslanding sandybridg... X-SVN-Commit-Revision: 360270 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 16:19:04 -0000 Author: mav Date: Fri Apr 24 16:19:03 2020 New Revision: 360270 URL: https://svnweb.freebsd.org/changeset/base/360270 Log: MFC r359622 (by mmacy): Update x86 counters Added: stable/12/lib/libpmc/pmu-events/arch/x86/cascadelakex/ - copied from r359622, head/lib/libpmc/pmu-events/arch/x86/cascadelakex/ stable/12/lib/libpmc/pmu-events/arch/x86/icelake/ - copied from r359622, head/lib/libpmc/pmu-events/arch/x86/icelake/ stable/12/lib/libpmc/pmu-events/arch/x86/silvermont/other.json - copied unchanged from r359622, head/lib/libpmc/pmu-events/arch/x86/silvermont/other.json stable/12/lib/libpmc/pmu-events/arch/x86/tremontx/ - copied from r359622, head/lib/libpmc/pmu-events/arch/x86/tremontx/ Modified: stable/12/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json stable/12/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwell/floating-point.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwell/frontend.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwell/memory.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwell/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwellde/bdwde-metrics.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwellde/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwellx/bdx-metrics.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwellx/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwellx/floating-point.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwellx/memory.json stable/12/lib/libpmc/pmu-events/arch/x86/broadwellx/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/goldmont/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/goldmont/memory.json stable/12/lib/libpmc/pmu-events/arch/x86/goldmont/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/goldmont/virtual-memory.json stable/12/lib/libpmc/pmu-events/arch/x86/goldmontplus/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/goldmontplus/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/goldmontplus/virtual-memory.json stable/12/lib/libpmc/pmu-events/arch/x86/haswell/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/haswell/floating-point.json stable/12/lib/libpmc/pmu-events/arch/x86/haswell/hsw-metrics.json stable/12/lib/libpmc/pmu-events/arch/x86/haswell/memory.json stable/12/lib/libpmc/pmu-events/arch/x86/haswell/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/haswellx/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/haswellx/hsx-metrics.json stable/12/lib/libpmc/pmu-events/arch/x86/haswellx/memory.json stable/12/lib/libpmc/pmu-events/arch/x86/haswellx/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/ivybridge/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/ivybridge/ivb-metrics.json stable/12/lib/libpmc/pmu-events/arch/x86/ivybridge/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/ivytown/ivt-metrics.json stable/12/lib/libpmc/pmu-events/arch/x86/ivytown/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/ivytown/uncore-power.json stable/12/lib/libpmc/pmu-events/arch/x86/jaketown/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/jaketown/jkt-metrics.json stable/12/lib/libpmc/pmu-events/arch/x86/jaketown/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/jaketown/uncore-power.json stable/12/lib/libpmc/pmu-events/arch/x86/knightslanding/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/knightslanding/memory.json stable/12/lib/libpmc/pmu-events/arch/x86/knightslanding/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/knightslanding/virtual-memory.json stable/12/lib/libpmc/pmu-events/arch/x86/mapfile.csv stable/12/lib/libpmc/pmu-events/arch/x86/sandybridge/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/sandybridge/floating-point.json stable/12/lib/libpmc/pmu-events/arch/x86/sandybridge/frontend.json stable/12/lib/libpmc/pmu-events/arch/x86/sandybridge/memory.json stable/12/lib/libpmc/pmu-events/arch/x86/sandybridge/other.json stable/12/lib/libpmc/pmu-events/arch/x86/sandybridge/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/sandybridge/snb-metrics.json stable/12/lib/libpmc/pmu-events/arch/x86/sandybridge/virtual-memory.json stable/12/lib/libpmc/pmu-events/arch/x86/silvermont/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/silvermont/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/skylake/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/skylake/frontend.json stable/12/lib/libpmc/pmu-events/arch/x86/skylake/memory.json stable/12/lib/libpmc/pmu-events/arch/x86/skylake/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/skylake/skl-metrics.json stable/12/lib/libpmc/pmu-events/arch/x86/skylakex/cache.json stable/12/lib/libpmc/pmu-events/arch/x86/skylakex/floating-point.json stable/12/lib/libpmc/pmu-events/arch/x86/skylakex/frontend.json stable/12/lib/libpmc/pmu-events/arch/x86/skylakex/memory.json stable/12/lib/libpmc/pmu-events/arch/x86/skylakex/pipeline.json stable/12/lib/libpmc/pmu-events/arch/x86/skylakex/skx-metrics.json stable/12/lib/libpmc/pmu-events/arch/x86/skylakex/uncore-other.json Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json ============================================================================== --- stable/12/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json Fri Apr 24 16:05:35 2020 (r360269) +++ stable/12/lib/libpmc/pmu-events/arch/x86/bonnell/frontend.json Fri Apr 24 16:19:03 2020 (r360270) @@ -77,7 +77,7 @@ "UMask": "0x1", "EventName": "UOPS.MS_CYCLES", "SampleAfterValue": "2000000", - "BriefDescription": "This event counts the cycles where 1 or more uops are issued by the micro-sequencer (MS), including microcode assists and inserted flows, and written to the IQ. ", + "BriefDescription": "This event counts the cycles where 1 or more uops are issued by the micro-sequencer (MS), including microcode assists and inserted flows, and written to the IQ.", "CounterMask": "1" } ] \ No newline at end of file Modified: stable/12/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json ============================================================================== --- stable/12/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json Fri Apr 24 16:05:35 2020 (r360269) +++ stable/12/lib/libpmc/pmu-events/arch/x86/bonnell/pipeline.json Fri Apr 24 16:19:03 2020 (r360270) @@ -189,7 +189,7 @@ "UMask": "0x8", "EventName": "BR_MISSP_TYPE_RETIRED.IND_CALL", "SampleAfterValue": "200000", - "BriefDescription": "Mispredicted indirect calls, including both register and memory indirect. " + "BriefDescription": "Mispredicted indirect calls, including both register and memory indirect." }, { "EventCode": "0x89", Modified: stable/12/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json ============================================================================== --- stable/12/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json Fri Apr 24 16:05:35 2020 (r360269) +++ stable/12/lib/libpmc/pmu-events/arch/x86/broadwell/bdw-metrics.json Fri Apr 24 16:19:03 2020 (r360270) @@ -1,6 +1,62 @@ [ { - "BriefDescription": "Instructions Per Cycle (per logical thread)", + "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend", + "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / (4 * cycles)", + "MetricGroup": "TopdownL1", + "MetricName": "Frontend_Bound", + "PublicDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend. Frontend denotes the first part of the processor core responsible to fetch operations that are executed later on by the Backend part. Within the Frontend; a branch predictor predicts the next address to fetch; cache-lines are fetched from the memory subsystem; parsed into instructions; and lastly decoded into micro-ops (uops). Ideally the Frontend can issue 4 uops every cycle to the Backend. Frontend Bound denotes unutilized issue-slots when there is no Backend stall; i.e. bubbles where Frontend delivered no uops while Backend could have accepted them. For example; stalls due to instruction-cache misses would be categorized under Frontend Bound." + }, + { + "BriefDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend. SMT version; use when SMT is enabled and measuring per logical CPU.", + "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))", + "MetricGroup": "TopdownL1_SMT", + "MetricName": "Frontend_Bound_SMT", + "PublicDescription": "This category represents fraction of slots where the processor's Frontend undersupplies its Backend. Frontend denotes the first part of the processor core responsible to fetch operations that are executed later on by the Backend part. Within the Frontend; a branch predictor predicts the next address to fetch; cache-lines are fetched from the memory subsystem; parsed into instructions; and lastly decoded into micro-ops (uops). Ideally the Frontend can issue 4 uops every cycle to the Backend. Frontend Bound denotes unutilized issue-slots when there is no Backend stall; i.e. bubbles where Frontend delivered no uops while Backend could have accepted them. For example; stalls due to instruction-cache misses would be categorized under Frontend Bound. SMT version; use when SMT is enabled and measuring per logical CPU." + }, + { + "BriefDescription": "This category represents fraction of slots wasted due to incorrect speculations", + "MetricExpr": "( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles)", + "MetricGroup": "TopdownL1", + "MetricName": "Bad_Speculation", + "PublicDescription": "This category represents fraction of slots wasted due to incorrect speculations. This include slots used to issue uops that do not eventually get retired and slots for which the issue-pipeline was blocked due to recovery from earlier incorrect speculation. For example; wasted work due to miss-predicted branches are categorized under Bad Speculation category. Incorrect data speculation followed by Memory Ordering Nukes is another example." + }, + { + "BriefDescription": "This category represents fraction of slots wasted due to incorrect speculations. SMT version; use when SMT is enabled and measuring per logical CPU.", + "MetricExpr": "( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (( INT_MISC.RECOVERY_CYCLES_ANY / 2 )) ) / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))", + "MetricGroup": "TopdownL1_SMT", + "MetricName": "Bad_Speculation_SMT", + "PublicDescription": "This category represents fraction of slots wasted due to incorrect speculations. This include slots used to issue uops that do not eventually get retired and slots for which the issue-pipeline was blocked due to recovery from earlier incorrect speculation. For example; wasted work due to miss-predicted branches are categorized under Bad Speculation category. Incorrect data speculation followed by Memory Ordering Nukes is another example. SMT version; use when SMT is enabled and measuring per logical CPU." + }, + { + "BriefDescription": "This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend", + "MetricExpr": "1 - ( (IDQ_UOPS_NOT_DELIVERED.CORE / (4 * cycles)) + (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles)) + (UOPS_RETIRED.RETIRE_SLOTS / (4 * cycles)) )", + "MetricGroup": "TopdownL1", + "MetricName": "Backend_Bound", + "PublicDescription": "This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend. Backend is the portion of the processor core where the out-of-order scheduler dispatches ready uops into their respective execution units; and once completed these uops get retired according to program order. For example; stalls due to data-cache misses or stalls due to the divider unit being overloaded are both categorized under Backend Bound. Backend Bound is further divided into two main categories: Memory Bound and Core Bound." + }, + { + "BriefDescription": "This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend. SMT version; use when SMT is enabled and measuring per logical CPU.", + "MetricExpr": "1 - ( (IDQ_UOPS_NOT_DELIVERED.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) + (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (( INT_MISC.RECOVERY_CYCLES_ANY / 2 )) ) / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) + (UOPS_RETIRED.RETIRE_SLOTS / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) )", + "MetricGroup": "TopdownL1_SMT", + "MetricName": "Backend_Bound_SMT", + "PublicDescription": "This category represents fraction of slots where no uops are being delivered due to a lack of required resources for accepting new uops in the Backend. Backend is the portion of the processor core where the out-of-order scheduler dispatches ready uops into their respective execution units; and once completed these uops get retired according to program order. For example; stalls due to data-cache misses or stalls due to the divider unit being overloaded are both categorized under Backend Bound. Backend Bound is further divided into two main categories: Memory Bound and Core Bound. SMT version; use when SMT is enabled and measuring per logical CPU." + }, + { + "BriefDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / (4 * cycles)", + "MetricGroup": "TopdownL1", + "MetricName": "Retiring", + "PublicDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired. Ideally; all pipeline slots would be attributed to the Retiring category. Retiring of 100% would indicate the maximum 4 uops retired per cycle has been achieved. Maximizing Retiring typically increases the Instruction-Per-Cycle metric. Note that a high Retiring value does not necessary mean there is no room for more performance. For example; Microcode assists are categorized under Retiring. They hurt performance and can often be avoided. " + }, + { + "BriefDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired. SMT version; use when SMT is enabled and measuring per logical CPU.", + "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))", + "MetricGroup": "TopdownL1_SMT", + "MetricName": "Retiring_SMT", + "PublicDescription": "This category represents fraction of slots utilized by useful work i.e. issued uops that eventually get retired. Ideally; all pipeline slots would be attributed to the Retiring category. Retiring of 100% would indicate the maximum 4 uops retired per cycle has been achieved. Maximizing Retiring typically increases the Instruction-Per-Cycle metric. Note that a high Retiring value does not necessary mean there is no room for more performance. For example; Microcode assists are categorized under Retiring. They hurt performance and can often be avoided. SMT version; use when SMT is enabled and measuring per logical CPU." + }, + { + "BriefDescription": "Instructions Per Cycle (per Logical Processor)", "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD", "MetricGroup": "TopDownL1", "MetricName": "IPC" @@ -8,40 +64,82 @@ { "BriefDescription": "Uops Per Instruction", "MetricExpr": "UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY", - "MetricGroup": "Pipeline", + "MetricGroup": "Pipeline;Retire", "MetricName": "UPI" }, { - "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions", + "BriefDescription": "Instruction per taken branch", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_TAKEN", + "MetricGroup": "Branches;Fetch_BW;PGO", + "MetricName": "IpTB" + }, + { + "BriefDescription": "Branch instructions per taken branch. ", + "MetricExpr": "BR_INST_RETIRED.ALL_BRANCHES / BR_INST_RETIRED.NEAR_TAKEN", + "MetricGroup": "Branches;PGO", + "MetricName": "BpTB" + }, + { + "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely (includes speculatively fetches) consumed by program instructions", "MetricExpr": "min( 1 , IDQ.MITE_UOPS / ( (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY) * 16 * ( ICACHE.HIT + ICACHE.MISSES ) / 4.0 ) )", - "MetricGroup": "Frontend", + "MetricGroup": "PGO;IcMiss", "MetricName": "IFetch_Line_Utilization" }, { - "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)", - "MetricExpr": "IDQ.DSB_UOPS / ( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS )", - "MetricGroup": "DSB; Frontend_Bandwidth", + "BriefDescription": "Fraction of Uops delivered by the DSB (aka Decoded ICache; or Uop Cache)", + "MetricExpr": "IDQ.DSB_UOPS / (( IDQ.DSB_UOPS + LSD.UOPS + IDQ.MITE_UOPS + IDQ.MS_UOPS ) )", + "MetricGroup": "DSB;Fetch_BW", "MetricName": "DSB_Coverage" }, { - "BriefDescription": "Cycles Per Instruction (threaded)", + "BriefDescription": "Cycles Per Instruction (per Logical Processor)", "MetricExpr": "1 / (INST_RETIRED.ANY / cycles)", "MetricGroup": "Pipeline;Summary", "MetricName": "CPI" }, { - "BriefDescription": "Per-thread actual clocks when the logical processor is active. This is called 'Clockticks' in VTune.", + "BriefDescription": "Per-Logical Processor actual clocks when the Logical Processor is active.", "MetricExpr": "CPU_CLK_UNHALTED.THREAD", "MetricGroup": "Summary", "MetricName": "CLKS" }, { - "BriefDescription": "Total issue-pipeline slots", - "MetricExpr": "4*(( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)", + "BriefDescription": "Total issue-pipeline slots (per-Physical Core)", + "MetricExpr": "4 * cycles", "MetricGroup": "TopDownL1", "MetricName": "SLOTS" }, { + "BriefDescription": "Total issue-pipeline slots (per-Physical Core)", + "MetricExpr": "4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))", + "MetricGroup": "TopDownL1_SMT", + "MetricName": "SLOTS_SMT" + }, + { + "BriefDescription": "Instructions per Load (lower number means higher occurance rate)", + "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_LOADS", + "MetricGroup": "Instruction_Type", + "MetricName": "IpL" + }, + { + "BriefDescription": "Instructions per Store (lower number means higher occurance rate)", + "MetricExpr": "INST_RETIRED.ANY / MEM_UOPS_RETIRED.ALL_STORES", + "MetricGroup": "Instruction_Type", + "MetricName": "IpS" + }, + { + "BriefDescription": "Instructions per Branch (lower number means higher occurance rate)", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.ALL_BRANCHES", + "MetricGroup": "Branches;Instruction_Type", + "MetricName": "IpB" + }, + { + "BriefDescription": "Instruction per (near) call (lower number means higher occurance rate)", + "MetricExpr": "INST_RETIRED.ANY / BR_INST_RETIRED.NEAR_CALL", + "MetricGroup": "Branches", + "MetricName": "IpCall" + }, + { "BriefDescription": "Total number of retired Instructions", "MetricExpr": "INST_RETIRED.ANY", "MetricGroup": "Summary", @@ -49,47 +147,131 @@ }, { "BriefDescription": "Instructions Per Cycle (per physical core)", - "MetricExpr": "INST_RETIRED.ANY / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)", + "MetricExpr": "INST_RETIRED.ANY / cycles", "MetricGroup": "SMT", "MetricName": "CoreIPC" }, { + "BriefDescription": "Instructions Per Cycle (per physical core)", + "MetricExpr": "INST_RETIRED.ANY / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))", + "MetricGroup": "SMT", + "MetricName": "CoreIPC_SMT" + }, + { + "BriefDescription": "Floating Point Operations Per Cycle", + "MetricExpr": "(( 1 * ( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2 * FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4 * ( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8 * FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / cycles", + "MetricGroup": "FLOPS", + "MetricName": "FLOPc" + }, + { + "BriefDescription": "Floating Point Operations Per Cycle", + "MetricExpr": "(( 1 * ( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2 * FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4 * ( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8 * FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))", + "MetricGroup": "FLOPS_SMT", + "MetricName": "FLOPc_SMT" + }, + { "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)", - "MetricExpr": "UOPS_EXECUTED.THREAD / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2) if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)", - "MetricGroup": "Pipeline;Ports_Utilization", + "MetricExpr": "UOPS_EXECUTED.THREAD / (( cpu@UOPS_EXECUTED.CORE\\,cmask\\=1@ / 2 ) if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC)", + "MetricGroup": "Pipeline", "MetricName": "ILP" }, { - "BriefDescription": "Average Branch Address Clear Cost (fraction of cycles)", - "MetricExpr": "2* (( RS_EVENTS.EMPTY_CYCLES - ICACHE.IFDATA_STALL - (( 14 * ITLB_MISSES.STLB_HIT + cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + 7* ITLB_MISSES.WALK_COMPLETED )) ) / RS_EVENTS.EMPTY_END)", - "MetricGroup": "Unknown_Branches", - "MetricName": "BAClear_Cost" + "BriefDescription": "Branch Misprediction Cost: Fraction of TopDown slots wasted per non-speculative branch misprediction (jeclear)", + "MetricExpr": "( ((BR_MISP_RETIRED.ALL_BRANCHES / ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT )) * (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * INT_MISC.RECOVERY_CYCLES ) / (4 * cycles))) + (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * cycles)) * (12 * ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY ) / cycles) / (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * cycles)) ) * (4 * cycles) / BR_MISP_RETIRED.ALL_BRANCHES", + "MetricGroup": "BrMispredicts", + "MetricName": "Branch_Misprediction_Cost" }, { - "BriefDescription": "Core actual clocks when any thread is active on the physical core", - "MetricExpr": "( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD", + "BriefDescription": "Branch Misprediction Cost: Fraction of TopDown slots wasted per non-speculative branch misprediction (jeclear)", + "MetricExpr": "( ((BR_MISP_RETIRED.ALL_BRANCHES / ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT )) * (( UOPS_ISSUED.ANY - UOPS_RETIRED.RETIRE_SLOTS + 4 * (( INT_MISC.RECOVERY_CYCLES_ANY / 2 )) ) / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))))) + (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) * (12 * ( BR_MISP_RETIRED.ALL_BRANCHES + MACHINE_CLEARS.COUNT + BACLEARS.ANY ) / cycles) / (4 * IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE / (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )))) ) * (4 * (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))) / BR_MISP_RETIRED.ALL_BRANCHES", + "MetricGroup": "BrMispredicts_SMT", + "MetricName": "Branch_Misprediction_Cost_SMT" + }, + { + "BriefDescription": "Number of Instructions per non-speculative Branch Misprediction (JEClear)", + "MetricExpr": "INST_RETIRED.ANY / BR_MISP_RETIRED.ALL_BRANCHES", + "MetricGroup": "BrMispredicts", + "MetricName": "IpMispredict" + }, + { + "BriefDescription": "Core actual clocks when any Logical Processor is active on the Physical Core", + "MetricExpr": "( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) )", "MetricGroup": "SMT", "MetricName": "CORE_CLKS" }, { - "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads", + "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads (in core cycles)", "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_UOPS_RETIRED.L1_MISS + mem_load_uops_retired.hit_lfb )", "MetricGroup": "Memory_Bound;Memory_Lat", "MetricName": "Load_Miss_Real_Latency" }, { - "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)", - "MetricExpr": "L1D_PEND_MISS.PENDING / (( cpu@l1d_pend_miss.pending_cycles\\,any\\=1@ / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES)", + "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least one such miss. Per-Logical Processor)", + "MetricExpr": "L1D_PEND_MISS.PENDING / L1D_PEND_MISS.PENDING_CYCLES", "MetricGroup": "Memory_Bound;Memory_BW", "MetricName": "MLP" }, { "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses", - "MetricExpr": "( cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\,cmask\\=1@ + 7*(DTLB_STORE_MISSES.WALK_COMPLETED+DTLB_LOAD_MISSES.WALK_COMPLETED+ITLB_MISSES.WALK_COMPLETED)) / (( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles)", + "MetricExpr": "( cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\,cmask\\=1@ + 7 * ( DTLB_STORE_MISSES.WALK_COMPLETED + DTLB_LOAD_MISSES.WALK_COMPLETED + ITLB_MISSES.WALK_COMPLETED ) ) / cycles", "MetricGroup": "TLB", "MetricName": "Page_Walks_Utilization" }, { + "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses", + "MetricExpr": "( cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\,cmask\\=1@ + 7 * ( DTLB_STORE_MISSES.WALK_COMPLETED + DTLB_LOAD_MISSES.WALK_COMPLETED + ITLB_MISSES.WALK_COMPLETED ) ) / (( ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ))", + "MetricGroup": "TLB_SMT", + "MetricName": "Page_Walks_Utilization_SMT" + }, + { + "BriefDescription": "Average data fill bandwidth to the L1 data cache [GB / sec]", + "MetricExpr": "64 * L1D.REPLACEMENT / 1000000000 / duration_time", + "MetricGroup": "Memory_BW", + "MetricName": "L1D_Cache_Fill_BW" + }, + { + "BriefDescription": "Average data fill bandwidth to the L2 cache [GB / sec]", + "MetricExpr": "64 * L2_LINES_IN.ALL / 1000000000 / duration_time", + "MetricGroup": "Memory_BW", + "MetricName": "L2_Cache_Fill_BW" + }, + { + "BriefDescription": "Average per-core data fill bandwidth to the L3 cache [GB / sec]", + "MetricExpr": "64 * LONGEST_LAT_CACHE.MISS / 1000000000 / duration_time", + "MetricGroup": "Memory_BW", + "MetricName": "L3_Cache_Fill_BW" + }, + { + "BriefDescription": "L1 cache true misses per kilo instruction for retired demand loads", + "MetricExpr": "1000 * MEM_LOAD_UOPS_RETIRED.L1_MISS / INST_RETIRED.ANY", + "MetricGroup": "Cache_Misses", + "MetricName": "L1MPKI" + }, + { + "BriefDescription": "L2 cache true misses per kilo instruction for retired demand loads", + "MetricExpr": "1000 * MEM_LOAD_UOPS_RETIRED.L2_MISS / INST_RETIRED.ANY", + "MetricGroup": "Cache_Misses", + "MetricName": "L2MPKI" + }, + { + "BriefDescription": "L2 cache misses per kilo instruction for all request types (including speculative)", + "MetricExpr": "1000 * L2_RQSTS.MISS / INST_RETIRED.ANY", + "MetricGroup": "Cache_Misses", + "MetricName": "L2MPKI_All" + }, + { + "BriefDescription": "L2 cache hits per kilo instruction for all request types (including speculative)", + "MetricExpr": "1000 * ( L2_RQSTS.REFERENCES - L2_RQSTS.MISS ) / INST_RETIRED.ANY", + "MetricGroup": "Cache_Misses", + "MetricName": "L2HPKI_All" + }, + { + "BriefDescription": "L3 cache true misses per kilo instruction for retired demand loads", + "MetricExpr": "1000 * MEM_LOAD_UOPS_RETIRED.L3_MISS / INST_RETIRED.ANY", + "MetricGroup": "Cache_Misses", + "MetricName": "L3MPKI" + }, + { "BriefDescription": "Average CPU Utilization", "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC / msr@tsc@", "MetricGroup": "Summary", @@ -97,7 +279,7 @@ }, { "BriefDescription": "Giga Floating Point Operations Per Second", - "MetricExpr": "(( 1*( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2* FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4*( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8* FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / 1000000000 / duration_time", + "MetricExpr": "( (( 1 * ( FP_ARITH_INST_RETIRED.SCALAR_SINGLE + FP_ARITH_INST_RETIRED.SCALAR_DOUBLE ) + 2 * FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE + 4 * ( FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE + FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE ) + 8 * FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE )) / 1000000000 ) / duration_time", "MetricGroup": "FLOPS;Summary", "MetricName": "GFLOPs" }, @@ -108,16 +290,22 @@ "MetricName": "Turbo_Utilization" }, { - "BriefDescription": "Fraction of cycles where both hardware threads were active", + "BriefDescription": "Fraction of cycles where both hardware Logical Processors were active", "MetricExpr": "1 - CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE / ( CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY / 2 ) if #SMT_on else 0", "MetricGroup": "SMT;Summary", "MetricName": "SMT_2T_Utilization" }, { "BriefDescription": "Fraction of cycles spent in Kernel mode", - "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:u / CPU_CLK_UNHALTED.REF_TSC", + "MetricExpr": "CPU_CLK_UNHALTED.REF_TSC:k / CPU_CLK_UNHALTED.REF_TSC", "MetricGroup": "Summary", "MetricName": "Kernel_Utilization" + }, + { + "BriefDescription": "Average external Memory Bandwidth Use for reads and writes [GB / sec]", + "MetricExpr": "64 * ( arb@event\\=0x81\\,umask\\=0x1@ + arb@event\\=0x84\\,umask\\=0x1@ ) / 1000000 / duration_time / 1000", + "MetricGroup": "Memory_BW", + "MetricName": "DRAM_BW_Use" }, { "BriefDescription": "C3 residency percent per core", Modified: stable/12/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json ============================================================================== --- stable/12/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json Fri Apr 24 16:05:35 2020 (r360269) +++ stable/12/lib/libpmc/pmu-events/arch/x86/broadwell/cache.json Fri Apr 24 16:19:03 2020 (r360270) @@ -56,10 +56,10 @@ "CounterHTOff": "0,1,2,3,4,5,6,7" }, { - "PublicDescription": "This event counts the number of demand Data Read requests that hit L2 cache. Only not rejected loads are counted.", + "PublicDescription": "Counts the number of demand Data Read requests, initiated by load instructions, that hit L2 cache.", "EventCode": "0x24", "Counter": "0,1,2,3", - "UMask": "0x41", + "UMask": "0xc1", "EventName": "L2_RQSTS.DEMAND_DATA_RD_HIT", "SampleAfterValue": "200003", "BriefDescription": "Demand Data Read requests that hit L2 cache", @@ -68,7 +68,7 @@ { "EventCode": "0x24", "Counter": "0,1,2,3", - "UMask": "0x42", + "UMask": "0xc2", "EventName": "L2_RQSTS.RFO_HIT", "SampleAfterValue": "200003", "BriefDescription": "RFO requests that hit L2 cache.", @@ -77,7 +77,7 @@ { "EventCode": "0x24", "Counter": "0,1,2,3", - "UMask": "0x44", + "UMask": "0xc4", "EventName": "L2_RQSTS.CODE_RD_HIT", "SampleAfterValue": "200003", "BriefDescription": "L2 cache hits when fetching instructions, code reads.", @@ -87,7 +87,7 @@ "PublicDescription": "This event counts the number of requests from the L2 hardware prefetchers that hit L2 cache. L3 prefetch new types.", "EventCode": "0x24", "Counter": "0,1,2,3", - "UMask": "0x50", + "UMask": "0xd0", "EventName": "L2_RQSTS.L2_PF_HIT", "SampleAfterValue": "200003", "BriefDescription": "L2 prefetch requests that hit L2 cache", @@ -771,2628 +771,2628 @@ "CounterHTOff": "0,1,2,3,4,5,6,7" }, { - "PublicDescription": "Counts demand data reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads have any response type.", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0000010001 ", + "MSRValue": "0x0000010001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.ANY_RESPONSE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts demand data reads that have any response type.", + "BriefDescription": "Counts demand data reads have any response type.", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0080020001 ", + "MSRValue": "0x0080020001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.SNOOP_NONE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & SNOOP_NONE", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0100020001 ", + "MSRValue": "0x0100020001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.SNOOP_NOT_NEEDED", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & SNOOP_NOT_NEEDED", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0200020001 ", + "MSRValue": "0x0200020001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.SNOOP_MISS", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & SNOOP_MISS", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0400020001 ", + "MSRValue": "0x0400020001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.SNOOP_HIT_NO_FWD", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & SNOOP_HIT_NO_FWD", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x1000020001 ", + "MSRValue": "0x1000020001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.SNOOP_HITM", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & SNOOP_HITM", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x3f80020001 ", + "MSRValue": "0x3F80020001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.SUPPLIER_NONE.ANY_SNOOP", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & SUPPLIER_NONE & ANY_SNOOP", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts demand data reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x00803c0001 ", + "MSRValue": "0x00803C0001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_NONE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts demand data reads that hit in the L3 with no details on snoop-related information.", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts demand data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x01003c0001 ", + "MSRValue": "0x01003C0001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_NOT_NEEDED", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts demand data reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts demand data reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x02003c0001 ", + "MSRValue": "0x02003C0001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_MISS", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts demand data reads that hit in the L3 with a snoop miss response.", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts demand data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x04003c0001 ", + "MSRValue": "0x04003C0001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_HIT_NO_FWD", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts demand data reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded.", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x10003c0001 ", + "MSRValue": "0x10003C0001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.SNOOP_HITM", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_DATA_RD & L3_HIT & SNOOP_HITM", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts demand data reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts demand data reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x3f803c0001 ", + "MSRValue": "0x3F803C0001", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_DATA_RD.L3_HIT.ANY_SNOOP", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts demand data reads that hit in the L3.", + "BriefDescription": "Counts demand data reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand data writes (RFOs) that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs) have any response type.", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0000010002 ", + "MSRValue": "0x0000010002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.ANY_RESPONSE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand data writes (RFOs) that have any response type.", + "BriefDescription": "Counts all demand data writes (RFOs) have any response type.", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x00803c0002 ", + "MSRValue": "0x00803C0002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_NONE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3 with no details on snoop-related information.", + "BriefDescription": "Counts all demand data writes (RFOs)", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x01003c0002 ", + "MSRValue": "0x01003C0002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_NOT_NEEDED", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.", + "BriefDescription": "Counts all demand data writes (RFOs)", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x02003c0002 ", + "MSRValue": "0x02003C0002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_MISS", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3 with a snoop miss response.", + "BriefDescription": "Counts all demand data writes (RFOs)", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x04003c0002 ", + "MSRValue": "0x04003C0002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_HIT_NO_FWD", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded.", + "BriefDescription": "Counts all demand data writes (RFOs)", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x10003c0002 ", + "MSRValue": "0x10003C0002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.SNOOP_HITM", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_RFO & L3_HIT & SNOOP_HITM", + "BriefDescription": "Counts all demand data writes (RFOs)", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand data writes (RFOs) that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand data writes (RFOs)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x3f803c0002 ", + "MSRValue": "0x3F803C0002", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_RFO.L3_HIT.ANY_SNOOP", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand data writes (RFOs) that hit in the L3.", + "BriefDescription": "Counts all demand data writes (RFOs)", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand code reads that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads have any response type.", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0000010004 ", + "MSRValue": "0x0000010004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.ANY_RESPONSE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand code reads that have any response type.", + "BriefDescription": "Counts all demand code reads have any response type.", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0080020004 ", + "MSRValue": "0x0080020004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_NONE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_NONE", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0100020004 ", + "MSRValue": "0x0100020004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_NOT_NEEDED", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_NOT_NEEDED", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0200020004 ", + "MSRValue": "0x0200020004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_MISS", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_MISS", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0400020004 ", + "MSRValue": "0x0400020004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_HIT_NO_FWD", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_HIT_NO_FWD", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x1000020004 ", + "MSRValue": "0x1000020004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.SNOOP_HITM", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & SNOOP_HITM", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x3f80020004 ", + "MSRValue": "0x3F80020004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.SUPPLIER_NONE.ANY_SNOOP", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & SUPPLIER_NONE & ANY_SNOOP", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand code reads that hit in the L3 with no details on snoop-related information. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x00803c0004 ", + "MSRValue": "0x00803C0004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_NONE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand code reads that hit in the L3 with no details on snoop-related information.", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand code reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x01003c0004 ", + "MSRValue": "0x01003C0004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_NOT_NEEDED", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand code reads that hit in the L3 and sibling core snoops are not needed as either the core-valid bit is not set or the shared line is present in multiple cores.", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand code reads that hit in the L3 with a snoop miss response. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x02003c0004 ", + "MSRValue": "0x02003C0004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_MISS", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand code reads that hit in the L3 with a snoop miss response.", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x04003c0004 ", + "MSRValue": "0x04003C0004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_HIT_NO_FWD", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand code reads that hit in the L3 and the snoops to sibling cores hit in either E/S state and the line is not forwarded.", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x10003c0004 ", + "MSRValue": "0x10003C0004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.SNOOP_HITM", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "DEMAND_CODE_RD & L3_HIT & SNOOP_HITM", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts all demand code reads that hit in the L3. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts all demand code reads", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x3f803c0004 ", + "MSRValue": "0x3F803C0004", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.DEMAND_CODE_RD.L3_HIT.ANY_SNOOP", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts all demand code reads that hit in the L3.", + "BriefDescription": "Counts all demand code reads", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "Counts writebacks (modified to exclusive) that have any response type. Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts writebacks (modified to exclusive) have any response type.", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0000010008 ", + "MSRValue": "0x0000010008", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.COREWB.ANY_RESPONSE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "Counts writebacks (modified to exclusive) that have any response type.", + "BriefDescription": "Counts writebacks (modified to exclusive) have any response type.", "Offcore": "1", "CounterHTOff": "0,1,2,3" }, { - "PublicDescription": "tbd Offcore response can be programmed only with a specific pair of event select and counter MSR, and with specific event codes and predefine mask bit value in a dedicated MSR to specify attributes of the offcore transaction.", + "PublicDescription": "Counts writebacks (modified to exclusive)", "EventCode": "0xB7, 0xBB", - "MSRValue": "0x0080020008 ", + "MSRValue": "0x0080020008", "Counter": "0,1,2,3", "UMask": "0x1", "EventName": "OFFCORE_RESPONSE.COREWB.SUPPLIER_NONE.SNOOP_NONE", - "MSRIndex": "0x1a6,0x1a7", + "MSRIndex": "0x1a6, 0x1a7", "SampleAfterValue": "100003", - "BriefDescription": "COREWB & SUPPLIER_NONE & SNOOP_NONE", + "BriefDescription": "Counts writebacks (modified to exclusive)", "Offcore": "1", "CounterHTOff": "0,1,2,3" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Apr 24 16:24:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC22A2BA2CD; Fri, 24 Apr 2020 16:24:07 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497zyH4758z4bZN; Fri, 24 Apr 2020 16:24:07 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-qv1-xf43.google.com with SMTP id fb4so4943540qvb.7; Fri, 24 Apr 2020 09:24:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iSfGLSoRNTWeAfyVUjikZRj1fMDzjlcqKRjTe4Y6P4Q=; b=JUklKpzSY0ZiRpmwxlks6d0URH7vTd1KCb9CrdpbrRP/wf4IS1HNBHnd4tFdXWeOx8 9On+8TbGj8GC8gUPvxlEV1aT0FxEsquSHiJ/CGHTIPxGUYTKFuVdihbySlSOOV+UlrAC ETLvrltfHB4F/c11cXRJWDuH0La63bWM1xKwgl65cCbtBwQRfC73hQWicwfcwhtoNtST wgJcl5xedQc7qeMFre9ONLrzwl2tAfK/k6kQOumZBYWD6JzsS+/tw0k+MOZPeMgemEHK AgUYTR3h8crLESblTvvkJb2Q6VBmbfQluNNNy0BZ/NE/Vag3kzpSScWhiPEDoGdb70Zp ZdYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iSfGLSoRNTWeAfyVUjikZRj1fMDzjlcqKRjTe4Y6P4Q=; b=ku0RAhla1jKMtnwVXIXO5KFiTVdKaSY1okWekX+XdazAWD2tY8rawcFSDl+ivqXvhG S/kECQ5kXkTQaHIzPNAWo5NYjNNc3dLxYR9CWsjeA+nUfyhRUl2yGQUuPMMK0IQJ4TIZ RmVXNK84SXOBpcI2wJ7donwv9sTg6TQYyu3HYgj3gYZZ37sDR55hS5e7l/xD394/vLpa DMcqPwxtpgKu+eRv+xK6zqnkUQXycgOCzEKKYlzPKIlLhNUsoSLJ6ExeCFRvmzl8OoN5 ujqo0fmyL7SWjWwVH3jD/FiU/zbSfa1PUVEFY9FK+l1koi59l4jWqZraBOoXnVO3bwkN toUA== X-Gm-Message-State: AGi0PuYa7t4K5V1hnbfeVQxoxMV5wViPOaZaqXO8bgp2e80VRTMoxAtL tCCgpENLptSZU+I4aHnwzdFFPvPUHyY= X-Google-Smtp-Source: APiQypLZjuJv8sWNbmUIqhtwWrqa30FnLTZFTI69jHOjy5cQKWpiNnri/HjadiOVXkFM6uYSmw+pKw== X-Received: by 2002:a0c:b44c:: with SMTP id e12mr10117540qvf.30.1587745446472; Fri, 24 Apr 2020 09:24:06 -0700 (PDT) Received: from titan.knownspace (173-19-125-130.client.mchsi.com. [173.19.125.130]) by smtp.gmail.com with ESMTPSA id h19sm4234969qtk.78.2020.04.24.09.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Apr 2020 09:24:06 -0700 (PDT) Date: Fri, 24 Apr 2020 11:23:56 -0500 From: Justin Hibbits To: Andriy Gapon Cc: Warner Losh , John Baldwin , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r360241 - head/sys/dev/ichiic Message-ID: <20200424112356.6b8a867e@titan.knownspace> In-Reply-To: <02449f05-6c43-9cb0-b427-34034a3c358f@FreeBSD.org> References: <202004240749.03O7nMSc066344@repo.freebsd.org> <32586115-2c82-2497-ba4c-b3471887518d@FreeBSD.org> <02449f05-6c43-9cb0-b427-34034a3c358f@FreeBSD.org> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 497zyH4758z4bZN X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 16:24:07 -0000 On Fri, 24 Apr 2020 19:07:35 +0300 Andriy Gapon wrote: > On 24/04/2020 18:11, Warner Losh wrote: > >=20 > >=20 > > On Fri, Apr 24, 2020 at 8:47 AM Andriy Gapon > > wrote: > >=20 > > On 24/04/2020 17:29, Warner Losh wrote: =20 > > > > > > > > > On Fri, Apr 24, 2020 at 1:49 AM Andriy Gapon > > =20 > > =20 > > > >> wrote: > > > > > >=C2=A0 =C2=A0 =C2=A0Author: avg > > >=C2=A0 =C2=A0 =C2=A0Date: Fri Apr 24 07:49:21 2020 > > >=C2=A0 =C2=A0 =C2=A0New Revision: 360241 > > >=C2=A0 =C2=A0 =C2=A0URL: https://svnweb.freebsd.org/changeset/base= /360241 > > > > > >=C2=A0 =C2=A0 =C2=A0Log: > > >=C2=A0 =C2=A0 =C2=A0=C2=A0 ig4: ensure that drivers always attach = in correct order > > > > > >=C2=A0 =C2=A0 =C2=A0=C2=A0 Use DRIVER_MODULE_ORDERED(SI_ORDER_ANY)= so that ig4's > > >ACPI attachment happens after iicbus and acpi_iicbus drivers > > >are registered. > > > > > >=C2=A0 =C2=A0 =C2=A0=C2=A0 I have seen a problem where iicbus atta= ched under ig4 > > >instead of acpi_iicbus when ig4.ko was loaded with kldload.=C2=A0 I > > >believe that that happened because ig4 driver was a first > > >driver to register, it attached and created an iicbus child. > > >Then iicbus driver was registered and, since it was the only > > >driver that could attach to the iicbus child device, it did > > >exactly that.=C2=A0 After that acpi_iicbus driver was registered. > > >It would be able to attach to the iicbus device, but it was > > >already attached, so nothing happened. > > > > > > > > > Can you post more details of which devices are affected? From > > > the description and the patch, I don't see how this could fix > > > things. =20 > >=20 > > I think I listed them all: ig4iic with acpi attachment, iicbus > > and acpi_iicbus. acpi > > =C2=A0\--- ig4iic > > =C2=A0 =C2=A0 =C2=A0 =C2=A0\---- iicbus vs acpi_iicbus > >=20 > > I tried to explain the problem and the fix in the commit > > message.=C2=A0 If you want to discuss any specifics, let's continue with > > specifics.=C2=A0 If there is anything unclear in my explanation, I can > > clarify, but I need to understand what needs to be clarified. > >=20 > >=20 > > That won't fix the stated problem. =20 >=20 > It will. It does. You made me write an essay to explain why :) >=20 > > If changing the module order fixes something, > > it's the wrong fix. Which is why I asked to make sure I understood > > the issue (it was unclear if it was at the level indicated, or for > > the children of the iicbus). > >=20 > > iicbus returns BUS_PROBE_GENERIC (-100) from its probe routine, > > while acpi_iicbus returns=C2=A0BUS_PROBE_DEFAULT (-20). This means that > > acpi_iicbus should always win. So something else is going on. We > > don't specify order on other devices except for some weird, special > > needs drivers (this is not such a driver). =20 >=20 > This driver, along with all of other I2C controller drivers, has a > particular quirk, so it can be called weird. >=20 > It does not matter what the probe routines return if one of the > drivers is not added to "newbus" at all (even if its code is loaded). > Its probe method is not executed. And that's what I tried to > explain in the commit message. >=20 > Now, why this driver as well as all SMBus and I2C controller drivers > are somewhat weird... There is a multitude of drivers for SMBus and > I2C controllers. Those drivers have different names. So, using > newbus speak, smbus and iicbus drivers can attach to [newbus] devices > under many different [newbus] buses. For that reason, the > corresponding DRIVER_MODULE declarations are not consolidated in > smbus.c and iicbus.c; instead, they are spread over individual > controller drivers. So, loading of smbus or iicbus module does not > result in a call to devclass_add_driver() that would register these > drivers under some bus. And that's an unusual thing comparing to the > most straightforward drivers. >=20 > Let's use ig4 as an example. > Across its source files we had the following DRIVER_MODULE > declarations: DRIVER_MODULE(ig4iic, acpi, ... -- in ig4_acpi.c > DRIVER_MODULE(iicbus, ig4iic, ... -- in ig4_iic.c > DRIVER_MODULE(acpi_iicbus, ig4iic, ... -- in ig4_iic.c > The first one is needed to register ig4iic driver under acpi bus. > Other two are needed to register iicbus and acpi_iicbus drivers under > ig4iic bus. The order is not explicitly defined, so the corresponding > declaration can be processed in any order when ig4.ko is loaded and > so the corresponding devclass_add_driver() can be called in any order. >=20 > So, I observed in practice the scenario where the drivers were added > in the written order. First, ig4iic was added under acpi, it found > the corresponding device, probed and attached to it. In its attach > method it added a new device named "iicbus" as a child. Then, iicbus > driver was added under ig4iic bus. That driver found the child device > and attached to it. Only then acpi_iicbus was added and it was too > late to the party. >=20 > So, this is really about an order in which DRIVER_MODULE-s (which > translate to sysinit-s) _within a kld_ are processed. Essentially, > about an order of objects in the corresponding section of a loadable > ELF object. MODULE_DEPEND does not affect that order. >=20 > Just as an aside, for a contrast, gpiobus uses a different model. > There, all controller drivers must have "gpio" as their driver names > (driver->name). So, a single DRIVER_MODULE(gpiobus, gpio, ...) in the > gpiobus.c code is sufficient for gpiobus driver to be added under all > controllers. And that registration always happens before a > controller driver is added because of MODULE_DEPEND between it and > gpiobus. >=20 > > Unless I'm mistaken, the real problem is that the following line is > > missing instead. MODULE_DEPEND(ig4iic, acpi_iicbus, 1, 1, 1); > > which makes the module dependencies explicit. Can you add that to > > ig4_acpi.c, revert your change and see if that works? It will > > ensure that the acpi_iicbus driver is loaded first. If things break > > because it isn't, it sounds like a hard dependency for ig4. Since > > we're already pulling in acpi, that doesn't seem unreasonable to > > me. =20 >=20 > Just for clarity, acpi_iicbus is compiled into iicbus.ko (on relevant > platforms, of course), same as iicbus. It's not a separate kld. >=20 Can you look at how ofw_iicbus does this? Everything works just fine with that, and it's compiled into the iicbus module as well. Perhaps you can pick some ideas from there. One thing I remember doing on the fsl_i2c driver was to just name the driver iichb and everything worked beautifully. Yes, it was sort of a cop-out vs adding another attachment, but it solved the problem, and does make sense. - Justin From owner-svn-src-all@freebsd.org Fri Apr 24 16:31:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C179A2BA432; Fri, 24 Apr 2020 16:31:27 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49806l4lyfz4c1C; Fri, 24 Apr 2020 16:31:27 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EA4420C39; Fri, 24 Apr 2020 16:31:27 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OGVRKq092556; Fri, 24 Apr 2020 16:31:27 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OGVRof092555; Fri, 24 Apr 2020 16:31:27 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202004241631.03OGVRof092555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 24 Apr 2020 16:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360271 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 360271 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 16:31:27 -0000 Author: manu Date: Fri Apr 24 16:31:27 2020 New Revision: 360271 URL: https://svnweb.freebsd.org/changeset/base/360271 Log: Add support for generating release images using GPT for ARM Submitted by: Daniel Engberg (Original version) Differential Revision: https://reviews.freebsd.org/D22537 Modified: head/release/tools/arm.subr Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Fri Apr 24 16:19:03 2020 (r360270) +++ head/release/tools/arm.subr Fri Apr 24 16:31:27 2020 (r360271) @@ -65,13 +65,21 @@ umount_loop() { arm_create_disk() { # Create the target raw file and temporary work directory. chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev} - chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} - chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} - chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 - chroot ${CHROOTDIR} gpart add -t freebsd ${mddev} - chroot ${CHROOTDIR} gpart create -s bsd ${mddev}s2 - chroot ${CHROOTDIR} gpart add -t freebsd-ufs -a 64k /dev/${mddev}s2 - chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}s2a + if [ "${PART_SCHEME}" == "GPT" ]; then + chroot ${CHROOTDIR} gpart add -t efi -l efi -a 512k -s ${FAT_SIZE} ${mddev} + chroot ${CHROOTDIR} newfs_msdos -L efi -F ${FAT_TYPE} /dev/${mddev}p1 + chroot ${CHROOTDIR} gpart add -t freebsd-ufs -l rootfs -a 64k ${mddev} + chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}p2 + fi + if [ "${PART_SCHEME}" == "MBR" ]; then + chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} + chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} + chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 + chroot ${CHROOTDIR} gpart add -t freebsd ${mddev} + chroot ${CHROOTDIR} gpart create -s bsd ${mddev}s2 + chroot ${CHROOTDIR} gpart add -t freebsd-ufs -a 64k /dev/${mddev}s2 + chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}s2a + fi return 0 } @@ -161,7 +169,12 @@ arm_setup_minimal_loader() { } arm_install_base() { - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} + if [ "${PART_SCHEME}" == "GPT" ]; then + chroot ${CHROOTDIR} mount /dev/${mddev}p2 ${DESTDIR} + fi + if [ "${PART_SCHEME}" == "MBR" ]; then + chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} + fi eval chroot ${CHROOTDIR} make -C ${WORLDDIR} \ TARGET=${EMBEDDED_TARGET} \ TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ @@ -178,10 +191,18 @@ arm_install_base() { echo '# Custom /etc/fstab for FreeBSD embedded images' \ > ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "/dev/ufs/rootfs / ufs rw 1 1" \ - >> ${CHROOTDIR}/${DESTDIR}/etc/fstab - echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ - >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + if [ "${PART_SCHEME}" == "GPT" ]; then + echo "/dev/ufs/rootfs / ufs rw 1 1" \ + >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + echo "/dev/msdosfs/efi /boot/efi msdosfs rw,noatime 0 0" \ + >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + fi + if [ "${PART_SCHEME}" == "MBR" ]; then + echo "/dev/ufs/rootfs / ufs rw 1 1" \ + >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ + >> ${CHROOTDIR}/${DESTDIR}/etc/fstab + fi echo "tmpfs /tmp tmpfs rw,mode=1777,size=50m 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab @@ -206,8 +227,17 @@ arm_install_boot() { FATMOUNT="${DESTDIR%${KERNEL}}/fat" UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" - chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} + if [ "${PART_SCHEME}" == "GPT" ]; then + dospart="/dev/${mddev}p1" + ufspart="/dev/${mddev}p2" + fi + if [ "${PART_SCHEME}" == "MBR" ]; then + dospart="/dev/${mddev}s1" + ufspart="/dev/${mddev}s2a" + fi + + chroot ${CHROOTDIR} mount_msdosfs ${dospart} ${FATMOUNT} + chroot ${CHROOTDIR} mount ${ufspart} ${UFSMOUNT} if [ "${EMBEDDED_TARGET}" == "arm" ]; then chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ From owner-svn-src-all@freebsd.org Fri Apr 24 16:32:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 794BA2BA4BB; Fri, 24 Apr 2020 16:32:26 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49807t2gfwz4cCG; Fri, 24 Apr 2020 16:32:26 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 56D0B20DAE; Fri, 24 Apr 2020 16:32:26 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OGWQWa094249; Fri, 24 Apr 2020 16:32:26 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OGWQKh094248; Fri, 24 Apr 2020 16:32:26 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202004241632.03OGWQKh094248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 24 Apr 2020 16:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360272 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 360272 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 16:32:26 -0000 Author: manu Date: Fri Apr 24 16:32:25 2020 New Revision: 360272 URL: https://svnweb.freebsd.org/changeset/base/360272 Log: Add PINE64 ROCKPro64 config for generation of release images Submitted by: Daniel Engberg Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D22538 Added: head/release/arm64/ROCKPRO64.conf (contents, props changed) Added: head/release/arm64/ROCKPRO64.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/arm64/ROCKPRO64.conf Fri Apr 24 16:32:25 2020 (r360272) @@ -0,0 +1,28 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +EMBEDDED_TARGET_ARCH="aarch64" +EMBEDDED_TARGET="arm64" +EMBEDDEDBUILD=1 +EMBEDDEDPORTS="sysutils/u-boot-rockpro64" +FAT_SIZE="50m -b 16m" +FAT_TYPE="16" +IMAGE_SIZE="3072M" +KERNEL="GENERIC" +MD_ARGS="-x 63 -y 255" +NODOC=1 +PART_SCHEME="GPT" +export BOARDNAME="ROCKPRO64" + +arm_install_uboot() { + UBOOT_DIR="/usr/local/share/u-boot/u-boot-rockpro64" + UBOOT_FILE_1="idbloader.img" + UBOOT_FILE_2="u-boot.itb" + chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILE_1} \ + of=/dev/${mddev} bs=512 seek=64 conv=sync + chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILE_2} \ + of=/dev/${mddev} bs=512 seek=16384 conv=sync + return 0 +} From owner-svn-src-all@freebsd.org Fri Apr 24 16:33:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 625F82BA6C3; Fri, 24 Apr 2020 16:33:08 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49808h1zYxz4cLM; Fri, 24 Apr 2020 16:33:08 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F3F020DC2; Fri, 24 Apr 2020 16:33:08 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OGX8VO094368; Fri, 24 Apr 2020 16:33:08 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OGX8la094367; Fri, 24 Apr 2020 16:33:08 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202004241633.03OGX8la094367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 24 Apr 2020 16:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360273 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 360273 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 16:33:08 -0000 Author: manu Date: Fri Apr 24 16:33:07 2020 New Revision: 360273 URL: https://svnweb.freebsd.org/changeset/base/360273 Log: Add PINE64 ROCK64 config for generation of release images Added: head/release/arm64/ROCK64.conf (contents, props changed) Added: head/release/arm64/ROCK64.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/arm64/ROCK64.conf Fri Apr 24 16:33:07 2020 (r360273) @@ -0,0 +1,28 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +EMBEDDED_TARGET_ARCH="aarch64" +EMBEDDED_TARGET="arm64" +EMBEDDEDBUILD=1 +EMBEDDEDPORTS="sysutils/u-boot-rock64" +FAT_SIZE="50m -b 16m" +FAT_TYPE="16" +IMAGE_SIZE="3072M" +KERNEL="GENERIC" +MD_ARGS="-x 63 -y 255" +NODOC=1 +PART_SCHEME="GPT" +export BOARDNAME="ROCK64" + +arm_install_uboot() { + UBOOT_DIR="/usr/local/share/u-boot/u-boot-rock64" + UBOOT_FILE_1="idbloader.img" + UBOOT_FILE_2="u-boot.itb" + chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILE_1} \ + of=/dev/${mddev} bs=512 seek=64 conv=sync + chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILE_2} \ + of=/dev/${mddev} bs=512 seek=16384 conv=sync + return 0 +} From owner-svn-src-all@freebsd.org Fri Apr 24 16:39:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6D052BA93F; Fri, 24 Apr 2020 16:39:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4980J64zntz4cg8; Fri, 24 Apr 2020 16:39:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A63DB20DD2; Fri, 24 Apr 2020 16:39:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OGdYbH094827; Fri, 24 Apr 2020 16:39:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OGdYga094826; Fri, 24 Apr 2020 16:39:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004241639.03OGdYga094826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Apr 2020 16:39:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360274 - stable/12/sys/dev/pci X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/pci X-SVN-Commit-Revision: 360274 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 16:39:34 -0000 Author: mav Date: Fri Apr 24 16:39:34 2020 New Revision: 360274 URL: https://svnweb.freebsd.org/changeset/base/360274 Log: MFC r351514: Don't consider PCIe hot-plug command timeout fatal. According to my tests and errata to several generations of Intel CPUs, PCIe hot-plug command completion reporting is not very reliable thing. At least on my Supermicro X11DPi-NT board I never saw it reported. Before this change timeout code detached devices and tried to disable the slot, that in my case resulted in hot-plugged device being detached just a second after it was successfully detected and attached. This change removes that, so in case of timeout it just prints the error and continue operation. Linux does the same. Modified: stable/12/sys/dev/pci/pci_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/pci/pci_pci.c ============================================================================== --- stable/12/sys/dev/pci/pci_pci.c Fri Apr 24 16:33:07 2020 (r360273) +++ stable/12/sys/dev/pci/pci_pci.c Fri Apr 24 16:39:34 2020 (r360274) @@ -1269,11 +1269,8 @@ pcib_pcie_cc_timeout(void *arg) mtx_assert(&Giant, MA_OWNED); sta = pcie_read_config(dev, PCIER_SLOT_STA, 2); if (!(sta & PCIEM_SLOT_STA_CC)) { - device_printf(dev, - "HotPlug Command Timed Out - forcing detach\n"); - sc->flags &= ~(PCIB_HOTPLUG_CMD_PENDING | PCIB_DETACH_PENDING); - sc->flags |= PCIB_DETACHING; - pcib_pcie_hotplug_update(sc, 0, 0, true); + device_printf(dev, "HotPlug Command Timed Out\n"); + sc->flags &= ~PCIB_HOTPLUG_CMD_PENDING; } else { device_printf(dev, "Missed HotPlug interrupt waiting for Command Completion\n"); From owner-svn-src-all@freebsd.org Fri Apr 24 16:40:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 270B52BAA6A; Fri, 24 Apr 2020 16:40:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4980KR0GnYz4cv3; Fri, 24 Apr 2020 16:40:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 049FB20DE7; Fri, 24 Apr 2020 16:40:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OGeg8L095857; Fri, 24 Apr 2020 16:40:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OGegN2095856; Fri, 24 Apr 2020 16:40:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004241640.03OGegN2095856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Apr 2020 16:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360275 - stable/11/sys/dev/pci X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/dev/pci X-SVN-Commit-Revision: 360275 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 16:40:43 -0000 Author: mav Date: Fri Apr 24 16:40:42 2020 New Revision: 360275 URL: https://svnweb.freebsd.org/changeset/base/360275 Log: MFC r351514: Don't consider PCIe hot-plug command timeout fatal. According to my tests and errata to several generations of Intel CPUs, PCIe hot-plug command completion reporting is not very reliable thing. At least on my Supermicro X11DPi-NT board I never saw it reported. Before this change timeout code detached devices and tried to disable the slot, that in my case resulted in hot-plugged device being detached just a second after it was successfully detected and attached. This change removes that, so in case of timeout it just prints the error and continue operation. Linux does the same. Modified: stable/11/sys/dev/pci/pci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pci/pci_pci.c ============================================================================== --- stable/11/sys/dev/pci/pci_pci.c Fri Apr 24 16:39:34 2020 (r360274) +++ stable/11/sys/dev/pci/pci_pci.c Fri Apr 24 16:40:42 2020 (r360275) @@ -1253,11 +1253,8 @@ pcib_pcie_cc_timeout(void *arg) mtx_assert(&Giant, MA_OWNED); sta = pcie_read_config(dev, PCIER_SLOT_STA, 2); if (!(sta & PCIEM_SLOT_STA_CC)) { - device_printf(dev, - "HotPlug Command Timed Out - forcing detach\n"); - sc->flags &= ~(PCIB_HOTPLUG_CMD_PENDING | PCIB_DETACH_PENDING); - sc->flags |= PCIB_DETACHING; - pcib_pcie_hotplug_update(sc, 0, 0, true); + device_printf(dev, "HotPlug Command Timed Out\n"); + sc->flags &= ~PCIB_HOTPLUG_CMD_PENDING; } else { device_printf(dev, "Missed HotPlug interrupt waiting for Command Completion\n"); From owner-svn-src-all@freebsd.org Fri Apr 24 16:57:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 780DD2BB082 for ; Fri, 24 Apr 2020 16:57:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4980hq5cBxz4dv9 for ; Fri, 24 Apr 2020 16:57:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf44.google.com with SMTP id v18so4984042qvx.9 for ; Fri, 24 Apr 2020 09:57:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mJLJTu6RY+jDeuja2uMVKw0ecpr/woAjOG5AEUgQ4Tk=; b=RnGufPJ+63NdHWRizwDkDG1LR5ciHUGcwevmJQDg4d4TUrNmE7Hh+lzDScCxwywAZJ ZZcY7O2ys5+WBvy0HyhFeEuE06Ph3/b8HhQH/Z997MIlW0Xw1eW8mMq+ikKtRd8H4oRp C7Jx1YGSaeP/XdvQFUDnMON5PYYltdk7WAu9CtcKmd6oj5wzVTvOejc3SRsqpYYV3mwt T8gCQlaR+svYl45Qlp1PZkEatlDL0UeM2LqkcQrZSYzEIX2b/zsRPyLOoc7rVJZr3cln TfLCKZg5iKKzO4LPdPbb0sBLpqds7ngvSyQyle0TJOHi0HaVr4H+awFx9EiF1lLwgux2 duBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mJLJTu6RY+jDeuja2uMVKw0ecpr/woAjOG5AEUgQ4Tk=; b=VgyrLFurCEhl1MxseM85ITowdEf9QBiSPPRRG2DMU2fQiWq2uOrkmQuzmAzd3PUSsi RPUFM2E5ZfQKWeRkjjYB+NKeoiXc/8pIdcdDucfdbMod6t/7PqfC0y5yloDWPeXcgdlv 2ypUv2e8T8AQFlnGpBV2IPT2gSk7cU77wAjKsHNFSpgRS3UpV/6LELiZloZSTqhBDe0P mdY5dMtovc7R6tZyXxC6DhivfRNgR9443uYd+JZDOro0qmyrv2NSjUMJqSOXwBBbYDG7 MNf7/yBbr4WdUbc8xGRFtVsqYsEQ+QNFUHHMP0vuRYNVA49ZPoZz6cppF1Ij42Jm+HRY iZEg== X-Gm-Message-State: AGi0PuYy8IpHc0eG/uDQT9fZhDQUVl5KxJ7ojKYDlYNyzp905+dIZAsR D2mBCGZOY1boQQ54ce87ynsEBVROcnv8KfUrrv7smQ== X-Google-Smtp-Source: APiQypLZb0ZFHkPbETFgLvUOMiFirY0PZ2d5Ly04e0ELiovvhHKNJ32+kjyYdlTiCEVhfPsZKGWr/EaJauMpGi1dlps= X-Received: by 2002:a0c:8b52:: with SMTP id d18mr10210839qvc.125.1587747450702; Fri, 24 Apr 2020 09:57:30 -0700 (PDT) MIME-Version: 1.0 References: <202004240749.03O7nMSc066344@repo.freebsd.org> <32586115-2c82-2497-ba4c-b3471887518d@FreeBSD.org> <02449f05-6c43-9cb0-b427-34034a3c358f@FreeBSD.org> In-Reply-To: <02449f05-6c43-9cb0-b427-34034a3c358f@FreeBSD.org> From: Warner Losh Date: Fri, 24 Apr 2020 10:57:19 -0600 Message-ID: Subject: Re: svn commit: r360241 - head/sys/dev/ichiic To: Andriy Gapon Cc: John Baldwin , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4980hq5cBxz4dv9 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=RnGufPJ+; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f44) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.13 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.979,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[4.4.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.16)[ip: (-0.00), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 16:57:32 -0000 On Fri, Apr 24, 2020 at 10:07 AM Andriy Gapon wrote: > On 24/04/2020 18:11, Warner Losh wrote: > > > > > > On Fri, Apr 24, 2020 at 8:47 AM Andriy Gapon > > wrote: > > > > On 24/04/2020 17:29, Warner Losh wrote: > > > > > > > > > On Fri, Apr 24, 2020 at 1:49 AM Andriy Gapon > > > > >> wrote: > > > > > > Author: avg > > > Date: Fri Apr 24 07:49:21 2020 > > > New Revision: 360241 > > > URL: https://svnweb.freebsd.org/changeset/base/360241 > > > > > > Log: > > > ig4: ensure that drivers always attach in correct order > > > > > > Use DRIVER_MODULE_ORDERED(SI_ORDER_ANY) so that ig4's ACPI > attachment > > > happens after iicbus and acpi_iicbus drivers are registered. > > > > > > I have seen a problem where iicbus attached under ig4 > instead of > > > acpi_iicbus when ig4.ko was loaded with kldload. I believe > that that > > > happened because ig4 driver was a first driver to register, > it attached > > > and created an iicbus child. Then iicbus driver was > registered and, > > > since it was the only driver that could attach to the iicbus > child > > > device, it did exactly that. After that acpi_iicbus driver > was > > > registered. It would be able to attach to the iicbus > device, but it was > > > already attached, so nothing happened. > > > > > > > > > Can you post more details of which devices are affected? From the > description > > > and the patch, I don't see how this could fix things. > > > > I think I listed them all: ig4iic with acpi attachment, iicbus and > acpi_iicbus. > > acpi > > \--- ig4iic > > \---- iicbus vs acpi_iicbus > > > > I tried to explain the problem and the fix in the commit message. > If you want > > to discuss any specifics, let's continue with specifics. If there > is anything > > unclear in my explanation, I can clarify, but I need to understand > what needs to > > be clarified. > > > > > > That won't fix the stated problem. > > It will. It does. You made me write an essay to explain why :) > Ah, it's a workaround for a newbus bug. OK. I'll work on fixing the newbus bug then. > > If changing the module order fixes something, > > it's the wrong fix. Which is why I asked to make sure I understood the > issue (it > > was unclear if it was at the level indicated, or for the children of the > iicbus). > > > > iicbus returns BUS_PROBE_GENERIC (-100) from its probe routine, while > > acpi_iicbus returns BUS_PROBE_DEFAULT (-20). This means that acpi_iicbus > should > > always win. So something else is going on. We don't specify order on > other > > devices except for some weird, special needs drivers (this is not such a > driver). > > This driver, along with all of other I2C controller drivers, has a > particular > quirk, so it can be called weird. > > It does not matter what the probe routines return if one of the drivers is > not > added to "newbus" at all (even if its code is loaded). Its probe method > is not > executed. And that's what I tried to explain in the commit message. > > Now, why this driver as well as all SMBus and I2C controller drivers are > somewhat weird... There is a multitude of drivers for SMBus and I2C > controllers. Those drivers have different names. So, using newbus speak, > smbus > and iicbus drivers can attach to [newbus] devices under many different > [newbus] > buses. For that reason, the corresponding DRIVER_MODULE declarations are > not > consolidated in smbus.c and iicbus.c; instead, they are spread over > individual > controller drivers. So, loading of smbus or iicbus module does not result > in a > call to devclass_add_driver() that would register these drivers under some > bus. > And that's an unusual thing comparing to the most straightforward drivers. > > Let's use ig4 as an example. > Across its source files we had the following DRIVER_MODULE declarations: > DRIVER_MODULE(ig4iic, acpi, ... -- in ig4_acpi.c > DRIVER_MODULE(iicbus, ig4iic, ... -- in ig4_iic.c > DRIVER_MODULE(acpi_iicbus, ig4iic, ... -- in ig4_iic.c > The first one is needed to register ig4iic driver under acpi bus. Other > two are > needed to register iicbus and acpi_iicbus drivers under ig4iic bus. > The order is not explicitly defined, so the corresponding declaration can > be > processed in any order when ig4.ko is loaded and so the corresponding > devclass_add_driver() can be called in any order. > It's a bug in newbus if that matters. I'll grant that it does today, but it shouldn't. In the past we've worked around this issue in a number of different ways (including having 3 different modules with the order encoded into those modules). It also indicates, perhaps, bugs in the iic acpi enumeration stuff, but that's a harder case to make without more careful study since I know that acpi_iic works around the bit of a mismatch between newbus' device model and ACPI's. > So, I observed in practice the scenario where the drivers were added in the > written order. First, ig4iic was added under acpi, it found the > corresponding > device, probed and attached to it. In its attach method it added a new > device > named "iicbus" as a child. Then, iicbus driver was added under ig4iic bus. > That driver found the child device and attached to it. Only then > acpi_iicbus > was added and it was too late to the party. > > So, this is really about an order in which DRIVER_MODULE-s (which > translate to > sysinit-s) _within a kld_ are processed. Essentially, about an order of > objects > in the corresponding section of a loadable ELF object. MODULE_DEPEND does > not > affect that order. > Yes. That's why we rarely put multiple modules into one .ko. One can have a debate about whether or not this is a bug in the loader or not... But we've been talking for a while about deferring the probe/attach phase of the driver registration until after everything is registered, but while the concept is simple, the details can be tricky. There's some support for this with devctl freeze/unfreeze, but maybe that should move into kldload itself. That too would solve this problem. > Just as an aside, for a contrast, gpiobus uses a different model. > There, all controller drivers must have "gpio" as their driver names > (driver->name). > So, a single DRIVER_MODULE(gpiobus, gpio, ...) in the gpiobus.c code is > sufficient for gpiobus driver to be added under all controllers. And that > registration always happens before a controller driver is added because of > MODULE_DEPEND between it and gpiobus. > Yes. This is one of the drivers I was thinking didn't co-locate things. > > Unless I'm mistaken, the real problem is that the following line is > missing instead. > > MODULE_DEPEND(ig4iic, acpi_iicbus, 1, 1, 1); > > which makes the module dependencies explicit. Can you add that to > ig4_acpi.c, > > revert your change and see if that works? It will ensure that the > acpi_iicbus > > driver is loaded first. If things break because it isn't, it sounds like > a hard > > dependency for ig4. Since we're already pulling in acpi, that doesn't > seem > > unreasonable to me. > > Just for clarity, acpi_iicbus is compiled into iicbus.ko (on relevant > platforms, > of course), same as iicbus. It's not a separate kld. > So I was mistaken about what your second message was trying to say. Warner From owner-svn-src-all@freebsd.org Fri Apr 24 18:13:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31E182BE4F7; Fri, 24 Apr 2020 18:13:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4982Nw0Nsdz3R5l; Fri, 24 Apr 2020 18:13:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-164.local (unknown [IPv6:2601:648:8881:1e90:5c82:8b70:e0b1:b6aa]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 727BB1C844; Fri, 24 Apr 2020 18:13:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r360241 - head/sys/dev/ichiic To: Warner Losh , Andriy Gapon Cc: src-committers , svn-src-all , svn-src-head References: <202004240749.03O7nMSc066344@repo.freebsd.org> <32586115-2c82-2497-ba4c-b3471887518d@FreeBSD.org> <02449f05-6c43-9cb0-b427-34034a3c358f@FreeBSD.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Fri, 24 Apr 2020 11:13:48 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 18:13:52 -0000 On 4/24/20 9:57 AM, Warner Losh wrote: > On Fri, Apr 24, 2020 at 10:07 AM Andriy Gapon wrote: >> Let's use ig4 as an example. >> Across its source files we had the following DRIVER_MODULE declarations: >> DRIVER_MODULE(ig4iic, acpi, ... -- in ig4_acpi.c >> DRIVER_MODULE(iicbus, ig4iic, ... -- in ig4_iic.c >> DRIVER_MODULE(acpi_iicbus, ig4iic, ... -- in ig4_iic.c >> The first one is needed to register ig4iic driver under acpi bus. Other >> two are >> needed to register iicbus and acpi_iicbus drivers under ig4iic bus. >> The order is not explicitly defined, so the corresponding declaration can >> be >> processed in any order when ig4.ko is loaded and so the corresponding >> devclass_add_driver() can be called in any order. >> > > It's a bug in newbus if that matters. I'll grant that it does today, but it > shouldn't. In the past we've worked around this issue in a number of > different ways (including having 3 different modules with the order encoded > into those modules). It also indicates, perhaps, bugs in the iic acpi > enumeration stuff, but that's a harder case to make without more careful > study since I know that acpi_iic works around the bit of a mismatch between > newbus' device model and ACPI's. FWIW, this is a longstanding bug, and it is the reason DRIVER_MODULE_ORDERED exists[1], precisely so you can get all the child driver module's registered first and have the "top-most" (in the hierarchy) driver register last so that all the others are ready as new child devices are created. The _ORDERED solution is the only one I'm aware of that we have used for a single module containing multiple drivers. It may be that we have split up into tiny modules in the past, but that solution is probably worse as the dependencies are usually the wrong way around (the "leaf" drivers probably depend on the parent drivers so they get loaded in the exact wrong order for this case where you want all the leaf drivers registered before an instance of the parent driver attaches) 1: https://svnweb.freebsd.org/base?view=revision&revision=225079 -- John Baldwin From owner-svn-src-all@freebsd.org Fri Apr 24 18:47:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F1E52BF0EA; Fri, 24 Apr 2020 18:47:44 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49837z74DVz3yGZ; Fri, 24 Apr 2020 18:47:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D360A22826; Fri, 24 Apr 2020 18:47:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OIlhYn091914; Fri, 24 Apr 2020 18:47:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OIlhxB091910; Fri, 24 Apr 2020 18:47:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004241847.03OIlhxB091910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2020 18:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360276 - in head/sys: amd64/amd64 arm64/arm64 i386/i386 powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: amd64/amd64 arm64/arm64 i386/i386 powerpc/powerpc X-SVN-Commit-Revision: 360276 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 18:47:44 -0000 Author: markj Date: Fri Apr 24 18:47:42 2020 New Revision: 360276 URL: https://svnweb.freebsd.org/changeset/base/360276 Log: Remove an obsolete TODO comment from several minidump implementations. The comment referenced a non-existent function, and these minidump implementations already buffer discontiguous physical data pages by mapping them into a single VA range that gets passed to the dump device, so there is no real advantage in batching calls to blk_write(). The RISC-V and MIPS minidump implementations still write a page at a time and so would benefit from some form of batching. MFC after: 2 weeks Sponsored by: Juniper Networks, Klara Inc. Modified: head/sys/amd64/amd64/minidump_machdep.c head/sys/arm64/arm64/minidump_machdep.c head/sys/i386/i386/minidump_machdep_base.c head/sys/powerpc/powerpc/minidump_machdep.c Modified: head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- head/sys/amd64/amd64/minidump_machdep.c Fri Apr 24 16:40:42 2020 (r360275) +++ head/sys/amd64/amd64/minidump_machdep.c Fri Apr 24 18:47:42 2020 (r360276) @@ -409,7 +409,6 @@ minidumpsys(struct dumperinfo *di) } /* Dump memory chunks */ - /* XXX cluster it up and use blk_dump() */ for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { bits = vm_page_dump[i]; while (bits) { Modified: head/sys/arm64/arm64/minidump_machdep.c ============================================================================== --- head/sys/arm64/arm64/minidump_machdep.c Fri Apr 24 16:40:42 2020 (r360275) +++ head/sys/arm64/arm64/minidump_machdep.c Fri Apr 24 18:47:42 2020 (r360276) @@ -374,7 +374,6 @@ minidumpsys(struct dumperinfo *di) } /* Dump memory chunks */ - /* XXX cluster it up and use blk_dump() */ for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { bits = vm_page_dump[i]; while (bits) { Modified: head/sys/i386/i386/minidump_machdep_base.c ============================================================================== --- head/sys/i386/i386/minidump_machdep_base.c Fri Apr 24 16:40:42 2020 (r360275) +++ head/sys/i386/i386/minidump_machdep_base.c Fri Apr 24 18:47:42 2020 (r360276) @@ -321,7 +321,6 @@ minidumpsys(struct dumperinfo *di) } /* Dump memory chunks */ - /* XXX cluster it up and use blk_dump() */ for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { bits = vm_page_dump[i]; while (bits) { Modified: head/sys/powerpc/powerpc/minidump_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/minidump_machdep.c Fri Apr 24 16:40:42 2020 (r360275) +++ head/sys/powerpc/powerpc/minidump_machdep.c Fri Apr 24 18:47:42 2020 (r360276) @@ -381,7 +381,6 @@ retry: dump_total("pmap", pmapsize); /* Dump memory chunks */ - /* XXX cluster it up and use blk_dump() */ for (i = 0; i < vm_page_dump_size / sizeof(*vm_page_dump); i++) { bits = vm_page_dump[i]; /* TODO optimize with bit manipulation instructions */ From owner-svn-src-all@freebsd.org Fri Apr 24 18:47:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5282F2BF135; Fri, 24 Apr 2020 18:47:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49838G1ZMSz3yNZ; Fri, 24 Apr 2020 18:47:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3130C22827; Fri, 24 Apr 2020 18:47:58 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OIlved091965; Fri, 24 Apr 2020 18:47:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OIlvoX091964; Fri, 24 Apr 2020 18:47:57 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004241847.03OIlvoX091964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2020 18:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360277 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 360277 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 18:47:58 -0000 Author: markj Date: Fri Apr 24 18:47:57 2020 New Revision: 360277 URL: https://svnweb.freebsd.org/changeset/base/360277 Log: Fix handling of 1GB mappings in the arm64 minidump code. For such mappings we need to dump 512 page table pages, not one, and they need to be included in the pmap size recorded in the minidump header. MFC after: 2 weeks Sponsored by: Juniper Networks, Klara Inc. Modified: head/sys/arm64/arm64/minidump_machdep.c Modified: head/sys/arm64/arm64/minidump_machdep.c ============================================================================== --- head/sys/arm64/arm64/minidump_machdep.c Fri Apr 24 18:47:42 2020 (r360276) +++ head/sys/arm64/arm64/minidump_machdep.c Fri Apr 24 18:47:57 2020 (r360277) @@ -34,8 +34,6 @@ __FBSDID("$FreeBSD$"); #include "opt_watchdog.h" -#include "opt_watchdog.h" - #include #include #include @@ -68,7 +66,7 @@ static size_t fragsz; static void *dump_va; static size_t counter, progress, dumpsize; -static uint64_t tmpbuffer[PAGE_SIZE / sizeof(uint64_t)]; +static uint64_t tmpbuffer[Ln_ENTRIES]; CTASSERT(sizeof(*vm_page_dump) == 8); @@ -210,16 +208,14 @@ blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t int minidumpsys(struct dumperinfo *di) { + struct minidumphdr mdhdr; pd_entry_t *l0, *l1, *l2; pt_entry_t *l3; - uint32_t pmapsize; vm_offset_t va; vm_paddr_t pa; - int error; uint64_t bits; - int i, bit; - int retry_count; - struct minidumphdr mdhdr; + uint32_t pmapsize; + int bit, error, i, j, retry_count; retry_count = 0; retry: @@ -231,11 +227,15 @@ minidumpsys(struct dumperinfo *di) if (!pmap_get_tables(pmap_kernel(), va, &l0, &l1, &l2, &l3)) continue; - /* We should always be using the l2 table for kvm */ - if (l2 == NULL) - continue; - - if ((*l2 & ATTR_DESCR_MASK) == L2_BLOCK) { + if ((*l1 & ATTR_DESCR_MASK) == L1_BLOCK) { + pa = *l1 & ~ATTR_MASK; + for (i = 0; i < Ln_ENTRIES * Ln_ENTRIES; + i++, pa += PAGE_SIZE) + if (is_dumpable(pa)) + dump_add_page(pa); + pmapsize += (Ln_ENTRIES - 1) * PAGE_SIZE; + va += L1_SIZE - L2_SIZE; + } else if ((*l2 & ATTR_DESCR_MASK) == L2_BLOCK) { pa = *l2 & ~ATTR_MASK; for (i = 0; i < Ln_ENTRIES; i++, pa += PAGE_SIZE) { if (is_dumpable(pa)) @@ -327,25 +327,31 @@ minidumpsys(struct dumperinfo *di) error = blk_flush(di); if (error) goto fail; - } else if (l2 == NULL) { + } else if ((*l1 & ATTR_DESCR_MASK) == L1_BLOCK) { + /* + * Handle a 1GB block mapping: write out 512 fake L2 + * pages. + */ pa = (*l1 & ~ATTR_MASK) | (va & L1_OFFSET); - /* Generate fake l3 entries based upon the l1 entry */ for (i = 0; i < Ln_ENTRIES; i++) { - tmpbuffer[i] = pa + (i * PAGE_SIZE) | - ATTR_DEFAULT | L3_PAGE; + for (j = 0; j < Ln_ENTRIES; j++) { + tmpbuffer[j] = pa + i * L2_SIZE + + j * PAGE_SIZE | ATTR_DEFAULT | + L3_PAGE; + } + error = blk_write(di, (char *)&tmpbuffer, 0, + PAGE_SIZE); + if (error) + goto fail; } - /* We always write a page, even if it is zero */ - error = blk_write(di, (char *)&tmpbuffer, 0, PAGE_SIZE); - if (error) - goto fail; /* flush, in case we reuse tmpbuffer in the same block*/ error = blk_flush(di); if (error) goto fail; bzero(&tmpbuffer, sizeof(tmpbuffer)); + va += L1_SIZE - L2_SIZE; } else if ((*l2 & ATTR_DESCR_MASK) == L2_BLOCK) { - /* TODO: Handle an invalid L2 entry */ pa = (*l2 & ~ATTR_MASK) | (va & L2_OFFSET); /* Generate fake l3 entries based upon the l1 entry */ @@ -353,7 +359,6 @@ minidumpsys(struct dumperinfo *di) tmpbuffer[i] = pa + (i * PAGE_SIZE) | ATTR_DEFAULT | L3_PAGE; } - /* We always write a page, even if it is zero */ error = blk_write(di, (char *)&tmpbuffer, 0, PAGE_SIZE); if (error) goto fail; @@ -366,7 +371,6 @@ minidumpsys(struct dumperinfo *di) } else { pa = *l2 & ~ATTR_MASK; - /* We always write a page, even if it is zero */ error = blk_write(di, NULL, pa, PAGE_SIZE); if (error) goto fail; From owner-svn-src-all@freebsd.org Fri Apr 24 18:48:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ADF862BF243; Fri, 24 Apr 2020 18:48:31 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49838t3xyGz3yZc; Fri, 24 Apr 2020 18:48:30 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lj1-f174.google.com with SMTP id f18so11009253lja.13; Fri, 24 Apr 2020 11:48:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=vWHv2grHz6YNrYdbBegIFvQxuxC72VFdLHmehOCGs18=; b=Qiq7E//QuS9gYIg0J857jq6r2xNE6yDeUu3yNOeUiYIlWjj6f3xeHwdiR66lZl2cO0 qx3XLZ1eOeyZL2HLSrh0xoLB4HUHOY1KXCSlQTWgOzoTEIbasq0r/4pCDZj6JO1xapID zAQnJkmhgFNyzG5H0QVjfJ84/mmlmt9jK75h6qveXtkMZZq+mXT52bjlij23uAAnw87m 2ll8oTIUyrY4xn+RjJck2GZCTAX38oLJmG7E3qNnmODKPAxWSChfgx68D/EI+/nEEHvS lScwXUQeohEaotXFHTq/AoRVPmjKyyslw00R8bU478tenbSDUrU1025JSKL47vEQ5lzP FZVA== X-Gm-Message-State: AGi0PuZh43fzHm5BKY9CUOeMB2u9OqbyNiElMbXIQ73G+ooKVWVMj2Dl XFG8VaNrmdcnRPLKg2HnThybV4+vvX0= X-Google-Smtp-Source: APiQypLvWoAOXvseF9IzraFRpDqlf2suc8C0bEtXK9IJi1Ufq7y+WHBWAAk9fCL0q/68+Hf6HU+kxg== X-Received: by 2002:a2e:9207:: with SMTP id k7mr6795247ljg.124.1587754108368; Fri, 24 Apr 2020 11:48:28 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id y21sm4780829ljg.66.2020.04.24.11.48.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Apr 2020 11:48:27 -0700 (PDT) Subject: Re: svn commit: r360241 - head/sys/dev/ichiic To: Justin Hibbits Cc: Warner Losh , John Baldwin , src-committers , svn-src-all , svn-src-head References: <202004240749.03O7nMSc066344@repo.freebsd.org> <32586115-2c82-2497-ba4c-b3471887518d@FreeBSD.org> <02449f05-6c43-9cb0-b427-34034a3c358f@FreeBSD.org> <20200424112356.6b8a867e@titan.knownspace> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABtB5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz6JAlQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryLkCDQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAYkCPAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <32d6391a-7d3f-1aaa-2441-8a88e10b94d5@FreeBSD.org> Date: Fri, 24 Apr 2020 21:48:26 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200424112356.6b8a867e@titan.knownspace> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49838t3xyGz3yZc X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.208.174 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-2.25 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[FreeBSD.org]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[174.208.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; IP_SCORE(-0.25)[ip: (-0.38), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[174.208.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[96.151.72.93.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 18:48:31 -0000 On 24/04/2020 19:23, Justin Hibbits wrote: > Can you look at how ofw_iicbus does this? Everything works just fine > with that, and it's compiled into the iicbus module as well. Perhaps > you can pick some ideas from there. > > One thing I remember doing on the fsl_i2c driver was to just name the > driver iichb and everything worked beautifully. Yes, it was sort of a > cop-out vs adding another attachment, but it solved the problem, and > does make sense. Justin, yes, "iichb" is the only name that has special properties because of DRIVER_MODULE(iicbus, iichb, ...) in icbus.c. That's essentially the same approach that is used for gpio. Maybe it's the way. But there was something that spooked me about many drivers having the same name, but can't recall what. -- Andriy Gapon From owner-svn-src-all@freebsd.org Fri Apr 24 19:03:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 692082BF816; Fri, 24 Apr 2020 19:03:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4983V22Kfyz40hd; Fri, 24 Apr 2020 19:03:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3209A22C9C; Fri, 24 Apr 2020 19:03:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OJ3Mme004341; Fri, 24 Apr 2020 19:03:22 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OJ3JJF004326; Fri, 24 Apr 2020 19:03:19 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <202004241903.03OJ3JJF004326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 24 Apr 2020 19:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360278 - in stable/12: crypto/openssl crypto/openssl/apps crypto/openssl/crypto/aes crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/ec crypto/openssl/crypto/... X-SVN-Group: stable-12 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable/12: crypto/openssl crypto/openssl/apps crypto/openssl/crypto/aes crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/ec crypto/openssl/crypto/evp crypto/openssl/crypto... X-SVN-Commit-Revision: 360278 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 19:03:22 -0000 Author: jkim Date: Fri Apr 24 19:03:18 2020 New Revision: 360278 URL: https://svnweb.freebsd.org/changeset/base/360278 Log: MFC: r360175 Merge OpenSSL 1.1.1g. Added: stable/12/crypto/openssl/doc/man3/X509_check_purpose.pod - copied unchanged from r360175, head/crypto/openssl/doc/man3/X509_check_purpose.pod stable/12/secure/lib/libcrypto/man/man3/X509_check_purpose.3 - copied unchanged from r360175, head/secure/lib/libcrypto/man/man3/X509_check_purpose.3 Modified: stable/12/crypto/openssl/CHANGES stable/12/crypto/openssl/INSTALL stable/12/crypto/openssl/NEWS stable/12/crypto/openssl/README stable/12/crypto/openssl/apps/build.info stable/12/crypto/openssl/apps/dhparam.c stable/12/crypto/openssl/apps/dsa.c stable/12/crypto/openssl/apps/dsaparam.c stable/12/crypto/openssl/apps/ec.c stable/12/crypto/openssl/apps/ecparam.c stable/12/crypto/openssl/apps/engine.c stable/12/crypto/openssl/apps/gendsa.c stable/12/crypto/openssl/apps/genrsa.c stable/12/crypto/openssl/apps/ocsp.c stable/12/crypto/openssl/apps/pkcs12.c stable/12/crypto/openssl/apps/rsa.c stable/12/crypto/openssl/apps/rsautl.c stable/12/crypto/openssl/apps/s_time.c stable/12/crypto/openssl/apps/srp.c stable/12/crypto/openssl/apps/ts.c stable/12/crypto/openssl/crypto/aes/aes_core.c stable/12/crypto/openssl/crypto/aes/aes_local.h stable/12/crypto/openssl/crypto/asn1/asn1_lib.c stable/12/crypto/openssl/crypto/bio/bss_acpt.c stable/12/crypto/openssl/crypto/ec/ec_asn1.c stable/12/crypto/openssl/crypto/ec/ec_lib.c stable/12/crypto/openssl/crypto/ec/ec_mult.c stable/12/crypto/openssl/crypto/ec/ecp_smpl.c stable/12/crypto/openssl/crypto/evp/e_aes.c stable/12/crypto/openssl/crypto/rand/build.info stable/12/crypto/openssl/crypto/rand/drbg_ctr.c stable/12/crypto/openssl/crypto/x509/x509_vfy.c stable/12/crypto/openssl/crypto/x509v3/v3_purp.c stable/12/crypto/openssl/doc/man1/s_time.pod stable/12/crypto/openssl/doc/man3/EVP_aes.pod stable/12/crypto/openssl/doc/man3/RAND_set_rand_method.pod stable/12/crypto/openssl/include/openssl/opensslv.h stable/12/secure/lib/libcrypto/Makefile.inc stable/12/secure/lib/libcrypto/man/man3/ADMISSIONS.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 stable/12/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 stable/12/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 stable/12/secure/lib/libcrypto/man/man3/BF_encrypt.3 stable/12/secure/lib/libcrypto/man/man3/BIO_ADDR.3 stable/12/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 stable/12/secure/lib/libcrypto/man/man3/BIO_connect.3 stable/12/secure/lib/libcrypto/man/man3/BIO_ctrl.3 stable/12/secure/lib/libcrypto/man/man3/BIO_f_base64.3 stable/12/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 stable/12/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 stable/12/secure/lib/libcrypto/man/man3/BIO_f_md.3 stable/12/secure/lib/libcrypto/man/man3/BIO_f_null.3 stable/12/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 stable/12/secure/lib/libcrypto/man/man3/BIO_find_type.3 stable/12/secure/lib/libcrypto/man/man3/BIO_get_data.3 stable/12/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 stable/12/secure/lib/libcrypto/man/man3/BIO_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/BIO_new.3 stable/12/secure/lib/libcrypto/man/man3/BIO_new_CMS.3 stable/12/secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 stable/12/secure/lib/libcrypto/man/man3/BIO_printf.3 stable/12/secure/lib/libcrypto/man/man3/BIO_push.3 stable/12/secure/lib/libcrypto/man/man3/BIO_read.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_accept.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_bio.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_connect.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_fd.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_file.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_mem.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_null.3 stable/12/secure/lib/libcrypto/man/man3/BIO_s_socket.3 stable/12/secure/lib/libcrypto/man/man3/BIO_set_callback.3 stable/12/secure/lib/libcrypto/man/man3/BIO_should_retry.3 stable/12/secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 stable/12/secure/lib/libcrypto/man/man3/BN_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/BN_CTX_start.3 stable/12/secure/lib/libcrypto/man/man3/BN_add.3 stable/12/secure/lib/libcrypto/man/man3/BN_add_word.3 stable/12/secure/lib/libcrypto/man/man3/BN_bn2bin.3 stable/12/secure/lib/libcrypto/man/man3/BN_cmp.3 stable/12/secure/lib/libcrypto/man/man3/BN_copy.3 stable/12/secure/lib/libcrypto/man/man3/BN_generate_prime.3 stable/12/secure/lib/libcrypto/man/man3/BN_mod_inverse.3 stable/12/secure/lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 stable/12/secure/lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 stable/12/secure/lib/libcrypto/man/man3/BN_new.3 stable/12/secure/lib/libcrypto/man/man3/BN_num_bytes.3 stable/12/secure/lib/libcrypto/man/man3/BN_rand.3 stable/12/secure/lib/libcrypto/man/man3/BN_security_bits.3 stable/12/secure/lib/libcrypto/man/man3/BN_set_bit.3 stable/12/secure/lib/libcrypto/man/man3/BN_swap.3 stable/12/secure/lib/libcrypto/man/man3/BN_zero.3 stable/12/secure/lib/libcrypto/man/man3/BUF_MEM_new.3 stable/12/secure/lib/libcrypto/man/man3/CMS_add0_cert.3 stable/12/secure/lib/libcrypto/man/man3/CMS_add1_recipient_cert.3 stable/12/secure/lib/libcrypto/man/man3/CMS_add1_signer.3 stable/12/secure/lib/libcrypto/man/man3/CMS_compress.3 stable/12/secure/lib/libcrypto/man/man3/CMS_decrypt.3 stable/12/secure/lib/libcrypto/man/man3/CMS_encrypt.3 stable/12/secure/lib/libcrypto/man/man3/CMS_final.3 stable/12/secure/lib/libcrypto/man/man3/CMS_get0_RecipientInfos.3 stable/12/secure/lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 stable/12/secure/lib/libcrypto/man/man3/CMS_get0_type.3 stable/12/secure/lib/libcrypto/man/man3/CMS_get1_ReceiptRequest.3 stable/12/secure/lib/libcrypto/man/man3/CMS_sign.3 stable/12/secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 stable/12/secure/lib/libcrypto/man/man3/CMS_uncompress.3 stable/12/secure/lib/libcrypto/man/man3/CMS_verify.3 stable/12/secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 stable/12/secure/lib/libcrypto/man/man3/CONF_modules_free.3 stable/12/secure/lib/libcrypto/man/man3/CONF_modules_load_file.3 stable/12/secure/lib/libcrypto/man/man3/CRYPTO_THREAD_run_once.3 stable/12/secure/lib/libcrypto/man/man3/CRYPTO_get_ex_new_index.3 stable/12/secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 stable/12/secure/lib/libcrypto/man/man3/CTLOG_STORE_get0_log_by_id.3 stable/12/secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 stable/12/secure/lib/libcrypto/man/man3/CTLOG_new.3 stable/12/secure/lib/libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 stable/12/secure/lib/libcrypto/man/man3/DES_random_key.3 stable/12/secure/lib/libcrypto/man/man3/DH_generate_key.3 stable/12/secure/lib/libcrypto/man/man3/DH_generate_parameters.3 stable/12/secure/lib/libcrypto/man/man3/DH_get0_pqg.3 stable/12/secure/lib/libcrypto/man/man3/DH_get_1024_160.3 stable/12/secure/lib/libcrypto/man/man3/DH_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/DH_new.3 stable/12/secure/lib/libcrypto/man/man3/DH_new_by_nid.3 stable/12/secure/lib/libcrypto/man/man3/DH_set_method.3 stable/12/secure/lib/libcrypto/man/man3/DH_size.3 stable/12/secure/lib/libcrypto/man/man3/DSA_SIG_new.3 stable/12/secure/lib/libcrypto/man/man3/DSA_do_sign.3 stable/12/secure/lib/libcrypto/man/man3/DSA_dup_DH.3 stable/12/secure/lib/libcrypto/man/man3/DSA_generate_key.3 stable/12/secure/lib/libcrypto/man/man3/DSA_generate_parameters.3 stable/12/secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 stable/12/secure/lib/libcrypto/man/man3/DSA_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/DSA_new.3 stable/12/secure/lib/libcrypto/man/man3/DSA_set_method.3 stable/12/secure/lib/libcrypto/man/man3/DSA_sign.3 stable/12/secure/lib/libcrypto/man/man3/DSA_size.3 stable/12/secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 stable/12/secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 stable/12/secure/lib/libcrypto/man/man3/DTLSv1_listen.3 stable/12/secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 stable/12/secure/lib/libcrypto/man/man3/ECPKParameters_print.3 stable/12/secure/lib/libcrypto/man/man3/EC_GFp_simple_method.3 stable/12/secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 stable/12/secure/lib/libcrypto/man/man3/EC_GROUP_new.3 stable/12/secure/lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 stable/12/secure/lib/libcrypto/man/man3/EC_KEY_new.3 stable/12/secure/lib/libcrypto/man/man3/EC_POINT_add.3 stable/12/secure/lib/libcrypto/man/man3/EC_POINT_new.3 stable/12/secure/lib/libcrypto/man/man3/ENGINE_add.3 stable/12/secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 stable/12/secure/lib/libcrypto/man/man3/ERR_clear_error.3 stable/12/secure/lib/libcrypto/man/man3/ERR_error_string.3 stable/12/secure/lib/libcrypto/man/man3/ERR_get_error.3 stable/12/secure/lib/libcrypto/man/man3/ERR_load_crypto_strings.3 stable/12/secure/lib/libcrypto/man/man3/ERR_load_strings.3 stable/12/secure/lib/libcrypto/man/man3/ERR_print_errors.3 stable/12/secure/lib/libcrypto/man/man3/ERR_put_error.3 stable/12/secure/lib/libcrypto/man/man3/ERR_remove_state.3 stable/12/secure/lib/libcrypto/man/man3/ERR_set_mark.3 stable/12/secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 stable/12/secure/lib/libcrypto/man/man3/EVP_CIPHER_CTX_get_cipher_data.3 stable/12/secure/lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/EVP_DigestInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/EVP_OpenInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_cmp.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_get_default_digest_nid.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_meth_get_count.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_print_private.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 stable/12/secure/lib/libcrypto/man/man3/EVP_PKEY_verify_recover.3 stable/12/secure/lib/libcrypto/man/man3/EVP_SealInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_SignInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 stable/12/secure/lib/libcrypto/man/man3/EVP_aes.3 stable/12/secure/lib/libcrypto/man/man3/EVP_aria.3 stable/12/secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_blake2b512.3 stable/12/secure/lib/libcrypto/man/man3/EVP_camellia.3 stable/12/secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_chacha20.3 stable/12/secure/lib/libcrypto/man/man3/EVP_des.3 stable/12/secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_md2.3 stable/12/secure/lib/libcrypto/man/man3/EVP_md4.3 stable/12/secure/lib/libcrypto/man/man3/EVP_md5.3 stable/12/secure/lib/libcrypto/man/man3/EVP_mdc2.3 stable/12/secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_rc4.3 stable/12/secure/lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_ripemd160.3 stable/12/secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_sha1.3 stable/12/secure/lib/libcrypto/man/man3/EVP_sha224.3 stable/12/secure/lib/libcrypto/man/man3/EVP_sha3_224.3 stable/12/secure/lib/libcrypto/man/man3/EVP_sm3.3 stable/12/secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 stable/12/secure/lib/libcrypto/man/man3/EVP_whirlpool.3 stable/12/secure/lib/libcrypto/man/man3/HMAC.3 stable/12/secure/lib/libcrypto/man/man3/MD5.3 stable/12/secure/lib/libcrypto/man/man3/MDC2_Init.3 stable/12/secure/lib/libcrypto/man/man3/Makefile stable/12/secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 stable/12/secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 stable/12/secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 stable/12/secure/lib/libcrypto/man/man3/OCSP_request_add1_nonce.3 stable/12/secure/lib/libcrypto/man/man3/OCSP_resp_find_status.3 stable/12/secure/lib/libcrypto/man/man3/OCSP_response_status.3 stable/12/secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_VERSION_NUMBER.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_config.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_init_crypto.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_instrument_bus.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_load_builtin_modules.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 stable/12/secure/lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 stable/12/secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 stable/12/secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 stable/12/secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 stable/12/secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 stable/12/secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 stable/12/secure/lib/libcrypto/man/man3/OpenSSL_add_all_algorithms.3 stable/12/secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 stable/12/secure/lib/libcrypto/man/man3/PEM_read.3 stable/12/secure/lib/libcrypto/man/man3/PEM_read_CMS.3 stable/12/secure/lib/libcrypto/man/man3/PEM_read_bio_PrivateKey.3 stable/12/secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 stable/12/secure/lib/libcrypto/man/man3/PEM_write_bio_CMS_stream.3 stable/12/secure/lib/libcrypto/man/man3/PEM_write_bio_PKCS7_stream.3 stable/12/secure/lib/libcrypto/man/man3/PKCS12_create.3 stable/12/secure/lib/libcrypto/man/man3/PKCS12_newpass.3 stable/12/secure/lib/libcrypto/man/man3/PKCS12_parse.3 stable/12/secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 stable/12/secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 stable/12/secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 stable/12/secure/lib/libcrypto/man/man3/PKCS7_sign.3 stable/12/secure/lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 stable/12/secure/lib/libcrypto/man/man3/PKCS7_verify.3 stable/12/secure/lib/libcrypto/man/man3/RAND_DRBG_generate.3 stable/12/secure/lib/libcrypto/man/man3/RAND_DRBG_get0_master.3 stable/12/secure/lib/libcrypto/man/man3/RAND_DRBG_new.3 stable/12/secure/lib/libcrypto/man/man3/RAND_DRBG_reseed.3 stable/12/secure/lib/libcrypto/man/man3/RAND_DRBG_set_callbacks.3 stable/12/secure/lib/libcrypto/man/man3/RAND_DRBG_set_ex_data.3 stable/12/secure/lib/libcrypto/man/man3/RAND_add.3 stable/12/secure/lib/libcrypto/man/man3/RAND_bytes.3 stable/12/secure/lib/libcrypto/man/man3/RAND_cleanup.3 stable/12/secure/lib/libcrypto/man/man3/RAND_egd.3 stable/12/secure/lib/libcrypto/man/man3/RAND_load_file.3 stable/12/secure/lib/libcrypto/man/man3/RAND_set_rand_method.3 stable/12/secure/lib/libcrypto/man/man3/RC4_set_key.3 stable/12/secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 stable/12/secure/lib/libcrypto/man/man3/RSA_blinding_on.3 stable/12/secure/lib/libcrypto/man/man3/RSA_check_key.3 stable/12/secure/lib/libcrypto/man/man3/RSA_generate_key.3 stable/12/secure/lib/libcrypto/man/man3/RSA_get0_key.3 stable/12/secure/lib/libcrypto/man/man3/RSA_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/RSA_new.3 stable/12/secure/lib/libcrypto/man/man3/RSA_padding_add_PKCS1_type_1.3 stable/12/secure/lib/libcrypto/man/man3/RSA_print.3 stable/12/secure/lib/libcrypto/man/man3/RSA_private_encrypt.3 stable/12/secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 stable/12/secure/lib/libcrypto/man/man3/RSA_set_method.3 stable/12/secure/lib/libcrypto/man/man3/RSA_sign.3 stable/12/secure/lib/libcrypto/man/man3/RSA_sign_ASN1_OCTET_STRING.3 stable/12/secure/lib/libcrypto/man/man3/RSA_size.3 stable/12/secure/lib/libcrypto/man/man3/SCT_new.3 stable/12/secure/lib/libcrypto/man/man3/SCT_print.3 stable/12/secure/lib/libcrypto/man/man3/SCT_validate.3 stable/12/secure/lib/libcrypto/man/man3/SHA256_Init.3 stable/12/secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 stable/12/secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 stable/12/secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 stable/12/secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 stable/12/secure/lib/libcrypto/man/man3/SSL_COMP_add_compression_method.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_add_extra_chain_cert.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_add_session.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_config.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_flush_sessions.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_free.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_get_verify_mode.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_has_client_custom_ext.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_load_verify_locations.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_sess_number.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_sess_set_cache_size.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set1_verify_cert_store.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_alpn_select_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_store.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_cert_verify_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_cipher_list.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_client_cert_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_client_hello_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_ct_validation_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_ctlog_list_file.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_default_passwd_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_ex_data.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_generate_session_id.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_info_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_keylog_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_min_proto_version.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_msg_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_num_tickets.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_options.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_psk_client_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_quiet_shutdown.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_read_ahead.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_record_padding_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_security_level.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_cache_mode.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_id_context.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_session_ticket_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_split_send_fragment.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_ssl_version.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_stateless_cookie_generate_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_servername_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_status_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_tlsext_use_srtp.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_tmp_dh_callback.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_use_certificate.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_use_psk_identity_hint.3 stable/12/secure/lib/libcrypto/man/man3/SSL_CTX_use_serverinfo.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_cipher.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_hostname.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_id_context.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get_compress_id.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get_ex_data.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get_protocol_version.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_get_time.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_has_ticket.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_is_resumable.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 stable/12/secure/lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 stable/12/secure/lib/libcrypto/man/man3/SSL_accept.3 stable/12/secure/lib/libcrypto/man/man3/SSL_alert_type_string.3 stable/12/secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 stable/12/secure/lib/libcrypto/man/man3/SSL_check_chain.3 stable/12/secure/lib/libcrypto/man/man3/SSL_clear.3 stable/12/secure/lib/libcrypto/man/man3/SSL_connect.3 stable/12/secure/lib/libcrypto/man/man3/SSL_do_handshake.3 stable/12/secure/lib/libcrypto/man/man3/SSL_export_keying_material.3 stable/12/secure/lib/libcrypto/man/man3/SSL_extension_supported.3 stable/12/secure/lib/libcrypto/man/man3/SSL_free.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_all_async_fds.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_client_random.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_current_cipher.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_default_timeout.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_error.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_extms_support.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_fd.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_peer_cert_chain.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_peer_certificate.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_peer_signature_nid.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_psk_identity.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_rbio.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_session.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_shared_sigalgs.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_verify_result.3 stable/12/secure/lib/libcrypto/man/man3/SSL_get_version.3 stable/12/secure/lib/libcrypto/man/man3/SSL_in_init.3 stable/12/secure/lib/libcrypto/man/man3/SSL_key_update.3 stable/12/secure/lib/libcrypto/man/man3/SSL_library_init.3 stable/12/secure/lib/libcrypto/man/man3/SSL_load_client_CA_file.3 stable/12/secure/lib/libcrypto/man/man3/SSL_new.3 stable/12/secure/lib/libcrypto/man/man3/SSL_pending.3 stable/12/secure/lib/libcrypto/man/man3/SSL_read.3 stable/12/secure/lib/libcrypto/man/man3/SSL_read_early_data.3 stable/12/secure/lib/libcrypto/man/man3/SSL_rstate_string.3 stable/12/secure/lib/libcrypto/man/man3/SSL_session_reused.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set1_host.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set_bio.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set_connect_state.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set_fd.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set_session.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 stable/12/secure/lib/libcrypto/man/man3/SSL_set_verify_result.3 stable/12/secure/lib/libcrypto/man/man3/SSL_shutdown.3 stable/12/secure/lib/libcrypto/man/man3/SSL_state_string.3 stable/12/secure/lib/libcrypto/man/man3/SSL_want.3 stable/12/secure/lib/libcrypto/man/man3/SSL_write.3 stable/12/secure/lib/libcrypto/man/man3/UI_STRING.3 stable/12/secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 stable/12/secure/lib/libcrypto/man/man3/UI_create_method.3 stable/12/secure/lib/libcrypto/man/man3/UI_new.3 stable/12/secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 stable/12/secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 stable/12/secure/lib/libcrypto/man/man3/X509_CRL_get0_by_serial.3 stable/12/secure/lib/libcrypto/man/man3/X509_EXTENSION_set_object.3 stable/12/secure/lib/libcrypto/man/man3/X509_LOOKUP.3 stable/12/secure/lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 stable/12/secure/lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 stable/12/secure/lib/libcrypto/man/man3/X509_NAME_ENTRY_get_object.3 stable/12/secure/lib/libcrypto/man/man3/X509_NAME_add_entry_by_txt.3 stable/12/secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 stable/12/secure/lib/libcrypto/man/man3/X509_NAME_get_index_by_NID.3 stable/12/secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 stable/12/secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 stable/12/secure/lib/libcrypto/man/man3/X509_SIG_get0.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_CTX_get_error.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_CTX_set_verify_cb.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_add_cert.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_get0_param.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_new.3 stable/12/secure/lib/libcrypto/man/man3/X509_STORE_set_verify_cb_func.3 stable/12/secure/lib/libcrypto/man/man3/X509_VERIFY_PARAM_set_flags.3 stable/12/secure/lib/libcrypto/man/man3/X509_check_ca.3 stable/12/secure/lib/libcrypto/man/man3/X509_check_host.3 stable/12/secure/lib/libcrypto/man/man3/X509_check_issued.3 stable/12/secure/lib/libcrypto/man/man3/X509_check_private_key.3 stable/12/secure/lib/libcrypto/man/man3/X509_cmp.3 stable/12/secure/lib/libcrypto/man/man3/X509_cmp_time.3 stable/12/secure/lib/libcrypto/man/man3/X509_digest.3 stable/12/secure/lib/libcrypto/man/man3/X509_dup.3 stable/12/secure/lib/libcrypto/man/man3/X509_get0_notBefore.3 stable/12/secure/lib/libcrypto/man/man3/X509_get0_signature.3 stable/12/secure/lib/libcrypto/man/man3/X509_get0_uids.3 stable/12/secure/lib/libcrypto/man/man3/X509_get_extension_flags.3 stable/12/secure/lib/libcrypto/man/man3/X509_get_pubkey.3 stable/12/secure/lib/libcrypto/man/man3/X509_get_serialNumber.3 stable/12/secure/lib/libcrypto/man/man3/X509_get_subject_name.3 stable/12/secure/lib/libcrypto/man/man3/X509_get_version.3 stable/12/secure/lib/libcrypto/man/man3/X509_new.3 stable/12/secure/lib/libcrypto/man/man3/X509_sign.3 stable/12/secure/lib/libcrypto/man/man3/X509_verify_cert.3 stable/12/secure/lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 stable/12/secure/lib/libcrypto/man/man3/d2i_DHparams.3 stable/12/secure/lib/libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 stable/12/secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 stable/12/secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 stable/12/secure/lib/libcrypto/man/man3/d2i_X509.3 stable/12/secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 stable/12/secure/lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 stable/12/secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 stable/12/secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 stable/12/secure/lib/libcrypto/man/man5/x509v3_config.5 stable/12/secure/lib/libcrypto/man/man7/Ed25519.7 stable/12/secure/lib/libcrypto/man/man7/RAND.7 stable/12/secure/lib/libcrypto/man/man7/RAND_DRBG.7 stable/12/secure/lib/libcrypto/man/man7/RSA-PSS.7 stable/12/secure/lib/libcrypto/man/man7/SM2.7 stable/12/secure/lib/libcrypto/man/man7/X25519.7 stable/12/secure/lib/libcrypto/man/man7/bio.7 stable/12/secure/lib/libcrypto/man/man7/ct.7 stable/12/secure/lib/libcrypto/man/man7/des_modes.7 stable/12/secure/lib/libcrypto/man/man7/evp.7 stable/12/secure/lib/libcrypto/man/man7/ossl_store-file.7 stable/12/secure/lib/libcrypto/man/man7/ossl_store.7 stable/12/secure/lib/libcrypto/man/man7/passphrase-encoding.7 stable/12/secure/lib/libcrypto/man/man7/proxy-certificates.7 stable/12/secure/lib/libcrypto/man/man7/scrypt.7 stable/12/secure/lib/libcrypto/man/man7/ssl.7 stable/12/secure/lib/libcrypto/man/man7/x509.7 stable/12/secure/usr.bin/openssl/man/CA.pl.1 stable/12/secure/usr.bin/openssl/man/asn1parse.1 stable/12/secure/usr.bin/openssl/man/ca.1 stable/12/secure/usr.bin/openssl/man/ciphers.1 stable/12/secure/usr.bin/openssl/man/cms.1 stable/12/secure/usr.bin/openssl/man/crl.1 stable/12/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/12/secure/usr.bin/openssl/man/dgst.1 stable/12/secure/usr.bin/openssl/man/dhparam.1 stable/12/secure/usr.bin/openssl/man/dsa.1 stable/12/secure/usr.bin/openssl/man/dsaparam.1 stable/12/secure/usr.bin/openssl/man/ec.1 stable/12/secure/usr.bin/openssl/man/ecparam.1 stable/12/secure/usr.bin/openssl/man/enc.1 stable/12/secure/usr.bin/openssl/man/engine.1 stable/12/secure/usr.bin/openssl/man/errstr.1 stable/12/secure/usr.bin/openssl/man/gendsa.1 stable/12/secure/usr.bin/openssl/man/genpkey.1 stable/12/secure/usr.bin/openssl/man/genrsa.1 stable/12/secure/usr.bin/openssl/man/list.1 stable/12/secure/usr.bin/openssl/man/nseq.1 stable/12/secure/usr.bin/openssl/man/ocsp.1 stable/12/secure/usr.bin/openssl/man/openssl.1 stable/12/secure/usr.bin/openssl/man/passwd.1 stable/12/secure/usr.bin/openssl/man/pkcs12.1 stable/12/secure/usr.bin/openssl/man/pkcs7.1 stable/12/secure/usr.bin/openssl/man/pkcs8.1 stable/12/secure/usr.bin/openssl/man/pkey.1 stable/12/secure/usr.bin/openssl/man/pkeyparam.1 stable/12/secure/usr.bin/openssl/man/pkeyutl.1 stable/12/secure/usr.bin/openssl/man/prime.1 stable/12/secure/usr.bin/openssl/man/rand.1 stable/12/secure/usr.bin/openssl/man/req.1 stable/12/secure/usr.bin/openssl/man/rsa.1 stable/12/secure/usr.bin/openssl/man/rsautl.1 stable/12/secure/usr.bin/openssl/man/s_client.1 stable/12/secure/usr.bin/openssl/man/s_server.1 stable/12/secure/usr.bin/openssl/man/s_time.1 stable/12/secure/usr.bin/openssl/man/sess_id.1 stable/12/secure/usr.bin/openssl/man/smime.1 stable/12/secure/usr.bin/openssl/man/speed.1 stable/12/secure/usr.bin/openssl/man/spkac.1 stable/12/secure/usr.bin/openssl/man/srp.1 stable/12/secure/usr.bin/openssl/man/storeutl.1 stable/12/secure/usr.bin/openssl/man/ts.1 stable/12/secure/usr.bin/openssl/man/tsget.1 stable/12/secure/usr.bin/openssl/man/verify.1 stable/12/secure/usr.bin/openssl/man/version.1 stable/12/secure/usr.bin/openssl/man/x509.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/openssl/CHANGES ============================================================================== --- stable/12/crypto/openssl/CHANGES Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/CHANGES Fri Apr 24 19:03:18 2020 (r360278) @@ -7,6 +7,27 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1f and 1.1.1g [21 Apr 2020] + + *) Fixed segmentation fault in SSL_check_chain() + Server or client applications that call the SSL_check_chain() function + during or after a TLS 1.3 handshake may crash due to a NULL pointer + dereference as a result of incorrect handling of the + "signature_algorithms_cert" TLS extension. The crash occurs if an invalid + or unrecognised signature algorithm is received from the peer. This could + be exploited by a malicious peer in a Denial of Service attack. + (CVE-2020-1967) + [Benjamin Kaduk] + + *) Added AES consttime code for no-asm configurations + an optional constant time support for AES was added + when building openssl for no-asm. + Enable with: ./config no-asm -DOPENSSL_AES_CONST_TIME + Disable with: ./config no-asm -DOPENSSL_NO_AES_CONST_TIME + At this time this feature is by default disabled. + It will be enabled by default in 3.0. + [Bernd Edlinger] + Changes between 1.1.1e and 1.1.1f [31 Mar 2020] *) Revert the change of EOF detection while reading in libssl to avoid Modified: stable/12/crypto/openssl/INSTALL ============================================================================== --- stable/12/crypto/openssl/INSTALL Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/INSTALL Fri Apr 24 19:03:18 2020 (r360278) @@ -535,9 +535,9 @@ conjunction with the "-DPEDANTIC" option (or the --strict-warnings option). - no-ui - Don't build with the "UI" capability (i.e. the set of - features enabling text based prompts). + no-ui-console + Don't build with the "UI" console method (i.e. the "UI" + method that enables text based console prompts). enable-unit-test Enable additional unit test APIs. This should not typically Modified: stable/12/crypto/openssl/NEWS ============================================================================== --- stable/12/crypto/openssl/NEWS Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/NEWS Fri Apr 24 19:03:18 2020 (r360278) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1f and OpenSSL 1.1.1g [21 Apr 2020] + + o Fixed segmentation fault in SSL_check_chain() (CVE-2020-1967) + Major changes between OpenSSL 1.1.1e and OpenSSL 1.1.1f [31 Mar 2020] o Revert the unexpected EOF reporting via SSL_ERROR_SSL Modified: stable/12/crypto/openssl/README ============================================================================== --- stable/12/crypto/openssl/README Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/README Fri Apr 24 19:03:18 2020 (r360278) @@ -1,5 +1,5 @@ - OpenSSL 1.1.1f 31 Mar 2020 + OpenSSL 1.1.1g 21 Apr 2020 Copyright (c) 1998-2020 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/12/crypto/openssl/apps/build.info ============================================================================== --- stable/12/crypto/openssl/apps/build.info Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/apps/build.info Fri Apr 24 19:03:18 2020 (r360278) @@ -1,16 +1,17 @@ {- our @apps_openssl_src = qw(openssl.c - asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c - dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c - genpkey.c genrsa.c nseq.c ocsp.c passwd.c pkcs12.c pkcs7.c pkcs8.c - pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c rsa.c rsautl.c + asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c + enc.c errstr.c + genpkey.c nseq.c passwd.c pkcs7.c pkcs8.c + pkey.c pkeyparam.c pkeyutl.c prime.c rand.c req.c s_client.c s_server.c s_time.c sess_id.c smime.c speed.c spkac.c - srp.c ts.c verify.c version.c x509.c rehash.c storeutl.c); + verify.c version.c x509.c rehash.c storeutl.c); our @apps_lib_src = ( qw(apps.c opt.c s_cb.c s_socket.c app_rand.c bf_prefix.c), split(/\s+/, $target{apps_aux_src}) ); our @apps_init_src = split(/\s+/, $target{apps_init_src}); "" -} + IF[{- !$disabled{apps} -}] LIBS_NO_INST=libapps.a SOURCE[libapps.a]={- join(" ", @apps_lib_src) -} @@ -21,11 +22,51 @@ IF[{- !$disabled{apps} -}] SOURCE[openssl]={- join(" ", @apps_openssl_src) -} INCLUDE[openssl]=.. ../include DEPEND[openssl]=libapps.a ../libssl - -IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}] - GENERATE[openssl.rc]=../util/mkrc.pl openssl - SOURCE[openssl]=openssl.rc -ENDIF + IF[{- !$disabled{'des'} -}] + SOURCE[openssl]=pkcs12.c + DEPEND[pkcs12.o]=progs.h + ENDIF + IF[{- !$disabled{'ec'} -}] + SOURCE[openssl]=ec.c ecparam.c + DEPEND[ec.o]=progs.h + DEPEND[ecparam.o]=progs.h + ENDIF + IF[{- !$disabled{'ocsp'} -}] + SOURCE[openssl]=ocsp.c + DEPEND[ocsp.o]=progs.h + ENDIF + IF[{- !$disabled{'srp'} -}] + SOURCE[openssl]=srp.c + DEPEND[srp.o]=progs.h + ENDIF + IF[{- !$disabled{'ts'} -}] + SOURCE[openssl]=ts.c + DEPEND[ts.o]=progs.h + ENDIF + IF[{- !$disabled{'dh'} -}] + SOURCE[openssl]=dhparam.c + DEPEND[dhparam.o]=progs.h + ENDIF + IF[{- !$disabled{'dsa'} -}] + SOURCE[openssl]=dsa.c dsaparam.c gendsa.c + DEPEND[dsa.o]=progs.h + DEPEND[dsaparam.o]=progs.h + DEPEND[gendsa.o]=progs.h + ENDIF + IF[{- !$disabled{'engine'} -}] + SOURCE[openssl]=engine.c + DEPEND[engine.o]=progs.h + ENDIF + IF[{- !$disabled{'rsa'} -}] + SOURCE[openssl]=rsa.c rsautl.c genrsa.c + DEPEND[rsa.o]=progs.h + DEPEND[rsautl.o]=progs.h + DEPEND[genrsa.o]=progs.h + ENDIF + IF[{- $config{target} =~ /^(?:Cygwin|mingw|VC-)/ -}] + GENERATE[openssl.rc]=../util/mkrc.pl openssl + SOURCE[openssl]=openssl.rc + ENDIF {- join("\n ", map { (my $x = $_) =~ s|\.c$|.o|; "DEPEND[$x]=progs.h" } @apps_openssl_src) -} Modified: stable/12/crypto/openssl/apps/dhparam.c ============================================================================== --- stable/12/crypto/openssl/apps/dhparam.c Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/apps/dhparam.c Fri Apr 24 19:03:18 2020 (r360278) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,29 +8,25 @@ */ #include -#ifdef OPENSSL_NO_DH -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include +#ifndef OPENSSL_NO_DSA +# include +#endif -# ifndef OPENSSL_NO_DSA -# include -# endif +#define DEFBITS 2048 -# define DEFBITS 2048 - static int dh_cb(int p, int n, BN_GENCB *cb); typedef enum OPTION_choice { @@ -56,13 +52,13 @@ const OPTIONS dhparam_options[] = { {"C", OPT_C, '-', "Print C code"}, {"2", OPT_2, '-', "Generate parameters using 2 as the generator value"}, {"5", OPT_5, '-', "Generate parameters using 5 as the generator value"}, -# ifndef OPENSSL_NO_DSA +#ifndef OPENSSL_NO_DSA {"dsaparam", OPT_DSAPARAM, '-', "Read or generate DSA parameters, convert to DH"}, -# endif -# ifndef OPENSSL_NO_ENGINE +#endif +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -146,13 +142,13 @@ int dhparam_main(int argc, char **argv) if (g && !num) num = DEFBITS; -# ifndef OPENSSL_NO_DSA +#ifndef OPENSSL_NO_DSA if (dsaparam && g) { BIO_printf(bio_err, "generator may not be chosen for DSA parameters\n"); goto end; } -# endif +#endif out = bio_open_default(outfile, 'w', outformat); if (out == NULL) @@ -173,7 +169,7 @@ int dhparam_main(int argc, char **argv) BN_GENCB_set(cb, dh_cb, bio_err); -# ifndef OPENSSL_NO_DSA +#ifndef OPENSSL_NO_DSA if (dsaparam) { DSA *dsa = DSA_new(); @@ -196,7 +192,7 @@ int dhparam_main(int argc, char **argv) goto end; } } else -# endif +#endif { dh = DH_new(); BIO_printf(bio_err, @@ -217,7 +213,7 @@ int dhparam_main(int argc, char **argv) if (in == NULL) goto end; -# ifndef OPENSSL_NO_DSA +#ifndef OPENSSL_NO_DSA if (dsaparam) { DSA *dsa; @@ -239,7 +235,7 @@ int dhparam_main(int argc, char **argv) goto end; } } else -# endif +#endif { if (informat == FORMAT_ASN1) { /* @@ -376,4 +372,3 @@ static int dh_cb(int p, int n, BN_GENCB *cb) (void)BIO_flush(BN_GENCB_get_arg(cb)); return 1; } -#endif Modified: stable/12/crypto/openssl/apps/dsa.c ============================================================================== --- stable/12/crypto/openssl/apps/dsa.c Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/apps/dsa.c Fri Apr 24 19:03:18 2020 (r360278) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,24 +8,20 @@ */ #include -#ifdef OPENSSL_NO_DSA -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include -# include - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_INFORM, OPT_OUTFORM, OPT_IN, OPT_OUT, OPT_ENGINE, @@ -49,14 +45,14 @@ const OPTIONS dsa_options[] = { {"passin", OPT_PASSIN, 's', "Input file pass phrase source"}, {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, {"", OPT_CIPHER, '-', "Any supported cipher"}, -# ifndef OPENSSL_NO_RC4 +#ifndef OPENSSL_NO_RC4 {"pvk-strong", OPT_PVK_STRONG, '-', "Enable 'Strong' PVK encoding level (default)"}, {"pvk-weak", OPT_PVK_WEAK, '-', "Enable 'Weak' PVK encoding level"}, {"pvk-none", OPT_PVK_NONE, '-', "Don't enforce PVK encoding"}, -# endif -# ifndef OPENSSL_NO_ENGINE +#endif +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -71,9 +67,9 @@ int dsa_main(int argc, char **argv) OPTION_CHOICE o; int informat = FORMAT_PEM, outformat = FORMAT_PEM, text = 0, noout = 0; int i, modulus = 0, pubin = 0, pubout = 0, ret = 1; -# ifndef OPENSSL_NO_RC4 +#ifndef OPENSSL_NO_RC4 int pvk_encr = 2; -# endif +#endif int private = 0; prog = opt_init(argc, argv, dsa_options); @@ -214,7 +210,7 @@ int dsa_main(int argc, char **argv) i = PEM_write_bio_DSAPrivateKey(out, dsa, enc, NULL, 0, NULL, passout); } -# ifndef OPENSSL_NO_RSA +#ifndef OPENSSL_NO_RSA } else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) { EVP_PKEY *pk; pk = EVP_PKEY_new(); @@ -229,13 +225,13 @@ int dsa_main(int argc, char **argv) goto end; } assert(private); -# ifdef OPENSSL_NO_RC4 +# ifdef OPENSSL_NO_RC4 BIO_printf(bio_err, "PVK format not supported\n"); EVP_PKEY_free(pk); goto end; -# else +# else i = i2b_PVK_bio(out, pk, pvk_encr, 0, passout); -# endif +# endif } else if (pubin || pubout) { i = i2b_PublicKey_bio(out, pk); } else { @@ -243,7 +239,7 @@ int dsa_main(int argc, char **argv) i = i2b_PrivateKey_bio(out, pk); } EVP_PKEY_free(pk); -# endif +#endif } else { BIO_printf(bio_err, "bad output format specified for outfile\n"); goto end; @@ -262,4 +258,3 @@ int dsa_main(int argc, char **argv) OPENSSL_free(passout); return ret; } -#endif Modified: stable/12/crypto/openssl/apps/dsaparam.c ============================================================================== --- stable/12/crypto/openssl/apps/dsaparam.c Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/apps/dsaparam.c Fri Apr 24 19:03:18 2020 (r360278) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,23 +8,19 @@ */ #include -#ifdef OPENSSL_NO_DSA -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include - static int dsa_cb(int p, int n, BN_GENCB *cb); typedef enum OPTION_choice { @@ -44,9 +40,9 @@ const OPTIONS dsaparam_options[] = { {"noout", OPT_NOOUT, '-', "No output"}, {"genkey", OPT_GENKEY, '-', "Generate a DSA key"}, OPT_R_OPTIONS, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -255,4 +251,3 @@ static int dsa_cb(int p, int n, BN_GENCB *cb) (void)BIO_flush(BN_GENCB_get_arg(cb)); return 1; } -#endif Modified: stable/12/crypto/openssl/apps/ec.c ============================================================================== --- stable/12/crypto/openssl/apps/ec.c Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/apps/ec.c Fri Apr 24 19:03:18 2020 (r360278) @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,20 +8,16 @@ */ #include -#ifdef OPENSSL_NO_EC -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include - static OPT_PAIR conv_forms[] = { {"compressed", POINT_CONVERSION_COMPRESSED}, {"uncompressed", POINT_CONVERSION_UNCOMPRESSED}, @@ -62,9 +58,9 @@ const OPTIONS ec_options[] = { "Specifies the way the ec parameters are encoded"}, {"conv_form", OPT_CONV_FORM, 's', "Specifies the point conversion form "}, {"", OPT_CIPHER, '-', "Any supported cipher"}, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -280,4 +276,3 @@ int ec_main(int argc, char **argv) OPENSSL_free(passout); return ret; } -#endif Modified: stable/12/crypto/openssl/apps/ecparam.c ============================================================================== --- stable/12/crypto/openssl/apps/ecparam.c Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/apps/ecparam.c Fri Apr 24 19:03:18 2020 (r360278) @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved * * Licensed under the OpenSSL license (the "License"). You may not use @@ -9,23 +9,19 @@ */ #include -#ifdef OPENSSL_NO_EC -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_INFORM, OPT_OUTFORM, OPT_IN, OPT_OUT, OPT_TEXT, OPT_C, @@ -55,9 +51,9 @@ const OPTIONS ecparam_options[] = { "Specifies the way the ec parameters are encoded"}, {"genkey", OPT_GENKEY, '-', "Generate ec key"}, OPT_R_OPTIONS, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -446,5 +442,3 @@ int ecparam_main(int argc, char **argv) BIO_free_all(out); return ret; } - -#endif Modified: stable/12/crypto/openssl/apps/engine.c ============================================================================== --- stable/12/crypto/openssl/apps/engine.c Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/apps/engine.c Fri Apr 24 19:03:18 2020 (r360278) @@ -1,5 +1,5 @@ /* - * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,20 +8,16 @@ */ #include -#ifdef OPENSSL_NO_ENGINE -NON_EMPTY_TRANSLATION_UNIT -#else +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include +#include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include -# include - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_C, OPT_T, OPT_TT, OPT_PRE, OPT_POST, @@ -486,4 +482,3 @@ int engine_main(int argc, char **argv) BIO_free_all(out); return ret; } -#endif Modified: stable/12/crypto/openssl/apps/gendsa.c ============================================================================== --- stable/12/crypto/openssl/apps/gendsa.c Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/apps/gendsa.c Fri Apr 24 19:03:18 2020 (r360278) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,23 +8,19 @@ */ #include -#ifdef OPENSSL_NO_DSA -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include - typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_OUT, OPT_PASSOUT, OPT_ENGINE, OPT_CIPHER, @@ -39,9 +35,9 @@ const OPTIONS gendsa_options[] = { {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, OPT_R_OPTIONS, {"", OPT_CIPHER, '-', "Encrypt the output with any supported cipher"}, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif {NULL} }; @@ -143,4 +139,3 @@ int gendsa_main(int argc, char **argv) OPENSSL_free(passout); return ret; } -#endif Modified: stable/12/crypto/openssl/apps/genrsa.c ============================================================================== --- stable/12/crypto/openssl/apps/genrsa.c Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/apps/genrsa.c Fri Apr 24 19:03:18 2020 (r360278) @@ -1,5 +1,5 @@ /* - * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -8,28 +8,24 @@ */ #include -#ifdef OPENSSL_NO_RSA -NON_EMPTY_TRANSLATION_UNIT -#else +#include +#include +#include +#include +#include "apps.h" +#include "progs.h" +#include +#include +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include "apps.h" -# include "progs.h" -# include -# include -# include -# include -# include -# include -# include -# include +#define DEFBITS 2048 +#define DEFPRIMES 2 -# define DEFBITS 2048 -# define DEFPRIMES 2 - static int genrsa_cb(int p, int n, BN_GENCB *cb); typedef enum OPTION_choice { @@ -48,9 +44,9 @@ const OPTIONS genrsa_options[] = { OPT_R_OPTIONS, {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, {"", OPT_CIPHER, '-', "Encrypt the output with any supported cipher"}, -# ifndef OPENSSL_NO_ENGINE +#ifndef OPENSSL_NO_ENGINE {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -# endif +#endif {"primes", OPT_PRIMES, 'p', "Specify number of primes"}, {NULL} }; @@ -198,4 +194,3 @@ static int genrsa_cb(int p, int n, BN_GENCB *cb) (void)BIO_flush(BN_GENCB_get_arg(cb)); return 1; } -#endif Modified: stable/12/crypto/openssl/apps/ocsp.c ============================================================================== --- stable/12/crypto/openssl/apps/ocsp.c Fri Apr 24 18:47:57 2020 (r360277) +++ stable/12/crypto/openssl/apps/ocsp.c Fri Apr 24 19:03:18 2020 (r360278) @@ -1,5 +1,5 @@ /* - * Copyright 2001-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -9,65 +9,62 @@ #include -#ifdef OPENSSL_NO_OCSP -NON_EMPTY_TRANSLATION_UNIT -#else -# ifdef OPENSSL_SYS_VMS -# define _XOPEN_SOURCE_EXTENDED/* So fd_set and friends get properly defined +#ifdef OPENSSL_SYS_VMS +# define _XOPEN_SOURCE_EXTENDED/* So fd_set and friends get properly defined * on OpenVMS */ -# endif +#endif -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include /* Needs to be included before the openssl headers */ -# include "apps.h" -# include "progs.h" -# include "internal/sockets.h" -# include -# include -# include -# include -# include -# include -# include -# include +#include "apps.h" +#include "progs.h" +#include "internal/sockets.h" +#include +#include +#include +#include +#include +#include +#include +#include #ifndef HAVE_FORK -# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) -# define HAVE_FORK 0 -# else -# define HAVE_FORK 1 -# endif +#if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) +# define HAVE_FORK 0 +#else +# define HAVE_FORK 1 #endif +#endif #if HAVE_FORK -# undef NO_FORK +#undef NO_FORK #else -# define NO_FORK +#define NO_FORK #endif -# if !defined(NO_FORK) && !defined(OPENSSL_NO_SOCK) \ +#if !defined(NO_FORK) && !defined(OPENSSL_NO_SOCK) \ && !defined(OPENSSL_NO_POSIX_IO) -# define OCSP_DAEMON -# include -# include -# include -# include -# define MAXERRLEN 1000 /* limit error text sent to syslog to 1000 bytes */ -# else -# undef LOG_INFO -# undef LOG_WARNING -# undef LOG_ERR -# define LOG_INFO 0 -# define LOG_WARNING 1 -# define LOG_ERR 2 -# endif +# define OCSP_DAEMON +# include +# include +# include +# include +# define MAXERRLEN 1000 /* limit error text sent to syslog to 1000 bytes */ +#else +# undef LOG_INFO +# undef LOG_WARNING +# undef LOG_ERR +# define LOG_INFO 0 +# define LOG_WARNING 1 +# define LOG_ERR 2 +#endif -# if defined(OPENSSL_SYS_VXWORKS) +#if defined(OPENSSL_SYS_VXWORKS) /* not supported */ int setpgid(pid_t pid, pid_t pgid) { @@ -80,9 +77,9 @@ pid_t fork(void) errno = ENOSYS; return (pid_t) -1; } -# endif +#endif /* Maximum leeway in validity period: default 5 minutes */ -# define MAX_VALIDITY_PERIOD (5 * 60) +#define MAX_VALIDITY_PERIOD (5 * 60) static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, const EVP_MD *cert_id_md, X509 *issuer, @@ -109,20 +106,20 @@ static void log_message(int level, const char *fmt, .. static char *prog; static int multi = 0; -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON static int acfd = (int) INVALID_SOCKET; static int index_changed(CA_DB *); static void spawn_loop(void); static int print_syslog(const char *str, size_t len, void *levPtr); static void socket_timeout(int signum); -# endif +#endif -# ifndef OPENSSL_NO_SOCK +#ifndef OPENSSL_NO_SOCK static OCSP_RESPONSE *query_responder(BIO *cbio, const char *host, const char *path, const STACK_OF(CONF_VALUE) *headers, OCSP_REQUEST *req, int req_timeout); -# endif +#endif typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, @@ -160,9 +157,9 @@ const OPTIONS ocsp_options[] = { "Don't include any certificates in response"}, {"resp_key_id", OPT_RESP_KEY_ID, '-', "Identify response by signing certificate key ID"}, -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON {"multi", OPT_MULTI, 'p', "run multiple responder processes"}, -# endif +#endif {"no_certs", OPT_NO_CERTS, '-', "Don't include any certificates in signed request"}, {"no_signature_verify", OPT_NO_SIGNATURE_VERIFY, '-', @@ -511,9 +508,9 @@ int ocsp_main(int argc, char **argv) trailing_md = 1; break; case OPT_MULTI: -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON multi = atoi(opt_arg()); -# endif +#endif break; } } @@ -593,7 +590,7 @@ int ocsp_main(int argc, char **argv) } } -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON if (multi && acbio != NULL) spawn_loop(); if (acbio != NULL && req_timeout > 0) @@ -606,7 +603,7 @@ int ocsp_main(int argc, char **argv) redo_accept: if (acbio != NULL) { -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON if (index_changed(rdb)) { CA_DB *newrdb = load_index(ridx_filename, NULL); @@ -619,7 +616,7 @@ redo_accept: ridx_filename); } } -# endif +#endif req = NULL; if (!do_responder(&req, &cbio, acbio, req_timeout)) @@ -688,16 +685,16 @@ redo_accept: if (cbio != NULL) send_ocsp_response(cbio, resp); } else if (host != NULL) { -# ifndef OPENSSL_NO_SOCK +#ifndef OPENSSL_NO_SOCK resp = process_responder(req, host, path, port, use_ssl, headers, req_timeout); if (resp == NULL) goto end; -# else +#else BIO_printf(bio_err, "Error creating connect BIO - sockets not supported.\n"); goto end; -# endif +#endif } else if (respin != NULL) { derbio = bio_open_default(respin, 'r', FORMAT_ASN1); if (derbio == NULL) @@ -840,7 +837,7 @@ log_message(int level, const char *fmt, ...) va_list ap; va_start(ap, fmt); -# ifdef OCSP_DAEMON +#ifdef OCSP_DAEMON if (multi) { char buf[1024]; if (vsnprintf(buf, sizeof(buf), fmt, ap) > 0) { @@ -849,7 +846,7 @@ log_message(int level, const char *fmt, ...) if (level >= LOG_ERR) ERR_print_errors_cb(print_syslog, &level); } -# endif +#endif if (!multi) { BIO_printf(bio_err, "%s: ", prog); BIO_vprintf(bio_err, fmt, ap); @@ -858,7 +855,7 @@ log_message(int level, const char *fmt, ...) va_end(ap); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Apr 24 19:43:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A3412C0BC1; Fri, 24 Apr 2020 19:43:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4984Mv6YbLz4392; Fri, 24 Apr 2020 19:43:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC3612346E; Fri, 24 Apr 2020 19:43:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OJh7YE029441; Fri, 24 Apr 2020 19:43:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OJh7ED029440; Fri, 24 Apr 2020 19:43:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202004241943.03OJh7ED029440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 24 Apr 2020 19:43:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360279 - stable/11/sys/geom X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/geom X-SVN-Commit-Revision: 360279 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 19:43:08 -0000 Author: mav Date: Fri Apr 24 19:43:07 2020 New Revision: 360279 URL: https://svnweb.freebsd.org/changeset/base/360279 Log: MFC r323977 (by cem): g_resize_provider_event: Do not invoke orphan method twice Like r266444, g_resize_provider_event can attempt to orphan an already orphaned geom_dev consumer. This will cause a panic in g_dev_orphan. Apply the same fix as was applied to g_orphan_register. Modified: stable/11/sys/geom/geom_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/geom_subr.c ============================================================================== --- stable/11/sys/geom/geom_subr.c Fri Apr 24 19:03:18 2020 (r360278) +++ stable/11/sys/geom/geom_subr.c Fri Apr 24 19:43:07 2020 (r360279) @@ -627,6 +627,14 @@ g_resize_provider_event(void *arg, int flag) LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, cp2) { gp = cp->geom; if (gp->resize == NULL && size < pp->mediasize) { + /* + * XXX: g_dev_orphan method does deferred destroying + * and it is possible, that other event could already + * call the orphan method. Check consumer's flags to + * do not schedule it twice. + */ + if (cp->flags & G_CF_ORPHAN) + continue; cp->flags |= G_CF_ORPHAN; cp->geom->orphan(cp); } From owner-svn-src-all@freebsd.org Fri Apr 24 21:21:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 215E82C2FF8; Fri, 24 Apr 2020 21:21:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4986YJ02Zfz48wY; Fri, 24 Apr 2020 21:21:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F04CE2479F; Fri, 24 Apr 2020 21:21:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OLLNn1087774; Fri, 24 Apr 2020 21:21:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OLLNgp087773; Fri, 24 Apr 2020 21:21:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004242121.03OLLNgp087773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2020 21:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360280 - head/sys/mips/mips X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/mips/mips X-SVN-Commit-Revision: 360280 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 21:21:24 -0000 Author: markj Date: Fri Apr 24 21:21:23 2020 New Revision: 360280 URL: https://svnweb.freebsd.org/changeset/base/360280 Log: Fix a race between _pmap_unwire_ptp() and MipsDoTLBMiss(). MipsDoTLBMiss() will load a segmap entry or pde, check that it isn't zero, and then chase that pointer to a physical page. If that page has been freed in the interim, it will read garbage and go on to populate the TLB with it. This can happen because pmap_unwire_ptp zeros out the pde and vm_page_free_zero()s the ptp (or, recursively, zeros out the segmap entry and vm_page_free_zero()s the pdp) without interlocking against MipsDoTLBMiss(). The pmap is locked, and pvh_global_lock may or may not be held, but this is not enough. Solve this issue by inserting TLB shootdowns within _pmap_unwire_ptp(); as MipsDoTLBMiss() runs with IRQs deferred, the IPIs involved in TLB shootdown are sufficient to ensure that MipsDoTLBMiss() sees either a zero segmap entry / pde or a non-zero entry and the pointed-to page still not freed. Submitted by: Nathaniel Filardo Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24491 Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Fri Apr 24 19:43:07 2020 (r360279) +++ head/sys/mips/mips/pmap.c Fri Apr 24 21:21:23 2020 (r360280) @@ -1004,18 +1004,26 @@ static void _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_t m) { pd_entry_t *pde; + vm_offset_t sva, eva; PMAP_LOCK_ASSERT(pmap, MA_OWNED); /* * unmap the page table page */ #ifdef __mips_n64 - if (m->pindex < NUPDE) + if (m->pindex < NUPDE) { pde = pmap_pde(pmap, va); - else + sva = va & ~PDRMASK; + eva = sva + NBPDR; + } else { pde = pmap_segmap(pmap, va); + sva = va & ~SEGMASK; + eva = sva + NBSEG; + } #else pde = pmap_pde(pmap, va); + sva = va & ~SEGMASK; + eva = sva + NBSEG; #endif *pde = 0; pmap->pm_stats.resident_count--; @@ -1026,12 +1034,22 @@ _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_ vm_page_t pdpg; /* - * Recursively decrement next level pagetable refcount + * Recursively decrement next level pagetable refcount. + * Either that shoots down a larger range from TLBs (below) + * or we're to shoot down just the page in question. */ pdp = (pd_entry_t *)*pmap_segmap(pmap, va); pdpg = PHYS_TO_VM_PAGE(MIPS_DIRECT_TO_PHYS(pdp)); - pmap_unwire_ptp(pmap, va, pdpg); + if (!pmap_unwire_ptp(pmap, va, pdpg)) { + pmap_invalidate_range(pmap, sva, eva); + } + } else { + /* Segmap entry shootdown */ + pmap_invalidate_range(pmap, sva, eva); } +#else + /* Segmap entry shootdown */ + pmap_invalidate_range(pmap, sva, eva); #endif /* @@ -1485,7 +1503,15 @@ pmap_pv_reclaim(pmap_t locked_pmap) if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_aflag_clear(m, PGA_WRITEABLE); pc->pc_map[field] |= 1UL << bit; - pmap_unuse_pt(pmap, va, *pde); + + /* + * For simplicity, we will unconditionally shoot + * down TLBs either at the end of this function + * or at the top of the loop above if we switch + * to a different pmap. + */ + (void)pmap_unuse_pt(pmap, va, *pde); + freed++; } } @@ -1714,6 +1740,23 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm_page_t mpte, /* * pmap_remove_pte: do the things to unmap a page in a process + * + * Returns true if this was the last PTE in the PT (and possibly the last PT in + * the PD, and possibly the last PD in the segmap), in which case... + * + * 1) the TLB has been invalidated for the whole PT's span (at least), + * already, to ensure that MipsDoTLBMiss does not attempt to follow a + * dangling pointer into a freed page. No additional TLB shootdown is + * required. + * + * 2) if this removal was part of a sweep to remove PTEs, it is safe to jump + * to the PT span boundary and continue. + * + * 3) The given pde may now point onto a freed page and must not be + * dereferenced + * + * If the return value is false, the TLB has not been shot down (and the segmap + * entry, PD, and PT all remain in place). */ static int pmap_remove_pte(struct pmap *pmap, pt_entry_t *ptq, vm_offset_t va, @@ -1782,8 +1825,12 @@ pmap_remove_page(struct pmap *pmap, vm_offset_t va) if (!pte_test(ptq, PTE_V)) return; - (void)pmap_remove_pte(pmap, ptq, va, *pde); - pmap_invalidate_page(pmap, va); + /* + * Remove this PTE from the PT. If this is the last one, then + * the TLB has already been shot down, so don't bother again + */ + if (!pmap_remove_pte(pmap, ptq, va, *pde)) + pmap_invalidate_page(pmap, va); } /* @@ -1797,7 +1844,9 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t { pd_entry_t *pde, *pdpe; pt_entry_t *pte; - vm_offset_t va, va_next; + vm_offset_t va_next; + vm_offset_t va_init, va_fini; + bool need_tlb_shootdown; /* * Perform an unsynchronized read. This is, however, safe. @@ -1826,6 +1875,8 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t continue; } #endif + + /* Scan up to the end of the page table pointed to by pde */ va_next = (sva + NBPDR) & ~PDRMASK; if (va_next < sva) va_next = eva; @@ -1842,25 +1893,44 @@ pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t if (va_next > eva) va_next = eva; - va = va_next; + need_tlb_shootdown = false; + va_init = sva; + va_fini = va_next; for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, sva += PAGE_SIZE) { + + /* Skip over invalid entries; no need to shootdown */ if (!pte_test(pte, PTE_V)) { - if (va != va_next) { - pmap_invalidate_range(pmap, va, sva); - va = va_next; - } + /* + * If we have not yet found a valid entry, then + * we can move the lower edge of the region to + * invalidate to the next PTE. + */ + if (!need_tlb_shootdown) + va_init = sva + PAGE_SIZE; continue; } - if (va == va_next) - va = sva; + + /* + * A valid entry; the range we are shooting down must + * include this page. va_fini is used instead of sva + * so that if the range ends with a run of !PTE_V PTEs, + * but doesn't clear out so much that pmap_remove_pte + * removes the entire PT, we won't include these !PTE_V + * entries in the region to be shot down. + */ + va_fini = sva + PAGE_SIZE; + if (pmap_remove_pte(pmap, pte, sva, *pde)) { - sva += PAGE_SIZE; + /* Entire PT removed and TLBs shot down. */ + need_tlb_shootdown = false; break; + } else { + need_tlb_shootdown = true; } } - if (va != va_next) - pmap_invalidate_range(pmap, va, sva); + if (need_tlb_shootdown) + pmap_invalidate_range(pmap, va_init, va_fini); } out: rw_wunlock(&pvh_global_lock); @@ -1930,10 +2000,11 @@ pmap_remove_all(vm_page_t m) __func__, (void *)pv->pv_va, (uintmax_t)tpte)); vm_page_dirty(m); } - pmap_invalidate_page(pmap, pv->pv_va); + if (!pmap_unuse_pt(pmap, pv->pv_va, *pde)) + pmap_invalidate_page(pmap, pv->pv_va); + TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - pmap_unuse_pt(pmap, pv->pv_va, *pde); free_pv_entry(pmap, pv); PMAP_UNLOCK(pmap); } @@ -2812,7 +2883,12 @@ pmap_remove_pages(pmap_t pmap) TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_aflag_clear(m, PGA_WRITEABLE); - pmap_unuse_pt(pmap, pv->pv_va, *pde); + + /* + * For simplicity, unconditionally call + * pmap_invalidate_all(), below. + */ + (void)pmap_unuse_pt(pmap, pv->pv_va, *pde); } } if (allfree) { From owner-svn-src-all@freebsd.org Fri Apr 24 21:21:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0B882C3061; Fri, 24 Apr 2020 21:21:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4986Yn67lGz495D; Fri, 24 Apr 2020 21:21:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDFB3247CD; Fri, 24 Apr 2020 21:21:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OLLnqX088812; Fri, 24 Apr 2020 21:21:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OLLnwQ088811; Fri, 24 Apr 2020 21:21:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202004242121.03OLLnwQ088811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 24 Apr 2020 21:21:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360281 - head/sys/mips/mips X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/mips/mips X-SVN-Commit-Revision: 360281 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 21:21:50 -0000 Author: markj Date: Fri Apr 24 21:21:49 2020 New Revision: 360281 URL: https://svnweb.freebsd.org/changeset/base/360281 Log: Fix a race in pmap_emulate_modified(). pmap_emulate_modify() was assuming that no changes to the pmap could take place between the TLB signaling the fault and pmap_emulate_modify()'s acquisition of the pmap lock, but that's clearly not even true in the uniprocessor case, nevermind the SMP case. Submitted by: Nathaniel Filardo Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24523 Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Fri Apr 24 21:21:23 2020 (r360280) +++ head/sys/mips/mips/pmap.c Fri Apr 24 21:21:49 2020 (r360281) @@ -3502,28 +3502,71 @@ pmap_emulate_modified(pmap_t pmap, vm_offset_t va) PMAP_LOCK(pmap); pte = pmap_pte(pmap, va); - if (pte == NULL) - panic("pmap_emulate_modified: can't find PTE"); -#ifdef SMP - /* It is possible that some other CPU changed m-bit */ - if (!pte_test(pte, PTE_V) || pte_test(pte, PTE_D)) { + + /* + * It is possible that some other CPU or thread changed the pmap while + * we weren't looking; in the SMP case, this is readily apparent, but + * it can even happen in the UP case, because we may have been blocked + * on PMAP_LOCK(pmap) above while someone changed this out from + * underneath us. + */ + + if (pte == NULL) { + /* + * This PTE's PTP (or one of its ancestors) has been reclaimed; + * trigger a full fault to reconstruct it via pmap_enter. + */ + PMAP_UNLOCK(pmap); + return (1); + } + + if (!pte_test(pte, PTE_V)) { + /* + * This PTE is no longer valid; the other thread or other + * processor must have arranged for our TLB to no longer + * have this entry, possibly by IPI, so no tlb_update is + * required. Fall out of the fast path and go take a + * general fault before retrying the instruction (or taking + * a signal). + */ + PMAP_UNLOCK(pmap); + return (1); + } + + if (pte_test(pte, PTE_D)) { + /* + * This PTE is valid and has the PTE_D bit asserted; since + * this is an increase in permission, we may have been expected + * to update the TLB lazily. Do so here and return, on the + * fast path, to retry the instruction. + */ tlb_update(pmap, va, *pte); PMAP_UNLOCK(pmap); return (0); } -#else - if (!pte_test(pte, PTE_V) || pte_test(pte, PTE_D)) - panic("pmap_emulate_modified: invalid pte"); -#endif + if (pte_test(pte, PTE_RO)) { + /* + * This PTE is valid, not dirty, and read-only. Go take a + * full fault (most likely to upgrade this part of the address + * space to writeable). + */ PMAP_UNLOCK(pmap); return (1); } - pte_set(pte, PTE_D); - tlb_update(pmap, va, *pte); + if (!pte_test(pte, PTE_MANAGED)) panic("pmap_emulate_modified: unmanaged page"); + + /* + * PTE is valid, managed, not dirty, and not read-only. Set PTE_D + * and eagerly update the local TLB, returning on the fast path. + */ + + pte_set(pte, PTE_D); + tlb_update(pmap, va, *pte); PMAP_UNLOCK(pmap); + return (0); } From owner-svn-src-all@freebsd.org Fri Apr 24 21:30:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3FDF2C31DB; Fri, 24 Apr 2020 21:30:32 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4986lr4hRPz49RZ; Fri, 24 Apr 2020 21:30:32 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C08F24857; Fri, 24 Apr 2020 21:30:32 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OLUW8D091941; Fri, 24 Apr 2020 21:30:32 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OLUVoS091937; Fri, 24 Apr 2020 21:30:31 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202004242130.03OLUVoS091937@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 24 Apr 2020 21:30:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360282 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 360282 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 21:30:32 -0000 Author: tuexen Date: Fri Apr 24 21:30:31 2020 New Revision: 360282 URL: https://svnweb.freebsd.org/changeset/base/360282 Log: Improve the TCP SACK generation by reporting DSACKs MFC r347382: Receiver side DSACK implemenation. This adds initial support for RFC 2883. MFC r347407: Don't use C++ style comments. MFC r349987: This is the second in a number of patches needed to get BBRv1 into the tree. This fixes the DSACK bug but is also needed by BBR. We have yet to go two more one will be for the pacing code (tcp_ratelimit.c) and the second will be for the new updated LRO code that allows a transport to know the arrival times of packets and (tcp_lro.c). After that we should finally be able to get BBRv1 into head. MFC r351725: This patch improves the DSACK handling to conform with RFC 2883. The lowest SACK block is used when multiple Blocks would be elegible as DSACK blocks ACK blocks get reordered - while maintaining the ordering of SACK blocks not relevant in the DSACK context is maintained. MFC r351801: Fix the SACK block generation in the base TCP stack by bringing it in sync with the RACK stack. MFC r352072: Only update SACK/DSACK lists when a non-empty segment was received. This fixes hitting a KASSERT with a valid packet exchange. MFC r352386 Don't write to memory outside of the allocated array for SACK blocks. MFC r356796: Remove debug code not needed anymore. MFC r357100: The server side of TCP fast open relies on the delayed ACK timer to allow including user data in the SYN-ACK. When DSACK support was added in r347382, an immediate ACK was sent even for the received SYN with user data. This patch fixes that and allows again to send user data with the SYN-ACK. This is joint work of rrs, rscheff, and tuexen. Differential Revision: https://reviews.freebsd.org/D19334 Differential Revision: https://reviews.freebsd.org/D20908 Differential Revision: https://reviews.freebsd.org/D21038 Differential Revision: https://reviews.freebsd.org/D21513 Differential Revision: https://reviews.freebsd.org/D21567 Differential Revision: https://reviews.freebsd.org/D23208 Differential Revision: https://reviews.freebsd.org/D23212 Modified: stable/11/sys/netinet/tcp_input.c stable/11/sys/netinet/tcp_output.c stable/11/sys/netinet/tcp_sack.c stable/11/sys/netinet/tcp_var.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_input.c ============================================================================== --- stable/11/sys/netinet/tcp_input.c Fri Apr 24 21:21:49 2020 (r360281) +++ stable/11/sys/netinet/tcp_input.c Fri Apr 24 21:30:31 2020 (r360282) @@ -1539,7 +1539,6 @@ tcp_autorcvbuf(struct mbuf *m, struct tcphdr *th, stru } else { tp->rfbuf_cnt += tlen; /* add up */ } - return (newsize); } @@ -2307,6 +2306,18 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru TCPSTAT_INC(tcps_rcvpartduppack); TCPSTAT_ADD(tcps_rcvpartdupbyte, todrop); } + /* + * DSACK - add SACK block for dropped range + */ + if ((todrop > 0) && (tp->t_flags & TF_SACK_PERMIT)) { + tcp_update_sack_list(tp, th->th_seq, + th->th_seq + todrop); + /* + * ACK now, as the next in-sequence segment + * will clear the DSACK block again + */ + tp->t_flags |= TF_ACKNOW; + } drop_hdrlen += todrop; /* drop from the top afterwards */ th->th_seq += todrop; tlen -= todrop; @@ -3035,6 +3046,8 @@ dodata: /* XXX */ if ((tlen || (thflags & TH_FIN) || tfo_syn) && TCPS_HAVERCVDFIN(tp->t_state) == 0) { tcp_seq save_start = th->th_seq; + tcp_seq save_rnxt = tp->rcv_nxt; + int save_tlen = tlen; m_adj(m, drop_hdrlen); /* delayed header drop */ /* * Insert segment which includes th into TCP reassembly queue @@ -3074,11 +3087,41 @@ dodata: /* XXX */ * m_adj() doesn't actually frees any mbufs * when trimming from the head. */ - thflags = tcp_reass(tp, th, &save_start, &tlen, m); + tcp_seq temp = save_start; + thflags = tcp_reass(tp, th, &temp, &tlen, m); tp->t_flags |= TF_ACKNOW; } - if (tlen > 0 && (tp->t_flags & TF_SACK_PERMIT)) - tcp_update_sack_list(tp, save_start, save_start + tlen); + if ((tp->t_flags & TF_SACK_PERMIT) && (save_tlen > 0)) { + if ((tlen == 0) && (SEQ_LT(save_start, save_rnxt))) { + /* + * DSACK actually handled in the fastpath + * above. + */ + tcp_update_sack_list(tp, save_start, + save_start + save_tlen); + } else if ((tlen > 0) && SEQ_GT(tp->rcv_nxt, save_rnxt)) { + if ((tp->rcv_numsacks >= 1) && + (tp->sackblks[0].end == save_start)) { + /* + * Partial overlap, recorded at todrop + * above. + */ + tcp_update_sack_list(tp, + tp->sackblks[0].start, + tp->sackblks[0].end); + } else { + tcp_update_dsack_list(tp, save_start, + save_start + save_tlen); + } + } else if (tlen >= save_tlen) { + /* Update of sackblks. */ + tcp_update_dsack_list(tp, save_start, + save_start + save_tlen); + } else if (tlen > 0) { + tcp_update_dsack_list(tp, save_start, + save_start + tlen); + } + } #if 0 /* * Note the amount of data that peer has sent into Modified: stable/11/sys/netinet/tcp_output.c ============================================================================== --- stable/11/sys/netinet/tcp_output.c Fri Apr 24 21:21:49 2020 (r360281) +++ stable/11/sys/netinet/tcp_output.c Fri Apr 24 21:30:31 2020 (r360282) @@ -1548,7 +1548,13 @@ timer: if (SEQ_GT(tp->snd_nxt + xlen, tp->snd_max)) tp->snd_max = tp->snd_nxt + xlen; } - + if ((error == 0) && + (TCPS_HAVEESTABLISHED(tp->t_state) && + (tp->t_flags & TF_SACK_PERMIT) && + tp->rcv_numsacks > 0)) { + /* Clean up any DSACK's sent */ + tcp_clean_dsack_blocks(tp); + } if (error) { /* Modified: stable/11/sys/netinet/tcp_sack.c ============================================================================== --- stable/11/sys/netinet/tcp_sack.c Fri Apr 24 21:21:49 2020 (r360281) +++ stable/11/sys/netinet/tcp_sack.c Fri Apr 24 21:30:31 2020 (r360282) @@ -150,7 +150,104 @@ SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, globalholes, &VNET_NAME(tcp_sack_globalholes), 0, "Global number of TCP SACK holes currently allocated"); + /* + * This function will find overlaps with the currently stored sackblocks + * and add any overlap as a dsack block upfront + */ +void +tcp_update_dsack_list(struct tcpcb *tp, tcp_seq rcv_start, tcp_seq rcv_end) +{ + struct sackblk head_blk,mid_blk,saved_blks[MAX_SACK_BLKS]; + int i, j, n, identical; + tcp_seq start, end; + + INP_WLOCK_ASSERT(tp->t_inpcb); + + KASSERT(SEQ_LT(rcv_start, rcv_end), ("rcv_start < rcv_end")); + + if (SEQ_LT(rcv_end, tp->rcv_nxt) || + ((rcv_end == tp->rcv_nxt) && + (tp->rcv_numsacks > 0 ) && + (tp->sackblks[0].end == tp->rcv_nxt))) { + saved_blks[0].start = rcv_start; + saved_blks[0].end = rcv_end; + } else { + saved_blks[0].start = saved_blks[0].end = 0; + } + + head_blk.start = head_blk.end = 0; + mid_blk.start = rcv_start; + mid_blk.end = rcv_end; + identical = 0; + + for (i = 0; i < tp->rcv_numsacks; i++) { + start = tp->sackblks[i].start; + end = tp->sackblks[i].end; + if (SEQ_LT(rcv_end, start)) { + /* pkt left to sack blk */ + continue; + } + if (SEQ_GT(rcv_start, end)) { + /* pkt right to sack blk */ + continue; + } + if (SEQ_GT(tp->rcv_nxt, end)) { + if ((SEQ_MAX(rcv_start, start) != SEQ_MIN(rcv_end, end)) && + (SEQ_GT(head_blk.start, SEQ_MAX(rcv_start, start)) || + (head_blk.start == head_blk.end))) { + head_blk.start = SEQ_MAX(rcv_start, start); + head_blk.end = SEQ_MIN(rcv_end, end); + } + continue; + } + if (((head_blk.start == head_blk.end) || + SEQ_LT(start, head_blk.start)) && + (SEQ_GT(end, rcv_start) && + SEQ_LEQ(start, rcv_end))) { + head_blk.start = start; + head_blk.end = end; + } + mid_blk.start = SEQ_MIN(mid_blk.start, start); + mid_blk.end = SEQ_MAX(mid_blk.end, end); + if ((mid_blk.start == start) && + (mid_blk.end == end)) + identical = 1; + } + if (SEQ_LT(head_blk.start, head_blk.end)) { + /* store overlapping range */ + saved_blks[0].start = SEQ_MAX(rcv_start, head_blk.start); + saved_blks[0].end = SEQ_MIN(rcv_end, head_blk.end); + } + n = 1; + /* + * Second, if not ACKed, store the SACK block that + * overlaps with the DSACK block unless it is identical + */ + if ((SEQ_LT(tp->rcv_nxt, mid_blk.end) && + !((mid_blk.start == saved_blks[0].start) && + (mid_blk.end == saved_blks[0].end))) || + identical == 1) { + saved_blks[n].start = mid_blk.start; + saved_blks[n++].end = mid_blk.end; + } + for (j = 0; (j < tp->rcv_numsacks) && (n < MAX_SACK_BLKS); j++) { + if (((SEQ_LT(tp->sackblks[j].end, mid_blk.start) || + SEQ_GT(tp->sackblks[j].start, mid_blk.end)) && + (SEQ_GT(tp->sackblks[j].start, tp->rcv_nxt)))) + saved_blks[n++] = tp->sackblks[j]; + } + j = 0; + for (i = 0; i < n; i++) { + /* we can end up with a stale inital entry */ + if (SEQ_LT(saved_blks[i].start, saved_blks[i].end)) { + tp->sackblks[j++] = saved_blks[i]; + } + } + tp->rcv_numsacks = j; +} + +/* * This function is called upon receipt of new valid data (while not in * header prediction mode), and it updates the ordered list of sacks. */ @@ -169,11 +266,18 @@ tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_sta INP_WLOCK_ASSERT(tp->t_inpcb); /* Check arguments. */ - KASSERT(SEQ_LT(rcv_start, rcv_end), ("rcv_start < rcv_end")); + KASSERT(SEQ_LEQ(rcv_start, rcv_end), ("rcv_start <= rcv_end")); - /* SACK block for the received segment. */ - head_blk.start = rcv_start; - head_blk.end = rcv_end; + if ((rcv_start == rcv_end) && + (tp->rcv_numsacks >= 1) && + (rcv_end == tp->sackblks[0].end)) { + /* retaining DSACK block below rcv_nxt (todrop) */ + head_blk = tp->sackblks[0]; + } else { + /* SACK block for the received segment. */ + head_blk.start = rcv_start; + head_blk.end = rcv_end; + } /* * Merge updated SACK blocks into head_blk, and save unchanged SACK @@ -194,12 +298,54 @@ tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_sta * Merge this SACK block into head_blk. This SACK * block itself will be discarded. */ - if (SEQ_GT(head_blk.start, start)) + /* + * |-| + * |---| merge + * + * |-| + * |---| merge + * + * |-----| + * |-| DSACK smaller + * + * |-| + * |-----| DSACK smaller + */ + if (head_blk.start == end) head_blk.start = start; - if (SEQ_LT(head_blk.end, end)) + else if (head_blk.end == start) head_blk.end = end; + else { + if (SEQ_LT(head_blk.start, start)) { + tcp_seq temp = start; + start = head_blk.start; + head_blk.start = temp; + } + if (SEQ_GT(head_blk.end, end)) { + tcp_seq temp = end; + end = head_blk.end; + head_blk.end = temp; + } + if ((head_blk.start != start) || + (head_blk.end != end)) { + if ((num_saved >= 1) && + SEQ_GEQ(saved_blks[num_saved-1].start, start) && + SEQ_LEQ(saved_blks[num_saved-1].end, end)) + num_saved--; + saved_blks[num_saved].start = start; + saved_blks[num_saved].end = end; + num_saved++; + } + } } else { /* + * This block supercedes the prior block + */ + if ((num_saved >= 1) && + SEQ_GEQ(saved_blks[num_saved-1].start, start) && + SEQ_LEQ(saved_blks[num_saved-1].end, end)) + num_saved--; + /* * Save this SACK block. */ saved_blks[num_saved].start = start; @@ -212,7 +358,7 @@ tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_sta * Update SACK list in tp->sackblks[]. */ num_head = 0; - if (SEQ_GT(head_blk.start, tp->rcv_nxt)) { + if (SEQ_LT(rcv_start, rcv_end)) { /* * The received data segment is an out-of-order segment. Put * head_blk at the top of SACK list. @@ -226,6 +372,10 @@ tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_sta if (num_saved >= MAX_SACK_BLKS) num_saved--; } + if ((rcv_start == rcv_end) && + (rcv_start == tp->sackblks[0].end)) { + num_head = 1; + } if (num_saved > 0) { /* * Copy the saved SACK blocks back. @@ -236,6 +386,45 @@ tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_sta /* Save the number of SACK blocks. */ tp->rcv_numsacks = num_head + num_saved; +} + +void +tcp_clean_dsack_blocks(struct tcpcb *tp) +{ + struct sackblk saved_blks[MAX_SACK_BLKS]; + int num_saved, i; + + INP_WLOCK_ASSERT(tp->t_inpcb); + /* + * Clean up any DSACK blocks that + * are in our queue of sack blocks. + * + */ + num_saved = 0; + for (i = 0; i < tp->rcv_numsacks; i++) { + tcp_seq start = tp->sackblks[i].start; + tcp_seq end = tp->sackblks[i].end; + if (SEQ_GEQ(start, end) || SEQ_LEQ(start, tp->rcv_nxt)) { + /* + * Discard this D-SACK block. + */ + continue; + } + /* + * Save this SACK block. + */ + saved_blks[num_saved].start = start; + saved_blks[num_saved].end = end; + num_saved++; + } + if (num_saved > 0) { + /* + * Copy the saved SACK blocks back. + */ + bcopy(saved_blks, &tp->sackblks[0], + sizeof(struct sackblk) * num_saved); + } + tp->rcv_numsacks = num_saved; } /* Modified: stable/11/sys/netinet/tcp_var.h ============================================================================== --- stable/11/sys/netinet/tcp_var.h Fri Apr 24 21:21:49 2020 (r360281) +++ stable/11/sys/netinet/tcp_var.h Fri Apr 24 21:30:31 2020 (r360282) @@ -831,7 +831,9 @@ uint32_t tcp_new_ts_offset(struct in_conninfo *); tcp_seq tcp_new_isn(struct in_conninfo *); int tcp_sack_doack(struct tcpcb *, struct tcpopt *, tcp_seq); +void tcp_update_dsack_list(struct tcpcb *, tcp_seq, tcp_seq); void tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_laststart, tcp_seq rcv_lastend); +void tcp_clean_dsack_blocks(struct tcpcb *tp); void tcp_clean_sackreport(struct tcpcb *tp); void tcp_sack_adjust(struct tcpcb *tp); struct sackhole *tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt); From owner-svn-src-all@freebsd.org Fri Apr 24 21:58:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCD4D2C42F6; Fri, 24 Apr 2020 21:58:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4987NR4g35z4CQs; Fri, 24 Apr 2020 21:58:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-164.local (unknown [IPv6:2601:648:8881:1e90:5c82:8b70:e0b1:b6aa]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id E80371E365; Fri, 24 Apr 2020 21:58:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r360241 - head/sys/dev/ichiic To: Andriy Gapon , Justin Hibbits Cc: Warner Losh , src-committers , svn-src-all , svn-src-head References: <202004240749.03O7nMSc066344@repo.freebsd.org> <32586115-2c82-2497-ba4c-b3471887518d@FreeBSD.org> <02449f05-6c43-9cb0-b427-34034a3c358f@FreeBSD.org> <20200424112356.6b8a867e@titan.knownspace> <32d6391a-7d3f-1aaa-2441-8a88e10b94d5@FreeBSD.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <267102f1-1348-db5e-e252-e6825366609e@FreeBSD.org> Date: Fri, 24 Apr 2020 14:58:44 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <32d6391a-7d3f-1aaa-2441-8a88e10b94d5@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 21:58:47 -0000 On 4/24/20 11:48 AM, Andriy Gapon wrote: > On 24/04/2020 19:23, Justin Hibbits wrote: >> Can you look at how ofw_iicbus does this? Everything works just fine >> with that, and it's compiled into the iicbus module as well. Perhaps >> you can pick some ideas from there. >> >> One thing I remember doing on the fsl_i2c driver was to just name the >> driver iichb and everything worked beautifully. Yes, it was sort of a >> cop-out vs adding another attachment, but it solved the problem, and >> does make sense. > > Justin, > > yes, "iichb" is the only name that has special properties because of > DRIVER_MODULE(iicbus, iichb, ...) in icbus.c. > That's essentially the same approach that is used for gpio. > Maybe it's the way. > But there was something that spooked me about many drivers having the same name, > but can't recall what. Drivers can have the same name if they are prepared to handle the same child devices. For example, various Host-PCI and PCI-PCI bridge drivers all use the "pcib" name as they all support having "pci" child devices and provide the pcib_if methods "pci" bus devices expect their parent to have, etc. I suspect in the case of "iichb" the same is true and that would be fine having all these drivers use the same name and rely on the description string to differentiate different vendors, etc. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Apr 24 22:02:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28AF12C4526; Fri, 24 Apr 2020 22:02:23 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4987Sb0H0Qz4Ctc; Fri, 24 Apr 2020 22:02:23 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04CB324FFB; Fri, 24 Apr 2020 22:02:23 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OM2Mvq016420; Fri, 24 Apr 2020 22:02:22 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OM2MwF016395; Fri, 24 Apr 2020 22:02:22 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202004242202.03OM2MwF016395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Fri, 24 Apr 2020 22:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360283 - head/usr.bin/env X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.bin/env X-SVN-Commit-Revision: 360283 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 22:02:23 -0000 Author: 0mp (doc,ports committer) Date: Fri Apr 24 22:02:22 2020 New Revision: 360283 URL: https://svnweb.freebsd.org/changeset/base/360283 Log: Fix invalid use of macros and two typos It turns out that currently mandoc(1) is not handling Fl in Ss correctly (maybe it never was). Let's just replace "Fl S \&Ss ..." with "-S ...". After all, this subsection title is stylized anyway, so Fl is not that helpful. MFC after: 2 weeks Modified: head/usr.bin/env/env.1 Modified: head/usr.bin/env/env.1 ============================================================================== --- head/usr.bin/env/env.1 Fri Apr 24 21:30:31 2020 (r360282) +++ head/usr.bin/env/env.1 Fri Apr 24 22:02:22 2020 (r360283) @@ -31,7 +31,7 @@ .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" $FreeBSD$ .\" -.Dd January 19, 2020 +.Dd April 24, 2020 .Dt ENV 1 .Os .Sh NAME @@ -165,7 +165,7 @@ and .Ar utility may not be specified together. .\" -.Ss Details of Fl S \&Ss (split-string) processing +.Ss Details of -S (split-string) processing The processing of the .Fl S option will split the given @@ -292,11 +292,11 @@ processing. .Pp Also, .Fl S -processing can not reference the value of the special parameters +processing cannot reference the value of the special parameters which are defined by most shells. For instance, .Fl S -can not recognize special parameters such as: +cannot recognize special parameters such as: .Ql $* , .Ql $@ , .Ql $# , From owner-svn-src-all@freebsd.org Fri Apr 24 22:04:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 532B02C45DF; Fri, 24 Apr 2020 22:04:15 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4987Vl1VNrz4D31; Fri, 24 Apr 2020 22:04:15 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E6A025011; Fri, 24 Apr 2020 22:04:15 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OM4EOC016748; Fri, 24 Apr 2020 22:04:14 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OM4EuR016747; Fri, 24 Apr 2020 22:04:14 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202004242204.03OM4EuR016747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Fri, 24 Apr 2020 22:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360284 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 360284 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 22:04:15 -0000 Author: 0mp (doc,ports committer) Date: Fri Apr 24 22:04:14 2020 New Revision: 360284 URL: https://svnweb.freebsd.org/changeset/base/360284 Log: Fix a typo Reported by: pstef MFC after: 2 days Modified: head/lib/libc/sys/procctl.2 Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Fri Apr 24 22:02:22 2020 (r360283) +++ head/lib/libc/sys/procctl.2 Fri Apr 24 22:04:14 2020 (r360284) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 31, 2019 +.Dd April 25, 2020 .Dt PROCCTL 2 .Os .Sh NAME @@ -674,7 +674,7 @@ or invalid signal number. .Xr dtrace 1 , .Xr proccontrol 1 , .Xr protect 1 , -.Xr cap_enter 2, +.Xr cap_enter 2 , .Xr kill 2 , .Xr ktrace 2 , .Xr mmap 2 , From owner-svn-src-all@freebsd.org Fri Apr 24 22:10:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A0C92C4859; Fri, 24 Apr 2020 22:10:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4987dR1Gfxz4DLL; Fri, 24 Apr 2020 22:10:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 227172501C; Fri, 24 Apr 2020 22:10:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OMA2S7017082; Fri, 24 Apr 2020 22:10:02 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OMA2sL017081; Fri, 24 Apr 2020 22:10:02 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004242210.03OMA2sL017081@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 24 Apr 2020 22:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360285 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 360285 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 22:10:03 -0000 Author: jhb Date: Fri Apr 24 22:10:02 2020 New Revision: 360285 URL: https://svnweb.freebsd.org/changeset/base/360285 Log: Don't indirect user pointers directly in two 802.11s ioctls. IEEE80211_MESH_RTCMD_ADD was invoking memcmp() to validate the supplied address directly on the user pointer rather than first doing a copyin() and validating the copied value. IEEE80211_MESH_RTCMD_DELETE was passing the user pointer directly to ieee80211_mesh_rt_del() rather than copying the user buffer into a temporary kernel buffer. Reviewed by: brooks, kib Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24562 Modified: head/sys/net80211/ieee80211_mesh.c Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Fri Apr 24 22:04:14 2020 (r360284) +++ head/sys/net80211/ieee80211_mesh.c Fri Apr 24 22:10:02 2020 (r360285) @@ -3575,16 +3575,21 @@ mesh_ioctl_set80211(struct ieee80211vap *vap, struct i ieee80211_mesh_rt_flush(vap); break; case IEEE80211_MESH_RTCMD_ADD: - if (IEEE80211_ADDR_EQ(vap->iv_myaddr, ireq->i_data) || - IEEE80211_ADDR_EQ(broadcastaddr, ireq->i_data)) - return EINVAL; - error = copyin(ireq->i_data, &tmpaddr, + error = copyin(ireq->i_data, tmpaddr, IEEE80211_ADDR_LEN); - if (error == 0) - ieee80211_mesh_discover(vap, tmpaddr, NULL); + if (error != 0) + break; + if (IEEE80211_ADDR_EQ(vap->iv_myaddr, tmpaddr) || + IEEE80211_ADDR_EQ(broadcastaddr, tmpaddr)) + return EINVAL; + ieee80211_mesh_discover(vap, tmpaddr, NULL); break; case IEEE80211_MESH_RTCMD_DELETE: - ieee80211_mesh_rt_del(vap, ireq->i_data); + error = copyin(ireq->i_data, tmpaddr, + IEEE80211_ADDR_LEN); + if (error != 0) + break; + ieee80211_mesh_rt_del(vap, tmpaddr); break; default: return ENOSYS; From owner-svn-src-all@freebsd.org Fri Apr 24 22:17:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 674A02C4AB0; Fri, 24 Apr 2020 22:17:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4987nk254lz4Dmk; Fri, 24 Apr 2020 22:17:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 28958251F9; Fri, 24 Apr 2020 22:17:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03OMHEBk022992; Fri, 24 Apr 2020 22:17:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03OMHEUd022991; Fri, 24 Apr 2020 22:17:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202004242217.03OMHEUd022991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 24 Apr 2020 22:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360286 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 360286 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 22:17:14 -0000 Author: jhb Date: Fri Apr 24 22:17:13 2020 New Revision: 360286 URL: https://svnweb.freebsd.org/changeset/base/360286 Log: MFC 349871: Use 'retval' label for first error in syscallenter(). This is more consistent with the rest of the function and lets us unindent most of the function. Sponsored by: DARPA Modified: stable/12/sys/kern/subr_syscall.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/subr_syscall.c ============================================================================== --- stable/12/sys/kern/subr_syscall.c Fri Apr 24 22:10:02 2020 (r360285) +++ stable/12/sys/kern/subr_syscall.c Fri Apr 24 22:17:13 2020 (r360286) @@ -85,69 +85,68 @@ syscallenter(struct thread *td) (uintptr_t)td, "pid:%d", td->td_proc->p_pid, "arg0:%p", sa->args[0], "arg1:%p", sa->args[1], "arg2:%p", sa->args[2]); - if (error == 0) { + if (error != 0) + goto retval; - STOPEVENT(p, S_SCE, sa->narg); - if (p->p_flag & P_TRACED) { - PROC_LOCK(p); - if (p->p_ptevents & PTRACE_SCE) - ptracestop((td), SIGTRAP, NULL); - PROC_UNLOCK(p); - } - if (td->td_dbgflags & TDB_USERWR) { - /* - * Reread syscall number and arguments if - * debugger modified registers or memory. - */ - error = (p->p_sysent->sv_fetch_syscall_args)(td); + STOPEVENT(p, S_SCE, sa->narg); + if ((p->p_flag & P_TRACED) != 0) { + PROC_LOCK(p); + if (p->p_ptevents & PTRACE_SCE) + ptracestop((td), SIGTRAP, NULL); + PROC_UNLOCK(p); + } + if ((td->td_dbgflags & TDB_USERWR) != 0) { + /* + * Reread syscall number and arguments if debugger + * modified registers or memory. + */ + error = (p->p_sysent->sv_fetch_syscall_args)(td); #ifdef KTRACE - if (KTRPOINT(td, KTR_SYSCALL)) - ktrsyscall(sa->code, sa->narg, sa->args); + if (KTRPOINT(td, KTR_SYSCALL)) + ktrsyscall(sa->code, sa->narg, sa->args); #endif - if (error != 0) - goto retval; - } + if (error != 0) + goto retval; + } #ifdef CAPABILITY_MODE - /* - * In capability mode, we only allow access to system calls - * flagged with SYF_CAPENABLED. - */ - if (IN_CAPABILITY_MODE(td) && - !(sa->callp->sy_flags & SYF_CAPENABLED)) { - error = ECAPMODE; - goto retval; - } + /* + * In capability mode, we only allow access to system calls + * flagged with SYF_CAPENABLED. + */ + if (IN_CAPABILITY_MODE(td) && + !(sa->callp->sy_flags & SYF_CAPENABLED)) { + error = ECAPMODE; + goto retval; + } #endif - error = syscall_thread_enter(td, sa->callp); - if (error != 0) - goto retval; + error = syscall_thread_enter(td, sa->callp); + if (error != 0) + goto retval; #ifdef KDTRACE_HOOKS - /* Give the syscall:::entry DTrace probe a chance to fire. */ - if (__predict_false(systrace_enabled && - sa->callp->sy_entry != 0)) - (*systrace_probe_func)(sa, SYSTRACE_ENTRY, 0); + /* Give the syscall:::entry DTrace probe a chance to fire. */ + if (__predict_false(systrace_enabled && sa->callp->sy_entry != 0)) + (*systrace_probe_func)(sa, SYSTRACE_ENTRY, 0); #endif - AUDIT_SYSCALL_ENTER(sa->code, td); - error = (sa->callp->sy_call)(td, sa->args); - AUDIT_SYSCALL_EXIT(error, td); + AUDIT_SYSCALL_ENTER(sa->code, td); + error = (sa->callp->sy_call)(td, sa->args); + AUDIT_SYSCALL_EXIT(error, td); - /* Save the latest error return value. */ - if ((td->td_pflags & TDP_NERRNO) == 0) - td->td_errno = error; + /* Save the latest error return value. */ + if ((td->td_pflags & TDP_NERRNO) == 0) + td->td_errno = error; #ifdef KDTRACE_HOOKS - /* Give the syscall:::return DTrace probe a chance to fire. */ - if (__predict_false(systrace_enabled && - sa->callp->sy_return != 0)) - (*systrace_probe_func)(sa, SYSTRACE_RETURN, - error ? -1 : td->td_retval[0]); + /* Give the syscall:::return DTrace probe a chance to fire. */ + if (__predict_false(systrace_enabled && sa->callp->sy_return != 0)) + (*systrace_probe_func)(sa, SYSTRACE_RETURN, + error ? -1 : td->td_retval[0]); #endif - syscall_thread_exit(td, sa->callp); - } + syscall_thread_exit(td, sa->callp); + retval: KTR_STOP4(KTR_SYSC, "syscall", syscallname(p, sa->code), (uintptr_t)td, "pid:%d", td->td_proc->p_pid, "error:%d", error, From owner-svn-src-all@freebsd.org Sat Apr 25 00:14:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62FBC2C697B; Sat, 25 Apr 2020 00:14:18 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498BNp1mJ2z4K6N; Sat, 25 Apr 2020 00:14:18 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37D0826895; Sat, 25 Apr 2020 00:14:18 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03P0EIii096000; Sat, 25 Apr 2020 00:14:18 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03P0EIhi095999; Sat, 25 Apr 2020 00:14:18 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004250014.03P0EIhi095999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 25 Apr 2020 00:14:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360287 - head/usr.sbin/freebsd-update X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/freebsd-update X-SVN-Commit-Revision: 360287 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 00:14:18 -0000 Author: kevans Date: Sat Apr 25 00:14:17 2020 New Revision: 360287 URL: https://svnweb.freebsd.org/changeset/base/360287 Log: freebsd-update: rehash certs With the inclusion of caroot bits, we'll need to also rehash on update as we do in mergemaster/etcupdate. If certctl's installed on the system, just unconditionally rehash. This isn't an expensive operation, and we can refine it to compare INDEX-{OLD,NEW} later if we really want to. Reviewed by: emaste, allanjude MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D21805 Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Fri Apr 24 22:17:13 2020 (r360286) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Sat Apr 25 00:14:17 2020 (r360287) @@ -2876,7 +2876,7 @@ install_delete () { rm newfiles killfiles } -# Install new files, delete old files, and update linker.hints +# Install new files, delete old files, and update generated files install_files () { # If we haven't already dealt with the kernel, deal with it. if ! [ -f $1/kerneldone ]; then @@ -2943,6 +2943,11 @@ Kernel updates have been installed. Please reboot and grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 + + # Rehash certs if we actually have certctl installed. + if which certctl>/dev/null; then + env DESTDIR=${BASEDIR} certctl rehash + fi # Rebuild generated pwd files. if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] || From owner-svn-src-all@freebsd.org Sat Apr 25 00:57:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 530452C7490; Sat, 25 Apr 2020 00:57:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498CM11Mhzz4LtW; Sat, 25 Apr 2020 00:57:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25C7A27034; Sat, 25 Apr 2020 00:57:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03P0vmT5020911; Sat, 25 Apr 2020 00:57:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03P0vmMO020910; Sat, 25 Apr 2020 00:57:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202004250057.03P0vmMO020910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 25 Apr 2020 00:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360288 - head/usr.sbin/bluetooth/hccontrol X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 360288 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 00:57:49 -0000 Author: hselasky Date: Sat Apr 25 00:57:48 2020 New Revision: 360288 URL: https://svnweb.freebsd.org/changeset/base/360288 Log: Put advertising data in correct place. Submitted by: Marc Veldman PR: 245848 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/usr.sbin/bluetooth/hccontrol/le.c Modified: head/usr.sbin/bluetooth/hccontrol/le.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 25 00:14:17 2020 (r360287) +++ head/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 25 00:57:48 2020 (r360288) @@ -491,6 +491,7 @@ le_set_advertising_data(int s, int argc, char *argv[]) parse_param(argc, argv, buf, &len); memset(cp.advertising_data, 0, sizeof(cp.advertising_data)); cp.advertising_data_length = len; + memcpy(cp.advertising_data, buf, len); if (hci_request(s, NG_HCI_OPCODE(NG_HCI_OGF_LE, NG_HCI_OCF_LE_SET_ADVERTISING_DATA), From owner-svn-src-all@freebsd.org Sat Apr 25 02:19:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CCAE02C880E; Sat, 25 Apr 2020 02:19:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498F8h4lz4z4PVT; Sat, 25 Apr 2020 02:19:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A4E927F53; Sat, 25 Apr 2020 02:19:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03P2J0Rp069644; Sat, 25 Apr 2020 02:19:00 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03P2IxP0069636; Sat, 25 Apr 2020 02:18:59 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202004250218.03P2IxP0069636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 25 Apr 2020 02:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360289 - in head/sys/fs: nfs nfsclient nfsserver X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys/fs: nfs nfsclient nfsserver X-SVN-Commit-Revision: 360289 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 02:19:00 -0000 Author: rmacklem Date: Sat Apr 25 02:18:59 2020 New Revision: 360289 URL: https://svnweb.freebsd.org/changeset/base/360289 Log: Remove Mac OS/X macros that did nothing for FreeBSD. The macros CAST_USER_ADDR_T() and CAST_DOWN() were used for the Mac OS/X port. The first of these macros was a no-op for FreeBSD and the second is no longer used. This patch gets rid of them. It also deletes the "mbuf_t" typedef which is no longer used in the FreeBSD code from nfskpiport.h This patch should not change semantics. Modified: head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfskpiport.h head/sys/fs/nfsclient/nfs_clcomsubs.c head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Sat Apr 25 00:57:48 2020 (r360288) +++ head/sys/fs/nfs/nfs_commonsubs.c Sat Apr 25 02:18:59 2020 (r360289) @@ -652,7 +652,7 @@ nfsm_mbufuio(struct nfsrv_descript *nd, struct uio *ui if (uiop->uio_segflg == UIO_SYSSPACE) NFSBCOPY(mbufcp, uiocp, xfer); else - copyout(mbufcp, CAST_USER_ADDR_T(uiocp), xfer); + copyout(mbufcp, uiocp, xfer); left -= xfer; len -= xfer; mbufcp += xfer; @@ -3759,8 +3759,7 @@ nfssvc_idname(struct nfsd_idargs *nidp) } if (nidp->nid_flag & NFSID_INITIALIZE) { cp = malloc(nidp->nid_namelen + 1, M_NFSSTRING, M_WAITOK); - error = copyin(CAST_USER_ADDR_T(nidp->nid_name), cp, - nidp->nid_namelen); + error = copyin(nidp->nid_name, cp, nidp->nid_namelen); if (error != 0) { free(cp, M_NFSSTRING); goto out; @@ -3856,13 +3855,13 @@ nfssvc_idname(struct nfsd_idargs *nidp) */ newusrp = malloc(sizeof(struct nfsusrgrp) + nidp->nid_namelen, M_NFSUSERGROUP, M_WAITOK | M_ZERO); - error = copyin(CAST_USER_ADDR_T(nidp->nid_name), newusrp->lug_name, + error = copyin(nidp->nid_name, newusrp->lug_name, nidp->nid_namelen); if (error == 0 && nidp->nid_ngroup > 0 && (nidp->nid_flag & NFSID_ADDUID) != 0) { grps = malloc(sizeof(gid_t) * nidp->nid_ngroup, M_TEMP, M_WAITOK); - error = copyin(CAST_USER_ADDR_T(nidp->nid_grps), grps, + error = copyin(nidp->nid_grps, grps, sizeof(gid_t) * nidp->nid_ngroup); if (error == 0) { /* Modified: head/sys/fs/nfs/nfskpiport.h ============================================================================== --- head/sys/fs/nfs/nfskpiport.h Sat Apr 25 00:57:48 2020 (r360288) +++ head/sys/fs/nfs/nfskpiport.h Sat Apr 25 02:18:59 2020 (r360289) @@ -43,13 +43,9 @@ typedef struct vnode * vnode_t; #define vnode_mount(v) ((v)->v_mount) #define vnode_vtype(v) ((v)->v_type) -typedef struct mbuf * mbuf_t; - /* * This stuff is needed by Darwin for handling the uio structure. */ -#define CAST_USER_ADDR_T(a) (a) -#define CAST_DOWN(c, a) ((c) (a)) #define uio_uio_resid(p) ((p)->uio_resid) #define uio_uio_resid_add(p, v) ((p)->uio_resid += (v)) #define uio_uio_resid_set(p, v) ((p)->uio_resid = (v)) Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clcomsubs.c Sat Apr 25 00:57:48 2020 (r360288) +++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sat Apr 25 02:18:59 2020 (r360289) @@ -105,8 +105,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *ui NFSBCOPY(uiocp, mtod(mp, caddr_t) + mp->m_len, xfer); else - copyin(CAST_USER_ADDR_T(uiocp), mtod(mp, caddr_t) - + mp->m_len, xfer); + copyin(uiocp, mtod(mp, caddr_t) + mp->m_len, xfer); mp->m_len += xfer; left -= xfer; uiocp += xfer; Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Sat Apr 25 00:57:48 2020 (r360288) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Sat Apr 25 02:18:59 2020 (r360289) @@ -3712,8 +3712,7 @@ nfssvc_srvcall(struct thread *p, struct nfssvc_args *u len = sizeof (struct nfsd_dumpclients) * dumplist.ndl_size; dumpclients = malloc(len, M_TEMP, M_WAITOK | M_ZERO); nfsrv_dumpclients(dumpclients, dumplist.ndl_size); - error = copyout(dumpclients, - CAST_USER_ADDR_T(dumplist.ndl_list), len); + error = copyout(dumpclients, dumplist.ndl_list, len); free(dumpclients, M_TEMP); } } else if (uap->flag & NFSSVC_DUMPLOCKS) { @@ -3732,8 +3731,8 @@ nfssvc_srvcall(struct thread *p, struct nfssvc_args *u nfsrv_dumplocks(nd.ni_vp, dumplocks, dumplocklist.ndllck_size, p); vput(nd.ni_vp); - error = copyout(dumplocks, - CAST_USER_ADDR_T(dumplocklist.ndllck_list), len); + error = copyout(dumplocks, dumplocklist.ndllck_list, + len); free(dumplocks, M_TEMP); } } else if (uap->flag & NFSSVC_BACKUPSTABLE) { From owner-svn-src-all@freebsd.org Sat Apr 25 05:52:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 341E22CC290; Sat, 25 Apr 2020 05:52:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498KtS0YKWz4Ypq; Sat, 25 Apr 2020 05:52:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E4832AC1; Sat, 25 Apr 2020 05:52:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03P5pxnJ004561; Sat, 25 Apr 2020 05:51:59 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03P5px5J004557; Sat, 25 Apr 2020 05:51:59 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202004250551.03P5px5J004557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 25 Apr 2020 05:51:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360290 - in stable/11: etc/mtree share/mk share/zoneinfo share/zoneinfo/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable/11: etc/mtree share/mk share/zoneinfo share/zoneinfo/tests X-SVN-Commit-Revision: 360290 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 05:52:00 -0000 Author: delphij Date: Sat Apr 25 05:51:58 2020 New Revision: 360290 URL: https://svnweb.freebsd.org/changeset/base/360290 Log: MFC r359736: Always install backward compatibility timezones, as they are installed on all major Linux distributions as well as NetBSD and OpenBSD. Modified: stable/11/etc/mtree/BSD.usr.dist stable/11/share/mk/src.opts.mk stable/11/share/zoneinfo/Makefile stable/11/share/zoneinfo/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.usr.dist ============================================================================== --- stable/11/etc/mtree/BSD.usr.dist Sat Apr 25 02:18:59 2020 (r360289) +++ stable/11/etc/mtree/BSD.usr.dist Sat Apr 25 05:51:58 2020 (r360290) @@ -1491,15 +1491,25 @@ .. Australia .. + Brazil + .. + Canada + .. + Chile + .. Etc .. Europe .. Indian .. + Mexico + .. Pacific .. SystemV + .. + US .. .. .. Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Sat Apr 25 02:18:59 2020 (r360289) +++ stable/11/share/mk/src.opts.mk Sat Apr 25 05:51:58 2020 (r360290) @@ -210,7 +210,6 @@ __DEFAULT_NO_OPTIONS = \ SORT_THREADS \ SVN \ ZONEINFO_LEAPSECONDS_SUPPORT \ - ZONEINFO_OLD_TIMEZONES_SUPPORT \ # @@ -457,7 +456,6 @@ MK_GROFF:= no .if ${MK_ZONEINFO} == "no" MK_ZONEINFO_LEAPSECONDS_SUPPORT:= no -MK_ZONEINFO_OLD_TIMEZONES_SUPPORT:= no .endif .if ${MK_CROSS_COMPILER} == "no" Modified: stable/11/share/zoneinfo/Makefile ============================================================================== --- stable/11/share/zoneinfo/Makefile Sat Apr 25 02:18:59 2020 (r360289) +++ stable/11/share/zoneinfo/Makefile Sat Apr 25 05:51:58 2020 (r360290) @@ -40,11 +40,6 @@ CONTRIBDIR= ${.CURDIR}/../../contrib/tzdata/ MK_ZONEINFO_LEAPSECONDS_SUPPORT= yes .endif -.if defined(OLDTIMEZONES) -.warning "Using backwards compatibility variable for OLDTIMEZONES; please use WITH_ZONEINFO_OLD_TIMEZONES_SUPPORT instead" -MK_ZONEINFO_OLD_TIMEZONES_SUPPORT= yes -.endif - .if ${MK_ZONEINFO_LEAPSECONDS_SUPPORT} != "no" LEAPFILE= -L ${CONTRIBDIR}leapseconds .else @@ -53,12 +48,9 @@ LEAPFILE= TZFILES= africa antarctica asia australasia etcetera europe \ factory northamerica southamerica +TZFILES+= backward systemv POSIXRULES= America/New_York -.if ${MK_ZONEINFO_OLD_TIMEZONES_SUPPORT} != "no" -TZFILES+= backward systemv -.endif - TZFILES:= ${TZFILES:S/^/${CONTRIBDIR}/} TZBUILDDIR= ${.OBJDIR}/builddir @@ -78,10 +70,7 @@ TZBUILDSUBDIRS= \ Indian \ Pacific \ SystemV - -.if ${MK_ZONEINFO_OLD_TIMEZONES_SUPPORT} != "no" TZBUILDSUBDIRS+= US Mexico Chile Canada Brazil -.endif .if !defined(_SKIP_BUILD) all: zoneinfo Modified: stable/11/share/zoneinfo/tests/Makefile ============================================================================== --- stable/11/share/zoneinfo/tests/Makefile Sat Apr 25 02:18:59 2020 (r360289) +++ stable/11/share/zoneinfo/tests/Makefile Sat Apr 25 05:51:58 2020 (r360290) @@ -8,10 +8,8 @@ PACKAGE= tests FILESGROUPS+= TESTFILES -.if ${MK_ZONEINFO_OLD_TIMEZONES_SUPPORT} != "no" ATF_TESTS_SH+= backward_test TESTFILES+= backward -.endif TESTFILES+= zoneinfo_common.sh TESTFILESPACKAGE= ${PACKAGE} From owner-svn-src-all@freebsd.org Sat Apr 25 06:42:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9412D2CD264; Sat, 25 Apr 2020 06:42:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498M123P36z4bxH; Sat, 25 Apr 2020 06:42:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F3C7345B; Sat, 25 Apr 2020 06:42:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03P6gk7E036465; Sat, 25 Apr 2020 06:42:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03P6gkpD036463; Sat, 25 Apr 2020 06:42:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202004250642.03P6gkpD036463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 25 Apr 2020 06:42:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360291 - stable/12/sys/dev/acpi_support X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/sys/dev/acpi_support X-SVN-Commit-Revision: 360291 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 06:42:46 -0000 Author: delphij Date: Sat Apr 25 06:42:46 2020 New Revision: 360291 URL: https://svnweb.freebsd.org/changeset/base/360291 Log: MFC r359795: Avoid using a variable solely for sizes that are never meant to be modified runtime. Modified: stable/12/sys/dev/acpi_support/acpi_hp.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/acpi_support/acpi_hp.c ============================================================================== --- stable/12/sys/dev/acpi_support/acpi_hp.c Sat Apr 25 05:51:58 2020 (r360290) +++ stable/12/sys/dev/acpi_support/acpi_hp.c Sat Apr 25 06:42:46 2020 (r360291) @@ -960,10 +960,9 @@ acpi_hp_get_cmi_block(device_t wmi_dev, const char* gu ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; int i; int outlen; - int size = 255; int has_enums = 0; int valuebase = 0; - char string_buffer[size]; + char string_buffer[255]; int enumbase; outlen = 0; @@ -1017,18 +1016,21 @@ acpi_hp_get_cmi_block(device_t wmi_dev, const char* gu if (detail & ACPI_HP_CMI_DETAIL_PATHS) { strlcat(outbuf, acpi_hp_get_string_from_object( - &obj->Package.Elements[2], string_buffer, size), outsize); + &obj->Package.Elements[2], + string_buffer, sizeof(string_buffer)), outsize); outlen += 48; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); } strlcat(outbuf, acpi_hp_get_string_from_object( - &obj->Package.Elements[0], string_buffer, size), outsize); + &obj->Package.Elements[0], + string_buffer, sizeof(string_buffer)), outsize); outlen += 43; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); strlcat(outbuf, acpi_hp_get_string_from_object( - &obj->Package.Elements[valuebase], string_buffer, size), outsize); + &obj->Package.Elements[valuebase], + string_buffer, sizeof(string_buffer)), outsize); outlen += 21; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); @@ -1039,7 +1041,8 @@ acpi_hp_get_cmi_block(device_t wmi_dev, const char* gu for (i = enumbase + 1; i < enumbase + 1 + obj->Package.Elements[enumbase].Integer.Value; ++i) { acpi_hp_get_string_from_object( - &obj->Package.Elements[i], string_buffer, size); + &obj->Package.Elements[i], + string_buffer, sizeof(string_buffer)); if (strlen(string_buffer) > 1 || (strlen(string_buffer) == 1 && string_buffer[0] != ' ')) { @@ -1209,8 +1212,7 @@ acpi_hp_hpcmi_read(struct cdev *dev, struct uio *buf, UINT8 instance; UINT8 maxInstance; UINT32 sequence; - int linesize = 1025; - char line[linesize]; + char line[1025]; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); @@ -1235,7 +1237,7 @@ acpi_hp_hpcmi_read(struct cdev *dev, struct uio *buf, ++instance) { if (acpi_hp_get_cmi_block(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID, instance, - line, linesize, &sequence, + line, sizeof(line), &sequence, sc->cmi_detail)) { instance = maxInstance; } @@ -1268,7 +1270,7 @@ acpi_hp_hpcmi_read(struct cdev *dev, struct uio *buf, for (i=0; icmi_order_size; ++i) { if (!acpi_hp_get_cmi_block(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID, - sc->cmi_order[i].instance, line, linesize, + sc->cmi_order[i].instance, line, sizeof(line), &sequence, sc->cmi_detail)) { sbuf_printf(&sc->hpcmi_sbuf, "%s\n", line); } From owner-svn-src-all@freebsd.org Sat Apr 25 09:06:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5A482A80B1; Sat, 25 Apr 2020 09:06:15 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498QBb4hj0z3FQF; Sat, 25 Apr 2020 09:06:15 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 979755165; Sat, 25 Apr 2020 09:06:15 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03P96Fcl024362; Sat, 25 Apr 2020 09:06:15 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03P96CFm024343; Sat, 25 Apr 2020 09:06:12 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202004250906.03P96CFm024343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 25 Apr 2020 09:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360292 - in head/sys: kern net netinet netinet/tcp_stacks netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: kern net netinet netinet/tcp_stacks netinet6 X-SVN-Commit-Revision: 360292 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 09:06:15 -0000 Author: melifaro Date: Sat Apr 25 09:06:11 2020 New Revision: 360292 URL: https://svnweb.freebsd.org/changeset/base/360292 Log: Convert route caching to nexthop caching. This change is build on top of nexthop objects introduced in r359823. Nexthops are separate datastructures, containing all necessary information to perform packet forwarding such as gateway interface and mtu. Nexthops are shared among the routes, providing more pre-computed cache-efficient data while requiring less memory. Splitting the LPM code and the attached data solves multiple long-standing problems in the routing layer, drastically reduces the coupling with outher parts of the stack and allows to transparently introduce faster lookup algorithms. Route caching was (re)introduced to minimise (slow) routing lookups, allowing for notably better performance for large TCP senders. Caching works by acquiring rtentry reference, which is protected by per-rtentry mutex. If the routing table is changed (checked by comparing the rtable generation id) or link goes down, cache record gets withdrawn. Nexthops have the same reference counting interface, backed by refcount(9). This change merely replaces rtentry with the actual forwarding nextop as a cached object, which is mostly mechanical. Other moving parts like cache cleanup on rtable change remains the same. Differential Revision: https://reviews.freebsd.org/D24340 Modified: head/sys/kern/uipc_ktls.c head/sys/net/radix_mpath.c head/sys/net/route.c head/sys/net/route.h head/sys/net/route_var.h head/sys/netinet/in_fib.c head/sys/netinet/in_fib.h head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_timer.c head/sys/netinet/sctp_var.h head/sys/netinet/tcp_output.c head/sys/netinet/tcp_stacks/bbr.c head/sys/netinet/tcp_subr.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/in6.h head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_src.c head/sys/netinet6/ip6_output.c head/sys/netinet6/ip6_var.h Modified: head/sys/kern/uipc_ktls.c ============================================================================== --- head/sys/kern/uipc_ktls.c Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/kern/uipc_ktls.c Sat Apr 25 09:06:11 2020 (r360292) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef RSS #include +#include #include #endif #if defined(INET) || defined(INET6) @@ -754,7 +755,7 @@ ktls_alloc_snd_tag(struct inpcb *inp, struct ktls_sess { union if_snd_tag_alloc_params params; struct ifnet *ifp; - struct rtentry *rt; + struct nhop_object *nh; struct tcpcb *tp; int error; @@ -792,12 +793,12 @@ ktls_alloc_snd_tag(struct inpcb *inp, struct ktls_sess * enabled after a connection has completed key negotiation in * userland, the cached route will be present in practice. */ - rt = inp->inp_route.ro_rt; - if (rt == NULL || rt->rt_ifp == NULL) { + nh = inp->inp_route.ro_nh; + if (nh == NULL) { INP_RUNLOCK(inp); return (ENXIO); } - ifp = rt->rt_ifp; + ifp = nh->nh_ifp; if_ref(ifp); params.hdr.type = IF_SND_TAG_TYPE_TLS; Modified: head/sys/net/radix_mpath.c ============================================================================== --- head/sys/net/radix_mpath.c Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/net/radix_mpath.c Sat Apr 25 09:06:11 2020 (r360292) @@ -55,6 +55,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -257,42 +259,41 @@ rt_mpath_select(struct rtentry *rte, uint32_t hash) void rtalloc_mpath_fib(struct route *ro, uint32_t hash, u_int fibnum) { - struct rtentry *rt; + struct rtentry *rt, *rt_tmp; /* * XXX we don't attempt to lookup cached route again; what should * be done for sendto(3) case? */ - if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP) - && RT_LINK_IS_UP(ro->ro_rt->rt_ifp)) + if (ro->ro_nh && RT_LINK_IS_UP(ro->ro_nh->nh_ifp)) return; - ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, 0, fibnum); + ro->ro_nh = NULL; + rt_tmp = rtalloc1_fib(&ro->ro_dst, 1, 0, fibnum); /* if the route does not exist or it is not multipath, don't care */ - if (ro->ro_rt == NULL) + if (rt_tmp == NULL) return; - if (rn_mpath_next((struct radix_node *)ro->ro_rt) == NULL) { - RT_UNLOCK(ro->ro_rt); + if (rn_mpath_next((struct radix_node *)rt_tmp) == NULL) { + ro->ro_nh = rt_tmp->rt_nhop; + nhop_ref_object(ro->ro_nh); + RT_UNLOCK(rt_tmp); return; } - rt = rt_mpath_selectrte(ro->ro_rt, hash); + rt = rt_mpath_selectrte(rt_tmp, hash); /* XXX try filling rt_gwroute and avoid unreachable gw */ /* gw selection has failed - there must be only zero weight routes */ if (!rt) { - RT_UNLOCK(ro->ro_rt); - ro->ro_rt = NULL; + RT_UNLOCK(rt_tmp); return; } - if (ro->ro_rt != rt) { - RTFREE_LOCKED(ro->ro_rt); - ro->ro_rt = rt; - RT_LOCK(ro->ro_rt); - RT_ADDREF(ro->ro_rt); - - } - RT_UNLOCK(ro->ro_rt); + if (rt_tmp != rt) { + RTFREE_LOCKED(rt_tmp); + ro->ro_nh = rt->rt_nhop; + nhop_ref_object(ro->ro_nh); + } else + RT_UNLOCK(rt_tmp); } void Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/net/route.c Sat Apr 25 09:06:11 2020 (r360292) @@ -441,15 +441,18 @@ rtalloc_ign_fib(struct route *ro, u_long ignore, u_int { struct rtentry *rt; - if ((rt = ro->ro_rt) != NULL) { - if (rt->rt_ifp != NULL && rt->rt_flags & RTF_UP) + if (ro->ro_nh != NULL) { + if (NH_IS_VALID(ro->ro_nh)) return; - RTFREE(rt); - ro->ro_rt = NULL; + NH_FREE(ro->ro_nh); + ro->ro_nh = NULL; } - ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, ignore, fibnum); - if (ro->ro_rt) - RT_UNLOCK(ro->ro_rt); + rt = rtalloc1_fib(&ro->ro_dst, 1, ignore, fibnum); + if (rt != NULL) { + ro->ro_nh = rt->rt_nhop; + nhop_ref_object(rt->rt_nhop); + RT_UNLOCK(rt); + } } /* Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/net/route.h Sat Apr 25 09:06:11 2020 (r360292) @@ -51,7 +51,7 @@ * with its length. */ struct route { - struct rtentry *ro_rt; + struct nhop_object *ro_nh; struct llentry *ro_lle; /* * ro_prepend and ro_plen are only used for bpf to pass in a @@ -227,21 +227,6 @@ struct rtentry { /* Control plane route request flags */ #define NHR_COPY 0x100 /* Copy rte data */ -#ifdef _KERNEL -/* rte<>ro_flags translation */ -static inline void -rt_update_ro_flags(struct route *ro) -{ - int rt_flags = ro->ro_rt->rt_flags; - - ro->ro_flags &= ~ (RT_REJECT|RT_BLACKHOLE|RT_HAS_GW); - - ro->ro_flags |= (rt_flags & RTF_REJECT) ? RT_REJECT : 0; - ro->ro_flags |= (rt_flags & RTF_BLACKHOLE) ? RT_BLACKHOLE : 0; - ro->ro_flags |= (rt_flags & RTF_GATEWAY) ? RT_HAS_GW : 0; -} -#endif - /* * Routing statistics. */ @@ -431,12 +416,22 @@ struct rt_addrinfo { RTFREE((_ro)->ro_rt); \ } while (0) +#define RO_NHFREE(_ro) do { \ + if ((_ro)->ro_nh) { \ + NH_FREE((_ro)->ro_nh); \ + (_ro)->ro_nh = NULL; \ + } \ +} while (0) + #define RO_INVALIDATE_CACHE(ro) do { \ - RO_RTFREE(ro); \ if ((ro)->ro_lle != NULL) { \ LLE_FREE((ro)->ro_lle); \ (ro)->ro_lle = NULL; \ } \ + if ((ro)->ro_nh != NULL) { \ + NH_FREE((ro)->ro_nh); \ + (ro)->ro_nh = NULL; \ + } \ } while (0) /* @@ -444,7 +439,7 @@ struct rt_addrinfo { * out-of-date cache, simply free it. Update the generation number * for the new allocation */ -#define RT_VALIDATE(ro, cookiep, fibnum) do { \ +#define NH_VALIDATE(ro, cookiep, fibnum) do { \ rt_gen_t cookie = RT_GEN(fibnum, (ro)->ro_dst.sa_family); \ if (*(cookiep) != cookie) { \ RO_INVALIDATE_CACHE(ro); \ Modified: head/sys/net/route_var.h ============================================================================== --- head/sys/net/route_var.h Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/net/route_var.h Sat Apr 25 09:06:11 2020 (r360292) @@ -80,7 +80,7 @@ _Static_assert(__offsetof(_s1, _f1) == __offsetof(_s2, CHK_STRUCT_FIELD_GENERIC(struct route, _field, _route_new, _field) #define CHK_STRUCT_ROUTE_FIELDS(_route_new) \ - _CHK_ROUTE_FIELD(_route_new, ro_rt) \ + _CHK_ROUTE_FIELD(_route_new, ro_nh) \ _CHK_ROUTE_FIELD(_route_new, ro_lle) \ _CHK_ROUTE_FIELD(_route_new, ro_prepend)\ _CHK_ROUTE_FIELD(_route_new, ro_plen) \ Modified: head/sys/netinet/in_fib.c ============================================================================== --- head/sys/netinet/in_fib.c Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/in_fib.c Sat Apr 25 09:06:11 2020 (r360292) @@ -62,6 +62,10 @@ __FBSDID("$FreeBSD$"); #include #ifdef INET + +/* Verify struct route compatiblity */ +/* Assert 'struct route_in' is compatible with 'struct route' */ +CHK_STRUCT_ROUTE_COMPAT(struct route_in, ro_dst4); static void fib4_rte_to_nh_basic(struct nhop_object *nh, struct in_addr dst, uint32_t flags, struct nhop4_basic *pnh4); static void fib4_rte_to_nh_extended(struct nhop_object *nh, struct in_addr dst, Modified: head/sys/netinet/in_fib.h ============================================================================== --- head/sys/netinet/in_fib.h Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/in_fib.h Sat Apr 25 09:06:11 2020 (r360292) @@ -32,6 +32,19 @@ #ifndef _NETINET_IN_FIB_H_ #define _NETINET_IN_FIB_H_ +struct route_in { + /* common fields shared among all 'struct route' */ + struct nhop_object *ro_nh; + struct llentry *ro_lle; + char *ro_prepend; + uint16_t ro_plen; + uint16_t ro_flags; + uint16_t ro_mtu; /* saved ro_rt mtu */ + uint16_t spare; + /* custom sockaddr */ + struct sockaddr_in ro_dst4; +}; + /* Basic nexthop info used for uRPF/mtu checks */ struct nhop4_basic { struct ifnet *nh_ifp; /* Logical egress interface */ Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/ip_input.c Sat Apr 25 09:06:11 2020 (r360292) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -72,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -980,10 +982,11 @@ ip_forward(struct mbuf *m, int srcrt) ntohl(ip->ip_src.s_addr ^ ip->ip_dst.s_addr), M_GETFIB(m)); #else - in_rtalloc_ign(&ro, 0, M_GETFIB(m)); + ro.ro_nh = fib4_lookup(M_GETFIB(m), ip->ip_dst, 0, NHR_REF, + m->m_pkthdr.flowid); #endif - if (ro.ro_rt != NULL) { - ia = ifatoia(ro.ro_rt->rt_ifa); + if (ro.ro_nh != NULL) { + ia = ifatoia(ro.ro_nh->nh_ifa); } else ia = NULL; /* @@ -1045,19 +1048,18 @@ ip_forward(struct mbuf *m, int srcrt) dest.s_addr = 0; if (!srcrt && V_ipsendredirects && ia != NULL && ia->ia_ifp == m->m_pkthdr.rcvif) { - struct rtentry *rt; + struct nhop_object *nh; - rt = ro.ro_rt; + nh = ro.ro_nh; - if (rt && (rt->rt_flags & (RTF_DYNAMIC|RTF_MODIFIED)) == 0 && - satosin(rt_key(rt))->sin_addr.s_addr != 0) { -#define RTA(rt) ((struct in_ifaddr *)(rt->rt_ifa)) + if (nh != NULL && ((nh->nh_flags & (NHF_REDIRECT|NHF_DEFAULT)) == 0)) { + struct in_ifaddr *nh_ia = (struct in_ifaddr *)(nh->nh_ifa); u_long src = ntohl(ip->ip_src.s_addr); - if (RTA(rt) && - (src & RTA(rt)->ia_subnetmask) == RTA(rt)->ia_subnet) { - if (rt->rt_flags & RTF_GATEWAY) - dest.s_addr = satosin(rt->rt_gateway)->sin_addr.s_addr; + if (nh_ia != NULL && + (src & nh_ia->ia_subnetmask) == nh_ia->ia_subnet) { + if (nh->nh_flags & NHF_GATEWAY) + dest.s_addr = nh->gw4_sa.sin_addr.s_addr; else dest.s_addr = ip->ip_dst.s_addr; /* Router requirements says to only send host redirects */ @@ -1069,9 +1071,9 @@ ip_forward(struct mbuf *m, int srcrt) error = ip_output(m, NULL, &ro, IP_FORWARDING, NULL, NULL); - if (error == EMSGSIZE && ro.ro_rt) - mtu = ro.ro_rt->rt_mtu; - RO_RTFREE(&ro); + if (error == EMSGSIZE && ro.ro_nh) + mtu = ro.ro_nh->nh_mtu; + RO_NHFREE(&ro); if (error) IPSTAT_INC(ips_cantforward); Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/ip_output.c Sat Apr 25 09:06:11 2020 (r360292) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef RADIX_MPATH #include #endif @@ -78,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -287,6 +289,19 @@ done: return (error); } +/* rte<>ro_flags translation */ +static inline void +rt_update_ro_flags(struct route *ro) +{ + int nh_flags = ro->ro_nh->nh_flags; + + ro->ro_flags &= ~ (RT_REJECT|RT_BLACKHOLE|RT_HAS_GW); + + ro->ro_flags |= (nh_flags & NHF_REJECT) ? RT_REJECT : 0; + ro->ro_flags |= (nh_flags & NHF_BLACKHOLE) ? RT_BLACKHOLE : 0; + ro->ro_flags |= (nh_flags & NHF_GATEWAY) ? RT_HAS_GW : 0; +} + /* * IP output. The packet in mbuf chain m contains a skeletal IP * header (with len, off, ttl, proto, tos, src, dst). @@ -368,7 +383,7 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct rou dst = (struct sockaddr_in *)&ro->ro_dst; else dst = &sin; - if (ro == NULL || ro->ro_rt == NULL) { + if (ro == NULL || ro->ro_nh == NULL) { bzero(dst, sizeof(*dst)); dst->sin_family = AF_INET; dst->sin_len = sizeof(*dst); @@ -380,8 +395,8 @@ again: * Validate route against routing table additions; * a better/more specific route might have been added. */ - if (inp != NULL && ro != NULL && ro->ro_rt != NULL) - RT_VALIDATE(ro, &inp->inp_rt_cookie, fibnum); + if (inp != NULL && ro != NULL && ro->ro_nh != NULL) + NH_VALIDATE(ro, &inp->inp_rt_cookie, fibnum); /* * If there is a cached route, * check that it is to the same destination @@ -390,9 +405,8 @@ again: * cache with IPv6. * Also check whether routing cache needs invalidation. */ - if (ro != NULL && ro->ro_rt != NULL && - ((ro->ro_rt->rt_flags & RTF_UP) == 0 || - ro->ro_rt->rt_ifp == NULL || !RT_LINK_IS_UP(ro->ro_rt->rt_ifp) || + if (ro != NULL && ro->ro_nh != NULL && + ((!NH_IS_VALID(ro->ro_nh)) || !RT_LINK_IS_UP(ro->ro_nh->nh_ifp) || dst->sin_family != AF_INET || dst->sin_addr.s_addr != ip->ip_dst.s_addr)) RO_INVALIDATE_CACHE(ro); @@ -450,7 +464,7 @@ again: else src.s_addr = INADDR_ANY; } else if (ro != NULL) { - if (ro->ro_rt == NULL) { + if (ro->ro_nh == NULL) { /* * We want to do any cloning requested by the link * layer, as this is probably required in all cases @@ -461,12 +475,11 @@ again: ntohl(ip->ip_src.s_addr ^ ip->ip_dst.s_addr), fibnum); #else - in_rtalloc_ign(ro, 0, fibnum); + ro->ro_nh = fib4_lookup(fibnum, dst->sin_addr, 0, + NHR_REF, m->m_pkthdr.flowid); #endif - if (ro->ro_rt == NULL || - (ro->ro_rt->rt_flags & RTF_UP) == 0 || - ro->ro_rt->rt_ifp == NULL || - !RT_LINK_IS_UP(ro->ro_rt->rt_ifp)) { + if (ro->ro_nh == NULL || (!NH_IS_VALID(ro->ro_nh)) || + !RT_LINK_IS_UP(ro->ro_nh->nh_ifp)) { #if defined(IPSEC) || defined(IPSEC_SUPPORT) /* * There is no route for this packet, but it is @@ -481,20 +494,20 @@ again: goto bad; } } - ia = ifatoia(ro->ro_rt->rt_ifa); - ifp = ro->ro_rt->rt_ifp; - counter_u64_add(ro->ro_rt->rt_pksent, 1); + ia = ifatoia(ro->ro_nh->nh_ifa); + ifp = ro->ro_nh->nh_ifp; + counter_u64_add(ro->ro_nh->nh_pksent, 1); rt_update_ro_flags(ro); - if (ro->ro_rt->rt_flags & RTF_GATEWAY) - gw = (struct sockaddr_in *)ro->ro_rt->rt_gateway; - if (ro->ro_rt->rt_flags & RTF_HOST) - isbroadcast = (ro->ro_rt->rt_flags & RTF_BROADCAST); + if (ro->ro_nh->nh_flags & NHF_GATEWAY) + gw = &ro->ro_nh->gw4_sa; + if (ro->ro_nh->nh_flags & NHF_HOST) + isbroadcast = (ro->ro_nh->nh_flags & NHF_BROADCAST); else if (ifp->if_flags & IFF_BROADCAST) isbroadcast = in_ifaddr_broadcast(gw->sin_addr, ia); else isbroadcast = 0; - if (ro->ro_rt->rt_flags & RTF_HOST) - mtu = ro->ro_rt->rt_mtu; + if (ro->ro_nh->nh_flags & NHF_HOST) + mtu = ro->ro_nh->nh_mtu; else mtu = ifp->if_mtu; src = IA_SIN(ia)->sin_addr; @@ -537,9 +550,9 @@ again: } /* Catch a possible divide by zero later. */ - KASSERT(mtu > 0, ("%s: mtu %d <= 0, ro=%p (rt_flags=0x%08x) ifp=%p", + KASSERT(mtu > 0, ("%s: mtu %d <= 0, ro=%p (nh_flags=0x%08x) ifp=%p", __func__, mtu, ro, - (ro != NULL && ro->ro_rt != NULL) ? ro->ro_rt->rt_flags : 0, ifp)); + (ro != NULL && ro->ro_nh != NULL) ? ro->ro_nh->nh_flags : 0, ifp)); if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { m->m_flags |= M_MCAST; @@ -702,7 +715,7 @@ sendit: case -1: /* Need to try again */ /* Reset everything for a new round */ if (ro != NULL) { - RO_RTFREE(ro); + RO_NHFREE(ro); ro->ro_prepend = NULL; } gw = dst; Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/sctp_asconf.c Sat Apr 25 09:06:11 2020 (r360292) @@ -980,8 +980,7 @@ sctp_asconf_nets_cleanup(struct sctp_tcb *stcb, struct ((ifn == NULL) || (SCTP_GET_IF_INDEX_FROM_ROUTE(&net->ro) != ifn->ifn_index))) { /* clear any cached route */ - RTFREE(net->ro.ro_rt); - net->ro.ro_rt = NULL; + RO_NHFREE(&net->ro); } /* clear any cached source address */ if (net->src_addr_selected) { @@ -1090,10 +1089,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc if (addrnum == 1) { TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { /* clear any cached route and source address */ - if (net->ro.ro_rt) { - RTFREE(net->ro.ro_rt); - net->ro.ro_rt = NULL; - } + RO_NHFREE(&net->ro); if (net->src_addr_selected) { sctp_free_ifa(net->ro._s_addr); net->ro._s_addr = NULL; @@ -1112,10 +1108,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc /* Multiple local addresses exsist in the association. */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { /* clear any cached route and source address */ - if (net->ro.ro_rt) { - RTFREE(net->ro.ro_rt); - net->ro.ro_rt = NULL; - } + RO_NHFREE(&net->ro); if (net->src_addr_selected) { sctp_free_ifa(net->ro._s_addr); net->ro._s_addr = NULL; @@ -1131,7 +1124,7 @@ sctp_path_check_and_react(struct sctp_tcb *stcb, struc SCTP_RTALLOC((sctp_route_t *)&net->ro, stcb->sctp_ep->def_vrf_id, stcb->sctp_ep->fibnum); - if (net->ro.ro_rt == NULL) + if (net->ro.ro_nh == NULL) continue; changed = 0; @@ -2214,18 +2207,13 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, stru struct sctp_nets *net; TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { - sctp_rtentry_t *rt; /* delete this address if cached */ if (net->ro._s_addr == ifa) { sctp_free_ifa(net->ro._s_addr); net->ro._s_addr = NULL; net->src_addr_selected = 0; - rt = net->ro.ro_rt; - if (rt) { - RTFREE(rt); - net->ro.ro_rt = NULL; - } + RO_NHFREE(&net->ro); /* * Now we deleted our src address, * should we not also now reset the Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/sctp_os_bsd.h Sat Apr 25 09:06:11 2020 (r360292) @@ -71,11 +71,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -85,6 +87,7 @@ __FBSDID("$FreeBSD$"); #ifdef INET6 #include #include +#include #include #include #include @@ -199,15 +202,15 @@ MALLOC_DECLARE(SCTP_M_MCORE); #define SCTP_INIT_VRF_TABLEID(vrf) #define SCTP_IFN_IS_IFT_LOOP(ifn) ((ifn)->ifn_type == IFT_LOOP) -#define SCTP_ROUTE_IS_REAL_LOOP(ro) ((ro)->ro_rt && (ro)->ro_rt->rt_ifa && (ro)->ro_rt->rt_ifa->ifa_ifp && (ro)->ro_rt->rt_ifa->ifa_ifp->if_type == IFT_LOOP) +#define SCTP_ROUTE_IS_REAL_LOOP(ro) ((ro)->ro_nh && (ro)->ro_nh->nh_ifa && (ro)->ro_nh->nh_ifa->ifa_ifp && (ro)->ro_nh->nh_ifa->ifa_ifp->if_type == IFT_LOOP) /* * Access to IFN's to help with src-addr-selection */ /* This could return VOID if the index works but for BSD we provide both. */ -#define SCTP_GET_IFN_VOID_FROM_ROUTE(ro) (void *)ro->ro_rt->rt_ifp -#define SCTP_GET_IF_INDEX_FROM_ROUTE(ro) (ro)->ro_rt->rt_ifp->if_index -#define SCTP_ROUTE_HAS_VALID_IFN(ro) ((ro)->ro_rt && (ro)->ro_rt->rt_ifp) +#define SCTP_GET_IFN_VOID_FROM_ROUTE(ro) (void *)ro->ro_nh->nh_ifp +#define SCTP_GET_IF_INDEX_FROM_ROUTE(ro) (ro)->ro_nh->nh_ifp->if_index +#define SCTP_ROUTE_HAS_VALID_IFN(ro) ((ro)->ro_nh && (ro)->ro_nh->nh_ifp) /* * general memory allocation @@ -304,12 +307,10 @@ typedef struct callout sctp_os_timer_t; /* MTU */ /*************************/ #define SCTP_GATHER_MTU_FROM_IFN_INFO(ifn, ifn_index, af) ((struct ifnet *)ifn)->if_mtu -#define SCTP_GATHER_MTU_FROM_ROUTE(sctp_ifa, sa, rt) ((uint32_t)((rt != NULL) ? rt->rt_mtu : 0)) +#define SCTP_GATHER_MTU_FROM_ROUTE(sctp_ifa, sa, nh) ((uint32_t)((nh != NULL) ? nh->nh_mtu : 0)) #define SCTP_GATHER_MTU_FROM_INTFC(sctp_ifn) ((sctp_ifn->ifn_p != NULL) ? ((struct ifnet *)(sctp_ifn->ifn_p))->if_mtu : 0) -#define SCTP_SET_MTU_OF_ROUTE(sa, rt, mtu) do { \ - if (rt != NULL) \ - rt->rt_mtu = mtu; \ - } while(0) +/* XXX: Setting MTU from the protocol in this way is simply incorrect */ +#define SCTP_SET_MTU_OF_ROUTE(sa, rt, mtu) /* (de-)register interface event notifications */ #define SCTP_REGISTER_INTERFACE(ifhandle, af) @@ -365,7 +366,7 @@ typedef struct callout sctp_os_timer_t; */ /* get the v6 hop limit */ -#define SCTP_GET_HLIM(inp, ro) in6_selecthlim(&inp->ip_inp.inp, (ro ? (ro->ro_rt ? (ro->ro_rt->rt_ifp) : (NULL)) : (NULL))); +#define SCTP_GET_HLIM(inp, ro) in6_selecthlim(&inp->ip_inp.inp, (ro ? (ro->ro_nh ? (ro->ro_nh->nh_ifp) : (NULL)) : (NULL))); /* is the endpoint v6only? */ #define SCTP_IPV6_V6ONLY(sctp_inpcb) ((sctp_inpcb)->ip_inp.inp.inp_flags & IN6P_IPV6_V6ONLY) @@ -397,10 +398,16 @@ typedef struct callout sctp_os_timer_t; * routes, output, etc. */ typedef struct route sctp_route_t; -typedef struct rtentry sctp_rtentry_t; #define SCTP_RTALLOC(ro, vrf_id, fibnum) \ - rtalloc_ign_fib((struct route *)ro, 0UL, fibnum) +{ \ + if ((ro)->ro_nh == NULL) { \ + if ((ro)->ro_dst.sa_family == AF_INET) \ + (ro)->ro_nh = fib4_lookup(fibnum, ((struct sockaddr_in *)&(ro)->ro_dst)->sin_addr, NHR_REF, 0, 0); \ + if ((ro)->ro_dst.sa_family == AF_INET6) \ + (ro)->ro_nh = fib6_lookup(fibnum, &((struct sockaddr_in6 *)&(ro)->ro_dst)->sin6_addr, NHR_REF, 0, 0); \ + } \ +} /* * SCTP protocol specific mbuf flags. Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/sctp_output.c Sat Apr 25 09:06:11 2020 (r360292) @@ -3387,13 +3387,13 @@ sctp_source_address_selection(struct sctp_inpcb *inp, * addresses. If the bound set is NOT assigned to the interface then * we must use rotation amongst the bound addresses.. */ - if (ro->ro_rt == NULL) { + if (ro->ro_nh == NULL) { /* * Need a route to cache. */ SCTP_RTALLOC(ro, vrf_id, inp->fibnum); } - if (ro->ro_rt == NULL) { + if (ro->ro_nh == NULL) { return (NULL); } fam = ro->ro_dst.sa_family; @@ -4131,10 +4131,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, sctp_free_ifa(net->ro._s_addr); net->ro._s_addr = NULL; net->src_addr_selected = 0; - if (ro->ro_rt) { - RTFREE(ro->ro_rt); - ro->ro_rt = NULL; - } + RO_NHFREE(ro); } if (net->src_addr_selected == 0) { /* Cache the source address */ @@ -4206,7 +4203,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, * catch that somewhere and abort the association * right away (assuming this is an INIT being sent). */ - if (ro->ro_rt == NULL) { + if (ro->ro_nh == NULL) { /* * src addr selection failed to find a route * (or valid source addr), so we can't get @@ -4225,7 +4222,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, SCTPDBG(SCTP_DEBUG_OUTPUT3, "Destination is %x\n", (uint32_t)(ntohl(ip->ip_dst.s_addr))); SCTPDBG(SCTP_DEBUG_OUTPUT3, "RTP route is %p through\n", - (void *)ro->ro_rt); + (void *)ro->ro_nh); if (SCTP_GET_HEADER_FOR_OUTPUT(o_pak)) { /* failed to prepend data, give up */ @@ -4278,13 +4275,13 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, SCTPDBG(SCTP_DEBUG_OUTPUT3, "IP output returns %d\n", ret); if (net == NULL) { /* free tempy routes */ - RO_RTFREE(ro); + RO_NHFREE(ro); } else { - if ((ro->ro_rt != NULL) && (net->ro._s_addr) && + if ((ro->ro_nh != NULL) && (net->ro._s_addr) && ((net->dest_state & SCTP_ADDR_NO_PMTUD) == 0)) { uint32_t mtu; - mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, ro->ro_rt); + mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, ro->ro_nh); if (mtu > 0) { if (net->port) { mtu -= sizeof(struct udphdr); @@ -4296,7 +4293,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, net->mtu = mtu; } } - } else if (ro->ro_rt == NULL) { + } else if (ro->ro_nh == NULL) { /* route was freed */ if (net->ro._s_addr && net->src_addr_selected) { @@ -4426,10 +4423,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, sctp_free_ifa(net->ro._s_addr); net->ro._s_addr = NULL; net->src_addr_selected = 0; - if (ro->ro_rt) { - RTFREE(ro->ro_rt); - ro->ro_rt = NULL; - } + RO_NHFREE(ro); } if (net->src_addr_selected == 0) { sin6 = (struct sockaddr_in6 *)&net->ro._l_addr; @@ -4489,7 +4483,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, } lsa6->sin6_port = inp->sctp_lport; - if (ro->ro_rt == NULL) { + if (ro->ro_nh == NULL) { /* * src addr selection failed to find a route * (or valid source addr), so we can't get @@ -4625,13 +4619,13 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, } if (net == NULL) { /* Now if we had a temp route free it */ - RO_RTFREE(ro); + RO_NHFREE(ro); } else { /* * PMTU check versus smallest asoc MTU goes * here */ - if (ro->ro_rt == NULL) { + if (ro->ro_nh == NULL) { /* Route was freed */ if (net->ro._s_addr && net->src_addr_selected) { @@ -4640,11 +4634,11 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, } net->src_addr_selected = 0; } - if ((ro->ro_rt != NULL) && (net->ro._s_addr) && + if ((ro->ro_nh != NULL) && (net->ro._s_addr) && ((net->dest_state & SCTP_ADDR_NO_PMTUD) == 0)) { uint32_t mtu; - mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, ro->ro_rt); + mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, ro->ro_nh); if (mtu > 0) { if (net->port) { mtu -= sizeof(struct udphdr); @@ -13838,7 +13832,7 @@ sctp_v6src_match_nexthop(struct sockaddr_in6 *src6, sc struct nd_pfxrouter *pfxrtr = NULL; struct sockaddr_in6 gw6; - if (ro == NULL || ro->ro_rt == NULL || src6->sin6_family != AF_INET6) + if (ro == NULL || ro->ro_nh == NULL || src6->sin6_family != AF_INET6) return (0); /* get prefix entry of address */ @@ -13871,8 +13865,8 @@ sctp_v6src_match_nexthop(struct sockaddr_in6 *src6, sc SCTPDBG(SCTP_DEBUG_OUTPUT2, "prefix router is "); SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)&gw6); SCTPDBG(SCTP_DEBUG_OUTPUT2, "installed router is "); - SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, ro->ro_rt->rt_gateway); - if (sctp_cmpaddr((struct sockaddr *)&gw6, ro->ro_rt->rt_gateway)) { + SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, &ro->ro_nh->gw_sa); + if (sctp_cmpaddr((struct sockaddr *)&gw6, &ro->ro_nh->gw_sa)) { ND6_RUNLOCK(); SCTPDBG(SCTP_DEBUG_OUTPUT2, "pfxrouter is installed\n"); return (1); @@ -13892,7 +13886,7 @@ sctp_v4src_match_nexthop(struct sctp_ifa *sifa, sctp_r struct ifaddr *ifa; struct in_addr srcnetaddr, gwnetaddr; - if (ro == NULL || ro->ro_rt == NULL || + if (ro == NULL || ro->ro_nh == NULL || sifa->address.sa.sa_family != AF_INET) { return (0); } @@ -13904,10 +13898,10 @@ sctp_v4src_match_nexthop(struct sctp_ifa *sifa, sctp_r SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, &sifa->address.sa); SCTPDBG(SCTP_DEBUG_OUTPUT1, "network address is %x\n", srcnetaddr.s_addr); - sin = (struct sockaddr_in *)ro->ro_rt->rt_gateway; + sin = &ro->ro_nh->gw4_sa; gwnetaddr.s_addr = (sin->sin_addr.s_addr & mask->sin_addr.s_addr); SCTPDBG(SCTP_DEBUG_OUTPUT1, "match_nexthop4: nexthop is "); - SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, ro->ro_rt->rt_gateway); + SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, &ro->ro_nh->gw4_sa); SCTPDBG(SCTP_DEBUG_OUTPUT1, "network address is %x\n", gwnetaddr.s_addr); if (srcnetaddr.s_addr == gwnetaddr.s_addr) { return (1); Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/sctp_pcb.c Sat Apr 25 09:06:11 2020 (r360292) @@ -3976,17 +3976,9 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct soc } else { imtu = 0; } - rmtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, net->ro.ro_rt); + rmtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, net->ro.ro_nh); hcmtu = sctp_hc_get_mtu(&net->ro._l_addr, stcb->sctp_ep->fibnum); net->mtu = sctp_min_mtu(hcmtu, rmtu, imtu); - if (rmtu == 0) { - /* - * Start things off to match mtu of - * interface please. - */ - SCTP_SET_MTU_OF_ROUTE(&net->ro._l_addr.sa, - net->ro.ro_rt, net->mtu); - } } } if (net->mtu == 0) { @@ -4067,19 +4059,19 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct soc *netp = net; } netfirst = TAILQ_FIRST(&stcb->asoc.nets); - if (net->ro.ro_rt == NULL) { + if (net->ro.ro_nh == NULL) { /* Since we have no route put it at the back */ TAILQ_INSERT_TAIL(&stcb->asoc.nets, net, sctp_next); } else if (netfirst == NULL) { /* We are the first one in the pool. */ TAILQ_INSERT_HEAD(&stcb->asoc.nets, net, sctp_next); - } else if (netfirst->ro.ro_rt == NULL) { + } else if (netfirst->ro.ro_nh == NULL) { /* * First one has NO route. Place this one ahead of the first * one. */ TAILQ_INSERT_HEAD(&stcb->asoc.nets, net, sctp_next); - } else if (net->ro.ro_rt->rt_ifp != netfirst->ro.ro_rt->rt_ifp) { + } else if (net->ro.ro_nh->nh_ifp != netfirst->ro.ro_nh->nh_ifp) { /* * This one has a different interface than the one at the * top of the list. Place it ahead. @@ -4100,11 +4092,11 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct soc /* End of the list */ TAILQ_INSERT_TAIL(&stcb->asoc.nets, net, sctp_next); break; - } else if (netlook->ro.ro_rt == NULL) { + } else if (netlook->ro.ro_nh == NULL) { /* next one has NO route */ TAILQ_INSERT_BEFORE(netfirst, net, sctp_next); break; - } else if (netlook->ro.ro_rt->rt_ifp != net->ro.ro_rt->rt_ifp) { + } else if (netlook->ro.ro_nh->nh_ifp != net->ro.ro_nh->nh_ifp) { TAILQ_INSERT_AFTER(&stcb->asoc.nets, netlook, net, sctp_next); break; @@ -4117,8 +4109,8 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct soc /* got to have a primary set */ if (stcb->asoc.primary_destination == 0) { stcb->asoc.primary_destination = net; - } else if ((stcb->asoc.primary_destination->ro.ro_rt == NULL) && - (net->ro.ro_rt) && + } else if ((stcb->asoc.primary_destination->ro.ro_nh == NULL) && + (net->ro.ro_nh) && ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0)) { /* No route to current primary adopt new primary */ stcb->asoc.primary_destination = net; @@ -5459,14 +5451,9 @@ sctp_del_local_addr_ep(struct sctp_inpcb *inp, struct TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { if (net->ro._s_addr == laddr->ifa) { /* Yep, purge src address selected */ - sctp_rtentry_t *rt; /* delete this address if cached */ - rt = net->ro.ro_rt; - if (rt != NULL) { - RTFREE(rt); - net->ro.ro_rt = NULL; - } + RO_NHFREE(&net->ro); sctp_free_ifa(net->ro._s_addr); net->ro._s_addr = NULL; net->src_addr_selected = 0; Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/sctp_structs.h Sat Apr 25 09:06:11 2020 (r360292) @@ -189,7 +189,7 @@ struct iterator_control { #define SCTP_ITERATOR_STOP_CUR_INP 0x00000008 struct sctp_net_route { - sctp_rtentry_t *ro_rt; + struct nhop_object *ro_nh; struct llentry *ro_lle; char *ro_prepend; uint16_t ro_plen; Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/sctp_timer.c Sat Apr 25 09:06:11 2020 (r360292) @@ -350,7 +350,7 @@ sctp_find_alternate_net(struct sctp_tcb *stcb, return (NULL); } } - if (alt->ro.ro_rt == NULL) { + if (alt->ro.ro_nh == NULL) { if (alt->ro._s_addr) { sctp_free_ifa(alt->ro._s_addr); alt->ro._s_addr = NULL; @@ -358,7 +358,7 @@ sctp_find_alternate_net(struct sctp_tcb *stcb, alt->src_addr_selected = 0; } if (((alt->dest_state & SCTP_ADDR_REACHABLE) == SCTP_ADDR_REACHABLE) && - (alt->ro.ro_rt != NULL) && + (alt->ro.ro_nh != NULL) && (!(alt->dest_state & SCTP_ADDR_UNCONFIRMED))) { /* Found a reachable address */ break; @@ -937,10 +937,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp, net->src_addr_selected = 0; /* Force a route allocation too */ - if (net->ro.ro_rt) { - RTFREE(net->ro.ro_rt); - net->ro.ro_rt = NULL; - } + RO_NHFREE(&net->ro); /* Was it our primary? */ if ((stcb->asoc.primary_destination == net) && (alt != net)) { @@ -1502,7 +1499,7 @@ sctp_pathmtu_timer(struct sctp_inpcb *inp, net->src_addr_selected = 1; } if (net->ro._s_addr) { - mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._s_addr.sa, net->ro.ro_rt); + mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._s_addr.sa, net->ro.ro_nh); #if defined(INET) || defined(INET6) if (net->port) { mtu -= sizeof(struct udphdr); Modified: head/sys/netinet/sctp_var.h ============================================================================== --- head/sys/netinet/sctp_var.h Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/sctp_var.h Sat Apr 25 09:06:11 2020 (r360292) @@ -187,10 +187,7 @@ extern struct pr_usrreqs sctp_usrreqs; if ((__net)) { \ if (SCTP_DECREMENT_AND_CHECK_REFCOUNT(&(__net)->ref_count)) { \ (void)SCTP_OS_TIMER_STOP(&(__net)->rxt_timer.timer); \ - if ((__net)->ro.ro_rt) { \ - RTFREE((__net)->ro.ro_rt); \ - (__net)->ro.ro_rt = NULL; \ - } \ + RO_NHFREE(&(__net)->ro); \ if ((__net)->src_addr_selected) { \ sctp_free_ifa((__net)->ro._s_addr); \ (__net)->ro._s_addr = NULL; \ Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/tcp_output.c Sat Apr 25 09:06:11 2020 (r360292) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -1411,8 +1412,8 @@ send: ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), NULL, NULL, tp->t_inpcb); - if (error == EMSGSIZE && tp->t_inpcb->inp_route6.ro_rt != NULL) - mtu = tp->t_inpcb->inp_route6.ro_rt->rt_mtu; + if (error == EMSGSIZE && tp->t_inpcb->inp_route6.ro_nh != NULL) + mtu = tp->t_inpcb->inp_route6.ro_nh->nh_mtu; } #endif /* INET6 */ #if defined(INET) && defined(INET6) @@ -1454,8 +1455,8 @@ send: ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0, tp->t_inpcb); - if (error == EMSGSIZE && tp->t_inpcb->inp_route.ro_rt != NULL) - mtu = tp->t_inpcb->inp_route.ro_rt->rt_mtu; + if (error == EMSGSIZE && tp->t_inpcb->inp_route.ro_nh != NULL) + mtu = tp->t_inpcb->inp_route.ro_nh->nh_mtu; } #endif /* INET */ Modified: head/sys/netinet/tcp_stacks/bbr.c ============================================================================== --- head/sys/netinet/tcp_stacks/bbr.c Sat Apr 25 06:42:46 2020 (r360291) +++ head/sys/netinet/tcp_stacks/bbr.c Sat Apr 25 09:06:11 2020 (r360292) @@ -5601,8 +5601,8 @@ bbr_update_hardware_pacing_rate(struct tcp_bbr *bbr, u if (bbr->r_ctl.crte == NULL) return; - if ((bbr->rc_inp->inp_route.ro_rt == NULL) || - (bbr->rc_inp->inp_route.ro_rt->rt_ifp == NULL)) { + if ((bbr->rc_inp->inp_route.ro_nh == NULL) || + (bbr->rc_inp->inp_route.ro_nh->nh_ifp == NULL)) { /* Lost our routes? */ /* Clear the way for a re-attempt */ bbr->bbr_attempt_hdwr_pace = 0; @@ -5618,7 +5618,7 @@ lost_rate: rate = bbr_get_hardware_rate(bbr); nrte = tcp_chg_pacing_rate(bbr->r_ctl.crte, bbr->rc_tp, - bbr->rc_inp->inp_route.ro_rt->rt_ifp, + bbr->rc_inp->inp_route.ro_nh->nh_ifp, rate, (RS_PACING_GEQ|RS_PACING_SUB_OK), &error); @@ -13975,8 +13975,8 @@ send: ((rsm || sack_rxmit) ? IP_NO_SND_TAG_RL : 0), NULL, NULL, inp); - if (error == EMSGSIZE && inp->inp_route6.ro_rt != NULL) - mtu = inp->inp_route6.ro_rt->rt_mtu; + if (error == EMSGSIZE && inp->inp_route6.ro_nh != NULL) + mtu = inp->inp_route6.ro_nh->nh_mtu; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Apr 25 09:17:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8CFAD2A85A3; Sat, 25 Apr 2020 09:17:50 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498QRy373zz3GDH; Sat, 25 Apr 2020 09:17:50 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 622415345; Sat, 25 Apr 2020 09:17:50 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03P9Ho51030772; Sat, 25 Apr 2020 09:17:50 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03P9HoVc030771; Sat, 25 Apr 2020 09:17:50 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202004250917.03P9HoVc030771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sat, 25 Apr 2020 09:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360293 - head/sys/arm64/rockchip X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/arm64/rockchip X-SVN-Commit-Revision: 360293 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 09:17:50 -0000 Author: mmel Date: Sat Apr 25 09:17:49 2020 New Revision: 360293 URL: https://svnweb.freebsd.org/changeset/base/360293 Log: Reorder initialization steps for given pin. If pin is switched from fixed function to GPIO, it should have prepared direction, pull-up/down and default value before function gets switched. Otherwise we may produce unwanted glitch on output pin. Right order of drive strength settings is questionable, but I think that is slightly safer to do it also before function switch. This fixes serial port corruption observed after DT 5.6 import. MFC after: 1 week Modified: head/sys/arm64/rockchip/rk_pinctrl.c Modified: head/sys/arm64/rockchip/rk_pinctrl.c ============================================================================== --- head/sys/arm64/rockchip/rk_pinctrl.c Sat Apr 25 09:06:11 2020 (r360292) +++ head/sys/arm64/rockchip/rk_pinctrl.c Sat Apr 25 09:17:49 2020 (r360293) @@ -932,7 +932,28 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, /* Find syscon */ syscon = sc->conf->get_syscon(sc, bank); - /* Parse pin function */ + /* Setup GPIO properties first */ + rv = rk_pinctrl_handle_io(sc, pin_conf, bank, pin); + + /* Then pin pull-up/down */ + bias = sc->conf->parse_bias(pin_conf, bank); + if (bias >= 0) { + reg = sc->conf->get_pd_offset(sc, bank); + reg += bank * 0x10 + ((pin / 8) * 0x4); + bit = (pin % 8) * 2; + mask = (0x3 << bit); + SYSCON_MODIFY_4(syscon, reg, mask, bias << bit | (mask << 16)); + } + + /* Then drive strength */ + rv = rk_pinctrl_parse_drive(sc, pin_conf, bank, subbank, &drive, ®); + if (rv == 0) { + bit = (pin % 8) * 2; + mask = (0x3 << bit); + SYSCON_MODIFY_4(syscon, reg, mask, drive << bit | (mask << 16)); + } + + /* Finally set the pin function */ reg = sc->conf->iomux_conf[i].offset; switch (sc->conf->iomux_conf[i].nbits) { case 4: @@ -966,28 +987,6 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, * without hi-word write mask. */ SYSCON_MODIFY_4(syscon, reg, mask, function << bit | (mask << 16)); - - /* Pull-Up/Down */ - bias = sc->conf->parse_bias(pin_conf, bank); - if (bias >= 0) { - reg = sc->conf->get_pd_offset(sc, bank); - - reg += bank * 0x10 + ((pin / 8) * 0x4); - bit = (pin % 8) * 2; - mask = (0x3 << bit); - SYSCON_MODIFY_4(syscon, reg, mask, bias << bit | (mask << 16)); - } - - /* Drive Strength */ - rv = rk_pinctrl_parse_drive(sc, pin_conf, bank, subbank, &drive, ®); - if (rv == 0) { - bit = (pin % 8) * 2; - mask = (0x3 << bit); - SYSCON_MODIFY_4(syscon, reg, mask, drive << bit | (mask << 16)); - } - - /* Input/Outpot + default level */ - rv = rk_pinctrl_handle_io(sc, pin_conf, bank, pin); } static int From owner-svn-src-all@freebsd.org Sat Apr 25 09:25:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91D642A8959; Sat, 25 Apr 2020 09:25:06 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498QcL3J6zz3GmZ; Sat, 25 Apr 2020 09:25:06 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C80A5546; Sat, 25 Apr 2020 09:25:06 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03P9P6TC037015; Sat, 25 Apr 2020 09:25:06 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03P9P6Jo037014; Sat, 25 Apr 2020 09:25:06 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202004250925.03P9P6Jo037014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 25 Apr 2020 09:25:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360294 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 360294 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 09:25:06 -0000 Author: melifaro Date: Sat Apr 25 09:25:06 2020 New Revision: 360294 URL: https://svnweb.freebsd.org/changeset/base/360294 Log: Fix userland build broken by r360292. Modified: head/sys/net/route.h Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Sat Apr 25 09:17:49 2020 (r360293) +++ head/sys/net/route.h Sat Apr 25 09:25:06 2020 (r360294) @@ -331,6 +331,7 @@ struct rt_msghdr { #define RTAX_BRD 7 /* for NEWADDR, broadcast or p-p dest addr */ #define RTAX_MAX 8 /* size of array to allocate */ +struct rtentry; struct nhop_object; typedef int rt_filter_f_t(const struct rtentry *, const struct nhop_object *, void *); From owner-svn-src-all@freebsd.org Sat Apr 25 10:31:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1DA92AB225; Sat, 25 Apr 2020 10:31:56 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498S5S5mNmz3LhR; Sat, 25 Apr 2020 10:31:56 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C135862D4; Sat, 25 Apr 2020 10:31:56 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PAVunr079844; Sat, 25 Apr 2020 10:31:56 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PAVuFF079843; Sat, 25 Apr 2020 10:31:56 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202004251031.03PAVuFF079843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 25 Apr 2020 10:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360295 - head/sys/netinet/tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: head/sys/netinet/tcp_stacks X-SVN-Commit-Revision: 360295 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 10:31:56 -0000 Author: melifaro Date: Sat Apr 25 10:31:56 2020 New Revision: 360295 URL: https://svnweb.freebsd.org/changeset/base/360295 Log: Fix LINT build broken by r360292. Modified: head/sys/netinet/tcp_stacks/bbr.c Modified: head/sys/netinet/tcp_stacks/bbr.c ============================================================================== --- head/sys/netinet/tcp_stacks/bbr.c Sat Apr 25 09:25:06 2020 (r360294) +++ head/sys/netinet/tcp_stacks/bbr.c Sat Apr 25 10:31:56 2020 (r360295) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #define TCPSTATES /* for logging */ From owner-svn-src-all@freebsd.org Sat Apr 25 10:48:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0E932ABBA8; Sat, 25 Apr 2020 10:48:55 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498ST34GMkz3McQ; Sat, 25 Apr 2020 10:48:55 +0000 (UTC) (envelope-from ohartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1587811734; bh=t/xKUExOfxvAzdJi2mDRPZo7tXtq7+c3ln90kLkKDTI=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=Z2xeivCLYEcgf+OvtR0Nj7AXbCPhoD7lmYi9fcRhNCAdznnrQx0IngQ/BKY/7Rt/Q SGm1wyiW9SZnSAHPatjGapo/xkc7B/qGCM7csdS7dri34KgCIUxDwxdnga5ybtiGHu mOI0PYIWbMyacPr3Zy9Jf/hoLx09BnkjxiqplkLw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from thor.intern.walstatt.dynvpn.de ([77.11.98.232]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MiaY9-1ixL3h1T8x-00fmN8; Sat, 25 Apr 2020 12:48:54 +0200 Date: Sat, 25 Apr 2020 12:48:26 +0200 From: "O. Hartmann" To: "Alexander V. Chernikov" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r360295 - head/sys/netinet/tcp_stacks Message-ID: <20200425124853.37995881@thor.intern.walstatt.dynvpn.de> In-Reply-To: <202004251031.03PAVuFF079843@repo.freebsd.org> References: <202004251031.03PAVuFF079843@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:9VAusH1yHXkupwtXONIUjOmgLJhFSmA5brEUESTIl/EVd0mKjNR lIFTyXb7b+tv/NTyFFBHaAKjZnN1huYX6ipb0A1anH9AmUDeeSJ+WSWy+FUDtDV+kc8uRW3 hayfwCtfwDtDLOBSXJdvC/+GjBJuY/PY1ememuOV9XH7T6w5e4HYI+PNjFkvGS89+0puKPY pMa7Xpzhv2Xbr/jY7gw7g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:PsH4wd3+uHs=:Q9fiSdpuFTY+uSG5PmyCwu XVYwHUJi/+Vx/0seHKn3YvRpU7HSRO3uYwfAFq6VfaBvfh13jAaAQyz6d0kyqMvT3HXm4sklj GQiXTkj7pYCwZctRWjxlVEutX7Gwu2fW/drVfTdIRZ7KvDUy7tN4m2JaVIiptMijtPbRbf9QM +vGYeA93b5ycMsn4zSbod8XStVjEyzKwZ/FcNhtrL1s/1I8cTLGL1YiBA561gZxd4hBaaN0EL GfOzZC/sT6fSS8uBKSEzVSpw3BicvgOw7CJdkTzt/bYQ1RdpmfgkFKY+/hriuDZ3sfgMRcZy7 zh0DiT2EWJftV8PDFblgOXWcumVQKZ03o+AGikCvGxlfjPxtC16l4yZTkilKHhsu14nqc7Pbf Wxdv0KmzskkI3Ff0EmwP/O3iuMVUfMgmQgh9BvoUA4zdhW4PHjlkRvEAs9a+PXr4Zr2eOeJFj uR9qhei9NzkpXIWEMaemMiOcR53TMuX5MGfs4YJn6NXKZeMFMpzx2ABWpSATr0wx/vbzt7Vqo 0T61zljaNzEqZ3JZbZ92hFcQLB9HIn4sXWDprx9xC5eB6ChoyWN595QiHb0+7EWrVRI0Sb9UF CPGy3swLhKqtUzF6ViUysHuOBMFi+XKArykG9Q6i1Pq7BVQaF33WmDRsXVdcAn8NRTeRlHUJL Z4+UcUdEGvnVEaldfWWcPvZI64uFKpCS30BKDBksYpwO6EvJOQwVSFwKMURbl/5suIdCACVA+ 2xwrE4qEkB1cV5dPNruyhjDYLjt4vyW6Fx/+YMaUPQ5+32MnGxxexZFWZA7wifsctW914IRFp qHFDr2dttV21JhTY5fj3T53wlPBVx6qLgF2bq4qlaUEjOZTEloUY4iX77pF01jKZF2rXENRsp GwkaESYmCsrOyBjuXm/k38cayD3bviHLYTST0DMExyMZCTWqZA2cCXy7hQQ3AYqtHBsxPCSoY ekmBVd9xA9MAas2dfFaPnu34Rrt85gurd7UFROpv/Bm/U1Bkyqja+zIlzg+blIQm6XjWnWpzg KlJz6TdPmcMM44Ej8hdvFtfl73XJS+mtNIlSRxJF6I82k+Oy3bY6QUp8WirsN4c3Hg6Uswk1B Uf0BZg3xo9gBYpZugv4NbWAlIA5tal4PmtW7JDWfkyi74YNc/USMxGGvZZj/WoOlUjk6vqTT2 S7Yu9qIa4ILQyw48ZlihRiYWHVacgEQ8IRDBSnfKtYNJ5GbFHoZ7tXgFq/27FoNPLjoQLS3o+ BG4U0Fa4clPBfOUM1 X-Rspamd-Queue-Id: 498ST34GMkz3McQ X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 10:48:55 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMjU2DQoNCkFtIFNh dCwgMjUgQXByIDIwMjAgMTA6MzE6NTYgKzAwMDAgKFVUQykNCiJBbGV4YW5kZXIgVi4gQ2hlcm5p a292IiA8bWVsaWZhcm9ARnJlZUJTRC5vcmc+IHNjaHJpZWI6DQoNCj4gQXV0aG9yOiBtZWxpZmFy bw0KPiBEYXRlOiBTYXQgQXByIDI1IDEwOjMxOjU2IDIwMjANCj4gTmV3IFJldmlzaW9uOiAzNjAy OTUNCj4gVVJMOiBodHRwczovL3N2bndlYi5mcmVlYnNkLm9yZy9jaGFuZ2VzZXQvYmFzZS8zNjAy OTUNCj4gDQo+IExvZzoNCj4gICBGaXggTElOVCBidWlsZCBicm9rZW4gYnkgcjM2MDI5Mi4NCj4g DQo+IE1vZGlmaWVkOg0KPiAgIGhlYWQvc3lzL25ldGluZXQvdGNwX3N0YWNrcy9iYnIuYw0KPiAN Cj4gTW9kaWZpZWQ6IGhlYWQvc3lzL25ldGluZXQvdGNwX3N0YWNrcy9iYnIuYw0KPiA9PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT0NCj4gLS0tIGhlYWQvc3lzL25ldGluZXQvdGNwX3N0YWNrcy9iYnIuYwlT YXQgQXByIDI1IDA5OjI1OjA2IDIwMjAJKHIzNjAyOTQpDQo+ICsrKyBoZWFkL3N5cy9uZXRpbmV0 L3RjcF9zdGFja3MvYmJyLmMJU2F0IEFwciAyNSAxMDozMTo1NiAyMDIwCShyMzYwMjk1KQ0KPiBA QCAtNzYsNiArNzYsNyBAQCBfX0ZCU0RJRCgiJEZyZWVCU0QkIik7DQo+ICAjaW5jbHVkZSA8c3lz L2tlcm5fcHJlZmV0Y2guaD4NCj4gIA0KPiAgI2luY2x1ZGUgPG5ldC9yb3V0ZS5oPg0KPiArI2lu Y2x1ZGUgPG5ldC9yb3V0ZS9uaG9wLmg+DQo+ICAjaW5jbHVkZSA8bmV0L3ZuZXQuaD4NCj4gIA0K PiAgI2RlZmluZSBUQ1BTVEFURVMJCS8qIGZvciBsb2dnaW5nICovDQo+IF9fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQo+IHN2bi1zcmMtaGVhZEBmcmVlYnNk Lm9yZyBtYWlsaW5nIGxpc3QNCj4gaHR0cHM6Ly9saXN0cy5mcmVlYnNkLm9yZy9tYWlsbWFuL2xp c3RpbmZvL3N2bi1zcmMtaGVhZA0KPiBUbyB1bnN1YnNjcmliZSwgc2VuZCBhbnkgbWFpbCB0byAi c3ZuLXNyYy1oZWFkLXVuc3Vic2NyaWJlQGZyZWVic2Qub3JnIg0KDQoNCk1ha2UgYnVpbGRrZXJu ZWwgc3RpbGwgZmFpbHMgZHVlIHRvIGVycm9yIHNob3duIGJlbG93Og0KDQpbLi4uXQ0KLSAtLS0g YWxsX3N1YmRpcl90Y3AgLS0tDQotIC0tLSByYWNrLm8gLS0tDQovdXNyL3NyYy9zeXMvbW9kdWxl cy90Y3AvcmFjay8uLi8uLi8uLi9uZXRpbmV0L3RjcF9zdGFja3MvcmFjay5jOjk3ODE6NDQ6IGVy cm9yOiBubyBtZW1iZXINCm5hbWVkICdyb19ydCcgaW4gJ3N0cnVjdCByb3V0ZV9pbjYnIGlmIChl cnJvciA9PSBFTVNHU0laRSAmJiBpbnAtPmlucF9yb3V0ZTYucm9fcnQgIT0gTlVMTCkNCiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfn5+fn5+fn5+fn5+fn5+IF4NCi91 c3Ivc3JjL3N5cy9tb2R1bGVzL3RjcC9yYWNrLy4uLy4uLy4uL25ldGluZXQvdGNwX3N0YWNrcy9y YWNrLmM6OTc4MjoyNjogZXJyb3I6IG5vIG1lbWJlcg0KbmFtZWQgJ3JvX3J0JyBpbiAnc3RydWN0 IHJvdXRlX2luNicgbXR1ID0gaW5wLT5pbnBfcm91dGU2LnJvX3J0LT5ydF9tdHU7DQogICAgICAg ICAgICAgICAgICAgICAgICAgICAgICB+fn5+fn5+fn5+fn5+fn4gXg0KL3Vzci9zcmMvc3lzL21v ZHVsZXMvdGNwL3JhY2svLi4vLi4vLi4vbmV0aW5ldC90Y3Bfc3RhY2tzL3JhY2suYzo5ODIyOjQz OiBlcnJvcjogbm8gbWVtYmVyDQpuYW1lZCAncm9fcnQnIGluICdzdHJ1Y3Qgcm91dGUnIGlmIChl cnJvciA9PSBFTVNHU0laRSAmJiBpbnAtPmlucF9yb3V0ZS5yb19ydCAhPSBOVUxMKQ0KICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB+fn5+fn5+fn5+fn5+fiBeDQovdXNy L3NyYy9zeXMvbW9kdWxlcy90Y3AvcmFjay8uLi8uLi8uLi9uZXRpbmV0L3RjcF9zdGFja3MvcmFj ay5jOjk4MjM6MjU6IGVycm9yOiBubyBtZW1iZXINCm5hbWVkICdyb19ydCcgaW4gJ3N0cnVjdCBy b3V0ZScgbXR1ID0gaW5wLT5pbnBfcm91dGUucm9fcnQtPnJ0X210dTsNCiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIH5+fn5+fn5+fn5+fn5+IF4NCi0gLS0tIGFsbF9zdWJkaXJfdWFydCAt LS0NCg0KDQotIC0tIA0KTy4gSGFydG1hbm4NCg0KSWNoIHdpZGVyc3ByZWNoZSBkZXIgTnV0enVu ZyBvZGVyIMOcYmVybWl0dGx1bmcgbWVpbmVyIERhdGVuIGbDvHINCldlcmJlendlY2tlIG9kZXIg ZsO8ciBkaWUgTWFya3QtIG9kZXIgTWVpbnVuZ3Nmb3JzY2h1bmcgKMKnIDI4IEFicy4gNCBCRFNH KS4NCi0tLS0tQkVHSU4gUEdQIFNJR05BVFVSRS0tLS0tDQoNCmlIVUVBUllJQUIwV0lRU3k4SUJ4 QVBEa3FWQmFUSjQ0TjFaWlBiYTVSd1VDWHFRVmxRQUtDUkE0TjFaWlBiYTUNClIyN0NBUHdKMmZS Z3ppdmYxMmdKT0FRSjg5cUhNTG0rNlUvRVhMVitjQ3hpR2twdjh3RDhEV3Myd2llZGJRRjYNCmx4 bjlHU2tERDl6aWp1ZFBPckhVazY2anBwUW9Qd1E9DQo9MVJPeA0KLS0tLS1FTkQgUEdQIFNJR05B VFVSRS0tLS0tDQo= From owner-svn-src-all@freebsd.org Sat Apr 25 11:35:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C193E2AD062; Sat, 25 Apr 2020 11:35:39 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498TVz4gXLz3PmR; Sat, 25 Apr 2020 11:35:39 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81D436EBE; Sat, 25 Apr 2020 11:35:39 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PBZdbH017831; Sat, 25 Apr 2020 11:35:39 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PBZccB017829; Sat, 25 Apr 2020 11:35:38 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202004251135.03PBZccB017829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 25 Apr 2020 11:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360296 - in head/sys: kern netinet netinet/tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: kern netinet netinet/tcp_stacks X-SVN-Commit-Revision: 360296 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 11:35:39 -0000 Author: melifaro Date: Sat Apr 25 11:35:38 2020 New Revision: 360296 URL: https://svnweb.freebsd.org/changeset/base/360296 Log: Fix LINT build #2 after r360292. Pointyhat to: melifaro Modified: head/sys/kern/uipc_ktls.c head/sys/netinet/sctp_output.c head/sys/netinet/tcp_stacks/rack.c Modified: head/sys/kern/uipc_ktls.c ============================================================================== --- head/sys/kern/uipc_ktls.c Sat Apr 25 10:31:56 2020 (r360295) +++ head/sys/kern/uipc_ktls.c Sat Apr 25 11:35:38 2020 (r360296) @@ -61,6 +61,8 @@ __FBSDID("$FreeBSD$"); #include #include #endif +#include +#include #if defined(INET) || defined(INET6) #include #include Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat Apr 25 10:31:56 2020 (r360295) +++ head/sys/netinet/sctp_output.c Sat Apr 25 11:35:38 2020 (r360296) @@ -13901,7 +13901,7 @@ sctp_v4src_match_nexthop(struct sctp_ifa *sifa, sctp_r sin = &ro->ro_nh->gw4_sa; gwnetaddr.s_addr = (sin->sin_addr.s_addr & mask->sin_addr.s_addr); SCTPDBG(SCTP_DEBUG_OUTPUT1, "match_nexthop4: nexthop is "); - SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, &ro->ro_nh->gw4_sa); + SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, &ro->ro_nh->gw_sa); SCTPDBG(SCTP_DEBUG_OUTPUT1, "network address is %x\n", gwnetaddr.s_addr); if (srcnetaddr.s_addr == gwnetaddr.s_addr) { return (1); Modified: head/sys/netinet/tcp_stacks/rack.c ============================================================================== --- head/sys/netinet/tcp_stacks/rack.c Sat Apr 25 10:31:56 2020 (r360295) +++ head/sys/netinet/tcp_stacks/rack.c Sat Apr 25 11:35:38 2020 (r360296) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #define TCPSTATES /* for logging */ @@ -9778,8 +9779,8 @@ send: ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), NULL, NULL, inp); - if (error == EMSGSIZE && inp->inp_route6.ro_rt != NULL) - mtu = inp->inp_route6.ro_rt->rt_mtu; + if (error == EMSGSIZE && inp->inp_route6.ro_nh != NULL) + mtu = inp->inp_route6.ro_nh->nh_mtu; } #endif /* INET6 */ #if defined(INET) && defined(INET6) @@ -9819,8 +9820,8 @@ send: error = ip_output(m, tp->t_inpcb->inp_options, &inp->inp_route, ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0, inp); - if (error == EMSGSIZE && inp->inp_route.ro_rt != NULL) - mtu = inp->inp_route.ro_rt->rt_mtu; + if (error == EMSGSIZE && inp->inp_route.ro_nh != NULL) + mtu = inp->inp_route.ro_nh->nh_mtu; } #endif /* INET */ From owner-svn-src-all@freebsd.org Sat Apr 25 12:39:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E39A2AFE13; Sat, 25 Apr 2020 12:39:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498Vwc72b6z40hw; Sat, 25 Apr 2020 12:39:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECD717AC1; Sat, 25 Apr 2020 12:39:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PCdSiO057048; Sat, 25 Apr 2020 12:39:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PCdSdJ057047; Sat, 25 Apr 2020 12:39:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251239.03PCdSdJ057047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 12:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360297 - in stable: 11/sys/dev/ips 12/sys/dev/ips X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/dev/ips 12/sys/dev/ips X-SVN-Commit-Revision: 360297 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 12:39:29 -0000 Author: dim Date: Sat Apr 25 12:39:28 2020 New Revision: 360297 URL: https://svnweb.freebsd.org/changeset/base/360297 Log: MFC r348366 (by lwhsu): Add the likely missing braces in ips(4). This is found by gcc warning that the code is not guarded by the if clause and has misleading indentation. Approved by: scottl Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20427 Modified: stable/12/sys/dev/ips/ips.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/ips/ips.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/dev/ips/ips.c ============================================================================== --- stable/12/sys/dev/ips/ips.c Sat Apr 25 11:35:38 2020 (r360296) +++ stable/12/sys/dev/ips/ips.c Sat Apr 25 12:39:28 2020 (r360297) @@ -283,10 +283,11 @@ static int ips_diskdev_free(ips_softc_t *sc) int i; int error = 0; for(i = 0; i < IPS_MAX_NUM_DRIVES; i++){ - if(sc->diskdev[i]) + if(sc->diskdev[i]) { error = device_delete_child(sc->dev, sc->diskdev[i]); if(error) return error; + } } bus_generic_detach(sc->dev); return 0; From owner-svn-src-all@freebsd.org Sat Apr 25 12:39:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FBED2AFE20; Sat, 25 Apr 2020 12:39:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498Vwd2Prpz40hx; Sat, 25 Apr 2020 12:39:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DF0D7AC2; Sat, 25 Apr 2020 12:39:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PCdTKX057054; Sat, 25 Apr 2020 12:39:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PCdTFb057053; Sat, 25 Apr 2020 12:39:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251239.03PCdTFb057053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 12:39:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360297 - in stable: 11/sys/dev/ips 12/sys/dev/ips X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/dev/ips 12/sys/dev/ips X-SVN-Commit-Revision: 360297 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 12:39:29 -0000 Author: dim Date: Sat Apr 25 12:39:28 2020 New Revision: 360297 URL: https://svnweb.freebsd.org/changeset/base/360297 Log: MFC r348366 (by lwhsu): Add the likely missing braces in ips(4). This is found by gcc warning that the code is not guarded by the if clause and has misleading indentation. Approved by: scottl Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20427 Modified: stable/11/sys/dev/ips/ips.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/dev/ips/ips.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/dev/ips/ips.c ============================================================================== --- stable/11/sys/dev/ips/ips.c Sat Apr 25 11:35:38 2020 (r360296) +++ stable/11/sys/dev/ips/ips.c Sat Apr 25 12:39:28 2020 (r360297) @@ -281,10 +281,11 @@ static int ips_diskdev_free(ips_softc_t *sc) int i; int error = 0; for(i = 0; i < IPS_MAX_NUM_DRIVES; i++){ - if(sc->diskdev[i]) + if(sc->diskdev[i]) { error = device_delete_child(sc->dev, sc->diskdev[i]); if(error) return error; + } } bus_generic_detach(sc->dev); return 0; From owner-svn-src-all@freebsd.org Sat Apr 25 12:49:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 279792B028D; Sat, 25 Apr 2020 12:49:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498W8Y0C7Dz41GY; Sat, 25 Apr 2020 12:49:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 022187CB3; Sat, 25 Apr 2020 12:49:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PCnmGJ063453; Sat, 25 Apr 2020 12:49:48 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PCnmi9063448; Sat, 25 Apr 2020 12:49:48 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202004251249.03PCnmi9063448@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 25 Apr 2020 12:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360298 - in stable/12/sys: kern net sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in stable/12/sys: kern net sys X-SVN-Commit-Revision: 360298 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 12:49:49 -0000 Author: kp Date: Sat Apr 25 12:49:48 2020 New Revision: 360298 URL: https://svnweb.freebsd.org/changeset/base/360298 Log: MFC r360068: ethersubr: Make the mac address generation more robust If we create two (vnet) jails and create a bridge interface in each we end up with the same mac address on both bridge interfaces. These very often conflicts, resulting in same mac address in both jails. Mitigate this problem by including the jail name in the mac address. Modified: stable/12/sys/kern/kern_jail.c stable/12/sys/net/if_ethersubr.c stable/12/sys/sys/jail.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_jail.c ============================================================================== --- stable/12/sys/kern/kern_jail.c Sat Apr 25 12:39:28 2020 (r360297) +++ stable/12/sys/kern/kern_jail.c Sat Apr 25 12:49:48 2020 (r360298) @@ -2919,6 +2919,15 @@ getcredhostid(struct ucred *cred, unsigned long *hosti mtx_unlock(&cred->cr_prison->pr_mtx); } +void +getjailname(struct ucred *cred, char *name, size_t len) +{ + + mtx_lock(&cred->cr_prison->pr_mtx); + strlcpy(name, cred->cr_prison->pr_name, len); + mtx_unlock(&cred->cr_prison->pr_mtx); +} + #ifdef VIMAGE /* * Determine whether the prison represented by cred owns Modified: stable/12/sys/net/if_ethersubr.c ============================================================================== --- stable/12/sys/net/if_ethersubr.c Sat Apr 25 12:39:28 2020 (r360297) +++ stable/12/sys/net/if_ethersubr.c Sat Apr 25 12:49:48 2020 (r360298) @@ -1375,27 +1375,39 @@ ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, /* * Allocate an address from the FreeBSD Foundation OUI. This uses a - * cryptographic hash function on the containing jail's UUID and the interface - * name to attempt to provide a unique but stable address. Pseudo-interfaces - * which require a MAC address should use this function to allocate - * non-locally-administered addresses. + * cryptographic hash function on the containing jail's name, UUID and the + * interface name to attempt to provide a unique but stable address. + * Pseudo-interfaces which require a MAC address should use this function to + * allocate non-locally-administered addresses. */ void ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) { -#define ETHER_GEN_ADDR_BUFSIZ HOSTUUIDLEN + IFNAMSIZ + 2 SHA1_CTX ctx; - char buf[ETHER_GEN_ADDR_BUFSIZ]; + char *buf; char uuid[HOSTUUIDLEN + 1]; uint64_t addr; int i, sz; char digest[SHA1_RESULTLEN]; + char jailname[MAXHOSTNAMELEN]; getcredhostuuid(curthread->td_ucred, uuid, sizeof(uuid)); - sz = snprintf(buf, ETHER_GEN_ADDR_BUFSIZ, "%s-%s", uuid, ifp->if_xname); + /* If each (vnet) jail would also have a unique hostuuid this would not + * be necessary. */ + getjailname(curthread->td_ucred, jailname, sizeof(jailname)); + sz = asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, if_name(ifp), + jailname); + if (sz < 0) { + /* Fall back to a random mac address. */ + arc4rand(hwaddr, sizeof(*hwaddr), 0); + hwaddr->octet[0] = 0x02; + return; + } + SHA1Init(&ctx); SHA1Update(&ctx, buf, sz); SHA1Final(digest, &ctx); + free(buf, M_TEMP); addr = ((digest[0] << 16) | (digest[1] << 8) | digest[2]) & OUI_FREEBSD_GENERATED_MASK; Modified: stable/12/sys/sys/jail.h ============================================================================== --- stable/12/sys/sys/jail.h Sat Apr 25 12:39:28 2020 (r360297) +++ stable/12/sys/sys/jail.h Sat Apr 25 12:49:48 2020 (r360298) @@ -368,6 +368,7 @@ void getcredhostname(struct ucred *, char *, size_t); void getcreddomainname(struct ucred *, char *, size_t); void getcredhostuuid(struct ucred *, char *, size_t); void getcredhostid(struct ucred *, unsigned long *); +void getjailname(struct ucred *cred, char *name, size_t len); void prison0_init(void); int prison_allow(struct ucred *, unsigned); int prison_check(struct ucred *cred1, struct ucred *cred2); From owner-svn-src-all@freebsd.org Sat Apr 25 12:49:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 376B02B028E; Sat, 25 Apr 2020 12:49:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498W8Y0l50z41GZ; Sat, 25 Apr 2020 12:49:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14BB67CB4; Sat, 25 Apr 2020 12:49:49 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PCnmpt063454; Sat, 25 Apr 2020 12:49:48 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PCnmBg063449; Sat, 25 Apr 2020 12:49:48 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202004251249.03PCnmBg063449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 25 Apr 2020 12:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360299 - in stable/11/sys: kern net sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in stable/11/sys: kern net sys X-SVN-Commit-Revision: 360299 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 12:49:49 -0000 Author: kp Date: Sat Apr 25 12:49:48 2020 New Revision: 360299 URL: https://svnweb.freebsd.org/changeset/base/360299 Log: MFC r360068: ethersubr: Make the mac address generation more robust If we create two (vnet) jails and create a bridge interface in each we end up with the same mac address on both bridge interfaces. These very often conflicts, resulting in same mac address in both jails. Mitigate this problem by including the jail name in the mac address. Modified: stable/11/sys/kern/kern_jail.c stable/11/sys/net/if_ethersubr.c stable/11/sys/sys/jail.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_jail.c ============================================================================== --- stable/11/sys/kern/kern_jail.c Sat Apr 25 12:49:48 2020 (r360298) +++ stable/11/sys/kern/kern_jail.c Sat Apr 25 12:49:48 2020 (r360299) @@ -2936,6 +2936,15 @@ getcredhostid(struct ucred *cred, unsigned long *hosti mtx_unlock(&cred->cr_prison->pr_mtx); } +void +getjailname(struct ucred *cred, char *name, size_t len) +{ + + mtx_lock(&cred->cr_prison->pr_mtx); + strlcpy(name, cred->cr_prison->pr_name, len); + mtx_unlock(&cred->cr_prison->pr_mtx); +} + #ifdef VIMAGE /* * Determine whether the prison represented by cred owns Modified: stable/11/sys/net/if_ethersubr.c ============================================================================== --- stable/11/sys/net/if_ethersubr.c Sat Apr 25 12:49:48 2020 (r360298) +++ stable/11/sys/net/if_ethersubr.c Sat Apr 25 12:49:48 2020 (r360299) @@ -1377,27 +1377,39 @@ ether_8021q_frame(struct mbuf **mp, struct ifnet *ife, /* * Allocate an address from the FreeBSD Foundation OUI. This uses a - * cryptographic hash function on the containing jail's UUID and the interface - * name to attempt to provide a unique but stable address. Pseudo-interfaces - * which require a MAC address should use this function to allocate - * non-locally-administered addresses. + * cryptographic hash function on the containing jail's name, UUID and the + * interface name to attempt to provide a unique but stable address. + * Pseudo-interfaces which require a MAC address should use this function to + * allocate non-locally-administered addresses. */ void ether_gen_addr(struct ifnet *ifp, struct ether_addr *hwaddr) { -#define ETHER_GEN_ADDR_BUFSIZ HOSTUUIDLEN + IFNAMSIZ + 2 SHA1_CTX ctx; - char buf[ETHER_GEN_ADDR_BUFSIZ]; + char *buf; char uuid[HOSTUUIDLEN + 1]; uint64_t addr; int i, sz; char digest[SHA1_RESULTLEN]; + char jailname[MAXHOSTNAMELEN]; getcredhostuuid(curthread->td_ucred, uuid, sizeof(uuid)); - sz = snprintf(buf, ETHER_GEN_ADDR_BUFSIZ, "%s-%s", uuid, ifp->if_xname); + /* If each (vnet) jail would also have a unique hostuuid this would not + * be necessary. */ + getjailname(curthread->td_ucred, jailname, sizeof(jailname)); + sz = asprintf(&buf, M_TEMP, "%s-%s-%s", uuid, if_name(ifp), + jailname); + if (sz < 0) { + /* Fall back to a random mac address. */ + arc4rand(hwaddr, sizeof(*hwaddr), 0); + hwaddr->octet[0] = 0x02; + return; + } + SHA1Init(&ctx); SHA1Update(&ctx, buf, sz); SHA1Final(digest, &ctx); + free(buf, M_TEMP); addr = ((digest[0] << 16) | (digest[1] << 8) | digest[2]) & OUI_FREEBSD_GENERATED_MASK; Modified: stable/11/sys/sys/jail.h ============================================================================== --- stable/11/sys/sys/jail.h Sat Apr 25 12:49:48 2020 (r360298) +++ stable/11/sys/sys/jail.h Sat Apr 25 12:49:48 2020 (r360299) @@ -367,6 +367,7 @@ void getcredhostname(struct ucred *, char *, size_t); void getcreddomainname(struct ucred *, char *, size_t); void getcredhostuuid(struct ucred *, char *, size_t); void getcredhostid(struct ucred *, unsigned long *); +void getjailname(struct ucred *cred, char *name, size_t len); void prison0_init(void); int prison_allow(struct ucred *, unsigned); int prison_check(struct ucred *cred1, struct ucred *cred2); From owner-svn-src-all@freebsd.org Sat Apr 25 12:50:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 214E42B037A; Sat, 25 Apr 2020 12:50:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498W9973hHz41V3; Sat, 25 Apr 2020 12:50:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED80F7CB8; Sat, 25 Apr 2020 12:50:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PCoLgp063582; Sat, 25 Apr 2020 12:50:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PCoLlD063581; Sat, 25 Apr 2020 12:50:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251250.03PCoLlD063581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 12:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360300 - stable/12/sys/mips/include X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/12/sys/mips/include X-SVN-Commit-Revision: 360300 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 12:50:22 -0000 Author: dim Date: Sat Apr 25 12:50:21 2020 New Revision: 360300 URL: https://svnweb.freebsd.org/changeset/base/360300 Log: MFC r342022 (by imp): Correctly implemenet atomic_swap_long for mips64. MIPS64 has 64-bit longs, so use uint64_t for it, otherwise uint32_t. sizeof(long) == sizeof(ptr) for all platforms, so define atomic_swap_ptr in terms of atomic_swap_long. Submitted by: hps@ Modified: stable/12/sys/mips/include/atomic.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/mips/include/atomic.h ============================================================================== --- stable/12/sys/mips/include/atomic.h Sat Apr 25 12:49:48 2020 (r360299) +++ stable/12/sys/mips/include/atomic.h Sat Apr 25 12:50:21 2020 (r360300) @@ -797,6 +797,7 @@ atomic_swap_64(volatile uint64_t *ptr, const uint64_t } #endif +#ifdef __mips_n64 static __inline unsigned long atomic_swap_long(volatile unsigned long *ptr, const unsigned long value) { @@ -804,16 +805,16 @@ atomic_swap_long(volatile unsigned long *ptr, const un retval = *ptr; - while (!atomic_fcmpset_32((volatile uint32_t *)ptr, - (uint32_t *)&retval, value)) + while (!atomic_fcmpset_64((volatile uint64_t *)ptr, + (uint64_t *)&retval, value)) ; return (retval); } - -static __inline uintptr_t -atomic_swap_ptr(volatile uintptr_t *ptr, const uintptr_t value) +#else +static __inline unsigned long +atomic_swap_long(volatile unsigned long *ptr, const unsigned long value) { - uintptr_t retval; + unsigned long retval; retval = *ptr; @@ -822,5 +823,7 @@ atomic_swap_ptr(volatile uintptr_t *ptr, const uintptr ; return (retval); } +#endif +#define atomic_swap_ptr(ptr, value) atomic_swap_long((unsigned long *)(ptr), value) #endif /* ! _MACHINE_ATOMIC_H_ */ From owner-svn-src-all@freebsd.org Sat Apr 25 12:57:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE4D82B069A; Sat, 25 Apr 2020 12:57:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498WKD5TxCz41t6; Sat, 25 Apr 2020 12:57:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B77217E8D; Sat, 25 Apr 2020 12:57:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PCvKTR069422; Sat, 25 Apr 2020 12:57:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PCvK3n069421; Sat, 25 Apr 2020 12:57:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251257.03PCvK3n069421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 12:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360301 - in stable: 10/contrib/bsnmp/lib 11/contrib/bsnmp/lib 12/contrib/bsnmp/lib X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/contrib/bsnmp/lib 11/contrib/bsnmp/lib 12/contrib/bsnmp/lib X-SVN-Commit-Revision: 360301 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 12:57:20 -0000 Author: dim Date: Sat Apr 25 12:57:20 2020 New Revision: 360301 URL: https://svnweb.freebsd.org/changeset/base/360301 Log: MFC r354834 (by jhibbits): bsnmp: Fix operator precedence in error check in table_check_response Summary: The ?: operator has a lower precedence than == and &&, so the result will always be recorded as true. Found by gcc8. Reviewed by: ngie, ae Differential Revision: https://reviews.freebsd.org/D22427 Modified: stable/12/contrib/bsnmp/lib/snmpclient.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/bsnmp/lib/snmpclient.c stable/11/contrib/bsnmp/lib/snmpclient.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/contrib/bsnmp/lib/snmpclient.c ============================================================================== --- stable/12/contrib/bsnmp/lib/snmpclient.c Sat Apr 25 12:50:21 2020 (r360300) +++ stable/12/contrib/bsnmp/lib/snmpclient.c Sat Apr 25 12:57:20 2020 (r360301) @@ -480,7 +480,7 @@ table_check_response(struct tabwork *work, const struc if (snmp_client.version == SNMP_V1 && resp->error_status == SNMP_ERR_NOSUCHNAME && resp->error_index == - (work->descr->last_change.len == 0) ? 1 : 2) + ((work->descr->last_change.len == 0) ? 1 : 2)) /* EOT */ return (0); /* Error */ From owner-svn-src-all@freebsd.org Sat Apr 25 12:57:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4DF232B069F; Sat, 25 Apr 2020 12:57:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498WKF1Nknz41t7; Sat, 25 Apr 2020 12:57:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2ACB27E8E; Sat, 25 Apr 2020 12:57:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PCvKET069428; Sat, 25 Apr 2020 12:57:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PCvK9r069427; Sat, 25 Apr 2020 12:57:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251257.03PCvK9r069427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 12:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360301 - in stable: 10/contrib/bsnmp/lib 11/contrib/bsnmp/lib 12/contrib/bsnmp/lib X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/contrib/bsnmp/lib 11/contrib/bsnmp/lib 12/contrib/bsnmp/lib X-SVN-Commit-Revision: 360301 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 12:57:21 -0000 Author: dim Date: Sat Apr 25 12:57:20 2020 New Revision: 360301 URL: https://svnweb.freebsd.org/changeset/base/360301 Log: MFC r354834 (by jhibbits): bsnmp: Fix operator precedence in error check in table_check_response Summary: The ?: operator has a lower precedence than == and &&, so the result will always be recorded as true. Found by gcc8. Reviewed by: ngie, ae Differential Revision: https://reviews.freebsd.org/D22427 Modified: stable/11/contrib/bsnmp/lib/snmpclient.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/bsnmp/lib/snmpclient.c stable/12/contrib/bsnmp/lib/snmpclient.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/contrib/bsnmp/lib/snmpclient.c ============================================================================== --- stable/11/contrib/bsnmp/lib/snmpclient.c Sat Apr 25 12:50:21 2020 (r360300) +++ stable/11/contrib/bsnmp/lib/snmpclient.c Sat Apr 25 12:57:20 2020 (r360301) @@ -474,7 +474,7 @@ table_check_response(struct tabwork *work, const struc if (snmp_client.version == SNMP_V1 && resp->error_status == SNMP_ERR_NOSUCHNAME && resp->error_index == - (work->descr->last_change.len == 0) ? 1 : 2) + ((work->descr->last_change.len == 0) ? 1 : 2)) /* EOT */ return (0); /* Error */ From owner-svn-src-all@freebsd.org Sat Apr 25 12:57:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80E952B06A4; Sat, 25 Apr 2020 12:57:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498WKF2w7jz41t8; Sat, 25 Apr 2020 12:57:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5F3017E8F; Sat, 25 Apr 2020 12:57:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PCvLbR069434; Sat, 25 Apr 2020 12:57:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PCvLNF069433; Sat, 25 Apr 2020 12:57:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251257.03PCvLNF069433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 12:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r360301 - in stable: 10/contrib/bsnmp/lib 11/contrib/bsnmp/lib 12/contrib/bsnmp/lib X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/contrib/bsnmp/lib 11/contrib/bsnmp/lib 12/contrib/bsnmp/lib X-SVN-Commit-Revision: 360301 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 12:57:21 -0000 Author: dim Date: Sat Apr 25 12:57:20 2020 New Revision: 360301 URL: https://svnweb.freebsd.org/changeset/base/360301 Log: MFC r354834 (by jhibbits): bsnmp: Fix operator precedence in error check in table_check_response Summary: The ?: operator has a lower precedence than == and &&, so the result will always be recorded as true. Found by gcc8. Reviewed by: ngie, ae Differential Revision: https://reviews.freebsd.org/D22427 Modified: stable/10/contrib/bsnmp/lib/snmpclient.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/bsnmp/lib/snmpclient.c stable/12/contrib/bsnmp/lib/snmpclient.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/contrib/bsnmp/lib/snmpclient.c ============================================================================== --- stable/10/contrib/bsnmp/lib/snmpclient.c Sat Apr 25 12:50:21 2020 (r360300) +++ stable/10/contrib/bsnmp/lib/snmpclient.c Sat Apr 25 12:57:20 2020 (r360301) @@ -474,7 +474,7 @@ table_check_response(struct tabwork *work, const struc if (snmp_client.version == SNMP_V1 && resp->error_status == SNMP_ERR_NOSUCHNAME && resp->error_index == - (work->descr->last_change.len == 0) ? 1 : 2) + ((work->descr->last_change.len == 0) ? 1 : 2)) /* EOT */ return (0); /* Error */ From owner-svn-src-all@freebsd.org Sat Apr 25 13:03:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5F2E2B0B25; Sat, 25 Apr 2020 13:03:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498WST5lfPz42lk; Sat, 25 Apr 2020 13:03:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0B828077; Sat, 25 Apr 2020 13:03:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PD3bq2075768; Sat, 25 Apr 2020 13:03:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PD3bxW075767; Sat, 25 Apr 2020 13:03:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251303.03PD3bxW075767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 13:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360302 - in stable: 11/lib/libdevdctl 12/lib/libdevdctl X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/lib/libdevdctl 12/lib/libdevdctl X-SVN-Commit-Revision: 360302 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 13:03:38 -0000 Author: dim Date: Sat Apr 25 13:03:37 2020 New Revision: 360302 URL: https://svnweb.freebsd.org/changeset/base/360302 Log: MFC r355974 (by rlibby): libdevdctl: g++9 avoid Wdeprecated-copy g++9 now warns about having defined an assignment operator but using the default copy constructor, or vice versa. Avoid the issue in libdevdctl by just using the default assignment operator too. Reviewed by: asomers, dim Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D22887 Modified: stable/12/lib/libdevdctl/guid.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libdevdctl/guid.h Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libdevdctl/guid.h ============================================================================== --- stable/12/lib/libdevdctl/guid.h Sat Apr 25 12:57:20 2020 (r360301) +++ stable/12/lib/libdevdctl/guid.h Sat Apr 25 13:03:37 2020 (r360302) @@ -70,9 +70,6 @@ class Guid (public) Guid(const std::string &guid); static Guid InvalidGuid(); - /* Assignment */ - Guid& operator=(const Guid& rhs); - /* Test the validity of this guid. */ bool IsValid() const; @@ -108,13 +105,6 @@ inline Guid Guid::InvalidGuid() { return (Guid(INVALID_GUID)); -} - -inline Guid& -Guid::operator=(const Guid &rhs) -{ - m_GUID = rhs.m_GUID; - return (*this); } inline bool From owner-svn-src-all@freebsd.org Sat Apr 25 13:03:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5ADD82B0B2F; Sat, 25 Apr 2020 13:03:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498WSV1mYxz42ll; Sat, 25 Apr 2020 13:03:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37DBA8078; Sat, 25 Apr 2020 13:03:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PD3cxh075775; Sat, 25 Apr 2020 13:03:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PD3cdG075774; Sat, 25 Apr 2020 13:03:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251303.03PD3cdG075774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 13:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360302 - in stable: 11/lib/libdevdctl 12/lib/libdevdctl X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/lib/libdevdctl 12/lib/libdevdctl X-SVN-Commit-Revision: 360302 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 13:03:38 -0000 Author: dim Date: Sat Apr 25 13:03:37 2020 New Revision: 360302 URL: https://svnweb.freebsd.org/changeset/base/360302 Log: MFC r355974 (by rlibby): libdevdctl: g++9 avoid Wdeprecated-copy g++9 now warns about having defined an assignment operator but using the default copy constructor, or vice versa. Avoid the issue in libdevdctl by just using the default assignment operator too. Reviewed by: asomers, dim Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D22887 Modified: stable/11/lib/libdevdctl/guid.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libdevdctl/guid.h Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/libdevdctl/guid.h ============================================================================== --- stable/11/lib/libdevdctl/guid.h Sat Apr 25 12:57:20 2020 (r360301) +++ stable/11/lib/libdevdctl/guid.h Sat Apr 25 13:03:37 2020 (r360302) @@ -70,9 +70,6 @@ class Guid (public) Guid(const std::string &guid); static Guid InvalidGuid(); - /* Assignment */ - Guid& operator=(const Guid& rhs); - /* Test the validity of this guid. */ bool IsValid() const; @@ -108,13 +105,6 @@ inline Guid Guid::InvalidGuid() { return (Guid(INVALID_GUID)); -} - -inline Guid& -Guid::operator=(const Guid &rhs) -{ - m_GUID = rhs.m_GUID; - return (*this); } inline bool From owner-svn-src-all@freebsd.org Sat Apr 25 13:10:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D56812B0D22; Sat, 25 Apr 2020 13:10:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498WcB5PCJz4333; Sat, 25 Apr 2020 13:10:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B45A68082; Sat, 25 Apr 2020 13:10:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PDAI2K076226; Sat, 25 Apr 2020 13:10:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PDAIG3076225; Sat, 25 Apr 2020 13:10:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251310.03PDAIG3076225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 13:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r360303 - in stable: 10/sys/dev/drm2/radeon 11/sys/dev/drm2/radeon 12/sys/dev/drm2/radeon X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/dev/drm2/radeon 11/sys/dev/drm2/radeon 12/sys/dev/drm2/radeon X-SVN-Commit-Revision: 360303 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 13:10:18 -0000 Author: dim Date: Sat Apr 25 13:10:17 2020 New Revision: 360303 URL: https://svnweb.freebsd.org/changeset/base/360303 Log: Fix misleading indentation in sys/dev/drm2/radeon/evergreen.c This fixes the following warning from recent versions of clang and gcc: sys/dev/drm2/radeon/evergreen.c:554:4: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] Direct commit to stable/{10,11,12}, since this driver has been removed from FreeBSD 13. Modified: stable/10/sys/dev/drm2/radeon/evergreen.c Changes in other areas also in this revision: Modified: stable/11/sys/dev/drm2/radeon/evergreen.c stable/12/sys/dev/drm2/radeon/evergreen.c Modified: stable/10/sys/dev/drm2/radeon/evergreen.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/evergreen.c Sat Apr 25 13:03:37 2020 (r360302) +++ stable/10/sys/dev/drm2/radeon/evergreen.c Sat Apr 25 13:10:17 2020 (r360303) @@ -551,7 +551,7 @@ bool evergreen_hpd_sense(struct radeon_device *rdev, e case RADEON_HPD_6: if (RREG32(DC_HPD6_INT_STATUS) & DC_HPDx_SENSE) connected = true; - break; + break; default: break; } From owner-svn-src-all@freebsd.org Sat Apr 25 13:10:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50D972B0D09; Sat, 25 Apr 2020 13:10:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498WcB1Rbjz4331; Sat, 25 Apr 2020 13:10:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C7878080; Sat, 25 Apr 2020 13:10:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PDAHqS076214; Sat, 25 Apr 2020 13:10:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PDAHhC076213; Sat, 25 Apr 2020 13:10:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251310.03PDAHhC076213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 13:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360303 - in stable: 10/sys/dev/drm2/radeon 11/sys/dev/drm2/radeon 12/sys/dev/drm2/radeon X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/dev/drm2/radeon 11/sys/dev/drm2/radeon 12/sys/dev/drm2/radeon X-SVN-Commit-Revision: 360303 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 13:10:18 -0000 Author: dim Date: Sat Apr 25 13:10:17 2020 New Revision: 360303 URL: https://svnweb.freebsd.org/changeset/base/360303 Log: Fix misleading indentation in sys/dev/drm2/radeon/evergreen.c This fixes the following warning from recent versions of clang and gcc: sys/dev/drm2/radeon/evergreen.c:554:4: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] Direct commit to stable/{10,11,12}, since this driver has been removed from FreeBSD 13. Modified: stable/12/sys/dev/drm2/radeon/evergreen.c Changes in other areas also in this revision: Modified: stable/10/sys/dev/drm2/radeon/evergreen.c stable/11/sys/dev/drm2/radeon/evergreen.c Modified: stable/12/sys/dev/drm2/radeon/evergreen.c ============================================================================== --- stable/12/sys/dev/drm2/radeon/evergreen.c Sat Apr 25 13:03:37 2020 (r360302) +++ stable/12/sys/dev/drm2/radeon/evergreen.c Sat Apr 25 13:10:17 2020 (r360303) @@ -551,7 +551,7 @@ bool evergreen_hpd_sense(struct radeon_device *rdev, e case RADEON_HPD_6: if (RREG32(DC_HPD6_INT_STATUS) & DC_HPDx_SENSE) connected = true; - break; + break; default: break; } From owner-svn-src-all@freebsd.org Sat Apr 25 13:10:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 861352B0D0F; Sat, 25 Apr 2020 13:10:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498WcB33bpz4332; Sat, 25 Apr 2020 13:10:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 645A58081; Sat, 25 Apr 2020 13:10:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PDAIx6076220; Sat, 25 Apr 2020 13:10:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PDAIAP076219; Sat, 25 Apr 2020 13:10:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251310.03PDAIAP076219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 13:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360303 - in stable: 10/sys/dev/drm2/radeon 11/sys/dev/drm2/radeon 12/sys/dev/drm2/radeon X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/dev/drm2/radeon 11/sys/dev/drm2/radeon 12/sys/dev/drm2/radeon X-SVN-Commit-Revision: 360303 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 13:10:18 -0000 Author: dim Date: Sat Apr 25 13:10:17 2020 New Revision: 360303 URL: https://svnweb.freebsd.org/changeset/base/360303 Log: Fix misleading indentation in sys/dev/drm2/radeon/evergreen.c This fixes the following warning from recent versions of clang and gcc: sys/dev/drm2/radeon/evergreen.c:554:4: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] Direct commit to stable/{10,11,12}, since this driver has been removed from FreeBSD 13. Modified: stable/11/sys/dev/drm2/radeon/evergreen.c Changes in other areas also in this revision: Modified: stable/10/sys/dev/drm2/radeon/evergreen.c stable/12/sys/dev/drm2/radeon/evergreen.c Modified: stable/11/sys/dev/drm2/radeon/evergreen.c ============================================================================== --- stable/11/sys/dev/drm2/radeon/evergreen.c Sat Apr 25 13:03:37 2020 (r360302) +++ stable/11/sys/dev/drm2/radeon/evergreen.c Sat Apr 25 13:10:17 2020 (r360303) @@ -551,7 +551,7 @@ bool evergreen_hpd_sense(struct radeon_device *rdev, e case RADEON_HPD_6: if (RREG32(DC_HPD6_INT_STATUS) & DC_HPDx_SENSE) connected = true; - break; + break; default: break; } From owner-svn-src-all@freebsd.org Sat Apr 25 13:14:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F05F52B1153; Sat, 25 Apr 2020 13:14:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498Whb6001z43jw; Sat, 25 Apr 2020 13:14:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C77A68277; Sat, 25 Apr 2020 13:14:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PDE7JI082354; Sat, 25 Apr 2020 13:14:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PDE7qZ082353; Sat, 25 Apr 2020 13:14:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251314.03PDE7qZ082353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 13:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r360304 - in stable: 10/sys/dev/ixl 11/sys/dev/ixl 12/sys/dev/ixl X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/dev/ixl 11/sys/dev/ixl 12/sys/dev/ixl X-SVN-Commit-Revision: 360304 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 13:14:08 -0000 Author: dim Date: Sat Apr 25 13:14:06 2020 New Revision: 360304 URL: https://svnweb.freebsd.org/changeset/base/360304 Log: MFC r348445 (by lwhsu): Add the missing braces to fix the code not guarded by the if clause and has misleading indentation. This is found by gcc -Wmisleading-indentation Approved by: erj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20428 Modified: stable/10/sys/dev/ixl/i40e_common.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/ixl/i40e_common.c stable/12/sys/dev/ixl/i40e_common.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/sys/dev/ixl/i40e_common.c ============================================================================== --- stable/10/sys/dev/ixl/i40e_common.c Sat Apr 25 13:10:17 2020 (r360303) +++ stable/10/sys/dev/ixl/i40e_common.c Sat Apr 25 13:14:06 2020 (r360304) @@ -374,13 +374,14 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug **/ bool i40e_check_asq_alive(struct i40e_hw *hw) { - if (hw->aq.asq.len) + if (hw->aq.asq.len) { if (!i40e_is_vf(hw)) return !!(rd32(hw, hw->aq.asq.len) & I40E_PF_ATQLEN_ATQENABLE_MASK); - if (i40e_is_vf(hw)) + else return !!(rd32(hw, hw->aq.asq.len) & I40E_VF_ATQLEN1_ATQENABLE_MASK); + } return FALSE; } From owner-svn-src-all@freebsd.org Sat Apr 25 13:14:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9515D2B1142; Sat, 25 Apr 2020 13:14:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498Whb3S8fz43jv; Sat, 25 Apr 2020 13:14:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71FD38276; Sat, 25 Apr 2020 13:14:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PDE7eg082348; Sat, 25 Apr 2020 13:14:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PDE79I082347; Sat, 25 Apr 2020 13:14:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251314.03PDE79I082347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 13:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360304 - in stable: 10/sys/dev/ixl 11/sys/dev/ixl 12/sys/dev/ixl X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/dev/ixl 11/sys/dev/ixl 12/sys/dev/ixl X-SVN-Commit-Revision: 360304 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 13:14:07 -0000 Author: dim Date: Sat Apr 25 13:14:06 2020 New Revision: 360304 URL: https://svnweb.freebsd.org/changeset/base/360304 Log: MFC r348445 (by lwhsu): Add the missing braces to fix the code not guarded by the if clause and has misleading indentation. This is found by gcc -Wmisleading-indentation Approved by: erj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20428 Modified: stable/11/sys/dev/ixl/i40e_common.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/ixl/i40e_common.c stable/12/sys/dev/ixl/i40e_common.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/sys/dev/ixl/i40e_common.c ============================================================================== --- stable/11/sys/dev/ixl/i40e_common.c Sat Apr 25 13:10:17 2020 (r360303) +++ stable/11/sys/dev/ixl/i40e_common.c Sat Apr 25 13:14:06 2020 (r360304) @@ -392,13 +392,14 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug **/ bool i40e_check_asq_alive(struct i40e_hw *hw) { - if (hw->aq.asq.len) + if (hw->aq.asq.len) { if (!i40e_is_vf(hw)) return !!(rd32(hw, hw->aq.asq.len) & I40E_PF_ATQLEN_ATQENABLE_MASK); - if (i40e_is_vf(hw)) + else return !!(rd32(hw, hw->aq.asq.len) & I40E_VF_ATQLEN1_ATQENABLE_MASK); + } return FALSE; } From owner-svn-src-all@freebsd.org Sat Apr 25 13:14:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A43C2B113A; Sat, 25 Apr 2020 13:14:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498Whb108Sz43js; Sat, 25 Apr 2020 13:14:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D04C8275; Sat, 25 Apr 2020 13:14:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PDE6KM082342; Sat, 25 Apr 2020 13:14:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PDE64X082341; Sat, 25 Apr 2020 13:14:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251314.03PDE64X082341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 13:14:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360304 - in stable: 10/sys/dev/ixl 11/sys/dev/ixl 12/sys/dev/ixl X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/dev/ixl 11/sys/dev/ixl 12/sys/dev/ixl X-SVN-Commit-Revision: 360304 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 13:14:07 -0000 Author: dim Date: Sat Apr 25 13:14:06 2020 New Revision: 360304 URL: https://svnweb.freebsd.org/changeset/base/360304 Log: MFC r348445 (by lwhsu): Add the missing braces to fix the code not guarded by the if clause and has misleading indentation. This is found by gcc -Wmisleading-indentation Approved by: erj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20428 Modified: stable/12/sys/dev/ixl/i40e_common.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/ixl/i40e_common.c stable/11/sys/dev/ixl/i40e_common.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/sys/dev/ixl/i40e_common.c ============================================================================== --- stable/12/sys/dev/ixl/i40e_common.c Sat Apr 25 13:10:17 2020 (r360303) +++ stable/12/sys/dev/ixl/i40e_common.c Sat Apr 25 13:14:06 2020 (r360304) @@ -383,13 +383,14 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug **/ bool i40e_check_asq_alive(struct i40e_hw *hw) { - if (hw->aq.asq.len) + if (hw->aq.asq.len) { if (!i40e_is_vf(hw)) return !!(rd32(hw, hw->aq.asq.len) & I40E_PF_ATQLEN_ATQENABLE_MASK); - if (i40e_is_vf(hw)) + else return !!(rd32(hw, hw->aq.asq.len) & I40E_VF_ATQLEN1_ATQENABLE_MASK); + } return FALSE; } From owner-svn-src-all@freebsd.org Sat Apr 25 13:18:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA6A32B1519; Sat, 25 Apr 2020 13:18:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498Wnf5Prpz448X; Sat, 25 Apr 2020 13:18:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5095827D; Sat, 25 Apr 2020 13:18:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PDIUOQ082708; Sat, 25 Apr 2020 13:18:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PDIUil082706; Sat, 25 Apr 2020 13:18:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251318.03PDIUil082706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 13:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360305 - in stable: 11/sys/dev/mrsas 11/sys/dev/sound/pci 12/sys/dev/mrsas 12/sys/dev/sound/pci X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/dev/mrsas 11/sys/dev/sound/pci 12/sys/dev/mrsas 12/sys/dev/sound/pci X-SVN-Commit-Revision: 360305 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 13:18:30 -0000 Author: dim Date: Sat Apr 25 13:18:29 2020 New Revision: 360305 URL: https://svnweb.freebsd.org/changeset/base/360305 Log: MFC r357146 (partial, by jhb): Fix some misleading indentation warnings reported by recent clang. These should not be any functional change. While the change in emul10kx-pcm.c looks like a real bug fix (as opposed to inconsistent whitespace), the extra statements were not harmful. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23363 Modified: stable/12/sys/dev/mrsas/mrsas_cam.c stable/12/sys/dev/sound/pci/emu10k1.c stable/12/sys/dev/sound/pci/emu10kx-pcm.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/mrsas/mrsas_cam.c stable/11/sys/dev/sound/pci/emu10k1.c stable/11/sys/dev/sound/pci/emu10kx-pcm.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- stable/12/sys/dev/mrsas/mrsas_cam.c Sat Apr 25 13:14:06 2020 (r360304) +++ stable/12/sys/dev/mrsas/mrsas_cam.c Sat Apr 25 13:18:29 2020 (r360305) @@ -1908,13 +1908,14 @@ mrsas_track_scsiio(struct mrsas_softc *sc, target_id_t for (i = 0 ; i < sc->max_fw_cmds; i++) { mpt_cmd = sc->mpt_cmd_list[i]; - /* - * Check if the target_id and bus_id is same as the timeout IO - */ - if (mpt_cmd->ccb_ptr) { - /* bus_id = 1 denotes a VD */ - if (bus_id == 1) - tgt_id = (mpt_cmd->ccb_ptr->ccb_h.target_id - (MRSAS_MAX_PD - 1)); + /* + * Check if the target_id and bus_id is same as the timeout IO + */ + if (mpt_cmd->ccb_ptr) { + /* bus_id = 1 denotes a VD */ + if (bus_id == 1) + tgt_id = + (mpt_cmd->ccb_ptr->ccb_h.target_id - (MRSAS_MAX_PD - 1)); if (mpt_cmd->ccb_ptr->cpi.bus_id == bus_id && mpt_cmd->ccb_ptr->ccb_h.target_id == tgt_id) { Modified: stable/12/sys/dev/sound/pci/emu10k1.c ============================================================================== --- stable/12/sys/dev/sound/pci/emu10k1.c Sat Apr 25 13:14:06 2020 (r360304) +++ stable/12/sys/dev/sound/pci/emu10k1.c Sat Apr 25 13:18:29 2020 (r360305) @@ -1257,11 +1257,12 @@ emu_intr(void *data) #endif } - if (stat & EMU_IPR_MIDIRECVBUFE) - if (sc->mpu_intr) { - (sc->mpu_intr)(sc->mpu); - ack |= EMU_IPR_MIDIRECVBUFE | EMU_IPR_MIDITRANSBUFE; - } + if (stat & EMU_IPR_MIDIRECVBUFE) { + if (sc->mpu_intr) { + (sc->mpu_intr)(sc->mpu); + ack |= EMU_IPR_MIDIRECVBUFE | EMU_IPR_MIDITRANSBUFE; + } + } if (stat & ~ack) device_printf(sc->dev, "dodgy irq: %x (harmless)\n", stat & ~ack); Modified: stable/12/sys/dev/sound/pci/emu10kx-pcm.c ============================================================================== --- stable/12/sys/dev/sound/pci/emu10kx-pcm.c Sat Apr 25 13:14:06 2020 (r360304) +++ stable/12/sys/dev/sound/pci/emu10kx-pcm.c Sat Apr 25 13:18:29 2020 (r360305) @@ -263,11 +263,12 @@ emu_dspmixer_uninit(struct snd_mixer *m) /* drop submixer for AC97 codec */ sc = mix_getdevinfo(m); - if (sc->sm != NULL) + if (sc->sm != NULL) { err = mixer_delete(sc->sm); if (err) return (err); sc->sm = NULL; + } return (0); } From owner-svn-src-all@freebsd.org Sat Apr 25 13:18:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B4112B1523; Sat, 25 Apr 2020 13:18:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498Wng3fg6z448Z; Sat, 25 Apr 2020 13:18:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 779FB827E; Sat, 25 Apr 2020 13:18:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PDIVJH082716; Sat, 25 Apr 2020 13:18:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PDIUFn082713; Sat, 25 Apr 2020 13:18:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251318.03PDIUFn082713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 13:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360305 - in stable: 11/sys/dev/mrsas 11/sys/dev/sound/pci 12/sys/dev/mrsas 12/sys/dev/sound/pci X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/dev/mrsas 11/sys/dev/sound/pci 12/sys/dev/mrsas 12/sys/dev/sound/pci X-SVN-Commit-Revision: 360305 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 13:18:31 -0000 Author: dim Date: Sat Apr 25 13:18:29 2020 New Revision: 360305 URL: https://svnweb.freebsd.org/changeset/base/360305 Log: MFC r357146 (partial, by jhb): Fix some misleading indentation warnings reported by recent clang. These should not be any functional change. While the change in emul10kx-pcm.c looks like a real bug fix (as opposed to inconsistent whitespace), the extra statements were not harmful. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23363 Modified: stable/11/sys/dev/mrsas/mrsas_cam.c stable/11/sys/dev/sound/pci/emu10k1.c stable/11/sys/dev/sound/pci/emu10kx-pcm.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/dev/mrsas/mrsas_cam.c stable/12/sys/dev/sound/pci/emu10k1.c stable/12/sys/dev/sound/pci/emu10kx-pcm.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- stable/11/sys/dev/mrsas/mrsas_cam.c Sat Apr 25 13:14:06 2020 (r360304) +++ stable/11/sys/dev/mrsas/mrsas_cam.c Sat Apr 25 13:18:29 2020 (r360305) @@ -1909,13 +1909,14 @@ mrsas_track_scsiio(struct mrsas_softc *sc, target_id_t for (i = 0 ; i < sc->max_fw_cmds; i++) { mpt_cmd = sc->mpt_cmd_list[i]; - /* - * Check if the target_id and bus_id is same as the timeout IO - */ - if (mpt_cmd->ccb_ptr) { - /* bus_id = 1 denotes a VD */ - if (bus_id == 1) - tgt_id = (mpt_cmd->ccb_ptr->ccb_h.target_id - (MRSAS_MAX_PD - 1)); + /* + * Check if the target_id and bus_id is same as the timeout IO + */ + if (mpt_cmd->ccb_ptr) { + /* bus_id = 1 denotes a VD */ + if (bus_id == 1) + tgt_id = + (mpt_cmd->ccb_ptr->ccb_h.target_id - (MRSAS_MAX_PD - 1)); if (mpt_cmd->ccb_ptr->cpi.bus_id == bus_id && mpt_cmd->ccb_ptr->ccb_h.target_id == tgt_id) { Modified: stable/11/sys/dev/sound/pci/emu10k1.c ============================================================================== --- stable/11/sys/dev/sound/pci/emu10k1.c Sat Apr 25 13:14:06 2020 (r360304) +++ stable/11/sys/dev/sound/pci/emu10k1.c Sat Apr 25 13:18:29 2020 (r360305) @@ -1255,11 +1255,12 @@ emu_intr(void *data) #endif } - if (stat & EMU_IPR_MIDIRECVBUFE) - if (sc->mpu_intr) { - (sc->mpu_intr)(sc->mpu); - ack |= EMU_IPR_MIDIRECVBUFE | EMU_IPR_MIDITRANSBUFE; - } + if (stat & EMU_IPR_MIDIRECVBUFE) { + if (sc->mpu_intr) { + (sc->mpu_intr)(sc->mpu); + ack |= EMU_IPR_MIDIRECVBUFE | EMU_IPR_MIDITRANSBUFE; + } + } if (stat & ~ack) device_printf(sc->dev, "dodgy irq: %x (harmless)\n", stat & ~ack); Modified: stable/11/sys/dev/sound/pci/emu10kx-pcm.c ============================================================================== --- stable/11/sys/dev/sound/pci/emu10kx-pcm.c Sat Apr 25 13:14:06 2020 (r360304) +++ stable/11/sys/dev/sound/pci/emu10kx-pcm.c Sat Apr 25 13:18:29 2020 (r360305) @@ -261,11 +261,12 @@ emu_dspmixer_uninit(struct snd_mixer *m) /* drop submixer for AC97 codec */ sc = mix_getdevinfo(m); - if (sc->sm != NULL) + if (sc->sm != NULL) { err = mixer_delete(sc->sm); if (err) return (err); sc->sm = NULL; + } return (0); } From owner-svn-src-all@freebsd.org Sat Apr 25 14:24:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E13052B33F2; Sat, 25 Apr 2020 14:24:55 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498YGH5cNNz47kx; Sat, 25 Apr 2020 14:24:55 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B76A98FFE; Sat, 25 Apr 2020 14:24:55 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PEOt9k025627; Sat, 25 Apr 2020 14:24:55 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PEOtlF025624; Sat, 25 Apr 2020 14:24:55 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202004251424.03PEOtlF025624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 25 Apr 2020 14:24:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360306 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 360306 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 14:24:55 -0000 Author: cem Date: Sat Apr 25 14:24:54 2020 New Revision: 360306 URL: https://svnweb.freebsd.org/changeset/base/360306 Log: libc: partially revert r326576 In r326576 ("use @@@ instead of @@ in __sym_default"), an earlier version of the phabricator-discussed patch was inadvertently committed. The commit message claims that @@@ means that weak is not needed, but that was due to a misunderstanding of the use of weak symbols in this context by the submitted in the first draft of the patch; the description text was not updated to match the discussion. As discussed in phabricator, weak is needed for symbol interposing because of the behavior of our rtld, and is widely used elsewhere in libc. This partial revert restores the approved version of the patch and permits symbol interposing for openat. Reported by: Raymond Ramsden Reviewed by: dim, emaste, kib (2017) Discussed with: kib (2020) Differential Revision: https://reviews.freebsd.org/D11653 Modified: head/lib/libc/sys/openat.c head/lib/libc/sys/setcontext.c head/lib/libc/sys/swapcontext.c Modified: head/lib/libc/sys/openat.c ============================================================================== --- head/lib/libc/sys/openat.c Sat Apr 25 13:18:29 2020 (r360305) +++ head/lib/libc/sys/openat.c Sat Apr 25 14:24:54 2020 (r360306) @@ -43,6 +43,7 @@ __sym_compat(openat, __impl_openat, FBSD_1.1); __weak_reference(openat, __impl_openat); __sym_default(openat, openat, FBSD_1.2); +#pragma weak openat int openat(int fd, const char *path, int flags, ...) { Modified: head/lib/libc/sys/setcontext.c ============================================================================== --- head/lib/libc/sys/setcontext.c Sat Apr 25 13:18:29 2020 (r360305) +++ head/lib/libc/sys/setcontext.c Sat Apr 25 14:24:54 2020 (r360306) @@ -42,6 +42,7 @@ __sym_compat(setcontext, __impl_setcontext, FBSD_1.0); __weak_reference(setcontext, __impl_setcontext); __sym_default(setcontext, setcontext, FBSD_1.2); +#pragma weak setcontext int setcontext(const ucontext_t *uc) { Modified: head/lib/libc/sys/swapcontext.c ============================================================================== --- head/lib/libc/sys/swapcontext.c Sat Apr 25 13:18:29 2020 (r360305) +++ head/lib/libc/sys/swapcontext.c Sat Apr 25 14:24:54 2020 (r360306) @@ -43,6 +43,7 @@ __sym_compat(swapcontext, __impl_swapcontext, FBSD_1.0 __weak_reference(swapcontext, __impl_swapcontext); __sym_default(swapcontext, swapcontext, FBSD_1.2); +#pragma weak swapcontext int swapcontext(ucontext_t *oucp, const ucontext_t *ucp) { From owner-svn-src-all@freebsd.org Sat Apr 25 15:16:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A85FE2B4F52; Sat, 25 Apr 2020 15:16:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498ZPv3w4Hz4BWZ; Sat, 25 Apr 2020 15:16:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 818CB9993; Sat, 25 Apr 2020 15:16:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFGZDA056306; Sat, 25 Apr 2020 15:16:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFGZXb056305; Sat, 25 Apr 2020 15:16:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004251516.03PFGZXb056305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 25 Apr 2020 15:16:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360307 - stable/12/contrib/blacklist/bin X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/contrib/blacklist/bin X-SVN-Commit-Revision: 360307 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:16:35 -0000 Author: emaste Date: Sat Apr 25 15:16:35 2020 New Revision: 360307 URL: https://svnweb.freebsd.org/changeset/base/360307 Log: MFC r360144: blacklistd.8: fix db file path PR: 245781 Submitted by: Jose Luis Duran Modified: stable/12/contrib/blacklist/bin/blacklistd.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/blacklist/bin/blacklistd.8 ============================================================================== --- stable/12/contrib/blacklist/bin/blacklistd.8 Sat Apr 25 14:24:54 2020 (r360306) +++ stable/12/contrib/blacklist/bin/blacklistd.8 Sat Apr 25 15:16:35 2020 (r360307) @@ -153,7 +153,7 @@ The name of the configuration file to read, usually The Berkeley DB file where .Nm stores its state, usually -.Pa /var/run/blacklistd.db . +.Pa /var/db/blacklistd.db . .It Fl d Normally, .Nm From owner-svn-src-all@freebsd.org Sat Apr 25 15:17:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 120792B5088; Sat, 25 Apr 2020 15:17:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498ZRC6pmHz4Bgw; Sat, 25 Apr 2020 15:17:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E4F5A999A; Sat, 25 Apr 2020 15:17:43 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFHhTS056423; Sat, 25 Apr 2020 15:17:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFHh62056422; Sat, 25 Apr 2020 15:17:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004251517.03PFHh62056422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 25 Apr 2020 15:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360308 - stable/12/sys/dev/vt/hw/fb X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/dev/vt/hw/fb X-SVN-Commit-Revision: 360308 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:17:44 -0000 Author: emaste Date: Sat Apr 25 15:17:43 2020 New Revision: 360308 URL: https://svnweb.freebsd.org/changeset/base/360308 Log: MFC r359626: vt: avoid overrun when stride is not a multiple of bytes per pixel PR: 243533 Submitted by: Thomas Skibo Modified: stable/12/sys/dev/vt/hw/fb/vt_fb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/12/sys/dev/vt/hw/fb/vt_fb.c Sat Apr 25 15:16:35 2020 (r360307) +++ stable/12/sys/dev/vt/hw/fb/vt_fb.c Sat Apr 25 15:17:43 2020 (r360308) @@ -234,12 +234,12 @@ vt_fb_blank(struct vt_device *vd, term_color_t color) break; case 2: for (h = 0; h < info->fb_height; h++) - for (o = 0; o < info->fb_stride; o += 2) + for (o = 0; o < info->fb_stride - 1; o += 2) vt_fb_mem_wr2(info, h*info->fb_stride + o, c); break; case 3: for (h = 0; h < info->fb_height; h++) - for (o = 0; o < info->fb_stride; o += 3) { + for (o = 0; o < info->fb_stride - 2; o += 3) { vt_fb_mem_wr1(info, h*info->fb_stride + o, (c >> 16) & 0xff); vt_fb_mem_wr1(info, h*info->fb_stride + o + 1, @@ -250,7 +250,7 @@ vt_fb_blank(struct vt_device *vd, term_color_t color) break; case 4: for (h = 0; h < info->fb_height; h++) - for (o = 0; o < info->fb_stride; o += 4) + for (o = 0; o < info->fb_stride - 3; o += 4) vt_fb_mem_wr4(info, h*info->fb_stride + o, c); break; default: From owner-svn-src-all@freebsd.org Sat Apr 25 15:27:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D88652B54A8; Sat, 25 Apr 2020 15:27:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498Zfn5NZhz4CBJ; Sat, 25 Apr 2020 15:27:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF9149B8A; Sat, 25 Apr 2020 15:27:45 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFRjVm062553; Sat, 25 Apr 2020 15:27:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFRjBZ062552; Sat, 25 Apr 2020 15:27:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004251527.03PFRjBZ062552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 25 Apr 2020 15:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360309 - stable/11/sys/dev/vt/hw/fb X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/vt/hw/fb X-SVN-Commit-Revision: 360309 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:27:45 -0000 Author: emaste Date: Sat Apr 25 15:27:45 2020 New Revision: 360309 URL: https://svnweb.freebsd.org/changeset/base/360309 Log: MFC r359626: vt: avoid overrun when stride is not a multiple of bytes per pixel The reporter is developing a frame buffer driver for hardware using 3 bytes per pixel, but a stride that's a multiple of 256. Previously this resulted in writing beyond the end of each stride. On the last row this attempted to write past the end of the frame buffer, triggering the assertion in vt_fb_mem_wr1(). PR: 243533 Submitted by: Thomas Skibo Modified: stable/11/sys/dev/vt/hw/fb/vt_fb.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/11/sys/dev/vt/hw/fb/vt_fb.c Sat Apr 25 15:17:43 2020 (r360308) +++ stable/11/sys/dev/vt/hw/fb/vt_fb.c Sat Apr 25 15:27:45 2020 (r360309) @@ -228,12 +228,12 @@ vt_fb_blank(struct vt_device *vd, term_color_t color) break; case 2: for (h = 0; h < info->fb_height; h++) - for (o = 0; o < info->fb_stride; o += 2) + for (o = 0; o < info->fb_stride - 1; o += 2) vt_fb_mem_wr2(info, h*info->fb_stride + o, c); break; case 3: for (h = 0; h < info->fb_height; h++) - for (o = 0; o < info->fb_stride; o += 3) { + for (o = 0; o < info->fb_stride - 2; o += 3) { vt_fb_mem_wr1(info, h*info->fb_stride + o, (c >> 16) & 0xff); vt_fb_mem_wr1(info, h*info->fb_stride + o + 1, @@ -244,7 +244,7 @@ vt_fb_blank(struct vt_device *vd, term_color_t color) break; case 4: for (h = 0; h < info->fb_height; h++) - for (o = 0; o < info->fb_stride; o += 4) + for (o = 0; o < info->fb_stride - 3; o += 4) vt_fb_mem_wr4(info, h*info->fb_stride + o, c); break; default: From owner-svn-src-all@freebsd.org Sat Apr 25 15:29:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3611D2B5545; Sat, 25 Apr 2020 15:29:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498ZhM0gNjz4CKW; Sat, 25 Apr 2020 15:29:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 121159B8F; Sat, 25 Apr 2020 15:29:07 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFT6Aw062680; Sat, 25 Apr 2020 15:29:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFT61Q062679; Sat, 25 Apr 2020 15:29:06 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004251529.03PFT61Q062679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 25 Apr 2020 15:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360310 - stable/12/sys/dev/sound/pci/hda X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 360310 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:29:07 -0000 Author: emaste Date: Sat Apr 25 15:29:06 2020 New Revision: 360310 URL: https://svnweb.freebsd.org/changeset/base/360310 Log: MFC r359777: hdac: show which command timed out There are several reports of "hdac0: Command timeout on address 2" messages emitted during playback on a variety of contemporary machines. Show the command that timed out in case it might provide a clue in finding the cause. PR: 229190 Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdac.c Sat Apr 25 15:27:45 2020 (r360309) +++ stable/12/sys/dev/sound/pci/hda/hdac.c Sat Apr 25 15:29:06 2020 (r360310) @@ -996,7 +996,8 @@ hdac_send_command(struct hdac_softc *sc, nid_t cad, ui } while (sc->codecs[cad].pending != 0 && --timeout); if (sc->codecs[cad].pending != 0) { - device_printf(sc->dev, "Command timeout on address %d\n", cad); + device_printf(sc->dev, "Command 0x%08x timeout on address %d\n", + verb, cad); sc->codecs[cad].pending = 0; } From owner-svn-src-all@freebsd.org Sat Apr 25 15:34:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01D452B58C7; Sat, 25 Apr 2020 15:34:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498Zpw6Fmhz4Cqw; Sat, 25 Apr 2020 15:34:48 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1B699D8C; Sat, 25 Apr 2020 15:34:48 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFYmZO069061; Sat, 25 Apr 2020 15:34:48 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFYmU2069060; Sat, 25 Apr 2020 15:34:48 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202004251534.03PFYmU2069060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 25 Apr 2020 15:34:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360311 - head/sys/arm64/rockchip X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm64/rockchip X-SVN-Commit-Revision: 360311 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:34:49 -0000 Author: manu Date: Sat Apr 25 15:34:48 2020 New Revision: 360311 URL: https://svnweb.freebsd.org/changeset/base/360311 Log: arm64: rockchip: rk805: Use a tailq for the attached regulator Store the attached regulator in a tailq to later find them in ofw_map. While here, do not attempt to attach a regulator without a name, a node might exists but if it doesn't have a name the regulator is unused. MFC after: 1 month Modified: head/sys/arm64/rockchip/rk805.c Modified: head/sys/arm64/rockchip/rk805.c ============================================================================== --- head/sys/arm64/rockchip/rk805.c Sat Apr 25 15:29:06 2020 (r360310) +++ head/sys/arm64/rockchip/rk805.c Sat Apr 25 15:34:48 2020 (r360311) @@ -85,6 +85,11 @@ struct rk805_reg_sc { struct regnode_std_param *param; }; +struct reg_list { + TAILQ_ENTRY(reg_list) next; + struct rk805_reg_sc *reg; +}; + struct rk805_softc { device_t dev; struct mtx mtx; @@ -93,7 +98,7 @@ struct rk805_softc { struct intr_config_hook intr_hook; enum rk_pmic_type type; - struct rk805_reg_sc **regs; + TAILQ_HEAD(, reg_list) regs; int nregs; }; @@ -619,6 +624,7 @@ rk805_attach(device_t dev) struct rk805_softc *sc; struct rk805_reg_sc *reg; struct rk805_regdef *regdefs; + struct reg_list *regp; phandle_t rnode, child; int i; @@ -645,8 +651,7 @@ rk805_attach(device_t dev) return (ENXIO); } - sc->regs = malloc(sizeof(struct rk805_reg_sc *) * sc->nregs, - M_RK805_REG, M_WAITOK | M_ZERO); + TAILQ_INIT(&sc->regs); rnode = ofw_bus_find_child(ofw_bus_get_node(dev), "regulators"); if (rnode > 0) { @@ -655,6 +660,8 @@ rk805_attach(device_t dev) regdefs[i].name); if (child == 0) continue; + if (OF_hasprop(child, "regulator-name") != 1) + continue; reg = rk805_reg_attach(dev, child, ®defs[i]); if (reg == NULL) { device_printf(dev, @@ -662,7 +669,9 @@ rk805_attach(device_t dev) regdefs[i].name); continue; } - sc->regs[i] = reg; + regp = malloc(sizeof(*regp), M_DEVBUF, M_WAITOK | M_ZERO); + regp->reg = reg; + TAILQ_INSERT_TAIL(&sc->regs, regp, next); if (bootverbose) device_printf(dev, "Regulator %s attached\n", regdefs[i].name); @@ -685,13 +694,13 @@ rk805_map(device_t dev, phandle_t xref, int ncells, pcell_t *cells, intptr_t *id) { struct rk805_softc *sc; - int i; + struct reg_list *regp; sc = device_get_softc(dev); - for (i = 0; i < sc->nregs; i++) { - if (sc->regs[i]->xref == xref) { - *id = sc->regs[i]->def->id; + TAILQ_FOREACH(regp, &sc->regs, next) { + if (regp->reg->xref == xref) { + *id = regp->reg->def->id; return (0); } } From owner-svn-src-all@freebsd.org Sat Apr 25 15:36:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2A262B59BC; Sat, 25 Apr 2020 15:36:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498ZsG3qB5z4Cym; Sat, 25 Apr 2020 15:36:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E4EC9D8F; Sat, 25 Apr 2020 15:36:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFao3W069227; Sat, 25 Apr 2020 15:36:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFaofd069226; Sat, 25 Apr 2020 15:36:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251536.03PFaofd069226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 15:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360312 - in stable: 11/sys/netpfil/pf 12/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/netpfil/pf 12/sys/netpfil/pf X-SVN-Commit-Revision: 360312 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:36:50 -0000 Author: dim Date: Sat Apr 25 15:36:50 2020 New Revision: 360312 URL: https://svnweb.freebsd.org/changeset/base/360312 Log: MFC r348284 (by lwhsu): Remove an uneeded indentation introduced in r223637 to silence gcc warnging Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/netpfil/pf/pf.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/netpfil/pf/pf.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/netpfil/pf/pf.c ============================================================================== --- stable/12/sys/netpfil/pf/pf.c Sat Apr 25 15:34:48 2020 (r360311) +++ stable/12/sys/netpfil/pf/pf.c Sat Apr 25 15:36:50 2020 (r360312) @@ -5267,7 +5267,7 @@ pf_test_state_other(struct pf_state **state, int direc nk->addr[pd->didx].v4.s_addr, 0); - break; + break; #endif /* INET */ #ifdef INET6 case AF_INET6: From owner-svn-src-all@freebsd.org Sat Apr 25 15:36:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE4842B59C8; Sat, 25 Apr 2020 15:36:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498ZsG65BQz4Cyn; Sat, 25 Apr 2020 15:36:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC47E9D90; Sat, 25 Apr 2020 15:36:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFaomK069233; Sat, 25 Apr 2020 15:36:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFaoso069232; Sat, 25 Apr 2020 15:36:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251536.03PFaoso069232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 15:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360312 - in stable: 11/sys/netpfil/pf 12/sys/netpfil/pf X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/netpfil/pf 12/sys/netpfil/pf X-SVN-Commit-Revision: 360312 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:36:51 -0000 Author: dim Date: Sat Apr 25 15:36:50 2020 New Revision: 360312 URL: https://svnweb.freebsd.org/changeset/base/360312 Log: MFC r348284 (by lwhsu): Remove an uneeded indentation introduced in r223637 to silence gcc warnging Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/netpfil/pf/pf.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/netpfil/pf/pf.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/netpfil/pf/pf.c ============================================================================== --- stable/11/sys/netpfil/pf/pf.c Sat Apr 25 15:34:48 2020 (r360311) +++ stable/11/sys/netpfil/pf/pf.c Sat Apr 25 15:36:50 2020 (r360312) @@ -5247,7 +5247,7 @@ pf_test_state_other(struct pf_state **state, int direc nk->addr[pd->didx].v4.s_addr, 0); - break; + break; #endif /* INET */ #ifdef INET6 case AF_INET6: From owner-svn-src-all@freebsd.org Sat Apr 25 15:38:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4DD02B5B3D; Sat, 25 Apr 2020 15:38:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498ZvY49n5z4DDP; Sat, 25 Apr 2020 15:38:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 89E209D94; Sat, 25 Apr 2020 15:38:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFcncD069400; Sat, 25 Apr 2020 15:38:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFcmMu069397; Sat, 25 Apr 2020 15:38:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004251538.03PFcmMu069397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 25 Apr 2020 15:38:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360313 - in stable/12/crypto/openssh: . contrib/redhat contrib/suse openbsd-compat regress regress/misc/fuzz-harness regress/unittests/sshkey regress/unittests/sshkey/testdata regress/... X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/12/crypto/openssh: . contrib/redhat contrib/suse openbsd-compat regress regress/misc/fuzz-harness regress/unittests/sshkey regress/unittests/sshkey/testdata regress/unittests/test_helper X-SVN-Commit-Revision: 360313 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:38:49 -0000 Author: emaste Date: Sat Apr 25 15:38:48 2020 New Revision: 360313 URL: https://svnweb.freebsd.org/changeset/base/360313 Log: MFC r357926: Upgrade to OpenSSH 7.9p1. Sponsored by: The FreeBSD Foundation Added: stable/12/crypto/openssh/regress/misc/fuzz-harness/authopt_fuzz.cc - copied unchanged from r357926, head/crypto/openssh/regress/misc/fuzz-harness/authopt_fuzz.cc stable/12/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha1 - copied unchanged from r357926, head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha1 stable/12/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha1-cert.pub - copied unchanged from r357926, head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha1-cert.pub stable/12/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha1.pub - copied unchanged from r357926, head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha1.pub stable/12/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha512 - copied unchanged from r357926, head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha512 stable/12/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha512-cert.pub - copied unchanged from r357926, head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha512-cert.pub stable/12/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha512.pub - copied unchanged from r357926, head/crypto/openssh/regress/unittests/sshkey/testdata/rsa_1_sha512.pub Modified: stable/12/crypto/openssh/.depend stable/12/crypto/openssh/.skipped-commit-ids stable/12/crypto/openssh/ChangeLog stable/12/crypto/openssh/Makefile.in stable/12/crypto/openssh/PROTOCOL stable/12/crypto/openssh/PROTOCOL.krl stable/12/crypto/openssh/PROTOCOL.mux stable/12/crypto/openssh/README stable/12/crypto/openssh/auth-options.c stable/12/crypto/openssh/auth-passwd.c stable/12/crypto/openssh/auth.c stable/12/crypto/openssh/auth2-hostbased.c stable/12/crypto/openssh/auth2-pubkey.c stable/12/crypto/openssh/authfile.c stable/12/crypto/openssh/channels.c stable/12/crypto/openssh/channels.h stable/12/crypto/openssh/clientloop.c stable/12/crypto/openssh/configure.ac stable/12/crypto/openssh/contrib/redhat/openssh.spec stable/12/crypto/openssh/contrib/suse/openssh.spec stable/12/crypto/openssh/dh.c stable/12/crypto/openssh/groupaccess.c stable/12/crypto/openssh/kexgexs.c stable/12/crypto/openssh/krl.c stable/12/crypto/openssh/krl.h stable/12/crypto/openssh/misc.c stable/12/crypto/openssh/misc.h stable/12/crypto/openssh/moduli stable/12/crypto/openssh/mux.c stable/12/crypto/openssh/myproposal.h stable/12/crypto/openssh/nchan.c stable/12/crypto/openssh/openbsd-compat/bsd-asprintf.c stable/12/crypto/openssh/openbsd-compat/bsd-misc.c stable/12/crypto/openssh/openbsd-compat/openssl-compat.c stable/12/crypto/openssh/openbsd-compat/port-linux.c stable/12/crypto/openssh/openbsd-compat/port-uw.c stable/12/crypto/openssh/openbsd-compat/setproctitle.c stable/12/crypto/openssh/openbsd-compat/xcrypt.c stable/12/crypto/openssh/readconf.c stable/12/crypto/openssh/readconf.h stable/12/crypto/openssh/regress/README.regress stable/12/crypto/openssh/regress/krl.sh stable/12/crypto/openssh/regress/misc/fuzz-harness/Makefile stable/12/crypto/openssh/regress/unittests/sshkey/common.c stable/12/crypto/openssh/regress/unittests/sshkey/mktestdata.sh stable/12/crypto/openssh/regress/unittests/sshkey/test_file.c stable/12/crypto/openssh/regress/unittests/sshkey/test_sshkey.c stable/12/crypto/openssh/regress/unittests/test_helper/fuzz.c stable/12/crypto/openssh/regress/unittests/test_helper/test_helper.c stable/12/crypto/openssh/sandbox-seccomp-filter.c stable/12/crypto/openssh/scp.1 stable/12/crypto/openssh/servconf.c stable/12/crypto/openssh/servconf.h stable/12/crypto/openssh/session.c stable/12/crypto/openssh/session.h stable/12/crypto/openssh/sftp-common.c stable/12/crypto/openssh/sftp.1 stable/12/crypto/openssh/sftp.c stable/12/crypto/openssh/ssh-add.c stable/12/crypto/openssh/ssh-keygen.1 stable/12/crypto/openssh/ssh-keygen.c stable/12/crypto/openssh/ssh.1 stable/12/crypto/openssh/ssh.c stable/12/crypto/openssh/ssh_config stable/12/crypto/openssh/ssh_config.5 stable/12/crypto/openssh/ssh_namespace.h stable/12/crypto/openssh/sshconnect.c stable/12/crypto/openssh/sshconnect2.c stable/12/crypto/openssh/sshd.c stable/12/crypto/openssh/sshd_config stable/12/crypto/openssh/sshd_config.5 stable/12/crypto/openssh/sshkey.c stable/12/crypto/openssh/sshkey.h stable/12/crypto/openssh/version.h Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/openssh/.depend ============================================================================== --- stable/12/crypto/openssh/.depend Sat Apr 25 15:36:50 2020 (r360312) +++ stable/12/crypto/openssh/.depend Sat Apr 25 15:38:48 2020 (r360313) @@ -83,8 +83,8 @@ match.o: includes.h config.h defines.h platform.h open md5crypt.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h misc.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h xmalloc.h misc.h log.h ssh.h sshbuf.h ssherr.h moduli.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -monitor.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h openbsd-compat/sys-queue.h atomicio.h xmalloc.h ssh.h sshkey.h sshbuf.h hostfile.h auth.h auth-pam.h audit.h loginrec.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h -monitor.o: rijndael.h kex.h mac.h dh.h packet.h dispatch.h opacket.h auth-options.h sshpty.h channels.h session.h sshlogin.h canohost.h log.h misc.h servconf.h monitor.h monitor_wrap.h monitor_fdpass.h compat.h ssh2.h authfd.h match.h ssherr.h +monitor.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h ./openbsd-compat/sys-tree.h openbsd-compat/sys-queue.h openbsd-compat/openssl-compat.h atomicio.h xmalloc.h ssh.h sshkey.h sshbuf.h hostfile.h auth.h auth-pam.h audit.h loginrec.h cipher.h cipher-chachapoly.h +monitor.o: chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h dh.h packet.h dispatch.h opacket.h auth-options.h sshpty.h channels.h session.h sshlogin.h canohost.h log.h misc.h servconf.h monitor.h monitor_wrap.h monitor_fdpass.h compat.h ssh2.h authfd.h match.h ssherr.h monitor_fdpass.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h log.h monitor_fdpass.h monitor_wrap.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h openbsd-compat/sys-queue.h xmalloc.h ssh.h sshbuf.h sshkey.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h kex.h mac.h hostfile.h auth.h auth-pam.h audit.h loginrec.h monitor_wrap.o: auth-options.h packet.h dispatch.h opacket.h log.h monitor.h monitor_wrap.h atomicio.h monitor_fdpass.h misc.h channels.h session.h servconf.h ssherr.h @@ -156,7 +156,7 @@ sshd.o: includes.h config.h defines.h platform.h openb sshd.o: poly1305.h cipher-aesctr.h rijndael.h digest.h sshkey.h kex.h mac.h myproposal.h authfile.h pathnames.h atomicio.h canohost.h hostfile.h auth.h auth-pam.h audit.h loginrec.h authfd.h msg.h channels.h session.h monitor.h monitor_wrap.h ssh-sandbox.h auth-options.h version.h ssherr.h ssherr.o: ssherr.h sshkey-xmss.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h -sshkey.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h ssh2.h ssherr.h misc.h sshbuf.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h digest.h sshkey.h sshkey-xmss.h match.h xmss_fast.h +sshkey.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h crypto_api.h ssh2.h ssherr.h misc.h sshbuf.h cipher.h cipher-chachapoly.h chacha.h poly1305.h cipher-aesctr.h rijndael.h digest.h sshkey.h sshkey-xmss.h match.h xmss_fast.h openbsd-compat/openssl-compat.h sshlogin.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshlogin.h ssherr.h loginrec.h log.h sshbuf.h misc.h servconf.h sshpty.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshpty.h log.h misc.h sshtty.o: includes.h config.h defines.h platform.h openbsd-compat/openbsd-compat.h openbsd-compat/base64.h openbsd-compat/sigact.h openbsd-compat/readpassphrase.h openbsd-compat/vis.h openbsd-compat/getrrsetbyname.h openbsd-compat/sha1.h openbsd-compat/sha2.h openbsd-compat/rmd160.h openbsd-compat/md5.h openbsd-compat/blf.h openbsd-compat/getopt.h openbsd-compat/bsd-misc.h openbsd-compat/bsd-setres_id.h openbsd-compat/bsd-signal.h openbsd-compat/bsd-statvfs.h openbsd-compat/bsd-waitpid.h openbsd-compat/bsd-poll.h openbsd-compat/fake-rfc2553.h openbsd-compat/bsd-cygwin_util.h openbsd-compat/port-aix.h openbsd-compat/port-irix.h openbsd-compat/port-linux.h openbsd-compat/port-solaris.h openbsd-compat/port-net.h openbsd-compat/port-uw.h openbsd-compat/bsd-nextstep.h entropy.h sshpty.h Modified: stable/12/crypto/openssh/.skipped-commit-ids ============================================================================== --- stable/12/crypto/openssh/.skipped-commit-ids Sat Apr 25 15:36:50 2020 (r360312) +++ stable/12/crypto/openssh/.skipped-commit-ids Sat Apr 25 15:38:48 2020 (r360313) @@ -4,6 +4,7 @@ f2c9feb26963615c4fece921906cf72e248b61ee more Makefile fa728823ba21c4b45212750e1d3a4b2086fd1a62 more Makefile refactoring 1de0e85522051eb2ffa00437e1885e9d7b3e0c2e moduli update 814b2f670df75759e1581ecef530980b2b3d7e0f remove redundant make defs +04431e8e7872f49a2129bf080a6b73c19d576d40 moduli update Old upstream tree: Modified: stable/12/crypto/openssh/ChangeLog ============================================================================== --- stable/12/crypto/openssh/ChangeLog Sat Apr 25 15:36:50 2020 (r360312) +++ stable/12/crypto/openssh/ChangeLog Sat Apr 25 15:38:48 2020 (r360313) @@ -1,3 +1,827 @@ +commit aede1c34243a6f7feae2fb2cb686ade5f9be6f3d +Author: Damien Miller +Date: Wed Oct 17 11:01:20 2018 +1100 + + Require OpenSSL 1.1.x series 1.1.0g or greater + + Previous versions have a bug with EVP_CipherInit() when passed a + NULL EVP_CIPHER, per https://github.com/openssl/openssl/pull/4613 + + ok dtucker@ + +commit 08300c211409c212e010fe2e2f2883e573a04ce2 +Author: Damien Miller +Date: Wed Oct 17 08:12:02 2018 +1100 + + unbreak compilation with --with-ssl-engine + + Missing last argument to OPENSSL_init_crypto() + +commit 1673274aee67ce0eb6f00578b6f3d2bcbd58f937 +Author: Darren Tucker +Date: Tue Oct 16 14:45:57 2018 +1100 + + Remove gcc spectre mitigation flags. + + Current impementions of the gcc spectre mitigation flags cause + miscompilations when combined with other flags and do not provide much + protection. Found by fweimer at redhat.com, ok djm@ + +commit 4e23deefd7959ef83c73ed9cce574423438f6133 +Author: Damien Miller +Date: Tue Oct 16 10:51:52 2018 +1100 + + Avoid deprecated OPENSSL_config when using 1.1.x + + OpenSSL 1.1.x soft-deprecated OPENSSL_config in favour of + OPENSSL_init_crypto; pointed out by Jakub Jelen + +commit 797cdd9c8468ed1125ce60d590ae3f1397866af4 +Author: Darren Tucker +Date: Fri Oct 12 16:58:47 2018 +1100 + + Don't avoid our *sprintf replacements. + + Don't let systems with broken printf(3) avoid our replacements + via asprintf(3)/vasprintf(3) calling libc internally. From djm@ + +commit e526127cbd2f8ad88fb41229df0c9b850c722830 +Author: Darren Tucker +Date: Fri Oct 12 16:43:35 2018 +1100 + + Check if snprintf understands %zu. + + If the platforms snprintf and friends don't understand %zu, use the + compat replacement. Prevents segfaults on those platforms. + +commit cf39f875191708c5f2f1a3c1c9019f106e74aea3 +Author: Damien Miller +Date: Fri Oct 12 09:48:05 2018 +1100 + + remove stale link, tweak + +commit a7205e68decf7de2005810853b4ce6b222b65e2a +Author: Damien Miller +Date: Fri Oct 12 09:47:20 2018 +1100 + + update version numbers ahead of release + +commit 1a4a9cf80f5b92b9d1dadd0bfa8867c04d195391 +Author: djm@openbsd.org +Date: Thu Oct 11 03:48:04 2018 +0000 + + upstream: don't send new-style rsa-sha2-*-cert-v01@openssh.com names to + + older OpenSSH that can't handle them. spotted by Adam Eijdenberg; ok dtucker + + OpenBSD-Commit-ID: 662bbc402e3d7c9b6c322806269698106a6ae631 + +commit dc8ddcdf1a95e011c263486c25869bb5bf4e30ec +Author: Damien Miller +Date: Thu Oct 11 13:08:59 2018 +1100 + + update depends + +commit 26841ac265603fd2253e6832e03602823dbb4022 +Author: Damien Miller +Date: Thu Oct 11 13:02:11 2018 +1100 + + some more duplicated key algorithm lines + + From Adam Eijdenberg + +commit 5d9d17603bfbb620195a4581025052832b4c4adc +Author: Damien Miller +Date: Thu Oct 11 11:56:36 2018 +1100 + + fix duplicated algorithm specification lines + + Spotted by Adam Eijdenberg + +commit ebfafd9c7a5b2a7fb515ee95dbe0e44e11d0a663 +Author: djm@openbsd.org +Date: Thu Oct 11 00:52:46 2018 +0000 + + upstream: typo in plain RSA algorithm counterpart names for + + certificates; spotted by Adam Eijdenberg; ok dtucker@ + + OpenBSD-Commit-ID: bfcdeb6f4fc9e7607f5096574c8f118f2e709e00 + +commit c29b111e7d87c2324ff71c80653dd8da168c13b9 +Author: Damien Miller +Date: Thu Oct 11 11:29:35 2018 +1100 + + check pw_passwd != NULL here too + + Again, for systems with broken NIS implementations. + + Prompted by coolbugcheckers AT gmail.com + +commit fe8e8f349a553ef4c567acd418aac769a82b7729 +Author: Damien Miller +Date: Thu Oct 11 11:03:15 2018 +1100 + + check for NULL return from shadow_pw() + + probably unreachable on this platform; pointed out by + coolbugcheckers AT gmail.com + +commit acc59cbe7a1fb169e1c3caba65a39bd74d6e030d +Author: deraadt@openbsd.org +Date: Wed Oct 10 16:43:49 2018 +0000 + + upstream: introducing openssh 7.9 + + OpenBSD-Commit-ID: 42d526a9fe01a40dd299ac58014d3349adf40e25 + +commit 12731158c75c8760a8bea06350eeb3e763fe1a07 +Author: Damien Miller +Date: Thu Oct 11 10:29:29 2018 +1100 + + supply callback to PEM_read_bio_PrivateKey + + OpenSSL 1.1.0i has changed the behaviour of their PEM APIs, + so that empty passphrases are interpreted differently. This + probabalistically breaks loading some keys, because the PEM format + is terrible and doesn't include a proper MAC. + + Avoid this by providing a basic callback to avoid passing empty + passphrases to OpenSSL in cases where one is required. + + Based on patch from Jakub Jelen in bz#2913; ok dtucker@ + +commit d1d301a1dd5d6cc3a9ed93ab7ab09dda4cb456e0 +Author: Damien Miller +Date: Wed Oct 10 14:57:00 2018 +1100 + + in pick_salt() avoid dereference of NULL passwords + + Apparently some NIS implementations can leave pw->pw_passwd (or the + shadow equivalent) NULL. + + bz#2909; based on patch from Todd Eigenschink + +commit edbb6febccee084d212fdc0cb05b40cb1c646ab1 +Author: djm@openbsd.org +Date: Tue Oct 9 05:42:23 2018 +0000 + + upstream: Treat all PEM_read_bio_PrivateKey() errors when a passphrase + + is specified as "incorrect passphrase" instead of trying to choose between + that and "invalid format". + + libcrypto can return ASN1 parsing errors rather than the expected + decrypt error in certain infrequent cases when trying to decrypt/parse + PEM private keys when supplied with an invalid passphrase. + + Report and repro recipe from Thomas Deutschmann in bz#2901 + + ok markus@ + + OpenBSD-Commit-ID: b1d4cd92395f9743f81c0d23aab2524109580870 + +commit 2581333d564d8697837729b3d07d45738eaf5a54 +Author: naddy@openbsd.org +Date: Fri Oct 5 14:26:09 2018 +0000 + + upstream: Support using service names for port numbers. + + * Try to resolve a port specification with getservbyname(3) if a + numeric conversion fails. + * Make the "Port" option in ssh_config handle its argument as a + port rather than a plain integer. + + ok dtucker@ deraadt@ + + OpenBSD-Commit-ID: e7f03633133205ab3dfbc67f9df7475fabae660d + +commit e0d6501e86734c48c8c503f81e1c0926e98c5c4c +Author: djm@openbsd.org +Date: Thu Oct 4 07:47:35 2018 +0000 + + upstream: when the peer sends a channel-close message, make sure we + + close the local extended read fd (stderr) along with the regular read fd + (stdout). Avoids weird stuck processed in multiplexing mode. + + Report and analysis by Nelson Elhage and Geoffrey Thomas in bz#2863 + + ok dtucker@ markus@ + + OpenBSD-Commit-ID: a48a2467fe938de4de69d2e7193d5fa701f12ae9 + +commit 6f1aabb128246f445e33b8844fad3de9cb1d18cb +Author: djm@openbsd.org +Date: Thu Oct 4 01:04:52 2018 +0000 + + upstream: factor out channel status formatting from + + channel_open_message() so we can use it in other debug messages + + OpenBSD-Commit-ID: 9c3903ca28fcabad57f566c9d0045b41ab7d52ba + +commit f1dd179e122bdfdb7ca3072d9603607740efda05 +Author: djm@openbsd.org +Date: Thu Oct 4 00:10:11 2018 +0000 + + upstream: include a little more information about the status and + + disposition of channel's extended (stderr) fd; makes debugging some things a + bit easier. No behaviour change. + + OpenBSD-Commit-ID: 483eb6467dc7d5dbca8eb109c453e7a43075f7ce + +commit 2d1428b11c8b6f616f070f2ecedce12328526944 +Author: djm@openbsd.org +Date: Thu Oct 4 00:04:41 2018 +0000 + + upstream: explicit_bzero here to be consistent with other kex*.c; + + report from coolbugcheckers AT gmail.com + + OpenBSD-Commit-ID: a90f146c5b5f5b1408700395e394f70b440856cb + +commit 5eff5b858e717e901e6af6596306a114de9f79f2 +Author: djm@openbsd.org +Date: Wed Oct 3 06:38:35 2018 +0000 + + upstream: Allow ssh_config IdentityAgent directive to accept + + environment variable names as well as explicit paths. ok dtucker@ + + OpenBSD-Commit-ID: 2f0996e103876c53d8c9dd51dcce9889d700767b + +commit a46ac4d86b25414d78b632e8173578b37e5f8a83 +Author: djm@openbsd.org +Date: Tue Oct 2 12:51:58 2018 +0000 + + upstream: mention INFO@openssh.com for sending SIGINFO + + OpenBSD-Commit-ID: 132471eeb0df658210afd27852fe65131b26e900 + +commit ff3a411cae0b484274b7900ef52ff4dad3e12876 +Author: Damien Miller +Date: Tue Oct 2 22:49:40 2018 +1000 + + only support SIGINFO on systems with SIGINFO + +commit cd98925c6405e972dc9f211afc7e75e838abe81c +Author: djm@openbsd.org +Date: Tue Oct 2 12:40:07 2018 +0000 + + upstream: Add server support for signalling sessions via the SSH + + channel/ session protocol. Signalling is only supported to sesssions that are + not subsystems and were not started with a forced command. + + Long requested in bz#1424 + + Based on a patch from markus@ and reworked by dtucker@; + ok markus@ dtucker@ + + OpenBSD-Commit-ID: 4bea826f575862eaac569c4bedd1056a268be1c3 + +commit dba50258333f2604a87848762af07ba2cc40407a +Author: djm@openbsd.org +Date: Wed Sep 26 07:32:44 2018 +0000 + + upstream: remove big ugly TODO comment from start of file. Some of + + the mentioned tasks are obsolete and, of the remainder, most are already + captured in PROTOCOL.mux where they better belong + + OpenBSD-Commit-ID: 16d9d76dee42a5bb651c9d6740f7f0ef68aeb407 + +commit 92b61a38ee9b765f5049f03cd1143e13f3878905 +Author: djm@openbsd.org +Date: Wed Sep 26 07:30:05 2018 +0000 + + upstream: Document mux proxy mode; added by Markus in openssh-7.4 + + Also add a little bit of information about the overall packet format + + OpenBSD-Commit-ID: bdb6f6ea8580ef96792e270cae7857786ad84a95 + +commit 9d883a1ce4f89b175fd77405ff32674620703fb2 +Author: djm@openbsd.org +Date: Wed Sep 26 01:48:57 2018 +0000 + + upstream: s/process_mux_master/mux_master_process/ in mux master + + function names, + + Gives better symmetry with the existing mux_client_*() names and makes + it more obvious when a message comes from the master vs client (they + are interleved in ControlMaster=auto mode). + + no functional change beyond prefixing a could of log messages with + __func__ where they were previously lacking. + + OpenBSD-Commit-ID: b01f7c3fdf92692e1713a822a89dc499333daf75 + +commit c2fa53cd6462da82d3a851dc3a4a3f6b920337c8 +Author: Darren Tucker +Date: Sat Sep 22 14:41:24 2018 +1000 + + Remove unused variable in _ssh_compat_fflush. + +commit d1b3540c21212624af907488960d703c7d987b42 +Author: Darren Tucker +Date: Thu Sep 20 18:08:43 2018 +1000 + + Import updated moduli. + +commit b5e412a8993ad17b9e1141c78408df15d3d987e1 +Author: djm@openbsd.org +Date: Fri Sep 21 12:46:22 2018 +0000 + + upstream: Allow ssh_config ForwardX11Timeout=0 to disable the + + timeout and allow X11 connections in untrusted mode indefinitely. ok dtucker@ + + OpenBSD-Commit-ID: ea1ceed3f540b48e5803f933e59a03b20db10c69 + +commit cb24d9fcc901429d77211f274031653476864ec6 +Author: djm@openbsd.org +Date: Fri Sep 21 12:23:17 2018 +0000 + + upstream: when compiled with GSSAPI support, cache supported method + + OIDs by calling ssh_gssapi_prepare_supported_oids() regardless of whether + GSSAPI authentication is enabled in the main config. + + This avoids sandbox violations for configurations that enable GSSAPI + auth later, e.g. + + Match user djm + GSSAPIAuthentication yes + + bz#2107; ok dtucker@ + + OpenBSD-Commit-ID: a5dd42d87c74e27cfb712b15b0f97ab20e0afd1d + +commit bbc8af72ba68da014d4de6e21a85eb5123384226 +Author: djm@openbsd.org +Date: Fri Sep 21 12:20:12 2018 +0000 + + upstream: In sshkey_in_file(), ignore keys that are considered for + + being too short (i.e. SSH_ERR_KEY_LENGTH). These keys will not be considered + to be "in the file". This allows key revocation lists to contain short keys + without the entire revocation list being considered invalid. + + bz#2897; ok dtucker + + OpenBSD-Commit-ID: d9f3d857d07194a42ad7e62889a74dc3f9d9924b + +commit 383a33d160cefbfd1b40fef81f72eadbf9303a66 +Author: djm@openbsd.org +Date: Fri Sep 21 03:11:36 2018 +0000 + + upstream: Treat connections with ProxyJump specified the same as ones + + with a ProxyCommand set with regards to hostname canonicalisation (i.e. don't + try to canonicalise the hostname unless CanonicalizeHostname is set to + 'always'). + + Patch from Sven Wegener via bz#2896 + + OpenBSD-Commit-ID: 527ff501cf98bf65fb4b29ed0cb847dda10f4d37 + +commit 0cbed248ed81584129b67c348dbb801660f25a6a +Author: djm@openbsd.org +Date: Thu Sep 20 23:40:16 2018 +0000 + + upstream: actually make CASignatureAlgorithms available as a config + + option + + OpenBSD-Commit-ID: 93fa7ff58314ed7b1ab7744090a6a91232e6ae52 + +commit 62528870c0ec48cd86a37dd7320fb85886c3e6ee +Author: dtucker@openbsd.org +Date: Thu Sep 20 08:07:03 2018 +0000 + + upstream: Import updated moduli. + + OpenBSD-Commit-ID: 04431e8e7872f49a2129bf080a6b73c19d576d40 + +commit e6933a2ffa0659d57f3c7b7c457b2c62b2a84613 +Author: jmc@openbsd.org +Date: Thu Sep 20 06:58:48 2018 +0000 + + upstream: reorder CASignatureAlgorithms, and add them to the + + various -o lists; ok djm + + OpenBSD-Commit-ID: ecb88baecc3c54988b4d1654446ea033da359288 + +commit aa083aa9624ea7b764d5a81c4c676719a1a3e42b +Author: djm@openbsd.org +Date: Thu Sep 20 03:31:49 2018 +0000 + + upstream: fix "ssh -Q sig" to show correct signature algorithm list + + (it was erroneously showing certificate algorithms); prompted by markus@ + + OpenBSD-Commit-ID: 1cdee002f2f0c21456979deeb887fc889afb154d + +commit ecac7e1f7add6b28874959a11f2238d149dc2c07 +Author: djm@openbsd.org +Date: Thu Sep 20 03:30:44 2018 +0000 + + upstream: add CASignatureAlgorithms option for the client, allowing + + it to specify which signature algorithms may be used by CAs when signing + certificates. Useful if you want to ban RSA/SHA1; ok markus@ + + OpenBSD-Commit-ID: 9159e5e9f67504829bf53ff222057307a6e3230f + +commit 86e5737c39153af134158f24d0cab5827cbd5852 +Author: djm@openbsd.org +Date: Thu Sep 20 03:28:06 2018 +0000 + + upstream: Add sshd_config CASignatureAlgorithms option to allow + + control over which signature algorithms a CA may use when signing + certificates. In particular, this allows a sshd to ban certificates signed + with RSA/SHA1. + + ok markus@ + + OpenBSD-Commit-ID: b05c86ef8b52b913ed48d54a9b9c1a7714d96bac + +commit f80e68ea7d62e2dfafc12f1a60ab544ae4033a0f +Author: djm@openbsd.org +Date: Wed Sep 19 02:03:02 2018 +0000 + + upstream: Make "ssh-add -q" do what it says on the tin: silence + + output from successful operations. + + Based on patch from Thijs van Dijk; ok dtucker@ deraadt@ + + OpenBSD-Commit-ID: c4f754ecc055c10af166116ce7515104aa8522e1 + +commit 5e532320e9e51de720d5f3cc2596e95d29f6e98f +Author: millert@openbsd.org +Date: Mon Sep 17 15:40:14 2018 +0000 + + upstream: When choosing a prime from the moduli file, avoid + + re-using the linenum variable for something that is not a line number to + avoid the confusion that resulted in the bug in rev. 1.64. This also lets us + pass the actual linenum to parse_prime() so the error messages include the + correct line number. OK markus@ some time ago. + + OpenBSD-Commit-ID: 4d8e5d3e924d6e8eb70053e3defa23c151a00084 + +commit cce8cbe0ed7d1ba3a575310e0b63c193326ae616 +Author: Darren Tucker +Date: Sat Sep 15 19:44:06 2018 +1000 + + Fix openssl-1.1 fallout for --without-openssl. + + ok djm@ + +commit 149519b9f201dac755f3cba4789f4d76fecf0ee1 +Author: Damien Miller +Date: Sat Sep 15 19:37:48 2018 +1000 + + add futex(2) syscall to seccomp sandbox + + Apparently needed for some glibc/openssl combinations. + + Patch from Arkadiusz Miśkiewicz + +commit 4488ae1a6940af704c4dbf70f55bf2f756a16536 +Author: Damien Miller +Date: Sat Sep 15 19:36:55 2018 +1000 + + really add source for authopt_fuzz this time + +commit 9201784b4a257c8345fbd740bcbdd70054885707 +Author: Damien Miller +Date: Sat Sep 15 19:35:40 2018 +1000 + + remove accidentally checked-in authopt_fuzz binary + +commit beb9e522dc7717df08179f9e59f36b361bfa14ab +Author: djm@openbsd.org +Date: Fri Sep 14 05:26:27 2018 +0000 + + upstream: second try, deals properly with missing and private-only + + Use consistent format in debug log for keys readied, offered and + received during public key authentication. + + This makes it a little easier to see what is going on, as each message + now contains (where available) the key filename, its type and fingerprint, + and whether the key is hosted in an agent or a token. + + OpenBSD-Commit-ID: f1c6a8e9cfc4e108c359db77f24f9a40e1e25ea7 + +commit 6bc5a24ac867bfdc3ed615589d69ac640f51674b +Author: Damien Miller +Date: Fri Sep 14 15:16:34 2018 +1000 + + fuzzer harness for authorized_keys option parsing + +commit 6c8b82fc6929b6a9a3f645151b6ec26c5507d9ef +Author: djm@openbsd.org +Date: Fri Sep 14 04:44:04 2018 +0000 + + upstream: revert following; deals badly with agent keys + + revision 1.285 + date: 2018/09/14 04:17:12; author: djm; state: Exp; lines: +47 -26; commitid: lflGFcNb2X2HebaK; + Use consistent format in debug log for keys readied, offered and + received during public key authentication. + + This makes it a little easier to see what is going on, as each message + now contains the key filename, its type and fingerprint, and whether + the key is hosted in an agent or a token. + + OpenBSD-Commit-ID: e496bd004e452d4b051f33ed9ae6a54ab918f56d + +commit 6da046f9c3374ce7e269ded15d8ff8bc45017301 +Author: djm@openbsd.org +Date: Fri Sep 14 04:17:44 2018 +0000 + + upstream: garbage-collect moribund ssh_new_private() API. + + OpenBSD-Commit-ID: 7c05bf13b094093dfa01848a9306c82eb6e95f6c + +commit 1f24ac5fc05252ceb1c1d0e8cab6a283b883c780 +Author: djm@openbsd.org +Date: Fri Sep 14 04:17:12 2018 +0000 + + upstream: Use consistent format in debug log for keys readied, + + offered and received during public key authentication. + + This makes it a little easier to see what is going on, as each message + now contains the key filename, its type and fingerprint, and whether + the key is hosted in an agent or a token. + + OpenBSD-Commit-ID: 2a01d59285a8a7e01185bb0a43316084b4f06a1f + +commit 488c9325bb7233e975dbfbf89fa055edc3d3eddc +Author: millert@openbsd.org +Date: Thu Sep 13 15:23:32 2018 +0000 + + upstream: Fix warnings caused by user_from_uid() and group_from_gid() + + now returning const char *. + + OpenBSD-Commit-ID: b5fe571ea77cfa7b9035062829ab05eb87d7cc6f + +commit 0aa1f230846ebce698e52051a107f3127024a05a +Author: Damien Miller +Date: Fri Sep 14 10:31:47 2018 +1000 + + allow SIGUSR1 as synonym for SIGINFO + + Lets users on those unfortunate operating systems that lack SIGINFO + still be able to obtain progress information from unit tests :) + +commit d64e78526596f098096113fcf148216798c327ff +Author: Damien Miller +Date: Thu Sep 13 19:05:48 2018 +1000 + + add compat header + +commit a3fd8074e2e2f06602e25618721f9556c731312c +Author: djm@openbsd.org +Date: Thu Sep 13 09:03:20 2018 +0000 + + upstream: missed a bit of openssl-1.0.x API in this unittest + + OpenBSD-Regress-ID: a73a54d7f7381856a3f3a2d25947bee7a9a5dbc9 + +commit 86e0a9f3d249d5580390daf58e015e68b01cef10 +Author: djm@openbsd.org +Date: Thu Sep 13 05:06:51 2018 +0000 + + upstream: use only openssl-1.1.x API here too + + OpenBSD-Regress-ID: ae877064597c349954b1b443769723563cecbc8f + +commit 48f54b9d12c1c79fba333bc86d455d8f4cda8cfc +Author: Damien Miller +Date: Thu Sep 13 12:13:50 2018 +1000 + + adapt -portable to OpenSSL 1.1x API + + Polyfill missing API with replacement functions extracted from LibreSSL + +commit 86112951d63d48839f035b5795be62635a463f99 +Author: Damien Miller +Date: Thu Sep 13 12:12:42 2018 +1000 + + forgot to stage these test files in commit d70d061 + +commit 482d23bcacdd3664f21cc82a5135f66fc598275f +Author: djm@openbsd.org +Date: Thu Sep 13 02:08:33 2018 +0000 + + upstream: hold our collective noses and use the openssl-1.1.x API in + + OpenSSH; feedback and ok tb@ jsing@ markus@ + + OpenBSD-Commit-ID: cacbcac87ce5da0d3ca7ef1b38a6f7fb349e4417 + +commit d70d061828730a56636ab6f1f24fe4a8ccefcfc1 +Author: djm@openbsd.org +Date: Wed Sep 12 01:36:45 2018 +0000 + + upstream: Include certs with multiple RSA signature variants in + + test data Ensure that cert->signature_key is populated correctly + + OpenBSD-Regress-ID: 56e68f70fe46cb3a193ca207385bdb301fd6603a + +commit f803b2682992cfededd40c91818b653b5d923ef5 +Author: djm@openbsd.org +Date: Wed Sep 12 01:23:48 2018 +0000 + + upstream: test revocation by explicit hash and by fingerprint + + OpenBSD-Regress-ID: 079c18a9ab9663f4af419327c759fc1e2bc78fd8 + +commit 2de78bc7da70e1338b32feeefcc6045cf49efcd4 +Author: djm@openbsd.org +Date: Wed Sep 12 01:22:43 2018 +0000 + + upstream: s/sshkey_demote/sshkey_from_private/g + + OpenBSD-Regress-ID: 782bde7407d94a87aa8d1db7c23750e09d4443c4 + +commit 41c115a5ea1cb79a6a3182773c58a23f760e8076 +Author: Damien Miller +Date: Wed Sep 12 16:50:01 2018 +1000 + + delete the correct thing; kexfuzz binary + +commit f0fcd7e65087db8c2496f13ed39d772f8e38b088 +Author: djm@openbsd.org +Date: Wed Sep 12 06:18:59 2018 +0000 + + upstream: fix edit mistake; spotted by jmc@ + + OpenBSD-Commit-ID: dd724e1c52c9d6084f4cd260ec7e1b2b138261c6 + +commit 4cc259bac699f4d2a5c52b92230f9e488c88a223 +Author: djm@openbsd.org +Date: Wed Sep 12 01:34:02 2018 +0000 + + upstream: add SSH_ALLOWED_CA_SIGALGS - the default list of + + signature algorithms that are allowed for CA signatures. Notably excludes + ssh-dsa. + + ok markus@ + + OpenBSD-Commit-ID: 1628e4181dc8ab71909378eafe5d06159a22deb4 + +commit ba9e788315b1f6a350f910cb2a9e95b2ce584e89 +Author: djm@openbsd.org +Date: Wed Sep 12 01:32:54 2018 +0000 + + upstream: add sshkey_check_cert_sigtype() that checks a + + cert->signature_type against a supplied whitelist; ok markus + + OpenBSD-Commit-ID: caadb8073292ed7a9535e5adc067d11d356d9302 + +commit a70fd4ad7bd9f2ed223ff635a3d41e483057f23b +Author: djm@openbsd.org +Date: Wed Sep 12 01:31:30 2018 +0000 + + upstream: add cert->signature_type field and keep it in sync with + + certificate signature wrt loading and certification operations; ok markus@ + + OpenBSD-Commit-ID: e8b8b9f76b66707a0cd926109c4383db8f664df3 + +commit 357128ac48630a9970e3af0e6ff820300a28da47 +Author: djm@openbsd.org +Date: Wed Sep 12 01:30:10 2018 +0000 + + upstream: Add "ssh -Q sig" to allow listing supported signature + + algorithms ok markus@ + + OpenBSD-Commit-ID: 7a8c6eb6c249dc37823ba5081fce64876d10fe2b + +commit 9405c6214f667be604a820c6823b27d0ea77937d +Author: djm@openbsd.org +Date: Wed Sep 12 01:21:34 2018 +0000 + + upstream: allow key revocation by SHA256 hash and allow ssh-keygen + + to create KRLs using SHA256/base64 key fingerprints; ok markus@ + + OpenBSD-Commit-ID: a0590fd34e7f1141f2873ab3acc57442560e6a94 + +commit 50e2687ee0941c0ea216d6ffea370ffd2c1f14b9 +Author: djm@openbsd.org +Date: Wed Sep 12 01:19:12 2018 +0000 + + upstream: log certificate fingerprint in authentication + + success/failure message (previously we logged only key ID and CA key + fingerprint). + + ok markus@ + + OpenBSD-Commit-ID: a8ef2d172b7f1ddbcce26d6434b2de6d94f6c05d + +commit de37ca909487d23e5844aca289b3f5e75d3f1e1f +Author: dtucker@openbsd.org +Date: Fri Sep 7 04:26:56 2018 +0000 + + upstream: Add FALLTHROUGH comments where appropriate. Patch from + + jjelen at redhat via bz#2687. + + OpenBSD-Commit-ID: c48eb457be697a19d6d2950c6d0879f3ccc851d3 + +commit 247766cd3111d5d8c6ea39833a3257ca8fb820f2 +Author: djm@openbsd.org +Date: Fri Sep 7 01:42:54 2018 +0000 + + upstream: ssh -MM requires confirmation for all operations that + + change the multiplexing state, not just new sessions. + + mention that confirmation is checked via ssh-askpass + + OpenBSD-Commit-ID: 0f1b45551ebb9cc5c9a4fe54ad3b23ce90f1f5c2 + +commit db8bb80e3ac1bcb3e1305d846cd98c6b869bf03f +Author: mestre@openbsd.org +Date: Tue Aug 28 12:25:53 2018 +0000 + + upstream: fix misplaced parenthesis inside if-clause. it's harmless + + and the only issue is showing an unknown error (since it's not defined) + during fatal(), if it ever an error occurs inside that condition. + + OK deraadt@ markus@ djm@ + + OpenBSD-Commit-ID: acb0a8e6936bfbe590504752d01d1d251a7101d8 + +commit 086cc614f550b7d4f100c95e472a6b6b823938ab +Author: mestre@openbsd.org +Date: Tue Aug 28 12:17:45 2018 +0000 + + upstream: fix build with DEBUG_PK enabled + + OK dtucker@ + + OpenBSD-Commit-ID: ec1568cf27726e9638a0415481c20c406e7b441c + +commit 2678833013e97f8b18f09779b7f70bcbf5eb2ab2 +Author: Darren Tucker +Date: Fri Sep 7 14:41:53 2018 +1000 + + Handle ngroups>_SC_NGROUPS_MAX. + + Based on github pull request #99 from Darren Maffat at Oracle: Solaris' + getgrouplist considers _SC_NGROUPS_MAX more of a guideline and can return + a larger number of groups. In this case, retry getgrouplist with a + larger array and defer allocating groups_byname. ok djm@ + +commit 039bf2a81797b8f3af6058d34005a4896a363221 +Author: Darren Tucker +Date: Fri Sep 7 14:06:57 2018 +1000 + + Initial len for the fmt=NULL case. + + Patch from jjelen at redhat via bz#2687. (OpenSSH never calls + setproctitle with a null format so len is always initialized). + +commit ea9c06e11d2e8fb2f4d5e02f8a41e23d2bd31ca9 +Author: Darren Tucker +Date: Fri Sep 7 14:01:39 2018 +1000 + + Include stdlib.h. + + Patch from jjelen at redhat via bz#2687. + +commit 9617816dbe73ec4d65075f4d897443f63a97c87f +Author: Damien Miller +Date: Mon Aug 27 13:08:01 2018 +1000 + + document some more regress control env variables + + Specifically SKIP_UNIT, USE_VALGRING and LTESTS. Sort the list of + environment variables. + + Based on patch from Jakub Jelen + commit 71508e06fab14bc415a79a08f5535ad7bffa93d9 Author: Damien Miller Date: Thu Aug 23 15:41:42 2018 +1000 @@ -8880,862 +9704,3 @@ Date: Thu Oct 20 03:42:09 2016 +1100 Remote channels .orig and .rej files. These files were incorrectly added during an OpenBSD sync. - -commit 246aa842a4ad368d8ce030495e657ef3a0e1f95c -Author: dtucker@openbsd.org -Date: Tue Oct 18 17:32:54 2016 +0000 - - upstream commit - - Remove channel_input_port_forward_request(); the only caller - was the recently-removed SSH1 server code so it's now dead code. ok markus@ - - Upstream-ID: 05453983230a1f439562535fec2818f63f297af9 - -commit 2c6697c443d2c9c908260eed73eb9143223e3ec9 -Author: millert@openbsd.org -Date: Tue Oct 18 12:41:22 2016 +0000 - - upstream commit - - Install a signal handler for tty-generated signals and - wait for the ssh child to suspend before suspending sftp. This lets ssh - restore the terminal mode as needed when it is suspended at the password - prompt. OK dtucker@ - - Upstream-ID: a31c1f42aa3e2985dcc91e46e6a17bd22e372d69 - -commit fd2a8f1033fa2316fff719fd5176968277560158 -Author: jmc@openbsd.org -Date: Sat Oct 15 19:56:25 2016 +0000 - - upstream commit - - various formatting fixes, specifically removing Dq; - - Upstream-ID: 81e85df2b8e474f5f93d66e61d9a4419ce87347c - -commit 8f866d8a57b9a2dc5dd04504e27f593b551618e3 -Author: Darren Tucker -Date: Wed Oct 19 03:26:09 2016 +1100 - - Import readpassphrase.c rev 1.26. - - Author: miller@openbsd.org: - Avoid generate SIGTTOU when restoring the terminal mode. If we get - SIGTTOU it means the process is not in the foreground process group - which, in most cases, means that the shell has taken control of the tty. - Requiring the user the fg the process in this case doesn't make sense - and can result in both SIGTSTP and SIGTTOU being sent which can lead to - the process being suspended again immediately after being brought into - the foreground. - -commit f901440cc844062c9bab0183d133f7ccc58ac3a5 -Author: Darren Tucker -Date: Wed Oct 19 03:23:16 2016 +1100 - - Import readpassphrase.c rev 1.25. - - Wrap so internal calls go direct and - readpassphrase is weak. - - (DEF_WEAK is a no-op in portable.) - -commit 032147b69527e5448a511049b2d43dbcae582624 -Author: Darren Tucker -Date: Sat Oct 15 05:51:12 2016 +1100 - - Move DEF_WEAK into defines.h. - - As well pull in more recent changes from OpenBSD these will start to - arrive so put it where the definition is shared. - -commit e0259a82ddd950cfb109ddee86fcebbc09c6bd04 -Author: Darren Tucker -Date: Sat Oct 15 04:34:46 2016 +1100 - - Remove do_pam_set_tty which is dead code. - - The callers of do_pam_set_tty were removed in 2008, so this is now dead - code. bz#2604, pointed out by jjelen at redhat.com. - -commit ca04de83f210959ad2ed870a30ba1732c3ae00e3 -Author: Damien Miller -Date: Thu Oct 13 18:53:43 2016 +1100 - - unbreak principals-command test - - Undo inconsistetly updated variable name. - -commit 1723ec92eb485ce06b4cbf49712d21975d873909 -Author: djm@openbsd.org -Date: Tue Oct 11 21:49:54 2016 +0000 - - upstream commit - - fix the KEX fuzzer - the previous method of obtaining the - packet contents was broken. This now uses the new per-packet input hook, so - it sees exact post-decrypt packets and doesn't have to pass packet integrity - checks. ok markus@ - - Upstream-Regress-ID: 402fb6ffabd97de590e8e57b25788949dce8d2fd - -commit 09f997893f109799cddbfce6d7e67f787045cbb2 -Author: natano@openbsd.org -Date: Thu Oct 6 09:31:38 2016 +0000 - - upstream commit - - Move USER out of the way to unbreak the BUILDUSER - mechanism. ok tb - - Upstream-Regress-ID: 74ab9687417dd071d62316eaadd20ddad1d5af3c - -commit 3049a012c482a7016f674db168f23fd524edce27 -Author: bluhm@openbsd.org -Date: Fri Sep 30 11:55:20 2016 +0000 - - upstream commit - - In ssh tests set REGRESS_FAIL_EARLY with ?= so that the - environment can change it. OK djm@ - - Upstream-Regress-ID: 77bcb50e47b68c7209c7f0a5a020d73761e5143b - -commit 39af7b444db28c1cb01b7ea468a4f574a44f375b -Author: djm@openbsd.org -Date: Tue Oct 11 21:47:45 2016 +0000 - - upstream commit - - Add a per-packet input hook that is called with the - decrypted packet contents. This will be used for fuzzing; ok markus@ - - Upstream-ID: a3221cee6b1725dd4ae1dd2c13841b4784cb75dc - -commit ec165c392ca54317dbe3064a8c200de6531e89ad *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Apr 25 15:42:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F2702B5EEE; Sat, 25 Apr 2020 15:42:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498Zzy3LbTz4Dk1; Sat, 25 Apr 2020 15:42:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6DB609F6F; Sat, 25 Apr 2020 15:42:38 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFgciR075221; Sat, 25 Apr 2020 15:42:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFgcBR075220; Sat, 25 Apr 2020 15:42:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004251542.03PFgcBR075220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 25 Apr 2020 15:42:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360314 - stable/12/sys/dev/sound/pci/hda X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 360314 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:42:38 -0000 Author: emaste Date: Sat Apr 25 15:42:38 2020 New Revision: 360314 URL: https://svnweb.freebsd.org/changeset/base/360314 Log: MFC r359781: hda: if a CODEC is not responding, report which one PR: 229190 Modified: stable/12/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdac.c Sat Apr 25 15:38:48 2020 (r360313) +++ stable/12/sys/dev/sound/pci/hda/hdac.c Sat Apr 25 15:42:38 2020 (r360314) @@ -1526,7 +1526,7 @@ hdac_attach2(void *arg) if (vendorid == HDA_INVALID && revisionid == HDA_INVALID) { device_printf(sc->dev, - "CODEC is not responding!\n"); + "CODEC at address %d not responding!\n", i); continue; } sc->codecs[i].vendor_id = From owner-svn-src-all@freebsd.org Sat Apr 25 15:43:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8A572B5FC8; Sat, 25 Apr 2020 15:43:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498b1D5lV3z4Dt4; Sat, 25 Apr 2020 15:43:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C07169F7F; Sat, 25 Apr 2020 15:43:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFhi0S075344; Sat, 25 Apr 2020 15:43:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFhih4075343; Sat, 25 Apr 2020 15:43:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004251543.03PFhih4075343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 25 Apr 2020 15:43:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360315 - stable/12/usr.sbin/bluetooth/hccontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 360315 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:43:45 -0000 Author: emaste Date: Sat Apr 25 15:43:44 2020 New Revision: 360315 URL: https://svnweb.freebsd.org/changeset/base/360315 Log: MFC r359449: correct 'disble' typo in hccontrol PR: 245125 Submitted by: Marc Veldman Modified: stable/12/usr.sbin/bluetooth/hccontrol/le.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bluetooth/hccontrol/le.c ============================================================================== --- stable/12/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 25 15:42:38 2020 (r360314) +++ stable/12/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 25 15:43:44 2020 (r360315) @@ -306,7 +306,7 @@ int le_enable(int s, int argc, char *argv[]) set_event_mask(s, NG_HCI_EVENT_MASK_DEFAULT | NG_HCI_EVENT_MASK_LE); set_le_event_mask(s, NG_HCI_LE_EVENT_MASK_ALL); - } else if (strcasecmp(argv[0], "disble") == 0) + } else if (strcasecmp(argv[0], "disable") == 0) set_event_mask(s, NG_HCI_EVENT_MASK_DEFAULT); else return USAGE; From owner-svn-src-all@freebsd.org Sat Apr 25 15:44:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 123C62B60B5; Sat, 25 Apr 2020 15:44:26 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498b216khHz4F5X; Sat, 25 Apr 2020 15:44:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E26879F81; Sat, 25 Apr 2020 15:44:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFiPA1075472; Sat, 25 Apr 2020 15:44:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFiPBA075471; Sat, 25 Apr 2020 15:44:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004251544.03PFiPBA075471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 25 Apr 2020 15:44:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360316 - stable/11/usr.sbin/bluetooth/hccontrol X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/usr.sbin/bluetooth/hccontrol X-SVN-Commit-Revision: 360316 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:44:26 -0000 Author: emaste Date: Sat Apr 25 15:44:25 2020 New Revision: 360316 URL: https://svnweb.freebsd.org/changeset/base/360316 Log: MFC r359449: correct 'disble' typo in hccontrol PR: 245125 Submitted by: Marc Veldman Modified: stable/11/usr.sbin/bluetooth/hccontrol/le.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bluetooth/hccontrol/le.c ============================================================================== --- stable/11/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 25 15:43:44 2020 (r360315) +++ stable/11/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 25 15:44:25 2020 (r360316) @@ -306,7 +306,7 @@ int le_enable(int s, int argc, char *argv[]) set_event_mask(s, NG_HCI_EVENT_MASK_DEFAULT | NG_HCI_EVENT_MASK_LE); set_le_event_mask(s, NG_HCI_LE_EVENT_MASK_ALL); - } else if (strcasecmp(argv[0], "disble") == 0) + } else if (strcasecmp(argv[0], "disable") == 0) set_event_mask(s, NG_HCI_EVENT_MASK_DEFAULT); else return USAGE; From owner-svn-src-all@freebsd.org Sat Apr 25 15:45:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D15BD2B6184; Sat, 25 Apr 2020 15:45:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498b3W5Bp7z4FCt; Sat, 25 Apr 2020 15:45:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADA6E9F8A; Sat, 25 Apr 2020 15:45:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFjhwT075629; Sat, 25 Apr 2020 15:45:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFjhe2075628; Sat, 25 Apr 2020 15:45:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251545.03PFjhe2075628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 15:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360317 - in stable: 11/usr.sbin/i2c 12/usr.sbin/i2c X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/usr.sbin/i2c 12/usr.sbin/i2c X-SVN-Commit-Revision: 360317 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:45:43 -0000 Author: dim Date: Sat Apr 25 15:45:43 2020 New Revision: 360317 URL: https://svnweb.freebsd.org/changeset/base/360317 Log: MFC r354796 (by arichardson): Fix error found by new clang operator precendence warning error: operator '?:' has lower precedence than '|'; '|' will be evaluated first I discovered this in CheriBSD after updating our fork of clang to the latest upstream master. Reviewed By: ian Differential Revision: https://reviews.freebsd.org/D22433 Modified: stable/12/usr.sbin/i2c/i2c.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/i2c/i2c.c Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.sbin/i2c/i2c.c ============================================================================== --- stable/12/usr.sbin/i2c/i2c.c Sat Apr 25 15:44:25 2020 (r360316) +++ stable/12/usr.sbin/i2c/i2c.c Sat Apr 25 15:45:43 2020 (r360317) @@ -590,7 +590,7 @@ i2c_rdwr_transfer(char *dev, struct options i2c_opt, c * because of the NOSTOP flag used above. */ if (i2c_opt.dir == 'w') - msgs[i].flags = IIC_M_WR | (i > 0) ? IIC_M_NOSTART : 0; + msgs[i].flags = IIC_M_WR | ((i > 0) ? IIC_M_NOSTART : 0); else msgs[i].flags = IIC_M_RD; msgs[i].slave = i2c_opt.addr; From owner-svn-src-all@freebsd.org Sat Apr 25 15:45:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E9952B6189; Sat, 25 Apr 2020 15:45:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498b3X0Sm6z4FCv; Sat, 25 Apr 2020 15:45:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B2219F8B; Sat, 25 Apr 2020 15:45:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFjhvY075635; Sat, 25 Apr 2020 15:45:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFjhYg075634; Sat, 25 Apr 2020 15:45:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251545.03PFjhYg075634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 15:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360317 - in stable: 11/usr.sbin/i2c 12/usr.sbin/i2c X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/usr.sbin/i2c 12/usr.sbin/i2c X-SVN-Commit-Revision: 360317 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:45:44 -0000 Author: dim Date: Sat Apr 25 15:45:43 2020 New Revision: 360317 URL: https://svnweb.freebsd.org/changeset/base/360317 Log: MFC r354796 (by arichardson): Fix error found by new clang operator precendence warning error: operator '?:' has lower precedence than '|'; '|' will be evaluated first I discovered this in CheriBSD after updating our fork of clang to the latest upstream master. Reviewed By: ian Differential Revision: https://reviews.freebsd.org/D22433 Modified: stable/11/usr.sbin/i2c/i2c.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.sbin/i2c/i2c.c Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.sbin/i2c/i2c.c ============================================================================== --- stable/11/usr.sbin/i2c/i2c.c Sat Apr 25 15:44:25 2020 (r360316) +++ stable/11/usr.sbin/i2c/i2c.c Sat Apr 25 15:45:43 2020 (r360317) @@ -590,7 +590,7 @@ i2c_rdwr_transfer(char *dev, struct options i2c_opt, c * because of the NOSTOP flag used above. */ if (i2c_opt.dir == 'w') - msgs[i].flags = IIC_M_WR | (i > 0) ? IIC_M_NOSTART : 0; + msgs[i].flags = IIC_M_WR | ((i > 0) ? IIC_M_NOSTART : 0); else msgs[i].flags = IIC_M_RD; msgs[i].slave = i2c_opt.addr; From owner-svn-src-all@freebsd.org Sat Apr 25 15:51:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3FC42B641C; Sat, 25 Apr 2020 15:51:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498bBC4Nh7z4FkR; Sat, 25 Apr 2020 15:51:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77E62A116; Sat, 25 Apr 2020 15:51:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFpV2q076021; Sat, 25 Apr 2020 15:51:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFpV5I076020; Sat, 25 Apr 2020 15:51:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251551.03PFpV5I076020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 15:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360318 - in stable: 11/contrib/binutils/bfd 11/contrib/binutils/binutils 12/contrib/binutils/bfd 12/contrib/binutils/binutils X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/binutils/bfd 11/contrib/binutils/binutils 12/contrib/binutils/bfd 12/contrib/binutils/binutils X-SVN-Commit-Revision: 360318 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:51:31 -0000 Author: dim Date: Sat Apr 25 15:51:30 2020 New Revision: 360318 URL: https://svnweb.freebsd.org/changeset/base/360318 Log: MFC r354057 (by brooks): binutils: Fix bugs found by -Wpointer-compare The MIPS bug was introduced by upstream commit 7403cb630, which failed to account for the additional indirection introduced and also dropped one of the checks; change it to the standard "NULL-or-empty" check as used elsewhere in BFD, which is also what upstream now has. Submitted by: James Clarke Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D21911 Modified: stable/11/contrib/binutils/bfd/elfxx-mips.c stable/11/contrib/binutils/binutils/stabs.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/binutils/bfd/elfxx-mips.c stable/12/contrib/binutils/binutils/stabs.c Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/binutils/bfd/elfxx-mips.c ============================================================================== --- stable/11/contrib/binutils/bfd/elfxx-mips.c Sat Apr 25 15:45:43 2020 (r360317) +++ stable/11/contrib/binutils/bfd/elfxx-mips.c Sat Apr 25 15:51:30 2020 (r360318) @@ -3966,7 +3966,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_b *namep = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name); - if (*namep == '\0') + if (*namep == NULL || **namep == '\0') *namep = bfd_section_name (input_bfd, sec); target_is_16_bit_code_p = (sym->st_other == STO_MIPS16); Modified: stable/11/contrib/binutils/binutils/stabs.c ============================================================================== --- stable/11/contrib/binutils/binutils/stabs.c Sat Apr 25 15:45:43 2020 (r360317) +++ stable/11/contrib/binutils/binutils/stabs.c Sat Apr 25 15:51:30 2020 (r360318) @@ -2668,7 +2668,7 @@ parse_stab_members (void *dhandle, struct stab_handle ++*pp; voffset &= 0x7fffffff; - if (**pp == ';' || *pp == '\0') + if (**pp == ';' || **pp == '\0') { /* Must be g++ version 1. */ context = DEBUG_TYPE_NULL; From owner-svn-src-all@freebsd.org Sat Apr 25 15:51:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 37BE42B6415; Sat, 25 Apr 2020 15:51:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498bBC0lZNz4FkP; Sat, 25 Apr 2020 15:51:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14E50A114; Sat, 25 Apr 2020 15:51:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFpU4A076014; Sat, 25 Apr 2020 15:51:30 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFpUN0076013; Sat, 25 Apr 2020 15:51:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251551.03PFpUN0076013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 15:51:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360318 - in stable: 11/contrib/binutils/bfd 11/contrib/binutils/binutils 12/contrib/binutils/bfd 12/contrib/binutils/binutils X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/binutils/bfd 11/contrib/binutils/binutils 12/contrib/binutils/bfd 12/contrib/binutils/binutils X-SVN-Commit-Revision: 360318 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:51:31 -0000 Author: dim Date: Sat Apr 25 15:51:30 2020 New Revision: 360318 URL: https://svnweb.freebsd.org/changeset/base/360318 Log: MFC r354057 (by brooks): binutils: Fix bugs found by -Wpointer-compare The MIPS bug was introduced by upstream commit 7403cb630, which failed to account for the additional indirection introduced and also dropped one of the checks; change it to the standard "NULL-or-empty" check as used elsewhere in BFD, which is also what upstream now has. Submitted by: James Clarke Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D21911 Modified: stable/12/contrib/binutils/bfd/elfxx-mips.c stable/12/contrib/binutils/binutils/stabs.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/binutils/bfd/elfxx-mips.c stable/11/contrib/binutils/binutils/stabs.c Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/binutils/bfd/elfxx-mips.c ============================================================================== --- stable/12/contrib/binutils/bfd/elfxx-mips.c Sat Apr 25 15:45:43 2020 (r360317) +++ stable/12/contrib/binutils/bfd/elfxx-mips.c Sat Apr 25 15:51:30 2020 (r360318) @@ -3966,7 +3966,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_b *namep = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name); - if (*namep == '\0') + if (*namep == NULL || **namep == '\0') *namep = bfd_section_name (input_bfd, sec); target_is_16_bit_code_p = (sym->st_other == STO_MIPS16); Modified: stable/12/contrib/binutils/binutils/stabs.c ============================================================================== --- stable/12/contrib/binutils/binutils/stabs.c Sat Apr 25 15:45:43 2020 (r360317) +++ stable/12/contrib/binutils/binutils/stabs.c Sat Apr 25 15:51:30 2020 (r360318) @@ -2668,7 +2668,7 @@ parse_stab_members (void *dhandle, struct stab_handle ++*pp; voffset &= 0x7fffffff; - if (**pp == ';' || *pp == '\0') + if (**pp == ';' || **pp == '\0') { /* Must be g++ version 1. */ context = DEBUG_TYPE_NULL; From owner-svn-src-all@freebsd.org Sat Apr 25 15:52:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 098E82B67CC; Sat, 25 Apr 2020 15:52:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498bCp68mXz4G4T; Sat, 25 Apr 2020 15:52:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CEAA9A16C; Sat, 25 Apr 2020 15:52:54 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PFqsRn081509; Sat, 25 Apr 2020 15:52:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PFqsOE081508; Sat, 25 Apr 2020 15:52:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202004251552.03PFqsOE081508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 25 Apr 2020 15:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360319 - stable/11/contrib/blacklist/bin X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/contrib/blacklist/bin X-SVN-Commit-Revision: 360319 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 15:52:55 -0000 Author: emaste Date: Sat Apr 25 15:52:54 2020 New Revision: 360319 URL: https://svnweb.freebsd.org/changeset/base/360319 Log: MFC r360144: blacklistd.8: fix db file path PR: 245781 Submitted by: Jose Luis Duran Modified: stable/11/contrib/blacklist/bin/blacklistd.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/blacklist/bin/blacklistd.8 ============================================================================== --- stable/11/contrib/blacklist/bin/blacklistd.8 Sat Apr 25 15:51:30 2020 (r360318) +++ stable/11/contrib/blacklist/bin/blacklistd.8 Sat Apr 25 15:52:54 2020 (r360319) @@ -153,7 +153,7 @@ The name of the configuration file to read, usually The Berkeley DB file where .Nm stores its state, usually -.Pa /var/run/blacklistd.db . +.Pa /var/db/blacklistd.db . .It Fl d Normally, .Nm From owner-svn-src-all@freebsd.org Sat Apr 25 18:23:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6A8C2BC89F; Sat, 25 Apr 2020 18:23:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498fYS4w5cz4QkN; Sat, 25 Apr 2020 18:23:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3D06BFFC; Sat, 25 Apr 2020 18:23:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PINO7l074920; Sat, 25 Apr 2020 18:23:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PINO2A074917; Sat, 25 Apr 2020 18:23:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004251823.03PINO2A074917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 18:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360320 - in stable/12: lib lib/liblua libexec/flua share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable/12: lib lib/liblua libexec/flua share/mk X-SVN-Commit-Revision: 360320 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 18:23:24 -0000 Author: dim Date: Sat Apr 25 18:23:23 2020 New Revision: 360320 URL: https://svnweb.freebsd.org/changeset/base/360320 Log: MFC r359045 (by brooks): Add an internal liblua and use it in flua. The new liblua will be used in a forthcoming import of kyua. Reviewed by: kevans Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24090 Added: stable/12/lib/liblua/ - copied from r359045, head/lib/liblua/ Deleted: stable/12/libexec/flua/luaconf.h Modified: stable/12/lib/Makefile stable/12/libexec/flua/Makefile stable/12/share/mk/src.libnames.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/Makefile ============================================================================== --- stable/12/lib/Makefile Sat Apr 25 15:52:54 2020 (r360319) +++ stable/12/lib/Makefile Sat Apr 25 18:23:23 2020 (r360320) @@ -59,6 +59,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libjail \ libkiconv \ libkvm \ + liblua \ liblzma \ libmemstat \ libmd \ Modified: stable/12/libexec/flua/Makefile ============================================================================== --- stable/12/libexec/flua/Makefile Sat Apr 25 15:52:54 2020 (r360319) +++ stable/12/libexec/flua/Makefile Sat Apr 25 18:23:23 2020 (r360320) @@ -11,19 +11,8 @@ MAN= # No manpage; this is internal. CWARNFLAGS.gcc+= -Wno-format-nonliteral -LIBADD= m +LIBADD= lua -# Core functions -SRCS= lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c \ - lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c \ - ltm.c lundump.c lvm.c lzio.c - -# Library functions; any change to these likely needs an accompanying change -# in our custom linit_flua.c. We use our custom linit.c to make it easier to -# support bootstrap flua that may not have supporting local libraries. -SRCS+= lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldblib.c liolib.c \ - lmathlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c loadlib.c - # Entry point SRCS+= lua.c @@ -32,7 +21,7 @@ SRCS+= lua.c SRCS+= linit_flua.c SRCS+= lfs.c lposix.c -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/modules -I${LUASRC} +CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" # readline bits; these aren't needed if we're building a bootstrap flua, as we Modified: stable/12/share/mk/src.libnames.mk ============================================================================== --- stable/12/share/mk/src.libnames.mk Sat Apr 25 15:52:54 2020 (r360319) +++ stable/12/share/mk/src.libnames.mk Sat Apr 25 18:23:23 2020 (r360320) @@ -41,6 +41,7 @@ _INTERNALLIBS= \ fifolog \ ipf \ lpr \ + lua \ netbsd \ ntp \ ntpevent \ @@ -293,6 +294,7 @@ _DP_memstat= kvm _DP_magic= z _DP_mt= sbuf bsdxml _DP_ldns= ssl crypto +_DP_lua= m .if ${MK_OPENSSL} != "no" _DP_fetch= ssl crypto .else @@ -464,6 +466,9 @@ LDADD+= ${LDADD_${_l}} # INTERNALLIB definitions. LIBELFTCDIR= ${OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc${PIE_SUFFIX}.a + +LIBLUADIR= ${OBJTOP}/lib/liblua +LIBLUA?= ${LIBLUADIR}/liblua${PIE_SUFFIX}.a LIBPEDIR= ${OBJTOP}/lib/libpe LIBPE?= ${LIBPEDIR}/libpe${PIE_SUFFIX}.a From owner-svn-src-all@freebsd.org Sat Apr 25 18:36:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67A852BCF66; Sat, 25 Apr 2020 18:36:36 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mail.bsd4all.net (mail.bsd4all.net [IPv6:2a01:4f8:13b:240c::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail.bsd4all.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498frf5lbzz4RXl; Sat, 25 Apr 2020 18:36:34 +0000 (UTC) (envelope-from herbert@gojira.at) Date: Sat, 25 Apr 2020 20:36:26 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gojira.at; s=mail201809; t=1587839785; bh=Ua6td5a9Hn6YWaZb3N2KTnBaK3cNGNw7KkLjUHdySmM=; h=Date:Message-ID:From:To:Cc:Subject:MIME-Version:Content-Type; b=nKQnzZhfsdzn8KkU9pY0iRDNaNZhc6HF3UPbNnfKEi2to3GE7tlcwNek2Cdf8WvNe fzQG+tDVr9mJ1qnSKnYzXQI/g7H3pl9LlG5nH8+2fdsRIP4CCaKkEXh1PuQlTAAwIk iz65wfFk99L54O91mv+cfkHsQfxMzVX7pdf5C+3XSkAgsP6vh5qm9BO9WkpRg7SboG cUxtRmBFlIbz1FrJXYBYX26nC+armz5BJhfSdgCvCU5sd9yYRmCdSinT7DV2zrgcE1 SbMerHUIz5TVYGYUHkIKp3epzuu1Ap02UyCVgKarWH09OT8eebt2LNbrfrhSXLV8Di 5dslGTY7b/egg== Message-ID: <87k123h0ph.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Xin LI Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r360214 - in stable/12: etc/mtree share/mk share/zoneinfo share/zoneinfo/tests In-Reply-To: <202004230427.03N4RteP038656@repo.freebsd.org> References: <202004230427.03N4RteP038656@repo.freebsd.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/28.0 Mule/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 498frf5lbzz4RXl X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gojira.at header.s=mail201809 header.b=nKQnzZhf; dmarc=none; spf=pass (mx1.freebsd.org: domain of herbert@gojira.at designates 2a01:4f8:13b:240c::25 as permitted sender) smtp.mailfrom=herbert@gojira.at X-Spamd-Result: default: False [-2.34 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gojira.at:s=mail201809]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:13b:240c::25]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[gojira.at]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[gojira.at:+]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.84)[ipnet: 2a01:4f8::/29(-2.64), asn: 24940(-1.54), country: DE(-0.02)]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 18:36:36 -0000 On Thu, 23 Apr 2020 06:27:55 +0200, Xin LI wrote: > > Author: delphij > Date: Thu Apr 23 04:27:55 2020 > New Revision: 360214 > URL: https://svnweb.freebsd.org/changeset/base/360214 > > Log: > MFC r359736: Always install backward compatibility timezones, as they > are installed on all major Linux distributions as well as NetBSD and > OpenBSD. > > Modified: > stable/12/etc/mtree/BSD.usr.dist > stable/12/share/mk/src.opts.mk > stable/12/share/zoneinfo/Makefile > stable/12/share/zoneinfo/tests/Makefile > Directory Properties: > stable/12/ (props changed) The following commit is obviously missing in stable/11 and stable/12: ------------------------------------------------------------------------ r359961 | jkim | 2020-04-15 10:18:28 +0200 (Wed, 15 Apr 2020) | 4 lines Do not attempt to remove backward compatibility timezones. Since r359736, these timezones are unconditionally installed. ------------------------------------------------------------------------ Thanks! -- Herbert From owner-svn-src-all@freebsd.org Sat Apr 25 20:00:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE57F2BF09C; Sat, 25 Apr 2020 20:00:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498hjm4gtMz4VvM; Sat, 25 Apr 2020 20:00:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9BE57D10B; Sat, 25 Apr 2020 20:00:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PK0iCC031948; Sat, 25 Apr 2020 20:00:44 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PK0iAj031947; Sat, 25 Apr 2020 20:00:44 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202004252000.03PK0iAj031947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 25 Apr 2020 20:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360321 - head/release/arm64 X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm64 X-SVN-Commit-Revision: 360321 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 20:00:44 -0000 Author: manu Date: Sat Apr 25 20:00:44 2020 New Revision: 360321 URL: https://svnweb.freebsd.org/changeset/base/360321 Log: release: arm64: rockpro64: Set hw.ncpu to 4 Since there is known issue with big.LITTLE set the number of CPU to 4 which is the number present in the LITTLE cluster. Modified: head/release/arm64/ROCKPRO64.conf Modified: head/release/arm64/ROCKPRO64.conf ============================================================================== --- head/release/arm64/ROCKPRO64.conf Sat Apr 25 18:23:23 2020 (r360320) +++ head/release/arm64/ROCKPRO64.conf Sat Apr 25 20:00:44 2020 (r360321) @@ -26,3 +26,10 @@ arm_install_uboot() { of=/dev/${mddev} bs=512 seek=16384 conv=sync return 0 } + +arm_do_quirk() { + echo '# Known issue with big.LITTLE' \ + >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf + echo 'hw.ncpu=4' \ + >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf +} From owner-svn-src-all@freebsd.org Sat Apr 25 20:24:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 028752BFD9F; Sat, 25 Apr 2020 20:24:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498jFP6Hwxz4XKm; Sat, 25 Apr 2020 20:24:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D345AD696; Sat, 25 Apr 2020 20:24:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PKOfXU049379; Sat, 25 Apr 2020 20:24:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PKOf4r049377; Sat, 25 Apr 2020 20:24:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004252024.03PKOf4r049377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 20:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360322 - head X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 360322 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 20:24:42 -0000 Author: dim Date: Sat Apr 25 20:24:41 2020 New Revision: 360322 URL: https://svnweb.freebsd.org/changeset/base/360322 Log: Fix race between prebuilding libsbuf and libgeom The latter needs the former, but with a multi-job build on a fast machine, the race is sometimes lost. This leads to "ld: error: unable to find library -lsbuf", when linking libgeom.so. Submitted by: kevans MFC after: 3 days Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Apr 25 20:00:44 2020 (r360321) +++ head/Makefile.inc1 Sat Apr 25 20:24:41 2020 (r360322) @@ -2760,7 +2760,7 @@ gnu/lib/libdialog__L: lib/msun__L lib/ncurses/ncursesw _prebuild_libs+= lib/libc++ .endif -lib/libgeom__L: lib/libexpat__L +lib/libgeom__L: lib/libexpat__L lib/libsbuf__L lib/libkvm__L: lib/libelf__L .if ${MK_LIBTHR} != "no" From owner-svn-src-all@freebsd.org Sat Apr 25 21:41:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D1F12C1BF1; Sat, 25 Apr 2020 21:41:10 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498kxf00gQz4bl8; Sat, 25 Apr 2020 21:41:10 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF9AAE3FC; Sat, 25 Apr 2020 21:41:09 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PLf9Z2093903; Sat, 25 Apr 2020 21:41:09 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PLf9W9093902; Sat, 25 Apr 2020 21:41:09 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <202004252141.03PLf9W9093902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Sat, 25 Apr 2020 21:41:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360323 - head/sys/geom X-SVN-Group: head X-SVN-Commit-Author: pjd X-SVN-Commit-Paths: head/sys/geom X-SVN-Commit-Revision: 360323 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 21:41:10 -0000 Author: pjd Date: Sat Apr 25 21:41:09 2020 New Revision: 360323 URL: https://svnweb.freebsd.org/changeset/base/360323 Log: Add g_topology_locked() macro that returns true if we already hold the GEOM topology lock. Modified: head/sys/geom/geom.h Modified: head/sys/geom/geom.h ============================================================================== --- head/sys/geom/geom.h Sat Apr 25 20:24:41 2020 (r360322) +++ head/sys/geom/geom.h Sat Apr 25 21:41:09 2020 (r360323) @@ -395,6 +395,8 @@ g_free(void *ptr) sx_xunlock(&topology_lock); \ } while (0) +#define g_topology_locked() sx_xlocked(&topology_lock) + #define g_topology_assert() \ do { \ sx_assert(&topology_lock, SX_XLOCKED); \ From owner-svn-src-all@freebsd.org Sat Apr 25 21:45:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A35CA2C1E35; Sat, 25 Apr 2020 21:45:31 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498l2g3tCWz4cDy; Sat, 25 Apr 2020 21:45:31 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8065AE5A4; Sat, 25 Apr 2020 21:45:31 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PLjVMQ099023; Sat, 25 Apr 2020 21:45:31 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PLjVw9099022; Sat, 25 Apr 2020 21:45:31 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <202004252145.03PLjVw9099022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Sat, 25 Apr 2020 21:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360325 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: pjd X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 360325 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 21:45:31 -0000 Author: pjd Date: Sat Apr 25 21:45:31 2020 New Revision: 360325 URL: https://svnweb.freebsd.org/changeset/base/360325 Log: Avoid the GEOM topology lock recursion when we automatically expand a pool. The steps to reproduce the problem: mdconfig -a -t swap -s 3g -u 0 gpart create -s GPT md0 gpart add -t freebsd-zfs -s 1g md0 zpool create -o autoexpand=on foo md0p1 gpart resize -i 1 -s 2g md0 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sat Apr 25 21:41:38 2020 (r360324) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sat Apr 25 21:45:31 2020 (r360325) @@ -973,18 +973,22 @@ static void vdev_geom_close(vdev_t *vd) { struct g_consumer *cp; + int locked; cp = vd->vdev_tsd; DROP_GIANT(); - g_topology_lock(); + locked = g_topology_locked(); + if (!locked) + g_topology_lock(); if (!vd->vdev_reopening || (cp != NULL && ((cp->flags & G_CF_ORPHAN) != 0 || (cp->provider != NULL && cp->provider->error != 0)))) vdev_geom_close_locked(vd); - g_topology_unlock(); + if (!locked) + g_topology_unlock(); PICKUP_GIANT(); } From owner-svn-src-all@freebsd.org Sat Apr 25 22:23:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 634222C2AF9; Sat, 25 Apr 2020 22:23:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498ltb216Sz4dnB; Sat, 25 Apr 2020 22:23:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40175ED36; Sat, 25 Apr 2020 22:23:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PMNZ7L023588; Sat, 25 Apr 2020 22:23:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PMNZsB023587; Sat, 25 Apr 2020 22:23:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004252223.03PMNZsB023587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 22:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360326 - in stable: 10/usr.sbin/pw 11/usr.sbin/pw 12/usr.sbin/pw X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/usr.sbin/pw 11/usr.sbin/pw 12/usr.sbin/pw X-SVN-Commit-Revision: 360326 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 22:23:35 -0000 Author: dim Date: Sat Apr 25 22:23:34 2020 New Revision: 360326 URL: https://svnweb.freebsd.org/changeset/base/360326 Log: MFC r348282 (by lwhsu): Remove an uneeded indentation introduced in r286196 to silence gcc warnging Sponsored by: The FreeBSD Foundation Modified: stable/12/usr.sbin/pw/pw_user.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/pw/pw_user.c stable/11/usr.sbin/pw/pw_user.c Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/12/usr.sbin/pw/pw_user.c ============================================================================== --- stable/12/usr.sbin/pw/pw_user.c Sat Apr 25 21:45:31 2020 (r360325) +++ stable/12/usr.sbin/pw/pw_user.c Sat Apr 25 22:23:34 2020 (r360326) @@ -589,7 +589,7 @@ print_user(struct passwd * pwd, bool pretty, bool v7) } if (pwd->pw_expire > (time_t)0 && (tptr = localtime(&pwd->pw_expire)) != NULL) strftime(acexpire, sizeof acexpire, "%c", tptr); - if (pwd->pw_change > (time_t)0 && (tptr = localtime(&pwd->pw_change)) != NULL) + if (pwd->pw_change > (time_t)0 && (tptr = localtime(&pwd->pw_change)) != NULL) strftime(pwexpire, sizeof pwexpire, "%c", tptr); printf("Login Name: %-15s #%-12ju Group: %-15s #%ju\n" " Full Name: %s\n" From owner-svn-src-all@freebsd.org Sat Apr 25 22:23:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD0052C2B0B; Sat, 25 Apr 2020 22:23:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498ltb57xlz4dnC; Sat, 25 Apr 2020 22:23:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABC42ED37; Sat, 25 Apr 2020 22:23:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PMNZb1023594; Sat, 25 Apr 2020 22:23:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PMNZoJ023593; Sat, 25 Apr 2020 22:23:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004252223.03PMNZoJ023593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 22:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360326 - in stable: 10/usr.sbin/pw 11/usr.sbin/pw 12/usr.sbin/pw X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/usr.sbin/pw 11/usr.sbin/pw 12/usr.sbin/pw X-SVN-Commit-Revision: 360326 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 22:23:36 -0000 Author: dim Date: Sat Apr 25 22:23:34 2020 New Revision: 360326 URL: https://svnweb.freebsd.org/changeset/base/360326 Log: MFC r348282 (by lwhsu): Remove an uneeded indentation introduced in r286196 to silence gcc warnging Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/pw/pw_user.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/pw/pw_user.c stable/12/usr.sbin/pw/pw_user.c Directory Properties: stable/10/ (props changed) stable/12/ (props changed) Modified: stable/11/usr.sbin/pw/pw_user.c ============================================================================== --- stable/11/usr.sbin/pw/pw_user.c Sat Apr 25 21:45:31 2020 (r360325) +++ stable/11/usr.sbin/pw/pw_user.c Sat Apr 25 22:23:34 2020 (r360326) @@ -589,7 +589,7 @@ print_user(struct passwd * pwd, bool pretty, bool v7) } if (pwd->pw_expire > (time_t)0 && (tptr = localtime(&pwd->pw_expire)) != NULL) strftime(acexpire, sizeof acexpire, "%c", tptr); - if (pwd->pw_change > (time_t)0 && (tptr = localtime(&pwd->pw_change)) != NULL) + if (pwd->pw_change > (time_t)0 && (tptr = localtime(&pwd->pw_change)) != NULL) strftime(pwexpire, sizeof pwexpire, "%c", tptr); printf("Login Name: %-15s #%-12ju Group: %-15s #%ju\n" " Full Name: %s\n" From owner-svn-src-all@freebsd.org Sat Apr 25 22:23:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 167802C2B18; Sat, 25 Apr 2020 22:23:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498ltb6qk5z4dnD; Sat, 25 Apr 2020 22:23:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E584CED38; Sat, 25 Apr 2020 22:23:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PMNZ6M023600; Sat, 25 Apr 2020 22:23:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PMNZDs023599; Sat, 25 Apr 2020 22:23:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202004252223.03PMNZDs023599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Apr 2020 22:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r360326 - in stable: 10/usr.sbin/pw 11/usr.sbin/pw 12/usr.sbin/pw X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/usr.sbin/pw 11/usr.sbin/pw 12/usr.sbin/pw X-SVN-Commit-Revision: 360326 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 22:23:36 -0000 Author: dim Date: Sat Apr 25 22:23:34 2020 New Revision: 360326 URL: https://svnweb.freebsd.org/changeset/base/360326 Log: MFC r348282 (by lwhsu): Remove an uneeded indentation introduced in r286196 to silence gcc warnging Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/pw/pw_user.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/pw/pw_user.c stable/12/usr.sbin/pw/pw_user.c Directory Properties: stable/11/ (props changed) stable/12/ (props changed) Modified: stable/10/usr.sbin/pw/pw_user.c ============================================================================== --- stable/10/usr.sbin/pw/pw_user.c Sat Apr 25 21:45:31 2020 (r360325) +++ stable/10/usr.sbin/pw/pw_user.c Sat Apr 25 22:23:34 2020 (r360326) @@ -589,7 +589,7 @@ print_user(struct passwd * pwd, bool pretty, bool v7) } if (pwd->pw_expire > (time_t)0 && (tptr = localtime(&pwd->pw_expire)) != NULL) strftime(acexpire, sizeof acexpire, "%c", tptr); - if (pwd->pw_change > (time_t)0 && (tptr = localtime(&pwd->pw_change)) != NULL) + if (pwd->pw_change > (time_t)0 && (tptr = localtime(&pwd->pw_change)) != NULL) strftime(pwexpire, sizeof pwexpire, "%c", tptr); printf("Login Name: %-15s #%-12ju Group: %-15s #%ju\n" " Full Name: %s\n" From owner-svn-src-all@freebsd.org Sat Apr 25 23:35:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A851F2C472B; Sat, 25 Apr 2020 23:35:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498nTy42D9z3DqN; Sat, 25 Apr 2020 23:35:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CA9BFAF1; Sat, 25 Apr 2020 23:35:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PNZoVG067350; Sat, 25 Apr 2020 23:35:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PNZoUq067349; Sat, 25 Apr 2020 23:35:50 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202004252335.03PNZoUq067349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 25 Apr 2020 23:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r360327 - in stable: 11 12 X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable: 11 12 X-SVN-Commit-Revision: 360327 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 23:35:50 -0000 Author: delphij Date: Sat Apr 25 23:35:49 2020 New Revision: 360327 URL: https://svnweb.freebsd.org/changeset/base/360327 Log: MFC rr359961 (jkim): Do not attempt to remove backward compatibility timezones. Modified: stable/11/ObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/ObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Sat Apr 25 22:23:34 2020 (r360326) +++ stable/11/ObsoleteFiles.inc Sat Apr 25 23:35:49 2020 (r360327) @@ -2585,8 +2585,6 @@ OLD_FILES+=usr/lib32/libheimsqlite.a OLD_FILES+=usr/lib32/libheimsqlite.so OLD_LIBS+=usr/lib32/libheimsqlite.so.11 OLD_FILES+=usr/lib32/libheimsqlite_p.a -# 20150518: tzdata2015c update -OLD_FILES+=usr/share/zoneinfo/America/Montreal # 20150506 OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz # 20150504 @@ -3090,10 +3088,6 @@ OLD_FILES+=etc/rc.d/hv_kvpd OLD_LIBS+=usr/lib/libnv.so.0 # 20140829: rc.d/kerberos removed OLD_FILES+=etc/rc.d/kerberos -# 20140827: tzdata2014f import -OLD_FILES+=usr/share/zoneinfo/Asia/Chongqing -OLD_FILES+=usr/share/zoneinfo/Asia/Harbin -OLD_FILES+=usr/share/zoneinfo/Asia/Kashgar # 20140814: libopie version bump OLD_LIBS+=usr/lib/libopie.so.7 OLD_LIBS+=usr/lib32/libopie.so.7 @@ -3384,9 +3378,6 @@ OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz # 20131107: example files removed OLD_FILES+=usr/share/examples/libusb20/aux.c OLD_FILES+=usr/share/examples/libusb20/aux.h -# 20131105: tzdata 2013h import -OLD_FILES+=usr/share/zoneinfo/America/Shiprock -OLD_FILES+=usr/share/zoneinfo/Antarctica/South_Pole # 20131103: WITH_LIBICONV_COMPAT removal OLD_FILES+=usr/include/_libiconv_compat.h OLD_FILES+=usr/lib/libiconv.a @@ -4327,9 +4318,6 @@ OLD_FILES+=usr/share/man/man3/ascftime.3.gz OLD_FILES+=usr/share/man/man3/cfree.3.gz OLD_FILES+=usr/share/man/man3/cftime.3.gz OLD_FILES+=usr/share/man/man3/getpw.3.gz -# 20100801: tzdata2010k import -OLD_FILES+=usr/share/zoneinfo/Pacific/Ponape -OLD_FILES+=usr/share/zoneinfo/Pacific/Truk # 20100725: acpi_aiboost(4) removal. OLD_FILES+=usr/share/man/man4/acpi_aiboost.4.gz # 20100724: nfsclient/nfs_lock.h moved to nfs/nfs_lock.h @@ -5006,8 +4994,6 @@ OLD_FILES+=usr/include/pccard/cis.h OLD_DIRS+=usr/include/pccard # 20090203: adding_user.8 moved to adding_user.7 OLD_FILES+=usr/share/man/man8/adding_user.8.gz -# 20090122: tzdata2009a import -OLD_FILES+=usr/share/zoneinfo/Asia/Katmandu # 20090102: file 4.26 import OLD_FILES+=usr/share/misc/magic.mime OLD_FILES+=usr/share/misc/magic.mime.mgc @@ -5240,9 +5226,6 @@ OLD_FILES+=usr/sbin/pkg_check OLD_FILES+=usr/sbin/pkg_sign OLD_FILES+=usr/share/man/man1/pkg_check.1.gz OLD_FILES+=usr/share/man/man1/pkg_sign.1.gz -# 20080325: tzdata2008b import -OLD_FILES+=usr/share/zoneinfo/Asia/Calcutta -OLD_FILES+=usr/share/zoneinfo/Asia/Saigon # 20080314: stack_print(9) mlink fixed OLD_FILES+=usr/share/man/man9/stack_printf.9.gz # 20080312: libkse removal @@ -9261,19 +9244,6 @@ OLD_FILES+=usr/share/misc/nslookup.help OLD_FILES+=usr/share/sendmail/cf/feature/nodns.m4 OLD_FILES+=usr/share/syscons/keymaps/lat-amer.kbd OLD_FILES+=usr/share/vi/catalog/ru_SU.KOI8-R -OLD_FILES+=usr/share/zoneinfo/Africa/Timbuktu -OLD_FILES+=usr/share/zoneinfo/Africa/Asmera -OLD_FILES+=usr/share/zoneinfo/America/Buenos_Aires -OLD_FILES+=usr/share/zoneinfo/America/Cordoba -OLD_FILES+=usr/share/zoneinfo/America/Jujuy -OLD_FILES+=usr/share/zoneinfo/America/Catamarca -OLD_FILES+=usr/share/zoneinfo/America/Mendoza -OLD_FILES+=usr/share/zoneinfo/America/Indianapolis -OLD_FILES+=usr/share/zoneinfo/America/Louisville -OLD_FILES+=usr/share/zoneinfo/America/Argentina/ComodRivadavia -OLD_FILES+=usr/share/zoneinfo/Atlantic/Faeroe -OLD_FILES+=usr/share/zoneinfo/Europe/Belfast -OLD_FILES+=usr/share/zoneinfo/Pacific/Yap OLD_FILES+=usr/share/zoneinfo/SystemV/YST9 OLD_FILES+=usr/share/zoneinfo/SystemV/PST8 OLD_FILES+=usr/share/zoneinfo/SystemV/EST5EDT From owner-svn-src-all@freebsd.org Sat Apr 25 23:35:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F2222C4726; Sat, 25 Apr 2020 23:35:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498nTy0x2Vz3DqM; Sat, 25 Apr 2020 23:35:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A89DFAF0; Sat, 25 Apr 2020 23:35:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03PNZnWC067343; Sat, 25 Apr 2020 23:35:49 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03PNZnbo067342; Sat, 25 Apr 2020 23:35:49 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202004252335.03PNZnbo067342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 25 Apr 2020 23:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360327 - in stable: 11 12 X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable: 11 12 X-SVN-Commit-Revision: 360327 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 23:35:50 -0000 Author: delphij Date: Sat Apr 25 23:35:49 2020 New Revision: 360327 URL: https://svnweb.freebsd.org/changeset/base/360327 Log: MFC rr359961 (jkim): Do not attempt to remove backward compatibility timezones. Modified: stable/12/ObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/ObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/12/ObsoleteFiles.inc ============================================================================== --- stable/12/ObsoleteFiles.inc Sat Apr 25 22:23:34 2020 (r360326) +++ stable/12/ObsoleteFiles.inc Sat Apr 25 23:35:49 2020 (r360327) @@ -4366,8 +4366,6 @@ OLD_FILES+=usr/lib32/libheimsqlite.a OLD_FILES+=usr/lib32/libheimsqlite.so OLD_LIBS+=usr/lib32/libheimsqlite.so.11 OLD_FILES+=usr/lib32/libheimsqlite_p.a -# 20150518: tzdata2015c update -OLD_FILES+=usr/share/zoneinfo/America/Montreal # 20150506 OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz # 20150504 @@ -4871,10 +4869,6 @@ OLD_FILES+=etc/rc.d/hv_kvpd OLD_LIBS+=usr/lib/libnv.so.0 # 20140829: rc.d/kerberos removed OLD_FILES+=etc/rc.d/kerberos -# 20140827: tzdata2014f import -OLD_FILES+=usr/share/zoneinfo/Asia/Chongqing -OLD_FILES+=usr/share/zoneinfo/Asia/Harbin -OLD_FILES+=usr/share/zoneinfo/Asia/Kashgar # 20140814: libopie version bump OLD_LIBS+=usr/lib/libopie.so.7 OLD_LIBS+=usr/lib32/libopie.so.7 @@ -5165,9 +5159,6 @@ OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz # 20131107: example files removed OLD_FILES+=usr/share/examples/libusb20/aux.c OLD_FILES+=usr/share/examples/libusb20/aux.h -# 20131105: tzdata 2013h import -OLD_FILES+=usr/share/zoneinfo/America/Shiprock -OLD_FILES+=usr/share/zoneinfo/Antarctica/South_Pole # 20131103: WITH_LIBICONV_COMPAT removal OLD_FILES+=usr/include/_libiconv_compat.h OLD_FILES+=usr/lib/libiconv.a @@ -6106,9 +6097,6 @@ OLD_FILES+=usr/share/man/man3/ascftime.3.gz OLD_FILES+=usr/share/man/man3/cfree.3.gz OLD_FILES+=usr/share/man/man3/cftime.3.gz OLD_FILES+=usr/share/man/man3/getpw.3.gz -# 20100801: tzdata2010k import -OLD_FILES+=usr/share/zoneinfo/Pacific/Ponape -OLD_FILES+=usr/share/zoneinfo/Pacific/Truk # 20100725: acpi_aiboost(4) removal. OLD_FILES+=usr/share/man/man4/acpi_aiboost.4.gz # 20100724: nfsclient/nfs_lock.h moved to nfs/nfs_lock.h @@ -6785,8 +6773,6 @@ OLD_FILES+=usr/include/pccard/cis.h OLD_DIRS+=usr/include/pccard # 20090203: adding_user.8 moved to adding_user.7 OLD_FILES+=usr/share/man/man8/adding_user.8.gz -# 20090122: tzdata2009a import -OLD_FILES+=usr/share/zoneinfo/Asia/Katmandu # 20090102: file 4.26 import OLD_FILES+=usr/share/misc/magic.mime OLD_FILES+=usr/share/misc/magic.mime.mgc @@ -7019,9 +7005,6 @@ OLD_FILES+=usr/sbin/pkg_check OLD_FILES+=usr/sbin/pkg_sign OLD_FILES+=usr/share/man/man1/pkg_check.1.gz OLD_FILES+=usr/share/man/man1/pkg_sign.1.gz -# 20080325: tzdata2008b import -OLD_FILES+=usr/share/zoneinfo/Asia/Calcutta -OLD_FILES+=usr/share/zoneinfo/Asia/Saigon # 20080314: stack_print(9) mlink fixed OLD_FILES+=usr/share/man/man9/stack_printf.9.gz # 20080312: libkse removal @@ -11040,19 +11023,6 @@ OLD_FILES+=usr/share/misc/nslookup.help OLD_FILES+=usr/share/sendmail/cf/feature/nodns.m4 OLD_FILES+=usr/share/syscons/keymaps/lat-amer.kbd OLD_FILES+=usr/share/vi/catalog/ru_SU.KOI8-R -OLD_FILES+=usr/share/zoneinfo/Africa/Timbuktu -OLD_FILES+=usr/share/zoneinfo/Africa/Asmera -OLD_FILES+=usr/share/zoneinfo/America/Buenos_Aires -OLD_FILES+=usr/share/zoneinfo/America/Cordoba -OLD_FILES+=usr/share/zoneinfo/America/Jujuy -OLD_FILES+=usr/share/zoneinfo/America/Catamarca -OLD_FILES+=usr/share/zoneinfo/America/Mendoza -OLD_FILES+=usr/share/zoneinfo/America/Indianapolis -OLD_FILES+=usr/share/zoneinfo/America/Louisville -OLD_FILES+=usr/share/zoneinfo/America/Argentina/ComodRivadavia -OLD_FILES+=usr/share/zoneinfo/Atlantic/Faeroe -OLD_FILES+=usr/share/zoneinfo/Europe/Belfast -OLD_FILES+=usr/share/zoneinfo/Pacific/Yap OLD_FILES+=usr/share/zoneinfo/SystemV/YST9 OLD_FILES+=usr/share/zoneinfo/SystemV/PST8 OLD_FILES+=usr/share/zoneinfo/SystemV/EST5EDT