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

Add NetBSD's compat syscalls #2640

Merged
merged 1 commit into from
Oct 24, 2021
Merged

Add NetBSD's compat syscalls #2640

merged 1 commit into from
Oct 24, 2021

Conversation

@dvyukov
Copy link
Collaborator

dvyukov commented Jul 1, 2021

Hi Ayushi,

Please rebase this change, it pushes 148 commits.

@ais2397 ais2397 changed the title Add NetBSD's compat syscalls [Draft] Add NetBSD's compat syscalls Jul 1, 2021
@google-cla
Copy link

google-cla bot commented Jul 1, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla
Copy link

google-cla bot commented Jul 1, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@codecov
Copy link

codecov bot commented Jul 1, 2021

Codecov Report

Merging #2640 (a87a54c) into master (282f03f) will decrease coverage by 0.0%.
The diff coverage is n/a.

❗ Current head a87a54c differs from pull request most recent head d226ad9. Consider uploading reports for the commit d226ad9 to get more accurate results
| Impacted Files | Coverage Δ | |
|---|---|---|
| pkg/csource/csource.go | 74.7% <0.0%> (-4.5%) | ⬇️ |
| prog/mutation.go | 89.0% <0.0%> (-0.2%) | ⬇️ |
| prog/any.go | 83.5% <0.0%> (ø) | |
| pkg/osutil/osutil_linux.go | 0.0% <0.0%> (ø) | |
| pkg/osutil/osutil.go | 17.3% <0.0%> (+0.4%) | ⬆️ |

@google-cla
Copy link

google-cla bot commented Jul 1, 2021

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 @googlebot I consent. in this pull request.

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 cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@ais2397 ais2397 changed the title [Draft] Add NetBSD's compat syscalls Add NetBSD's compat syscalls Jul 1, 2021
@krytarowski
Copy link
Collaborator

I haven't checked the values, but this patch looks rational.

Copy link
Collaborator

@R3x R3x left a 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?

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])
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

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.

__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])
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@dvyukov
Copy link
Collaborator

dvyukov commented Jul 3, 2021

Were these generated using sys2syz or handwritten?

Interesting, can you share what/where is sys2syz?

@R3x
Copy link
Collaborator

R3x commented Jul 3, 2021

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

@dvyukov
Copy link
Collaborator

dvyukov commented Jul 3, 2021

Thanks, added the link to #590

@ais2397
Copy link
Contributor Author

ais2397 commented Jul 3, 2021

Were these generated using sys2syz or handwritten?

Sys2syz, mostly, however flags were added by hand.

@R3x
Copy link
Collaborator

R3x commented Jul 12, 2021

@ais2397 is there anything else to be done here? Shall I merge this?

@ais2397
Copy link
Contributor Author

ais2397 commented Oct 19, 2021

@ais2397 is there anything else to be done here? Shall I merge this?

Yes, we can merge this.

@ais2397
Copy link
Contributor Author

ais2397 commented Oct 24, 2021

@R3x This one is ready to be merged.

@R3x R3x merged commit 4f0000e into google:master Oct 24, 2021
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