--- zzzz-none-000/linux-2.6.32.60/include/linux/security.h 2012-10-07 21:41:24.000000000 +0000 +++ ur8-7270-606/linux-2.6.32.60/include/linux/security.h 2010-12-03 17:09:05.000000000 +0000 @@ -1892,11 +1892,11 @@ struct security_mnt_opts { }; -static inline void security_init_mnt_opts(struct security_mnt_opts *opts) +static inline void security_init_mnt_opts(struct security_mnt_opts *opts __attribute__ ((unused))) { } -static inline void security_free_mnt_opts(struct security_mnt_opts *opts) +static inline void security_free_mnt_opts(struct security_mnt_opts *opts __attribute__ ((unused))) { } @@ -1965,23 +1965,26 @@ return ret; } -static inline int security_acct(struct file *file) +static inline int security_acct(struct file *file __attribute__ ((unused))) { return 0; } -static inline int security_sysctl(struct ctl_table *table, int op) +static inline int security_sysctl(struct ctl_table *table __attribute__ ((unused)), + int op __attribute__ ((unused))) { return 0; } -static inline int security_quotactl(int cmds, int type, int id, - struct super_block *sb) +static inline int security_quotactl(int cmds __attribute__ ((unused)), + int type __attribute__ ((unused)), + int id __attribute__ ((unused)), + struct super_block *sb __attribute__ ((unused))) { return 0; } -static inline int security_quota_on(struct dentry *dentry) +static inline int security_quota_on(struct dentry *dentry __attribute__ ((unused))) { return 0; } @@ -2020,16 +2023,16 @@ return cap_bprm_set_creds(bprm); } -static inline int security_bprm_check(struct linux_binprm *bprm) +static inline int security_bprm_check(struct linux_binprm *bprm __attribute__ ((unused))) { return 0; } -static inline void security_bprm_committing_creds(struct linux_binprm *bprm) +static inline void security_bprm_committing_creds(struct linux_binprm *bprm __attribute__ ((unused))) { } -static inline void security_bprm_committed_creds(struct linux_binprm *bprm) +static inline void security_bprm_committed_creds(struct linux_binprm *bprm __attribute__ ((unused))) { } @@ -2038,193 +2041,203 @@ return cap_bprm_secureexec(bprm); } -static inline int security_sb_alloc(struct super_block *sb) +static inline int security_sb_alloc(struct super_block *sb __attribute__ ((unused))) { return 0; } -static inline void security_sb_free(struct super_block *sb) +static inline void security_sb_free(struct super_block *sb __attribute__ ((unused))) { } -static inline int security_sb_copy_data(char *orig, char *copy) +static inline int security_sb_copy_data(char *orig __attribute__ ((unused)), + char *copy __attribute__ ((unused))) { return 0; } -static inline int security_sb_kern_mount(struct super_block *sb, int flags, void *data) +static inline int security_sb_kern_mount(struct super_block *sb __attribute__ ((unused)), + int flags __attribute__ ((unused)), + void *data __attribute__ ((unused))) { return 0; } -static inline int security_sb_show_options(struct seq_file *m, - struct super_block *sb) +static inline int security_sb_show_options(struct seq_file *m __attribute__ ((unused)), + struct super_block *sb __attribute__ ((unused))) { return 0; } -static inline int security_sb_statfs(struct dentry *dentry) +static inline int security_sb_statfs(struct dentry *dentry __attribute__ ((unused))) { return 0; } -static inline int security_sb_mount(char *dev_name, struct path *path, - char *type, unsigned long flags, - void *data) +static inline int security_sb_mount(char *dev_name __attribute__ ((unused)), + struct path *path __attribute__ ((unused)), + char *type __attribute__ ((unused)), + unsigned long flags __attribute__ ((unused)), + void *data __attribute__ ((unused))) { return 0; } -static inline int security_sb_check_sb(struct vfsmount *mnt, - struct path *path) +static inline int security_sb_check_sb(struct vfsmount *mnt __attribute__ ((unused)), + struct path *path __attribute__ ((unused))) { return 0; } -static inline int security_sb_umount(struct vfsmount *mnt, int flags) +static inline int security_sb_umount(struct vfsmount *mnt __attribute__ ((unused)), + int flags __attribute__ ((unused))) { return 0; } -static inline void security_sb_umount_close(struct vfsmount *mnt) +static inline void security_sb_umount_close(struct vfsmount *mnt __attribute__ ((unused))) { } -static inline void security_sb_umount_busy(struct vfsmount *mnt) +static inline void security_sb_umount_busy(struct vfsmount *mnt __attribute__ ((unused))) { } -static inline void security_sb_post_remount(struct vfsmount *mnt, - unsigned long flags, void *data) +static inline void security_sb_post_remount(struct vfsmount *mnt __attribute__ ((unused)), + unsigned long flags __attribute__ ((unused)), + void *data __attribute__ ((unused))) { } -static inline void security_sb_post_addmount(struct vfsmount *mnt, - struct path *mountpoint) +static inline void security_sb_post_addmount(struct vfsmount *mnt __attribute__ ((unused)), + struct path *mountpoint __attribute__ ((unused))) { } -static inline int security_sb_pivotroot(struct path *old_path, - struct path *new_path) +static inline int security_sb_pivotroot(struct path *old_path __attribute__ ((unused)), + struct path *new_path __attribute__ ((unused))) { return 0; } -static inline void security_sb_post_pivotroot(struct path *old_path, - struct path *new_path) +static inline void security_sb_post_pivotroot(struct path *old_path __attribute__ ((unused)), + struct path *new_path __attribute__ ((unused))) { } -static inline int security_sb_set_mnt_opts(struct super_block *sb, - struct security_mnt_opts *opts) +static inline int security_sb_set_mnt_opts(struct super_block *sb __attribute__ ((unused)), + struct security_mnt_opts *opts __attribute__ ((unused))) { return 0; } -static inline void security_sb_clone_mnt_opts(const struct super_block *oldsb, - struct super_block *newsb) +static inline void security_sb_clone_mnt_opts(const struct super_block *oldsb __attribute__ ((unused)), + struct super_block *newsb __attribute__ ((unused))) { } -static inline int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts) +static inline int security_sb_parse_opts_str(char *options __attribute__ ((unused)), + struct security_mnt_opts *opts __attribute__ ((unused))) { return 0; } -static inline int security_inode_alloc(struct inode *inode) +static inline int security_inode_alloc(struct inode *inode __attribute__ ((unused))) { return 0; } -static inline void security_inode_free(struct inode *inode) +static inline void security_inode_free(struct inode *inode __attribute__ ((unused))) { } -static inline int security_inode_init_security(struct inode *inode, - struct inode *dir, - char **name, - void **value, - size_t *len) +static inline int security_inode_init_security(struct inode *inode __attribute__ ((unused)), + struct inode *dir __attribute__ ((unused)), + char **name __attribute__ ((unused)), + void **value __attribute__ ((unused)), + size_t *len __attribute__ ((unused))) { return -EOPNOTSUPP; } -static inline int security_inode_create(struct inode *dir, - struct dentry *dentry, - int mode) +static inline int security_inode_create(struct inode *dir __attribute__ ((unused)), + struct dentry *dentry __attribute__ ((unused)), + int mode __attribute__ ((unused))) { return 0; } -static inline int security_inode_link(struct dentry *old_dentry, - struct inode *dir, - struct dentry *new_dentry) +static inline int security_inode_link(struct dentry *old_dentry __attribute__ ((unused)), + struct inode *dir __attribute__ ((unused)), + struct dentry *new_dentry __attribute__ ((unused))) { return 0; } -static inline int security_inode_unlink(struct inode *dir, - struct dentry *dentry) +static inline int security_inode_unlink(struct inode *dir __attribute__ ((unused)), + struct dentry *dentry __attribute__ ((unused))) { return 0; } -static inline int security_inode_symlink(struct inode *dir, - struct dentry *dentry, - const char *old_name) +static inline int security_inode_symlink(struct inode *dir __attribute__ ((unused)), + struct dentry *dentry __attribute__ ((unused)), + const char *old_name __attribute__ ((unused))) { return 0; } -static inline int security_inode_mkdir(struct inode *dir, - struct dentry *dentry, - int mode) +static inline int security_inode_mkdir(struct inode *dir __attribute__ ((unused)), + struct dentry *dentry __attribute__ ((unused)), + int mode __attribute__ ((unused))) { return 0; } -static inline int security_inode_rmdir(struct inode *dir, - struct dentry *dentry) +static inline int security_inode_rmdir(struct inode *dir __attribute__ ((unused)), + struct dentry *dentry __attribute__ ((unused))) { return 0; } -static inline int security_inode_mknod(struct inode *dir, - struct dentry *dentry, - int mode, dev_t dev) +static inline int security_inode_mknod(struct inode *dir __attribute__ ((unused)), + struct dentry *dentry __attribute__ ((unused)), + int mode __attribute__ ((unused)), + dev_t dev __attribute__ ((unused))) { return 0; } -static inline int security_inode_rename(struct inode *old_dir, - struct dentry *old_dentry, - struct inode *new_dir, - struct dentry *new_dentry) +static inline int security_inode_rename(struct inode *old_dir __attribute__ ((unused)), + struct dentry *old_dentry __attribute__ ((unused)), + struct inode *new_dir __attribute__ ((unused)), + struct dentry *new_dentry __attribute__ ((unused))) { return 0; } -static inline int security_inode_readlink(struct dentry *dentry) +static inline int security_inode_readlink(struct dentry *dentry __attribute__ ((unused))) { return 0; } -static inline int security_inode_follow_link(struct dentry *dentry, - struct nameidata *nd) +static inline int security_inode_follow_link(struct dentry *dentry __attribute__ ((unused)), + struct nameidata *nd __attribute__ ((unused))) { return 0; } -static inline int security_inode_permission(struct inode *inode, int mask) +static inline int security_inode_permission(struct inode *inode __attribute__ ((unused)), + int mask __attribute__ ((unused))) { return 0; } -static inline int security_inode_setattr(struct dentry *dentry, - struct iattr *attr) +static inline int security_inode_setattr(struct dentry *dentry __attribute__ ((unused)), + struct iattr *attr __attribute__ ((unused))) { return 0; } -static inline int security_inode_getattr(struct vfsmount *mnt, - struct dentry *dentry) +static inline int security_inode_getattr(struct vfsmount *mnt __attribute__ ((unused)), + struct dentry *dentry __attribute__ ((unused))) { return 0; } -static inline void security_inode_delete(struct inode *inode) +static inline void security_inode_delete(struct inode *inode __attribute__ ((unused))) { } static inline int security_inode_setxattr(struct dentry *dentry, @@ -2233,17 +2246,20 @@ return cap_inode_setxattr(dentry, name, value, size, flags); } -static inline void security_inode_post_setxattr(struct dentry *dentry, - const char *name, const void *value, size_t size, int flags) +static inline void security_inode_post_setxattr(struct dentry *dentry __attribute__ ((unused)), + const char *name __attribute__ ((unused)), + const void *value __attribute__ ((unused)), + size_t size __attribute__ ((unused)), + int flags __attribute__ ((unused))) { } -static inline int security_inode_getxattr(struct dentry *dentry, - const char *name) +static inline int security_inode_getxattr(struct dentry *dentry __attribute__ ((unused)), + const char *name __attribute__ ((unused))) { return 0; } -static inline int security_inode_listxattr(struct dentry *dentry) +static inline int security_inode_listxattr(struct dentry *dentry __attribute__ ((unused))) { return 0; } @@ -2264,41 +2280,53 @@ return cap_inode_killpriv(dentry); } -static inline int security_inode_getsecurity(const struct inode *inode, const char *name, void **buffer, bool alloc) +static inline int security_inode_getsecurity(const struct inode *inode __attribute__ ((unused)), + const char *name __attribute__ ((unused)), + void **buffer __attribute__ ((unused)), + bool alloc __attribute__ ((unused))) { return -EOPNOTSUPP; } -static inline int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags) +static inline int security_inode_setsecurity(struct inode *inode __attribute__ ((unused)), + const char *name __attribute__ ((unused)), + const void *value __attribute__ ((unused)), + size_t size __attribute__ ((unused)), + int flags __attribute__ ((unused))) { return -EOPNOTSUPP; } -static inline int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size) +static inline int security_inode_listsecurity(struct inode *inode __attribute__ ((unused)), + char *buffer __attribute__ ((unused)), + size_t buffer_size __attribute__ ((unused))) { return 0; } -static inline void security_inode_getsecid(const struct inode *inode, u32 *secid) +static inline void security_inode_getsecid(const struct inode *inode __attribute__ ((unused)), + u32 *secid) { *secid = 0; } -static inline int security_file_permission(struct file *file, int mask) +static inline int security_file_permission(struct file *file __attribute__ ((unused)), + int mask __attribute__ ((unused))) { return 0; } -static inline int security_file_alloc(struct file *file) +static inline int security_file_alloc(struct file *file __attribute__ ((unused))) { return 0; } -static inline void security_file_free(struct file *file) +static inline void security_file_free(struct file *file __attribute__ ((unused))) { } -static inline int security_file_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) +static inline int security_file_ioctl(struct file *file __attribute__ ((unused)), + unsigned int cmd __attribute__ ((unused)), + unsigned long arg __attribute__ ((unused))) { return 0; } @@ -2312,84 +2340,88 @@ return cap_file_mmap(file, reqprot, prot, flags, addr, addr_only); } -static inline int security_file_mprotect(struct vm_area_struct *vma, - unsigned long reqprot, - unsigned long prot) +static inline int security_file_mprotect(struct vm_area_struct *vma __attribute__ ((unused)), + unsigned long reqprot __attribute__ ((unused)), + unsigned long prot __attribute__ ((unused))) { return 0; } -static inline int security_file_lock(struct file *file, unsigned int cmd) +static inline int security_file_lock(struct file *file __attribute__ ((unused)), + unsigned int cmd __attribute__ ((unused))) { return 0; } -static inline int security_file_fcntl(struct file *file, unsigned int cmd, - unsigned long arg) +static inline int security_file_fcntl(struct file *file __attribute__ ((unused)), + unsigned int cmd __attribute__ ((unused)), + unsigned long arg __attribute__ ((unused))) { return 0; } -static inline int security_file_set_fowner(struct file *file) +static inline int security_file_set_fowner(struct file *file __attribute__ ((unused))) { return 0; } -static inline int security_file_send_sigiotask(struct task_struct *tsk, - struct fown_struct *fown, - int sig) +static inline int security_file_send_sigiotask(struct task_struct *tsk __attribute__ ((unused)), + struct fown_struct *fown __attribute__ ((unused)), + int sig __attribute__ ((unused))) { return 0; } -static inline int security_file_receive(struct file *file) +static inline int security_file_receive(struct file *file __attribute__ ((unused))) { return 0; } -static inline int security_dentry_open(struct file *file, - const struct cred *cred) +static inline int security_dentry_open(struct file *file __attribute__ ((unused)), + const struct cred *cred __attribute__ ((unused))) { return 0; } -static inline int security_task_create(unsigned long clone_flags) +static inline int security_task_create(unsigned long clone_flags __attribute__ ((unused))) { return 0; } -static inline int security_cred_alloc_blank(struct cred *cred, gfp_t gfp) +static inline int security_cred_alloc_blank(struct cred *cred __attribute__ ((unused)), + gfp_t gfp __attribute__ ((unused))) { return 0; } -static inline void security_cred_free(struct cred *cred) +static inline void security_cred_free(struct cred *cred __attribute__ ((unused))) { } -static inline int security_prepare_creds(struct cred *new, - const struct cred *old, - gfp_t gfp) +static inline int security_prepare_creds(struct cred *new __attribute__ ((unused)), + const struct cred *old __attribute__ ((unused)), + gfp_t gfp __attribute__ ((unused))) { return 0; } -static inline void security_commit_creds(struct cred *new, - const struct cred *old) +static inline void security_commit_creds(struct cred *new __attribute__ ((unused)), + const struct cred *old __attribute__ ((unused))) { } -static inline void security_transfer_creds(struct cred *new, - const struct cred *old) +static inline void security_transfer_creds(struct cred *new __attribute__ ((unused)), + const struct cred *old __attribute__ ((unused))) { } -static inline int security_kernel_act_as(struct cred *cred, u32 secid) +static inline int security_kernel_act_as(struct cred *cred __attribute__ ((unused)), + u32 secid __attribute__ ((unused))) { return 0; } -static inline int security_kernel_create_files_as(struct cred *cred, - struct inode *inode) +static inline int security_kernel_create_files_as(struct cred *cred __attribute__ ((unused)), + struct inode *inode __attribute__ ((unused))) { return 0; } @@ -2399,8 +2431,10 @@ return 0; } -static inline int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, - int flags) +static inline int security_task_setuid(uid_t id0 __attribute__ ((unused)), + uid_t id1 __attribute__ ((unused)), + uid_t id2 __attribute__ ((unused)), + int flags __attribute__ ((unused))) { return 0; } @@ -2412,33 +2446,37 @@ return cap_task_fix_setuid(new, old, flags); } -static inline int security_task_setgid(gid_t id0, gid_t id1, gid_t id2, - int flags) +static inline int security_task_setgid(gid_t id0 __attribute__ ((unused)), + gid_t id1 __attribute__ ((unused)), + gid_t id2 __attribute__ ((unused)), + int flags __attribute__ ((unused))) { return 0; } -static inline int security_task_setpgid(struct task_struct *p, pid_t pgid) +static inline int security_task_setpgid(struct task_struct *p __attribute__ ((unused)), + pid_t pgid __attribute__ ((unused))) { return 0; } -static inline int security_task_getpgid(struct task_struct *p) +static inline int security_task_getpgid(struct task_struct *p __attribute__ ((unused))) { return 0; } -static inline int security_task_getsid(struct task_struct *p) +static inline int security_task_getsid(struct task_struct *p __attribute__ ((unused))) { return 0; } -static inline void security_task_getsecid(struct task_struct *p, u32 *secid) +static inline void security_task_getsecid(struct task_struct *p __attribute__ ((unused)), + u32 *secid __attribute__ ((unused))) { *secid = 0; } -static inline int security_task_setgroups(struct group_info *group_info) +static inline int security_task_setgroups(struct group_info *group_info __attribute__ ((unused))) { return 0; } @@ -2453,13 +2491,13 @@ return cap_task_setioprio(p, ioprio); } -static inline int security_task_getioprio(struct task_struct *p) +static inline int security_task_getioprio(struct task_struct *p __attribute__ ((unused))) { return 0; } -static inline int security_task_setrlimit(unsigned int resource, - struct rlimit *new_rlim) +static inline int security_task_setrlimit(unsigned int resource __attribute__ ((unused)), + struct rlimit *new_rlim __attribute__ ((unused))) { return 0; } @@ -2471,150 +2509,167 @@ return cap_task_setscheduler(p, policy, lp); } -static inline int security_task_getscheduler(struct task_struct *p) +static inline int security_task_getscheduler(struct task_struct *p __attribute__ ((unused))) { return 0; } -static inline int security_task_movememory(struct task_struct *p) +static inline int security_task_movememory(struct task_struct *p __attribute__ ((unused))) { return 0; } -static inline int security_task_kill(struct task_struct *p, - struct siginfo *info, int sig, - u32 secid) +static inline int security_task_kill(struct task_struct *p __attribute__ ((unused)), + struct siginfo *info __attribute__ ((unused)), + int sig __attribute__ ((unused)), + u32 secid __attribute__ ((unused))) { return 0; } -static inline int security_task_wait(struct task_struct *p) +static inline int security_task_wait(struct task_struct *p __attribute__ ((unused))) { return 0; } static inline int security_task_prctl(int option, unsigned long arg2, unsigned long arg3, - unsigned long arg4, + unsigned long arg4 __attribute__ ((unused)), unsigned long arg5) { return cap_task_prctl(option, arg2, arg3, arg3, arg5); } -static inline void security_task_to_inode(struct task_struct *p, struct inode *inode) +static inline void security_task_to_inode(struct task_struct *p __attribute__ ((unused)), + struct inode *inode __attribute__ ((unused))) { } -static inline int security_ipc_permission(struct kern_ipc_perm *ipcp, - short flag) +static inline int security_ipc_permission(struct kern_ipc_perm *ipcp __attribute__ ((unused)), + short flag __attribute__ ((unused))) { return 0; } -static inline void security_ipc_getsecid(struct kern_ipc_perm *ipcp, u32 *secid) +static inline void security_ipc_getsecid(struct kern_ipc_perm *ipcp __attribute__ ((unused)), + u32 *secid) { *secid = 0; } -static inline int security_msg_msg_alloc(struct msg_msg *msg) +static inline int security_msg_msg_alloc(struct msg_msg *msg __attribute__ ((unused))) { return 0; } -static inline void security_msg_msg_free(struct msg_msg *msg) +static inline void security_msg_msg_free(struct msg_msg *msg __attribute__ ((unused))) { } -static inline int security_msg_queue_alloc(struct msg_queue *msq) +static inline int security_msg_queue_alloc(struct msg_queue *msq __attribute__ ((unused))) { return 0; } -static inline void security_msg_queue_free(struct msg_queue *msq) +static inline void security_msg_queue_free(struct msg_queue *msq __attribute__ ((unused))) { } -static inline int security_msg_queue_associate(struct msg_queue *msq, - int msqflg) +static inline int security_msg_queue_associate(struct msg_queue *msq __attribute__ ((unused)), + int msqflg __attribute__ ((unused))) { return 0; } -static inline int security_msg_queue_msgctl(struct msg_queue *msq, int cmd) +static inline int security_msg_queue_msgctl(struct msg_queue *msq __attribute__ ((unused)), + int cmd __attribute__ ((unused))) { return 0; } -static inline int security_msg_queue_msgsnd(struct msg_queue *msq, - struct msg_msg *msg, int msqflg) +static inline int security_msg_queue_msgsnd(struct msg_queue *msq __attribute__ ((unused)), + struct msg_msg *msg __attribute__ ((unused)), + int msqflg __attribute__ ((unused))) { return 0; } -static inline int security_msg_queue_msgrcv(struct msg_queue *msq, - struct msg_msg *msg, - struct task_struct *target, - long type, int mode) +static inline int security_msg_queue_msgrcv(struct msg_queue *msq __attribute__ ((unused)), + struct msg_msg *msg __attribute__ ((unused)), + struct task_struct *target __attribute__ ((unused)), + long type __attribute__ ((unused)), + int mode __attribute__ ((unused))) { return 0; } -static inline int security_shm_alloc(struct shmid_kernel *shp) +static inline int security_shm_alloc(struct shmid_kernel *shp __attribute__ ((unused))) { return 0; } -static inline void security_shm_free(struct shmid_kernel *shp) +static inline void security_shm_free(struct shmid_kernel *shp __attribute__ ((unused))) { } -static inline int security_shm_associate(struct shmid_kernel *shp, - int shmflg) +static inline int security_shm_associate(struct shmid_kernel *shp __attribute__ ((unused)), + int shmflg __attribute__ ((unused))) { return 0; } -static inline int security_shm_shmctl(struct shmid_kernel *shp, int cmd) +static inline int security_shm_shmctl(struct shmid_kernel *shp __attribute__ ((unused)), + int cmd __attribute__ ((unused))) { return 0; } -static inline int security_shm_shmat(struct shmid_kernel *shp, - char __user *shmaddr, int shmflg) +static inline int security_shm_shmat(struct shmid_kernel *shp __attribute__ ((unused)), + char __user *shmaddr __attribute__ ((unused)), + int shmflg __attribute__ ((unused))) { return 0; } -static inline int security_sem_alloc(struct sem_array *sma) +static inline int security_sem_alloc(struct sem_array *sma __attribute__ ((unused))) { return 0; } -static inline void security_sem_free(struct sem_array *sma) +static inline void security_sem_free(struct sem_array *sma __attribute__ ((unused))) { } -static inline int security_sem_associate(struct sem_array *sma, int semflg) +static inline int security_sem_associate(struct sem_array *sma __attribute__ ((unused)), + int semflg __attribute__ ((unused))) { return 0; } -static inline int security_sem_semctl(struct sem_array *sma, int cmd) +static inline int security_sem_semctl(struct sem_array *sma __attribute__ ((unused)), + int cmd __attribute__ ((unused))) { return 0; } -static inline int security_sem_semop(struct sem_array *sma, - struct sembuf *sops, unsigned nsops, - int alter) +static inline int security_sem_semop(struct sem_array *sma __attribute__ ((unused)), + struct sembuf *sops __attribute__ ((unused)), + unsigned nsops __attribute__ ((unused)), + int alter __attribute__ ((unused))) { return 0; } -static inline void security_d_instantiate(struct dentry *dentry, struct inode *inode) +static inline void security_d_instantiate(struct dentry *dentry __attribute__ ((unused)), + struct inode *inode __attribute__ ((unused))) { } -static inline int security_getprocattr(struct task_struct *p, char *name, char **value) +static inline int security_getprocattr(struct task_struct *p __attribute__ ((unused)), + char *name __attribute__ ((unused)), + char **value __attribute__ ((unused))) { return -EINVAL; } -static inline int security_setprocattr(struct task_struct *p, char *name, void *value, size_t size) +static inline int security_setprocattr(struct task_struct *p __attribute__ ((unused)), + char *name __attribute__ ((unused)), + void *value __attribute__ ((unused)), + size_t size __attribute__ ((unused))) { return -EINVAL; } @@ -2629,31 +2684,40 @@ return cap_netlink_recv(skb, cap); } -static inline int security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) +static inline int security_secid_to_secctx(u32 secid __attribute__ ((unused)), + char **secdata __attribute__ ((unused)), + u32 *seclen __attribute__ ((unused))) { return -EOPNOTSUPP; } -static inline int security_secctx_to_secid(const char *secdata, - u32 seclen, - u32 *secid) +static inline int security_secctx_to_secid(const char *secdata __attribute__ ((unused)), + u32 seclen __attribute__ ((unused)), + u32 *secid __attribute__ ((unused))) { return -EOPNOTSUPP; } -static inline void security_release_secctx(char *secdata, u32 seclen) +static inline void security_release_secctx(char *secdata __attribute__ ((unused)), + u32 seclen __attribute__ ((unused))) { } -static inline int security_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen) +static inline int security_inode_notifysecctx(struct inode *inode __attribute__ ((unused)), + void *ctx __attribute__ ((unused)), + u32 ctxlen __attribute__ ((unused))) { return -EOPNOTSUPP; } -static inline int security_inode_setsecctx(struct dentry *dentry, void *ctx, u32 ctxlen) +static inline int security_inode_setsecctx(struct dentry *dentry __attribute__ ((unused)), + void *ctx __attribute__ ((unused)), + u32 ctxlen __attribute__ ((unused))) { return -EOPNOTSUPP; } -static inline int security_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen) +static inline int security_inode_getsecctx(struct inode *inode __attribute__ ((unused)), + void **ctx __attribute__ ((unused)), + u32 *ctxlen __attribute__ ((unused))) { return -EOPNOTSUPP; } @@ -2700,152 +2764,172 @@ int security_tun_dev_attach(struct sock *sk); #else /* CONFIG_SECURITY_NETWORK */ -static inline int security_unix_stream_connect(struct socket *sock, - struct socket *other, - struct sock *newsk) +static inline int security_unix_stream_connect(struct socket *sock __attribute__ ((unused)), + struct socket *other __attribute__ ((unused)), + struct sock *newsk __attribute__ ((unused))) { return 0; } -static inline int security_unix_may_send(struct socket *sock, - struct socket *other) +static inline int security_unix_may_send(struct socket *sock __attribute__ ((unused)), + struct socket *other __attribute__ ((unused))) { return 0; } -static inline int security_socket_create(int family, int type, - int protocol, int kern) +static inline int security_socket_create(int family __attribute__ ((unused)), + int type __attribute__ ((unused)), + int protocol __attribute__ ((unused)), + int kern __attribute__ ((unused))) { return 0; } -static inline int security_socket_post_create(struct socket *sock, - int family, - int type, - int protocol, int kern) +static inline int security_socket_post_create(struct socket *sock __attribute__ ((unused)), + int family __attribute__ ((unused)), + int type __attribute__ ((unused)), + int protocol __attribute__ ((unused)), + int kern __attribute__ ((unused))) { return 0; } -static inline int security_socket_bind(struct socket *sock, - struct sockaddr *address, - int addrlen) +static inline int security_socket_bind(struct socket *sock __attribute__ ((unused)), + struct sockaddr *address __attribute__ ((unused)), + int addrlen __attribute__ ((unused))) { return 0; } -static inline int security_socket_connect(struct socket *sock, - struct sockaddr *address, - int addrlen) +static inline int security_socket_connect(struct socket *sock __attribute__ ((unused)), + struct sockaddr *address __attribute__ ((unused)), + int addrlen __attribute__ ((unused))) { return 0; } -static inline int security_socket_listen(struct socket *sock, int backlog) +static inline int security_socket_listen(struct socket *sock __attribute__ ((unused)), + int backlog __attribute__ ((unused))) { return 0; } -static inline int security_socket_accept(struct socket *sock, - struct socket *newsock) +static inline int security_socket_accept(struct socket *sock __attribute__ ((unused)), + struct socket *newsock __attribute__ ((unused))) { return 0; } -static inline int security_socket_sendmsg(struct socket *sock, - struct msghdr *msg, int size) +static inline int security_socket_sendmsg(struct socket *sock __attribute__ ((unused)), + struct msghdr *msg __attribute__ ((unused)), + int size __attribute__ ((unused))) { return 0; } -static inline int security_socket_recvmsg(struct socket *sock, - struct msghdr *msg, int size, - int flags) +static inline int security_socket_recvmsg(struct socket *sock __attribute__ ((unused)), + struct msghdr *msg __attribute__ ((unused)), + int size __attribute__ ((unused)), + int flags __attribute__ ((unused))) { return 0; } -static inline int security_socket_getsockname(struct socket *sock) +static inline int security_socket_getsockname(struct socket *sock __attribute__ ((unused))) { return 0; } -static inline int security_socket_getpeername(struct socket *sock) +static inline int security_socket_getpeername(struct socket *sock __attribute__ ((unused))) { return 0; } -static inline int security_socket_getsockopt(struct socket *sock, - int level, int optname) +static inline int security_socket_getsockopt(struct socket *sock __attribute__ ((unused)), + int level __attribute__ ((unused)), + int optname __attribute__ ((unused))) { return 0; } -static inline int security_socket_setsockopt(struct socket *sock, - int level, int optname) +static inline int security_socket_setsockopt(struct socket *sock __attribute__ ((unused)), + int level __attribute__ ((unused)), + int optname __attribute__ ((unused))) { return 0; } -static inline int security_socket_shutdown(struct socket *sock, int how) +static inline int security_socket_shutdown(struct socket *sock __attribute__ ((unused)), + int how __attribute__ ((unused))) { return 0; } -static inline int security_sock_rcv_skb(struct sock *sk, - struct sk_buff *skb) +static inline int security_sock_rcv_skb(struct sock *sk __attribute__ ((unused)), + struct sk_buff *skb __attribute__ ((unused))) { return 0; } -static inline int security_socket_getpeersec_stream(struct socket *sock, char __user *optval, - int __user *optlen, unsigned len) +static inline int security_socket_getpeersec_stream(struct socket *sock __attribute__ ((unused)), + char __user *optval __attribute__ ((unused)), + int __user *optlen __attribute__ ((unused)), + unsigned len __attribute__ ((unused))) { return -ENOPROTOOPT; } -static inline int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid) +static inline int security_socket_getpeersec_dgram(struct socket *sock __attribute__ ((unused)), + struct sk_buff *skb __attribute__ ((unused)), + u32 *secid __attribute__ ((unused))) { return -ENOPROTOOPT; } -static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority) +static inline int security_sk_alloc(struct sock *sk __attribute__ ((unused)), + int family __attribute__ ((unused)), + gfp_t priority __attribute__ ((unused))) { return 0; } -static inline void security_sk_free(struct sock *sk) +static inline void security_sk_free(struct sock *sk __attribute__ ((unused))) { } -static inline void security_sk_clone(const struct sock *sk, struct sock *newsk) +static inline void security_sk_clone(const struct sock *sk __attribute__ ((unused)), + struct sock *newsk __attribute__ ((unused))) { } -static inline void security_sk_classify_flow(struct sock *sk, struct flowi *fl) +static inline void security_sk_classify_flow(struct sock *sk __attribute__ ((unused)), + struct flowi *fl __attribute__ ((unused))) { } -static inline void security_req_classify_flow(const struct request_sock *req, struct flowi *fl) +static inline void security_req_classify_flow(const struct request_sock *req __attribute__ ((unused)), + struct flowi *fl __attribute__ ((unused))) { } -static inline void security_sock_graft(struct sock *sk, struct socket *parent) +static inline void security_sock_graft(struct sock *sk __attribute__ ((unused)), + struct socket *parent __attribute__ ((unused))) { } -static inline int security_inet_conn_request(struct sock *sk, - struct sk_buff *skb, struct request_sock *req) +static inline int security_inet_conn_request(struct sock *sk __attribute__ ((unused)), + struct sk_buff *skb __attribute__ ((unused)), + struct request_sock *req __attribute__ ((unused))) { return 0; } -static inline void security_inet_csk_clone(struct sock *newsk, - const struct request_sock *req) +static inline void security_inet_csk_clone(struct sock *newsk __attribute__ ((unused)), + const struct request_sock *req __attribute__ ((unused))) { } -static inline void security_inet_conn_established(struct sock *sk, - struct sk_buff *skb) +static inline void security_inet_conn_established(struct sock *sk __attribute__ ((unused)), + struct sk_buff *skb __attribute__ ((unused))) { } @@ -2854,11 +2938,11 @@ return 0; } -static inline void security_tun_dev_post_create(struct sock *sk) +static inline void security_tun_dev_post_create(struct sock *sk __attribute__ ((unused))) { } -static inline int security_tun_dev_attach(struct sock *sk) +static inline int security_tun_dev_attach(struct sock *sk __attribute__ ((unused))) { return 0; } @@ -2883,63 +2967,71 @@ #else /* CONFIG_SECURITY_NETWORK_XFRM */ -static inline int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_user_sec_ctx *sec_ctx) +static inline int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp __attribute__ ((unused)), + struct xfrm_user_sec_ctx *sec_ctx __attribute__ ((unused))) { return 0; } -static inline int security_xfrm_policy_clone(struct xfrm_sec_ctx *old, struct xfrm_sec_ctx **new_ctxp) +static inline int security_xfrm_policy_clone(struct xfrm_sec_ctx *old __attribute__ ((unused)), + struct xfrm_sec_ctx **new_ctxp __attribute__ ((unused))) { return 0; } -static inline void security_xfrm_policy_free(struct xfrm_sec_ctx *ctx) +static inline void security_xfrm_policy_free(struct xfrm_sec_ctx *ctx __attribute__ ((unused))) { } -static inline int security_xfrm_policy_delete(struct xfrm_sec_ctx *ctx) +static inline int security_xfrm_policy_delete(struct xfrm_sec_ctx *ctx __attribute__ ((unused))) { return 0; } -static inline int security_xfrm_state_alloc(struct xfrm_state *x, - struct xfrm_user_sec_ctx *sec_ctx) +static inline int security_xfrm_state_alloc(struct xfrm_state *x __attribute__ ((unused)), + struct xfrm_user_sec_ctx *sec_ctx __attribute__ ((unused))) { return 0; } -static inline int security_xfrm_state_alloc_acquire(struct xfrm_state *x, - struct xfrm_sec_ctx *polsec, u32 secid) +static inline int security_xfrm_state_alloc_acquire(struct xfrm_state *x __attribute__ ((unused)), + struct xfrm_sec_ctx *polsec __attribute__ ((unused)), + u32 secid __attribute__ ((unused))) { return 0; } -static inline void security_xfrm_state_free(struct xfrm_state *x) +static inline void security_xfrm_state_free(struct xfrm_state *x __attribute__ ((unused))) { } -static inline int security_xfrm_state_delete(struct xfrm_state *x) +static inline int security_xfrm_state_delete(struct xfrm_state *x __attribute__ ((unused))) { return 0; } -static inline int security_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx, u32 fl_secid, u8 dir) +static inline int security_xfrm_policy_lookup(struct xfrm_sec_ctx *ctx __attribute__ ((unused)), + u32 fl_secid __attribute__ ((unused)), + u8 dir __attribute__ ((unused))) { return 0; } -static inline int security_xfrm_state_pol_flow_match(struct xfrm_state *x, - struct xfrm_policy *xp, struct flowi *fl) +static inline int security_xfrm_state_pol_flow_match(struct xfrm_state *x __attribute__ ((unused)), + struct xfrm_policy *xp __attribute__ ((unused)), + struct flowi *fl __attribute__ ((unused))) { return 1; } -static inline int security_xfrm_decode_session(struct sk_buff *skb, u32 *secid) +static inline int security_xfrm_decode_session(struct sk_buff *skb __attribute__ ((unused)), + u32 *secid __attribute__ ((unused))) { return 0; } -static inline void security_skb_classify_flow(struct sk_buff *skb, struct flowi *fl) +static inline void security_skb_classify_flow(struct sk_buff *skb __attribute__ ((unused)), + struct flowi *fl __attribute__ ((unused))) { } @@ -2960,51 +3052,58 @@ int security_path_rename(struct path *old_dir, struct dentry *old_dentry, struct path *new_dir, struct dentry *new_dentry); #else /* CONFIG_SECURITY_PATH */ -static inline int security_path_unlink(struct path *dir, struct dentry *dentry) +static inline int security_path_unlink(struct path *dir __attribute__ ((unused)), + struct dentry *dentry __attribute__ ((unused))) { return 0; } -static inline int security_path_mkdir(struct path *dir, struct dentry *dentry, - int mode) +static inline int security_path_mkdir(struct path *dir __attribute__ ((unused)), + struct dentry *dentry __attribute__ ((unused)), + int mode __attribute__ ((unused))) { return 0; } -static inline int security_path_rmdir(struct path *dir, struct dentry *dentry) +static inline int security_path_rmdir(struct path *dir __attribute__ ((unused)), + struct dentry *dentry __attribute__ ((unused))) { return 0; } -static inline int security_path_mknod(struct path *dir, struct dentry *dentry, - int mode, unsigned int dev) +static inline int security_path_mknod(struct path *dir __attribute__ ((unused)), + struct dentry *dentry __attribute__ ((unused)), + int mode __attribute__ ((unused)), + unsigned int dev __attribute__ ((unused))) { return 0; } -static inline int security_path_truncate(struct path *path, loff_t length, - unsigned int time_attrs) +static inline int security_path_truncate(struct path *path __attribute__ ((unused)), + loff_t length __attribute__ ((unused)), + unsigned int time_attrs __attribute__ ((unused))) { return 0; } -static inline int security_path_symlink(struct path *dir, struct dentry *dentry, - const char *old_name) +static inline int security_path_symlink(struct path *dir __attribute__ ((unused)), + struct dentry *dentry __attribute__ ((unused)), + const char *old_name __attribute__ ((unused))) { return 0; } -static inline int security_path_link(struct dentry *old_dentry, - struct path *new_dir, - struct dentry *new_dentry) +static inline int security_path_link(struct dentry *old_dentry __attribute__ ((unused)), + struct path *new_dir __attribute__ ((unused)), + struct dentry *new_dentry __attribute__ ((unused))) { return 0; } -static inline int security_path_rename(struct path *old_dir, - struct dentry *old_dentry, - struct path *new_dir, - struct dentry *new_dentry) +static inline int security_path_rename(struct path *old_dir __attribute__ ((unused)), + struct dentry *old_dentry __attribute__ ((unused)), + struct path *new_dir __attribute__ ((unused)), + struct dentry *new_dentry __attribute__ ((unused))) { return 0; } @@ -3024,33 +3123,33 @@ #else -static inline int security_key_alloc(struct key *key, - const struct cred *cred, - unsigned long flags) +static inline int security_key_alloc(struct key *key __attribute__ ((unused)), + const struct cred *cred __attribute__ ((unused)), + unsigned long flags __attribute__ ((unused))) { return 0; } -static inline void security_key_free(struct key *key) +static inline void security_key_free(struct key *key __attribute__ ((unused))) { } -static inline int security_key_permission(key_ref_t key_ref, - const struct cred *cred, - key_perm_t perm) +static inline int security_key_permission(key_ref_t key_ref __attribute__ ((unused)), + const struct cred *cred __attribute__ ((unused)), + key_perm_t perm __attribute__ ((unused))) { return 0; } -static inline int security_key_getsecurity(struct key *key, char **_buffer) +static inline int security_key_getsecurity(struct key *key __attribute__ ((unused)), char **_buffer) { *_buffer = NULL; return 0; } -static inline int security_key_session_to_parent(const struct cred *cred, - const struct cred *parent_cred, - struct key *key) +static inline int security_key_session_to_parent(const struct cred *cred __attribute__ ((unused)), + const struct cred *parent_cred __attribute__ ((unused)), + struct key *key __attribute__ ((unused))) { return 0; } @@ -3068,24 +3167,29 @@ #else -static inline int security_audit_rule_init(u32 field, u32 op, char *rulestr, - void **lsmrule) +static inline int security_audit_rule_init(u32 field __attribute__ ((unused)), + u32 op __attribute__ ((unused)), + char *rulestr __attribute__ ((unused)), + void **lsmrule __attribute__ ((unused))) { return 0; } -static inline int security_audit_rule_known(struct audit_krule *krule) +static inline int security_audit_rule_known(struct audit_krule *krule __attribute__ ((unused))) { return 0; } -static inline int security_audit_rule_match(u32 secid, u32 field, u32 op, - void *lsmrule, struct audit_context *actx) +static inline int security_audit_rule_match(u32 secid __attribute__ ((unused)), + u32 field __attribute__ ((unused)), + u32 op __attribute__ ((unused)), + void *lsmrule __attribute__ ((unused)), + struct audit_context *actx __attribute__ ((unused))) { return 0; } -static inline void security_audit_rule_free(void *lsmrule) +static inline void security_audit_rule_free(void *lsmrule __attribute__ ((unused))) { } #endif /* CONFIG_SECURITY */ @@ -3101,22 +3205,22 @@ #else /* CONFIG_SECURITYFS */ -static inline struct dentry *securityfs_create_dir(const char *name, - struct dentry *parent) +static inline struct dentry *securityfs_create_dir(const char *name __attribute__ ((unused)), + struct dentry *parent __attribute__ ((unused))) { return ERR_PTR(-ENODEV); } -static inline struct dentry *securityfs_create_file(const char *name, - mode_t mode, - struct dentry *parent, - void *data, - const struct file_operations *fops) +static inline struct dentry *securityfs_create_file(const char *name __attribute__ ((unused)), + mode_t mode __attribute__ ((unused)), + struct dentry *parent __attribute__ ((unused)), + void *data __attribute__ ((unused)), + const struct file_operations *fops __attribute__ ((unused))) { return ERR_PTR(-ENODEV); } -static inline void securityfs_remove(struct dentry *dentry) +static inline void securityfs_remove(struct dentry *dentry __attribute__ ((unused))) {} #endif @@ -3140,7 +3244,7 @@ return (char *)1; } -static inline void free_secdata(void *secdata) +static inline void free_secdata(void *secdata __attribute__ ((unused))) { } #endif /* CONFIG_SECURITY */