Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6664120rwb; Wed, 18 Jan 2023 07:58:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXsaJFuqei3PT68xsblPPTVXM9Y75uTgXqyySMyo1vHWq/Gnv5aSvHflJBz4Cy9wzq4CgN3u X-Received: by 2002:a17:906:7750:b0:7c1:52c:a960 with SMTP id o16-20020a170906775000b007c1052ca960mr3175572ejn.8.1674057512817; Wed, 18 Jan 2023 07:58:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674057512; cv=none; d=google.com; s=arc-20160816; b=HBvEua1E2AoNfXu8HBgkMB3+mUdH9CmU5C6W87jJe49yRZ9To3Jn8/UySPmoe+StmV 7fyslNOl8qzpnHOYk28APs2Q/ybbxP9xVdHtUULw7TtxqFsIbOqfC4ABmbGGxhciG3gr wUDpoJYaOu6BbZ6ASdrvVzxZA6PgUKq79MOLVciYo0DPJhIgSYXazGjZB71XkPyzKrWr gS/nxaMskrciLnGDLM2prugtS8SXRFYU6ec41TizDj0YICjDtNHIcLyUvBik0dxnD5cv chMddoypb3t1E7I7lJlyHQ9nd916xeUhifozX0HSxlRz6hFGUAq8EhCh3oR7Q/0FkeBf 0t7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8ngYZDIgtA4j0jraUz+rdiB/78vez2P07tDu4EF5NHY=; b=UksgROO5dESn1LUlEf4o9xxpMF0OAu7KRFsu6niHmVQT1cr4+MA5z2nn8i9k8sw2aH zO+dwf1qg8Wg3QXIrXUhtdPmo3XOwMHa0HGnjaGmImnKEtYduvgd6oDwhYPDc7LqAExp fU+OtKgzwCLw4dHJESi+FaMWla0y08D0XQnCxg4DPsB790tAUBx6OOGzF6IIPxrH0BDl LSdkFcVOPA5uQ4pqB14X6vb6trzqw46v3rezUUfEvrlIFWr1bjttkTZ7ueCQH/xg0L8S jgPhl7USogc7xxfgs9+k80B5nd6tzMciK5+KG7+N6P52qdYYO8XcGNYCgIngiNXV5a4L 1JVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bg6UDs8j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc41-20020a17090716a900b0084cdfa2621asi38441569ejc.456.2023.01.18.07.58.21; Wed, 18 Jan 2023 07:58:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bg6UDs8j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231370AbjARPQq (ORCPT + 45 others); Wed, 18 Jan 2023 10:16:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232020AbjARPPr (ORCPT ); Wed, 18 Jan 2023 10:15:47 -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 5E9E34AA6B; Wed, 18 Jan 2023 07:11:20 -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 6BC9561882; Wed, 18 Jan 2023 15:11:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 485B7C433EF; Wed, 18 Jan 2023 15:11:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674054679; bh=sCr67gWivJseBF45jgOCyYIoZmtdfEOxspjP2kKsFN8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Bg6UDs8jtgE5JPen7pxURdeNdaiDy8g9RB2czgHGlm9tLQ5UgYmmHm3DyKtwYqxqx YZ+aXKioVXtG1BpFYS83XKQiMwckISE4pkyAIXg8vfFjJumLsLwLBuZxa1vQnFtIJb kJo3wDacC3/cq1EUcaaQYEehBvne/ZiUD4+X+jBteqgnadYJQ4LSqqlPiGA9T/1MLb XhfextH7IoYJ5ovfb5xV4f5hmZUIkDcdf0zNWNb2y2ZfmkjqL6zzHvswYsLzMCi/vr DftT+0cOmxbtprdjejXNTBcYzjpobxVuCGDo40w0GestkCU88OqT6RGjOijbElqfTK Nsy1oR68xhTOA== Date: Wed, 18 Jan 2023 15:11:14 +0000 From: Lee Jones To: Jiri Kosina Cc: benjamin.tissoires@redhat.com, avid.rheinsberg@gmail.com, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: Re: [PATCH 1/2] HID: core: Provide new max_buffer_size attribute to over-ride the default Message-ID: References: <20230113150557.1308176-1-lee@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Jan 2023, Jiri Kosina wrote: > On Wed, 18 Jan 2023, Lee Jones wrote: > > > > > Presently, when a report is processed, its size is compared solely > > > > against the value specified by user-space. > > > > > > While I am generally fine with the idea, I don't understand this sentence. > > > What exactly do you mean by 'specified by user-space'? It's defined as a > > > compile-time constant. > > > > > > > If the received report ends up being smaller than this, the > > > > remainder of the buffer is zeroed. > > > > Apologies for any ambiguity. > > > > "its size" == "compile-time constant" > > > > Would "its maximum size" read better? > > I think that the confusion comes from the fact that the changelog is > written solely with the UHID usercase on mind ... ? (which is dealt with > in the independent followup patch). Quite possibly, yes. Since this is the way the bug was reported to me and how I presently view it. However, I suppose reports do not always originate from user-space. Good point. How would you like me to move forward? Would you like me to re-write the commit log to be more generic? -- Lee Jones [李琼斯]