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]
Date:   Wed, 29 Jun 2022 07:08:51 +0800
From:   kernel test robot <lkp@...el.com>
To:     Moti Haimovski <mhaimovski@...ana.ai>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Oded Gabbay <ogabbay@...nel.org>
Subject: [ogabbay:gaudi2 60/61]
 drivers/misc/habanalabs/common/mmu/mmu.c:998:19: sparse: sparse: non
 size-preserving integer to pointer cast

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git gaudi2
head:   f645d04ce63b73c46a8839a621e34a28f1b2a7ba
commit: 374bb7eeacb91bc4e53fc429c17d1d55c0e1fc6b [60/61] habanalabs: add gaudi2 MMU support
config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20220629/202206290743.xHHvh1c5-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-31-g4880bd19-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/?id=374bb7eeacb91bc4e53fc429c17d1d55c0e1fc6b
        git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
        git fetch --no-tags ogabbay gaudi2
        git checkout 374bb7eeacb91bc4e53fc429c17d1d55c0e1fc6b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/misc/

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


sparse warnings: (new ones prefixed by >>)
>> drivers/misc/habanalabs/common/mmu/mmu.c:998:19: sparse: sparse: non size-preserving integer to pointer cast

vim +998 drivers/misc/habanalabs/common/mmu/mmu.c

   980	
   981	/**
   982	 * hl_mmu_hr_write_pte() - write HR PTE
   983	 * @ctx: pointer to the context structure
   984	 * @pgt_info: HOP's page table info structure
   985	 * @phys_pte_addr: phys PTE address
   986	 * @val: raw PTE data
   987	 * @hop_table_size: HOP table size
   988	 */
   989	void hl_mmu_hr_write_pte(struct hl_ctx *ctx, struct pgt_info *pgt_info, u64 phys_pte_addr,
   990									u64 val, u32 hop_table_size)
   991	{
   992		/*
   993		 * The value to write is the phys address of the next hop +
   994		 * flags at the 12 LSBs.
   995		 */
   996		u64 virt_addr = hl_mmu_hr_pte_phys_to_virt(ctx, pgt_info, phys_pte_addr, hop_table_size);
   997	
 > 998		*((u64 *) virt_addr) = val;
   999	}
  1000	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ