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 4D94AC19F2B for ; Thu, 28 Jul 2022 15:10:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbiG1PKO (ORCPT ); Thu, 28 Jul 2022 11:10:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230143AbiG1PKN (ORCPT ); Thu, 28 Jul 2022 11:10:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 786D6F02; Thu, 28 Jul 2022 08:10:11 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 1EABAB8247E; Thu, 28 Jul 2022 15:10:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 504D5C433D6; Thu, 28 Jul 2022 15:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1659021008; bh=l0bE4KitRMr4TS8LjYN+oqMjkbk1ANtyRmk5pvk0GEY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cANvheKnSwNeSdnN6ZjkQoN0h+IrxefvySkStaNLzzF1OrvK75HhIN6ObMIHzy7oW Hg+8NSfUfgqiVrbY8zBL+VelIhGsB1a0nq/D8O4kvqBHAmeAIndgq/sjYtha6l3et6 7nOnhN9KSxtwk+76yU4VKLoarUxSon3uFS4WB3Hc= Date: Thu, 28 Jul 2022 17:10:06 +0200 From: Greg KH To: Benjamin Tissoires Cc: Jiri Kosina , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , Kumar Kartikeya Dwivedi , John Fastabend , KP Singh , Shuah Khan , Dave Marchevsky , Joe Stringer , Jonathan Corbet , Tero Kristo , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH bpf-next v7 15/24] HID: bpf: allocate data memory for device_event BPF programs Message-ID: References: <20220721153625.1282007-1-benjamin.tissoires@redhat.com> <20220721153625.1282007-16-benjamin.tissoires@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220721153625.1282007-16-benjamin.tissoires@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Thu, Jul 21, 2022 at 05:36:16PM +0200, Benjamin Tissoires wrote: > We need to also be able to change the size of the report. > Reducing it is easy, because we already have the incoming buffer that is > big enough, but extending it is harder. > > Pre-allocate a buffer that is big enough to handle all reports of the > device, and use that as the primary buffer for BPF programs. > To be able to change the size of the buffer, we change the device_event > API and request it to return the size of the buffer. > > Signed-off-by: Benjamin Tissoires Reviewed-by: Greg Kroah-Hartman