Function report |
Source Code:kernel\sys.c |
Create Date:2022-07-28 09:21:05 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Check arithmetic relations of passed addresses.* WARNING: we don't require any capability here so be very careful* in what is allowed for modification from userspace.
Proto:static int validate_prctl_map_addr(struct prctl_mm_map *prctl_map)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct prctl_mm_map * | prctl_map |
1884 | mmap_max_addr = TASK_SIZE |
1887 | static const unsigned char offsets[] = {offsetof(structprctl_mm_map, start_code), offsetof(structprctl_mm_map, end_code), offsetof(structprctl_mm_map, start_data), offsetof(structprctl_mm_map, end_data), offsetof(structprctl_mm_map, start_brk), offsetof(structprctl_mm_map, brk), offsetof(structprctl_mm_map, start_stack), offsetof(structprctl_mm_map, arg_start), offsetof(structprctl_mm_map, arg_end), offsetof(structprctl_mm_map, env_start), offsetof(structprctl_mm_map, env_end), } |
1908 | If val >= mmap_max_addr || val < mmap_min_addr Then Go to out |
1919 | error = Make sure the pairs are ordered.(start_code, < , end_code) |
1920 | error |= Make sure the pairs are ordered.(start_data, <= , end_data) |
1921 | error |= Make sure the pairs are ordered.(start_brk, <= , brk) |
1922 | error |= Make sure the pairs are ordered.(arg_start, <= , arg_end) |
1923 | error |= Make sure the pairs are ordered.(env_start, <= , env_end) |
1933 | If heap for brk() syscall <= end_data || brk <= end_data Then Go to out |
1940 | If check_data_rlimit(rlimit(RLIMIT_DATA), brk, heap for brk() syscall , end_data, data section bounds ) Then Go to out |
1945 | error = 0 |
1946 | out : |
1947 | Return error |
Name | Describe |
---|---|
prctl_set_mm |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |