Skip to content

Generic api for syscalls with versioned structs #14074

Description

@relkochta

A handful of the newer syscalls we've been adding (sched_setattr/sched_getattr, bpf, soon openat2) use versioned, extensible structs, where the kernel can add fields at the end of the struct, and earlier kernels validate that any unknown fields are zeroed out.

Linux has a single helper that's used kernel-wide, copy_struct_from_user(), for these syscalls. Currently, gVisor handles this on an ad-hoc basis.

At some point we should make a generic API for this and update all the call sites.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions