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 C622CC433F5 for ; Thu, 2 Dec 2021 04:05:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3E6D16B0072; Wed, 1 Dec 2021 23:05:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 398506B0073; Wed, 1 Dec 2021 23:05:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 285D36B0074; Wed, 1 Dec 2021 23:05:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0235.hostedemail.com [216.40.44.235]) by kanga.kvack.org (Postfix) with ESMTP id 1BB256B0072 for ; Wed, 1 Dec 2021 23:05:32 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D81368249980 for ; Thu, 2 Dec 2021 04:05:21 +0000 (UTC) X-FDA: 78871514442.12.5E374F8 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by imf29.hostedemail.com (Postfix) with ESMTP id E85439000094 for ; Thu, 2 Dec 2021 04:05:19 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=cuibixuan@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0Uz8Unc7_1638417915; Received: from 30.43.84.45(mailfrom:cuibixuan@linux.alibaba.com fp:SMTPD_---0Uz8Unc7_1638417915) by smtp.aliyun-inc.com(127.0.0.1); Thu, 02 Dec 2021 12:05:16 +0800 Content-Type: multipart/alternative; boundary="------------SYRaL284ey00iMUXJsG6cmKr" Message-ID: <10cb0382-012b-5012-b664-c29461ce4de8@linux.alibaba.com> Date: Thu, 2 Dec 2021 12:05:15 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Subject: Re: [PATCH -next] mm: delete oversized WARN_ON() in kvmalloc() calls To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, leon@kernel.org, w@1wt.eu, keescook@chromium.org References: <1638410784-48646-1-git-send-email-cuibixuan@linux.alibaba.com> <20211201192643.ecb0586e0d53bf8454c93669@linux-foundation.org> From: Bixuan Cui In-Reply-To: <20211201192643.ecb0586e0d53bf8454c93669@linux-foundation.org> X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: E85439000094 Authentication-Results: imf29.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf29.hostedemail.com: domain of cuibixuan@linux.alibaba.com designates 115.124.30.57 as permitted sender) smtp.mailfrom=cuibixuan@linux.alibaba.com X-Stat-Signature: wjontb8z6iq6i3ou3drhc9mo6hoynibx X-HE-Tag: 1638417919-991 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: This is a multi-part message in MIME format. --------------SYRaL284ey00iMUXJsG6cmKr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable =E5=9C=A8 2021/12/2 =E4=B8=8A=E5=8D=8811:26, Andrew Morton =E5=86=99=E9=81= =93: >> Delete the WARN_ON() and return NULL directly for oversized parameter >> in kvmalloc() calls. >> Also add unlikely(). >> >> Fixes: 7661809d493b ("mm: don't allow oversized kvmalloc() calls") >> Signed-off-by: Bixuan Cui >> --- >> There are a lot of oversize warnings and patches about kvmalloc() call= s >> recently. Maybe these warnings are not very necessary. > Or maybe they are. Please let's take a look at these warnings, one at > a time. If a large number of them are bogus then sure, let's disable > the runtime test. But perhaps it's the case that calling code has > genuine issues and should be repaired. Such as=EF=BC=9A https://syzkaller.appspot.com/bug?id=3D24452f89446639c901ac07379ccc702808= 471e8e https://syzkaller.appspot.com/bug?id=3Df7c5a86e747f9b7ce333e7295875cd4ede= 2c7a0d https://syzkaller.appspot.com/bug?id=3D8f306f3db150657a1f6bbe192746708453= 1602c7 https://syzkaller.appspot.com/bug?id=3D6f30adb592d476978777a1125d1f680edf= c23e00 https://syzkaller.appspot.com/bug?id=3D4c9ab8c7d0f8b551950db06559dc9cde41= 19ac83 --------------SYRaL284ey00iMUXJsG6cmKr Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


=E5=9C=A8 2021/12/2 =E4=B8=8A=E5=8D=88= 11:26, Andrew Morton =E5=86=99=E9=81=93:
Delete the WARN_ON() and r=
eturn NULL directly for oversized parameter
in kvmalloc() calls.
Also add unlikely().

Fixes: 7661809d493b ("mm: don't allow oversized kvmalloc() calls")
Signed-off-by: Bixuan Cui <cuibixuan@li=
nux.alibaba.com>
---
There are a lot of oversize warnings and patches about kvmalloc() calls
recently. Maybe these warnings are not very necessary.
Or maybe they are.  Please l=
et's take a look at these warnings, one at
a time.  If a large number of them are bogus then sure, let's disable
the runtime test.  But perhaps it's the case that calling code has
genuine issues and should be repaired.
Such as=EF=BC=9A

https://syzkall= er.appspot.com/bug?id=3D24452f89446639c901ac07379ccc702808471e8e

https://syzkall= er.appspot.com/bug?id=3Df7c5a86e747f9b7ce333e7295875cd4ede2c7a0d

https://syzkall= er.appspot.com/bug?id=3D8f306f3db150657a1f6bbe1927467084531602c7

https://syzkall= er.appspot.com/bug?id=3D6f30adb592d476978777a1125d1f680edfc23e00

https://syzkall= er.appspot.com/bug?id=3D4c9ab8c7d0f8b551950db06559dc9cde4119ac83



    
--------------SYRaL284ey00iMUXJsG6cmKr--