Commit d2c757a
deps: V8: cherry-pick 27e1ac1a79ff
Original commit message:
[wasm][mac] Support w^x codespaces for Apple Silicon
Apple's upcoming arm64 devices will prevent rwx access to memory,
but in turn provide a new per-thread way to switch between write
and execute permissions. This patch puts that system to use for
the WebAssembly subsystem.
The approach relies on CodeSpaceWriteScope objects for now. That
isn't optimal for background threads (which could stay in "write"
mode permanently instead of toggling), but its simplicity makes
it a good first step.
Background:
https://developer.apple.com/documentation/apple_silicon/porting_just-in-time_compilers_to_apple_silicon
Bug: chromium:1117591
Change-Id: I3b60f0efd34c0fed924dfc71ee2c7805801c5d42
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2378307
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69791}
PR-URL: #35986
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>1 parent 4140f49 commit d2c757aCopy full SHA for d2c757a
File tree
Expand file treeCollapse file tree
12 files changed
+143
-5
lines changedOpen diff view settings
Filter options
- deps/v8
- src
- base/platform
- wasm
- test
- cctest
- wasm
- unittests
Expand file treeCollapse file tree
12 files changed
+143
-5
lines changedOpen diff view settings
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
36 | 36 | |
37 | 37 | |
38 | 38 | |
39 | | - |
| 39 | + |
40 | 40 | |
41 | 41 | |
42 | 42 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3237 | 3237 | |
3238 | 3238 | |
3239 | 3239 | |
| 3240 | + |
3240 | 3241 | |
3241 | 3242 | |
3242 | 3243 | |
|
Collapse file
deps/v8/src/base/platform/platform-posix.cc
Copy file name to clipboardExpand all lines: deps/v8/src/base/platform/platform-posix.cc+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
151 | 151 | |
152 | 152 | |
153 | 153 | |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
154 | 162 | |
155 | 163 | |
156 | 164 | |
|
Collapse file
deps/v8/src/wasm/code-space-access.h
Copy file name to clipboard+69Lines changed: 69 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
Collapse file
deps/v8/src/wasm/wasm-code-manager.cc
Copy file name to clipboardExpand all lines: deps/v8/src/wasm/wasm-code-manager.cc+15Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
6 | 6 | |
7 | 7 | |
8 | 8 | |
| 9 | + |
9 | 10 | |
10 | 11 | |
11 | 12 | |
| ||
21 | 22 | |
22 | 23 | |
23 | 24 | |
| 25 | + |
24 | 26 | |
25 | 27 | |
26 | 28 | |
| ||
47 | 49 | |
48 | 50 | |
49 | 51 | |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
50 | 56 | |
51 | 57 | |
52 | 58 | |
| ||
731 | 737 | |
732 | 738 | |
733 | 739 | |
| 740 | + |
734 | 741 | |
735 | 742 | |
736 | 743 | |
| ||
847 | 854 | |
848 | 855 | |
849 | 856 | |
| 857 | + |
850 | 858 | |
851 | 859 | |
852 | 860 | |
| ||
942 | 950 | |
943 | 951 | |
944 | 952 | |
| 953 | + |
945 | 954 | |
946 | 955 | |
947 | 956 | |
| ||
1003 | 1012 | |
1004 | 1013 | |
1005 | 1014 | |
| 1015 | + |
1006 | 1016 | |
1007 | 1017 | |
1008 | 1018 | |
| ||
1138 | 1148 | |
1139 | 1149 | |
1140 | 1150 | |
| 1151 | + |
1141 | 1152 | |
1142 | 1153 | |
1143 | 1154 | |
| ||
1196 | 1207 | |
1197 | 1208 | |
1198 | 1209 | |
| 1210 | + |
1199 | 1211 | |
1200 | 1212 | |
1201 | 1213 | |
| ||
1221 | 1233 | |
1222 | 1234 | |
1223 | 1235 | |
| 1236 | + |
1224 | 1237 | |
1225 | 1238 | |
1226 | 1239 | |
| ||
1283 | 1296 | |
1284 | 1297 | |
1285 | 1298 | |
| 1299 | + |
1286 | 1300 | |
1287 | 1301 | |
1288 | 1302 | |
| ||
1843 | 1857 | |
1844 | 1858 | |
1845 | 1859 | |
| 1860 | + |
1846 | 1861 | |
1847 | 1862 | |
1848 | 1863 | |
|
Collapse file
deps/v8/src/wasm/wasm-serialization.cc
Copy file name to clipboardExpand all lines: deps/v8/src/wasm/wasm-serialization.cc+2Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
13 | 13 | |
14 | 14 | |
15 | 15 | |
| 16 | + |
16 | 17 | |
17 | 18 | |
18 | 19 | |
| ||
534 | 535 | |
535 | 536 | |
536 | 537 | |
| 538 | + |
537 | 539 | |
538 | 540 | |
539 | 541 | |
|
Collapse file
deps/v8/test/cctest/cctest.status
Copy file name to clipboardExpand all lines: deps/v8/test/cctest/cctest.status+7Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
176 | 176 | |
177 | 177 | |
178 | 178 | |
| 179 | + |
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | + |
179 | 186 | |
180 | 187 | |
181 | 188 | |
|
Collapse file
deps/v8/test/cctest/test-assembler-arm64.cc
Copy file name to clipboardExpand all lines: deps/v8/test/cctest/test-assembler-arm64.cc+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
11720 | 11720 | |
11721 | 11721 | |
11722 | 11722 | |
11723 | | - |
| 11723 | + |
11724 | 11724 | |
11725 | | - |
| 11725 | + |
11726 | 11726 | |
11727 | 11727 | |
11728 | 11728 | |
|
Collapse file
deps/v8/test/cctest/test-code-stub-assembler.cc
Copy file name to clipboardExpand all lines: deps/v8/test/cctest/test-code-stub-assembler.cc+3-2Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
41 | 41 | |
42 | 42 | |
43 | 43 | |
44 | | - |
45 | | - |
| 44 | + |
| 45 | + |
| 46 | + |
46 | 47 | |
47 | 48 | |
48 | 49 | |
|
Collapse file
deps/v8/test/cctest/test-icache.cc
Copy file name to clipboardExpand all lines: deps/v8/test/cctest/test-icache.cc+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
6 | 6 | |
7 | 7 | |
8 | 8 | |
| 9 | + |
9 | 10 | |
10 | 11 | |
11 | 12 | |
| ||
179 | 180 | |
180 | 181 | |
181 | 182 | |
| 183 | + |
182 | 184 | |
183 | 185 | |
| 186 | + |
184 | 187 | |
| 188 | + |
185 | 189 | |
186 | 190 | |
| 191 | + |
187 | 192 | |
188 | 193 | |
189 | 194 | |
|
0 commit comments