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 67953C4332F for ; Fri, 3 Dec 2021 19:37:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BC8D86B0074; Fri, 3 Dec 2021 14:37:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B77A56B0078; Fri, 3 Dec 2021 14:37:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3FBF6B0080; Fri, 3 Dec 2021 14:37:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0237.hostedemail.com [216.40.44.237]) by kanga.kvack.org (Postfix) with ESMTP id 90A016B0074 for ; Fri, 3 Dec 2021 14:37:43 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 57F338956F for ; Fri, 3 Dec 2021 19:37:33 +0000 (UTC) X-FDA: 78877492386.06.F3BA554 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by imf15.hostedemail.com (Postfix) with ESMTP id E9C47D000081 for ; Fri, 3 Dec 2021 19:37:32 +0000 (UTC) Received: by mail-pf1-f178.google.com with SMTP id n26so3830915pff.3 for ; Fri, 03 Dec 2021 11:37:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=LWKe71eoAeBHksA0Q7+Vwnu16+B3Z32gMf+kM6ZvOQ4=; b=nD8yc5lBfABo04YgzouuSTSYpFiXY5AXCEKXm98aIJamKZ/bx+whO0RKathBGqpWPa Vr4JjT5d+4Yr6DSJiKlhkLCarMfCipVAfazjgIn3IExbUgmrWRkw/9u8so3k1BNiEINl 4fhpJUG4ukx5itGDbEj5HYbViqZ9ELm3/ePQ+67QqNDlfQdZOUhGrx4OSB8CaEGVQTbQ vv62qK2P4DkWqGKIa4V/qGamKp4AQttdKRwrfHp7lcBlVvOOa1uKg2lPc5ZWXSHuJYnI dlMZopzr56H2Amo4Qx/1aiHNpjN0VbcsIBTaIpWAjP91SPytsl+jmqZSgq7rO7dzUxDF 23dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=LWKe71eoAeBHksA0Q7+Vwnu16+B3Z32gMf+kM6ZvOQ4=; b=XWRleJCFwHEfeE5ih0MDqtwh9W/yGUC4dt6VdW2G0UJCm2sWPFIQTz3yF43zaZjuoA ra/gMPBNG/UCJIkC4jN5RzLdKbGApPw7RD6O91oAzTZB1/zIADXf3n0qhH/WWKWCQX7B xVqaoTyuhQ+Ed6WkRKfQSEfwDQYX37YVMLbRqSgn6mHQPUEFIaKIJFsXC/ov7gQ1c+vl xf1pVu5NV5wVWV1rPVpqiEm2uPcLTpbAgPmzzL6t9EA/E4RHgEibqg+4JPbl8W0XHVYy Xv3acQmWMAsKPpcCKxK1hBvFhKP/uo/i86SotI9Xkvq3ftauJ3b3vAHX/fjMPXeQFh1M I81g== X-Gm-Message-State: AOAM5320Tvww7kak73I3w72JhQdzUDIqdVCLBkhOaph/Mze75GLXV8/j PylTUtLIs/hsNK+nJwzfk3mrnQ== X-Google-Smtp-Source: ABdhPJyp/28P9Mh6YI90nIBvHPEaeUZhE/OQ5ZC3aFwSxJFfhptKa82wUzQdyyEddkXP5V+Zt6s46A== X-Received: by 2002:a05:6a00:1348:b0:481:179c:ce9b with SMTP id k8-20020a056a00134800b00481179cce9bmr20825495pfu.27.1638560251726; Fri, 03 Dec 2021 11:37:31 -0800 (PST) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id lp12sm3017627pjb.24.2021.12.03.11.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 11:37:31 -0800 (PST) Date: Fri, 3 Dec 2021 19:37:27 +0000 From: Sean Christopherson To: Andrew Morton Cc: Bixuan Cui , 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, Paolo Bonzini Subject: Re: [PATCH -next] mm: delete oversized WARN_ON() in kvmalloc() calls Message-ID: References: <1638410784-48646-1-git-send-email-cuibixuan@linux.alibaba.com> <20211201192643.ecb0586e0d53bf8454c93669@linux-foundation.org> <10cb0382-012b-5012-b664-c29461ce4de8@linux.alibaba.com> <20211201202905.b9892171e3f5b9a60f9da251@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211201202905.b9892171e3f5b9a60f9da251@linux-foundation.org> X-Stat-Signature: inobtueyojmfcs3e6x9h67uozy35wcmb Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=nD8yc5lB; spf=pass (imf15.hostedemail.com: domain of seanjc@google.com designates 209.85.210.178 as permitted sender) smtp.mailfrom=seanjc@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: E9C47D000081 X-HE-Tag: 1638560252-8946 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: +Paolo, I'm pretty sure he's still not subscribed to the KVM mailing list= :-) On Wed, Dec 01, 2021, Andrew Morton wrote: > On Thu, 2 Dec 2021 12:05:15 +0800 Bixuan Cui wrote: >=20 > >=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 parame= ter > > >> 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() = calls > > >> 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 disab= le > > > the runtime test. But perhaps it's the case that calling code has > > > genuine issues and should be repaired. > > Such as=EF=BC=9A >=20 > Thanks, that's helpful. >=20 > Let's bring all these to the attention of the relevant developers. >=20 > If the consensus is "the code's fine, the warning is bogus" then let's > consider retiring the warning. >=20 > If the consensus is otherwise then hopefully they will fix their stuff! >=20 >=20 >=20 > > https://syzkaller.appspot.com/bug?id=3D24452f89446639c901ac07379ccc70= 2808471e8e >=20 > (cc bpf@vger.kernel.org) >=20 > > https://syzkaller.appspot.com/bug?id=3Df7c5a86e747f9b7ce333e7295875cd= 4ede2c7a0d >=20 > (cc netdev@vger.kernel.org, maintainers) >=20 > > https://syzkaller.appspot.com/bug?id=3D8f306f3db150657a1f6bbe19274670= 84531602c7 >=20 > (cc kvm@vger.kernel.org) Paolo posted patches to resolve the KVM issues, but I don't think they ev= er got applied. https://lore.kernel.org/all/20211016064302.165220-1-pbonzini@redhat.com/ https://lore.kernel.org/all/20211015165519.135670-1-pbonzini@redhat.com/