tree:
https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
ftrace/urgent
head: ba6c8462bab44ff40793f21b7f3e61facd523a8a
commit: 8f745a625b82040ca1f13643aaba2f19913b0a0b [7/11] tracing: Do not create tracefs
files if tracefs lockdown is in effect
config: i386-randconfig-b001-201940 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
git checkout 8f745a625b82040ca1f13643aaba2f19913b0a0b
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
fs/tracefs/inode.c: In function 'tracefs_create_file':
> fs/tracefs/inode.c:393:6: error: implicit declaration of function
'security_locked_down'; did you mean 'get_locked_pte'?
[-Werror=implicit-function-declaration]
if
(security_locked_down(LOCKDOWN_TRACEFS))
^~~~~~~~~~~~~~~~~~~~
get_locked_pte
> fs/tracefs/inode.c:393:27: error: 'LOCKDOWN_TRACEFS'
undeclared (first use in this function)
if
(security_locked_down(LOCKDOWN_TRACEFS))
^~~~~~~~~~~~~~~~
fs/tracefs/inode.c:393:27: note: each undeclared identifier is reported only once for
each function it appears in
cc1: some warnings being treated as errors
vim +393 fs/tracefs/inode.c
359
360 /**
361 * tracefs_create_file - create a file in the tracefs filesystem
362 * @name: a pointer to a string containing the name of the file to create.
363 * @mode: the permission that the file should have.
364 * @parent: a pointer to the parent dentry for this file. This should be a
365 * directory dentry if set. If this parameter is NULL, then the
366 * file will be created in the root of the tracefs filesystem.
367 * @data: a pointer to something that the caller will want to get to later
368 * on. The inode.i_private pointer will point to this value on
369 * the open() call.
370 * @fops: a pointer to a struct file_operations that should be used for
371 * this file.
372 *
373 * This is the basic "create a file" function for tracefs. It allows for
a
374 * wide range of flexibility in creating a file, or a directory (if you want
375 * to create a directory, the tracefs_create_dir() function is
376 * recommended to be used instead.)
377 *
378 * This function will return a pointer to a dentry if it succeeds. This
379 * pointer must be passed to the tracefs_remove() function when the file is
380 * to be removed (no automatic cleanup happens if your module is unloaded,
381 * you are responsible here.) If an error occurs, %NULL will be returned.
382 *
383 * If tracefs is not enabled in the kernel, the value -%ENODEV will be
384 * returned.
385 */
386 struct dentry *tracefs_create_file(const char *name, umode_t mode,
387 struct dentry *parent, void *data,
388 const struct file_operations *fops)
389 {
390 struct dentry *dentry;
391 struct inode *inode;
392
393 if (security_locked_down(LOCKDOWN_TRACEFS))
394 return NULL;
395
396 if (!(mode & S_IFMT))
397 mode |= S_IFREG;
398 BUG_ON(!S_ISREG(mode));
399 dentry = start_creating(name, parent);
400
401 if (IS_ERR(dentry))
402 return NULL;
403
404 inode = tracefs_get_inode(dentry->d_sb);
405 if (unlikely(!inode))
406 return failed_creating(dentry);
407
408 inode->i_mode = mode;
409 inode->i_fop = fops ? fops : &tracefs_file_operations;
410 inode->i_private = data;
411 d_instantiate(dentry, inode);
412 fsnotify_create(dentry->d_parent->d_inode, dentry);
413 return end_creating(dentry);
414 }
415
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation