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

x/sys/unix: missing Linux system call name_to_handle_at #31521

Closed
bradfitz opened this issue Apr 17, 2019 · 3 comments
Closed

x/sys/unix: missing Linux system call name_to_handle_at #31521

bradfitz opened this issue Apr 17, 2019 · 3 comments
Labels
FeatureRequest FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@bradfitz
Copy link
Contributor

I needed to call the Linux name_to_handle_at (SYS_NAME_TO_HANDLE_AT = 303) system call for a test but it's not in x/sys/unix.

Likewise, looks like we need a type for struct file_handle *.

@tklauser, interested in adding? :)

@bradfitz bradfitz added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Apr 17, 2019
@gopherbot gopherbot added this to the Unreleased milestone Apr 17, 2019
@bradfitz
Copy link
Contributor Author

Actually, the C struct isn't very mappable to Go types:

           struct file_handle {      
               unsigned int  handle_bytes;   /* Size of f_handle [in, out] */ 
               int           handle_type;    /* Handle type [out] */
               unsigned char f_handle[0];    /* File identifier (sized by    
                                                caller) [out] */
           };

So we'd likely need some higher-level Go wrapper around the system calls that dealt with the unsafety of making such a struct for the kernel.

@cuonglm
Copy link
Member

cuonglm commented Apr 17, 2019

@bradfitz duplicate of #30537

@bradfitz
Copy link
Contributor Author

@cuonglm, whoops, thanks.

@golang golang locked and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FeatureRequest FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants