freebsd-dev/sys/kern
Alan Cox a6d42a0d62 Replace VM_PROT_OVERRIDE_WRITE by VM_PROT_COPY. VM_PROT_OVERRIDE_WRITE has
represented a write access that is allowed to override write protection.
Until now, VM_PROT_OVERRIDE_WRITE has been used to write breakpoints into
text pages.  Text pages are not just write protected but they are also
copy-on-write.  VM_PROT_OVERRIDE_WRITE overrides the write protection on the
text page and triggers the replication of the page so that the breakpoint
will be written to a private copy.  However, here is where things become
confused.  It is the debugger, not the process being debugged that requires
write access to the copied page.  Nonetheless, the copied page is being
mapped into the process with write access enabled.  In other words, once the
debugger sets a breakpoint within a text page, the program can write to its
private copy of that text page.  Whereas prior to setting the breakpoint, a
SIGSEGV would have occurred upon a write access.  VM_PROT_COPY addresses
this problem.  The combination of VM_PROT_READ and VM_PROT_COPY forces the
replication of a copy-on-write page even though the access is only for read.
Moreover, the replicated page is only mapped into the process with read
access, and not write access.

Reviewed by:	kib
MFC after:	4 weeks
2009-11-26 05:16:07 +00:00
..
bus_if.m Add a facility for associating optional descriptions with active interrupt 2009-10-15 14:54:35 +00:00
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
imgact_aout.c
imgact_elf32.c
imgact_elf64.c
imgact_elf.c If ET_DYN binary has non-zero base address for some reason, honour it 2009-10-18 12:57:48 +00:00
imgact_gzip.c
imgact_shell.c
inflate.c
init_main.c Random number generator initialization cleanup: 2009-10-20 16:36:51 +00:00
init_sysent.c Regenerate 2009-10-27 11:01:15 +00:00
kern_acct.c Do not use casts (int *)0 and (struct thread *)0 for the arguments of 2009-06-16 15:13:45 +00:00
kern_alq.c Add another flags argument to vn_open_cred. Use it to specify that some 2009-06-21 13:41:32 +00:00
kern_clock.c Mark the clock sysctls as MPSAFE. 2009-05-18 12:03:43 +00:00
kern_condvar.c
kern_conf.c Extend the device pager to support different memory attributes on different 2009-08-28 14:06:55 +00:00
kern_cons.c Allow multiple console devices per driver without insane code duplication. 2009-08-24 10:53:30 +00:00
kern_context.c In r197963, a race with thread being selected for signal delivery 2009-10-27 10:47:58 +00:00
kern_cpu.c Provide a new CPU device driver ivar to report the nominal speed of the 2009-05-31 08:59:15 +00:00
kern_cpuset.c Another nit that both I and ispell missed. 2009-10-26 18:32:06 +00:00
kern_ctf.c
kern_descrip.c On the return path from F_RDAHEAD and F_READAHEAD fcntls, do not 2009-11-20 22:22:53 +00:00
kern_dtrace.c
kern_environment.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
kern_event.c Postpone dropping fp till both kq_global and kqueue mutexes are 2009-10-10 14:56:34 +00:00
kern_exec.c - Fix several off-by-one errors when using MAXCOMLEN. The p_comm[] and 2009-10-23 15:14:54 +00:00
kern_exit.c Refine r195509, instead of checking that vnode type is VBAD, that is 2009-10-10 21:17:30 +00:00
kern_fail.c fail(9) support: 2009-05-27 16:36:54 +00:00
kern_fork.c Reintroduce the r196640, after fixing the problem with my testing. 2009-09-01 11:41:51 +00:00
kern_idle.c Split P_NOLOAD into a per-thread flag (TDF_NOLOAD). 2009-11-03 16:46:52 +00:00
kern_intr.c Split P_NOLOAD into a per-thread flag (TDF_NOLOAD). 2009-11-03 16:46:52 +00:00
kern_jail.c Revert revision 199201 for now as it has introduced a kernel vulnerability 2009-11-12 19:02:10 +00:00
kern_kthread.c Reintroduce the r196640, after fixing the problem with my testing. 2009-09-01 11:41:51 +00:00
kern_ktr.c
kern_ktrace.c - Fix several off-by-one errors when using MAXCOMLEN. The p_comm[] and 2009-10-23 15:14:54 +00:00
kern_linker.c - Unbreak build with KLD_DEBUG defined 2009-11-17 21:56:12 +00:00
kern_lock.c Save the sack when doing a lockmgr_disown() call. 2009-11-06 22:33:03 +00:00
kern_lockf.c In lf_iteratelocks_vnode, increment state->ls_threads around iterating 2009-06-25 18:54:56 +00:00
kern_lockstat.c Add the OpenSolaris dtrace lockstat provider. The lockstat provider 2009-05-26 20:28:22 +00:00
kern_malloc.c If we're passed garbage in malloc_init(), panic() rather than expecting 2009-06-05 09:16:52 +00:00
kern_mbuf.c Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
kern_mib.c Add a new sysctl for reporting all of the supported page sizes. 2009-09-18 17:04:57 +00:00
kern_module.c
kern_mtxpool.c
kern_mutex.c Revert previous commit and add myself to the list of people who should 2009-09-08 13:19:05 +00:00
kern_ntptime.c
kern_osd.c Make the rmlock(9) interface a bit more like the rwlock(9) interface: 2009-05-29 10:52:37 +00:00
kern_physio.c
kern_pmc.c
kern_poll.c Rather than fix questionable ifnet list locking in the implementation of 2009-08-15 23:07:43 +00:00
kern_priv.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
kern_proc.c In fill_kinfo_thread, copy the thread's name into struct kinfo_proc even 2009-10-01 21:44:30 +00:00
kern_prot.c Remove the interim vimage containers, struct vimage and struct procg, 2009-07-17 14:48:21 +00:00
kern_resource.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
kern_rmlock.c Minor style tweak. 2009-05-29 14:25:51 +00:00
kern_rwlock.c When releasing a read/shared lock we need to use a write memory barrier 2009-09-30 13:26:31 +00:00
kern_sdt.c
kern_sema.c
kern_shutdown.c Don't bother copying the name of a kproc or kthread out into a temporary 2009-10-23 15:09:51 +00:00
kern_sig.c Among signal generation syscalls, only sigqueue(2) is allowed by POSIX 2009-11-17 11:39:15 +00:00
kern_subr.c Constify prime numbers. 2009-08-23 09:55:06 +00:00
kern_switch.c - Use DPCPU for SCHED_STATS. This is somewhat awkward because the 2009-06-25 01:33:51 +00:00
kern_sx.c When releasing a read/shared lock we need to use a write memory barrier 2009-09-30 13:26:31 +00:00
kern_synch.c Add new msleep(9) flag PBDY that shall be specified together with 2009-07-14 22:52:46 +00:00
kern_syscalls.c
kern_sysctl.c Make it possible to change the vnet sysctl variables on jails 2009-08-13 10:26:34 +00:00
kern_tc.c
kern_thr.c Currently, when signal is delivered to the process and there is a thread 2009-10-11 16:49:30 +00:00
kern_thread.c Inform hwpmc(4) of a thread's impending demise prior to invoking sched_throw(). 2009-10-25 04:34:47 +00:00
kern_time.c
kern_timeout.c Make sure callouts are not processed one tick late. 2009-09-12 21:44:34 +00:00
kern_umtx.c In function do_rw_wrlock, when a writer got an error and before returning, 2009-09-25 00:03:13 +00:00
kern_uuid.c Rework global locks for interface list and index management, correcting 2009-08-23 20:40:19 +00:00
kern_xxx.c Place hostnames and similar information fully under the prison system. 2009-05-29 21:27:12 +00:00
ksched.c
link_elf_obj.c Add macros VNET_SETNAME and VNET_SYMPREFIX, and expose to userspace if 2009-07-20 07:50:50 +00:00
link_elf.c Build on Jeff Roberson's linker-set based dynamic per-CPU allocator 2009-07-14 22:48:30 +00:00
linker_if.m strict kobj signatures: linker_if fixes 2009-06-11 17:05:45 +00:00
Make.tags.inc
Makefile
makesyscalls.sh Add a new COMPAT7 flag for FreeBSD 7.x compatibility system calls. 2009-06-24 13:36:37 +00:00
md4c.c
md5c.c
p1003_1b.c
posix4_mib.c
sched_4bsd.c Split P_NOLOAD into a per-thread flag (TDF_NOLOAD). 2009-11-03 16:46:52 +00:00
sched_ule.c Make ULE process usage (%CPU) accounting usable again by keeping track 2009-11-24 19:57:41 +00:00
serdev_if.m
stack_protector.c Random number generator initialization cleanup: 2009-10-20 16:36:51 +00:00
subr_acl_nfs4.c Add pieces of infrastructure required for NFSv4 ACL support in UFS. 2009-09-22 15:15:03 +00:00
subr_acl_posix1e.c Provide default implementation for VOP_ACCESS(9), so that filesystems which 2009-10-01 17:22:03 +00:00
subr_autoconf.c
subr_blist.c
subr_bufring.c
subr_bus.c The building the dev nameunit string, in devclass_add_device() is based 2009-11-12 00:52:14 +00:00
subr_clock.c
subr_devstat.c Don't allocate new unnecessary pages when devstat_alloc() looses the 2009-09-18 13:48:38 +00:00
subr_disk.c
subr_eventhandler.c
subr_fattime.c
subr_firmware.c
subr_hints.c
subr_kdb.c * Completely Remove the option STOP_NMI from the kernel. This option 2009-08-13 17:09:45 +00:00
subr_kobj.c
subr_lock.c
subr_log.c Make /dev/klog and kern.msgbuf* MPSAFE. 2009-11-03 21:06:19 +00:00
subr_mbpool.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c Increase HZ_VM from 10 to 100. While 10 hz saves cpu time 2009-07-08 01:09:12 +00:00
subr_pcpu.c Add ddb show dpcpu_off command to ease dpcpu memory debugging. 2009-08-12 12:06:16 +00:00
subr_power.c
subr_prf.c Make /dev/klog and kern.msgbuf* MPSAFE. 2009-11-03 21:06:19 +00:00
subr_prof.c
subr_rman.c sysctl_rman: report shared resources to devinfo 2009-05-19 14:08:21 +00:00
subr_rtc.c
subr_sbuf.c
subr_scanf.c
subr_sglist.c This patch fixes two bugs in sglist(9) and improves robustness of the API via 2009-08-21 02:59:07 +00:00
subr_sleepqueue.c Add new msleep(9) flag PBDY that shall be specified together with 2009-07-14 22:52:46 +00:00
subr_smp.c Remove forward_roundrobin(), it is unused for quite some time. 2009-09-21 13:09:56 +00:00
subr_stack.c Add stack_print_short() and stack_print_short_ddb() interfaces to 2009-06-24 12:06:15 +00:00
subr_taskqueue.c - Fix several off-by-one errors when using MAXCOMLEN. The p_comm[] and 2009-10-23 15:14:54 +00:00
subr_trap.c Current pselect(3) is implemented in usermode and thus vulnerable to 2009-10-27 10:55:34 +00:00
subr_turnstile.c
subr_unit.c
subr_witness.c Change w_notrunning and w_stillcold from pointer to array so that sizeof 2009-09-06 13:31:05 +00:00
sys_generic.c Current pselect(3) is implemented in usermode and thus vulnerable to 2009-10-27 10:55:34 +00:00
sys_pipe.c Use C99 initialization for struct filterops. 2009-09-12 20:03:45 +00:00
sys_process.c Replace VM_PROT_OVERRIDE_WRITE by VM_PROT_COPY. VM_PROT_OVERRIDE_WRITE has 2009-11-26 05:16:07 +00:00
sys_socket.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
syscalls.c Regenerate 2009-10-27 11:01:15 +00:00
syscalls.master Current pselect(3) is implemented in usermode and thus vulnerable to 2009-10-27 10:55:34 +00:00
systrace_args.c Regenerate 2009-10-27 11:01:15 +00:00
sysv_ipc.c Change the ABI of some of the structures used by the SYSV IPC API: 2009-06-24 21:10:52 +00:00
sysv_msg.c Change the ABI of some of the structures used by the SYSV IPC API: 2009-06-24 21:10:52 +00:00
sysv_sem.c Change the ABI of some of the structures used by the SYSV IPC API: 2009-06-24 21:10:52 +00:00
sysv_shm.c - Rename tunable kern.ipc.shmmaxpgs to kern.ipc.shmall. 2009-10-24 19:00:58 +00:00
tty_compat.c
tty_info.c Print an extra newline when not at the first column already. 2009-05-17 16:17:48 +00:00
tty_inq.c Enable secure TTY input buffer flushing by default. 2009-05-21 16:48:06 +00:00
tty_outq.c
tty_pts.c Use C99 initialization for struct filterops. 2009-09-12 20:03:45 +00:00
tty_tty.c
tty_ttydisc.c Print backspaces after echoing an EOF. 2009-10-17 08:59:41 +00:00
tty.c Among signal generation syscalls, only sigqueue(2) is allowed by POSIX 2009-11-17 11:39:15 +00:00
uipc_accf.c
uipc_cow.c
uipc_debug.c Add missing socket options. 2009-05-26 09:19:21 +00:00
uipc_domain.c When registering a protocol to an existing protocol domain via 2009-08-24 10:03:41 +00:00
uipc_mbuf2.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
uipc_mbuf.c Add m_mbuftouio() helper function to copy(out) an arbitrary 2009-06-22 22:20:38 +00:00
uipc_mqueue.c Use C99 initialization for struct filterops. 2009-09-12 20:03:45 +00:00
uipc_sem.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
uipc_shm.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
uipc_sockbuf.c In sbappendstream_locked() demote all incoming packet mbufs (and 2009-06-22 21:46:40 +00:00
uipc_socket.c Don't comment on stream socket handling in sosend_dgram, since that's 2009-10-02 21:31:15 +00:00
uipc_syscalls.c If socket buffer space appears to be lower then sum of count of already 2009-11-03 12:52:35 +00:00
uipc_usrreq.c Fix build on amd64, where sysctl arg1 is a pointer. 2009-10-05 22:23:12 +00:00
vfs_acl.c Fix build. 2009-11-04 08:25:58 +00:00
vfs_aio.c Use C99 initialization for struct filterops. 2009-09-12 20:03:45 +00:00
vfs_bio.c When buffer write is failed, it is wrong for brelse() to invalidate 2009-07-19 20:25:59 +00:00
vfs_cache.c Correctly handle unlock for !MAKEENTRY case, after successfull attempt of 2009-08-14 10:57:28 +00:00
vfs_cluster.c Remove a stale comment. The very same revision (r85511) that introduced 2009-06-30 19:39:17 +00:00
vfs_default.c Revert r198873. Having different VAPPEND semantics for VOP_ACCESS(9) 2009-11-11 13:49:22 +00:00
vfs_export.c Set the prison in NFS anon and GSS SVC creds. 2009-09-28 18:07:16 +00:00
vfs_extattr.c Replace AUDIT_ARG() with variable argument macros with a set more more 2009-06-27 13:58:44 +00:00
vfs_hash.c
vfs_init.c
vfs_lookup.c When rename("a", "b/.") is performed, target namei() call returns 2009-11-10 11:50:37 +00:00
vfs_mount.c Add the possibility for vfs.root.mountfrom tunable to accept a list of 2009-11-12 15:59:05 +00:00
vfs_subr.c Extend ddb(4) "show mount" command to print active string mount options. 2009-11-19 14:33:03 +00:00
vfs_syscalls.c In fhopen, vfs_ref() the mount point while vnode is unlocked, to prevent 2009-09-06 11:44:46 +00:00
vfs_vnops.c Revert r198874, pending further discussion. 2009-11-04 07:14:16 +00:00
vnode_if.src Add explicit struct ucred * argument for VOP_VPTOCNP, to be used by 2009-06-21 19:21:01 +00:00