From c2d6ecfaa721cb1baa5b910db1e722ef4132ba9e Mon Sep 17 00:00:00 2001 From: glebius Date: Wed, 4 Nov 2015 11:27:21 +0000 Subject: [PATCH] o Fix regressions related to SA-15:25 upgrade of NTP. [1] o Fix kqueue write events never fired for files greater 2GB. [2] o Fix kpplications exiting due to segmentation violation on a correct memory address. [3] PR: 204046 [1] PR: 204203 [1] Errata Notice: FreeBSD-EN-15:19.kqueue [2] Errata Notice: FreeBSD-EN-15:20.vm [3] Approved by: so git-svn-id: svn://svn.freebsd.org/base/releng/10.1@290362 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- UPDATING | 12 ++++++++++++ sys/conf/newvers.sh | 2 +- sys/sys/vnode.h | 5 +++-- sys/vm/vm_map.c | 14 ++++---------- usr.sbin/ntp/config.h | 2 +- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/UPDATING b/UPDATING index 66f4c1617..0811ee13e 100644 --- a/UPDATING +++ b/UPDATING @@ -16,6 +16,18 @@ from older versions of FreeBSD, try WITHOUT_CLANG to bootstrap to the tip of stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20151104 p24 FreeBSD-SA-15:25.ntp [revised] + FreeBSD-EN-15:19.kqueue + FreeBSD-EN-15:20.vm + + Fix regression in ntpd(8) lacking support for RAWDCF reference + clock in 10.1-RELEASE-p23. [SA-15:25.ntp] + + Fix kqueue write events never fired for files greater 2GB. [EN-15:19] + + Fix applications exiting due to segmentation violation on a correct + memory address. [EN-15:20] + 20151026: p23 FreeBSD-SA-15:25.ntp Fix multiple NTP vulnerabilities. New NTP version is 4.2.8p4. diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index bfc89c341..56fabc3ad 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="RELEASE-p23" +BRANCH="RELEASE-p24" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index acddfc089..9c3f4ec19 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -781,7 +781,8 @@ void vop_rename_fail(struct vop_rename_args *ap); #define VOP_WRITE_PRE(ap) \ struct vattr va; \ - int error, osize, ooffset, noffset; \ + int error; \ + off_t osize, ooffset, noffset; \ \ osize = ooffset = noffset = 0; \ if (!VN_KNLIST_EMPTY((ap)->a_vp)) { \ @@ -789,7 +790,7 @@ void vop_rename_fail(struct vop_rename_args *ap); if (error) \ return (error); \ ooffset = (ap)->a_uio->uio_offset; \ - osize = va.va_size; \ + osize = (off_t)va.va_size; \ } #define VOP_WRITE_POST(ap, ret) \ diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index a63713d2f..46b16a76c 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -3976,12 +3976,10 @@ RetryLookup:; vm_map_unlock_read(map); return (KERN_PROTECTION_FAILURE); } - if ((entry->eflags & MAP_ENTRY_USER_WIRED) && - (entry->eflags & MAP_ENTRY_COW) && - (fault_type & VM_PROT_WRITE)) { - vm_map_unlock_read(map); - return (KERN_PROTECTION_FAILURE); - } + KASSERT((prot & VM_PROT_WRITE) == 0 || (entry->eflags & + (MAP_ENTRY_USER_WIRED | MAP_ENTRY_NEEDS_COPY)) != + (MAP_ENTRY_USER_WIRED | MAP_ENTRY_NEEDS_COPY), + ("entry %p flags %x", entry, entry->eflags)); if ((fault_typea & VM_PROT_COPY) != 0 && (entry->max_protection & VM_PROT_WRITE) == 0 && (entry->eflags & MAP_ENTRY_COW) == 0) { @@ -4135,10 +4133,6 @@ vm_map_lookup_locked(vm_map_t *var_map, /* IN/OUT */ fault_type &= VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE; if ((fault_type & prot) != fault_type) return (KERN_PROTECTION_FAILURE); - if ((entry->eflags & MAP_ENTRY_USER_WIRED) && - (entry->eflags & MAP_ENTRY_COW) && - (fault_type & VM_PROT_WRITE)) - return (KERN_PROTECTION_FAILURE); /* * If this page is not pageable, we have to get it for all possible diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h index 329b26d1e..ef4717ff2 100644 --- a/usr.sbin/ntp/config.h +++ b/usr.sbin/ntp/config.h @@ -120,7 +120,7 @@ #define CLOCK_PST 1 /* DCF77 raw time code */ -/* #undef CLOCK_RAWDCF */ +#define CLOCK_RAWDCF 1 /* RCC 8000 clock */ /* #undef CLOCK_RCC8000 */ -- 2.42.0