/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 | 41 long vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in vfs_ioctl() argument 48 error = filp->f_op->unlocked_ioctl(filp, cmd, arg); in vfs_ioctl() 668 unsigned int cmd, unsigned long arg) in do_vfs_ioctl() argument 670 void __user *argp = (void __user *)arg; in do_vfs_ioctl() 715 return ioctl_file_clone(filp, arg, 0, 0, 0); in do_vfs_ioctl() 725 return vfs_ioctl(filp, cmd, arg); in do_vfs_ioctl() 739 SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) in SYSCALL_DEFINE3() argument 747 error = security_file_ioctl(f.file, cmd, arg); in SYSCALL_DEFINE3() 751 error = do_vfs_ioctl(f.file, fd, cmd, arg); in SYSCALL_DEFINE3() 753 error = vfs_ioctl(f.file, cmd, arg); in SYSCALL_DEFINE3() [all …]
|
D | userfaultfd.c | 122 if (len && (start > uwq->msg.arg.pagefault.address || in userfaultfd_wake_function() 123 start + len <= uwq->msg.arg.pagefault.address)) in userfaultfd_wake_function() 208 msg.arg.pagefault.address = address; in userfault_msg() 219 msg.arg.pagefault.flags |= UFFD_PAGEFAULT_FLAG_WRITE; in userfault_msg() 221 msg.arg.pagefault.flags |= UFFD_PAGEFAULT_FLAG_WP; in userfault_msg() 223 msg.arg.pagefault.flags |= UFFD_PAGEFAULT_FLAG_MINOR; in userfault_msg() 225 msg.arg.pagefault.feat.ptid = task_pid_vnr(current); in userfault_msg() 617 ewq->msg.arg.reserved.reserved1; in userfaultfd_event_wait_completion() 730 ewq.msg.arg.reserved.reserved1 = (unsigned long)fctx->new; in dup_fctx() 786 ewq.msg.arg.remap.from = from; in mremap_userfaultfd_complete() [all …]
|
/fs/verity/ |
D | enable.c | 199 const struct fsverity_enable_arg *arg) in enable_verity() argument 205 size_t desc_size = sizeof(*desc) + arg->sig_size; in enable_verity() 214 desc->hash_algorithm = arg->hash_algorithm; in enable_verity() 215 desc->log_blocksize = ilog2(arg->block_size); in enable_verity() 218 if (arg->salt_size && in enable_verity() 219 copy_from_user(desc->salt, u64_to_user_ptr(arg->salt_ptr), in enable_verity() 220 arg->salt_size)) { in enable_verity() 224 desc->salt_size = arg->salt_size; in enable_verity() 227 if (arg->sig_size && in enable_verity() 228 copy_from_user(desc->signature, u64_to_user_ptr(arg->sig_ptr), in enable_verity() [all …]
|
D | measure.c | 29 struct fsverity_digest arg; in fsverity_ioctl_measure() local 42 if (get_user(arg.digest_size, &uarg->digest_size)) in fsverity_ioctl_measure() 44 if (arg.digest_size < hash_alg->digest_size) in fsverity_ioctl_measure() 47 memset(&arg, 0, sizeof(arg)); in fsverity_ioctl_measure() 48 arg.digest_algorithm = hash_alg - fsverity_hash_algs; in fsverity_ioctl_measure() 49 arg.digest_size = hash_alg->digest_size; in fsverity_ioctl_measure() 51 if (copy_to_user(uarg, &arg, sizeof(arg))) in fsverity_ioctl_measure()
|
D | read_metadata.c | 156 struct fsverity_read_metadata_arg arg; in fsverity_ioctl_read_metadata() local 168 if (copy_from_user(&arg, uarg, sizeof(arg))) in fsverity_ioctl_read_metadata() 171 if (arg.__reserved) in fsverity_ioctl_read_metadata() 175 if (arg.offset + arg.length < arg.offset) in fsverity_ioctl_read_metadata() 179 length = min_t(u64, arg.length, INT_MAX); in fsverity_ioctl_read_metadata() 181 buf = u64_to_user_ptr(arg.buf_ptr); in fsverity_ioctl_read_metadata() 183 switch (arg.metadata_type) { in fsverity_ioctl_read_metadata() 185 return fsverity_read_merkle_tree(inode, vi, buf, arg.offset, in fsverity_ioctl_read_metadata() 188 return fsverity_read_descriptor(inode, buf, arg.offset, length); in fsverity_ioctl_read_metadata() 190 return fsverity_read_signature(inode, buf, arg.offset, length); in fsverity_ioctl_read_metadata()
|
/fs/incfs/ |
D | verity.c | 518 const struct fsverity_enable_arg *arg) in incfs_enable_verity() argument 543 if (arg->sig_size) { in incfs_enable_verity() 544 signature = memdup_user(u64_to_user_ptr(arg->sig_ptr), in incfs_enable_verity() 545 arg->sig_size); in incfs_enable_verity() 554 arg->sig_size, arg->hash_algorithm); in incfs_enable_verity() 561 err = incfs_end_enable_verity(filp, signature, arg->sig_size); in incfs_enable_verity() 580 struct fsverity_enable_arg arg; in incfs_ioctl_enable_verity() local 582 if (copy_from_user(&arg, uarg, sizeof(arg))) in incfs_ioctl_enable_verity() 585 if (arg.version != 1) in incfs_ioctl_enable_verity() 588 if (arg.__reserved1 || in incfs_ioctl_enable_verity() [all …]
|
/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 …]
|
/fs/crypto/ |
D | keyring.c | 706 struct fscrypt_add_key_arg arg; in fscrypt_ioctl_add_key() local 710 if (copy_from_user(&arg, uarg, sizeof(arg))) in fscrypt_ioctl_add_key() 713 if (!valid_key_spec(&arg.key_spec)) in fscrypt_ioctl_add_key() 716 if (memchr_inv(arg.__reserved, 0, sizeof(arg.__reserved))) in fscrypt_ioctl_add_key() 724 if (arg.key_spec.type == FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR && in fscrypt_ioctl_add_key() 730 if (arg.__flags) { in fscrypt_ioctl_add_key() 731 if (arg.__flags & ~__FSCRYPT_ADD_KEY_FLAG_HW_WRAPPED) in fscrypt_ioctl_add_key() 733 if (arg.key_spec.type != FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER) in fscrypt_ioctl_add_key() 738 if (arg.key_id) { in fscrypt_ioctl_add_key() 739 if (arg.raw_size != 0) in fscrypt_ioctl_add_key() [all …]
|
D | policy.c | 436 int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg) in fscrypt_ioctl_set_policy() argument 445 if (get_user(policy.version, (const u8 __user *)arg)) in fscrypt_ioctl_set_policy() 464 if (copy_from_user(&policy, arg, size)) in fscrypt_ioctl_set_policy() 502 int fscrypt_ioctl_get_policy(struct file *filp, void __user *arg) in fscrypt_ioctl_get_policy() argument 514 if (copy_to_user(arg, &policy, sizeof(policy.v1))) in fscrypt_ioctl_get_policy() 523 struct fscrypt_get_policy_ex_arg arg; in fscrypt_ioctl_get_policy_ex() local 524 union fscrypt_policy *policy = (union fscrypt_policy *)&arg.policy; in fscrypt_ioctl_get_policy_ex() 529 BUILD_BUG_ON(offsetof(typeof(arg), policy_size) != 0); in fscrypt_ioctl_get_policy_ex() 530 BUILD_BUG_ON(offsetofend(typeof(arg), policy_size) != in fscrypt_ioctl_get_policy_ex() 531 offsetof(typeof(arg), policy)); in fscrypt_ioctl_get_policy_ex() [all …]
|
/fs/nfs/ |
D | nfs3proc.c | 131 struct nfs3_sattrargs arg = { in nfs3_proc_setattr() local 137 .rpc_argp = &arg, in nfs3_proc_setattr() 161 struct nfs3_diropargs arg = { in nfs3_proc_lookup() local 172 .rpc_argp = &arg, in nfs3_proc_lookup() 203 struct nfs3_accessargs arg = { in nfs3_proc_access() local 210 .rpc_argp = &arg, in nfs3_proc_access() 268 } arg; member 281 data->msg.rpc_argp = &data->arg; in nfs3_alloc_createdata() 329 data->arg.create.fh = NFS_FH(dir); in nfs3_proc_create() 330 data->arg.create.name = dentry->d_name.name; in nfs3_proc_create() [all …]
|
D | proc.c | 129 struct nfs_sattrargs arg = { in nfs_proc_setattr() local 135 .rpc_argp = &arg, in nfs_proc_setattr() 159 struct nfs_diropargs arg = { in nfs_proc_lookup() local 170 .rpc_argp = &arg, in nfs_proc_lookup() 209 struct nfs_createargs arg; member 223 data->arg.fh = NFS_FH(dir); in nfs_alloc_createdata() 224 data->arg.name = dentry->d_name.name; in nfs_alloc_createdata() 225 data->arg.len = dentry->d_name.len; in nfs_alloc_createdata() 226 data->arg.sattr = sattr; in nfs_alloc_createdata() 254 msg.rpc_argp = &data->arg; in nfs_proc_create() [all …]
|
/fs/xfs/ |
D | xfs_ioctl.c | 580 void __user *arg) in xfs_attrmulti_by_handle() argument 590 if (copy_from_user(&am_hreq, arg, sizeof(xfs_fsop_attrmulti_handlereq_t))) in xfs_attrmulti_by_handle() 740 void __user *arg) in xfs_ioc_fsbulkstat() argument 759 if (copy_from_user(&bulkreq, arg, sizeof(struct xfs_fsop_bulkreq))) in xfs_ioc_fsbulkstat() 914 struct xfs_bulkstat_req __user *arg) in xfs_ioc_bulkstat() argument 928 if (copy_from_user(&hdr, &arg->hdr, sizeof(hdr))) in xfs_ioc_bulkstat() 931 error = xfs_bulk_ireq_setup(mp, &hdr, &breq, arg->bulkstat); in xfs_ioc_bulkstat() 943 if (copy_to_user(&arg->hdr, &hdr, sizeof(hdr))) in xfs_ioc_bulkstat() 964 struct xfs_inumbers_req __user *arg) in xfs_ioc_inumbers() argument 978 if (copy_from_user(&hdr, &arg->hdr, sizeof(hdr))) in xfs_ioc_inumbers() [all …]
|
/fs/ubifs/ |
D | ioctl.c | 142 long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in ubifs_ioctl() argument 152 return put_user(flags, (int __user *) arg); in ubifs_ioctl() 161 if (get_user(flags, (int __user *) arg)) in ubifs_ioctl() 190 return fscrypt_ioctl_set_policy(file, (const void __user *)arg); in ubifs_ioctl() 193 return fscrypt_ioctl_get_policy(file, (void __user *)arg); in ubifs_ioctl() 196 return fscrypt_ioctl_get_policy_ex(file, (void __user *)arg); in ubifs_ioctl() 199 return fscrypt_ioctl_add_key(file, (void __user *)arg); in ubifs_ioctl() 202 return fscrypt_ioctl_remove_key(file, (void __user *)arg); in ubifs_ioctl() 206 (void __user *)arg); in ubifs_ioctl() 208 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/ext4/ |
D | ioctl.c | 611 static int ext4_shutdown(struct super_block *sb, unsigned long arg) in ext4_shutdown() argument 620 if (get_user(flags, (__u32 __user *)arg)) in ext4_shutdown() 683 struct fsmap_head __user *arg) in ext4_ioc_getfsmap() argument 691 if (copy_from_user(&head, arg, sizeof(struct fsmap_head))) in ext4_ioc_getfsmap() 717 info.gi_data = arg; in ext4_ioc_getfsmap() 737 if (copy_to_user(arg, &head, sizeof(struct fsmap_head))) in ext4_ioc_getfsmap() 795 static int ext4_ioctl_get_es_cache(struct file *filp, unsigned long arg) in ext4_ioctl_get_es_cache() argument 798 struct fiemap __user *ufiemap = (struct fiemap __user *) arg; in ext4_ioctl_get_es_cache() 823 static long __ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in __ext4_ioctl() argument 830 ext4_debug("cmd = %u, arg = %lu\n", cmd, arg); in __ext4_ioctl() [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() 162 long ext2_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in ext2_compat_ioctl() argument 181 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() 271 long ceph_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in ceph_ioctl() argument [all …]
|
D | caps.c | 1239 static void encode_cap_msg(struct ceph_msg *msg, struct cap_msg_args *arg) in encode_cap_msg() argument 1243 struct ceph_osd_client *osdc = &arg->session->s_mdsc->fsc->client->osdc; in encode_cap_msg() 1246 __func__, ceph_cap_op_name(arg->op), arg->cid, arg->ino, in encode_cap_msg() 1247 ceph_cap_string(arg->caps), ceph_cap_string(arg->wanted), in encode_cap_msg() 1248 ceph_cap_string(arg->dirty), arg->seq, arg->issue_seq, in encode_cap_msg() 1249 arg->flush_tid, arg->oldest_flush_tid, arg->mseq, arg->follows, in encode_cap_msg() 1250 arg->size, arg->max_size, arg->xattr_version, in encode_cap_msg() 1251 arg->xattr_buf ? (int)arg->xattr_buf->vec.iov_len : 0); in encode_cap_msg() 1254 msg->hdr.tid = cpu_to_le64(arg->flush_tid); in encode_cap_msg() 1259 fc->cap_id = cpu_to_le64(arg->cid); in encode_cap_msg() [all …]
|
/fs/f2fs/ |
D | file.c | 1958 static int f2fs_ioc_getflags(struct file *filp, unsigned long arg) in f2fs_ioc_getflags() argument 1975 return put_user(fsflags, (int __user *)arg); in f2fs_ioc_getflags() 1978 static int f2fs_ioc_setflags(struct file *filp, unsigned long arg) in f2fs_ioc_setflags() argument 1989 if (get_user(fsflags, (int __user *)arg)) in f2fs_ioc_setflags() 2019 static int f2fs_ioc_getversion(struct file *filp, unsigned long arg) in f2fs_ioc_getversion() argument 2023 return put_user(inode->i_generation, (int __user *)arg); in f2fs_ioc_getversion() 2235 static int f2fs_ioc_shutdown(struct file *filp, unsigned long arg) in f2fs_ioc_shutdown() argument 2246 if (get_user(in, (__u32 __user *)arg)) in f2fs_ioc_shutdown() 2317 static int f2fs_ioc_fitrim(struct file *filp, unsigned long arg) in f2fs_ioc_fitrim() argument 2331 if (copy_from_user(&range, (struct fstrim_range __user *)arg, in f2fs_ioc_fitrim() [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 195 (int __user *)arg); in cifs_ioctl() 205 (int __user *)arg); in cifs_ioctl() 214 if (get_user(ExtAttrBits, (int __user *)arg)) { in cifs_ioctl() 241 rc = cifs_ioctl_copychunk(xid, filep, arg); in cifs_ioctl() 244 rc = cifs_ioctl_query_info(xid, filep, arg); in cifs_ioctl() 260 rc = smb_mnt_get_fsinfo(xid, tcon, (void __user *)arg); in cifs_ioctl() 265 if (arg == 0) { in cifs_ioctl() [all …]
|
/fs/btrfs/ |
D | ioctl.c | 157 static int btrfs_ioctl_getflags(struct file *file, void __user *arg) in btrfs_ioctl_getflags() argument 162 if (copy_to_user(arg, &flags, sizeof(flags))) in btrfs_ioctl_getflags() 196 static int btrfs_ioctl_setflags(struct file *file, void __user *arg) in btrfs_ioctl_setflags() argument 214 if (copy_from_user(&fsflags, arg, sizeof(fsflags))) in btrfs_ioctl_setflags() 397 static int btrfs_ioctl_fsgetxattr(struct file *file, void __user *arg) in btrfs_ioctl_fsgetxattr() argument 403 if (copy_to_user(arg, &fa, sizeof(fa))) in btrfs_ioctl_fsgetxattr() 409 static int btrfs_ioctl_fssetxattr(struct file *file, void __user *arg) in btrfs_ioctl_fssetxattr() argument 426 if (copy_from_user(&fa, arg, sizeof(fa))) in btrfs_ioctl_fssetxattr() 498 static int btrfs_ioctl_getversion(struct file *file, int __user *arg) in btrfs_ioctl_getversion() argument 502 return put_user(inode->i_generation, arg); in btrfs_ioctl_getversion() [all …]
|
/fs/fuse/ |
D | inode.c | 956 sanitize_global_limit((unsigned *)kp->arg); in set_global_limit() 961 static void process_init_limits(struct fuse_conn *fc, struct fuse_init_out *arg) in process_init_limits() argument 965 if (arg->minor < 13) in process_init_limits() 972 if (arg->max_background) { in process_init_limits() 973 fc->max_background = arg->max_background; in process_init_limits() 978 if (arg->congestion_threshold) { in process_init_limits() 979 fc->congestion_threshold = arg->congestion_threshold; in process_init_limits() 999 struct fuse_init_out *arg = &ia->out; in process_init_reply() local 1002 if (error || arg->major != FUSE_KERNEL_VERSION) in process_init_reply() 1007 process_init_limits(fc, arg); in process_init_reply() [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 | 184 static __u32 convert_arg(unsigned long arg) in convert_arg() argument 188 if (arg & DN_MULTISHOT) in convert_arg() 190 if (arg & DN_DELETE) in convert_arg() 192 if (arg & DN_MODIFY) in convert_arg() 194 if (arg & DN_ACCESS) in convert_arg() 196 if (arg & DN_ATTRIB) in convert_arg() 198 if (arg & DN_RENAME) in convert_arg() 200 if (arg & DN_CREATE) in convert_arg() 243 int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) in fcntl_dirnotify() argument 264 if ((arg & ~DN_MULTISHOT) == 0) { in fcntl_dirnotify() [all …]
|