All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 6378/6705] mseal_test.c:84:59: warning: format specifies type 'char *' but the argument has type 'char (*)[5]'
@ 2024-04-19  1:16 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-04-18 18:10 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp

:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Jeff Xu <jeffxu@chromium.org>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7b4f2bc91c15fdcf948bb2d9741a9d7d54303f8d
commit: 87c436bebeeb885b21f47a7dbcfc548e9679c688 [6378/6705] selftest mm/mseal memory sealing
:::::: branch date: 11 hours ago
:::::: commit date: 2 days ago
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240419/202404190226.OfJOewV8-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/r/202404190226.OfJOewV8-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> mseal_test.c:84:59: warning: format specifies type 'char *' but the argument has type 'char (*)[5]' [-Wformat]
      84 |                 if (sscanf(line, "%lx-%lx %4s", &addr_start, &addr_end, &protstr) == 3) {
         |                                           ~~~                           ^~~~~~~~
   1 warning generated.


vim +84 tools/testing/selftests/mm/mseal_test.c

87c436bebeeb88 Jeff Xu 2024-04-15   69  
87c436bebeeb88 Jeff Xu 2024-04-15   70  static unsigned long get_vma_size(void *addr, int *prot)
87c436bebeeb88 Jeff Xu 2024-04-15   71  {
87c436bebeeb88 Jeff Xu 2024-04-15   72  	FILE *maps;
87c436bebeeb88 Jeff Xu 2024-04-15   73  	char line[256];
87c436bebeeb88 Jeff Xu 2024-04-15   74  	int size = 0;
87c436bebeeb88 Jeff Xu 2024-04-15   75  	uintptr_t  addr_start, addr_end;
87c436bebeeb88 Jeff Xu 2024-04-15   76  	char protstr[5];
87c436bebeeb88 Jeff Xu 2024-04-15   77  	*prot = 0;
87c436bebeeb88 Jeff Xu 2024-04-15   78  
87c436bebeeb88 Jeff Xu 2024-04-15   79  	maps = fopen("/proc/self/maps", "r");
87c436bebeeb88 Jeff Xu 2024-04-15   80  	if (!maps)
87c436bebeeb88 Jeff Xu 2024-04-15   81  		return 0;
87c436bebeeb88 Jeff Xu 2024-04-15   82  
87c436bebeeb88 Jeff Xu 2024-04-15   83  	while (fgets(line, sizeof(line), maps)) {
87c436bebeeb88 Jeff Xu 2024-04-15  @84  		if (sscanf(line, "%lx-%lx %4s", &addr_start, &addr_end, &protstr) == 3) {
87c436bebeeb88 Jeff Xu 2024-04-15   85  			if (addr_start == (uintptr_t) addr) {
87c436bebeeb88 Jeff Xu 2024-04-15   86  				size = addr_end - addr_start;
87c436bebeeb88 Jeff Xu 2024-04-15   87  				if (protstr[0] == 'r')
87c436bebeeb88 Jeff Xu 2024-04-15   88  					*prot |= 0x4;
87c436bebeeb88 Jeff Xu 2024-04-15   89  				if (protstr[1] == 'w')
87c436bebeeb88 Jeff Xu 2024-04-15   90  					*prot |= 0x2;
87c436bebeeb88 Jeff Xu 2024-04-15   91  				if (protstr[2] == 'x')
87c436bebeeb88 Jeff Xu 2024-04-15   92  					*prot |= 0x1;
87c436bebeeb88 Jeff Xu 2024-04-15   93  				break;
87c436bebeeb88 Jeff Xu 2024-04-15   94  			}
87c436bebeeb88 Jeff Xu 2024-04-15   95  		}
87c436bebeeb88 Jeff Xu 2024-04-15   96  	}
87c436bebeeb88 Jeff Xu 2024-04-15   97  	fclose(maps);
87c436bebeeb88 Jeff Xu 2024-04-15   98  	return size;
87c436bebeeb88 Jeff Xu 2024-04-15   99  }
87c436bebeeb88 Jeff Xu 2024-04-15  100  

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

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

* [linux-next:master 6378/6705] mseal_test.c:84:59: warning: format specifies type 'char *' but the argument has type 'char (*)[5]'
@ 2024-04-19  1:16 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2024-04-19  1:16 UTC (permalink / raw)
  To: Jeff Xu; +Cc: oe-kbuild-all, Linux Memory Management List, Andrew Morton

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7b4f2bc91c15fdcf948bb2d9741a9d7d54303f8d
commit: 87c436bebeeb885b21f47a7dbcfc548e9679c688 [6378/6705] selftest mm/mseal memory sealing
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240419/202404190226.OfJOewV8-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 <yujie.liu@intel.com>
| Closes: https://lore.kernel.org/r/202404190226.OfJOewV8-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> mseal_test.c:84:59: warning: format specifies type 'char *' but the argument has type 'char (*)[5]' [-Wformat]
      84 |                 if (sscanf(line, "%lx-%lx %4s", &addr_start, &addr_end, &protstr) == 3) {
         |                                           ~~~                           ^~~~~~~~
   1 warning generated.


vim +84 tools/testing/selftests/mm/mseal_test.c

87c436bebeeb88 Jeff Xu 2024-04-15   69  
87c436bebeeb88 Jeff Xu 2024-04-15   70  static unsigned long get_vma_size(void *addr, int *prot)
87c436bebeeb88 Jeff Xu 2024-04-15   71  {
87c436bebeeb88 Jeff Xu 2024-04-15   72  	FILE *maps;
87c436bebeeb88 Jeff Xu 2024-04-15   73  	char line[256];
87c436bebeeb88 Jeff Xu 2024-04-15   74  	int size = 0;
87c436bebeeb88 Jeff Xu 2024-04-15   75  	uintptr_t  addr_start, addr_end;
87c436bebeeb88 Jeff Xu 2024-04-15   76  	char protstr[5];
87c436bebeeb88 Jeff Xu 2024-04-15   77  	*prot = 0;
87c436bebeeb88 Jeff Xu 2024-04-15   78  
87c436bebeeb88 Jeff Xu 2024-04-15   79  	maps = fopen("/proc/self/maps", "r");
87c436bebeeb88 Jeff Xu 2024-04-15   80  	if (!maps)
87c436bebeeb88 Jeff Xu 2024-04-15   81  		return 0;
87c436bebeeb88 Jeff Xu 2024-04-15   82  
87c436bebeeb88 Jeff Xu 2024-04-15   83  	while (fgets(line, sizeof(line), maps)) {
87c436bebeeb88 Jeff Xu 2024-04-15  @84  		if (sscanf(line, "%lx-%lx %4s", &addr_start, &addr_end, &protstr) == 3) {
87c436bebeeb88 Jeff Xu 2024-04-15   85  			if (addr_start == (uintptr_t) addr) {
87c436bebeeb88 Jeff Xu 2024-04-15   86  				size = addr_end - addr_start;
87c436bebeeb88 Jeff Xu 2024-04-15   87  				if (protstr[0] == 'r')
87c436bebeeb88 Jeff Xu 2024-04-15   88  					*prot |= 0x4;
87c436bebeeb88 Jeff Xu 2024-04-15   89  				if (protstr[1] == 'w')
87c436bebeeb88 Jeff Xu 2024-04-15   90  					*prot |= 0x2;
87c436bebeeb88 Jeff Xu 2024-04-15   91  				if (protstr[2] == 'x')
87c436bebeeb88 Jeff Xu 2024-04-15   92  					*prot |= 0x1;
87c436bebeeb88 Jeff Xu 2024-04-15   93  				break;
87c436bebeeb88 Jeff Xu 2024-04-15   94  			}
87c436bebeeb88 Jeff Xu 2024-04-15   95  		}
87c436bebeeb88 Jeff Xu 2024-04-15   96  	}
87c436bebeeb88 Jeff Xu 2024-04-15   97  	fclose(maps);
87c436bebeeb88 Jeff Xu 2024-04-15   98  	return size;
87c436bebeeb88 Jeff Xu 2024-04-15   99  }
87c436bebeeb88 Jeff Xu 2024-04-15  100  

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


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

end of thread, other threads:[~2024-04-19  1:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18 18:10 [linux-next:master 6378/6705] mseal_test.c:84:59: warning: format specifies type 'char *' but the argument has type 'char (*)[5]' kernel test robot
2024-04-19  1:16 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.