/fs/ |
D | fcntl.c | 35 static int setfl(int fd, struct file * filp, unsigned long arg) in setfl() argument 44 if (((arg ^ filp->f_flags) & O_APPEND) && IS_APPEND(inode)) in setfl() 48 if ((arg & O_NOATIME) && !(filp->f_flags & O_NOATIME)) in setfl() 54 if (arg & O_NDELAY) in setfl() 55 arg |= O_NONBLOCK; in setfl() 58 if (!S_ISFIFO(inode->i_mode) && (arg & O_DIRECT)) { in setfl() 65 error = filp->f_op->check_flags(arg); in setfl() 72 if (((arg ^ filp->f_flags) & FASYNC) && filp->f_op->fasync) { in setfl() 73 error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0); in setfl() 80 filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK); in setfl() [all …]
|
D | ioctl.c | 40 long vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in vfs_ioctl() argument 47 error = filp->f_op->unlocked_ioctl(filp, cmd, arg); in vfs_ioctl() 178 static int ioctl_fiemap(struct file *filp, unsigned long arg) in ioctl_fiemap() argument 181 struct fiemap __user *ufiemap = (struct fiemap __user *) arg; in ioctl_fiemap() 495 unsigned long arg) in file_ioctl() argument 498 int __user *p = (int __user *)arg; in file_ioctl() 510 return vfs_ioctl(filp, cmd, arg); in file_ioctl() 588 static int ioctl_file_dedupe_range(struct file *file, void __user *arg) in ioctl_file_dedupe_range() argument 590 struct file_dedupe_range __user *argp = arg; in ioctl_file_dedupe_range() 636 unsigned long arg) in do_vfs_ioctl() argument [all …]
|
D | userfaultfd.c | 119 if (len && (start > uwq->msg.arg.pagefault.address || in userfaultfd_wake_function() 120 start + len <= uwq->msg.arg.pagefault.address)) in userfaultfd_wake_function() 198 msg.arg.pagefault.address = address; in userfault_msg() 207 msg.arg.pagefault.flags |= UFFD_PAGEFAULT_FLAG_WRITE; in userfault_msg() 216 msg.arg.pagefault.flags |= UFFD_PAGEFAULT_FLAG_WP; in userfault_msg() 218 msg.arg.pagefault.feat.ptid = task_pid_vnr(current); in userfault_msg() 620 ewq->msg.arg.reserved.reserved1; in userfaultfd_event_wait_completion() 728 ewq.msg.arg.reserved.reserved1 = (unsigned long)fctx->new; in dup_fctx() 783 ewq.msg.arg.remap.from = from; in mremap_userfaultfd_complete() 784 ewq.msg.arg.remap.to = to; in mremap_userfaultfd_complete() [all …]
|
/fs/verity/ |
D | enable.c | 158 const struct fsverity_enable_arg *arg) in enable_verity() argument 164 size_t desc_size = sizeof(*desc) + arg->sig_size; in enable_verity() 173 desc->hash_algorithm = arg->hash_algorithm; in enable_verity() 174 desc->log_blocksize = ilog2(arg->block_size); in enable_verity() 177 if (arg->salt_size && in enable_verity() 179 (const u8 __user *)(uintptr_t)arg->salt_ptr, in enable_verity() 180 arg->salt_size)) { in enable_verity() 184 desc->salt_size = arg->salt_size; in enable_verity() 187 if (arg->sig_size && in enable_verity() 189 (const u8 __user *)(uintptr_t)arg->sig_ptr, in enable_verity() [all …]
|
D | measure.c | 27 struct fsverity_digest arg; in fsverity_ioctl_measure() local 40 if (get_user(arg.digest_size, &uarg->digest_size)) in fsverity_ioctl_measure() 42 if (arg.digest_size < hash_alg->digest_size) in fsverity_ioctl_measure() 45 memset(&arg, 0, sizeof(arg)); in fsverity_ioctl_measure() 46 arg.digest_algorithm = hash_alg - fsverity_hash_algs; in fsverity_ioctl_measure() 47 arg.digest_size = hash_alg->digest_size; in fsverity_ioctl_measure() 49 if (copy_to_user(uarg, &arg, sizeof(arg))) in fsverity_ioctl_measure()
|
/fs/jfs/ |
D | jfs_debug.h | 55 #define jfs_info(fmt, arg...) do { \ argument 57 printk(KERN_INFO fmt "\n", ## arg); \ 61 #define jfs_debug(fmt, arg...) do { \ argument 63 printk(KERN_DEBUG fmt "\n", ## arg); \ 67 #define jfs_warn(fmt, arg...) do { \ argument 69 printk(KERN_WARNING fmt "\n", ## arg); \ 73 #define jfs_err(fmt, arg...) do { \ argument 75 printk(KERN_ERR fmt "\n", ## arg); \ 84 #define jfs_info(fmt, arg...) do {} while (0) argument 85 #define jfs_debug(fmt, arg...) do {} while (0) argument [all …]
|
D | ioctl.c | 60 long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in jfs_ioctl() argument 70 return put_user(flags, (int __user *) arg); in jfs_ioctl() 83 if (get_user(flags, (int __user *) arg)) { in jfs_ioctl() 137 if (copy_from_user(&range, (struct fstrim_range __user *)arg, in jfs_ioctl() 148 if (copy_to_user((struct fstrim_range __user *)arg, &range, in jfs_ioctl() 161 long jfs_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in jfs_compat_ioctl() argument 175 return jfs_ioctl(filp, cmd, arg); in jfs_compat_ioctl()
|
/fs/crypto/ |
D | keyring.c | 499 struct fscrypt_add_key_arg arg; in fscrypt_ioctl_add_key() local 506 if (copy_from_user(&arg, uarg, sizeof(arg))) in fscrypt_ioctl_add_key() 509 if (!valid_key_spec(&arg.key_spec)) in fscrypt_ioctl_add_key() 512 if (memchr_inv(arg.__reserved, 0, sizeof(arg.__reserved))) in fscrypt_ioctl_add_key() 518 if (arg.raw_size < FSCRYPT_MIN_KEY_SIZE || in fscrypt_ioctl_add_key() 519 arg.raw_size > in fscrypt_ioctl_add_key() 520 ((arg.__flags & __FSCRYPT_ADD_KEY_FLAG_HW_WRAPPED) ? in fscrypt_ioctl_add_key() 525 secret.size = arg.raw_size; in fscrypt_ioctl_add_key() 530 switch (arg.key_spec.type) { in fscrypt_ioctl_add_key() 542 if (arg.__flags) in fscrypt_ioctl_add_key() [all …]
|
D | policy.c | 312 int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg) in fscrypt_ioctl_set_policy() argument 321 if (get_user(policy.version, (const u8 __user *)arg)) in fscrypt_ioctl_set_policy() 340 if (copy_from_user(&policy, arg, size)) in fscrypt_ioctl_set_policy() 378 int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg) in fscrypt_ioctl_get_policy() argument 390 if (copy_to_user(arg, &policy, sizeof(policy.v1))) in fscrypt_ioctl_get_policy() 399 struct fscrypt_get_policy_ex_arg arg; in fscrypt_ioctl_get_policy_ex() local 400 union fscrypt_policy *policy = (union fscrypt_policy *)&arg.policy; in fscrypt_ioctl_get_policy_ex() 405 BUILD_BUG_ON(offsetof(typeof(arg), policy_size) != 0); in fscrypt_ioctl_get_policy_ex() 406 BUILD_BUG_ON(offsetofend(typeof(arg), policy_size) != in fscrypt_ioctl_get_policy_ex() 407 offsetof(typeof(arg), policy)); in fscrypt_ioctl_get_policy_ex() [all …]
|
/fs/xfs/ |
D | xfs_ioctl.c | 328 void __user *arg) in xfs_fssetdm_by_handle() argument 337 if (copy_from_user(&dmhreq, arg, sizeof(xfs_fsop_setdm_handlereq_t))) in xfs_fssetdm_by_handle() 372 void __user *arg) in xfs_attrlist_by_handle() argument 376 struct xfs_fsop_attrlist_handlereq __user *p = arg; in xfs_attrlist_by_handle() 383 if (copy_from_user(&al_hreq, arg, sizeof(xfs_fsop_attrlist_handlereq_t))) in xfs_attrlist_by_handle() 499 void __user *arg) in xfs_attrmulti_by_handle() argument 510 if (copy_from_user(&am_hreq, arg, sizeof(xfs_fsop_attrmulti_handlereq_t))) in xfs_attrmulti_by_handle() 747 void __user *arg) in xfs_ioc_fsbulkstat() argument 766 if (copy_from_user(&bulkreq, arg, sizeof(struct xfs_fsop_bulkreq))) in xfs_ioc_fsbulkstat() 921 struct xfs_bulkstat_req __user *arg) in xfs_ioc_bulkstat() argument [all …]
|
D | xfs_ioctl32.c | 355 void __user *arg) in xfs_compat_attrlist_by_handle() argument 359 compat_xfs_fsop_attrlist_handlereq_t __user *p = arg; in xfs_compat_attrlist_by_handle() 366 if (copy_from_user(&al_hreq, arg, in xfs_compat_attrlist_by_handle() 412 void __user *arg) in xfs_compat_attrmulti_by_handle() argument 423 if (copy_from_user(&am_hreq, arg, in xfs_compat_attrmulti_by_handle() 506 void __user *arg) in xfs_compat_fssetdm_by_handle() argument 515 if (copy_from_user(&dmhreq, arg, in xfs_compat_fssetdm_by_handle() 550 void __user *arg = compat_ptr(p); in xfs_file_compat_ioctl() local 568 if (xfs_compat_flock64_copyin(&bf, arg)) in xfs_file_compat_ioctl() 574 return xfs_compat_ioc_fsgeometry_v1(mp, arg); in xfs_file_compat_ioctl() [all …]
|
/fs/nfs/ |
D | nfs3proc.c | 126 struct nfs3_sattrargs arg = { in nfs3_proc_setattr() local 132 .rpc_argp = &arg, in nfs3_proc_setattr() 156 struct nfs3_diropargs arg = { in nfs3_proc_lookup() local 167 .rpc_argp = &arg, in nfs3_proc_lookup() 193 struct nfs3_accessargs arg = { in nfs3_proc_access() local 200 .rpc_argp = &arg, in nfs3_proc_access() 258 } arg; member 271 data->msg.rpc_argp = &data->arg; in nfs3_alloc_createdata() 319 data->arg.create.fh = NFS_FH(dir); in nfs3_proc_create() 320 data->arg.create.name = dentry->d_name.name; in nfs3_proc_create() [all …]
|
D | proc.c | 124 struct nfs_sattrargs arg = { in nfs_proc_setattr() local 130 .rpc_argp = &arg, in nfs_proc_setattr() 154 struct nfs_diropargs arg = { in nfs_proc_lookup() local 165 .rpc_argp = &arg, in nfs_proc_lookup() 199 struct nfs_createargs arg; member 213 data->arg.fh = NFS_FH(dir); in nfs_alloc_createdata() 214 data->arg.name = dentry->d_name.name; in nfs_alloc_createdata() 215 data->arg.len = dentry->d_name.len; in nfs_alloc_createdata() 216 data->arg.sattr = sattr; in nfs_alloc_createdata() 244 msg.rpc_argp = &data->arg; in nfs_proc_create() [all …]
|
/fs/ubifs/ |
D | ioctl.c | 136 long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in ubifs_ioctl() argument 146 return put_user(flags, (int __user *) arg); in ubifs_ioctl() 155 if (get_user(flags, (int __user *) arg)) in ubifs_ioctl() 183 return fscrypt_ioctl_set_policy(file, (const void __user *)arg); in ubifs_ioctl() 186 return fscrypt_ioctl_get_policy(file, (void __user *)arg); in ubifs_ioctl() 189 return fscrypt_ioctl_get_policy_ex(file, (void __user *)arg); in ubifs_ioctl() 192 return fscrypt_ioctl_add_key(file, (void __user *)arg); in ubifs_ioctl() 195 return fscrypt_ioctl_remove_key(file, (void __user *)arg); in ubifs_ioctl() 199 (void __user *)arg); in ubifs_ioctl() 201 return fscrypt_ioctl_get_key_status(file, (void __user *)arg); in ubifs_ioctl() [all …]
|
/fs/nfs/blocklayout/ |
D | extent_tree.c | 491 static void ext_tree_free_commitdata(struct nfs4_layoutcommit_args *arg, in ext_tree_free_commitdata() argument 494 if (arg->layoutupdate_pages != &arg->layoutupdate_page) { in ext_tree_free_commitdata() 498 put_page(arg->layoutupdate_pages[i]); in ext_tree_free_commitdata() 499 vfree(arg->start_p); in ext_tree_free_commitdata() 500 kfree(arg->layoutupdate_pages); in ext_tree_free_commitdata() 502 put_page(arg->layoutupdate_page); in ext_tree_free_commitdata() 556 ext_tree_prepare_commit(struct nfs4_layoutcommit_args *arg) in ext_tree_prepare_commit() argument 558 struct pnfs_block_layout *bl = BLK_LO2EXT(NFS_I(arg->inode)->layout); in ext_tree_prepare_commit() 565 arg->layoutupdate_page = alloc_page(GFP_NOFS); in ext_tree_prepare_commit() 566 if (!arg->layoutupdate_page) in ext_tree_prepare_commit() [all …]
|
/fs/ext2/ |
D | ioctl.c | 21 long ext2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in ext2_ioctl() argument 29 ext2_debug ("cmd = %u, arg = %lu\n", cmd, arg); in ext2_ioctl() 34 return put_user(flags, (int __user *) arg); in ext2_ioctl() 47 if (get_user(flags, (int __user *) arg)) { in ext2_ioctl() 83 return put_user(inode->i_generation, (int __user *) arg); in ext2_ioctl() 92 if (get_user(generation, (int __user *) arg)) { in ext2_ioctl() 112 return put_user(rsv_window_size, (int __user *)arg); in ext2_ioctl() 123 if (get_user(rsv_window_size, (int __user *)arg)) in ext2_ioctl() 159 long ext2_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in ext2_compat_ioctl() argument 178 return ext2_ioctl(file, cmd, (unsigned long) compat_ptr(arg)); in ext2_compat_ioctl()
|
/fs/ceph/ |
D | ioctl.c | 17 static long ceph_ioctl_get_layout(struct file *file, void __user *arg) in ceph_ioctl_get_layout() argument 30 if (copy_to_user(arg, &l, sizeof(l))) in ceph_ioctl_get_layout() 64 static long ceph_ioctl_set_layout(struct file *file, void __user *arg) in ceph_ioctl_set_layout() argument 74 if (copy_from_user(&l, arg, sizeof(l))) in ceph_ioctl_set_layout() 136 static long ceph_ioctl_set_layout_policy (struct file *file, void __user *arg) in ceph_ioctl_set_layout_policy() argument 145 if (copy_from_user(&l, arg, sizeof(l))) in ceph_ioctl_set_layout_policy() 179 static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg) in ceph_ioctl_get_dataloc() argument 194 if (copy_from_user(&dl, arg, sizeof(dl))) in ceph_ioctl_get_dataloc() 235 if (copy_to_user(arg, &dl, sizeof(dl))) in ceph_ioctl_get_dataloc() 269 long ceph_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in ceph_ioctl() argument [all …]
|
D | caps.c | 1135 static int send_cap_msg(struct cap_msg_args *arg) in send_cap_msg() argument 1141 struct ceph_osd_client *osdc = &arg->session->s_mdsc->fsc->client->osdc; in send_cap_msg() 1145 " xattr_ver %llu xattr_len %d\n", ceph_cap_op_name(arg->op), in send_cap_msg() 1146 arg->cid, arg->ino, ceph_cap_string(arg->caps), in send_cap_msg() 1147 ceph_cap_string(arg->wanted), ceph_cap_string(arg->dirty), in send_cap_msg() 1148 arg->seq, arg->issue_seq, arg->flush_tid, arg->oldest_flush_tid, in send_cap_msg() 1149 arg->mseq, arg->follows, arg->size, arg->max_size, in send_cap_msg() 1150 arg->xattr_version, in send_cap_msg() 1151 arg->xattr_buf ? (int)arg->xattr_buf->vec.iov_len : 0); in send_cap_msg() 1162 msg->hdr.tid = cpu_to_le64(arg->flush_tid); in send_cap_msg() [all …]
|
/fs/ext4/ |
D | ioctl.c | 570 static int ext4_shutdown(struct super_block *sb, unsigned long arg) in ext4_shutdown() argument 578 if (get_user(flags, (__u32 __user *)arg)) in ext4_shutdown() 639 struct fsmap_head __user *arg) in ext4_ioc_getfsmap() argument 647 if (copy_from_user(&head, arg, sizeof(struct fsmap_head))) in ext4_ioc_getfsmap() 673 info.gi_data = arg; in ext4_ioc_getfsmap() 693 if (copy_to_user(arg, &head, sizeof(struct fsmap_head))) in ext4_ioc_getfsmap() 774 static int ext4_ioctl_get_es_cache(struct file *filp, unsigned long arg) in ext4_ioctl_get_es_cache() argument 777 struct fiemap __user *ufiemap = (struct fiemap __user *) arg; in ext4_ioctl_get_es_cache() 816 long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in ext4_ioctl() argument 823 ext4_debug("cmd = %u, arg = %lu\n", cmd, arg); in ext4_ioctl() [all …]
|
/fs/f2fs/ |
D | file.c | 1810 static int f2fs_ioc_getflags(struct file *filp, unsigned long arg) in f2fs_ioc_getflags() argument 1827 return put_user(fsflags, (int __user *)arg); in f2fs_ioc_getflags() 1830 static int f2fs_ioc_setflags(struct file *filp, unsigned long arg) in f2fs_ioc_setflags() argument 1841 if (get_user(fsflags, (int __user *)arg)) in f2fs_ioc_setflags() 1871 static int f2fs_ioc_getversion(struct file *filp, unsigned long arg) in f2fs_ioc_getversion() argument 1875 return put_user(inode->i_generation, (int __user *)arg); in f2fs_ioc_getversion() 2083 static int f2fs_ioc_shutdown(struct file *filp, unsigned long arg) in f2fs_ioc_shutdown() argument 2094 if (get_user(in, (__u32 __user *)arg)) in f2fs_ioc_shutdown() 2161 static int f2fs_ioc_fitrim(struct file *filp, unsigned long arg) in f2fs_ioc_fitrim() argument 2175 if (copy_from_user(&range, (struct fstrim_range __user *)arg, in f2fs_ioc_fitrim() [all …]
|
/fs/fuse/ |
D | inode.c | 846 sanitize_global_limit((unsigned *)kp->arg); in set_global_limit() 851 static void process_init_limits(struct fuse_conn *fc, struct fuse_init_out *arg) in process_init_limits() argument 855 if (arg->minor < 13) in process_init_limits() 862 if (arg->max_background) { in process_init_limits() 863 fc->max_background = arg->max_background; in process_init_limits() 868 if (arg->congestion_threshold) { in process_init_limits() 869 fc->congestion_threshold = arg->congestion_threshold; in process_init_limits() 888 struct fuse_init_out *arg = &ia->out; in process_init_reply() local 890 if (error || arg->major != FUSE_KERNEL_VERSION) in process_init_reply() 895 process_init_limits(fc, arg); in process_init_reply() [all …]
|
/fs/cifs/ |
D | ioctl.c | 130 void __user *arg) in smb_mnt_get_fsinfo() argument 157 if (copy_to_user(arg, fsinf, sizeof(struct smb_mnt_fs_info))) in smb_mnt_get_fsinfo() 164 long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) in cifs_ioctl() argument 193 (int __user *)arg); in cifs_ioctl() 203 (int __user *)arg); in cifs_ioctl() 212 if (get_user(ExtAttrBits, (int __user *)arg)) { in cifs_ioctl() 239 rc = cifs_ioctl_copychunk(xid, filep, arg); in cifs_ioctl() 242 rc = cifs_ioctl_query_info(xid, filep, arg); in cifs_ioctl() 258 rc = smb_mnt_get_fsinfo(xid, tcon, (void __user *)arg); in cifs_ioctl() 263 if (arg == 0) { in cifs_ioctl() [all …]
|
/fs/btrfs/ |
D | ioctl.c | 160 static int btrfs_ioctl_getflags(struct file *file, void __user *arg) in btrfs_ioctl_getflags() argument 165 if (copy_to_user(arg, &flags, sizeof(flags))) in btrfs_ioctl_getflags() 186 static int btrfs_ioctl_setflags(struct file *file, void __user *arg) in btrfs_ioctl_setflags() argument 204 if (copy_from_user(&fsflags, arg, sizeof(fsflags))) in btrfs_ioctl_setflags() 374 static int btrfs_ioctl_fsgetxattr(struct file *file, void __user *arg) in btrfs_ioctl_fsgetxattr() argument 380 if (copy_to_user(arg, &fa, sizeof(fa))) in btrfs_ioctl_fsgetxattr() 386 static int btrfs_ioctl_fssetxattr(struct file *file, void __user *arg) in btrfs_ioctl_fssetxattr() argument 403 if (copy_from_user(&fa, arg, sizeof(fa))) in btrfs_ioctl_fssetxattr() 475 static int btrfs_ioctl_getversion(struct file *file, int __user *arg) in btrfs_ioctl_getversion() argument 479 return put_user(inode->i_generation, arg); in btrfs_ioctl_getversion() [all …]
|
/fs/reiserfs/ |
D | ioctl.c | 23 long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in reiserfs_ioctl() argument 34 if (arg) in reiserfs_ioctl() 50 err = put_user(flags, (int __user *)arg); in reiserfs_ioctl() 66 if (get_user(flags, (int __user *)arg)) { in reiserfs_ioctl() 101 err = put_user(inode->i_generation, (int __user *)arg); in reiserfs_ioctl() 111 if (get_user(inode->i_generation, (int __user *)arg)) { in reiserfs_ioctl() 131 unsigned long arg) in reiserfs_compat_ioctl() argument 157 return reiserfs_ioctl(file, cmd, (unsigned long) compat_ptr(arg)); in reiserfs_compat_ioctl()
|
/fs/notify/dnotify/ |
D | dnotify.c | 190 static __u32 convert_arg(unsigned long arg) in convert_arg() argument 194 if (arg & DN_MULTISHOT) in convert_arg() 196 if (arg & DN_DELETE) in convert_arg() 198 if (arg & DN_MODIFY) in convert_arg() 200 if (arg & DN_ACCESS) in convert_arg() 202 if (arg & DN_ATTRIB) in convert_arg() 204 if (arg & DN_RENAME) in convert_arg() 206 if (arg & DN_CREATE) in convert_arg() 249 int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) in fcntl_dirnotify() argument 270 if ((arg & ~DN_MULTISHOT) == 0) { in fcntl_dirnotify() [all …]
|