Running simple "hello world" JS script on NodeJS (tracking "epic")
I've run the following command in my Linux machine (to see which syscalls are being sent to the kernel for a very basic NodeJS program):
strace echo "console.log('hello')" | node
and I've got the following list (taking aside the ones already implemented):
accessopenatpread64mprotect
some of this calls could be related to Bash and not NodeJS, but if instead I run this:
strace node example.js # with the same JS script as before
we obtain this list (confirming that they are needed for NodeJS too):
- [ ]
access - [ ]
openat - [ ]
pread64 - [ ]
mprotect - [ ]
munmap - [ ]
set_robutst_list - [ ]
rt_sigprocmask - [ ]
prlimit64 - [ ]
pipe2 - [ ]
eventfd2 - [ ]
clone - [ ]
madvise - [ ]
futex: https://github.com/nuta/kerla/issues/2 - [ ]
epoll_ctl: https://github.com/nuta/kerla/issues/19 - [ ]
epoll_wait: https://github.com/nuta/kerla/issues/19 - [ ]
exit_group
I hope this can be useful to guide the next steps for this roadmap ( https://github.com/nuta/kerla/projects/1 ).
Thanks for sharing! This is what I needed to do next!
It seems we need to allow mapping executable pages (perhaps for JIT?) and implement epoll.
On Thu, Oct 28, 2021 at 22:36 Andrés Correa Casablanca < @.***> wrote:
I've run the following command in my Linux machine (to see which syscalls are being sent to the kernel for a very basic NodeJS program):
strace echo "console.log('hello')" | node
and I've got the following list (taking aside the ones already implemented):
- access
- openat
- mmap
- pread64
- mprotect
some of this calls could be related to Bash and not NodeJS, but if instead I run this:
strace node example.js # with the same JS script as before
we obtain this list (confirming that they are needed for NodeJS too):
- access
- openat
- mmap
- pread64
- mprotect
- munmap
- set_tid_address
- set_robutst_list
- rt_sigaction
- rt_sigprocmask
- prlimit64
- pipe2
- eventfd2
- clone
- madvise
- epoll_ctl
- exit_group
I hope this can be useful to guide the next steps for this roadmap ( https://github.com/nuta/kerla/projects/1 ).
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nuta/kerla/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGR2EQQDKKEA6A6SU4T6CTUJFNVNANCNFSM5G45IGIQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Seiya