From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/2] [lsm] introduce a new hook to query LSM for functionality
Date: Sat, 14 Nov 2020 18:12:07 +0800 [thread overview]
Message-ID: <202011141839.0srXYHtW-lkp@intel.com> (raw)
In-Reply-To: <20201105173328.2539-1-olga.kornievskaia@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 12111 bytes --]
Hi Olga,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on nfs/linux-next]
[also build test ERROR on pcmoore-selinux/next linus/master security/next-testing v5.10-rc3 next-20201113]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Olga-Kornievskaia/introduce-a-new-hook-to-query-LSM-for-functionality/20201106-013417
base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/0a59499b0fcef78631c9a8619f330ae47802742f
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Olga-Kornievskaia/introduce-a-new-hook-to-query-LSM-for-functionality/20201106-013417
git checkout 0a59499b0fcef78631c9a8619f330ae47802742f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
include/linux/lsm_hook_defs.h: In function 'bpf_lsm_func_query_vfs':
>> include/linux/lsm_hook_defs.h:260:34: error: parameter name omitted
260 | LSM_HOOK(int, 0, func_query_vfs, unsigned int)
| ^~~~~~~~~~~~
kernel/bpf/bpf_lsm.c:21:29: note: in definition of macro 'LSM_HOOK'
21 | noinline RET bpf_lsm_##NAME(__VA_ARGS__) \
| ^~~~~~~~~~~
vim +260 include/linux/lsm_hook_defs.h
107
108 /* Needed for inode based security check */
109 LSM_HOOK(int, 0, path_notify, const struct path *path, u64 mask,
110 unsigned int obj_type)
111 LSM_HOOK(int, 0, inode_alloc_security, struct inode *inode)
112 LSM_HOOK(void, LSM_RET_VOID, inode_free_security, struct inode *inode)
113 LSM_HOOK(int, 0, inode_init_security, struct inode *inode,
114 struct inode *dir, const struct qstr *qstr, const char **name,
115 void **value, size_t *len)
116 LSM_HOOK(int, 0, inode_create, struct inode *dir, struct dentry *dentry,
117 umode_t mode)
118 LSM_HOOK(int, 0, inode_link, struct dentry *old_dentry, struct inode *dir,
119 struct dentry *new_dentry)
120 LSM_HOOK(int, 0, inode_unlink, struct inode *dir, struct dentry *dentry)
121 LSM_HOOK(int, 0, inode_symlink, struct inode *dir, struct dentry *dentry,
122 const char *old_name)
123 LSM_HOOK(int, 0, inode_mkdir, struct inode *dir, struct dentry *dentry,
124 umode_t mode)
125 LSM_HOOK(int, 0, inode_rmdir, struct inode *dir, struct dentry *dentry)
126 LSM_HOOK(int, 0, inode_mknod, struct inode *dir, struct dentry *dentry,
127 umode_t mode, dev_t dev)
128 LSM_HOOK(int, 0, inode_rename, struct inode *old_dir, struct dentry *old_dentry,
129 struct inode *new_dir, struct dentry *new_dentry)
130 LSM_HOOK(int, 0, inode_readlink, struct dentry *dentry)
131 LSM_HOOK(int, 0, inode_follow_link, struct dentry *dentry, struct inode *inode,
132 bool rcu)
133 LSM_HOOK(int, 0, inode_permission, struct inode *inode, int mask)
134 LSM_HOOK(int, 0, inode_setattr, struct dentry *dentry, struct iattr *attr)
135 LSM_HOOK(int, 0, inode_getattr, const struct path *path)
136 LSM_HOOK(int, 0, inode_setxattr, struct dentry *dentry, const char *name,
137 const void *value, size_t size, int flags)
138 LSM_HOOK(void, LSM_RET_VOID, inode_post_setxattr, struct dentry *dentry,
139 const char *name, const void *value, size_t size, int flags)
140 LSM_HOOK(int, 0, inode_getxattr, struct dentry *dentry, const char *name)
141 LSM_HOOK(int, 0, inode_listxattr, struct dentry *dentry)
142 LSM_HOOK(int, 0, inode_removexattr, struct dentry *dentry, const char *name)
143 LSM_HOOK(int, 0, inode_need_killpriv, struct dentry *dentry)
144 LSM_HOOK(int, 0, inode_killpriv, struct dentry *dentry)
145 LSM_HOOK(int, -EOPNOTSUPP, inode_getsecurity, struct inode *inode,
146 const char *name, void **buffer, bool alloc)
147 LSM_HOOK(int, -EOPNOTSUPP, inode_setsecurity, struct inode *inode,
148 const char *name, const void *value, size_t size, int flags)
149 LSM_HOOK(int, 0, inode_listsecurity, struct inode *inode, char *buffer,
150 size_t buffer_size)
151 LSM_HOOK(void, LSM_RET_VOID, inode_getsecid, struct inode *inode, u32 *secid)
152 LSM_HOOK(int, 0, inode_copy_up, struct dentry *src, struct cred **new)
153 LSM_HOOK(int, -EOPNOTSUPP, inode_copy_up_xattr, const char *name)
154 LSM_HOOK(int, 0, kernfs_init_security, struct kernfs_node *kn_dir,
155 struct kernfs_node *kn)
156 LSM_HOOK(int, 0, file_permission, struct file *file, int mask)
157 LSM_HOOK(int, 0, file_alloc_security, struct file *file)
158 LSM_HOOK(void, LSM_RET_VOID, file_free_security, struct file *file)
159 LSM_HOOK(int, 0, file_ioctl, struct file *file, unsigned int cmd,
160 unsigned long arg)
161 LSM_HOOK(int, 0, mmap_addr, unsigned long addr)
162 LSM_HOOK(int, 0, mmap_file, struct file *file, unsigned long reqprot,
163 unsigned long prot, unsigned long flags)
164 LSM_HOOK(int, 0, file_mprotect, struct vm_area_struct *vma,
165 unsigned long reqprot, unsigned long prot)
166 LSM_HOOK(int, 0, file_lock, struct file *file, unsigned int cmd)
167 LSM_HOOK(int, 0, file_fcntl, struct file *file, unsigned int cmd,
168 unsigned long arg)
169 LSM_HOOK(void, LSM_RET_VOID, file_set_fowner, struct file *file)
170 LSM_HOOK(int, 0, file_send_sigiotask, struct task_struct *tsk,
171 struct fown_struct *fown, int sig)
172 LSM_HOOK(int, 0, file_receive, struct file *file)
173 LSM_HOOK(int, 0, file_open, struct file *file)
174 LSM_HOOK(int, 0, task_alloc, struct task_struct *task,
175 unsigned long clone_flags)
176 LSM_HOOK(void, LSM_RET_VOID, task_free, struct task_struct *task)
177 LSM_HOOK(int, 0, cred_alloc_blank, struct cred *cred, gfp_t gfp)
178 LSM_HOOK(void, LSM_RET_VOID, cred_free, struct cred *cred)
179 LSM_HOOK(int, 0, cred_prepare, struct cred *new, const struct cred *old,
180 gfp_t gfp)
181 LSM_HOOK(void, LSM_RET_VOID, cred_transfer, struct cred *new,
182 const struct cred *old)
183 LSM_HOOK(void, LSM_RET_VOID, cred_getsecid, const struct cred *c, u32 *secid)
184 LSM_HOOK(int, 0, kernel_act_as, struct cred *new, u32 secid)
185 LSM_HOOK(int, 0, kernel_create_files_as, struct cred *new, struct inode *inode)
186 LSM_HOOK(int, 0, kernel_module_request, char *kmod_name)
187 LSM_HOOK(int, 0, kernel_load_data, enum kernel_load_data_id id, bool contents)
188 LSM_HOOK(int, 0, kernel_post_load_data, char *buf, loff_t size,
189 enum kernel_load_data_id id, char *description)
190 LSM_HOOK(int, 0, kernel_read_file, struct file *file,
191 enum kernel_read_file_id id, bool contents)
192 LSM_HOOK(int, 0, kernel_post_read_file, struct file *file, char *buf,
193 loff_t size, enum kernel_read_file_id id)
194 LSM_HOOK(int, 0, task_fix_setuid, struct cred *new, const struct cred *old,
195 int flags)
196 LSM_HOOK(int, 0, task_fix_setgid, struct cred *new, const struct cred * old,
197 int flags)
198 LSM_HOOK(int, 0, task_setpgid, struct task_struct *p, pid_t pgid)
199 LSM_HOOK(int, 0, task_getpgid, struct task_struct *p)
200 LSM_HOOK(int, 0, task_getsid, struct task_struct *p)
201 LSM_HOOK(void, LSM_RET_VOID, task_getsecid, struct task_struct *p, u32 *secid)
202 LSM_HOOK(int, 0, task_setnice, struct task_struct *p, int nice)
203 LSM_HOOK(int, 0, task_setioprio, struct task_struct *p, int ioprio)
204 LSM_HOOK(int, 0, task_getioprio, struct task_struct *p)
205 LSM_HOOK(int, 0, task_prlimit, const struct cred *cred,
206 const struct cred *tcred, unsigned int flags)
207 LSM_HOOK(int, 0, task_setrlimit, struct task_struct *p, unsigned int resource,
208 struct rlimit *new_rlim)
209 LSM_HOOK(int, 0, task_setscheduler, struct task_struct *p)
210 LSM_HOOK(int, 0, task_getscheduler, struct task_struct *p)
211 LSM_HOOK(int, 0, task_movememory, struct task_struct *p)
212 LSM_HOOK(int, 0, task_kill, struct task_struct *p, struct kernel_siginfo *info,
213 int sig, const struct cred *cred)
214 LSM_HOOK(int, -ENOSYS, task_prctl, int option, unsigned long arg2,
215 unsigned long arg3, unsigned long arg4, unsigned long arg5)
216 LSM_HOOK(void, LSM_RET_VOID, task_to_inode, struct task_struct *p,
217 struct inode *inode)
218 LSM_HOOK(int, 0, ipc_permission, struct kern_ipc_perm *ipcp, short flag)
219 LSM_HOOK(void, LSM_RET_VOID, ipc_getsecid, struct kern_ipc_perm *ipcp,
220 u32 *secid)
221 LSM_HOOK(int, 0, msg_msg_alloc_security, struct msg_msg *msg)
222 LSM_HOOK(void, LSM_RET_VOID, msg_msg_free_security, struct msg_msg *msg)
223 LSM_HOOK(int, 0, msg_queue_alloc_security, struct kern_ipc_perm *perm)
224 LSM_HOOK(void, LSM_RET_VOID, msg_queue_free_security,
225 struct kern_ipc_perm *perm)
226 LSM_HOOK(int, 0, msg_queue_associate, struct kern_ipc_perm *perm, int msqflg)
227 LSM_HOOK(int, 0, msg_queue_msgctl, struct kern_ipc_perm *perm, int cmd)
228 LSM_HOOK(int, 0, msg_queue_msgsnd, struct kern_ipc_perm *perm,
229 struct msg_msg *msg, int msqflg)
230 LSM_HOOK(int, 0, msg_queue_msgrcv, struct kern_ipc_perm *perm,
231 struct msg_msg *msg, struct task_struct *target, long type, int mode)
232 LSM_HOOK(int, 0, shm_alloc_security, struct kern_ipc_perm *perm)
233 LSM_HOOK(void, LSM_RET_VOID, shm_free_security, struct kern_ipc_perm *perm)
234 LSM_HOOK(int, 0, shm_associate, struct kern_ipc_perm *perm, int shmflg)
235 LSM_HOOK(int, 0, shm_shmctl, struct kern_ipc_perm *perm, int cmd)
236 LSM_HOOK(int, 0, shm_shmat, struct kern_ipc_perm *perm, char __user *shmaddr,
237 int shmflg)
238 LSM_HOOK(int, 0, sem_alloc_security, struct kern_ipc_perm *perm)
239 LSM_HOOK(void, LSM_RET_VOID, sem_free_security, struct kern_ipc_perm *perm)
240 LSM_HOOK(int, 0, sem_associate, struct kern_ipc_perm *perm, int semflg)
241 LSM_HOOK(int, 0, sem_semctl, struct kern_ipc_perm *perm, int cmd)
242 LSM_HOOK(int, 0, sem_semop, struct kern_ipc_perm *perm, struct sembuf *sops,
243 unsigned nsops, int alter)
244 LSM_HOOK(int, 0, netlink_send, struct sock *sk, struct sk_buff *skb)
245 LSM_HOOK(void, LSM_RET_VOID, d_instantiate, struct dentry *dentry,
246 struct inode *inode)
247 LSM_HOOK(int, -EINVAL, getprocattr, struct task_struct *p, char *name,
248 char **value)
249 LSM_HOOK(int, -EINVAL, setprocattr, const char *name, void *value, size_t size)
250 LSM_HOOK(int, 0, ismaclabel, const char *name)
251 LSM_HOOK(int, -EOPNOTSUPP, secid_to_secctx, u32 secid, char **secdata,
252 u32 *seclen)
253 LSM_HOOK(int, 0, secctx_to_secid, const char *secdata, u32 seclen, u32 *secid)
254 LSM_HOOK(void, LSM_RET_VOID, release_secctx, char *secdata, u32 seclen)
255 LSM_HOOK(void, LSM_RET_VOID, inode_invalidate_secctx, struct inode *inode)
256 LSM_HOOK(int, 0, inode_notifysecctx, struct inode *inode, void *ctx, u32 ctxlen)
257 LSM_HOOK(int, 0, inode_setsecctx, struct dentry *dentry, void *ctx, u32 ctxlen)
258 LSM_HOOK(int, 0, inode_getsecctx, struct inode *inode, void **ctx,
259 u32 *ctxlen)
> 260 LSM_HOOK(int, 0, func_query_vfs, unsigned int)
261
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 69039 bytes --]
prev parent reply other threads:[~2020-11-14 10:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 17:33 [PATCH 1/2] [lsm] introduce a new hook to query LSM for functionality Olga Kornievskaia
2020-11-05 17:33 ` [PATCH 2/2] NFSv4.2: condition READDIR's mask for security label based on LSM state Olga Kornievskaia
2020-11-05 18:55 ` Ondrej Mosnacek
2020-11-05 19:51 ` Olga Kornievskaia
2020-11-05 20:24 ` Ondrej Mosnacek
2020-11-05 21:18 ` Trond Myklebust
2020-11-05 21:43 ` Olga Kornievskaia
2020-11-06 8:47 ` Ondrej Mosnacek
2020-11-05 23:06 ` kernel test robot
2020-11-05 23:06 ` kernel test robot
2020-11-05 19:39 ` [PATCH 1/2] [lsm] introduce a new hook to query LSM for functionality Casey Schaufler
2020-11-07 1:33 ` James Morris
2020-11-14 10:12 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202011141839.0srXYHtW-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.