aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/security.h
AgeCommit message (Expand)AuthorFilesLines
2017-06-23Merge branch 'stable-4.13' of git://git.infradead.org/users/pcmoore/selinux into nextJames Morris1-2/+56
2017-06-09security/selinux: allow security_sb_clone_mnt_opts to enable/disable native labeling behaviorScott Mayhew1-2/+6
2017-06-08securityfs: add the ability to support symlinksJohn Johansen1-0/+12
2017-05-23IB/core: Enforce security on management datagramsDaniel Jurgens1-0/+6
2017-05-23selinux lsm IB/core: Implement LSM notification systemDaniel Jurgens1-0/+23
2017-05-23IB/core: Enforce PKey security on QPsDaniel Jurgens1-0/+21
2017-03-28LSM: Revive security_task_alloc() hook and per "struct task_struct" security blob.Tetsuo Handa1-0/+7
2017-03-06prlimit,security,selinux: add a security hook for prlimitStephen Smalley1-0/+13
2017-02-23Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespaceLinus Torvalds1-2/+1
2017-01-24exec: Remove LSM_UNSAFE_PTRACE_CAPEric W. Biederman1-2/+1
2017-01-12security,selinux,smack: kill security_task_wait hookStephen Smalley1-6/+0
2017-01-09proc,security: move restriction on writing /proc/pid/attr nodes to procStephen Smalley1-2/+2
2016-09-19Merge branch 'stable-4.9' of git://git.infradead.org/users/pcmoore/selinux into nextJames Morris1-0/+24
2016-08-09module: Fully remove the kernel_module_from_file hookMickaël Salaün1-1/+0
2016-08-08security, overlayfs: Provide hook to correctly label newly created filesVivek Goyal1-0/+12
2016-08-08security,overlayfs: Provide security hook for copy up of xattrs for overlay fileVivek Goyal1-0/+6
2016-08-08security, overlayfs: provide copy up security hook for unioned filesVivek Goyal1-0/+6
2016-07-20qstr: constify dentry_init_securityAl Viro1-2/+2
2016-05-17Merge branch 'work.const-path' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfsLinus Torvalds1-29/+29
2016-04-22security: Introduce security_settime64()Baolin Wang1-3/+17
2016-03-28constify security_sb_pivotroot()Al Viro1-3/+3
2016-03-28constify security_path_chroot()Al Viro1-2/+2
2016-03-28constify security_path_{link,rename}Al Viro1-6/+6
2016-03-28constify security_path_{mkdir,mknod,symlink}Al Viro1-6/+6
2016-03-28constify security_path_{unlink,rmdir}Al Viro1-4/+4
2016-03-28constify chmod_common/security_path_chmodAl Viro1-2/+2
2016-03-28constify security_sb_mount()Al Viro1-2/+2
2016-03-28constify chown_common/security_path_chownAl Viro1-2/+2
2016-03-28constify security_path_truncate()Al Viro1-2/+2
2016-02-21module: replace copy_module_from_fd with kernel versionMimi Zohar1-5/+0
2016-02-21security: define kernel_read_file hookMimi Zohar1-0/+7
2016-02-21firmware: replace call to fw_read_file_contents() with kernel versionMimi Zohar1-7/+0
2016-02-20ima: define a new hook to measure and appraise a file already in memoryMimi Zohar1-0/+1
2016-02-18vfs: define kernel_read_file_id enumerationMimi Zohar1-2/+5
2016-02-18vfs: define a generic function to read a file from the kernelMimi Zohar1-0/+7
2015-12-24security: Add hook to invalidate inode security labelsAndreas Gruenbacher1-0/+5
2015-12-24security: Make inode argument of inode_getsecid non-constAndreas Gruenbacher1-2/+2
2015-12-24security: Make inode argument of inode_getsecurity non-constAndreas Gruenbacher1-2/+2
2015-09-20security: fix typo in security_task_prctlJann Horn1-1/+1
2015-06-27Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-securityLinus Torvalds1-1619/+4
2015-05-12LSM: Switch to lists of hooksCasey Schaufler1-42/+4
2015-05-12LSM: Remove a comment from security.hCasey Schaufler1-1270/+0
2015-05-12LSM: Split security.hCasey Schaufler1-305/+0
2015-05-11security: make inode_follow_link RCU-walk awareNeilBrown1-3/+9
2015-05-10SECURITY: remove nameidata arg from inode_follow_link.NeilBrown1-6/+3
2015-04-15Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds1-8/+0
2015-04-11switch security_inode_getattr() to struct path *Al Viro1-4/+3
2015-03-20Revert "selinux: add a skb_owned_by() hook"Eric Dumazet1-8/+0
2015-01-25Add security hooks to binder and implement the hooks for SELinux.Stephen Smalley1-0/+58
2014-10-12Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-securityLinus Torvalds1-1/+1
pan>retval; retval = vfs_statfs(path, &st); if (retval) return retval; if (sizeof(*buf) == sizeof(st)) memcpy(buf, &st, sizeof(st)); else { if (sizeof buf->f_blocks == 4) { if ((st.f_blocks | st.f_bfree | st.f_bavail | st.f_bsize | st.f_frsize) & 0xffffffff00000000ULL) return -EOVERFLOW; /* * f_files and f_ffree may be -1; it's okay to stuff * that into 32 bits */ if (st.f_files != -1 && (st.f_files & 0xffffffff00000000ULL)) return -EOVERFLOW; if (st.f_ffree != -1 && (st.f_ffree & 0xffffffff00000000ULL)) return -EOVERFLOW; } buf->f_type = st.f_type; buf->f_bsize = st.f_bsize; buf->f_blocks = st.f_blocks; buf->f_bfree = st.f_bfree; buf->f_bavail = st.f_bavail; buf->f_files = st.f_files; buf->f_ffree = st.f_ffree; buf->f_fsid = st.f_fsid; buf->f_namelen = st.f_namelen; buf->f_frsize = st.f_frsize; buf->f_flags = st.f_flags; memset(buf->f_spare, 0, sizeof(buf->f_spare)); } return 0; } static int do_statfs64(struct path *path, struct statfs64 *buf) { struct kstatfs st; int retval; retval = vfs_statfs(path, &st); if (retval) return retval; if (sizeof(*buf) == sizeof(st)) memcpy(buf, &st, sizeof(st)); else { buf->f_type = st.f_type; buf->f_bsize = st.f_bsize; buf->f_blocks = st.f_blocks; buf->f_bfree = st.f_bfree; buf->f_bavail = st.f_bavail; buf->f_files = st.f_files; buf->f_ffree = st.f_ffree; buf->f_fsid = st.f_fsid; buf->f_namelen = st.f_namelen; buf->f_frsize = st.f_frsize; buf->f_flags = st.f_flags; memset(buf->f_spare, 0, sizeof(buf->f_spare)); } return 0; } SYSCALL_DEFINE2(statfs, const char __user *, pathname, struct statfs __user *, buf) { struct path path; int error; error = user_path(pathname, &path); if (!error) { struct statfs tmp; error = do_statfs_native(&path, &tmp); if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) error = -EFAULT; path_put(&path); } return error; } SYSCALL_DEFINE3(statfs64, const char __user *, pathname, size_t, sz, struct statfs64 __user *, buf) { struct path path; long error; if (sz != sizeof(*buf)) return -EINVAL; error = user_path(pathname, &path); if (!error) { struct statfs64 tmp; error = do_statfs64(&path, &tmp); if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) error = -EFAULT; path_put(&path); } return error; } SYSCALL_DEFINE2(fstatfs, unsigned int, fd, struct statfs __user *, buf) { struct file *file; struct statfs tmp; int error; error = -EBADF; file = fget(fd); if (!file) goto out; error = do_statfs_native(&file->f_path, &tmp); if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) error = -EFAULT; fput(file); out: return error; } SYSCALL_DEFINE3(fstatfs64, unsigned int, fd, size_t, sz, struct statfs64 __user *, buf) { struct file *file; struct statfs64 tmp; int error; if (sz != sizeof(*buf)) return -EINVAL; error = -EBADF; file = fget(fd); if (!file) goto out; error = do_statfs64(&file->f_path, &tmp); if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) error = -EFAULT; fput(file); out: return error; } SYSCALL_DEFINE2(ustat, unsigned, dev, struct ustat __user *, ubuf) { struct super_block *s; struct ustat tmp; struct kstatfs sbuf; int err; s = user_get_super(new_decode_dev(dev)); if (!s) return -EINVAL; err = statfs_by_dentry(s->s_root, &sbuf); drop_super(s); if (err) return err; memset(&tmp,0,sizeof(struct ustat)); tmp.f_tfree = sbuf.f_bfree; tmp.f_tinode = sbuf.f_ffree; return copy_to_user(ubuf, &tmp, sizeof(struct ustat)) ? -EFAULT : 0; }