lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210040820.AtanoUrT-lkp@intel.com>
Date:   Tue, 4 Oct 2022 08:48:36 +0800
From:   kernel test robot <lkp@...el.com>
To:     Manisha Chinthapally <manisha.chinthapally@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mchinth:sep_linux_v6.0-rc7 2/2]
 drivers/platform/x86/sepdk/sep/ipt.c:335:41: warning: cast from pointer to
 integer of different size

tree:   https://github.com/mchinth/linux sep_linux_v6.0-rc7
head:   4c704363910aa00df3243bcb1658edf3fb9919c9
commit: 4c704363910aa00df3243bcb1658edf3fb9919c9 [2/2] Merge SEP5.36 into Linux tree
config: i386-defconfig
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/mchinth/linux/commit/4c704363910aa00df3243bcb1658edf3fb9919c9
        git remote add mchinth https://github.com/mchinth/linux
        git fetch --no-tags mchinth sep_linux_v6.0-rc7
        git checkout 4c704363910aa00df3243bcb1658edf3fb9919c9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/platform/x86/sepdk/sep/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from drivers/platform/x86/sepdk/inc/master.h:51,
                    from drivers/platform/x86/sepdk/sep/ipt.c:33:
   drivers/platform/x86/sepdk/sep/ipt.c: In function 'ipt_Allocate_Buffers':
>> drivers/platform/x86/sepdk/sep/ipt.c:335:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     335 |                                 (PVOID)((U64)(ipt_node_on_cpu(i)
         |                                         ^
   drivers/platform/x86/sepdk/inc/linuxos.h:74:50: note: in definition of macro 'VIRT_TO_PHYS_ADDR'
      74 | #define VIRT_TO_PHYS_ADDR(va) ((U64)virt_to_phys(va))
         |                                                  ^~
>> drivers/platform/x86/sepdk/sep/ipt.c:335:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     335 |                                 (PVOID)((U64)(ipt_node_on_cpu(i)
         |                                 ^
   drivers/platform/x86/sepdk/inc/linuxos.h:74:50: note: in definition of macro 'VIRT_TO_PHYS_ADDR'
      74 | #define VIRT_TO_PHYS_ADDR(va) ((U64)virt_to_phys(va))
         |                                                  ^~
   drivers/platform/x86/sepdk/sep/ipt.c: In function 'IPT_TOPA_Flush':
   drivers/platform/x86/sepdk/sep/ipt.c:480:13: warning: variable 'data_size' set but not used [-Wunused-but-set-variable]
     480 |         U64 data_size = 0;
         |             ^~~~~~~~~


vim +335 drivers/platform/x86/sepdk/sep/ipt.c

   291	
   292	/* ------------------------------------------------------------------------- */
   293	/*!
   294	 * @fn          OS_STATUS ipt_Allocate_Buffers (VOID)
   295	 *
   296	 * @brief       Allocate memory and set up MSRs in preparation for IPT
   297	 *
   298	 * @param       NONE
   299	 *
   300	 * @return      OS_STATUS status
   301	 *
   302	 */
   303	static OS_STATUS
   304	ipt_Allocate_Buffers(VOID)
   305	{
   306		S32 i;
   307		U32 j;
   308	
   309		SEP_DRV_LOG_TRACE_IN("");
   310	
   311		for (i = 0; i < GLOBAL_STATE_num_cpus(driver_state); i++) {
   312			ipt_node_on_cpu(i).topa_virt_address =
   313				CONTROL_Allocate_Memory_Aligned((size_t)IPT_BUF_SIZE,
   314								TRUE);
   315			if (!(ipt_node_on_cpu(i).topa_virt_address)) {
   316				SEP_DRV_LOG_ERROR_TRACE_OUT("IPT buffer allocation failed!");
   317				return OS_NO_MEM;
   318			}
   319			ipt_node_on_cpu(i).topa_phys_address =
   320				VIRT_TO_PHYS_ADDR(ipt_node_on_cpu(i).topa_virt_address);
   321			ipt_node_on_cpu(i).outbuf_virt_address =
   322				CONTROL_Allocate_Memory_Aligned(
   323					(size_t)IPT_BUF_SIZE * ipt_buffer_num, TRUE);
   324			if (!(ipt_node_on_cpu(i).outbuf_virt_address)) {
   325				SEP_DRV_LOG_ERROR_TRACE_OUT("IPT buffer allocation failed!");
   326				return OS_NO_MEM;
   327			}
   328			SEP_DRV_LOG_TRACE("cpu%d topa_va=%llx, topa_pa=%llx", i,
   329					  ipt_node_on_cpu(i).topa_virt_address,
   330					  ipt_node_on_cpu(i).topa_phys_address);
   331	
   332			for (j = 0; j < ipt_buffer_num; j++) {
   333				ipt_node_on_cpu(i)
   334					.outbuf_phys_address[j] = VIRT_TO_PHYS_ADDR(
 > 335					(PVOID)((U64)(ipt_node_on_cpu(i)
   336							      .outbuf_virt_address) +
   337						j * IPT_BUF_SIZE));
   338				((U64 *)ipt_node_on_cpu(i).topa_virt_address)[j] =
   339					ipt_node_on_cpu(i).outbuf_phys_address[j];
   340				SEP_DRV_LOG_TRACE("cpu%d buffer%d outbuf_pa=%llx", i, j,
   341						  ipt_node_on_cpu(i)
   342							  .outbuf_phys_address[j]);
   343			}
   344		}
   345	
   346		SEP_DRV_LOG_TRACE_OUT("");
   347		return OS_SUCCESS;
   348	}
   349	

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

View attachment "config" of type "text/plain" (132832 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ