Skip to content

Commit 5f5750b

Browse files
renlordrandomhydrosol
authored andcommitted
remove base system app execmem
GrapheneOS doesn't use the ART JIT compiler. Signed-off-by: anupritaisno1 <[email protected]>
1 parent 1c743bd commit 5f5750b

14 files changed

+36
-8
lines changed

prebuilts/api/30.0/private/ephemeral_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ typeattribute ephemeral_app coredomain;
1616
net_domain(ephemeral_app)
1717
app_domain(ephemeral_app)
1818

19+
allow ephemeral_app self:process execmem;
20+
auditallow ephemeral_app self:process execmem;
21+
1922
# Allow ephemeral apps to read/write files in visible storage if provided fds
2023
allow ephemeral_app { sdcard_type media_rw_data_file }:file {read write getattr ioctl lock append};
2124

prebuilts/api/30.0/private/isolated_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ typeattribute isolated_app coredomain;
1010

1111
app_domain(isolated_app)
1212

13+
allow isolated_app self:process execmem;
14+
auditallow isolated_app self:process execmem;
15+
1316
# Access already open app data files received over Binder or local socket IPC.
1417
allow isolated_app { app_data_file privapp_data_file }:file { append read write getattr lock map };
1518

prebuilts/api/30.0/private/untrusted_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ app_domain(untrusted_app)
1414
untrusted_app_domain(untrusted_app)
1515
net_domain(untrusted_app)
1616
bluetooth_domain(untrusted_app)
17+
18+
allow untrusted_app self:process execmem;
19+
auditallow untrusted_app self:process execmem;

prebuilts/api/30.0/private/untrusted_app_25.te

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ untrusted_app_domain(untrusted_app_25)
1515
net_domain(untrusted_app_25)
1616
bluetooth_domain(untrusted_app_25)
1717

18+
allow untrusted_app_25 self:process execmem;
19+
auditallow untrusted_app_25 self:process execmem;
20+
1821
# b/35917228 - /proc/misc access
1922
# This will go away in a future Android release
2023
allow untrusted_app_25 proc_misc:file r_file_perms;

prebuilts/api/30.0/private/untrusted_app_27.te

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ untrusted_app_domain(untrusted_app_27)
1515
net_domain(untrusted_app_27)
1616
bluetooth_domain(untrusted_app_27)
1717

18+
allow untrusted_app_27 self:process execmem;
19+
auditallow untrusted_app_27 self:process execmem;
20+
1821
# Text relocation support for API < 23. This is now disallowed for targetSdkVersion>=Q.
1922
# https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#text-relocations-enforced-for-api-level-23
2023
allow untrusted_app_27 { apk_data_file app_data_file asec_public_file }:file execmod;

prebuilts/api/30.0/private/untrusted_app_29.te

+3
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@ untrusted_app_domain(untrusted_app_29)
1515
net_domain(untrusted_app_29)
1616
bluetooth_domain(untrusted_app_29)
1717

18+
allow untrusted_app_29 self:process execmem;
19+
auditallow untrusted_app_29 self:process execmem;
20+
1821
# allow binding to netlink route sockets and sending RTM_GETLINK messages.
1922
allow untrusted_app_29 self:netlink_route_socket { bind nlmsg_readpriv };

prebuilts/api/30.0/public/app.te

-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
###
99
type appdomain_tmpfs, file_type;
1010

11-
# WebView and other application-specific JIT compilers
12-
allow appdomain self:process execmem;
13-
auditallow appdomain self:process execmem;
14-
1511
allow appdomain { ashmem_device ashmem_libcutils_device }:chr_file execute;
1612
auditallow appdomain { ashmem_device ashmem_libcutils_device }:chr_file execute;
1713

private/ephemeral_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ typeattribute ephemeral_app coredomain;
1616
net_domain(ephemeral_app)
1717
app_domain(ephemeral_app)
1818

19+
allow ephemeral_app self:process execmem;
20+
auditallow ephemeral_app self:process execmem;
21+
1922
# Allow ephemeral apps to read/write files in visible storage if provided fds
2023
allow ephemeral_app { sdcard_type media_rw_data_file }:file {read write getattr ioctl lock append};
2124

private/isolated_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ typeattribute isolated_app coredomain;
1010

1111
app_domain(isolated_app)
1212

13+
allow isolated_app self:process execmem;
14+
auditallow isolated_app self:process execmem;
15+
1316
# Access already open app data files received over Binder or local socket IPC.
1417
allow isolated_app { app_data_file privapp_data_file }:file { append read write getattr lock map };
1518

private/untrusted_app.te

+3
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ app_domain(untrusted_app)
1414
untrusted_app_domain(untrusted_app)
1515
net_domain(untrusted_app)
1616
bluetooth_domain(untrusted_app)
17+
18+
allow untrusted_app self:process execmem;
19+
auditallow untrusted_app self:process execmem;

private/untrusted_app_25.te

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ untrusted_app_domain(untrusted_app_25)
1515
net_domain(untrusted_app_25)
1616
bluetooth_domain(untrusted_app_25)
1717

18+
allow untrusted_app_25 self:process execmem;
19+
auditallow untrusted_app_25 self:process execmem;
20+
1821
# b/35917228 - /proc/misc access
1922
# This will go away in a future Android release
2023
allow untrusted_app_25 proc_misc:file r_file_perms;

private/untrusted_app_27.te

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ untrusted_app_domain(untrusted_app_27)
1515
net_domain(untrusted_app_27)
1616
bluetooth_domain(untrusted_app_27)
1717

18+
allow untrusted_app_27 self:process execmem;
19+
auditallow untrusted_app_27 self:process execmem;
20+
1821
# Text relocation support for API < 23. This is now disallowed for targetSdkVersion>=Q.
1922
# https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#text-relocations-enforced-for-api-level-23
2023
allow untrusted_app_27 { apk_data_file app_data_file asec_public_file }:file execmod;

private/untrusted_app_29.te

+3
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@ untrusted_app_domain(untrusted_app_29)
1515
net_domain(untrusted_app_29)
1616
bluetooth_domain(untrusted_app_29)
1717

18+
allow untrusted_app_29 self:process execmem;
19+
auditallow untrusted_app_29 self:process execmem;
20+
1821
# allow binding to netlink route sockets and sending RTM_GETLINK messages.
1922
allow untrusted_app_29 self:netlink_route_socket { bind nlmsg_readpriv };

public/app.te

-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
###
99
type appdomain_tmpfs, file_type;
1010

11-
# WebView and other application-specific JIT compilers
12-
allow appdomain self:process execmem;
13-
auditallow appdomain self:process execmem;
14-
1511
allow appdomain { ashmem_device ashmem_libcutils_device }:chr_file execute;
1612
auditallow appdomain { ashmem_device ashmem_libcutils_device }:chr_file execute;
1713

0 commit comments

Comments
 (0)