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: <202311160648.Adh0V2Wd-lkp@intel.com>
Date:   Thu, 16 Nov 2023 07:00:22 +0800
From:   kernel test robot <lkp@...el.com>
To:     Emil Renner Berthing <kernel@...il.dk>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Palmer Dabbelt <palmer@...osinc.com>,
        Charlie Jenkins <charlie@...osinc.com>
Subject: arch/riscv/kernel/module.c:33:25: sparse: sparse: cast to restricted
 __le16

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   c42d9eeef8e5ba9292eda36fd8e3c11f35ee065c
commit: 8cbe0accc4a6ba7ed34812a1c7e1ba67e7f7b2a4 riscv: Avoid unaligned access when relocating modules
date:   8 days ago
config: riscv-randconfig-r133-20231115 (https://download.01.org/0day-ci/archive/20231116/202311160648.Adh0V2Wd-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231116/202311160648.Adh0V2Wd-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311160648.Adh0V2Wd-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   WARNING: invalid argument to '-march': '_zihintpause'
>> arch/riscv/kernel/module.c:33:25: sparse: sparse: cast to restricted __le16
   arch/riscv/kernel/module.c:33:55: sparse: sparse: cast to restricted __le16
>> arch/riscv/kernel/module.c:38:19: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] @@     got restricted __le16 [usertype] @@
   arch/riscv/kernel/module.c:38:19: sparse:     expected unsigned short [usertype]
   arch/riscv/kernel/module.c:38:19: sparse:     got restricted __le16 [usertype]
   arch/riscv/kernel/module.c:39:19: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] @@     got restricted __le16 [usertype] @@
   arch/riscv/kernel/module.c:39:19: sparse:     expected unsigned short [usertype]
   arch/riscv/kernel/module.c:39:19: sparse:     got restricted __le16 [usertype]
   arch/riscv/kernel/module.c:46:20: sparse: sparse: cast to restricted __le16
   arch/riscv/kernel/module.c:51:17: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] @@     got restricted __le16 [usertype] @@
   arch/riscv/kernel/module.c:51:17: sparse:     expected unsigned short [usertype]
   arch/riscv/kernel/module.c:51:17: sparse:     got restricted __le16 [usertype]

vim +33 arch/riscv/kernel/module.c

    29	
    30	static int riscv_insn_rmw(void *location, u32 keep, u32 set)
    31	{
    32		u16 *parcel = location;
  > 33		u32 insn = (u32)le16_to_cpu(parcel[0]) | (u32)le16_to_cpu(parcel[1]) << 16;
    34	
    35		insn &= keep;
    36		insn |= set;
    37	
  > 38		parcel[0] = cpu_to_le16(insn);
    39		parcel[1] = cpu_to_le16(insn >> 16);
    40		return 0;
    41	}
    42	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ