From: kernel test robot <lkp@intel.com>
To: Roman Kisel <romank@linux.microsoft.com>,
akpm@linux-foundation.org, apais@linux.microsoft.com,
ardb@kernel.org, bigeasy@linutronix.de, brauner@kernel.org,
ebiederm@xmission.com, jack@suse.cz, keescook@chromium.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, nagvijay@microsoft.com, oleg@redhat.com,
tandersen@netflix.com, vincent.whitchurch@axis.com,
viro@zeniv.linux.org.uk
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
apais@microsoft.com, benhill@microsoft.com,
ssengar@microsoft.com, sunilmut@microsoft.com, vdso@hexbites.dev
Subject: Re: [PATCH v2 1/1] binfmt_elf, coredump: Log the reason of the failed core dumps
Date: Sat, 13 Jul 2024 13:29:28 +0800 [thread overview]
Message-ID: <202407131345.6cPoXZGa-lkp@intel.com> (raw)
In-Reply-To: <20240712215223.605363-2-romank@linux.microsoft.com>
Hi Roman,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 831bcbcead6668ebf20b64fdb27518f1362ace3a]
url: https://github.com/intel-lab-lkp/linux/commits/Roman-Kisel/binfmt_elf-coredump-Log-the-reason-of-the-failed-core-dumps/20240713-055749
base: 831bcbcead6668ebf20b64fdb27518f1362ace3a
patch link: https://lore.kernel.org/r/20240712215223.605363-2-romank%40linux.microsoft.com
patch subject: [PATCH v2 1/1] binfmt_elf, coredump: Log the reason of the failed core dumps
config: arm-allnoconfig (https://download.01.org/0day-ci/archive/20240713/202407131345.6cPoXZGa-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project a0c6b8aef853eedaa0980f07c0a502a5a8a9740e)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240713/202407131345.6cPoXZGa-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407131345.6cPoXZGa-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from fs/coredump.c:6:
In file included from include/linux/mm.h:2253:
include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
514 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> fs/coredump.c:875:34: warning: format specifies type 'long' but the argument has type 'ssize_t' (aka 'int') [-Wformat]
874 | pr_err_ratelimited("Core dump of %s(PID %d) failed when writing out, error %ld\n",
| ~~~
| %zd
875 | current->comm, current->pid, n);
| ^
include/linux/printk.h:672:45: note: expanded from macro 'pr_err_ratelimited'
672 | printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:658:17: note: expanded from macro 'printk_ratelimited'
658 | printk(fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:464:60: note: expanded from macro 'printk'
464 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:436:19: note: expanded from macro 'printk_index_wrap'
436 | _p_func(_fmt, ##__VA_ARGS__); \
| ~~~~ ^~~~~~~~~~~
fs/coredump.c:878:34: warning: format specifies type 'long' but the argument has type 'ssize_t' (aka 'int') [-Wformat]
877 | pr_err_ratelimited("Core dump of %s(PID %d) partially written out, only %ld(of %d) bytes written\n",
| ~~~
| %zd
878 | current->comm, current->pid, n, nr);
| ^
include/linux/printk.h:672:45: note: expanded from macro 'pr_err_ratelimited'
672 | printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:658:17: note: expanded from macro 'printk_ratelimited'
658 | printk(fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:464:60: note: expanded from macro 'printk'
464 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:436:19: note: expanded from macro 'printk_index_wrap'
436 | _p_func(_fmt, ##__VA_ARGS__); \
| ~~~~ ^~~~~~~~~~~
3 warnings generated.
vim +875 fs/coredump.c
854
855 /*
856 * Core dumping helper functions. These are the only things you should
857 * do on a core-file: use only these functions to write out all the
858 * necessary info.
859 */
860 static int __dump_emit(struct coredump_params *cprm, const void *addr, int nr)
861 {
862 struct file *file = cprm->file;
863 loff_t pos = file->f_pos;
864 ssize_t n;
865 if (cprm->written + nr > cprm->limit)
866 return 0;
867
868
869 if (dump_interrupted())
870 return 0;
871 n = __kernel_write(file, addr, nr, &pos);
872 if (n != nr) {
873 if (n < 0)
874 pr_err_ratelimited("Core dump of %s(PID %d) failed when writing out, error %ld\n",
> 875 current->comm, current->pid, n);
876 else
877 pr_err_ratelimited("Core dump of %s(PID %d) partially written out, only %ld(of %d) bytes written\n",
878 current->comm, current->pid, n, nr);
879
880 return 0;
881 }
882 file->f_pos = pos;
883 cprm->written += n;
884 cprm->pos += n;
885
886 return 1;
887 }
888
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-07-13 5:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 21:50 [PATCH v2 0/1] binfmt_elf, coredump: Log the reason of the failed core dumps Roman Kisel
2024-07-12 21:50 ` [PATCH v2 1/1] " Roman Kisel
2024-07-13 5:29 ` kernel test robot [this message]
2024-07-13 16:31 ` Kees Cook
2024-07-14 14:33 ` Roman Kisel
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=202407131345.6cPoXZGa-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=apais@linux.microsoft.com \
--cc=apais@microsoft.com \
--cc=ardb@kernel.org \
--cc=benhill@microsoft.com \
--cc=bigeasy@linutronix.de \
--cc=brauner@kernel.org \
--cc=ebiederm@xmission.com \
--cc=jack@suse.cz \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=nagvijay@microsoft.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oleg@redhat.com \
--cc=romank@linux.microsoft.com \
--cc=ssengar@microsoft.com \
--cc=sunilmut@microsoft.com \
--cc=tandersen@netflix.com \
--cc=vdso@hexbites.dev \
--cc=vincent.whitchurch@axis.com \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).