summaryrefslogtreecommitdiffhomepage
path: root/pkg/ring0/kernel_unsafe.go
diff options
context:
space:
mode:
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
}