unix: add linux mseal system call

The mseal system call was added in Linux 6.10.

See https://lwn.net/Articles/954936.

Change-Id: Ic812a5d784effbc1f362045ffeb6f7e50ee5f8bb
GitHub-Last-Rev: de3924e954
GitHub-Pull-Request: golang/sys#209
Reviewed-on: https://go-review.googlesource.com/c/sys/+/600518
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
Mauri de Souza Meneguzzo
2024-07-27 09:20:42 +00:00
committed by Gopher Robot
parent 31ef9e726f
commit cde4660eb9
2 changed files with 17 additions and 0 deletions

View File

@@ -2592,3 +2592,4 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) {
}
//sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error)
//sys Mseal(b []byte, flags uint) (err error)

View File

@@ -2229,3 +2229,19 @@ func Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mseal(b []byte, flags uint) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSEAL, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}