pvmfw: sanitize bootargs
during the fdt sanitization, the bootargs string is parsed and then
only the allowed args are filtered. crashkernel= and console= are
conditionaly filtered; they are included only when the corresponding
debug policy is turned on.
Bug: 275306568
Test: inject foo=bar to bootargs and see if it's filtered out
Change-Id: I617bbf888575674f9544fca9b2ea11a7795a6e95
diff --git a/pvmfw/Android.bp b/pvmfw/Android.bp
index 41abb91..0571c36 100644
--- a/pvmfw/Android.bp
+++ b/pvmfw/Android.bp
@@ -41,6 +41,20 @@
cmd: "touch $(out)",
}
+rust_test {
+ name: "libpvmfw.bootargs.test",
+ host_supported: true,
+ // For now, only bootargs.rs is written to be conditionally compiled with std.
+ srcs: ["src/bootargs.rs"],
+ test_suites: ["general-tests"],
+ test_options: {
+ unit_test: true,
+ },
+ rustlibs: [
+ "libzeroize",
+ ],
+}
+
cc_binary {
name: "pvmfw",
defaults: ["vmbase_elf_defaults"],