Commit 23215f2
committed
Rework MAP_ANON|MAP_SHARED and shmat cap support
mmap(..., MAP_ANON|MAP_SHARED, ...):
Require PROT_CAP explicitly to enable capability support in
shared, anonymous mappings. When specified, set the MAP_SHARECAP
cow flag which causes a backing object to be allocated and the
OBJ_SHARECAP flag set to allow sharing capabilities across address
spaces.
shmat:
Always set OBJ_SHARECAP on SysV shared memory objects. Use of them
is straightforwardly auditable. We might want to add an explict
SHM_SHARECAP flag at some point rather than making this universal,
but shmat is probably best left in the dustbin of history.1 parent cd9233a commit 23215f2
4 files changed
+30
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
900 | 900 | | |
901 | 901 | | |
902 | 902 | | |
| 903 | + | |
903 | 904 | | |
904 | 905 | | |
905 | 906 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
2121 | 2122 | | |
2122 | 2123 | | |
2123 | 2124 | | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
2124 | 2136 | | |
2125 | 2137 | | |
2126 | 2138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
| 474 | + | |
474 | 475 | | |
475 | 476 | | |
476 | 477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
699 | 703 | | |
700 | | - | |
701 | | - | |
| 704 | + | |
702 | 705 | | |
703 | 706 | | |
704 | 707 | | |
| |||
2080 | 2083 | | |
2081 | 2084 | | |
2082 | 2085 | | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
2083 | 2097 | | |
2084 | 2098 | | |
2085 | 2099 | | |
| |||
0 commit comments