HyperEnclave / hyperenclave

An Open and Cross-platform Trusted Execution Environment.
Apache License 2.0
130 stars 15 forks source link

dmesg shows ”HE_ERROR:The memmap reserved regions aren't valid“ after running “start_hyperenclave.sh” #16

Open Ariel08081214 opened 6 days ago

Ariel08081214 commented 6 days ago

运行脚本后报错,如图所示 image

完整错误如链接所示。 kern.log

系统信息如下: $ uname -a Linux wumd-2288H-V6 5.4.0-050400-generic #201911242031 SMP Mon Nov 25 01:35:10 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal $ lscpu 架构: x86_64 CPU 运行模式: 32-bit, 64-bit 字节序: Little Endian Address sizes: 52 bits physical, 57 bits virtual CPU: 128 在线 CPU 列表: 0-127 每个核的线程数: 2 每个座的核数: 32 座: 2 NUMA 节点: 2 厂商 ID: GenuineIntel CPU 系列: 6 型号: 106 型号名称: Intel(R) Xeon(R) Platinum 8352S CPU @ 2.20GHz 步进: 6 Frequency boost: enabled CPU MHz: 801.590 CPU 最大 MHz: 2201.0000 CPU 最小 MHz: 800.0000 BogoMIPS: 4400.00 虚拟化: VT-x L1d 缓存: 3 MiB L1i 缓存: 2 MiB L2 缓存: 80 MiB L3 缓存: 96 MiB NUMA 节点0 CPU: 0-31,64-95 NUMA 节点1 CPU: 32-63,96-127 Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling Vulnerability Tsx async abort: Not affected 标记: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm cons tant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 x tpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 invpcid _single ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_o ccup_llc cqm_mbm_total cqm_mbm_local wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bita lg tme avx512_vpopcntdq rdpid md_clear pconfig flush_l1d arch_capabilities

Bonjourz commented 6 days ago

Hi @Ariel08081214 , the memory reserved by "memmap" in kernel command line is not enough.

It seems that the DRAM size on your platform is 512GB, so different from other platforms(with 8GB or 16GB DRAM) HyperEnclave needs larger space to track the system RAM.

So we may need to reserve more memory by configure the GRUB_CMDLINE_LINUX in file: /etc/default/grub. You can reserve 12GB memory:

memmap=12G\\\$0x100000000 intel_iommu=off intremap=off no5lvl

and then have a try.

Ariel08081214 commented 6 days ago

Hi @Ariel08081214 , the memory reserved by "memmap" in kernel command line is not enough.

It seems that the DRAM size on your platform is 512GB, so different from other platforms(with 8GB or 16GB DRAM) HyperEnclave needs larger space to track the system RAM.

So we may need to reserve more memory by configure the GRUB_CMDLINE_LINUX in file: /etc/default/grub. You can reserve 12GB memory:

memmap=12G\\\$0x100000000 intel_iommu=off intremap=off no5lvl

and then have a try.

Now it works,thanks a lot