Re: [PATCH] procfs: Fix /proc/self/maps output for 32-bit kernel and compat tasks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Helge,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.5-rc7 next-20230821]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Helge-Deller/procfs-Fix-proc-self-maps-output-for-32-bit-kernel-and-compat-tasks/20230821-100823
base:   linus/master
patch link:    https://lore.kernel.org/r/ZOCJltW%2FeufPUc%2BT%40p100
patch subject: [PATCH] procfs: Fix /proc/self/maps output for 32-bit kernel and compat tasks
config: x86_64-buildonly-randconfig-006-20230822 (https://download.01.org/0day-ci/archive/20230822/202308220747.XMKc32Kz-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230822/202308220747.XMKc32Kz-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308220747.XMKc32Kz-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   fs/seq_file.c: In function 'seq_put_hex_ll':
>> fs/seq_file.c:765:23: error: implicit declaration of function 'is_compat_task' [-Werror=implicit-function-declaration]
     765 |         if (v == 0 || is_compat_task())
         |                       ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/is_compat_task +765 fs/seq_file.c

   737	
   738	/**
   739	 * seq_put_hex_ll - put a number in hexadecimal notation
   740	 * @m: seq_file identifying the buffer to which data should be written
   741	 * @delimiter: a string which is printed before the number
   742	 * @v: the number
   743	 * @width: a minimum field width
   744	 *
   745	 * seq_put_hex_ll(m, "", v, 8) is equal to seq_printf(m, "%08llx", v)
   746	 *
   747	 * This routine is very quick when you show lots of numbers.
   748	 * In usual cases, it will be better to use seq_printf(). It's easier to read.
   749	 */
   750	void seq_put_hex_ll(struct seq_file *m, const char *delimiter,
   751					unsigned long long v, unsigned int width)
   752	{
   753		unsigned int len;
   754		int i;
   755	
   756		if (delimiter && delimiter[0]) {
   757			if (delimiter[1] == 0)
   758				seq_putc(m, delimiter[0]);
   759			else
   760				seq_puts(m, delimiter);
   761		}
   762	
   763	#ifdef CONFIG_64BIT
   764		/* If x is 0, the result of __builtin_clzll is undefined */
 > 765		if (v == 0 || is_compat_task())
   766			len = 1;
   767		else
   768			len = (sizeof(v) * 8 - __builtin_clzll(v) + 3) / 4;
   769	#else
   770		/* On 32-bit kernel always use provided width */
   771		len = 1;
   772	#endif
   773	
   774		if (len < width)
   775			len = width;
   776	
   777		if (m->count + len > m->size) {
   778			seq_set_overflow(m);
   779			return;
   780		}
   781	
   782		for (i = len - 1; i >= 0; i--) {
   783			m->buf[m->count + i] = hex_asc[0xf & v];
   784			v = v >> 4;
   785		}
   786		m->count += len;
   787	}
   788	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux