-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Remove parameter 'segflg' from the function *exec_copyin_args #1590
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ok to me.
I don't think it makes sense to have the extra commit to wrap a long line - this can be done in the main commit since you are modifying that line already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, we do have a UIO_SYSSPACE fname
when starting the init process (pid 1), but I think there we don't call exec_copyin_args() but construct the args directly. Hmm, seems even before that change (commit 3a325de) we were still getting the fname
from userspace in that case.
I think this is fine.
I send the pull request and then I receive a email from the github. It says that a line is too long so I send a second commit. I don't know how to change the oroginal pull request. This is the only way I know how to fix this error. |
To modify the most recent commit, you can stage changes as normal and run Using |
624c00b
to
5a9a673
Compare
In kern "copyin" means copy data from user address space to kernel address space. But in the function *exec_copyin_args there is a parameter 'segflg' that is used to specify the address space of the parameter 'fname'. In the source code there are two places where 'segflg' are not UIO_USERSPACE. In both cases the 'fname' argument are NULL so the argument 'segflg' are not important there. So it is safe to remove the parameter 'segflg' from the function *exec_copyin_args.
5a9a673
to
4ab7d3d
Compare
In kernel "copyin" means copy data from user address space to kernel address space. But in the function *exec_copyin_args there is a parameter 'segflg' that is used to specify the address space of the parameter 'fname'. In the source code there are two places where 'segflg' are not UIO_USERSPACE. In both cases the 'fname' argument are NULL so the argument 'segflg' are not important there. So it is safe to remove the parameter 'segflg' from the function *exec_copyin_args.