* [vfs:N8 1/31] security/security.c:398:5: error: conflicting types for 'security_sb_kern_mount'
@ 2018-11-05 19:12 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2018-11-05 19:12 UTC (permalink / raw)
To: David Howells; +Cc: kbuild-all, linux-fsdevel, Al Viro
[-- Attachment #1: Type: text/plain, Size: 7961 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git N8
head: ca22193ab9107ad0685fd9e2b43473a1f607b461
commit: c56a9cb206b43a227fb105ad2814061cb6ef64cf [1/31] vfs: Require specification of size of mount data for internal mounts
config: parisc-b180_defconfig (attached as .config)
compiler: hppa-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c56a9cb206b43a227fb105ad2814061cb6ef64cf
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=parisc
Note: the vfs/N8 HEAD ca22193ab9107ad0685fd9e2b43473a1f607b461 builds fine.
It only hurts bisectibility.
All error/warnings (new ones prefixed by >>):
>> security/security.c:398:5: error: conflicting types for 'security_sb_kern_mount'
int security_sb_kern_mount(struct super_block *sb, int flags, void *data, size_t data_size)
^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/lsm_hooks.h:28:0,
from security/security.c:23:
include/linux/security.h:253:5: note: previous declaration of 'security_sb_kern_mount' was here
int security_sb_kern_mount(struct super_block *sb, int flags, void *data);
^~~~~~~~~~~~~~~~~~~~~~
security/security.c: In function 'security_sb_kern_mount':
>> security/security.c:236:9: error: too many arguments to function 'P->hook.sb_kern_mount'
RC = P->hook.FUNC(__VA_ARGS__); \
^
>> security/security.c:400:9: note: in expansion of macro 'call_int_hook'
return call_int_hook(sb_kern_mount, 0, sb, flags, data, data_size);
^~~~~~~~~~~~~
vim +/security_sb_kern_mount +398 security/security.c
211
212 /*
213 * Hook list operation macros.
214 *
215 * call_void_hook:
216 * This is a hook that does not return a value.
217 *
218 * call_int_hook:
219 * This is a hook that returns a value.
220 */
221
222 #define call_void_hook(FUNC, ...) \
223 do { \
224 struct security_hook_list *P; \
225 \
226 hlist_for_each_entry(P, &security_hook_heads.FUNC, list) \
227 P->hook.FUNC(__VA_ARGS__); \
228 } while (0)
229
230 #define call_int_hook(FUNC, IRC, ...) ({ \
231 int RC = IRC; \
232 do { \
233 struct security_hook_list *P; \
234 \
235 hlist_for_each_entry(P, &security_hook_heads.FUNC, list) { \
> 236 RC = P->hook.FUNC(__VA_ARGS__); \
237 if (RC != 0) \
238 break; \
239 } \
240 } while (0); \
241 RC; \
242 })
243
244 /* Security operations */
245
246 int security_binder_set_context_mgr(struct task_struct *mgr)
247 {
248 return call_int_hook(binder_set_context_mgr, 0, mgr);
249 }
250
251 int security_binder_transaction(struct task_struct *from,
252 struct task_struct *to)
253 {
254 return call_int_hook(binder_transaction, 0, from, to);
255 }
256
257 int security_binder_transfer_binder(struct task_struct *from,
258 struct task_struct *to)
259 {
260 return call_int_hook(binder_transfer_binder, 0, from, to);
261 }
262
263 int security_binder_transfer_file(struct task_struct *from,
264 struct task_struct *to, struct file *file)
265 {
266 return call_int_hook(binder_transfer_file, 0, from, to, file);
267 }
268
269 int security_ptrace_access_check(struct task_struct *child, unsigned int mode)
270 {
271 return call_int_hook(ptrace_access_check, 0, child, mode);
272 }
273
274 int security_ptrace_traceme(struct task_struct *parent)
275 {
276 return call_int_hook(ptrace_traceme, 0, parent);
277 }
278
279 int security_capget(struct task_struct *target,
280 kernel_cap_t *effective,
281 kernel_cap_t *inheritable,
282 kernel_cap_t *permitted)
283 {
284 return call_int_hook(capget, 0, target,
285 effective, inheritable, permitted);
286 }
287
288 int security_capset(struct cred *new, const struct cred *old,
289 const kernel_cap_t *effective,
290 const kernel_cap_t *inheritable,
291 const kernel_cap_t *permitted)
292 {
293 return call_int_hook(capset, 0, new, old,
294 effective, inheritable, permitted);
295 }
296
297 int security_capable(const struct cred *cred, struct user_namespace *ns,
298 int cap)
299 {
300 return call_int_hook(capable, 0, cred, ns, cap, SECURITY_CAP_AUDIT);
301 }
302
303 int security_capable_noaudit(const struct cred *cred, struct user_namespace *ns,
304 int cap)
305 {
306 return call_int_hook(capable, 0, cred, ns, cap, SECURITY_CAP_NOAUDIT);
307 }
308
309 int security_quotactl(int cmds, int type, int id, struct super_block *sb)
310 {
311 return call_int_hook(quotactl, 0, cmds, type, id, sb);
312 }
313
314 int security_quota_on(struct dentry *dentry)
315 {
316 return call_int_hook(quota_on, 0, dentry);
317 }
318
319 int security_syslog(int type)
320 {
321 return call_int_hook(syslog, 0, type);
322 }
323
324 int security_settime64(const struct timespec64 *ts, const struct timezone *tz)
325 {
326 return call_int_hook(settime, 0, ts, tz);
327 }
328
329 int security_vm_enough_memory_mm(struct mm_struct *mm, long pages)
330 {
331 struct security_hook_list *hp;
332 int cap_sys_admin = 1;
333 int rc;
334
335 /*
336 * The module will respond with a positive value if
337 * it thinks the __vm_enough_memory() call should be
338 * made with the cap_sys_admin set. If all of the modules
339 * agree that it should be set it will. If any module
340 * thinks it should not be set it won't.
341 */
342 hlist_for_each_entry(hp, &security_hook_heads.vm_enough_memory, list) {
343 rc = hp->hook.vm_enough_memory(mm, pages);
344 if (rc <= 0) {
345 cap_sys_admin = 0;
346 break;
347 }
348 }
349 return __vm_enough_memory(mm, pages, cap_sys_admin);
350 }
351
352 int security_bprm_set_creds(struct linux_binprm *bprm)
353 {
354 return call_int_hook(bprm_set_creds, 0, bprm);
355 }
356
357 int security_bprm_check(struct linux_binprm *bprm)
358 {
359 int ret;
360
361 ret = call_int_hook(bprm_check_security, 0, bprm);
362 if (ret)
363 return ret;
364 return ima_bprm_check(bprm);
365 }
366
367 void security_bprm_committing_creds(struct linux_binprm *bprm)
368 {
369 call_void_hook(bprm_committing_creds, bprm);
370 }
371
372 void security_bprm_committed_creds(struct linux_binprm *bprm)
373 {
374 call_void_hook(bprm_committed_creds, bprm);
375 }
376
377 int security_sb_alloc(struct super_block *sb)
378 {
379 return call_int_hook(sb_alloc_security, 0, sb);
380 }
381
382 void security_sb_free(struct super_block *sb)
383 {
384 call_void_hook(sb_free_security, sb);
385 }
386
387 int security_sb_copy_data(char *orig, size_t data_size, char *copy)
388 {
389 return call_int_hook(sb_copy_data, 0, orig, data_size, copy);
390 }
391 EXPORT_SYMBOL(security_sb_copy_data);
392
393 int security_sb_remount(struct super_block *sb, void *data, size_t data_size)
394 {
395 return call_int_hook(sb_remount, 0, sb, data, data_size);
396 }
397
> 398 int security_sb_kern_mount(struct super_block *sb, int flags, void *data, size_t data_size)
399 {
> 400 return call_int_hook(sb_kern_mount, 0, sb, flags, data, data_size);
401 }
402
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 13262 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-06 4:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-05 19:12 [vfs:N8 1/31] security/security.c:398:5: error: conflicting types for 'security_sb_kern_mount' kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).