mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
ANDROID: KVM: arm64: mount procfs for pKVM module loading
modprobe needs /proc/cmdline to pass module arguments to the module loader. Sadly, so early in the boot, nothing mounts that FS. Bug: 301483379 Change-Id: Iaab3000e3b7f908fc81f7f36adf2f73c7d3129a4 Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
#include <linux/of_fdt.h>
|
#include <linux/of_fdt.h>
|
||||||
#include <linux/of_reserved_mem.h>
|
#include <linux/of_reserved_mem.h>
|
||||||
#include <linux/sort.h>
|
#include <linux/sort.h>
|
||||||
|
#include <linux/stat.h>
|
||||||
|
|
||||||
#include <asm/kvm_hyp.h>
|
#include <asm/kvm_hyp.h>
|
||||||
#include <asm/kvm_mmu.h>
|
#include <asm/kvm_mmu.h>
|
||||||
@@ -21,6 +22,9 @@
|
|||||||
#include <asm/kvm_pkvm_module.h>
|
#include <asm/kvm_pkvm_module.h>
|
||||||
#include <asm/setup.h>
|
#include <asm/setup.h>
|
||||||
|
|
||||||
|
#include <uapi/linux/mount.h>
|
||||||
|
#include <linux/init_syscalls.h>
|
||||||
|
|
||||||
#include "hyp_constants.h"
|
#include "hyp_constants.h"
|
||||||
|
|
||||||
DEFINE_STATIC_KEY_FALSE(kvm_protected_mode_initialized);
|
DEFINE_STATIC_KEY_FALSE(kvm_protected_mode_initialized);
|
||||||
@@ -682,7 +686,11 @@ int __init pkvm_load_early_modules(void)
|
|||||||
{
|
{
|
||||||
char *token, *buf = early_pkvm_modules;
|
char *token, *buf = early_pkvm_modules;
|
||||||
char *module_path = CONFIG_PKVM_MODULE_PATH;
|
char *module_path = CONFIG_PKVM_MODULE_PATH;
|
||||||
int err;
|
int err = init_mount("proc", "/proc", "proc",
|
||||||
|
MS_SILENT | MS_NOEXEC | MS_NOSUID, NULL);
|
||||||
|
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
token = strsep(&buf, ",");
|
token = strsep(&buf, ",");
|
||||||
|
|||||||
Reference in New Issue
Block a user