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 AADACC433EF for ; Thu, 3 Mar 2022 15:30:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233635AbiCCPa6 (ORCPT ); Thu, 3 Mar 2022 10:30:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230495AbiCCPa5 (ORCPT ); Thu, 3 Mar 2022 10:30:57 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E53F12B762; Thu, 3 Mar 2022 07:30:11 -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 20D1161CFA; Thu, 3 Mar 2022 15:30:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 82D9AC340E9; Thu, 3 Mar 2022 15:30:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646321410; bh=TFHKdErn1efAgOUxyCbqHz8lzGpyNnKB0ee+1jr3Md0=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=ruNht79vN9e5Zyc5IuCVo3+CSFqgbPJGJrcGCBz5guUbgh/7WMLPrKEsxQM7uL8XH r3d+JhScyu9/AUU6B6lCa4fSxAK+M6/T916l0J7ASJMIPuWZNAWROB6lVDg/mSMPcf RW9obuz/yzKXdWhOa8G512YyKBWMwkyz8aExtTlt7QKM0Osc4v2iJfj0T55M+VRCv5 cSeL9ss+S3U+v/6G2R4AyEklnHLjkka3XqKk7D2giXB/ePwJW5Qeb1x7gj+dG6F1JQ M3S1wcpgikjpsQdpdLh9i3/uZ/6YDrgk9nByo3qh7Oe4d6FOj9xIyFqBH4F9s5dP3/ 08sdxxHBrxtDw== 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 5EBE7E5D087; Thu, 3 Mar 2022 15:30:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH bpf-next v2] libbpf: Add a check to ensure that page_cnt is non-zero From: patchwork-bot+netdevbpf@kernel.org Message-Id: <164632141038.18423.8019591299586086867.git-patchwork-notify@kernel.org> Date: Thu, 03 Mar 2022 15:30:10 +0000 References: <20220303005921.53436-1-ytcoode@gmail.com> In-Reply-To: <20220303005921.53436-1-ytcoode@gmail.com> To: Yuntao Wang Cc: andrii.nakryiko@gmail.com, andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, kafai@fb.com, kpsingh@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, songliubraving@fb.com, yhs@fb.com Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Hello: This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann : On Thu, 3 Mar 2022 08:59:21 +0800 you wrote: > The page_cnt parameter is used to specify the number of memory pages > allocated for each per-CPU buffer, it must be non-zero and a power of 2. > > Currently, the __perf_buffer__new() function attempts to validate that > the page_cnt is a power of 2 but forgets checking for the case where > page_cnt is zero, we can fix it by replacing 'page_cnt & (page_cnt - 1)' > with 'page_cnt == 0 || (page_cnt & (page_cnt - 1))'. > > [...] Here is the summary with links: - [bpf-next,v2] libbpf: Add a check to ensure that page_cnt is non-zero https://git.kernel.org/bpf/bpf-next/c/41332d6e3a43 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html