From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFB03C77B70 for ; Sun, 16 Apr 2023 02:49:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230009AbjDPCtF (ORCPT ); Sat, 15 Apr 2023 22:49:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjDPCtE (ORCPT ); Sat, 15 Apr 2023 22:49:04 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30F5B2724 for ; Sat, 15 Apr 2023 19:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681613343; x=1713149343; h=date:from:to:cc:subject:message-id:mime-version; bh=LH3wntjmSoZIiqEIynepT2X2Zx4wQmykvrz6avIchQM=; b=byOI55uoOc7I2lK66qYdaxee9RV6M9pl+L6ML4t5tLEiYsmZcgrt3WYp 3nZHWCCIZ0nlSmiCnPJufsaNWMh53dc6ErIlbU/u/cnsumUp1vGlPqszI MoWXUk4VL7maSY0JDYMfL3jvCPk9d16aUfiUfc1SlJVQL0PAZtPq8ECUv CynJCtZbYW+CJDcYgPXZeF7oL8Z9mnlmL8QKi12uI1MRVtisrsvz7nbl0 P71LQW4w4IfmMm4qnJJejx28aOlsHqQjsp66st5nEAFJ9Oo/dxGW3SQOU 2LcJBE6KaWi/rPYj/YeoX0p+vHugd7Ejka1I36rBOyaAxBtPt/PUTNCRO g==; X-IronPort-AV: E=McAfee;i="6600,9927,10681"; a="346540900" X-IronPort-AV: E=Sophos;i="5.99,201,1677571200"; d="scan'208";a="346540900" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2023 19:49:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10681"; a="814369239" X-IronPort-AV: E=Sophos;i="5.99,201,1677571200"; d="scan'208";a="814369239" Received: from lkp-server01.sh.intel.com (HELO b613635ddfff) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 15 Apr 2023 19:49:00 -0700 Received: from kbuild by b613635ddfff with local (Exim 4.96) (envelope-from ) id 1pnsRn-000bUR-10; Sun, 16 Apr 2023 02:48:59 +0000 Date: Sun, 16 Apr 2023 10:48:36 +0800 From: kernel test robot To: Gao Xiang Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Yue Hu , Chao Yu , Chao Yu Subject: arch/sparc/include/asm/cmpxchg_64.h:161:55: sparse: sparse: cast truncates bits from constant value (ffffffffe0f510cc becomes cc) Message-ID: <202304161045.XaIBg23J-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: a7a55e27ad72fb0dc9281d6211cffeebef8dde65 commit: 2f44013e39984c127c6efedf70e6b5f4e9dcf315 erofs: fix pcluster use-after-free on UP platforms date: 7 months ago config: sparc64-randconfig-s051-20230416 (https://download.01.org/0day-ci/archive/20230416/202304161045.XaIBg23J-lkp@intel.com/config) compiler: sparc64-linux-gcc (GCC) 12.1.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2f44013e39984c127c6efedf70e6b5f4e9dcf315 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 2f44013e39984c127c6efedf70e6b5f4e9dcf315 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 SHELL=/bin/bash fs/erofs/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Link: https://lore.kernel.org/oe-kbuild-all/202304161045.XaIBg23J-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) fs/erofs/utils.c: note: in included file (through arch/sparc/include/asm/cmpxchg.h, arch/sparc/include/asm/atomic_64.h, arch/sparc/include/asm/atomic.h, ...): >> arch/sparc/include/asm/cmpxchg_64.h:161:55: sparse: sparse: cast truncates bits from constant value (ffffffffe0f510cc becomes cc) -- fs/erofs/zdata.c: note: in included file (through arch/sparc/include/asm/cmpxchg.h, arch/sparc/include/asm/atomic_64.h, arch/sparc/include/asm/atomic.h, ...): >> arch/sparc/include/asm/cmpxchg_64.h:161:55: sparse: sparse: cast truncates bits from constant value (ffffffffe0f510cc becomes cc) arch/sparc/include/asm/cmpxchg_64.h:161:50: sparse: sparse: cast truncates bits from constant value (5f0ecafe becomes fe) arch/sparc/include/asm/cmpxchg_64.h:161:50: sparse: sparse: cast truncates bits from constant value (5f0ecafe becomes fe) arch/sparc/include/asm/cmpxchg_64.h:161:55: sparse: sparse: cast truncates bits from constant value (5f0edead becomes ad) vim +161 arch/sparc/include/asm/cmpxchg_64.h d550bbd40c0e10 David Howells 2012-03-28 155 d550bbd40c0e10 David Howells 2012-03-28 156 static inline unsigned long d550bbd40c0e10 David Howells 2012-03-28 157 __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) d550bbd40c0e10 David Howells 2012-03-28 158 { d550bbd40c0e10 David Howells 2012-03-28 159 switch (size) { a12ee2349312d7 Babu Moger 2017-05-24 160 case 1: a12ee2349312d7 Babu Moger 2017-05-24 @161 return __cmpxchg_u8(ptr, old, new); d550bbd40c0e10 David Howells 2012-03-28 162 case 4: d550bbd40c0e10 David Howells 2012-03-28 163 return __cmpxchg_u32(ptr, old, new); d550bbd40c0e10 David Howells 2012-03-28 164 case 8: d550bbd40c0e10 David Howells 2012-03-28 165 return __cmpxchg_u64(ptr, old, new); d550bbd40c0e10 David Howells 2012-03-28 166 } d550bbd40c0e10 David Howells 2012-03-28 167 __cmpxchg_called_with_bad_pointer(); d550bbd40c0e10 David Howells 2012-03-28 168 return old; d550bbd40c0e10 David Howells 2012-03-28 169 } d550bbd40c0e10 David Howells 2012-03-28 170 :::::: The code at line 161 was first introduced by commit :::::: a12ee2349312d7112b9b7c6ac2e70c5ec2ca334e arch/sparc: Introduce cmpxchg_u8 SPARC :::::: TO: Babu Moger :::::: CC: David S. Miller -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests