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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC363C433F5 for ; Thu, 30 Dec 2021 23:51:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DBE296B00A6; Thu, 30 Dec 2021 18:51:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D6A5C6B00A8; Thu, 30 Dec 2021 18:51:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C31E86B00A9; Thu, 30 Dec 2021 18:51:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0207.hostedemail.com [216.40.44.207]) by kanga.kvack.org (Postfix) with ESMTP id B481C6B00A6 for ; Thu, 30 Dec 2021 18:51:44 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6CE7B853E3 for ; Thu, 30 Dec 2021 23:51:44 +0000 (UTC) X-FDA: 78976110528.22.D192D72 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by imf02.hostedemail.com (Postfix) with ESMTP id B4F3080004 for ; Thu, 30 Dec 2021 23:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1640908303; x=1672444303; h=date:from:to:cc:subject:message-id:mime-version; bh=FVYh5iV8omQLr5cI8usKEOqYoV6K+XeGTJ3n4Wu+ea8=; b=HCEf+ZUjmN1jcjI64sfdku+7J5AdUjnR50hMYcamZACUHdkLfGowyQCC Y/CeNZrm0QAkht3c7aTjZ7t2Mo3eCF9ph1Ke+48V5CNK6us8k7YbuZmPj U/ertRFeCYoMap76/qW8+trUHM91qGmuEIpFM/7gWFmtWjSs9VXdQpnry tKUN8rZjA1C3e0rS/JCFp7fy64ONwhMiIf7NJV0dD0mLlEZ44AvJ/amdo 7TDbwhPuktzJFhpM7Wd732NsoZkSV/r35dtpfns86JX3MA24Y2ot0DwX6 /q/I3YRghEJQ7/bkqxpPUuMgIGRtPdbPkwYd7A7oFdw0jnz6daNBvtMn5 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10213"; a="228570992" X-IronPort-AV: E=Sophos;i="5.88,248,1635231600"; d="scan'208";a="228570992" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Dec 2021 15:51:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,248,1635231600"; d="scan'208";a="619496660" Received: from lkp-server01.sh.intel.com (HELO e357b3ef1427) ([10.239.97.150]) by orsmga004.jf.intel.com with ESMTP; 30 Dec 2021 15:51:37 -0800 Received: from kbuild by e357b3ef1427 with local (Exim 4.92) (envelope-from ) id 1n35Cq-000Am2-L8; Thu, 30 Dec 2021 23:51:36 +0000 Date: Fri, 31 Dec 2021 07:51:06 +0800 From: kernel test robot To: Alexander Aring Cc: kbuild-all@lists.01.org, Linux Memory Management List , David Teigland Subject: [linux-next:master 511/9897] fs/dlm/midcomms.c:913:22: sparse: sparse: restricted __le32 degrades to integer Message-ID: <202112310735.HxchgVSl-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: B4F3080004 X-Stat-Signature: 5s1e46n78gyykpdb7ruyxjzcar764j5b Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=HCEf+ZUj; spf=none (imf02.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.126) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com X-HE-Tag: 1640908297-736641 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: ea586a076e8aa606c59b66d86660590f18354b11 commit: 658bd576f95ed597e519cdadf1c86ac87c17aea5 [511/9897] fs: dlm: move version conversion to compile time config: ia64-randconfig-s031-20211123 (https://download.01.org/0day-ci/archive/20211231/202112310735.HxchgVSl-lkp@intel.com/config) compiler: ia64-linux-gcc (GCC) 11.2.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-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=658bd576f95ed597e519cdadf1c86ac87c17aea5 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 658bd576f95ed597e519cdadf1c86ac87c17aea5 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=ia64 SHELL=/bin/bash fs/dlm/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) fs/dlm/midcomms.c:570:25: sparse: sparse: cast to restricted __le32 fs/dlm/midcomms.c:678:19: sparse: sparse: cast to restricted __le16 fs/dlm/midcomms.c:680:16: sparse: sparse: cast to restricted __le16 fs/dlm/midcomms.c:718:27: sparse: sparse: cast to restricted __le16 fs/dlm/midcomms.c:737:25: sparse: sparse: cast to restricted __le32 fs/dlm/midcomms.c:747:25: sparse: sparse: cast to restricted __le32 fs/dlm/midcomms.c:756:23: sparse: sparse: cast to restricted __le32 fs/dlm/midcomms.c:766:42: sparse: sparse: cast to restricted __le16 fs/dlm/midcomms.c:769:26: sparse: sparse: cast to restricted __le16 fs/dlm/midcomms.c:804:23: sparse: sparse: cast to restricted __le32 fs/dlm/midcomms.c:838:27: sparse: sparse: cast to restricted __le16 fs/dlm/midcomms.c:898:26: sparse: sparse: cast to restricted __le16 fs/dlm/midcomms.c:920:25: sparse: sparse: cast to restricted __le32 >> fs/dlm/midcomms.c:913:22: sparse: sparse: restricted __le32 degrades to integer fs/dlm/midcomms.c:916:22: sparse: sparse: restricted __le32 degrades to integer fs/dlm/midcomms.c:1056:20: sparse: sparse: context imbalance in 'dlm_midcomms_get_mhandle' - wrong count at exit fs/dlm/midcomms.c: note: in included file (through include/linux/notifier.h, include/linux/memory_hotplug.h, include/linux/mmzone.h, ...): include/linux/srcu.h:188:9: sparse: sparse: context imbalance in 'dlm_midcomms_commit_mhandle' - unexpected unlock vim +913 fs/dlm/midcomms.c 871 872 /* 873 * Called from the low-level comms layer to process a buffer of 874 * commands. 875 */ 876 877 int dlm_process_incoming_buffer(int nodeid, unsigned char *buf, int len) 878 { 879 const unsigned char *ptr = buf; 880 const struct dlm_header *hd; 881 uint16_t msglen; 882 int ret = 0; 883 884 while (len >= sizeof(struct dlm_header)) { 885 hd = (struct dlm_header *)ptr; 886 887 /* no message should be more than DLM_MAX_SOCKET_BUFSIZE or 888 * less than dlm_header size. 889 * 890 * Some messages does not have a 8 byte length boundary yet 891 * which can occur in a unaligned memory access of some dlm 892 * messages. However this problem need to be fixed at the 893 * sending side, for now it seems nobody run into architecture 894 * related issues yet but it slows down some processing. 895 * Fixing this issue should be scheduled in future by doing 896 * the next major version bump. 897 */ 898 msglen = le16_to_cpu(hd->h_length); 899 if (msglen > DLM_MAX_SOCKET_BUFSIZE || 900 msglen < sizeof(struct dlm_header)) { 901 log_print("received invalid length header: %u from node %d, will abort message parsing", 902 msglen, nodeid); 903 return -EBADMSG; 904 } 905 906 /* caller will take care that leftover 907 * will be parsed next call with more data 908 */ 909 if (msglen > len) 910 break; 911 912 switch (hd->h_version) { > 913 case cpu_to_le32(DLM_VERSION_3_1): 914 dlm_midcomms_receive_buffer_3_1((union dlm_packet *)ptr, nodeid); 915 break; 916 case cpu_to_le32(DLM_VERSION_3_2): 917 dlm_midcomms_receive_buffer_3_2((union dlm_packet *)ptr, nodeid); 918 break; 919 default: 920 log_print("received invalid version header: %u from node %d, will skip this message", 921 le32_to_cpu(hd->h_version), nodeid); 922 break; 923 } 924 925 ret += msglen; 926 len -= msglen; 927 ptr += msglen; 928 } 929 930 return ret; 931 } 932 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org