Selaa lähdekoodia

unix: add fanotify API on Linux

This teaches unix/mksyscall.go about mapping uint64 to syscall
arguments, similar to existing handling of int64.

Change-Id: I536b4b09bbf6a8e3016565a4a04d2b9d32cbc624
Reviewed-on: https://go-review.googlesource.com/c/164664
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Dominik Honnef 6 vuotta sitten
vanhempi
commit
c2f5717e61
43 muutettua tiedostoa jossa 1038 lisäystä ja 1 poistoa
  1. 7 0
      unix/linux/types.go
  2. 2 0
      unix/mkerrors.sh
  3. 1 1
      unix/mksyscall.go
  4. 14 0
      unix/syscall_linux.go
  5. 42 0
      unix/zerrors_linux_386.go
  6. 42 0
      unix/zerrors_linux_amd64.go
  7. 42 0
      unix/zerrors_linux_arm.go
  8. 42 0
      unix/zerrors_linux_arm64.go
  9. 42 0
      unix/zerrors_linux_mips.go
  10. 42 0
      unix/zerrors_linux_mips64.go
  11. 42 0
      unix/zerrors_linux_mips64le.go
  12. 42 0
      unix/zerrors_linux_mipsle.go
  13. 42 0
      unix/zerrors_linux_ppc64.go
  14. 42 0
      unix/zerrors_linux_ppc64le.go
  15. 42 0
      unix/zerrors_linux_riscv64.go
  16. 42 0
      unix/zerrors_linux_s390x.go
  17. 42 0
      unix/zerrors_linux_sparc64.go
  18. 21 0
      unix/zsyscall_linux_386.go
  19. 21 0
      unix/zsyscall_linux_amd64.go
  20. 21 0
      unix/zsyscall_linux_arm.go
  21. 21 0
      unix/zsyscall_linux_arm64.go
  22. 21 0
      unix/zsyscall_linux_mips.go
  23. 21 0
      unix/zsyscall_linux_mips64.go
  24. 21 0
      unix/zsyscall_linux_mips64le.go
  25. 21 0
      unix/zsyscall_linux_mipsle.go
  26. 21 0
      unix/zsyscall_linux_ppc64.go
  27. 21 0
      unix/zsyscall_linux_ppc64le.go
  28. 21 0
      unix/zsyscall_linux_riscv64.go
  29. 21 0
      unix/zsyscall_linux_s390x.go
  30. 21 0
      unix/zsyscall_linux_sparc64.go
  31. 15 0
      unix/ztypes_linux_386.go
  32. 15 0
      unix/ztypes_linux_amd64.go
  33. 15 0
      unix/ztypes_linux_arm.go
  34. 15 0
      unix/ztypes_linux_arm64.go
  35. 15 0
      unix/ztypes_linux_mips.go
  36. 15 0
      unix/ztypes_linux_mips64.go
  37. 15 0
      unix/ztypes_linux_mips64le.go
  38. 15 0
      unix/ztypes_linux_mipsle.go
  39. 15 0
      unix/ztypes_linux_ppc64.go
  40. 15 0
      unix/ztypes_linux_ppc64le.go
  41. 15 0
      unix/ztypes_linux_riscv64.go
  42. 15 0
      unix/ztypes_linux_s390x.go
  43. 15 0
      unix/ztypes_linux_sparc64.go

+ 7 - 0
unix/linux/types.go

@@ -48,6 +48,7 @@ package unix
 #include <sys/utsname.h>
 #include <sys/wait.h>
 #include <linux/errqueue.h>
+#include <linux/fanotify.h>
 #include <linux/filter.h>
 #include <linux/icmpv6.h>
 #include <linux/if_pppox.h>
@@ -1680,3 +1681,9 @@ const (
 // Socket error queue
 
 type SockExtendedErr C.struct_sock_extended_err
+
+// Fanotify
+
+type FanotifyEventMetadata C.struct_fanotify_event_metadata
+
+type FanotifyResponse C.struct_fanotify_response

+ 2 - 0
unix/mkerrors.sh

@@ -192,6 +192,7 @@ struct ltchars {
 #include <linux/if_packet.h>
 #include <linux/if_addr.h>
 #include <linux/falloc.h>
+#include <linux/fanotify.h>
 #include <linux/filter.h>
 #include <linux/fs.h>
 #include <linux/kexec.h>
@@ -501,6 +502,7 @@ ccflags="$@"
 		$2 !~ "WMESGLEN" &&
 		$2 ~ /^W[A-Z0-9]+$/ ||
 		$2 ~/^PPPIOC/ ||
+		$2 ~ /^FAN_|FANOTIFY_/ ||
 		$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
 		$2 ~ /^__WCOREFLAG$/ {next}
 		$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}

+ 1 - 1
unix/mksyscall.go

@@ -228,7 +228,7 @@ func main() {
 					} else {
 						args = append(args, fmt.Sprintf("uintptr(%s)", p.Name))
 					}
-				} else if p.Type == "int64" && endianness != "" {
+				} else if (p.Type == "int64" || p.Type == "uint64") && endianness != "" {
 					if len(args)%2 == 1 && *arm {
 						// arm abi specifies 64-bit argument uses
 						// (even, odd) pair

+ 14 - 0
unix/syscall_linux.go

@@ -39,6 +39,20 @@ func Creat(path string, mode uint32) (fd int, err error) {
 	return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
 }
 
+//sys	FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
+//sys	fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)
+
+func FanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname string) (err error) {
+	if pathname == "" {
+		return fanotifyMark(fd, flags, mask, dirFd, nil)
+	}
+	p, err := BytePtrFromString(pathname)
+	if err != nil {
+		return err
+	}
+	return fanotifyMark(fd, flags, mask, dirFd, p)
+}
+
 //sys	fchmodat(dirfd int, path string, mode uint32) (err error)
 
 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {

+ 42 - 0
unix/zerrors_linux_386.go

@@ -486,6 +486,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 42 - 0
unix/zerrors_linux_amd64.go

@@ -486,6 +486,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 42 - 0
unix/zerrors_linux_arm.go

@@ -486,6 +486,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 42 - 0
unix/zerrors_linux_arm64.go

@@ -488,6 +488,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 42 - 0
unix/zerrors_linux_mips.go

@@ -486,6 +486,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 42 - 0
unix/zerrors_linux_mips64.go

@@ -486,6 +486,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 42 - 0
unix/zerrors_linux_mips64le.go

@@ -486,6 +486,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 42 - 0
unix/zerrors_linux_mipsle.go

@@ -486,6 +486,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 42 - 0
unix/zerrors_linux_ppc64.go

@@ -486,6 +486,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 42 - 0
unix/zerrors_linux_ppc64le.go

@@ -486,6 +486,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 42 - 0
unix/zerrors_linux_riscv64.go

@@ -486,6 +486,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 42 - 0
unix/zerrors_linux_s390x.go

@@ -486,6 +486,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 42 - 0
unix/zerrors_linux_sparc64.go

@@ -490,6 +490,48 @@ const (
 	FALLOC_FL_PUNCH_HOLE                 = 0x2
 	FALLOC_FL_UNSHARE_RANGE              = 0x40
 	FALLOC_FL_ZERO_RANGE                 = 0x10
+	FANOTIFY_METADATA_VERSION            = 0x3
+	FAN_ACCESS                           = 0x1
+	FAN_ACCESS_PERM                      = 0x20000
+	FAN_ALLOW                            = 0x1
+	FAN_ALL_CLASS_BITS                   = 0xc
+	FAN_ALL_EVENTS                       = 0x3b
+	FAN_ALL_INIT_FLAGS                   = 0x3f
+	FAN_ALL_MARK_FLAGS                   = 0xff
+	FAN_ALL_OUTGOING_EVENTS              = 0x3403b
+	FAN_ALL_PERM_EVENTS                  = 0x30000
+	FAN_AUDIT                            = 0x10
+	FAN_CLASS_CONTENT                    = 0x4
+	FAN_CLASS_NOTIF                      = 0x0
+	FAN_CLASS_PRE_CONTENT                = 0x8
+	FAN_CLOEXEC                          = 0x1
+	FAN_CLOSE                            = 0x18
+	FAN_CLOSE_NOWRITE                    = 0x10
+	FAN_CLOSE_WRITE                      = 0x8
+	FAN_DENY                             = 0x2
+	FAN_ENABLE_AUDIT                     = 0x40
+	FAN_EVENT_METADATA_LEN               = 0x18
+	FAN_EVENT_ON_CHILD                   = 0x8000000
+	FAN_MARK_ADD                         = 0x1
+	FAN_MARK_DONT_FOLLOW                 = 0x4
+	FAN_MARK_FILESYSTEM                  = 0x100
+	FAN_MARK_FLUSH                       = 0x80
+	FAN_MARK_IGNORED_MASK                = 0x20
+	FAN_MARK_IGNORED_SURV_MODIFY         = 0x40
+	FAN_MARK_INODE                       = 0x0
+	FAN_MARK_MOUNT                       = 0x10
+	FAN_MARK_ONLYDIR                     = 0x8
+	FAN_MARK_REMOVE                      = 0x2
+	FAN_MODIFY                           = 0x2
+	FAN_NOFD                             = -0x1
+	FAN_NONBLOCK                         = 0x2
+	FAN_ONDIR                            = 0x40000000
+	FAN_OPEN                             = 0x20
+	FAN_OPEN_PERM                        = 0x10000
+	FAN_Q_OVERFLOW                       = 0x4000
+	FAN_REPORT_TID                       = 0x100
+	FAN_UNLIMITED_MARKS                  = 0x20
+	FAN_UNLIMITED_QUEUE                  = 0x10
 	FD_CLOEXEC                           = 0x1
 	FD_SETSIZE                           = 0x400
 	FF0                                  = 0x0

+ 21 - 0
unix/zsyscall_linux_386.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 21 - 0
unix/zsyscall_linux_amd64.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 21 - 0
unix/zsyscall_linux_arm.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 21 - 0
unix/zsyscall_linux_arm64.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 21 - 0
unix/zsyscall_linux_mips.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 21 - 0
unix/zsyscall_linux_mips64.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 21 - 0
unix/zsyscall_linux_mips64le.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 21 - 0
unix/zsyscall_linux_mipsle.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 21 - 0
unix/zsyscall_linux_ppc64.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 21 - 0
unix/zsyscall_linux_ppc64le.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 21 - 0
unix/zsyscall_linux_riscv64.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 21 - 0
unix/zsyscall_linux_s390x.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 21 - 0
unix/zsyscall_linux_sparc64.go

@@ -14,6 +14,27 @@ var _ syscall.Errno
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
+	r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_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 fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+	_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func fchmodat(dirfd int, path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)

+ 15 - 0
unix/ztypes_linux_386.go

@@ -2043,3 +2043,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}

+ 15 - 0
unix/ztypes_linux_amd64.go

@@ -2056,3 +2056,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}

+ 15 - 0
unix/ztypes_linux_arm.go

@@ -2034,3 +2034,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}

+ 15 - 0
unix/ztypes_linux_arm64.go

@@ -2035,3 +2035,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}

+ 15 - 0
unix/ztypes_linux_mips.go

@@ -2040,3 +2040,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}

+ 15 - 0
unix/ztypes_linux_mips64.go

@@ -2037,3 +2037,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}

+ 15 - 0
unix/ztypes_linux_mips64le.go

@@ -2037,3 +2037,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}

+ 15 - 0
unix/ztypes_linux_mipsle.go

@@ -2040,3 +2040,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}

+ 15 - 0
unix/ztypes_linux_ppc64.go

@@ -2045,3 +2045,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}

+ 15 - 0
unix/ztypes_linux_ppc64le.go

@@ -2045,3 +2045,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}

+ 15 - 0
unix/ztypes_linux_riscv64.go

@@ -2062,3 +2062,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}

+ 15 - 0
unix/ztypes_linux_s390x.go

@@ -2059,3 +2059,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}

+ 15 - 0
unix/ztypes_linux_sparc64.go

@@ -2040,3 +2040,18 @@ type SockExtendedErr struct {
 	Info   uint32
 	Data   uint32
 }
+
+type FanotifyEventMetadata struct {
+	Event_len    uint32
+	Vers         uint8
+	Reserved     uint8
+	Metadata_len uint16
+	Mask         uint64
+	Fd           int32
+	Pid          int32
+}
+
+type FanotifyResponse struct {
+	Fd       int32
+	Response uint32
+}