-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add NetBSD's compat syscalls #2640
Conversation
Hi Ayushi, Please rebase this change, it pushes 148 commits. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
1 similar comment
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
Codecov Report
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
I haven't checked the values, but this patch looks rational. |
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.
Were these generated using sys2syz or handwritten?
sys/netbsd/fs.txt
Outdated
compat_90_fhstatvfs1(fhp buffer[in], fh_size intptr, buf ptr[out, statvfs90], f flags[vfs_flags]) | ||
__fhstatvfs190(fhp buffer[in], fh_size intptr, buf ptr[out, statvfs], f flags[vfs_flags]) | ||
compat_90_getvfsstat(buf ptr[out, statvfs90], bufsize intptr[opt], f flags[vfs_flags]) | ||
__getvfsstat90(buf ptr[out, statvfs], bufsize intptr[opt], flags flags[vfs_flags]) |
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.
@ais2397 any reason why the bufsize fields are marked optional here?
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.
Was referring to the man page for getvfsstat, which mentions NULL could be passed to bufsize.
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.
From the man page, it only mentions NULL for the buf not for the bufsize, I think removing the [opt] would be more appropriate
If buf is given as NULL, getvfsstat() returns just the number of mounted
file systems.
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.
Sorry, would get it done right.
sys/netbsd/fs.txt
Outdated
__fhstat50(fhp buffer[in], fh_size intptr, sb ptr[out, stat]) | ||
compat_30_fhstatvfs1(fhp ptr[in, compat_30_fhandle], buf ptr[out, statvfs90], f flags[vfs_flags]) | ||
compat_90_fhstatvfs1(fhp buffer[in], fh_size intptr, buf ptr[out, statvfs90], f flags[vfs_flags]) | ||
__fhstatvfs190(fhp buffer[in], fh_size intptr, buf ptr[out, statvfs], f flags[vfs_flags]) |
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.
maybe we could use the len[] field here for the size? You seem to have used it in the other files for buffer size associations, any reason for not using them in this file?
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.
Yep, would include len[] in the description.
Interesting, can you share what/where is sys2syz? |
The syz-headerparser was not properly working for NetBSD, so during GSoC 2020, we worked on automating grammar generation up to a certain point, including extraction of ioctl calls. Here is the link to the repo : https://github.com/ais2397/sys2syz |
Thanks, added the link to #590 |
Sys2syz, mostly, however flags were added by hand. |
@ais2397 is there anything else to be done here? Shall I merge this? |
Yes, we can merge this. |
sys/netbsd: fixing descriptions
@R3x This one is ready to be merged. |
Syscalls added:
compat_90_getvfsstat
_getvfsstat90
compat_30_getfh
__getfh30
compat_30_fhopen
__fhopen40
compat_30_fhstat
compat_30___fhstat30
__fhstat50
compat_30_fhstatvfs1
compat_90_fhstatvfs1
__fhstatvfs190
ktrace
fktrace
compat_43_mmap
compat_30___stat13
compat_30___ltat13
compat_30___fstat13
compat_50___stat30
compat_50___lstat30
compat_50___fstat30
compat_90_statvfs1
compat_90_fstatvfs1
compat_43_gethostname
compat_43_sethostname
compat_43_ogethostid
compat_43_osethostid
compat_09_getdomainname
compat_09_setdomainname
pathconf
fpathconf
compat_43_ogetdirentries
compat_12_getdirentries
undelete
__posix_rename
__posix_chown
__posix_fchown
__posix_lchown
__posix_fadvise50
compat_43_osend
compat_43_orecv
compat_43_orecvmsg
compat_43_osendmsg