On 6/6/23 06:27, Ilya Leoshkevich wrote:
@@ -8518,7 +8522,11 @@ int do_guest_openat(CPUArchState *cpu_env, int dirfd, 
const char *pathname,
          return fd;
      }
- return safe_openat(dirfd, path(pathname), flags, mode);
+    if (safe) {
+        return safe_openat(dirfd, path(pathname), flags, mode);
+    } else {
+        return openat(dirfd, path(pathname), flags, mode);
+    }
  }

I'm not keen on this, as it seems like the wrong abstraction. But I can't immediately think of how it could be better structured.

The only concrete objection I have is the change of API, which could be fixed with return get_errno(openat(...)).

With that,

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~

Reply via email to