Skip to content

Commit 7e4d1d6

Browse files
committed
Remove WP parts
1 parent bce510f commit 7e4d1d6

File tree

1 file changed

+0
-27
lines changed
  • packages/orchestrator/internal/sandbox/uffd/userfaultfd

1 file changed

+0
-27
lines changed

packages/orchestrator/internal/sandbox/uffd/userfaultfd/serve.go

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -140,25 +140,6 @@ outerLoop:
140140
return fmt.Errorf("failed to map: %w", err)
141141
}
142142

143-
if pagefault.flags&UFFD_PAGEFAULT_FLAG_WP != 0 {
144-
eg.Go(func() error {
145-
defer func() {
146-
if r := recover(); r != nil {
147-
logger.Error("UFFD serve panic", zap.Any("offset", offset), zap.Any("pagesize", pagesize), zap.Any("panic", r))
148-
}
149-
}()
150-
151-
wpErr := u.removeWriteProtection(addr, pagesize)
152-
if wpErr != nil {
153-
return fmt.Errorf("error removing write protection from page %d", addr)
154-
}
155-
156-
return nil
157-
})
158-
159-
continue
160-
}
161-
162143
// This prevents serving missing pages multiple times.
163144
// For normal sized pages with swap on, the behavior seems not to be properly described in docs
164145
// and it's not clear if the missing can be legitimately triggered multiple times.
@@ -168,14 +149,6 @@ outerLoop:
168149

169150
missingChunksBeingHandled[offset] = struct{}{}
170151

171-
if pagefault.flags == 0 {
172-
// fmt.Fprintf(os.Stderr, "read trigger %d %d\n", addr, offset/pagesize)
173-
}
174-
175-
if pagefault.flags&UFFD_PAGEFAULT_FLAG_WRITE != 0 {
176-
// fmt.Fprintf(os.Stderr, "write trigger %d %d\n", addr, offset/pagesize)
177-
}
178-
179152
eg.Go(func() error {
180153
defer func() {
181154
if r := recover(); r != nil {

0 commit comments

Comments
 (0)