From 660f1203ff1949a7b7869b801f4aa2133d30b91f Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Tue, 3 Jul 2018 12:52:39 -0700 Subject: Fix runsc VDSO mapping 80bdf8a4068de3ac4a73b6b61a0cdcfe3e3571af accidentally moved vdso into an inner scope, never assigning the vdso variable passed to the Kernel and thus skipping VDSO mappings. Fix this and remove the ability for loadVDSO to skip VDSO mappings, since tests that do so are gone. PiperOrigin-RevId: 203169135 Change-Id: Ifd8cadcbaf82f959223c501edcc4d83d05327eba --- pkg/sentry/loader/vdso.go | 6 ------ 1 file changed, 6 deletions(-) (limited to 'pkg') diff --git a/pkg/sentry/loader/vdso.go b/pkg/sentry/loader/vdso.go index 037576e41..2e8693f8e 100644 --- a/pkg/sentry/loader/vdso.go +++ b/pkg/sentry/loader/vdso.go @@ -278,12 +278,6 @@ func PrepareVDSO(p platform.Platform) (*VDSO, error) { // // loadVDSO takes a reference on the VDSO and parameter page FrameRegions. func loadVDSO(ctx context.Context, m *mm.MemoryManager, v *VDSO, bin loadedELF) (usermem.Addr, error) { - if v == nil { - // Should be used only by tests. - ctx.Warningf("No VDSO provided, skipping VDSO mapping") - return 0, nil - } - if v.os != bin.os { ctx.Warningf("Binary ELF OS %v and VDSO ELF OS %v differ", bin.os, v.os) return 0, syserror.ENOEXEC -- cgit v1.2.3