github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/quotactl.txt (about)

     1  # Copyright 2023 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  include <uapi/linux/quota.h>
     5  
     6  quotactl$Q_SYNC(cmd flags[quota_cmd_sync], special const[0], id const[0], addr const[0])
     7  quotactl$Q_QUOTAON(cmd flags[quota_cmd_quota_on], special ptr[in, blockdev_filename], id uid, addr ptr[in, filename])
     8  quotactl$Q_QUOTAOFF(cmd flags[quota_cmd_quota_off], special ptr[in, blockdev_filename], id uid, addr const[0])
     9  quotactl$Q_GETFMT(cmd flags[quota_cmd_getfmt], special ptr[in, blockdev_filename], id uid, addr ptr[out, int32])
    10  quotactl$Q_GETINFO(cmd flags[quota_cmd_getinfo], special ptr[in, blockdev_filename], id uid, addr ptr[out, if_dqinfo])
    11  quotactl$Q_SETINFO(cmd flags[quota_cmd_setinfo], special ptr[in, blockdev_filename], id uid, addr ptr[in, if_dqinfo])
    12  quotactl$Q_GETQUOTA(cmd flags[quota_cmd_getquota], special ptr[in, blockdev_filename], id uid, addr ptr[out, if_dqblk])
    13  quotactl$Q_SETQUOTA(cmd flags[quota_cmd_setquota], special ptr[in, blockdev_filename], id uid, addr ptr[in, if_dqblk])
    14  quotactl$Q_GETNEXTQUOTA(cmd flags[quota_cmd_getnextquota], special ptr[in, blockdev_filename], id uid, addr ptr[out, if_nextdqblk])
    15  
    16  quotactl_fd$Q_SYNC(fd fd, cmd flags[quota_cmd_sync], id const[0], addr const[0])
    17  quotactl_fd$Q_QUOTAON(fd fd, cmd flags[quota_cmd_quota_on], id uid, addr ptr[in, filename])
    18  quotactl_fd$Q_QUOTAOFF(fd fd, cmd flags[quota_cmd_quota_off], id uid, addr const[0])
    19  quotactl_fd$Q_GETFMT(fd fd, cmd flags[quota_cmd_getfmt], id uid, addr ptr[out, int32])
    20  quotactl_fd$Q_GETINFO(fd fd, cmd flags[quota_cmd_getinfo], id uid, addr ptr[out, if_dqinfo])
    21  quotactl_fd$Q_SETINFO(fd fd, cmd flags[quota_cmd_setinfo], id uid, addr ptr[in, if_dqinfo])
    22  quotactl_fd$Q_GETQUOTA(fd fd, cmd flags[quota_cmd_getquota], id uid, addr ptr[out, if_dqblk])
    23  quotactl_fd$Q_SETQUOTA(fd fd, cmd flags[quota_cmd_setquota], id uid, addr ptr[in, if_dqblk])
    24  quotactl_fd$Q_GETNEXTQUOTA(fd fd, cmd flags[quota_cmd_getnextquota], id uid, addr ptr[out, if_nextdqblk])
    25  
    26  if_dqinfo {
    27  	dqi_bgrace	int64
    28  	dqi_igrace	int64
    29  	dqi_flags	flags[quota_dgqinfo_flags, int32]
    30  	dqi_valid	flags[quota_dgqinfo_valid, int32]
    31  }
    32  
    33  if_dqblk {
    34  	dqb_bhardlimit	int64
    35  	dqb_bsoftlimit	int64
    36  	dqb_curspace	int64
    37  	dqb_ihardlimit	int64
    38  	dqb_isoftlimit	int64
    39  	dqb_curinodes	int64
    40  	dqb_btime	int64
    41  	dqb_itime	int64
    42  	dqb_valid	int32
    43  }
    44  
    45  if_nextdqblk {
    46  	dqb_bhardlimit	int64
    47  	dqb_bsoftlimit	int64
    48  	dqb_curspace	int64
    49  	dqb_ihardlimit	int64
    50  	dqb_isoftlimit	int64
    51  	dqb_curinodes	int64
    52  	dqb_btime	int64
    53  	dqb_itime	int64
    54  	dqb_valid	int32
    55  	dqb_id		int32
    56  }
    57  
    58  quota_dgqinfo_flags = DQF_ROOT_SQUASH
    59  quota_dgqinfo_valid = IIF_BGRACE, IIF_IGRACE, IIF_FLAGS
    60  
    61  quota_cmd_sync = Q_SYNC_USR, Q_SYNC_GRP, Q_SYNC_PRJ
    62  quota_cmd_quota_on = Q_QUOTAON_USR, Q_QUOTAON_GRP, Q_QUOTAON_PRJ
    63  quota_cmd_quota_off = Q_QUOTAOFF_USR, Q_QUOTAOFF_GRP, Q_QUOTAOFF_PRJ
    64  quota_cmd_getfmt = Q_GETFMT_USR, Q_GETFMT_GRP, Q_GETFMT_PRJ
    65  quota_cmd_getinfo = Q_GETINFO_USR, Q_GETINFO_GRP, Q_GETINFO_PRJ
    66  quota_cmd_setinfo = Q_SETINFO_USR, Q_SETINFO_GRP, Q_SETINFO_PRJ
    67  quota_cmd_getquota = Q_GETQUOTA_USR, Q_GETQUOTA_GRP, Q_GETQUOTA_PRJ
    68  quota_cmd_setquota = Q_SETQUOTA_USR, Q_SETQUOTA_GRP, Q_SETQUOTA_PRJ
    69  quota_cmd_getnextquota = Q_GETNEXTQUOTA_USR, Q_GETNEXTQUOTA_GRP, Q_GETNEXTQUOTA_PRJ
    70  
    71  define Q_SYNC_USR	(Q_SYNC << SUBCMDSHIFT) | USRQUOTA
    72  define Q_SYNC_GRP	(Q_SYNC << SUBCMDSHIFT) | GRPQUOTA
    73  define Q_SYNC_PRJ	(Q_SYNC << SUBCMDSHIFT) | PRJQUOTA
    74  define Q_QUOTAON_USR	(Q_QUOTAON << SUBCMDSHIFT) | USRQUOTA
    75  define Q_QUOTAON_GRP	(Q_QUOTAON << SUBCMDSHIFT) | GRPQUOTA
    76  define Q_QUOTAON_PRJ	(Q_QUOTAON << SUBCMDSHIFT) | PRJQUOTA
    77  define Q_QUOTAOFF_USR	(Q_QUOTAOFF << SUBCMDSHIFT) | USRQUOTA
    78  define Q_QUOTAOFF_GRP	(Q_QUOTAOFF << SUBCMDSHIFT) | GRPQUOTA
    79  define Q_QUOTAOFF_PRJ	(Q_QUOTAOFF << SUBCMDSHIFT) | PRJQUOTA
    80  define Q_GETFMT_USR	(Q_GETFMT << SUBCMDSHIFT) | USRQUOTA
    81  define Q_GETFMT_GRP	(Q_GETFMT << SUBCMDSHIFT) | GRPQUOTA
    82  define Q_GETFMT_PRJ	(Q_GETFMT << SUBCMDSHIFT) | PRJQUOTA
    83  define Q_GETINFO_USR	(Q_GETINFO << SUBCMDSHIFT) | USRQUOTA
    84  define Q_GETINFO_GRP	(Q_GETINFO << SUBCMDSHIFT) | GRPQUOTA
    85  define Q_GETINFO_PRJ	(Q_GETINFO << SUBCMDSHIFT) | PRJQUOTA
    86  define Q_SETINFO_USR	(Q_SETINFO << SUBCMDSHIFT) | USRQUOTA
    87  define Q_SETINFO_GRP	(Q_SETINFO << SUBCMDSHIFT) | GRPQUOTA
    88  define Q_SETINFO_PRJ	(Q_SETINFO << SUBCMDSHIFT) | PRJQUOTA
    89  define Q_GETQUOTA_USR	(Q_GETQUOTA << SUBCMDSHIFT) | USRQUOTA
    90  define Q_GETQUOTA_GRP	(Q_GETQUOTA << SUBCMDSHIFT) | GRPQUOTA
    91  define Q_GETQUOTA_PRJ	(Q_GETQUOTA << SUBCMDSHIFT) | PRJQUOTA
    92  define Q_SETQUOTA_USR	(Q_SETQUOTA << SUBCMDSHIFT) | USRQUOTA
    93  define Q_SETQUOTA_GRP	(Q_SETQUOTA << SUBCMDSHIFT) | GRPQUOTA
    94  define Q_SETQUOTA_PRJ	(Q_SETQUOTA << SUBCMDSHIFT) | PRJQUOTA
    95  define Q_GETNEXTQUOTA_USR	(Q_GETNEXTQUOTA << SUBCMDSHIFT) | USRQUOTA
    96  define Q_GETNEXTQUOTA_GRP	(Q_GETNEXTQUOTA << SUBCMDSHIFT) | GRPQUOTA
    97  define Q_GETNEXTQUOTA_PRJ	(Q_GETNEXTQUOTA << SUBCMDSHIFT) | PRJQUOTA