forked from gramineproject/graphene
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a regression on exec in trying to repro gramineproject#59. Remove…
… an assertion that doesn't seem to be doing much good, given that the size is always statically determined in hex2str. Fixing the bound of a debug buffer in SGX PAL Rewrite bytes2hexstr; Add two new macros, alloca_bytes2hexstr() and malloc_bytes2hexstr(). Remove HASHBUF_SIZE Add comments for the bytes2hexstr() macros. Add a compile-time assertion
- Loading branch information
Showing
11 changed files
with
107 additions
and
73 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* -*- mode:c; c-file-style:"k&r"; c-basic-offset: 4; tab-width:4; indent-tabs-mode:nil; mode:auto-fill; fill-column:78; -*- */ | ||
/* vim: set ts=4 sw=4 et tw=78 fo=cqt wm=0: */ | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
int main(int argc, char ** argv, const char ** envp) | ||
{ | ||
FILE * out = stdout; | ||
|
||
if (argc > 1) { | ||
int fd = atoi(argv[argc - 1]); | ||
printf("inherited file descriptor %d\n", fd); | ||
out = fdopen(fd, "a"); | ||
if (!out) { | ||
perror("fdopen"); | ||
exit(1); | ||
} | ||
} | ||
|
||
fprintf(out, "Hello World (%s)!\n", argv[0]); | ||
fprintf(out, "envp[\'IN_EXECVE\'] = %s\n", getenv("IN_EXECVE")); | ||
fprintf(out, "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ | ||
\n"); | ||
return 0; | ||
} |
2 changes: 1 addition & 1 deletion
2
...test/native/exec_victim.manifest.template → .../regression/exec_victim.manifest.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters