[sys] unix: fsmount fspick fsopen fsconfig linux syscall

95 views
Skip to first unread message

Alexey Perevalov (Gerrit)

unread,
Apr 5, 2022, 11:05:03 AM4/5/22
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Alexey Perevalov has uploaded this change for review.

View Change

unix: fsmount fspick fsopen fsconfig linux syscall

Patches were submitted to Linux manpages:
https://lwn.net/Articles/802096/, but not yet applied.
Generated on linux kernel v5.16.

Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
---
M unix/linux/types.go
M unix/syscall_linux.go
M unix/zsyscall_linux.go
M unix/ztypes_linux.go
4 files changed, 117 insertions(+), 0 deletions(-)

diff --git a/unix/linux/types.go b/unix/linux/types.go
index c8d176e..8a2d090 100644
--- a/unix/linux/types.go
+++ b/unix/linux/types.go
@@ -905,6 +905,24 @@

OPEN_TREE_CLONE = C.OPEN_TREE_CLONE
OPEN_TREE_CLOEXEC = C.OPEN_TREE_CLOEXEC
+
+ FSOPEN_CLOEXEC = C.FSOPEN_CLOEXEC
+
+ FSPICK_CLOEXEC = C.FSPICK_CLOEXEC
+ FSPICK_SYMLINK_NOFOLLOW = C.FSPICK_SYMLINK_NOFOLLOW
+ FSPICK_NO_AUTOMOUNT = C.FSPICK_NO_AUTOMOUNT
+ FSPICK_EMPTY_PATH = C.FSPICK_EMPTY_PATH
+
+ FSCONFIG_SET_FLAG = C.FSCONFIG_SET_FLAG
+ FSCONFIG_SET_STRING = C.FSCONFIG_SET_STRING
+ FSCONFIG_SET_BINARY = C.FSCONFIG_SET_BINARY
+ FSCONFIG_SET_PATH = C.FSCONFIG_SET_PATH
+ FSCONFIG_SET_PATH_EMPTY = C.FSCONFIG_SET_PATH_EMPTY
+ FSCONFIG_SET_FD = C.FSCONFIG_SET_FD
+ FSCONFIG_CMD_CREATE = C.FSCONFIG_CMD_CREATE
+ FSCONFIG_CMD_RECONFIGURE = C.FSCONFIG_CMD_RECONFIGURE
+
+ FSMOUNT_CLOEXEC = C.FSMOUNT_CLOEXEC
)

type OpenHow C.struct_open_how
diff --git a/unix/syscall_linux.go b/unix/syscall_linux.go
index 298323e..81769bb 100644
--- a/unix/syscall_linux.go
+++ b/unix/syscall_linux.go
@@ -1829,6 +1829,10 @@
//sys Fremovexattr(fd int, attr string) (err error)
//sys Fsetxattr(fd int, attr string, dest []byte, flags int) (err error)
//sys Fsync(fd int) (err error)
+//sys Fsconfig(fd *int, cmd int, key string, value []byte, aux int) (err error)
+//sys Fsmount(fd int, flags int, mountAttrs int) (fd int, err error)
+//sys Fsopen(fsName string, flags int) (fd int, err error)
+//sys Fspick(dirfd int, pathName string, flags int) (fd int, err error)
//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
//sysnb Getpgid(pid int) (pgid int, err error)

diff --git a/unix/zsyscall_linux.go b/unix/zsyscall_linux.go
index ca65ac8..8ff8a19 100644
--- a/unix/zsyscall_linux.go
+++ b/unix/zsyscall_linux.go
@@ -828,6 +828,70 @@

// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

+func Fsconfig(fd *int, cmd int, key string, value []byte, aux int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(key)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(value) > 0 {
+ _p1 = unsafe.Pointer(&value[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_FSCONFIG, uintptr(unsafe.Pointer(fd)), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(value)), uintptr(aux))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsmount(fd int, flags int, mountAttrs int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_FSMOUNT, uintptr(fd), uintptr(flags), uintptr(mountAttrs))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsopen(fsName string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsName)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_FSOPEN, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fspick(dirfd int, pathName string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(pathName)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_FSPICK, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getdents(fd int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
diff --git a/unix/ztypes_linux.go b/unix/ztypes_linux.go
index e61891d..d8f4ae9 100644
--- a/unix/ztypes_linux.go
+++ b/unix/ztypes_linux.go
@@ -756,6 +756,24 @@
AT_EACCESS = 0x200

OPEN_TREE_CLONE = 0x1
+
+ FSOPEN_CLOEXEC = 0x1
+
+ FSPICK_CLOEXEC = 0x1
+ FSPICK_SYMLINK_NOFOLLOW = 0x2
+ FSPICK_NO_AUTOMOUNT = 0x4
+ FSPICK_EMPTY_PATH = 0x8
+
+ FSCONFIG_SET_FLAG = 0x0
+ FSCONFIG_SET_STRING = 0x1
+ FSCONFIG_SET_BINARY = 0x2
+ FSCONFIG_SET_PATH = 0x3
+ FSCONFIG_SET_PATH_EMPTY = 0x4
+ FSCONFIG_SET_FD = 0x5
+ FSCONFIG_CMD_CREATE = 0x6
+ FSCONFIG_CMD_RECONFIGURE = 0x7
+
+ FSMOUNT_CLOEXEC = 0x1
)

type OpenHow struct {

To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sys
Gerrit-Branch: master
Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
Gerrit-Change-Number: 398434
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
Gerrit-MessageType: newchange

Ian Lance Taylor (Gerrit)

unread,
Apr 5, 2022, 12:56:20 PM4/5/22
to Alexey Perevalov, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Brad Fitzpatrick, Tobias Klauser, Gopher Robot, golang-co...@googlegroups.com

Attention is currently required from: Alexey Perevalov, Tobias Klauser, Brad Fitzpatrick.

View Change

1 comment:

  • File unix/syscall_linux.go:

    • Patch Set #1, Line 1832: //sys Fsconfig(fd *int, cmd int, key string, value []byte, aux int) (err error)

      I don't understand why the fd argument is *int rather than int. But if it's really *int, then this won't work, because the type "int" has a different size for C and Go.

To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sys
Gerrit-Branch: master
Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
Gerrit-Change-Number: 398434
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-Attention: Alexey Perevalov <alexej.p...@gmail.com>
Gerrit-Attention: Tobias Klauser <tobias....@gmail.com>
Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
Gerrit-Comment-Date: Tue, 05 Apr 2022 16:56:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Alexey Perevalov (Gerrit)

unread,
Apr 6, 2022, 7:59:16 AM4/6/22
to goph...@pubsubhelper.golang.org, Ian Lance Taylor, Brad Fitzpatrick, Tobias Klauser, Gopher Robot, golang-co...@googlegroups.com

Attention is currently required from: Tobias Klauser, Brad Fitzpatrick, Ian Lance Taylor.

View Change

1 comment:

  • File unix/syscall_linux.go:

To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sys
Gerrit-Branch: master
Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
Gerrit-Change-Number: 398434
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-Attention: Tobias Klauser <tobias....@gmail.com>
Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
Gerrit-Comment-Date: Wed, 06 Apr 2022 11:59:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
Gerrit-MessageType: comment

Alexey Perevalov (Gerrit)

unread,
Apr 6, 2022, 8:00:37 AM4/6/22
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Attention is currently required from: Tobias Klauser, Brad Fitzpatrick, Ian Lance Taylor.

Alexey Perevalov uploaded patch set #2 to this change.

View Change

unix: fsmount fspick fsopen fsconfig linux syscall

Patches were submitted to Linux manpages:
https://lwn.net/Articles/802096/, but not yet applied.
Generated on linux kernel v5.16.

Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
---
M unix/linux/types.go
M unix/syscall_linux.go
M unix/zsyscall_linux.go
M unix/ztypes_linux.go
4 files changed, 117 insertions(+), 0 deletions(-)

To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sys
Gerrit-Branch: master
Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
Gerrit-Change-Number: 398434
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-Attention: Tobias Klauser <tobias....@gmail.com>
Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
Gerrit-MessageType: newpatchset

Ian Lance Taylor (Gerrit)

unread,
Apr 6, 2022, 9:59:33 AM4/6/22
to Alexey Perevalov, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Brad Fitzpatrick, Tobias Klauser, Gopher Robot, golang-co...@googlegroups.com

Attention is currently required from: Alexey Perevalov, Tobias Klauser, Brad Fitzpatrick.

Patch set 2:Run-TryBot +1Code-Review +2

View Change

1 comment:

To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sys
Gerrit-Branch: master
Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
Gerrit-Change-Number: 398434
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-Attention: Alexey Perevalov <alexej.p...@gmail.com>
Gerrit-Attention: Tobias Klauser <tobias....@gmail.com>
Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
Gerrit-Comment-Date: Wed, 06 Apr 2022 13:59:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Ian Lance Taylor (Gerrit)

unread,
Apr 6, 2022, 10:05:12 AM4/6/22
to Alexey Perevalov, goph...@pubsubhelper.golang.org, Gopher Robot, Ian Lance Taylor, Brad Fitzpatrick, Tobias Klauser, golang-co...@googlegroups.com

Attention is currently required from: Alexey Perevalov, Tobias Klauser, Brad Fitzpatrick.

Patch set 2:-Code-Review

View Change

    To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: sys
    Gerrit-Branch: master
    Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
    Gerrit-Change-Number: 398434
    Gerrit-PatchSet: 2
    Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
    Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
    Gerrit-Reviewer: Gopher Robot <go...@golang.org>
    Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
    Gerrit-Attention: Alexey Perevalov <alexej.p...@gmail.com>
    Gerrit-Attention: Tobias Klauser <tobias....@gmail.com>
    Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
    Gerrit-Comment-Date: Wed, 06 Apr 2022 14:05:08 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Alexey Perevalov (Gerrit)

    unread,
    Apr 11, 2022, 1:26:26 PM4/11/22
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

    Attention is currently required from: Alexey Perevalov, Tobias Klauser, Brad Fitzpatrick.

    Alexey Perevalov uploaded patch set #3 to this change.

    View Change

    unix: fsmount fspick fsopen linux syscall


    Patches were submitted to Linux manpages:
    https://lwn.net/Articles/802096/, but not yet applied.
    Generated on linux kernel v5.16.

    Fsconfig couldn't implemented by generator, it requires
    special cases handling.


    Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
    ---
    M unix/linux/types.go
    M unix/syscall_linux.go
    M unix/zsyscall_linux.go
    M unix/ztypes_linux.go
    4 files changed, 80 insertions(+), 0 deletions(-)

    To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: sys
    Gerrit-Branch: master
    Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
    Gerrit-Change-Number: 398434
    Gerrit-PatchSet: 3
    Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
    Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
    Gerrit-Reviewer: Gopher Robot <go...@golang.org>
    Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
    Gerrit-Attention: Alexey Perevalov <alexej.p...@gmail.com>
    Gerrit-Attention: Tobias Klauser <tobias....@gmail.com>
    Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
    Gerrit-MessageType: newpatchset

    Alexey Perevalov (Gerrit)

    unread,
    Apr 11, 2022, 1:28:28 PM4/11/22
    to goph...@pubsubhelper.golang.org, Gopher Robot, Ian Lance Taylor, Brad Fitzpatrick, Tobias Klauser, golang-co...@googlegroups.com

    Attention is currently required from: Tobias Klauser, Brad Fitzpatrick.

    View Change

    1 comment:

    • Patchset:

      • Patch Set #3:

        fsconfig will be in the next patch, since too many questions with it.

    To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: sys
    Gerrit-Branch: master
    Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
    Gerrit-Change-Number: 398434
    Gerrit-PatchSet: 3
    Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
    Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
    Gerrit-Reviewer: Gopher Robot <go...@golang.org>
    Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
    Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
    Gerrit-Attention: Tobias Klauser <tobias....@gmail.com>
    Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
    Gerrit-Comment-Date: Mon, 11 Apr 2022 17:28:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Ian Lance Taylor (Gerrit)

    unread,
    Apr 11, 2022, 7:19:34 PM4/11/22
    to Alexey Perevalov, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, Brad Fitzpatrick, Tobias Klauser, golang-co...@googlegroups.com

    Attention is currently required from: Alexey Perevalov, Tobias Klauser, Brad Fitzpatrick.

    Patch set 3:Run-TryBot +1

    View Change

      To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: sys
      Gerrit-Branch: master
      Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
      Gerrit-Change-Number: 398434
      Gerrit-PatchSet: 3
      Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
      Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
      Gerrit-Reviewer: Gopher Robot <go...@golang.org>
      Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
      Gerrit-Attention: Alexey Perevalov <alexej.p...@gmail.com>
      Gerrit-Attention: Tobias Klauser <tobias....@gmail.com>
      Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
      Gerrit-Comment-Date: Mon, 11 Apr 2022 23:19:30 +0000

      Ian Lance Taylor (Gerrit)

      unread,
      Apr 11, 2022, 7:27:12 PM4/11/22
      to Alexey Perevalov, goph...@pubsubhelper.golang.org, Gopher Robot, Ian Lance Taylor, Brad Fitzpatrick, Tobias Klauser, golang-co...@googlegroups.com

      Attention is currently required from: Alexey Perevalov, Tobias Klauser, Brad Fitzpatrick.

      Patch set 3:Auto-Submit +1Code-Review +2

      View Change

      1 comment:

      To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: sys
      Gerrit-Branch: master
      Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
      Gerrit-Change-Number: 398434
      Gerrit-PatchSet: 3
      Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
      Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
      Gerrit-Reviewer: Gopher Robot <go...@golang.org>
      Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
      Gerrit-Reviewer: Ian Lance Taylor <ia...@google.com>
      Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
      Gerrit-Attention: Alexey Perevalov <alexej.p...@gmail.com>
      Gerrit-Attention: Tobias Klauser <tobias....@gmail.com>
      Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
      Gerrit-Comment-Date: Mon, 11 Apr 2022 23:27:08 +0000

      Tobias Klauser (Gerrit)

      unread,
      Apr 12, 2022, 2:41:28 AM4/12/22
      to Alexey Perevalov, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, Ian Lance Taylor, Brad Fitzpatrick, golang-co...@googlegroups.com

      Attention is currently required from: Alexey Perevalov, Brad Fitzpatrick.

      Patch set 3:Code-Review +2

      View Change

        To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: sys
        Gerrit-Branch: master
        Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
        Gerrit-Change-Number: 398434
        Gerrit-PatchSet: 3
        Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
        Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@google.com>
        Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
        Gerrit-Attention: Alexey Perevalov <alexej.p...@gmail.com>
        Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
        Gerrit-Comment-Date: Tue, 12 Apr 2022 06:41:24 +0000

        Tobias Klauser (Gerrit)

        unread,
        Apr 12, 2022, 2:42:05 AM4/12/22
        to Alexey Perevalov, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, Ian Lance Taylor, Brad Fitzpatrick, golang-co...@googlegroups.com

        Attention is currently required from: Alexey Perevalov, Brad Fitzpatrick, Ian Lance Taylor.

        View Change

        1 comment:

        • File unix/syscall_linux.go:

          • My fault, sorry, infidelity it should be int, not a *int, I tried it in runc (https://github. […]

            Done

        To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: sys
        Gerrit-Branch: master
        Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
        Gerrit-Change-Number: 398434
        Gerrit-PatchSet: 3
        Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
        Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
        Gerrit-Reviewer: Gopher Robot <go...@golang.org>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Reviewer: Ian Lance Taylor <ia...@google.com>
        Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
        Gerrit-Attention: Alexey Perevalov <alexej.p...@gmail.com>
        Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
        Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
        Gerrit-Comment-Date: Tue, 12 Apr 2022 06:42:00 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Alexey Perevalov <alexej.p...@gmail.com>
        Comment-In-Reply-To: Ian Lance Taylor <ia...@golang.org>
        Gerrit-MessageType: comment

        Tobias Klauser (Gerrit)

        unread,
        Apr 12, 2022, 2:55:02 AM4/12/22
        to Alexey Perevalov, goph...@pubsubhelper.golang.org, Ian Lance Taylor, Gopher Robot, Ian Lance Taylor, Brad Fitzpatrick, golang-co...@googlegroups.com

        Attention is currently required from: Alexey Perevalov, Brad Fitzpatrick, Ian Lance Taylor.

        Patch set 3:Auto-Submit +1

        View Change

          To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: sys
          Gerrit-Branch: master
          Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
          Gerrit-Change-Number: 398434
          Gerrit-PatchSet: 3
          Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
          Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
          Gerrit-Reviewer: Gopher Robot <go...@golang.org>
          Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Reviewer: Ian Lance Taylor <ia...@google.com>
          Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
          Gerrit-Attention: Alexey Perevalov <alexej.p...@gmail.com>
          Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
          Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
          Gerrit-Comment-Date: Tue, 12 Apr 2022 06:54:58 +0000

          Benny Siegert (Gerrit)

          unread,
          Apr 12, 2022, 3:17:29 AM4/12/22
          to Alexey Perevalov, goph...@pubsubhelper.golang.org, Benny Siegert, Tobias Klauser, Ian Lance Taylor, Gopher Robot, Ian Lance Taylor, Brad Fitzpatrick, golang-co...@googlegroups.com

          Attention is currently required from: Alexey Perevalov, Brad Fitzpatrick, Ian Lance Taylor.

          Patch set 3:Code-Review +1

          View Change

            To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: sys
            Gerrit-Branch: master
            Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
            Gerrit-Change-Number: 398434
            Gerrit-PatchSet: 3
            Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
            Gerrit-Reviewer: Benny Siegert <bsie...@gmail.com>
            Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Reviewer: Gopher Robot <go...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@google.com>
            Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
            Gerrit-Attention: Alexey Perevalov <alexej.p...@gmail.com>
            Gerrit-Attention: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Attention: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Comment-Date: Tue, 12 Apr 2022 07:17:24 +0000

            Gopher Robot (Gerrit)

            unread,
            Apr 12, 2022, 3:17:43 AM4/12/22
            to Alexey Perevalov, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Benny Siegert, Tobias Klauser, Ian Lance Taylor, Ian Lance Taylor, Brad Fitzpatrick, golang-co...@googlegroups.com

            Gopher Robot submitted this change.

            View Change


            Approvals: Benny Siegert: Looks good to me, but someone else must approve Tobias Klauser: Looks good to me, approved; Automatically submit change Ian Lance Taylor: Looks good to me, approved; Automatically submit change Ian Lance Taylor: Run TryBots Gopher Robot: TryBots succeeded
            unix: fsmount fspick fsopen linux syscall

            Patches were submitted to Linux manpages:
            https://lwn.net/Articles/802096/, but not yet applied.
            Generated on linux kernel v5.16.

            Fsconfig couldn't implemented by generator, it requires
            special cases handling.

            Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
            Reviewed-on: https://go-review.googlesource.com/c/sys/+/398434
            Run-TryBot: Ian Lance Taylor <ia...@golang.org>
            TryBot-Result: Gopher Robot <go...@golang.org>
            Reviewed-by: Ian Lance Taylor <ia...@google.com>
            Auto-Submit: Ian Lance Taylor <ia...@google.com>
            Reviewed-by: Tobias Klauser <tobias....@gmail.com>
            Auto-Submit: Tobias Klauser <tobias....@gmail.com>
            Reviewed-by: Benny Siegert <bsie...@gmail.com>

            ---
            M unix/linux/types.go
            M unix/syscall_linux.go
            M unix/zsyscall_linux.go
            M unix/ztypes_linux.go
            4 files changed, 88 insertions(+), 0 deletions(-)

            diff --git a/unix/linux/types.go b/unix/linux/types.go
            index 8065a33..af78e11 100644
            --- a/unix/linux/types.go
            +++ b/unix/linux/types.go
            @@ -914,6 +914,15 @@
            MOVE_MOUNT_T_AUTOMOUNTS = C.MOVE_MOUNT_T_AUTOMOUNTS
            MOVE_MOUNT_T_EMPTY_PATH = C.MOVE_MOUNT_T_EMPTY_PATH
            MOVE_MOUNT_SET_GROUP = C.MOVE_MOUNT_SET_GROUP

            +
            + FSOPEN_CLOEXEC = C.FSOPEN_CLOEXEC
            +
            + FSPICK_CLOEXEC = C.FSPICK_CLOEXEC
            + FSPICK_SYMLINK_NOFOLLOW = C.FSPICK_SYMLINK_NOFOLLOW
            + FSPICK_NO_AUTOMOUNT = C.FSPICK_NO_AUTOMOUNT
            + FSPICK_EMPTY_PATH = C.FSPICK_EMPTY_PATH
            +
            +	FSMOUNT_CLOEXEC = C.FSMOUNT_CLOEXEC
            )

            type OpenHow C.struct_open_how
            diff --git a/unix/syscall_linux.go b/unix/syscall_linux.go
            index eeae6db..cb03b72 100644
            --- a/unix/syscall_linux.go
            +++ b/unix/syscall_linux.go
            @@ -1829,6 +1829,9 @@

            //sys Fremovexattr(fd int, attr string) (err error)
            //sys Fsetxattr(fd int, attr string, dest []byte, flags int) (err error)
            //sys Fsync(fd int) (err error)
            +//sys	Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error)

            +//sys Fsopen(fsName string, flags int) (fd int, err error)
            +//sys Fspick(dirfd int, pathName string, flags int) (fd int, err error)
            //sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
            //sysnb Getpgid(pid int) (pgid int, err error)

            diff --git a/unix/zsyscall_linux.go b/unix/zsyscall_linux.go
            index 198b4ac..bc4a275 100644
            --- a/unix/zsyscall_linux.go
            +++ b/unix/zsyscall_linux.go
            @@ -828,6 +828,49 @@


            // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT

            +func Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error) {

            + r0, _, e1 := Syscall(SYS_FSMOUNT, uintptr(fd), uintptr(flags), uintptr(mountAttrs))
            +	fsfd = int(r0)
            index c55b617..9962d26 100644
            --- a/unix/ztypes_linux.go
            +++ b/unix/ztypes_linux.go
            @@ -764,6 +764,15 @@
            MOVE_MOUNT_T_AUTOMOUNTS = 0x20
            MOVE_MOUNT_T_EMPTY_PATH = 0x40
            MOVE_MOUNT_SET_GROUP = 0x100

            +
            + FSOPEN_CLOEXEC = 0x1
            +
            + FSPICK_CLOEXEC = 0x1
            + FSPICK_SYMLINK_NOFOLLOW = 0x2
            + FSPICK_NO_AUTOMOUNT = 0x4
            + FSPICK_EMPTY_PATH = 0x8
            +
            +	FSMOUNT_CLOEXEC = 0x1
            )

            type OpenHow struct {

            To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: sys
            Gerrit-Branch: master
            Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
            Gerrit-Change-Number: 398434
            Gerrit-PatchSet: 4
            Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
            Gerrit-Reviewer: Benny Siegert <bsie...@gmail.com>
            Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Reviewer: Gopher Robot <go...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@google.com>
            Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
            Gerrit-MessageType: merged

            Ian Lance Taylor (Gerrit)

            unread,
            May 6, 2022, 7:04:20 PM5/6/22
            to Alexey Perevalov, Gopher Robot, goph...@pubsubhelper.golang.org, Benny Siegert, Tobias Klauser, Ian Lance Taylor, Brad Fitzpatrick, golang-co...@googlegroups.com

            View Change

            1 comment:

            • File unix/syscall_linux.go:

              • Patch Set #1, Line 1832: //sys Fsconfig(fd *int, cmd int, key string, value []byte, aux int) (err error)

                My fault, sorry, infidelity it should be int, not a *int, I tried it in runc (https://github. […]

              • Ack

            To view, visit change 398434. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: sys
            Gerrit-Branch: master
            Gerrit-Change-Id: I7f9560f4bc5b4bbe1e00c63ce1bc25c781aa1293
            Gerrit-Change-Number: 398434
            Gerrit-PatchSet: 4
            Gerrit-Owner: Alexey Perevalov <alexej.p...@gmail.com>
            Gerrit-Reviewer: Benny Siegert <bsie...@gmail.com>
            Gerrit-Reviewer: Brad Fitzpatrick <brad...@golang.org>
            Gerrit-Reviewer: Gopher Robot <go...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
            Gerrit-Reviewer: Ian Lance Taylor <ia...@google.com>
            Gerrit-Reviewer: Tobias Klauser <tobias....@gmail.com>
            Gerrit-Comment-Date: Fri, 06 May 2022 23:04:15 +0000
            Reply all
            Reply to author
            Forward
            0 new messages