From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.53 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796071594; b=5JRFj2lIFunxpvSAS4LKv6bxnkuF3b74CHoECqmYNg/GSCTcivb8D9Kn6VNkFE3ASZta zJpeT+TuMnLXoA7cTogQ4Eskx/O3lo+L/BsQU1yjI7OG6DO4BRQvdAOlTGSbXe/d7HEyV VCbaLoFt9271iMhVMv7vDRcCVYfiBcs5qRhmh8uH4NgI/E0z/aNSnWhQWkg7LE0JfRNkK TTWD8YeD+XHk4sOsKKozMjDT006zM/eBRzX5sNy9Y95sD3oFUb8vY1cmxOBkmPHGi9+tu P1rvfDwQFx1zub3CVEd27KjOUuygXa6TjaannZG+Mkb2intAQj3K00JLk52eLg+uXPg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796071594; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=74hqD616MHHw9f3MIajVRAUQDTaJZ/uvWJoRYc5I2K0=; b=5WTvuta5Za2VrffhztdKfdVSBtYfKtH0/IGH4WMV4BqvE+Na3KbyF6J/G2lZLI2ftDWK H28CBMIn5IpOAS4IiThKjshD/J5e4/agudSQKfF8uP7M7j3sCpWCkhxN+AUhpeFFwR5ey uDIWK+s2jDuJEx0TmCJYPTwpTtcm2+MnH9jRjLXUPx0bFqlCQeU5d0YBV+bOt/CyRH6ZB c6YsGAEbpB5XtIuYZNvC5K/qEk/Uh/S7giZDebgf7ohVCnwh29Sl4KWn5M2xnjb0Amxd1 7FA/s2mokiQw4nJ/8rG0fj6GJDaY81ZvTFwwzohXpEHmC4M2frxEg9LG8ookYezC+Lg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=googlemail.com; spf=pass smtp.mailfrom=googlemail.com; dkim=pass header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20260707 header.b=Z8+FwD2m; arc=none smtp.remote-ip=209.85.221.53 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D53C7606A320 for ; Mon, 30 Nov 2026 20:46:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D53C7606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=googlemail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20260707 header.b=Z8+FwD2m Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-4a34ffd3e39so5983403f8f.0 for ; Mon, 30 Nov 2026 12:46:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20260707; t=1796071592; x=1796676392; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=74hqD616MHHw9f3MIajVRAUQDTaJZ/uvWJoRYc5I2K0=; b=Z8+FwD2ml9/IGeL6cCJJr/w/BdwCB2TSLMq4MhuGdFQYYIbuoT5+S5Kjoe1vGHa1I7 eUhEq8hLwnZkRoYf2K04KWCQBubuEbMMwLi/M7s3pAleLadBTyoOo3w0QUP3qRFMmp0Y gCFnSW5slC3na2AaMl4H5VakqYUmXCIBNPY5Nh4QwA264LQ+hl//9Lte7Hj3u1R8pPJW 3UwizVRoqTlX8wpNlUcBQFMkGGUHEJVNGUGaUyAyIM4Y5y7FJUjUKqsF19X4wVD0juPb 1mPZUN/4+myNh2/pmGBuMJUCQr5jvfwXWURmTOWPtrBzpUsC05N3hZkiKM4QWYxq3Fa6 Kfrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796071592; x=1796676392; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=74hqD616MHHw9f3MIajVRAUQDTaJZ/uvWJoRYc5I2K0=; b=jaXFW3Wr/u7IbO+B2DoNf1KDTMBF0rusEtBkSsnFBAuXTEGwWJwioKNHRsCjbDTlYM D6AuMbhlGp0kSwnzJ6KAg5wmpi4a2XFm39RzjlSOp78z81sZe1t0GfemaeuugMA9v7xz LHO3MvKjRlcsgwF0hhQsQ7ML0QU1p7c31qhgVaAjtSM9z4AAgPBYCNoVmuTZo0h2T9GA gxWBuirgkksfIegptaZ9ZEc67HnhPR2zAOV4fiolwkH84ZyzOzWubTfAmIpyiKalIvKm 8A4EPWSEed6MT+Lf8a8lSDLoIC8StNcwVpoXXf4vYPzU17ziFBPj5CCX2h50X2Yfe2W0 QPVQ== X-Gm-Message-State: APuU4Z8E4tC10CjfdqcX+ub6sS2n+YEsT1jh12m/jXok1AOII98spyRa f7OX10/dwPzKmg2K6SbrT8LNY4nCcv6YWAx5co/U2toZjLSflEBq3snV5tDXlkiHgNg= X-Gm-Gg: AZFdTZfmFwEFINIVicD8KXPMKc9jOzELwfMdEXsC4PFXJFsahesSS25l3Ac/dX9SFlL 7ODGZq4EgpZZ8kMKUUiq/KmofmdmZuQvb/xOyWSO6C5J1nWwPW4gb5DvH5KgMHFE2xtIHlw1DHb UdcKULHqRjXVfaSZ/3aBuUlqv9hHlqFXr2b0H5gtnBnrX5tqXAN1+tWUTroWCZzpFPMvKWzKH4w D+4pOQIehqZ6LPgx0Xds7wp8E5l1X4zV0ljTWAkVS71Fw6jNLGewDspG0pC7odN9/9f6wrmDdnL FLOZjXT4e15j6YtCpE+/MVyl5PU9Hypq6nlyUK57fzX58HvPKzGt1d32oYLQdufPA1ILwRPCE5+ 22MzCSN5h49vBcLPO3X3upfQT14zRbPtGmVOieTMp6N5lDFM3GWG5bC4j4zzsHJECcq66St/Mxb gOOYi7QOIvmsHeH8uhdejoC2a2IyhpwohkD4NpumA064jGbrrA77dhvnD046m0x35+k1LyKXyK0 0jOYH5v9HEjCj9T2pOO61xXvh5vkNgEyK+G7+AfWAN+GuXa+DCWOl7LxwsknoiY+klS6Xr2CsMD ye2U5bzGDzOY3qQuAWL5QM/nzH//uW1sAMuTSzpQgtfhkgy7Gm7BWTcI0Cwbsq6d0okPQcZpGNF YPTE= X-Received: by 2002:a05:6000:40c9:b0:4b4:510c:519e with SMTP id ffacd0b85a97d-4bdfa714d92mr29452884f8f.27.1796071591981; Mon, 30 Nov 2026 12:46:31 -0800 (PST) Received: from sp8 (213-146-237-228.ptr.skytron.de. [213.146.237.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6a680483sm67435844f8f.28.2026.11.30.12.46.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 12:46:31 -0800 (PST) From: Sebastian To: linux-bluetooth@vger.kernel.org Cc: Sebastian , "Claude Opus 5.5" Subject: [PATCH v2 4/4] input/hog: Accept Report Map longer than 512 octets Date: Mon, 30 Nov 2026 21:45:56 +0100 Message-ID: <20261130204556.357834-5-seb.witt@googlemail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261130204556.357834-1-seb.witt@googlemail.com> References: <20261130204556.357834-1-seb.witt@googlemail.com> X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Some HID over GATT devices expose a Report Map longer than 512 octets, such as the Inateck KB05113 keyboard with touchpad (3373:7713), which sends 637 octets. Since 5.88 it is truncated when read, the kernel then fails to parse it and no input device is created: hid-generic 0005:3373:7713.0005: item fetching failed at offset 509/512 hid-generic 0005:3373:7713.0005: probe with driver hid-generic failed Other Inateck keyboards, the HP 720 keyboard and the Sanwa MA-PB521GM touchpad, with Report Maps of 612 to 902 octets, are reported to fail the same way. This is a regression: commit 952c08ff50c5 ("hog-lib: Don't restrict Report MAP size") made hog-lib read Report Maps of any size, since other operating systems don't enforce the limit and many devices exceed it. Since commit 96f1201f5ac2 ("input/hog: Use shared/hog") the Report Map is read with bt_gatt_client_read_value, which truncates to BT_ATT_MAX_VALUE_LEN. Accept them according to the LongReportMap option of [Input] in main.conf, which is enabled unless Testing is. Fixes: 96f1201f5ac2 ("input/hog: Use shared/hog") Fixes: https://github.com/bluez/bluez/issues/2814 Co-Authored-By: Claude Opus 5.5 --- profiles/input/hog.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/profiles/input/hog.c b/profiles/input/hog.c index 0f6224990..b7c293eee 100644 --- a/profiles/input/hog.c +++ b/profiles/input/hog.c @@ -29,6 +29,7 @@ #include "bluetooth/uuid.h" #include "src/log.h" +#include "src/btd.h" #include "src/adapter.h" #include "src/device.h" #include "src/profile.h" @@ -81,8 +82,11 @@ static void hog_device_accept(struct hog_device *dev, struct gatt_db *db) product, version); dev->hog = bt_hog_new_default(name, vendor, product, version, type, db); - if (dev->hog) - bt_hog_set_debug(dev->hog, hog_debug, NULL, NULL); + if (!dev->hog) + return; + + bt_hog_set_debug(dev->hog, hog_debug, NULL, NULL); + bt_hog_set_long_report_map(dev->hog, btd_opts.input.long_report_map); } static struct hog_device *hog_device_new(struct btd_device *device) -- 2.56.1