public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kalesh Singh <kaleshsingh@google.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org
Subject: Re: [RFC PATCH] procfs: Add file path and size to /proc/<pid>/fdinfo
Date: Fri, 20 May 2022 10:18:23 +0800	[thread overview]
Message-ID: <202205201031.8hfAOoam-lkp@intel.com> (raw)
In-Reply-To: <20220519214021.3572840-1-kaleshsingh@google.com>

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

       reply	other threads:[~2022-05-20  2:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220519214021.3572840-1-kaleshsingh@google.com>
2022-05-20  2:18 ` kernel test robot [this message]
2022-05-20  2:33 ` [RFC PATCH] procfs: Add file path and size to /proc/<pid>/fdinfo kernel test robot

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=202205201031.8hfAOoam-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kaleshsingh@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=llvm@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox