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 89AD5C433F5 for ; Thu, 2 Dec 2021 04:29:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F3FA46B0072; Wed, 1 Dec 2021 23:29:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EEF306B0073; Wed, 1 Dec 2021 23:29:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DDD8C6B0074; Wed, 1 Dec 2021 23:29:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0043.hostedemail.com [216.40.44.43]) by kanga.kvack.org (Postfix) with ESMTP id CDAC26B0072 for ; Wed, 1 Dec 2021 23:29:21 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 85D2918038CDF for ; Thu, 2 Dec 2021 04:29:11 +0000 (UTC) X-FDA: 78871574502.21.28FAA23 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf17.hostedemail.com (Postfix) with ESMTP id 0D580F0001CB for ; Thu, 2 Dec 2021 04:29:10 +0000 (UTC) Received: from mail.kernel.org (unknown [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 469D5B8221A; Thu, 2 Dec 2021 04:29:09 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 3531D60E0B; Thu, 2 Dec 2021 04:29:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1638419347; bh=/Avwtz+hyAMoKucKqNis+tKLK0MEdhOVdr1B0uiyAy0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Aea2wso8gFOcCnWcSUUXbz2cdA9ahhoAHGkCMgws6l3vbOedtiIRehS9E8VAcUAhZ zJQ2WHZLwTKSR6G6dVSEgjv8d6yhjzJc9ZPHU58JYEVulTwO5eK9XY3C6qpHSBmZgP ln3T9NVPm+VvUhKlhyvG6A0QWqhU734VXMGTKAME= Date: Wed, 1 Dec 2021 20:29:05 -0800 From: Andrew Morton To: Bixuan Cui Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, leon@kernel.org, w@1wt.eu, keescook@chromium.org, bpf@vger.kernel.org, netdev@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , Jakub Kicinski , kvm@vger.kernel.org, netfilter-devel@vger.kernel.org Subject: Re: [PATCH -next] mm: delete oversized WARN_ON() in kvmalloc() calls Message-Id: <20211201202905.b9892171e3f5b9a60f9da251@linux-foundation.org> In-Reply-To: <10cb0382-012b-5012-b664-c29461ce4de8@linux.alibaba.com> References: <1638410784-48646-1-git-send-email-cuibixuan@linux.alibaba.com> <20211201192643.ecb0586e0d53bf8454c93669@linux-foundation.org> <10cb0382-012b-5012-b664-c29461ce4de8@linux.alibaba.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 0D580F0001CB X-Stat-Signature: pcg1rd6isa1bmo4ix7rtagx5djbycpjp Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=Aea2wso8; spf=pass (imf17.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-HE-Tag: 1638419350-121324 Content-Transfer-Encoding: quoted-printable 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 Thu, 2 Dec 2021 12:05:15 +0800 Bixuan Cui wrote: >=20 > =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 paramete= r > >> 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() ca= lls > >> recently. Maybe these warnings are not very necessary. > > Or maybe they are. Please let's take a look at these warnings, one a= t > > 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 Thanks, that's helpful. Let's bring all these to the attention of the relevant developers. If the consensus is "the code's fine, the warning is bogus" then let's consider retiring the warning. If the consensus is otherwise then hopefully they will fix their stuff! > https://syzkaller.appspot.com/bug?id=3D24452f89446639c901ac07379ccc7028= 08471e8e (cc bpf@vger.kernel.org) > https://syzkaller.appspot.com/bug?id=3Df7c5a86e747f9b7ce333e7295875cd4e= de2c7a0d (cc netdev@vger.kernel.org, maintainers) > https://syzkaller.appspot.com/bug?id=3D8f306f3db150657a1f6bbe1927467084= 531602c7 (cc kvm@vger.kernel.org) > https://syzkaller.appspot.com/bug?id=3D6f30adb592d476978777a1125d1f680e= dfc23e00 (cc netfilter-devel@vger.kernel.org) > https://syzkaller.appspot.com/bug?id=3D4c9ab8c7d0f8b551950db06559dc9cde= 4119ac83 (bpf again).