)]}'
{
  "commit": "9651cead2f1bb34b9b72f9c2c5dc81baea2b082e",
  "tree": "6fac3438312f6858002b0fbf22311d0f6524e795",
  "parents": [
    "2884596f5f385b5712c356310dd4125a089888a8"
  ],
  "author": {
    "name": "Michael Vogt",
    "email": "mvogt@redhat.com",
    "time": "Tue Oct 01 17:14:53 2024 +0200"
  },
  "committer": {
    "name": "Richard Henderson",
    "email": "richard.henderson@linaro.org",
    "time": "Tue Oct 08 06:31:36 2024 -0700"
  },
  "message": "linux-user: add openat2 support in linux-user\n\nThis commit adds support for the `openat2()` syscall in the\n`linux-user` userspace emulator.\n\nIt is implemented by extracting a new helper `maybe_do_fake_open()`\nout of the exiting `do_guest_openat()` and share that with the\nnew `do_guest_openat2()`. Unfortunately we cannot just make\ndo_guest_openat2() a superset of do_guest_openat() because the\nopenat2() syscall is stricter with the argument checking and\nwill return an error for invalid flags or mode combinations (which\nopen()/openat() will ignore).\n\nThe implementation is similar to SYSCALL_DEFINE(openat2), i.e.\na new `copy_struct_from_user()` is used that works the same\nas the kernels version to support backwards-compatibility\nfor struct syscall argument.\n\nInstead of including openat2.h we create a copy of `open_how`\nas `open_how_ver0` to ensure that if the structure grows we\ncan log a LOG_UNIMP warning.\n\nNote that in this commit using openat2() for a \"faked\" file in\n/proc will honor the \"resolve\" flags for\nRESOLVE_NO_{MAGIC,SYM}LINKS for path based access to /proc/self/exe\n(which is the only magic link we support for faked files).\nNote it will not catch special access via e.g. dirfd. This is not\ngreat but it seems similar to the exiting behavior when openat()\nis called with a dirfd to \"/proc\". Here too the fake file lookup\nmay not catch the special file because no dirfd is used to\ndetermine if the path is in /proc.\n\nSigned-off-by: Michael Vogt \u003cmvogt@redhat.com\u003e\nBuglink: https://github.com/osbuild/bootc-image-builder/issues/619\nReviewed-by: Laurent Vivier \u003claurent@vivier.eu\u003e\nMessage-ID: \u003c1c2c8c9db3731ed4c6fd9b10c63637c3e4caf8f5.1727795334.git.mvogt@redhat.com\u003e\nSigned-off-by: Richard Henderson \u003crichard.henderson@linaro.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a666986189488fcd0d1c4c5a741ffa3a2be2ec6c",
      "old_mode": 33188,
      "old_path": "linux-user/syscall.c",
      "new_id": "2febc3bc3f2cc39c6d33534fda3dcc07dd50c936",
      "new_mode": 33188,
      "new_path": "linux-user/syscall.c"
    },
    {
      "type": "modify",
      "old_id": "e08d08874013321d37a0c4abae4f495062b9cebe",
      "old_mode": 33188,
      "old_path": "linux-user/syscall_defs.h",
      "new_id": "de5091c977ec17e01beec8f63740b86a1842d737",
      "new_mode": 33188,
      "new_path": "linux-user/syscall_defs.h"
    }
  ]
}
