Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2335405rdb; Tue, 10 Oct 2023 00:09:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGdoVmv7eqypJqCF3v6cdfvfZjEh7j6uEXZy68QVZdVkQBmIAPx1jvvIg4UOHqw3GoYb69 X-Received: by 2002:a05:6358:63aa:b0:143:864e:f96f with SMTP id k42-20020a05635863aa00b00143864ef96fmr19224667rwh.1.1696921740450; Tue, 10 Oct 2023 00:09:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696921740; cv=none; d=google.com; s=arc-20160816; b=mkxCwTqExyKcskOzZbJ+fd44S2P5wqgMGkxztorfb5+2NRpcUcrrgmErorFC89ovKa qhjzNX+ZCeTwjdsdgjguaElYPqpxAB30AbWz1K32VGUyaYBKEZHYeaSKvHVW0Jg33XTy fZrusqxuurRfwakE04ADAEgbgCGJ4OK8IU3/d/et0ye7qSjvQx1Z3EZgjp4LDzVrXV9a mJ5yL40isLls5BESoHZ3YWfYOMaNr9f9fu0Gy5gbDFvbscgvRnUG3ZBLaIzZglNoat/H GTNgLvD9PwnRSZn9mFERcorTpw3sZFwXTVmgfZgC7fCFhHsHvMRrT06cdf8jjCZegE33 X1Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:mime-version :dkim-signature; bh=YeqyIlvho61HfPbMrSU3EeErwNBNPMJPgY5XJ95ZVZE=; fh=CydSKgSLs+Miyx/01Q4/ooWl91ZWfQQhM0C9cAN135I=; b=jLQ2uwALM/Jrwg1S4DeWIEzNrloqSVzzJEATDPIUzC7BzIZ/CvwTmMhmy9fO5FZdfy SZ5tdX70lAa9bb4C+KKnqzRd1KPWQwlcPUdBKYhAMyDWQnHkYPVv+Kr3i6LCpnhcdjq4 Yxgs7ByNC73GWNVrKi9Mzp6y3oJtO2zNyNaP8KE1jbQwbRLTqRwUgpsjxsfeb8fZoPni PsPgjDK976Ig+5fPhux0YzbpC6+IgdTdbfVxM2CM3NkGYYajUCQbWynNS7HsQtltucAT uAsnp1I1CLGh2QDosm3z7Ypld5oCgZJd/YGQnV72IHn2QrU5+4hb8qYxif+WTH36uFZ9 X+Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UtyXdDpO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id s17-20020a632c11000000b0056357813fc2si11158746pgs.183.2023.10.10.00.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 00:09:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=UtyXdDpO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 8FE458024AE9; Tue, 10 Oct 2023 00:08:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442392AbjJJHIm (ORCPT + 99 others); Tue, 10 Oct 2023 03:08:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379429AbjJJHIl (ORCPT ); Tue, 10 Oct 2023 03:08:41 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1B8BBA; Tue, 10 Oct 2023 00:08:39 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-d81f079fe73so6183148276.3; Tue, 10 Oct 2023 00:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696921719; x=1697526519; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=YeqyIlvho61HfPbMrSU3EeErwNBNPMJPgY5XJ95ZVZE=; b=UtyXdDpO4OD9Ij3vNND0q46ob7+JnIf+64v65gNb2XiFACfSD1xV8ksj+KOQX5GMyi XqwtT10Fp52IcMF3UuOMFM29zFlG/CIVjqvop3bgFmTAKia5Qh8E7VSSQncWT83jeBa3 kLH0qhcqTwqip3SPa0Kt5DnBJ1wW+gh0R6BjfJpnKjy9EgP9FUc4VOQSa6gOnpNHEC6q duyfyPXald5hf+OXZu/5iu81eNTarF1mXzCmxDJlGtDvQYEPS23/4thAGaf3iGKgsLPS 8dctiu6OeWvKhsfZEj2/RppnT5CbA5rnl3oPM+O+5JzVdPiPzZfWlrPaG2xxVsAl5KRb y3qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696921719; x=1697526519; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YeqyIlvho61HfPbMrSU3EeErwNBNPMJPgY5XJ95ZVZE=; b=XfG+zXNeOkfMTm4R4xK2sjKmcSQIikfT1aLwNbegIOgmZ0KYS49GihrZch03BC42mA p24F6AR+iH0qxU5a51XUfrCA6fMeJ/T4VwdihFNv8J+h0LL3K5dwmf4hdMgH+Uccclyt 9Ij/vSyzJ4AAyT4ix03OwFtfHUdyaVvv4lM7ikhsTqxHiRzVw92BL5ZzfVbUZAB5CRDW GCsWTLywf/5XIx4uXfv5iLHm6KUqNcqGpEZ7gVRPCXpP2zXu2VHazqIqdvNzS8ZB/vRX bIRg9X/6EjBX/ShON7u/7h2zMPtboSuyUO85Xdg+yhZtClQ6+CijO1gda+5C1fFdnXxA jP7Q== X-Gm-Message-State: AOJu0Yxm49qz9fDUK8DoObZVVymrELU6gyVbFAucS1o4VTZbN/K2qcsi UsPTWra04to7aPGD8dCip1QYZPrcTEzTpg5SiEyAW/Daq6M= X-Received: by 2002:a5b:ac5:0:b0:d11:2a52:3f35 with SMTP id a5-20020a5b0ac5000000b00d112a523f35mr15121360ybr.20.1696921718946; Tue, 10 Oct 2023 00:08:38 -0700 (PDT) MIME-Version: 1.0 From: John Salamon Date: Tue, 10 Oct 2023 17:38:27 +1030 Message-ID: Subject: uinput: waiting for UI_FF_UPLOAD events will not inform user when allocation is required To: dmitry.torokhov@gmail.com, rydberg@bitmath.org Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 10 Oct 2023 00:08:57 -0700 (PDT) X-Spam-Level: ** Currently the "fake" input events generated by uinput in response to effect uploads will return an effect with an id that has already been handled by input_ff_upload in ff-core.c, which can modify the effect id. This causes a problem specifically when the effect originally uploaded via the EVIOCSFF ioctl contained an effect with -1, as the userspace code handling UI_FF_UPLOAD receives an effect with an id other than -1, and therefore will not know an allocation was requested. I notice that the "old" field on the ff_effect struct is set to NULL when the -1 id is changed (in input_ff_upload), which can serve as a flag that an allocation was requested. If it is the intention is that uinput users check if old == NULL to know when allocations are needed I think uinput documentation should describe this. I first noticed this using python-evdev, see my issue report here: https://github.com/gvalkov/python-evdev/issues/199