From ba10a38ed0cf05082e488ed58b68483820024e91 Mon Sep 17 00:00:00 2001 From: Mateusz Poliwczak Date: Mon, 30 Sep 2024 18:01:10 +0000 Subject: [PATCH] runtime, internal/syscall/unix: mark getrandom vDSO as non-escaping Updates #66779 Updates #69577 Change-Id: I0dea5a30aab87aaa443e7e6646c1d07aa865ac1c GitHub-Last-Rev: 1cea46deb345369346efb2cb320fae1644466322 GitHub-Pull-Request: golang/go#69719 Reviewed-on: https://go-review.googlesource.com/c/go/+/616696 LUCI-TryBot-Result: Go LUCI Commit-Queue: Ian Lance Taylor Reviewed-by: Filippo Valsorda Reviewed-by: Michael Pratt Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- src/internal/syscall/unix/getrandom.go | 1 + src/runtime/vgetrandom_linux.go | 1 + 2 files changed, 2 insertions(+) diff --git a/src/internal/syscall/unix/getrandom.go b/src/internal/syscall/unix/getrandom.go index 2dbe19887c..db3e7ac0f0 100644 --- a/src/internal/syscall/unix/getrandom.go +++ b/src/internal/syscall/unix/getrandom.go @@ -13,6 +13,7 @@ import ( ) //go:linkname vgetrandom runtime.vgetrandom +//go:noescape func vgetrandom(p []byte, flags uint32) (ret int, supported bool) var getrandomUnsupported atomic.Bool diff --git a/src/runtime/vgetrandom_linux.go b/src/runtime/vgetrandom_linux.go index af0e9cad1e..c938909503 100644 --- a/src/runtime/vgetrandom_linux.go +++ b/src/runtime/vgetrandom_linux.go @@ -11,6 +11,7 @@ import ( "unsafe" ) +//go:noescape func vgetrandom1(buf *byte, length uintptr, flags uint32, state uintptr, stateSize uintptr) int var vgetrandomAlloc struct { -- 2.48.1