From 965c99339e9ab087babf41897a6e9a5e5dc8731d Mon Sep 17 00:00:00 2001 From: glebius Date: Wed, 4 Nov 2015 11:27:13 +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: https://svn.freebsd.org/base/releng/10.2@290361 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 533f2e0cf..93db34e8a 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 p7 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.2-RELEASE-p6. [SA-15:25] + + 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.vm] + 20151026: p6 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 331b9ea8b..ccc170d38 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.2" -BRANCH="RELEASE-p6" +BRANCH="RELEASE-p7" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index fe4c9eae8..b88ccc614 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -787,7 +787,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)) { \ @@ -795,7 +796,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 275036ab7..0a93d22bc 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -3988,12 +3988,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) { @@ -4147,10 +4145,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