Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling system calls hijacking when using Node.js applications - tes… #366

Merged
merged 1 commit into from
Aug 17, 2017

Conversation

octaviansoldea
Copy link

@octaviansoldea octaviansoldea commented Aug 15, 2017

Hello Octavian (Purdila), Hajime, Dear Reviewers

Following several previous communications, please find enclosed a modification proposed that uses lkl only. A second part, i.e. modifying constants will be added asap.

Best regards,
Octavian Soldea


This change is Reviewable

@lkl-jenkins
Copy link

Can one of the admins verify this patch?

@octaviansoldea
Copy link
Author

Dear Reviewer,

In order to avoid failure tests, I checked out the master and added the proposed changes. In my local machine I have a Node.js application that works on top of the new version of lkl. In this context, I do not understand the messages reported by the testing system. Could you please help?

I am looking forward to hearing from you.

Thank you in advance and best regards,
Octavian

@thehajime
Copy link
Member

In order to avoid failure tests, I checked out the master and added the proposed changes. In my local machine I have a Node.js application that works on top of the new version of lkl. In this context, I do not understand the messages reported by the testing system. Could you please help?

The test error is due to the coding style check reported by a script (scripts/checkpatch.pl). The script reports errors if the submitted patches (commits) does not fulfill the coding style guideline of linux kernel. See more detail in the documents.

https://github.com/lkl/linux/blob/master/Documentation/process/submitting-patches.rst#4-style-check-your-changes
https://github.com/lkl/linux/blob/master/Documentation/process/coding-style.rst

Copy link
Member

@tavip tavip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch Octavian, please see my comments inline.

int epoll_create(int flags)
{
int nRes;
lkl_printf("lkl: epoll_create\n");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a debug leftover, lets remove it.

@@ -160,6 +160,19 @@ HOOK_FD_CALL(splice)
HOOK_FD_CALL(vmsplice)
HOOK_CALL_USE_HOST_BEFORE_START(pipe);

HOOK_CALL_USE_HOST_BEFORE_START(accept4);
int accept4(int fd, struct sockaddr* addr, socklen_t* addrlen, int flags)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use struct sockaddr *addr instead of struct sockaddr* addr to stay consistent with the Linux kernel coding style.

@@ -292,6 +305,24 @@ int select(int nfds, fd_set *r, fd_set *w, fd_set *e, struct timeval *t)
}

HOOK_CALL_USE_HOST_BEFORE_START(epoll_create);
int epoll_create(int flags)
{
int nRes;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use camelCase variable and function name, to stay consistent with the Linux kernel coding style. For exaple, you can use res or ret. Use a newline to separate variable definition from the function code.

{
int nRes;
lkl_printf("lkl: epoll_create\n");
if(!lkl_running)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a space between if and (. Again, Linux kernel coding style.

@octaviansoldea octaviansoldea force-pushed the nodejs-enabled branch 2 times, most recently from c6dc790 to 8b791da Compare August 16, 2017 23:39
@tavip
Copy link
Member

tavip commented Aug 17, 2017

lkl-jenkins: test this please

@tavip
Copy link
Member

tavip commented Aug 17, 2017

@lkl-jenkins: test this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants