Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3957666rwb; Sat, 17 Dec 2022 02:34:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf56FNoYfgxl4iQ4zRk5CQsJqk4RYVpFvPo4s/kypqNVKOtdwSKnmosiF2FmI2OO7QkcMZv2 X-Received: by 2002:a05:6a20:13a5:b0:ad:b4a5:8d2f with SMTP id w37-20020a056a2013a500b000adb4a58d2fmr33566734pzh.42.1671273257930; Sat, 17 Dec 2022 02:34:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671273257; cv=none; d=google.com; s=arc-20160816; b=FdedQw67qvpMD7kZa55vngA1yIMXWk7HigpVGS63yBd2RJtNGycX+HbiJOU4o0ZtqB iVYQOgggAqXNw4vs59xB0bu83xJ8q7O1nMB5RekP1j4ypGOAOhk0qtQXkT/HFLiFbue3 SR7RPxPsZ112ctjgLQtIFN5SQYoScVJeJ5VRPTpVeYm+ynLD9pIpmNITIKxxJ0zhaRg/ be2u7mcCyb8ZTt3uTvelX0RxGdMbUHe6qWmzvIJBqRIzSpzpR0WVU0pt3xdnYOLTpN+N CouAFbrrCSNSHfMmSj2TiqnSax4ZI2l9NtO1YkQILEhaN1RFHTQW27m1WxZBWaPodx/s gDjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GntWWxKRpPWeMm1mhv68BBTf942P1DbZlrM3OVZ+Drk=; b=uMQz3QHNAlbtFPY6giO4TnEtMvDwDPYTrhS3k6Oo7si1oSlgqn5Ge4bW1FPrpD/FeS +4y7RNiyJc5be/IyF1L8rVc4S+/rmz7GmzrcMQAoKmGQ5Z7T5RZVFQ1WJLSXYtqoJtQB DXfneTDNMe7L29ADL5XUCPSO2e83ucAXFJ2uZ7JldisUwu6toAj7u0O90GHwk0PJlwrj 7clxfROxzioYOdSOBxVjciwkzzAksy6qVGeonsTWR5WZNqwZBF7uN2+B9guV1PFM0bKl tttBzvziO78FPmtESRuydDtufQtFrlvaTfeMxQuFdCzciHN3Uq6k1nEIi9x32F7pFyjD lFQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ysgxf8Jp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s12-20020a65584c000000b0046f57b135c9si5357214pgr.182.2022.12.17.02.34.05; Sat, 17 Dec 2022 02:34:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ysgxf8Jp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230123AbiLQJrL (ORCPT + 69 others); Sat, 17 Dec 2022 04:47:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbiLQJrJ (ORCPT ); Sat, 17 Dec 2022 04:47:09 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51EAFE0AE for ; Sat, 17 Dec 2022 01:46:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671270388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GntWWxKRpPWeMm1mhv68BBTf942P1DbZlrM3OVZ+Drk=; b=Ysgxf8JpRihABLqqX4MN2WXflg11U7b6u4QG9yng9TtCGokQWpT6FW7K2YkL5Ekrnf/iGl mTNLjaJDXYfl0A76sNsApapiqRek/nlHuMKJoYZ3Wwx2uKdIzORjQQG7Y1mJ/LIXoORk5O ACf0rZaxYabUzjsx2J81tlAgMXy4VgY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-30-d2W2HETrPLKLL2cPf6ZZsg-1; Sat, 17 Dec 2022 04:46:25 -0500 X-MC-Unique: d2W2HETrPLKLL2cPf6ZZsg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 74CC9101A55E; Sat, 17 Dec 2022 09:46:24 +0000 (UTC) Received: from localhost (ovpn-12-34.pek2.redhat.com [10.72.12.34]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 75A2540C2064; Sat, 17 Dec 2022 09:46:22 +0000 (UTC) Date: Sat, 17 Dec 2022 17:46:13 +0800 From: Baoquan He To: kernel test robot Cc: linux-kernel@vger.kernel.org, oe-kbuild-all@lists.linux.dev, linux-mm@kvack.org, urezki@gmail.com, stephen.s.brennan@oracle.com, willy@infradead.org, akpm@linux-foundation.org, hch@infradead.org Subject: Re: [PATCH v2 3/7] mm/vmalloc.c: allow vread() to read out vm_map_ram areas Message-ID: References: <20221217015435.73889-4-bhe@redhat.com> <202212171403.0vwPwJ3y-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202212171403.0vwPwJ3y-lkp@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/17/22 at 02:41pm, kernel test robot wrote: > Hi Baoquan, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on akpm-mm/mm-everything] > > url: https://github.com/intel-lab-lkp/linux/commits/Baoquan-He/mm-vmalloc-c-allow-vread-to-read-out-vm_map_ram-areas/20221217-095615 > base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything > patch link: https://lore.kernel.org/r/20221217015435.73889-4-bhe%40redhat.com > patch subject: [PATCH v2 3/7] mm/vmalloc.c: allow vread() to read out vm_map_ram areas > config: loongarch-randconfig-r006-20221216 > compiler: loongarch64-linux-gcc (GCC) 12.1.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/368cd65be8fedd1642e53393dc3f28ff8726122d > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Baoquan-He/mm-vmalloc-c-allow-vread-to-read-out-vm_map_ram-areas/20221217-095615 > git checkout 368cd65be8fedd1642e53393dc3f28ff8726122d > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > mm/vmalloc.c: In function 'vb_vread': > >> mm/vmalloc.c:3563:49: warning: suggest parentheses around '-' inside '<<' [-Wparentheses] > 3563 | n = (re - rs + 1) << PAGE_SHIFT - offset; Thanks, below code change can fix the warning. diff --git a/mm/vmalloc.c b/mm/vmalloc.c index bdaceda1b878..ec5665e70114 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -3544,7 +3544,7 @@ static void vb_vread(char *buf, char *addr, int count) } /*it could start reading from the middle of used region*/ offset = offset_in_page(addr); - n = (re - rs + 1) << PAGE_SHIFT - offset; + n = ((re - rs + 1) << PAGE_SHIFT) - offset; if (n > count) n = count; aligned_vread(buf, start+offset, n);