haiku/headers/private/system
Michael Lotz 4986a9a3fd Revert "kernel: Remove the B_KERNEL_AREA protection flag."
This reverts parts of hrev52546 that removed the B_KERNEL_AREA
protection flag and replaced it with an address space comparison.

Checking for areas in the kernel address space inside a user address
space does not work, as areas can only ever belong to one address space.
This rendered these checks ineffective and allowed to unmap, delete or
resize kernel managed areas from their respective userland teams.

That protection was meant to be applied to the team user data area which
was introduced to reduce the kernel to userland overhead by directly
sharing some data between the two. It was intended to be set up in such
a manner that this is safe on the kernel side and the B_KERNEL_AREA flag
was introduced specifically for this purpose.

Incidentally the actual application of the B_KERNEL_AREA flag on the
team user data area was apparently forgotten in the original commit.

The absence of that protection allowed applications to induce KDLs by
modifying the user area and generating a signal for example.

This change restores the B_KERNEL_AREA flag and also applies it to the
team user data area.

Change-Id: I993bb1cf7c6ae10085100db7df7cc23fe66f4edd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2836
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-30 01:47:40 +00:00
..
arch ppc: Minor tweaks to get the arch compile again (WIP) 2019-12-04 18:34:31 +00:00
posix posix: add _POSIX_SEM_NSEMS_MAX. 2017-02-21 20:17:16 +01:00
architecture_private.h
commpage_defs.h kernel: add a compatibility commpage on x86_64. 2018-05-18 05:11:07 +00:00
computed_asm_macros.h
convertutf.h headers/private: Fix wrong filemode. 2018-08-08 23:48:37 -04:00
ddm_userland_interface_defs.h
device_manager_defs.h
directories.h
disk_device_types.h btrfs: make file system name consistent 2019-04-09 12:03:12 +00:00
elf_private.h kernel: support elf32 on x86_64. 2018-05-15 10:29:00 +00:00
extended_system_info_defs.h
find_directory_private.h
generic_syscall_defs.h
image_defs.h extended_image_info: Add text_delta field 2016-04-29 22:32:14 +02:00
node_monitor_private.h
pe_common.h
real_time_data.h
safemode_defs.h kernel: use x2apic on hypervisor, or if already enabled. 2018-02-04 19:08:53 +01:00
scheduler_defs.h
signal_defs.h
spinlock_contention.h
symbol_versioning.h
syscall_load_image.h headers/kernel: Move B_WAIT_TILL_LOADED to a syscall header. 2019-02-01 19:45:56 -05:00
syscall_process_info.h
syscalls.h Change all references to "__INTEL__" to "__i386__". 2019-03-30 16:54:01 -04:00
system_info.h
system_profiler_defs.h
thread_defs.h kernel: Properly separate and handle THREAD_BLOCK_TYPE_USER. 2019-08-05 22:31:02 -04:00
tls.h kernel/x86_64: adjust descriptors tables for compatibility mode. 2018-05-15 10:27:02 +00:00
user_mutex_defs.h
user_runtime.h kernel & runtime_loader: Don't load from non-packaged when "Disable user 2019-05-20 14:08:28 +00:00
user_thread_defs.h
user_timer_defs.h
vfs_defs.h limits.h: define PIPE_BUF. 2017-04-19 17:52:28 +02:00
vm_defs.h Revert "kernel: Remove the B_KERNEL_AREA protection flag." 2020-05-30 01:47:40 +00:00