OpenBSD CVS

CVS log for src/sys/uvm/uvm_io.c


[BACK] Up to [local] / src / sys / uvm

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.30 / (download) - annotate - [select for diffs], Fri Oct 7 14:59:39 2022 UTC (20 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Add mimmutable(2) system call which locks the permissions (PROT_*) of
memory mappings so they cannot be changed by a later mmap(), mprotect(),
or munmap(), which will error with EPERM instead.
ok kettenis

Revision 1.29 / (download) - annotate - [select for diffs], Sat Mar 12 08:11:07 2022 UTC (2 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.28: +0 -2 lines
Diff to previous 1.28 (colored)

Revert holding a read lock on the map while copying out data during sysctl(2).

This introduced a lock ordering issue reported by naddy@, anton@ and syzkaller.

Reported-by: syzbot+739bb901045d9b193bde@syzkaller.appspotmail.com

Revision 1.28 / (download) - annotate - [select for diffs], Fri Mar 11 19:24:19 2022 UTC (2 years, 3 months ago) by kettenis
Branch: MAIN
Changes since 1.27: +3 -1 lines
Diff to previous 1.27 (colored)

Hold a read lock on the map while copying out data during a sysctl(2) call
to prevent another thread from unmapping the memory and triggering
an assertion or even corrupting random physical memory pages.

This fix is similar to the change in uvm_glue.c rev. 1.74.  However in this
case we need to be careful since some sysctl(2) calls look at the map of
the current process.  In those cases we must not attempt to lock the map
again.

ok mpi@

Should fix:
Reported-by: syzbot+be89fe83d6c004fcb412@syzkaller.appspotmail.com

Revision 1.27 / (download) - annotate - [select for diffs], Sat Mar 20 10:24:21 2021 UTC (3 years, 2 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.26: +15 -9 lines
Diff to previous 1.26 (colored)

Sync some comments in order to reduce the difference with NetBSD.

No functionnal change.

ok kettenis@

Revision 1.26 / (download) - annotate - [select for diffs], Sat Jan 9 11:34:27 2016 UTC (8 years, 5 months ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

Use uiomove(9) instead of uiomovei(9).  From Martin Natano.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Mar 14 03:38:53 2015 UTC (9 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.24: +1 -2 lines
Diff to previous 1.24 (colored)

Remove some includes include-what-you-use claims don't
have any direct symbols used.  Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@

Revision 1.24 / (download) - annotate - [select for diffs], Tue Feb 10 21:56:10 2015 UTC (9 years, 4 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

First step towards making uiomove() take a size_t size argument:
- rename uiomove() to uiomovei() and update all its users.
- introduce uiomove(), which is similar to uiomovei() but with a size_t.
- rewrite uiomovei() as an uiomove() wrapper.
ok kettenis@

Revision 1.23 / (download) - annotate - [select for diffs], Sun Sep 14 14:17:27 2014 UTC (9 years, 8 months ago) by jsg
Branch: MAIN
Changes since 1.22: +1 -2 lines
Diff to previous 1.22 (colored)

remove uneeded proc.h includes
ok mpi@ kspillner@

Revision 1.22 / (download) - annotate - [select for diffs], Fri Jul 11 16:35:40 2014 UTC (9 years, 11 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.21: +1 -8 lines
Diff to previous 1.21 (colored)

Chuck Cranor rescinded clauses in his license
on the 2nd of February 2011 in NetBSD.

http://marc.info/?l=netbsd-source-changes&m=129658899212732&w=2
http://marc.info/?l=netbsd-source-changes&m=129659095515558&w=2
http://marc.info/?l=netbsd-source-changes&m=129659157916514&w=2
http://marc.info/?l=netbsd-source-changes&m=129665962324372&w=2
http://marc.info/?l=netbsd-source-changes&m=129666033625342&w=2
http://marc.info/?l=netbsd-source-changes&m=129666052825545&w=2
http://marc.info/?l=netbsd-source-changes&m=129666922906480&w=2
http://marc.info/?l=netbsd-source-changes&m=129667725518082&w=2

Revision 1.21 / (download) - annotate - [select for diffs], Sun Apr 13 23:14:15 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.20: +5 -24 lines
Diff to previous 1.20 (colored)

compress code by turning four line comments into one line comments.
emphatic ok usual suspects, grudging ok miod

Revision 1.20 / (download) - annotate - [select for diffs], Fri Mar 9 13:01:29 2012 UTC (12 years, 3 months ago) by ariane
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.19: +7 -8 lines
Diff to previous 1.19 (colored)

New vmmap implementation.

no oks (it is really a pain to review properly)
extensively tested, I'm confident it'll be stable
'now is the time' from several icb inhabitants

Diff provides:
- ability to specify different allocators for different regions/maps
- a simpler implementation of the current allocator
- currently in compatibility mode: it will generate similar addresses
  as the old allocator

Revision 1.19 / (download) - annotate - [select for diffs], Mon Jun 6 17:10:23 2011 UTC (13 years ago) by ariane
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.18: +8 -7 lines
Diff to previous 1.18 (colored)

Backout vmmap in order to repair virtual address selection algorithms
outside the tree.

Revision 1.18 / (download) - annotate - [select for diffs], Tue May 24 15:27:36 2011 UTC (13 years ago) by ariane
Branch: MAIN
Changes since 1.17: +7 -8 lines
Diff to previous 1.17 (colored)

Reimplement uvm/uvm_map.

vmmap is designed to perform address space randomized allocations,
without letting fragmentation of the address space go through the roof.

Some highlights:
- kernel address space randomization
- proper implementation of guardpages
- roughly 10% system time reduction during kernel build

Tested by alot of people on tech@ and developers.
Theo's machines are still happy.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Jul 25 12:55:40 2009 UTC (14 years, 10 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

Add an extra argument to uvm_unmap_remove(), for the caller to tell it
whether removing holes or parts of them is allowed or not.
Only allow hole removal in uvmspace_free(), when tearing the vmspace down.

ok art@

Revision 1.16 / (download) - annotate - [select for diffs], Fri Nov 4 21:48:07 2005 UTC (18 years, 7 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.15: +8 -7 lines
Diff to previous 1.15 (colored)

Add an extra flags argument to uvm_io(), to specify whether we want to fix
the protection of the memory mapping we're doing I/O on, or if we want to
leave them as they are. This should only be necessary for breakpoint
insertion in code, so we'll only use it for ptrace requests.

Initially from art@ after discussion with kettenis@ millert@ and I,
tested by many.

Revision 1.15 / (download) - annotate - [select for diffs], Tue May 24 21:11:47 2005 UTC (19 years ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

add a new field to vm_space and use it to track the number of anon
pages a process uses.  this is now the userland "data size" value.
ok art deraadt tdeval.  thanks testers.

Revision 1.3.4.7 / (download) - annotate - [select for diffs], Fri Mar 28 00:08:48 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.3.4.6: +1 -1 lines
Diff to previous 1.3.4.6 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Sync the SMP branch with 3.3

Revision 1.12.2.2 / (download) - annotate - [select for diffs], Mon Nov 4 20:11:00 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.12.2.1: +1 -7 lines
Diff to previous 1.12.2.1 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

Some minor cleanups to reduce diff to netbsd.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Oct 29 18:30:21 2002 UTC (21 years, 7 months ago) by art
Branch: MAIN
CVS Tags: UBC_SYNC_A, SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Since memory deallocation can't fail, remove the error return from
uvm_unmap, uvm_deallocate and a few other functions.
Simplifies some code and reduces diff to the UBC branch.

Revision 1.3.4.6 / (download) - annotate - [select for diffs], Wed Mar 6 02:17:14 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.3.4.5: +6 -5 lines
Diff to previous 1.3.4.5 (colored) to branchpoint 1.3 (colored)

Merge in trunk

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Sat Feb 2 03:28:26 2002 UTC (22 years, 4 months ago) by art
Branch: UBC
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Merge in UBC performance changes from NetBSD.
Fix a bunch of merge errors from yesterday.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Dec 19 08:58:07 2001 UTC (22 years, 5 months ago) by art
Branch: MAIN
CVS Tags: UBC_SYNC_B, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.12: +7 -6 lines
Diff to previous 1.12 (colored)

UBC was a disaster. It worked very good when it worked, but on some
machines or some configurations or in some phase of the moon (we actually
don't know when or why) files disappeared. Since we've not been able to
track down the problem in two weeks intense debugging and we need -current
to be stable, back out everything to a state it had before UBC.

We apologise for the inconvenience.

Revision 1.3.4.5 / (download) - annotate - [select for diffs], Wed Dec 5 01:23:58 2001 UTC (22 years, 6 months ago) by niklas
Branch: SMP
Changes since 1.3.4.4: +5 -6 lines
Diff to previous 1.3.4.4 (colored) to branchpoint 1.3 (colored)

Merge in -current

Revision 1.12 / (download) - annotate - [select for diffs], Wed Nov 28 19:28:14 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored)

Sync in more uvm from NetBSD. Mostly just cosmetic stuff.
Contains also support for page coloring.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Nov 28 13:47:39 2001 UTC (22 years, 6 months ago) by art
Branch: MAIN
Changes since 1.10: +3 -4 lines
Diff to previous 1.10 (colored)

Sync in more uvm changes from NetBSD.
This time we're getting rid of KERN_* and VM_PAGER_* error codes and
use errnos instead.

Revision 1.3.4.4 / (download) - annotate - [select for diffs], Tue Nov 13 23:02:31 2001 UTC (22 years, 7 months ago) by niklas
Branch: SMP
Changes since 1.3.4.3: +1 -4 lines
Diff to previous 1.3.4.3 (colored) to branchpoint 1.3 (colored)

merge in -current

Revision 1.10 / (download) - annotate - [select for diffs], Tue Nov 6 01:35:04 2001 UTC (22 years, 7 months ago) by art
Branch: MAIN
Changes since 1.9: +2 -4 lines
Diff to previous 1.9 (colored)

Move the last content from vm/ to uvm/
The only thing left in vm/ are just dumb wrappers.
vm/vm.h includes uvm/uvm_extern.h
vm/pmap.h includes uvm/uvm_pmap.h
vm/vm_page.h includes uvm/uvm_page.h

Revision 1.9 / (download) - annotate - [select for diffs], Mon Nov 5 22:14:54 2001 UTC (22 years, 7 months ago) by art
Branch: MAIN
Changes since 1.8: +2 -3 lines
Diff to previous 1.8 (colored)

Minor sync to NetBSD.

Revision 1.3.4.3 / (download) - annotate - [select for diffs], Wed Oct 31 03:32:14 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.3.4.2: +9 -5 lines
Diff to previous 1.3.4.2 (colored) to branchpoint 1.3 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.8 / (download) - annotate - [select for diffs], Thu Sep 20 02:07:43 2001 UTC (22 years, 8 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.7: +8 -3 lines
Diff to previous 1.7 (colored)

Avoid leaking memory if uiomove fails.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Sep 19 20:50:59 2001 UTC (22 years, 8 months ago) by mickey
Branch: MAIN
Changes since 1.6: +1 -2 lines
Diff to previous 1.6 (colored)

merge vm/vm_kern.h into uvm/uvm_extern.h; art@ ok

Revision 1.6 / (download) - annotate - [select for diffs], Sat Aug 11 10:57:22 2001 UTC (22 years, 10 months ago) by art
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Various random fixes from NetBSD.
Including support for zeroing pages in the idle loop (not enabled yet).

Revision 1.3.4.2 / (download) - annotate - [select for diffs], Mon May 14 22:47:45 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.3.4.1: +1 -0 lines
Diff to previous 1.3.4.1 (colored) to branchpoint 1.3 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 29 02:07:45 2001 UTC (23 years, 4 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.4: +1 -0 lines
Diff to previous 1.4 (colored)

$OpenBSD$

Revision 1.3.4.1 / (download) - annotate - [select for diffs], Fri Mar 24 09:09:49 2000 UTC (24 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

Sync with -current

Revision 1.4 / (download) - annotate - [select for diffs], Wed Mar 15 15:50:20 2000 UTC (24 years, 3 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

Fix the NetBSD id strings.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Aug 23 08:13:23 1999 UTC (24 years, 9 months ago) by art
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6
Branch point for: SMP
Changes since 1.2: +0 -5 lines
Diff to previous 1.2 (colored)

sync with NetBSD from 1999.05.24 (there is a reason for this date)
 Mostly cleanups, but also a few improvements to pagedaemon for better
 handling of low memory and/or low swap conditions.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 26 05:32:07 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.1: +1 -0 lines
Diff to previous 1.1 (colored)

add OpenBSD tags

Revision 1.1 / (download) - annotate - [select for diffs], Fri Feb 26 01:30:13 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN

Import of uvm from NetBSD. Some local changes, some code disabled

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.