]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sparse: selinux annotation
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Thu, 3 Jun 2004 17:38:37 +0000 (10:38 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 17:38:37 +0000 (10:38 -0700)
selinuxfs.c annotated

security/selinux/selinuxfs.c

index 274275a61f4d61d939da18a59b02e5ef3b9fa2fe..975a17708de8395453db25e0b6d1e79213ea08f0 100644 (file)
@@ -68,7 +68,7 @@ enum sel_inos {
        SEL_DISABLE     /* disable SELinux until next reboot */
 };
 
-static ssize_t sel_read_enforce(struct file *filp, char *buf,
+static ssize_t sel_read_enforce(struct file *filp, char __user *buf,
                                size_t count, loff_t *ppos)
 {
        char *page;
@@ -105,7 +105,7 @@ out:
 }
 
 #ifdef CONFIG_SECURITY_SELINUX_DEVELOP
-static ssize_t sel_write_enforce(struct file * file, const char * buf,
+static ssize_t sel_write_enforce(struct file * file, const char __user * buf,
                                 size_t count, loff_t *ppos)
 
 {
@@ -155,7 +155,7 @@ static struct file_operations sel_enforce_ops = {
 };
 
 #ifdef CONFIG_SECURITY_SELINUX_DISABLE
-static ssize_t sel_write_disable(struct file * file, const char * buf,
+static ssize_t sel_write_disable(struct file * file, const char __user * buf,
                                 size_t count, loff_t *ppos)
 
 {
@@ -201,7 +201,7 @@ static struct file_operations sel_disable_ops = {
        .write          = sel_write_disable,
 };
 
-static ssize_t sel_read_policyvers(struct file *filp, char *buf,
+static ssize_t sel_read_policyvers(struct file *filp, char __user *buf,
                                    size_t count, loff_t *ppos)
 {
        char *page;
@@ -244,7 +244,7 @@ static struct file_operations sel_policyvers_ops = {
 /* declaration for sel_write_load */
 static int sel_make_bools(void);
 
-static ssize_t sel_read_mls(struct file *filp, char *buf,
+static ssize_t sel_read_mls(struct file *filp, char __user *buf,
                                size_t count, loff_t *ppos)
 {
        char *page;
@@ -284,7 +284,7 @@ static struct file_operations sel_mls_ops = {
        .read           = sel_read_mls,
 };
 
-static ssize_t sel_write_load(struct file * file, const char * buf,
+static ssize_t sel_write_load(struct file * file, const char __user * buf,
                              size_t count, loff_t *ppos)
 
 {
@@ -334,7 +334,7 @@ static struct file_operations sel_load_ops = {
 };
 
 
-static ssize_t sel_write_context(struct file * file, const char * buf,
+static ssize_t sel_write_context(struct file * file, const char __user * buf,
                                 size_t count, loff_t *ppos)
 
 {
@@ -406,7 +406,7 @@ struct argresp {
  * possibly a read which collects the result - which is stored in a
  * file-local buffer.
  */
-static ssize_t TA_write(struct file *file, const char *buf, size_t size, loff_t *pos)
+static ssize_t TA_write(struct file *file, const char __user *buf, size_t size, loff_t *pos)
 {
        ino_t ino =  file->f_dentry->d_inode->i_ino;
        struct argresp *ar;
@@ -445,7 +445,7 @@ static ssize_t TA_write(struct file *file, const char *buf, size_t size, loff_t
        return rv;
 }
 
-static ssize_t TA_read(struct file *file, char *buf, size_t size, loff_t *pos)
+static ssize_t TA_read(struct file *file, char __user *buf, size_t size, loff_t *pos)
 {
        struct argresp *ar;
        ssize_t rv = 0;
@@ -744,7 +744,7 @@ static struct inode *sel_make_inode(struct super_block *sb, int mode)
 
 #define BOOL_INO_OFFSET 30
 
-static ssize_t sel_read_bool(struct file *filep, char *buf,
+static ssize_t sel_read_bool(struct file *filep, char __user *buf,
                             size_t count, loff_t *ppos)
 {
        char *page = NULL;
@@ -806,7 +806,7 @@ out:
        return ret;
 }
 
-static ssize_t sel_write_bool(struct file *filep, const char *buf,
+static ssize_t sel_write_bool(struct file *filep, const char __user *buf,
                              size_t count, loff_t *ppos)
 {
        char *page = NULL;
@@ -865,7 +865,8 @@ static struct file_operations sel_bool_ops = {
        .write          = sel_write_bool,
 };
 
-static ssize_t sel_commit_bools_write(struct file *filep, const char *buf,
+static ssize_t sel_commit_bools_write(struct file *filep,
+                                     const char __user *buf,
                                      size_t count, loff_t *ppos)
 {
        char *page = NULL;