summaryrefslogtreecommitdiffhomepage
path: root/pkg/ring0/kernel_unsafe.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-07-12 15:06:49 +0000
committergVisor bot <gvisor-bot@google.com>2021-07-12 15:06:49 +0000
commitbf97c23d1679690f0df5f7daa32795a839399f49 (patch)
treed2acc0cacccf318e5266bed7ee9cc8807e1ae4b8 /pkg/ring0/kernel_unsafe.go
parenta6333d999d80e980576c11a558b69ad3106952d2 (diff)
parent36a17a814bf90bad33eac25ddbb7a416143a4be7 (diff)
Merge release-20210628.0-35-g36a17a814 (automated)
Diffstat (limited to 'pkg/ring0/kernel_unsafe.go')
-rw-r--r--pkg/ring0/kernel_unsafe.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/ring0/kernel_unsafe.go b/pkg/ring0/kernel_unsafe.go
index 16955ad91..04c60d0a7 100644
--- a/pkg/ring0/kernel_unsafe.go
+++ b/pkg/ring0/kernel_unsafe.go
@@ -35,7 +35,6 @@ func kernelAddr(obj interface{}) uintptr {
// kernelFunc returns the address of the given function.
//
//go:nosplit
-func kernelFunc(fn func()) uintptr {
- fnptr := (**uintptr)(unsafe.Pointer(&fn))
- return KernelStartAddress | **fnptr
+func kernelFunc(fn uintptr) uintptr {
+ return KernelStartAddress | fn
}