Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Issue 7737022: Change make-syscalls.sh to make syscall interception possible. (Closed)

Created:
9 years, 3 months ago by khim
Modified:
9 years, 3 months ago
CC:
native-client-reviews_googlegroups.com, Mark Seaborn
Base URL:
http://git.chromium.org/native_client/nacl-glibc.git@master
Visibility:
Public.

Description

Change make-syscalls.sh to make syscall interception possible. This is second patch in series: it makes it possible to intercept auto-generated syscalls. It uses "#define/#undef" trick to circumvent type checking since syscalls.list contains only rough information about types (int, char * or pointer to some struct - but WHICH struct it's not known). Long-term solution it should probably be replaced with a simple set of .c files - or may be just better auto-generation mechanism. R=pasko@google.com Committed: http://git.chromium.org/gitweb?p=native_client/nacl-glibc.git;a=commit;h=3a982eb

Patch Set 1 #

Total comments: 10

Patch Set 2 : Cosmetic changes, added posix_fadvice.c #

Patch Set 3 : $undef => #undef #

Patch Set 4 : base => name #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1014 lines, -76 lines) Patch
M misc/Makefile View 1 chunk +1 line, -1 line 0 comments Download
M misc/Versions View 1 chunk +0 lines, -3 lines 0 comments Download
M sysdeps/nacl/closedir.c View 1 chunk +0 lines, -1 line 0 comments Download
M sysdeps/nacl/dl-sysdep.c View 1 chunk +1 line, -1 line 0 comments Download
M sysdeps/nacl/irt_syscalls.h View 1 chunk +17 lines, -4 lines 0 comments Download
M sysdeps/nacl/opendir.c View 1 chunk +0 lines, -1 line 0 comments Download
A sysdeps/nacl/posix_fallocate.c View 1 1 chunk +3 lines, -0 lines 0 comments Download
A sysdeps/nacl/pselect.c View 1 chunk +1 line, -0 lines 0 comments Download
M sysdeps/nacl/readdir.c View 1 chunk +1 line, -1 line 0 comments Download
A sysdeps/nacl/sigaction.c View 1 chunk +1 line, -0 lines 0 comments Download
M sysdeps/nacl/syscalls.list View 1 chunk +5 lines, -1 line 0 comments Download
M sysdeps/nacl/sysdep.h View 42 chunks +898 lines, -36 lines 0 comments Download
M sysdeps/nacl/umount.c View 1 chunk +15 lines, -14 lines 0 comments Download
D sysdeps/nacl/unimpl_syscall.c View 1 chunk +0 lines, -8 lines 0 comments Download
A sysdeps/nacl/unsupported/call_fallocate.S View 1 chunk +2 lines, -0 lines 0 comments Download
A sysdeps/nacl/unsupported/call_pselect6.c View 1 1 chunk +2 lines, -0 lines 0 comments Download
M sysdeps/unix/make-syscalls.sh View 1 2 3 2 chunks +67 lines, -5 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
khim
9 years, 3 months ago (2011-09-05 08:36:41 UTC) #1
pasko-google - do not use
LGTM http://codereview.chromium.org/7737022/diff/1/sysdeps/nacl/unsupported/call_fallocate.S File sysdeps/nacl/unsupported/call_fallocate.S (right): http://codereview.chromium.org/7737022/diff/1/sysdeps/nacl/unsupported/call_fallocate.S#newcode1 sysdeps/nacl/unsupported/call_fallocate.S:1: /* We implement fallocate in posix_fallocate.c and we ...
9 years, 3 months ago (2011-09-06 14:18:56 UTC) #2
khim
9 years, 3 months ago (2011-09-06 14:25:34 UTC) #3
http://codereview.chromium.org/7737022/diff/1/sysdeps/nacl/unsupported/call_f...
File sysdeps/nacl/unsupported/call_fallocate.S (right):

http://codereview.chromium.org/7737022/diff/1/sysdeps/nacl/unsupported/call_f...
sysdeps/nacl/unsupported/call_fallocate.S:1: /* We implement fallocate in
posix_fallocate.c and we don't need
On 2011/09/06 14:18:56, pasko wrote:
> nit: let's name all the empty override files with suffix .c, just for
> consistency 

Done.

http://codereview.chromium.org/7737022/diff/1/sysdeps/unix/make-syscalls.sh
File sysdeps/unix/make-syscalls.sh (right):

http://codereview.chromium.org/7737022/diff/1/sysdeps/unix/make-syscalls.sh#n...
sysdeps/unix/make-syscalls.sh:164: set `echo $args |
On 2011/09/06 14:18:56, pasko wrote:
> type=`echo ...`

We need sed construct to pull other argument types.

http://codereview.chromium.org/7737022/diff/1/sysdeps/unix/make-syscalls.sh#n...
sysdeps/unix/make-syscalls.sh:176: *) set int;;
On 2011/09/06 14:18:56, pasko wrote:
> too many leading spaces

Done.

http://codereview.chromium.org/7737022/diff/1/sysdeps/unix/make-syscalls.sh#n...
sysdeps/unix/make-syscalls.sh:197: echo "	 echo '#define $name ${name}_RENAMED';
\\"
On 2011/09/06 14:18:56, pasko wrote:
> base=$name
> ..
> esac
> echo "..."

Done.

http://codereview.chromium.org/7737022/diff/1/sysdeps/unix/make-syscalls.sh#n...
sysdeps/unix/make-syscalls.sh:215: echo "	 echo '#undef $name'; \\"
On 2011/09/06 14:18:56, pasko wrote:
> ditto

Done.

Powered by Google App Engine
This is Rietveld 408576698