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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 144FDC433F5 for ; Fri, 11 Feb 2022 13:00:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239825AbiBKNAg (ORCPT ); Fri, 11 Feb 2022 08:00:36 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:38566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236101AbiBKNAg (ORCPT ); Fri, 11 Feb 2022 08:00:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46BD3F05 for ; Fri, 11 Feb 2022 05:00:35 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E084661E3D for ; Fri, 11 Feb 2022 13:00:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 404ADC340F0; Fri, 11 Feb 2022 13:00:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644584434; bh=eCJZszj5g1ohKaYCAu7VNjIHBMNPF8zX5uhhguRxhWw=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=VJU4a4QwMXPf349BiEpEpfrVWwP371rcaavimgCIkFMJeORPe3w6bqHRguQuykddv Zvv8AxDKIqh1xC/6qvakbZJQ1sa1kVzekBpWRGMPsv7gxsbcsiYGZK+XVanFb5v4hs kJVa6vFokfDnxxv0iSeX0olE8tPuRXMMZ6FzadxezPAwvF+YYK1GjxZFHq7Sh0bkNv yQro+gX9yKPUG3gAeStbR9weZn1xZhIDrOUm6zco4PAnYfTK5EG3s3/EsOAXzmqrS0 ebaCEnzQaWSWh9vgYhxpF/G9/8sDxF8s47fXOs90t+CBO12LcXAXSj09jrIJe0glJQ 1OhUwPsm853jw== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id 1E80DE6BBCA; Fri, 11 Feb 2022 13:00:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH bpf-next v2] bpf: Do not try bpf_msg_push_data with len 0 From: patchwork-bot+netdevbpf@kernel.org Message-Id: <164458443411.16961.10103501274518019457.git-patchwork-notify@kernel.org> Date: Fri, 11 Feb 2022 13:00:34 +0000 References: In-Reply-To: To: Felix Maurer Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Hello: This patch was applied to bpf/bpf.git (master) by Daniel Borkmann : On Wed, 9 Feb 2022 16:55:26 +0100 you wrote: > If bpf_msg_push_data is called with len 0 (as it happens during > selftests/bpf/test_sockmap), we do not need to do anything and can > return early. > > Calling bpf_msg_push_data with len 0 previously lead to a wrong ENOMEM > error: we later called get_order(copy + len); if len was 0, copy + len > was also often 0 and get_order returned some undefined value (at the > moment 52). alloc_pages caught that and failed, but then > bpf_msg_push_data returned ENOMEM. This was wrong because we are most > probably not out of memory and actually do not need any additional > memory. > > [...] Here is the summary with links: - [bpf-next,v2] bpf: Do not try bpf_msg_push_data with len 0 https://git.kernel.org/bpf/bpf/c/4a11678f6838 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html