From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C293A22F01 for ; Wed, 26 Mar 2025 10:59:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742986742; cv=none; b=EDEzVnX/RXfif90mDjuz72AdAmNM1DxUgOs7ytCoC4lW7kewEwi/MgmcWyamTHWeyWoulfXh6Wp5jkuUbRE/o4D/88f5/9Oy1sZG9kXu4NJtkskpqxuAHUU98NWMwa+zOiSx4E6UL6rYRBWP5Bh6YPXixPp1rbASKWocDTpjCMI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742986742; c=relaxed/simple; bh=Ocui/tHPBO7JZAvTqkTFS6zAtewqIGiaTZKQmfTwCG0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ek6781cVo1WqqiXm+159SoD8gnnwikkTRllvtS85Jp5Ns/tKooOdkcvpqaNl7FsTzHj5BwreTSuasEmudFh188jY1Tvizf+rmyUliujElpSDOYB35Hx/DA0JCyPcM5V6Me+Cxaxe7cFxeA2nbtXiO4rWqGI426EGpqFJ2lrNVwE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k6/ZrvzU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="k6/ZrvzU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C0D2C4CEEA; Wed, 26 Mar 2025 10:59:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742986742; bh=Ocui/tHPBO7JZAvTqkTFS6zAtewqIGiaTZKQmfTwCG0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k6/ZrvzUlfcZW0Oj72eD/f/E0oHuwGfiGfXfgHd9UivF3IPU/RivAhApWTMMnFZ+q KdM0oh+gFC17TVF6o3U1Qbb+6+DSx0VL5E0lVB3t0EYOGRE3SVYJq+NBZyC3GU+zma KHW6YAF7vLupopLdUBEmLt8jlzRDeaLICdop2NxtXUpRs5fXmkIbwszqVfeBi2e4ep KLiDlhpEVAArMwe+OXBesYbHFN2FdcLiRI3eht1qCMsm5NSUmKInkU7+iMxlryThAQ BfauVdq38lrIn6FEwxeXyi1SuupL+U4MbBmAw87SncojVpiHAPqrbyCfItRIdh+1Uf YCTiB+HE4QTbg== Date: Wed, 26 Mar 2025 12:58:54 +0200 From: Leon Romanovsky To: Jason Gunthorpe Cc: Shay Drory , linux-rdma@vger.kernel.org Subject: Re: [PATCH rdma-next] RDMA/core: Silence oversized kvmalloc() warning Message-ID: <20250326105854.GB4558@unreal> References: <20250319172349.GM9311@nvidia.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250319172349.GM9311@nvidia.com> On Wed, Mar 19, 2025 at 02:23:49PM -0300, Jason Gunthorpe wrote: > On Wed, Mar 19, 2025 at 02:42:21PM +0200, Leon Romanovsky wrote: > > From: Shay Drory > > > > syzkaller triggered an oversized kvmalloc() warning. > > Silence it by adding __GFP_NOWARN. > > I don't think GFP_NOWARN is the right thing.. > > We've hit this before and I think we ended up adding a size limit > check prior to the kvmalloc to prevent the overflow triggered warning. The size check was needed before this commit was merged: 0708a0afe291 ("mm: Consider __GFP_NOWARN flag for oversized kvmalloc() calls") >From that point, the correct solution is simply provide __GFP_NOWARN flag. Thanks > > Jason >