From 2f1cec6277878744f2f5484a1833fb91903515f2 Mon Sep 17 00:00:00 2001 From: tigergao99 Date: Tue, 24 Nov 2020 14:48:13 -0500 Subject: sys/freebsd: add fh related syscalls --- sys/freebsd/fh.txt | 38 ++++++++++++++++++++++++++++++++++++++ sys/freebsd/fh.txt.const | 14 ++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 sys/freebsd/fh.txt create mode 100644 sys/freebsd/fh.txt.const diff --git a/sys/freebsd/fh.txt b/sys/freebsd/fh.txt new file mode 100644 index 000000000..9269e2974 --- /dev/null +++ b/sys/freebsd/fh.txt @@ -0,0 +1,38 @@ +# Copyright 2020 syzkaller project authors. All rights reserved. +# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +include +include +include +include +include + +getfh(file ptr[in, filename], fhp ptr[out, fhandle]) +lgetfh(file ptr[in, filename], fhp ptr[out, fhandle]) +getfhat(fd fd, file ptr[in, filename], fhp ptr[out, fhandle], flags flags[getfhat_flags]) + +fhlink(fhp ptr[in, fhandle], to ptr[in, filename]) +fhlinkat(fhp ptr[in, fhandle], fd fd, to ptr[in, filename]) + +fhopen(fhp ptr[in, fhandle], flags flags[open_flags]) fd +fhstat(fhp ptr[in, fhandle], statbuf ptr[out, stat]) +fhstatfs(fhp ptr[in, fhandle], buf buffer[out]) + +fhreadlink(fhp ptr[in, fhandle], buf buffer[out], bufsize len[buf]) + +fsid { + val array[int32, 2] +} + +fid { + fid_len int16 + fid_data0 int16 + fid_data array[int8, MAXFIDSZ] +} + +fhandle { + fh_fsid fsid + fh_fid fid +} + +getfhat_flags = AT_SYMLINK_NOFOLLOW, AT_BENEATH diff --git a/sys/freebsd/fh.txt.const b/sys/freebsd/fh.txt.const new file mode 100644 index 000000000..13e65646e --- /dev/null +++ b/sys/freebsd/fh.txt.const @@ -0,0 +1,14 @@ +# Code generated by syz-sysgen. DO NOT EDIT. +arches = 386, amd64 +AT_BENEATH = 4096 +AT_SYMLINK_NOFOLLOW = 512 +MAXFIDSZ = 16 +SYS_fhlink = 565 +SYS_fhlinkat = 566 +SYS_fhopen = 298 +SYS_fhreadlink = 567 +SYS_fhstat = 553 +SYS_fhstatfs = 558 +SYS_getfh = 161 +SYS_getfhat = 564 +SYS_lgetfh = 160 -- cgit mrf-deployment