AMDESE / AMDSEV

AMD Secure Encrypted Virtualization
279 stars 84 forks source link

Failed while starting to compile #150

Closed DiWangShePi closed 2 months ago

DiWangShePi commented 1 year ago

I failed in a direct attempt to compile. I executed only three commands from the README:

git clone https://github.com/AMDESE/AMDSEV.git
cd AMDSEV
git checkout snp-latest
./build.sh --package

This is the error message I saw:

#
# configuration written to .config
#
make: Leaving directory '/AMDSEV/linux/guest'
yes: standard output: Broken pipe
+ run_cmd make -C guest -j 32 LOCALVERSION=
+ echo 'make -C guest -j 32 LOCALVERSION='
+ eval 'make -C guest -j 32 LOCALVERSION='
++ make -C guest -j 32 LOCALVERSION=
At main.c:161:
- SSL error:0909006C:PEM routines:get_name:no start line: ../crypto/pem/pem_lib.c:745
extract-cert: certs/signing_key.pem: Success
make[2]: *** [certs/Makefile:74: certs/signing_key.x509] Error 1
make[2]: *** Deleting file 'certs/signing_key.x509'
make[1]: *** [scripts/Makefile.build:500: certs] Error 2
make[1]: *** Waiting for unfinished jobs....
lib/maple_tree.c: In function ‘mas_wr_spanning_store.isra.0’:
lib/maple_tree.c:4047:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 4047 | }
      | ^
drivers/net/wireguard/allowedips.c: In function ‘root_remove_peer_lists’:
drivers/net/wireguard/allowedips.c:80:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
   80 | }
      | ^
drivers/net/wireguard/allowedips.c: In function ‘root_free_rcu’:
drivers/net/wireguard/allowedips.c:67:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
   67 | }
      | ^
fs/jffs2/xattr.c: In function ‘jffs2_build_xattr_subsystem’:
fs/jffs2/xattr.c:887:1: warning: the frame size of 1144 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  887 | }
      | ^
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c: In function ‘stmmac_request_irq_multi_msi’:
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3619:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 3619 | }
      | ^
make: *** [Makefile:1992: .] Error 2
+ echo 'ERROR: make -C guest -j 32 LOCALVERSION='
+ exit 1

Where could I find the real reason that cursed this failure? Or could you help me with this problem? My partner previously compiled and successfully ran a virtual machine with encryption enabled on the same server, but there was a problem when I tried to repeat it. My partner did not encounter this problem.

DiWangShePi commented 1 year ago

Thank you for your help, but I am not sure where is the file modified by your command? The execution path of my previous command was under AMDSEV. I tried to modify the scripts/config under AMDSEV/linux/guest, but the same result appeared when I tried to compile again

------------------ 原始邮件 ------------------ 发件人: "AMDESE/AMDSEV" @.>; 发送时间: 2023年5月3日(星期三) 晚上10:19 @.>; @.**@.>; 主题: Re: [AMDESE/AMDSEV] Failed while starting to compile (Issue #150)

Probably, you have to disable the kernel custom keyring: ./scripts/config --disable SYSTEM_REVOCATION_KEYS ./scripts/config --disable SYSTEM_TRUSTED_KEYS
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

sza-1 commented 1 year ago

@DiWangShePi I was wrong, since I thought that you are building the kernel by hands.

You may try to built the kernel not using build.sh, debug Makefile (using V=1 or V=2), and understand what is wrong - probably you have to install some additional OS packages.

khushboo-dfn commented 1 year ago

Any resolution to this? I am seeing this error too for the very recent guest kernel. Wonder if this commit is causing the issue https://github.com/AMDESE/linux/commit/cfddeeb09d63bcc9fd5bf893a58dfe0f77b46c34

tlendacky commented 1 year ago

You can try modifying the build_kernel() function in common.sh to additionally issue the following command: run_cmd ./scripts/config --disable MODULE_SIG_KEY

See if that helps.