diff --git a/arch/arm/enter.c b/arch/arm/enter.c index cba35c0..db14bae 100644 --- a/arch/arm/enter.c +++ b/arch/arm/enter.c @@ -26,22 +26,6 @@ static void __attribute__((used)) container(void) * control back to the main program. */ - /* this one just says hi to stdout for testing blob execution */ - asm volatile( - ".global test_blob \n" - "test_blob: \n" - "mov r7, #4 \n" /* __NR_write */ - "mov r0, #1 \n" /* @fd */ - "adr r1, _string \n" /* @buf */ - "mov r2, #20 \n" /* @count */ - "svc 0 \n" - "udf #16 \n" /* SIGTRAP */ - "_string: .ascii \"BLOB: hello, world!\\n\" \n" - ".global test_blob_size \n" - "test_blob_size: \n" - ".int test_blob_size - test_blob \n" - ); - /* rt_sigprocmask(), expects pointer to area for masks in r8 */ asm volatile( ".global sigprocmask_blob \n" diff --git a/arch/arm64/enter.c b/arch/arm64/enter.c index 29e8fd4..d47f172 100644 --- a/arch/arm64/enter.c +++ b/arch/arm64/enter.c @@ -27,22 +27,6 @@ static void __attribute__((used)) container(void) * control back to the main program. */ - /* this one just says hi to stdout for testing blob execution */ - asm volatile( - ".global test_blob \n" - "test_blob: \n" - "mov x8, #64 \n" /* __NR_write */ - "mov x0, #1 \n" /* @fd */ - "adr x1, _string \n" /* @buf */ - "mov x2, #20 \n" /* @count */ - "svc #0 \n" - "brk #0 \n" /* SIGTRAP */ - "_string: .ascii \"BLOB: hello, world!\\n\" \n" - ".global test_blob_size \n" - "test_blob_size: \n" - ".int test_blob_size - test_blob \n" - ); - /* rt_sigprocmask(), expects pointer to area for masks in x10 */ asm volatile( ".global sigprocmask_blob \n" diff --git a/arch/x86_64/enter.c b/arch/x86_64/enter.c index 25eb5e4..cb23c99 100644 --- a/arch/x86_64/enter.c +++ b/arch/x86_64/enter.c @@ -27,21 +27,6 @@ static void __attribute__((used)) container(void) * control back to the main program. */ - /* this one just says hi to stdout for testing blob execution */ - asm volatile( - ".global test_blob \n" - "test_blob: \n" - "movq $1, %rax \n" /* __NR_write */ - "movq $1, %rdi \n" /* @fd */ - "leaq 1f(%rip), %rsi \n" /* @buf: "hello..." */ - "movq $20, %rdx \n" /* @count */ - "syscall \n" - "int $0x03 \n" - "1: .ascii \"BLOB: hello, world!\\n\" \n" - ".global test_blob_size \n" - "test_blob_size: \n" - ".int test_blob_size - test_blob \n"); - /* rt_sigprocmask(), expects pointer to area for masks in %r15 */ asm volatile( ".global sigprocmask_blob \n" diff --git a/memcr.c b/memcr.c index b93bbc4..bd305e7 100644 --- a/memcr.c +++ b/memcr.c @@ -1839,11 +1839,10 @@ static int ctx_save(pid_t pid) ctx.pid = pid; /* allocate space to save original code */ - ctx.code_size = DIV_ROUND_UP(MAX(test_blob_size, - MAX(sigprocmask_blob_size, + ctx.code_size = DIV_ROUND_UP(MAX(sigprocmask_blob_size, MAX(mmap_blob_size, MAX(clone_blob_size, - munmap_blob_size)))), + munmap_blob_size))), sizeof(unsigned long)); ctx.code = malloc(sizeof(unsigned long) * ctx.code_size);