Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178010810
D62094.1795754953.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
4 KB
Referenced Files
None
Subscribers
None
D62094.1795754953.diff
View Options
diff --git a/stand/kboot/kboot/main.c b/stand/kboot/kboot/main.c
--- a/stand/kboot/kboot/main.c
+++ b/stand/kboot/kboot/main.c
@@ -691,7 +691,9 @@
return (command_fdt_internal(argc, argv));
}
-COMMAND_SET(fdt, "fdt", "flattened device tree handling", command_fdt);
+/* Subcommands that modify the blob check lockdown themselves. */
+COMMAND_SET_FLAGS(fdt, "fdt", "flattened device tree handling",
+ command_fdt, CMDF_LOCKDOWN);
#endif
/*
@@ -704,4 +706,5 @@
return (CMD_OK);
}
-COMMAND_SET(quit, "quit", "exit the program", command_quit);
+COMMAND_SET_FLAGS(quit, "quit", "exit the program", command_quit,
+ CMDF_LOCKDOWN);
diff --git a/stand/powerpc/ofw/main.c b/stand/powerpc/ofw/main.c
--- a/stand/powerpc/ofw/main.c
+++ b/stand/powerpc/ofw/main.c
@@ -230,7 +230,7 @@
return 0;
}
-COMMAND_SET(halt, "halt", "halt the system", command_halt);
+COMMAND_SET_FLAGS(halt, "halt", "halt the system", command_halt, CMDF_LOCKDOWN);
static int
command_halt(int argc, char *argv[])
@@ -240,7 +240,7 @@
return (CMD_OK);
}
-COMMAND_SET(memmap, "memmap", "print memory map", command_memmap);
+COMMAND_SET_RDONLY(memmap, "memmap", "print memory map", command_memmap);
int
command_memmap(int argc, char **argv)
diff --git a/stand/powerpc/ofw/ofwfdt.c b/stand/powerpc/ofw/ofwfdt.c
--- a/stand/powerpc/ofw/ofwfdt.c
+++ b/stand/powerpc/ofw/ofwfdt.c
@@ -204,5 +204,7 @@
return (command_fdt_internal(argc, argv));
}
-COMMAND_SET(fdt, "fdt", "flattened device tree handling", command_fdt);
+/* Subcommands that modify the blob check lockdown themselves. */
+COMMAND_SET_FLAGS(fdt, "fdt", "flattened device tree handling",
+ command_fdt, CMDF_LOCKDOWN);
diff --git a/stand/uboot/main.c b/stand/uboot/main.c
--- a/stand/uboot/main.c
+++ b/stand/uboot/main.c
@@ -545,7 +545,7 @@
}
-COMMAND_SET(heap, "heap", "show heap usage", command_heap);
+COMMAND_SET_RDONLY(heap, "heap", "show heap usage", command_heap);
static int
command_heap(int argc, char *argv[])
{
@@ -556,7 +556,8 @@
return (CMD_OK);
}
-COMMAND_SET(reboot, "reboot", "reboot the system", command_reboot);
+COMMAND_SET_FLAGS(reboot, "reboot", "reboot the system", command_reboot,
+ CMDF_LOCKDOWN);
static int
command_reboot(int argc, char *argv[])
{
@@ -569,7 +570,7 @@
__unreachable();
}
-COMMAND_SET(devinfo, "devinfo", "show U-Boot devices", command_devinfo);
+COMMAND_SET_RDONLY(devinfo, "devinfo", "show U-Boot devices", command_devinfo);
static int
command_devinfo(int argc, char *argv[])
{
@@ -588,7 +589,8 @@
return (CMD_OK);
}
-COMMAND_SET(sysinfo, "sysinfo", "show U-Boot system info", command_sysinfo);
+COMMAND_SET_RDONLY(sysinfo, "sysinfo", "show U-Boot system info",
+ command_sysinfo);
static int
command_sysinfo(int argc, char *argv[])
{
@@ -700,7 +702,13 @@
return (CMD_OK);
}
-COMMAND_SET(ubenv, "ubenv", "show or import U-Boot env vars", command_ubenv);
+
+/*
+ * Lockdown-safe only because the environment enforces its own policy on
+ * which variables may be modified in lockdown.
+ */
+COMMAND_SET_FLAGS(ubenv, "ubenv", "show or import U-Boot env vars",
+ command_ubenv, CMDF_LOCKDOWN);
#ifdef LOADER_FDT_SUPPORT
/*
@@ -716,5 +724,7 @@
return (command_fdt_internal(argc, argv));
}
-COMMAND_SET(fdt, "fdt", "flattened device tree handling", command_fdt);
+/* Subcommands that modify the blob check lockdown themselves. */
+COMMAND_SET_FLAGS(fdt, "fdt", "flattened device tree handling",
+ command_fdt, CMDF_LOCKDOWN);
#endif
diff --git a/stand/userboot/userboot/main.c b/stand/userboot/userboot/main.c
--- a/stand/userboot/userboot/main.c
+++ b/stand/userboot/userboot/main.c
@@ -313,7 +313,7 @@
}
#endif
-COMMAND_SET(quit, "quit", "exit the loader", command_quit);
+COMMAND_SET_FLAGS(quit, "quit", "exit the loader", command_quit, CMDF_LOCKDOWN);
static int
command_quit(int argc, char *argv[])
@@ -323,7 +323,8 @@
return (CMD_OK);
}
-COMMAND_SET(reboot, "reboot", "reboot the system", command_reboot);
+COMMAND_SET_FLAGS(reboot, "reboot", "reboot the system", command_reboot,
+ CMDF_LOCKDOWN);
static int
command_reboot(int argc, char *argv[])
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 27, 4:49 AM (19 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42035258
Default Alt Text
D62094.1795754953.diff (4 KB)
Attached To
Mode
D62094: loader: mark the remaining commands as lockdown-safe
Attached
Detach File
Event Timeline