Skip to content

Commit 0c04783

Browse files
committed
main: Check for SIP disable for proxy backdoor mode
Seems -v stopped being filtered (or never was?). Explicitly check boot policy, so we don't depend on boot-args filtering directly (which can change). -v still makes things verbose unconditionally, but the proxy backdoor now requires that plus full SIP disable (sip0=127). Signed-off-by: Hector Martin <[email protected]>
1 parent 4fd7b1c commit 0c04783

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/main.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,15 @@ void run_actions(void)
6565

6666
#ifndef BRINGUP
6767
#ifdef EARLY_PROXY_TIMEOUT
68-
if (!cur_boot_args.video.display) {
68+
int node = adt_path_offset(adt, "/chosen/asmb");
69+
u64 lp_sip0 = 0;
70+
71+
if (node >= 0) {
72+
ADT_GETPROP(adt, node, "lp-sip0", &lp_sip0);
73+
printf("Boot policy: sip0 = %ld\n", lp_sip0);
74+
}
75+
76+
if (!cur_boot_args.video.display && lp_sip0 == 127) {
6977
printf("Bringing up USB for early debug...\n");
7078

7179
usb_init();

0 commit comments

Comments
 (0)