public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [RFC PATCH] procfs: Add file path and size to /proc/<pid>/fdinfo
       [not found] <20220519214021.3572840-1-kaleshsingh@google.com>
@ 2022-05-20  2:18 ` kernel test robot
  2022-05-20  2:33 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-05-20  2:18 UTC (permalink / raw)
  To: Kalesh Singh; +Cc: llvm, kbuild-all

Hi Kalesh,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on b015dcd62b86d298829990f8261d5d154b8d7af5]

url:    https://github.com/intel-lab-lkp/linux/commits/Kalesh-Singh/procfs-Add-file-path-and-size-to-proc-pid-fdinfo/20220520-054133
base:   b015dcd62b86d298829990f8261d5d154b8d7af5
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220520/202205201031.8hfAOoam-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e00cbbec06c08dc616a0d52a20f678b8fbd4e304)
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/intel-lab-lkp/linux/commit/f2c1e6a5785dd09b34671073319c5aba5a94f423
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Kalesh-Singh/procfs-Add-file-path-and-size-to-proc-pid-fdinfo/20220520-054133
        git checkout f2c1e6a5785dd09b34671073319c5aba5a94f423
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/proc/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> fs/proc/fd.c:61:6: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'loff_t' (aka 'long long') [-Wformat]
                      file_inode(file)->i_size);
                      ^~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +61 fs/proc/fd.c

    20	
    21	static int seq_show(struct seq_file *m, void *v)
    22	{
    23		struct files_struct *files = NULL;
    24		int f_flags = 0, ret = -ENOENT;
    25		struct file *file = NULL;
    26		struct task_struct *task;
    27	
    28		task = get_proc_task(m->private);
    29		if (!task)
    30			return -ENOENT;
    31	
    32		task_lock(task);
    33		files = task->files;
    34		if (files) {
    35			unsigned int fd = proc_fd(m->private);
    36	
    37			spin_lock(&files->file_lock);
    38			file = files_lookup_fd_locked(files, fd);
    39			if (file) {
    40				struct fdtable *fdt = files_fdtable(files);
    41	
    42				f_flags = file->f_flags;
    43				if (close_on_exec(fd, fdt))
    44					f_flags |= O_CLOEXEC;
    45	
    46				get_file(file);
    47				ret = 0;
    48			}
    49			spin_unlock(&files->file_lock);
    50		}
    51		task_unlock(task);
    52		put_task_struct(task);
    53	
    54		if (ret)
    55			return ret;
    56	
    57		seq_printf(m, "pos:\t%lli\nflags:\t0%o\nmnt_id:\t%i\nino:\t%lu\nsize:\t%zu\n",
    58			   (long long)file->f_pos, f_flags,
    59			   real_mount(file->f_path.mnt)->mnt_id,
    60			   file_inode(file)->i_ino,
  > 61			   file_inode(file)->i_size);
    62	
    63		seq_puts(m, "path:\t");
    64		seq_file_path(m, file, "\n");
    65		seq_putc(m, '\n');
    66	
    67		/* show_fd_locks() never deferences files so a stale value is safe */
    68		show_fd_locks(m, file, files);
    69		if (seq_has_overflowed(m))
    70			goto out;
    71	
    72		if (file->f_op->show_fdinfo)
    73			file->f_op->show_fdinfo(m, file);
    74	
    75	out:
    76		fput(file);
    77		return 0;
    78	}
    79	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH] procfs: Add file path and size to /proc/<pid>/fdinfo
       [not found] <20220519214021.3572840-1-kaleshsingh@google.com>
  2022-05-20  2:18 ` [RFC PATCH] procfs: Add file path and size to /proc/<pid>/fdinfo kernel test robot
@ 2022-05-20  2:33 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-05-20  2:33 UTC (permalink / raw)
  To: Kalesh Singh; +Cc: llvm, kbuild-all

Hi Kalesh,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on b015dcd62b86d298829990f8261d5d154b8d7af5]

url:    https://github.com/intel-lab-lkp/linux/commits/Kalesh-Singh/procfs-Add-file-path-and-size-to-proc-pid-fdinfo/20220520-054133
base:   b015dcd62b86d298829990f8261d5d154b8d7af5
config: x86_64-randconfig-a016 (https://download.01.org/0day-ci/archive/20220520/202205201017.8mFLfM16-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e00cbbec06c08dc616a0d52a20f678b8fbd4e304)
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/intel-lab-lkp/linux/commit/f2c1e6a5785dd09b34671073319c5aba5a94f423
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Kalesh-Singh/procfs-Add-file-path-and-size-to-proc-pid-fdinfo/20220520-054133
        git checkout f2c1e6a5785dd09b34671073319c5aba5a94f423
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/proc/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> fs/proc/fd.c:61:6: warning: format specifies type 'size_t' (aka 'unsigned long') but the argument has type 'loff_t' (aka 'long long') [-Wformat]
                      file_inode(file)->i_size);
                      ^~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +61 fs/proc/fd.c

    20	
    21	static int seq_show(struct seq_file *m, void *v)
    22	{
    23		struct files_struct *files = NULL;
    24		int f_flags = 0, ret = -ENOENT;
    25		struct file *file = NULL;
    26		struct task_struct *task;
    27	
    28		task = get_proc_task(m->private);
    29		if (!task)
    30			return -ENOENT;
    31	
    32		task_lock(task);
    33		files = task->files;
    34		if (files) {
    35			unsigned int fd = proc_fd(m->private);
    36	
    37			spin_lock(&files->file_lock);
    38			file = files_lookup_fd_locked(files, fd);
    39			if (file) {
    40				struct fdtable *fdt = files_fdtable(files);
    41	
    42				f_flags = file->f_flags;
    43				if (close_on_exec(fd, fdt))
    44					f_flags |= O_CLOEXEC;
    45	
    46				get_file(file);
    47				ret = 0;
    48			}
    49			spin_unlock(&files->file_lock);
    50		}
    51		task_unlock(task);
    52		put_task_struct(task);
    53	
    54		if (ret)
    55			return ret;
    56	
    57		seq_printf(m, "pos:\t%lli\nflags:\t0%o\nmnt_id:\t%i\nino:\t%lu\nsize:\t%zu\n",
    58			   (long long)file->f_pos, f_flags,
    59			   real_mount(file->f_path.mnt)->mnt_id,
    60			   file_inode(file)->i_ino,
  > 61			   file_inode(file)->i_size);
    62	
    63		seq_puts(m, "path:\t");
    64		seq_file_path(m, file, "\n");
    65		seq_putc(m, '\n');
    66	
    67		/* show_fd_locks() never deferences files so a stale value is safe */
    68		show_fd_locks(m, file, files);
    69		if (seq_has_overflowed(m))
    70			goto out;
    71	
    72		if (file->f_op->show_fdinfo)
    73			file->f_op->show_fdinfo(m, file);
    74	
    75	out:
    76		fput(file);
    77		return 0;
    78	}
    79	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-20  2:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220519214021.3572840-1-kaleshsingh@google.com>
2022-05-20  2:18 ` [RFC PATCH] procfs: Add file path and size to /proc/<pid>/fdinfo kernel test robot
2022-05-20  2:33 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox