diff --git a/.cirrus.yml b/.cirrus.yml index 8c8e574f4432..71bd02a2ca8c 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,14 +1,11 @@ # $FreeBSD$ -compute_engine_instance: - # Image list available via - # gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images - platform: freebsd - image_project: freebsd-org-cloud-dev - image: freebsd-13-0-release-amd64 +freebsd_instance: + # image: freebsd-12-1-stable-amd64 + # We need a newer image to install llvm11 + image_family: freebsd-12-1-snap cpu: 8 memory: 24G - disk: 40 env: CIRRUS_CLONE_DEPTH: 1 @@ -17,7 +14,7 @@ task: only_if: $CIRRUS_BRANCH != 'svn_head' timeout_in: 120m install_script: - - pkg install -y qemu uefi-edk2-qemu-x86_64 llvm11 + - pkg install -y qemu42 uefi-edk2-qemu-x86_64 llvm11 setup_user_script: - pw useradd user - mkdir -p /usr/obj/$(pwd -P) @@ -28,6 +25,3 @@ task: - su user -c "make CROSS_TOOLCHAIN=llvm11 WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages" test_script: - sh tools/boot/ci-qemu-test.sh - post_script: - - df -m - - du -m -s /usr/obj diff --git a/UPDATING b/UPDATING index 96f4876df622..0e6c4df32190 100644 --- a/UPDATING +++ b/UPDATING @@ -11,160 +11,6 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. -20220405: - 13.0-RELEASE-p11 FreeBSD-EN-22:15.pf - FreeBSD-SA-22:04.netmap - FreeBSD-SA-22:05.bhyve - FreeBSD-SA-22:06.ioctl - FreeBSD-SA-22:07.wifi_meshid - FreeBSD-SA-22:08.zlib - - pf(4) tables may fail to load [EN-22:15.pf] - - Potential jail escape vulnerabilities in netmap [SA-22:04.netmap] - - Bhyve e82545 device emulation out-of-bounds write [SA-22:05.bhyve] - - mpr/mps/mpt driver ioctl heap out-of-bounds write [SA-22:06.ioctl] - - 802.11 heap buffer overflow [SA-22:07.wifi_meshid] - - zlib compression out-of-bounds write [SA-22:08.zlib] - -20220322: - 13.0-RELEASE-p10 FreeBSD-EN-22:14.tzdata - - Timezone database information update. [EN-22:14.tzdata] - -20220321: - 13.0-RELEASE-p9 FreeBSD-EN-22:13.zfs - - Fix ZFS data loss [FreeBSD-EN-22:13.zfs] - -20220315: - 13.0-RELEASE-p8 FreeBSD-EN-22:10.zfs - FreeBSD-EN-22:11.zfs - FreeBSD-EN-22:12.zfs - FreeBSD-SA-22:02.wifi - FreeBSD-SA-22:03.openssl - - ZFS writes fail to update file size [FreeBSD-EN-22:10.zfs] - - ZFS lseek(2) inconsistencies [FreeBSD-EN-22:11.zfs] - - ZFS panic upon concurrent 'zfs list' calls [FreeBSD-EN-22:12.zfs] - - Multiple WiFi issues [FreeBSD-SA-22:02.wifi] - - OpenSSL certificate parsing infinite loop [FreeBSD-SA-22:03.openssl] - -20220201: - 13.0-RELEASE-p7 FreeBSD-EN-22:07.la57 - - Fix Intel CPU LA57 boot failure [EN-22:07.la57] - -20220111: - 13.0-RELEASE-p6 FreeBSD-EN-22:01.fsck_ffs - FreeBSD-EN-22:02.xsave - FreeBSD-EN-22:03.hyperv - FreeBSD-EN-22:05.tail - FreeBSD-EN-22:06.libalias - FreeBSD-SA-22:01.vt - - Fix fsck_ffs bad inode number errors [EN-22:01.fsck_ffs] - - Correct size of the amd64 SSE area in the xsave layout [FreeBSD-EN-22:02.xsave] - - Prepopulate Hyper-V PCI device bars [FreeBSD-EN-22:03.hyperv] - - Fix "tail -F" file rotation detection [FreeBSD-EN-22:05.tail] - - Fix fragmented UDP packets handling [FreeBSD-EN-22:06.libalias] - - Fix vt console buffer overflow [FreeBSD-SA-22:01.vt] - -20211103: - 13.0-RELEASE-p5 FreeBSD-EN-21:26.libevent - FreeBSD-EN-21:27.caroot - FreeBSD-EN-21:28.vmci - FreeBSD-EN-21:29.tzdata - - Fix libevent1 ABI breakage. [EN-21:26.libevent] - - Root certificate bundle update. [EN-21:27.caroot] - - Fix kernel panic in vmci driver initialization. [EN-21:28.vmci] - - Timezone database information update. [EN-21:29.tzdata] - -20210824: - 13.0-RELEASE-p4 FreeBSD-EN-21:23.virtio_blk - FreeBSD-EN-21:24.libcrypto - FreeBSD-EN-21:25.bhyve - FreeBSD-SA-21:13.bhyve - FreeBSD-SA-21:14.ggatec - FreeBSD-SA-21:15.libfetch - FreeBSD-SA-21:16.openssl - - Fix virtio_blk(4) failing to attach on some hypervisors. [EN-21:23.virtio_blk] - - Fix OpenSSL 1.1.1e API functions not being exported. [EN-21:24.libcrypto] - - Fix NVMe iovec construction for large IOs. [EN-21:25.bhyve] - - Fix missing error handling in bhyve(8) device models. [SA-21:13.bhyve] - - Fix remote code execution in ggatec(8). [SA-21:14.ggatec] - - Fix libfetch out of bounds read. [SA-21:15.libfetch] - - Fix multiple OpenSSL vulnerabilities. [SA-21:16.openssl] - -20210629: - 13.0-RELEASE-p3 FreeBSD-EN-21:18.libc++ - FreeBSD-EN-21:19.libcasper - FreeBSD-EN-21:20.vlan - FreeBSD-EN-21:21.ipfw - FreeBSD-EN-21:22.linux_futex - - Missing C++20 headers in libc++ [EN-21:18.libc++] - - libcasper assertion failure [EN-21:19.libcasper] - - Missing backwards compatibility in vlan(4) [EN-21:20.vlan] - - Kernel panic with ipfw link-layer filtering enabled [EN-21:21.ipfw] - - Linux compatibility layer futex(2) system call vulnerability [EN-21:22.linux_futex] - -20210601: - 13.0-RELEASE-p2 FreeBSD-EN-21:17.libradius - - Incorrect validation in rad_get_attr(3) [FreeBSD-EN-21:17.libradius] - -20210526: - 13.0-RELEASE-p1 FreeBSD-EN-21:12.divert - FreeBSD-EN-21:13.mpt - FreeBSD-EN-21:14.pms - FreeBSD-EN-21:15.virtio - FreeBSD-EN-21:16.bc - FreeBSD-SA-21:11.smap - FreeBSD-SA-21:12.libradius - - Kernel double free when transmitting on a divert socket [FreeBSD-EN-21:12.divert] - - mpt(4) I/O errors with a large maxphys value [FreeBSD-EN-21:13.mpt] - - pms(4) data corruption [FreeBSD-EN-21:14.pms] - - virtio(4) device probing fails [FreeBSD-EN-21:15.virtio] - - dc update [FreeBSD-EN-21:16.bc] - - SMAP bypass [FreeBSD-SA-21:11.smap] - - Missing message validation in libradius(3) [FreeBSD-SA-21:12.libradius] - 20210413: 13.0-RELEASE. diff --git a/contrib/tzdata/SECURITY b/contrib/tzdata/SECURITY deleted file mode 100644 index 40128bc86dd2..000000000000 --- a/contrib/tzdata/SECURITY +++ /dev/null @@ -1,15 +0,0 @@ -Please report any sensitive security-related bugs via email to the -tzdb designated coordinators, currently Paul Eggert - and Tim Parenti . -Put "tzdb security" at the start of your email's subject line. -We prefer communications to be in English. - -You should receive a response within a week. If not, please follow up -via email to make sure we received your original message. - -If we confirm the bug, we plan to notify affected third-party services -or software that we know about, prepare an advisory, commit fixes to -the main development branch as quickly as is practical, and finally -publish the advisory on tz@iana.org. As with all tzdb contributions, -we give credit to security contributors unless they wish to remain -anonymous. diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index b8354e1b6f2d..9ae998942a12 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -11,9 +11,7 @@ PACKAGE= clibs MK_PIE= no # Always position independent using local rules MK_SSP= no -.if !defined(NEED_COMPAT) CONFS= libmap.conf -.endif PROG?= ld-elf.so.1 .if (${PROG:M*ld-elf32*} != "") TAGS+= lib32 diff --git a/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem b/secure/caroot/trusted/Camerfirma_Chambers_of_Commerce_Root.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem b/secure/caroot/trusted/Camerfirma_Global_Chambersign_Root.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/Certum_Root_CA.pem b/secure/caroot/trusted/Certum_Root_CA.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem b/secure/caroot/trusted/Chambers_of_Commerce_Root_-_2008.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem b/secure/caroot/trusted/D-TRUST_Root_CA_3_2013.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/EC-ACC.pem b/secure/caroot/trusted/EC-ACC.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem b/secure/caroot/trusted/GeoTrust_Primary_Certification_Authority_-_G2.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem b/secure/caroot/trusted/Global_Chambersign_Root_-_2008.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/OISTE_WISeKey_Global_Root_GA_CA.pem b/secure/caroot/trusted/OISTE_WISeKey_Global_Root_GA_CA.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/QuoVadis_Root_CA.pem b/secure/caroot/trusted/QuoVadis_Root_CA.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/Sonera_Class_2_Root_CA.pem b/secure/caroot/trusted/Sonera_Class_2_Root_CA.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/Staat_der_Nederlanden_Root_CA_-_G3.pem b/secure/caroot/trusted/Staat_der_Nederlanden_Root_CA_-_G3.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/SwissSign_Platinum_CA_-_G2.pem b/secure/caroot/trusted/SwissSign_Platinum_CA_-_G2.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem b/secure/caroot/trusted/Symantec_Class_1_Public_Primary_Certification_Authority_-_G6.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem b/secure/caroot/trusted/Symantec_Class_2_Public_Primary_Certification_Authority_-_G6.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/Trustis_FPS_Root_CA.pem b/secure/caroot/trusted/Trustis_FPS_Root_CA.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/VeriSign_Universal_Root_Certification_Authority.pem b/secure/caroot/trusted/VeriSign_Universal_Root_Certification_Authority.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem b/secure/caroot/trusted/Verisign_Class_1_Public_Primary_Certification_Authority_-_G3.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/secure/caroot/trusted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem b/secure/caroot/trusted/Verisign_Class_2_Public_Primary_Certification_Authority_-_G3.pem new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 631191479d6a..306e11fda092 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -54,7 +54,7 @@ TYPE="FreeBSD" REVISION="13.0" -BRANCH="RELEASE-p11" +BRANCH="RELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi diff --git a/sys/contrib/openzfs/configure.ac b/sys/contrib/openzfs/configure.ac index 0134cc47e314..4520a290a9a5 100644 --- a/sys/contrib/openzfs/configure.ac +++ b/sys/contrib/openzfs/configure.ac @@ -223,7 +223,6 @@ AC_CONFIG_FILES([ tests/zfs-tests/cmd/mktree/Makefile tests/zfs-tests/cmd/mmap_exec/Makefile tests/zfs-tests/cmd/mmap_libaio/Makefile - tests/zfs-tests/cmd/mmap_seek/Makefile tests/zfs-tests/cmd/mmapwrite/Makefile tests/zfs-tests/cmd/nvlist_to_lua/Makefile tests/zfs-tests/cmd/randfree_file/Makefile diff --git a/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h b/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h index aa6efaf53337..570c0fc2c60a 100644 --- a/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h +++ b/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h @@ -117,7 +117,7 @@ extern minor_t zfsdev_minor_alloc(void); #define Z_ISLNK(type) ((type) == VLNK) #define Z_ISDIR(type) ((type) == VDIR) -#define zn_has_cached_data(zp) vn_has_cached_data(ZTOV(zp)) +#define zn_has_cached_data(zp) vn_has_cached_data(ZTOV(zp)) #define zn_flush_cached_data(zp, sync) vn_flush_cached_data(ZTOV(zp), sync) #define zn_rlimit_fsize(zp, uio, td) vn_rlimit_fsize(ZTOV(zp), (uio), (td)) diff --git a/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h b/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h index c22a599bfe42..0b1d455a94df 100644 --- a/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h +++ b/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h @@ -70,7 +70,6 @@ extern "C" { #define Z_ISDEV(type) (S_ISCHR(type) || S_ISBLK(type) || S_ISFIFO(type)) #define Z_ISDIR(type) S_ISDIR(type) -#define zn_has_cached_data(zp) ((zp)->z_is_mapped) #define zn_flush_cached_data(zp, sync) write_inode_now(ZTOI(zp), sync) #define zn_rlimit_fsize(zp, uio, td) (0) diff --git a/sys/contrib/openzfs/tests/runfiles/common.run b/sys/contrib/openzfs/tests/runfiles/common.run index 71ca15c179b0..290b9ffba65c 100644 --- a/sys/contrib/openzfs/tests/runfiles/common.run +++ b/sys/contrib/openzfs/tests/runfiles/common.run @@ -650,7 +650,7 @@ tests = ['migration_001_pos', 'migration_002_pos', 'migration_003_pos', tags = ['functional', 'migration'] [tests/functional/mmap] -tests = ['mmap_write_001_pos', 'mmap_read_001_pos', 'mmap_seek_001_pos'] +tests = ['mmap_write_001_pos', 'mmap_read_001_pos'] tags = ['functional', 'mmap'] [tests/functional/mount] diff --git a/sys/contrib/openzfs/tests/zfs-tests/cmd/Makefile.am b/sys/contrib/openzfs/tests/zfs-tests/cmd/Makefile.am index 5efc896bf639..7fe9a2c571f8 100644 --- a/sys/contrib/openzfs/tests/zfs-tests/cmd/Makefile.am +++ b/sys/contrib/openzfs/tests/zfs-tests/cmd/Makefile.am @@ -19,7 +19,6 @@ SUBDIRS = \ mktree \ mmap_exec \ mmap_libaio \ - mmap_seek \ mmapwrite \ nvlist_to_lua \ randwritecomp \ diff --git a/sys/contrib/openzfs/tests/zfs-tests/include/commands.cfg b/sys/contrib/openzfs/tests/zfs-tests/include/commands.cfg index e8134b37eb35..299653547759 100644 --- a/sys/contrib/openzfs/tests/zfs-tests/include/commands.cfg +++ b/sys/contrib/openzfs/tests/zfs-tests/include/commands.cfg @@ -210,7 +210,6 @@ export ZFSTEST_FILES='badsend mktree mmap_exec mmap_libaio - mmap_seek mmapwrite nvlist_to_lua randfree_file diff --git a/sys/contrib/openzfs/tests/zfs-tests/include/tunables.cfg b/sys/contrib/openzfs/tests/zfs-tests/include/tunables.cfg index 738a6ffe28fc..e93e299ea25a 100644 --- a/sys/contrib/openzfs/tests/zfs-tests/include/tunables.cfg +++ b/sys/contrib/openzfs/tests/zfs-tests/include/tunables.cfg @@ -32,7 +32,6 @@ DEADMAN_FAILMODE deadman_failmode zfs_deadman_failmode DEADMAN_SYNCTIME_MS deadman_synctime_ms zfs_deadman_synctime_ms DEADMAN_ZIOTIME_MS deadman_ziotime_ms zfs_deadman_ziotime_ms DISABLE_IVSET_GUID_CHECK disable_ivset_guid_check zfs_disable_ivset_guid_check -DMU_OFFSET_NEXT_SYNC dmu_offset_next_sync zfs_dmu_offset_next_sync INITIALIZE_CHUNK_SIZE initialize_chunk_size zfs_initialize_chunk_size INITIALIZE_VALUE initialize_value zfs_initialize_value KEEP_LOG_SPACEMAPS_AT_EXPORT keep_log_spacemaps_at_export zfs_keep_log_spacemaps_at_export diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmap/Makefile.am b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmap/Makefile.am index b26791ee7ce0..2adc398b8c09 100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmap/Makefile.am +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmap/Makefile.am @@ -4,8 +4,7 @@ dist_pkgdata_SCRIPTS = \ cleanup.ksh \ mmap_read_001_pos.ksh \ mmap_write_001_pos.ksh \ - mmap_libaio_001_pos.ksh \ - mmap_seek_001_pos.ksh + mmap_libaio_001_pos.ksh dist_pkgdata_DATA = \ mmap.cfg diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmap/mmap_seek_001_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmap/mmap_seek_001_pos.ksh deleted file mode 100755 index 6188549ad8d2..000000000000 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/mmap/mmap_seek_001_pos.ksh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/ksh -p -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright (c) 2021 by Lawrence Livermore National Security, LLC. -# - -. $STF_SUITE/include/libtest.shlib -. $STF_SUITE/tests/functional/mmap/mmap.cfg - -# -# DESCRIPTION: -# lseek() data/holes for an mmap()'d file. -# -# STRATEGY: -# 1. Enable compression and hole reporting for dirty files. -# 2. Call mmap_seek binary test case for various record sizes. -# - -verify_runnable "global" - -function cleanup -{ - log_must zfs set compression=off $TESTPOOL/$TESTFS - log_must zfs set recordsize=128k $TESTPOOL/$TESTFS - log_must rm -f $TESTDIR/test-mmap-file - log_must set_tunable64 DMU_OFFSET_NEXT_SYNC $dmu_offset_next_sync -} - -log_assert "lseek() data/holes for an mmap()'d file." - -log_onexit cleanup - -# Enable hole reporting for dirty files. -typeset dmu_offset_next_sync=$(get_tunable DMU_OFFSET_NEXT_SYNC) -log_must set_tunable64 DMU_OFFSET_NEXT_SYNC 1 - -# Compression must be enabled to convert zero'd blocks to holes. -# This behavior is checked by the mmap_seek test. -log_must zfs set compression=on $TESTPOOL/$TESTFS - -for bs in 4096 8192 16384 32768 65536 131072; do - log_must zfs set recordsize=$bs $TESTPOOL/$TESTFS - log_must mmap_seek $TESTDIR/test-mmap-file $((1024*1024)) $bs - log_must rm $TESTDIR/test-mmap-file -done - -log_pass "lseek() data/holes for an mmap()'d file succeeded." diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 419518eb1224..2fef9ac0084a 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1591,7 +1591,7 @@ setmlme_assoc_adhoc(struct ieee80211vap *vap, ("expected opmode IBSS or AHDEMO not %s", ieee80211_opmode_name[vap->iv_opmode])); - if (ssid_len == 0 || ssid_len > IEEE80211_NWID_LEN) + if (ssid_len == 0) return EINVAL; sr = IEEE80211_MALLOC(sizeof(*sr), M_TEMP, diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 423d701743bc..64a0164aeb81 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1132,7 +1132,7 @@ ieee80211_ies_expand(struct ieee80211_ies *ies) ie = ies->data; ielen = ies->len; - while (ielen > 1) { + while (ielen > 0) { switch (ie[0]) { case IEEE80211_ELEMID_VENDOR: if (iswpaoui(ie)) diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index 0f528f6567ee..425d24325782 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -1514,6 +1514,10 @@ cpustop_handler_post(u_int cpu) CPU_CLR_ATOMIC(cpu, &started_cpus); CPU_CLR_ATOMIC(cpu, &stopped_cpus); +#ifdef __i386__ + sched_pin(); +#endif + /* * We don't broadcast TLB invalidations to other CPUs when they are * stopped. Hence, we clear the TLB before resuming. diff --git a/tests/zfs-tests/cmd/mmap_seek/.gitignore b/tests/zfs-tests/cmd/mmap_seek/.gitignore deleted file mode 100644 index 6b05a7917500..000000000000 --- a/tests/zfs-tests/cmd/mmap_seek/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/mmap_seek diff --git a/tests/zfs-tests/cmd/mmap_seek/Makefile.am b/tests/zfs-tests/cmd/mmap_seek/Makefile.am deleted file mode 100644 index b938931125f5..000000000000 --- a/tests/zfs-tests/cmd/mmap_seek/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -include $(top_srcdir)/config/Rules.am - -pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/bin - -pkgexec_PROGRAMS = mmap_seek -mmap_seek_SOURCES = mmap_seek.c diff --git a/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c b/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c deleted file mode 100644 index f476e1dba9a4..000000000000 --- a/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2021 by Lawrence Livermore National Security, LLC. - */ - -#include -#include -#include -#include -#include -#include -#include - -static void -seek_data(int fd, off_t offset, off_t expected) -{ - off_t data_offset = lseek(fd, offset, SEEK_DATA); - if (data_offset != expected) { - fprintf(stderr, "lseek(fd, %d, SEEK_DATA) = %d (expected %d)\n", - (int)offset, (int)data_offset, (int)expected); - exit(2); - } -} - -static void -seek_hole(int fd, off_t offset, off_t expected) -{ - off_t hole_offset = lseek(fd, offset, SEEK_HOLE); - if (hole_offset != expected) { - fprintf(stderr, "lseek(fd, %d, SEEK_HOLE) = %d (expected %d)\n", - (int)offset, (int)hole_offset, (int)expected); - exit(2); - } -} - -int -main(int argc, char **argv) -{ - char *execname = argv[0]; - char *file_path = argv[1]; - char *buf = NULL; - int err; - - if (argc != 4) { - (void) printf("usage: %s " - "\n", argv[0]); - exit(1); - } - - int fd = open(file_path, O_RDWR | O_CREAT, 0666); - if (fd == -1) { - (void) fprintf(stderr, "%s: %s: ", execname, file_path); - perror("open"); - exit(2); - } - - off_t file_size = atoi(argv[2]); - off_t block_size = atoi(argv[3]); - - if (block_size * 2 > file_size) { - (void) fprintf(stderr, "file size must be at least " - "double the block size\n"); - exit(2); - } - - err = ftruncate(fd, file_size); - if (err == -1) { - perror("ftruncate"); - exit(2); - } - - if ((buf = mmap(NULL, file_size, PROT_READ | PROT_WRITE, - MAP_SHARED, fd, 0)) == MAP_FAILED) { - perror("mmap"); - exit(2); - } - - /* Verify the file is sparse and reports no data. */ - seek_data(fd, 0, -1); - - /* Verify the file is reported as a hole. */ - seek_hole(fd, 0, 0); - - /* Verify search beyond end of file is an error. */ - seek_data(fd, 2 * file_size, -1); - seek_hole(fd, 2 * file_size, -1); - - /* Dirty the first byte. */ - memset(buf, 'a', 1); - seek_data(fd, 0, 0); - seek_data(fd, block_size, -1); - seek_hole(fd, 0, block_size); - seek_hole(fd, block_size, block_size); - - /* Dirty the first half of the file. */ - memset(buf, 'b', file_size / 2); - seek_data(fd, 0, 0); - seek_data(fd, block_size, block_size); - seek_hole(fd, 0, P2ROUNDUP(file_size / 2, block_size)); - seek_hole(fd, block_size, P2ROUNDUP(file_size / 2, block_size)); - - /* Dirty the whole file. */ - memset(buf, 'c', file_size); - seek_data(fd, 0, 0); - seek_data(fd, file_size * 3 / 4, - P2ROUNDUP(file_size * 3 / 4, block_size)); - seek_hole(fd, 0, file_size); - seek_hole(fd, file_size / 2, file_size); - - /* Punch a hole (required compression be enabled). */ - memset(buf + block_size, 0, block_size); - seek_data(fd, 0, 0); - seek_data(fd, block_size, 2 * block_size); - seek_hole(fd, 0, block_size); - seek_hole(fd, block_size, block_size); - seek_hole(fd, 2 * block_size, file_size); - - err = munmap(buf, file_size); - if (err == -1) { - perror("munmap"); - exit(2); - } - - close(fd); - - return (0); -}