doc/website/static/security/patches/SA-04:11/msync5.patch
Sergio Carlavilla Delgado 989d921f5d Migrate doc to Hugo/AsciiDoctor
I'm very pleased to announce the release of
our new website and documentation using
the new toolchain with Hugo and AsciiDoctor.

To get more information about the new toolchain
please read the FreeBSD Documentation Project Primer[1],
Hugo docs[2] and AsciiDoctor docs[3].

Acknowledgment:
Benedict Reuschling <bcr@>
Glen Barber <gjb@>
Hiroki Sato <hrs@>
Li-Wen Hsu <lwhsu@>
Sean Chittenden <seanc@>
The FreeBSD Foundation

[1] https://docs.FreeBSD.org/en/books/fdp-primer/
[2] https://gohugo.io/documentation/
[3] https://docs.asciidoctor.org/home/

Approved by:    doceng, core
2021-01-26 00:31:29 +01:00

45 lines
1.6 KiB
Diff

Index: sys/ufs/ffs/ffs_vnops.c
===================================================================
RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_vnops.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- sys/ufs/ffs/ffs_vnops.c 7 Apr 2004 11:21:18 -0000 1.129
+++ sys/ufs/ffs/ffs_vnops.c 21 May 2004 12:05:48 -0000 1.130
@@ -662,6 +662,8 @@
vfs_bio_clrbuf(bp);
if (ioflag & IO_DIRECT)
bp->b_flags |= B_DIRECT;
+ if ((ioflag & (IO_SYNC|IO_INVAL)) == (IO_SYNC|IO_INVAL))
+ bp->b_flags |= B_NOCACHE;
if (uio->uio_offset + xfersize > ip->i_size) {
ip->i_size = uio->uio_offset + xfersize;
Index: sys/vm/vm_object.c
===================================================================
RCS file: /home/ncvs/src/sys/vm/vm_object.c,v
retrieving revision 1.323
retrieving revision 1.324
diff -u -r1.323 -r1.324
--- sys/vm/vm_object.c 6 Apr 2004 20:15:36 -0000 1.323
+++ sys/vm/vm_object.c 25 May 2004 18:40:53 -0000 1.324
@@ -104,6 +104,10 @@
SYSCTL_INT(_vm, OID_AUTO, msync_flush_flags,
CTLFLAG_RW, &msync_flush_flags, 0, "");
+static int old_msync;
+SYSCTL_INT(_vm, OID_AUTO, old_msync, CTLFLAG_RW, &old_msync, 0,
+ "Use old (insecure) msync behavior");
+
static void vm_object_qcollapse(vm_object_t object);
static int vm_object_page_collect_flush(vm_object_t object, vm_page_t p, int curgeneration, int pagerflags);
@@ -1034,7 +1038,7 @@
vm_object_page_remove(object,
OFF_TO_IDX(offset),
OFF_TO_IDX(offset + size + PAGE_MASK),
- FALSE);
+ old_msync ? FALSE : TRUE);
}
VM_OBJECT_UNLOCK(object);
}