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 36F61C4332F for ; Sat, 17 Dec 2022 09:46:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1C0558E0002; Sat, 17 Dec 2022 04:46:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 16FF58E0001; Sat, 17 Dec 2022 04:46:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 05FFF8E0002; Sat, 17 Dec 2022 04:46:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id E7E7F8E0001 for ; Sat, 17 Dec 2022 04:46:28 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B62431A0995 for ; Sat, 17 Dec 2022 09:46:28 +0000 (UTC) X-FDA: 80251318056.22.5A4581A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf12.hostedemail.com (Postfix) with ESMTP id 2C33140003 for ; Sat, 17 Dec 2022 09:46:27 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=DpsfzZtU; spf=pass (imf12.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1671270387; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=GntWWxKRpPWeMm1mhv68BBTf942P1DbZlrM3OVZ+Drk=; b=3FD2cqhyqcPHWiR0/mOgNBGZx2gXxeEM+8D8SAKEDoGCzbUqr4XewKaDkBTf3QtoFMYKjv GmKcEpnyxiAUbBbcKqwPFM4OMGcnLdYnHrhP1L7VDnOj3+LxrPQG83pm8E2ujqQRBN0dx+ TndyiBvVOR7h1syn+UBl5ZNaMqYWm0s= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=DpsfzZtU; spf=pass (imf12.hostedemail.com: domain of bhe@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1671270387; a=rsa-sha256; cv=none; b=yKb/DAWRT7gLUEbJsis+bRvMjmmsCUf63U9ylWvJPo1s6wm4iV+w44Xbo2QQcUonuifaDy yk/pRPru646fjok7sfk6M4hMwyuM8hSBDNzGNhI8gRLTgBql41N81RikPlKQLGSDpMCQ/g 3wQwEkDSsfWw2v1K0GGqUR1TFsAESRg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671270386; 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=DpsfzZtUcg+8Hjn6AyRmLjQerdYHdhxHgniSZqSk3qUvpjRnAe2gL081CE53MXPtDGyoQA GVHR7a38m10ECpvlSi8VSq3sQ3eZqkwu/HtUWSpe5WNLlfBY8ZYjUODjekgGNh48mCvgIm BizEAVzoKZbmniLB9xX7kv2SsyIgQqM= 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-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 2C33140003 X-Rspam-User: X-Stat-Signature: 4dyqhoy5cppb5hh9qu1euhf51nxu1t88 X-HE-Tag: 1671270387-644277 X-HE-Meta: U2FsdGVkX1/7wzJ+7G8WXv7nNop1g39bY94iaY8kD7ch351Zm5dHAIW0GM3p7ikJIVJuJ8J/hKeoTo89HWiNCKcrluO6xqD0eluOqeCadteLMuK4z8naKjUmzVyCC8mNJJgMC693UbOVjCYqqHn0nRRTy78W08mBK9AS5Hnhu4911MLeT/1lHMRdcff9PZRw0uyYFbv+Ol39JDIcCJL7culPL8dPYoH+t3MxG+/mbxBmR1nm2M8hBkIPTDQP8pu4gzsF0BOaEsjKM6rcqABFkYIHHzRCOpojIQGoPHAW4tHmBEkT494F60GJF+zJCyl5eTHT+rPv0uoyNifyxYv+Hkzs/XguofAVliOtQE6OnENVREBQhutbSuJQPCkYgPd0q9TUFkwVjtC8x3skXBQiX7VMpKJP3fqkeBXAa8ErtJ3eYUyRZ529gCgcSWgS49tVozhfyXS2sHn+50sub31qjnAsMNF9kgW5+95N4DwjKbqKPYaBtAORyMsoGJRcJuFa6tF6WtwqLVRc1CEisHxw0to1mmwckWQgG7yf74b+oUNlA8lw8hDfTAoFuJFCNJND+CQMy5U7REg9ktV50LcwIALwWuz/zgARjARoHyVNkxakU2X3DWcuIq9q9b697MGhcK495Li273T4E6K6R9CrbbA2XL7n1Sa/aZGLXqN6fDZ8W8vjvuYtnpNzQXFjkFJ6P5Bhxpg9Y15t3tOQNYpqAP3hPcsDAGPbKvJq9hOgYP/vH9RgMjjBSo7k2MY8nswSaHbcJo8u2tMQJvjeLYjl/4XeYzsZoL0MO5g+AWp4i6S0DE1bZ39Bxo1c5u9JxkkMJNIUpHYuQUCYz0/PGvgALPU86dczF/67kYygGtkdOnEUkq+DIFU7WvMHRFDTdTnA3g9v1l4hE1HgJO6vicuYM6J5Js1o1ujUKVt7CLYnUdsxeuf/T32R0RxAFV1DL+2l0RRmLqQ0VRqoocL0phB vDw== 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: 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);