optee_fuzzer icon indicating copy to clipboard operation
optee_fuzzer copied to clipboard

Build Instructions

Open 21212124 opened this issue 5 years ago • 9 comments

How do they apply the patches to the OP-TEE build system, client library and OS? what is there to do?

21212124 avatar Nov 18 '19 11:11 21212124

Hello @21212124. When I was applying the patch on the build repository I got the following error: error: corrupt patch at line 124 Have you experienced the same?

SilvaMatteus avatar Jan 07 '20 17:01 SilvaMatteus

I have no idea, but if you can get it started the fuzzer, let me know. thanks.

21212124 avatar Jan 08 '20 07:01 21212124

@SilvaMatteus do you have many mistakes? It compiles me but I have warnings. When I run AFL I have the error: no instrumentation detected. Have you experienced the same?

21212124 avatar Jan 22 '20 07:01 21212124

Hi @21212124. It seems that you have the AFL compiled already. Could you share with me the steps you performed to compile? I think it's better to share via e-mail. matteus.sthefano.ls *AT* gmail.com

About your error: did you tried to run in dumb mode?

SilvaMatteus avatar Jan 22 '20 19:01 SilvaMatteus

Hi @SilvaMatteus Any advance?

21212124 avatar May 13 '20 17:05 21212124

Hi @21212124, I moved on to other priorities at the moment.

SilvaMatteus avatar May 13 '20 17:05 SilvaMatteus

Hi folks. I'm no longer working on this. Also, I do not have good news about these build instructions.

SilvaMatteus avatar Jun 30 '21 19:06 SilvaMatteus

How do they apply the patches to the OP-TEE build system, client library and OS? what is there to do?

hello,there,When I used the .diff files in the patches in the directory,I found that it aserted a lot of error,so I just patch the files by hand (not by my computer) on my self.And then I debuged it,It seems work well!

RainyLave avatar Sep 22 '21 07:09 RainyLave

I got them applied, by changing some line numbers :(

diff --git a/patches/optee-3.3/optee_client.diff b/patches/optee-3.3/optee_client.diff
index 60d1a70..a2a0c3e 100644
--- a/patches/optee-3.3/optee_client.diff
+++ b/patches/optee-3.3/optee_client.diff
@@ -53,7 +53,7 @@ index 698092b..0384e04 100644
  {
        struct tee_ioctl_close_session_arg arg;
  
-@@ -779,3 +787,183 @@ void TEEC_ReleaseSharedMemory(TEEC_SharedMemory *shm)
+@@ -779,3 +787,131 @@ void TEEC_ReleaseSharedMemory(TEEC_SharedMemory *shm)
        shm->registered_fd = -1;
        shm->buffer_allocated = false;
  }
@@ -185,4 +185,3 @@ index 698092b..0384e04 100644
 +
 +      _TEEC_CloseSession(session);
 +}
-\ No newline at end of file
diff --git a/patches/optee-3.3/optee_os.diff b/patches/optee-3.3/optee_os.diff
index dc54429..bbc5949 100644
--- a/patches/optee-3.3/optee_os.diff
+++ b/patches/optee-3.3/optee_os.diff
@@ -1916,7 +1916,7 @@ diff --git a/core/kernel/panic.c b/core/kernel/panic.c
 index 37e30a8..36af5e0 100644
 --- a/core/kernel/panic.c
 +++ b/core/kernel/panic.c
-@@ -8,11 +8,81 @@
+@@ -8,11 +8,14 @@
  #include <kernel/thread.h>
  #include <trace.h>
  

bitwave avatar Nov 11 '21 13:11 bitwave