Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1510064lqa; Mon, 29 Apr 2024 10:22:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXs7NLqM075WNOrnvGztePNgYf9qG/Q43U99ZDIW71wGkxpC8r+vSXXXIeP2YNr8IWdVobF/d0hTolwy5KRPtYC0NSNYy8Ji4xymH4TZw== X-Google-Smtp-Source: AGHT+IETd1Twhv900slWllxepwfdJsoRVZL5oGooAb2FPPCaj/koFrFD3p4ZwMbRr5scZCKr+aJt X-Received: by 2002:a05:6a00:2312:b0:6ed:2f2:a8e with SMTP id h18-20020a056a00231200b006ed02f20a8emr178309pfh.30.1714411377883; Mon, 29 Apr 2024 10:22:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714411377; cv=pass; d=google.com; s=arc-20160816; b=IXA3YmQ76LglF3bmMWcbmlRWvm1986EOzPSkvFm7KIE7OG5FQCrLVCOMe0EjgpmV0t kjoIcVSqnrtzZgTSbYMh6ufwPu8vT1Xq7xc/szgJyN9jz85bWr33AJPIkouOOlyUxlnb zPsgD4xctJiySc8kdFjA7Xm7oW4R24mfdkTKc3udGzi59rTckkR5i80grty7SaPhdb/J ypMJs8PEy8U0XH3uZiK8OxHMvOmAhzvMgdU/3MbZ9NQfyIUJ0Ts9R4w2B1gN1Hgf1K9O tnSD8R65lNMPmKXH/dsi9dXC6h6qE1RlQUvlzVzCNkPdQ2mR8V5zQjb/VbyWMaxOOWHx mVyA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=MAZjE9XDcoq2UoyMSHQ5O/M24trUzg61i7joGuCUb/U=; fh=TXvgM/tYdLBoSzA6ZbBlQWhAASwteBU3bqXpr3Js4Kc=; b=pLweTPbIup6PRHOvLbHr7FBmL9AcBmCdYHmYIA9YTd/hYDnuGeA3br/jxdxj3iQ06A n1JygGLsXjUFUpNMGxUetiDpu9vE7AUs6nKraVaRbqLD3nxlUMgu6gu8l+h90Txim6BY nQPS9bTVJeJNTbuXW8M0AD0ySwcaVu+mU1CMfXEsTRxR+BwAFoQ1znNIJs7nIcX/UJVk h5gnN9RsgTi8qX1EVz/uboMcht7/YQvEt6/fPPj5cSo1d5Fbum7njCpuO8gfp62H31pm Tb3oeSdmRV4Ug6aOAJouovcmLwt12huf7UAVp9QC2ipVLO26P8oHOUsgWErXLLpuxmMz i9MQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=xce7v5aP; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-162734-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162734-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s9-20020a632c09000000b005feaae370fdsi14665781pgs.108.2024.04.29.10.22.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 10:22:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162734-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=xce7v5aP; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-162734-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162734-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 15A75B22899 for ; Mon, 29 Apr 2024 17:15:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8EA386642; Mon, 29 Apr 2024 17:14:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="xce7v5aP" Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (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 6CBB385C41 for ; Mon, 29 Apr 2024 17:14:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714410893; cv=none; b=OMnTVs6YW+7+aXFzl7yS0xorSE2aMrW/RtEGErXaSeWKP2vpl9yrmH98sWJo+mPd2zDc44HRuEXiF9qVV5LdmW3+mnMX58fBO68kwXBBM2wqUBHUzjHcQ9HylNR0V3nJeAgKt4ajN+5++yMi440RMglLdPHQWjl6eHYaNDfbspk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714410893; c=relaxed/simple; bh=MAZjE9XDcoq2UoyMSHQ5O/M24trUzg61i7joGuCUb/U=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=idqu0E0TwEvGS0jGTCAn92iv0jk3xbhO24/7xwZooVMMHGv+erCJ5/huXLs4Ay+g/LqTfQeJSrb+guC2baiG5gGkDxsQ+p34FGt0+MzLBk/lq9xwceS8mtYU5xB8CdJtj/ZaStskwhwqBdgPjcyHh2y2JGwFcCZMMPAATt0rnGo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=xce7v5aP; arc=none smtp.client-ip=91.218.175.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: <2e7e6d53-38a2-464a-ac6e-10d87184897c@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714410889; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MAZjE9XDcoq2UoyMSHQ5O/M24trUzg61i7joGuCUb/U=; b=xce7v5aPOGLFts1xBsTlM1YOtUPfiHGRHD6r9XSA9cxB+Hrkky1FRb1QWduHc7sjNqEOgC NNlmqkFp3pr6T3O+4vwOZG1Bat4tGvvWyBii3rOqeEACkHAdUUbJurHh5Vz+jL3zvSAPOc B2VyQN2V+gM1YGhS7+RCTpVbBGtSV9s= Date: Mon, 29 Apr 2024 10:14:43 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v1 1/1] bpf: Switch to krealloc_array() Content-Language: en-GB To: Andy Shevchenko , Alexei Starovoitov , bpf@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa References: <20240429120005.3539116-1-andriy.shevchenko@linux.intel.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yonghong Song In-Reply-To: <20240429120005.3539116-1-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 4/29/24 5:00 AM, Andy Shevchenko wrote: > Let the krealloc_array() copy the original data and > check for a multiplication overflow. > > Signed-off-by: Andy Shevchenko Acked-by: Yonghong Song