From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796312067; b=UYEkeABLC+rUOgWP4qAb7pg4dAxCRRzcDT6cvLY0mmOJzzWRYvkSXEejyYbWPzeRwsvS iv/euNo1Dpds6M58sed2FZqm1Lj0eM1al+kfYF66kzVA/PlKgUxGloRdMM3WtQLyoTYwt Dde+bgRNC/AcLrEnN4YGTJdN9wBwWEECOWX8BDBDCO5iwkVHlbWVzpTRrCTUzfUuO2oF8 V5mpas7arIhFyNSTUjDKY9pVWTgCZNgt9uKXLeQnW9mjwacPTcZHvSLajKWWPzTPQZhQJ A36UmkJpKBTiFy45j9yjWa0hCfeMljjwqJtjEpdyIDGM2YTu0MYQrzgZsgn2KdXPCmw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796312067; 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=6cyaqUXY/z02DA6qpX2mbxF9gR3AouORPr2FqTW/YHk=; b=VZ80fZTHLIOQoPoBYeR66nNbdu6qxFQgtrnwNjP5U/j0Z+6VkWSVC8UTkIQA6nwgr4np qWXHQRsUsqARNCM1iSJaW0jwbIj+yi+1n/H7MqFeYFJYXX54sZxdQCwrrW3vh7wQ76KR1 VWGXm+NxRCED6sWS6ci7/fwcEeqdJia5zQIT5xUsHNuAUk7ZXV1tmf9cSoPy+hxZOBU+J i1dkrYVLadJWULFP59+bJJLzo+MwIqJUp52Mga8s4S9w5KQMjBAHjQU41OcfLQCyWa83f TKYz4HdBtFcgpSOf5/3E9kIUMvpOghqGdqLYq3ZwgKgRy0IrIGMMax9qcoK98CS2nCA== 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=KLdyaFA1; arc=none smtp.remote-ip=209.85.221.41 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 D73BF606A330 for ; Thu, 3 Dec 2026 15:34:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D73BF606A330 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=KLdyaFA1 Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-4ad6219f7d8so13322622f8f.0 for ; Thu, 03 Dec 2026 07:34:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20260707; t=1796312065; x=1796916865; 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=6cyaqUXY/z02DA6qpX2mbxF9gR3AouORPr2FqTW/YHk=; b=KLdyaFA12etOaoer85piTfkCaiBvaiDXkF3VW6oLiaKgvsg7HaDvRwtTizWGzW5Pih jH/1c6AjwXynoIsaL5aY7iNVHlmIdCKqZuu7dRrSWUQV+eG6ADU74Tl+Y7eKPlc+ITTJ Shv4mvG7l+JkfSxRc2EcTtVZNYzw4I/92lGHd5FhvTapmFAe6nlRakm6OYzptGcRl+fX URaCKTCAJpq8ZJJSnK+pVYHw+gVYdzXWPxSrl+ZrjnW5nx+j7XYSCvc68tTARMDhRXxe x3IuXbMJsGCqfcEJtcqdIuxh+Xr04XLm8JjG4m/g6rnFp9JJR+yoxbh9HcgdiroihurA vaQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796312065; x=1796916865; 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=6cyaqUXY/z02DA6qpX2mbxF9gR3AouORPr2FqTW/YHk=; b=Zqr5sCpqnsizgipD+7ltrLP6F+VvWZ9y4MKqrYTKQMYVqBDOAX7/aKlOzExBXuQTI5 VE2FciEOU+y4aab59VI88J5rg52iq2ctIuO5VIaoYfaAFO9Dq50LhoZwIgIr0VsxslVq J4ndA4sT3gEWZxTm11Y5UIrwEXy8umYWqJ35uD7fwDEskCzWi1L5p9K2cj4BaTkaINFC /70YAKSzjUeNlXYUtZz5z1B9190mz/YT/XjXIndU+llStLXR7SqeSo7oT53UNS6mt3if P3G8pAtVgFiVR6GUaYdYrdAG1B3Ya3HiORpOGeC1ec74uTu4agCCJbab2PhEqMTtWkiy GVgw== X-Gm-Message-State: APuU4Z+qPSECtojm4ge9hMzXsIf3/ogTGpY6dtbeLZ9GL2GP4r0F4knZ hdvDvwoA5bGV/pHqvIRWNBjAgQ/hF59I6IJ7FVYkkBW/iWl+rd44i2NCikFtHi4J X-Gm-Gg: AZFdTZc3YFBmyez9z6yUKNsnfp5Vk1xbUhjp/QczbtIGias6+kHzad7ZFGrzldvN5T2 l95d+o2oypnZbF2F21l2R8/gG5sCe2qlSdGF8885UTOF3HI/Cabqv+PMBUz2aBU4xynw5pG3YOP nVcbX4LJfTxl6Fq6rcGtM0SfPKy5VvvgniZutYqBzsEZ4RTAOBPrV8mQ60OhoDlegdRU6aaq/bo 70g1FYbYgUm1mHaQxwGQA6W5wW5vSZH4jgrmBRuXNYngqHEwA7/mwD2sCf/wBnkMQcKHmONhco4 StQ2Rl24dPsC+phWF28CzZplmy/C+lGcCCxfp5qMCKtYbW8FoRyXC43a3qr8faSzv6a9DVLW8+w 9ZRUSkHV5iwRBZ+hqXTOx5GBQLw5v4UkwLJaMKow4ia6NYJmrs4xPHiPI9s4zPVeK7lWKC7kok2 s4MUxlLaqFeLMvD8eEoS5VvxVRY0ZN2EgQ5pcYNUPve5Zm6ymGtF73LHLi1yr6dUN0LthUFl4GO SfQNs6xaq8qBZvMCMXE0YoyBGkF+z9NrVgeu296iTTYLymqK/IxSwQcHtTcrSOOws1Xm93A4hhG f0GAoZ1taT042ekoa06rJFK3Y7BRyzZ0pZdlzadLsV4wjerYHwMg/fH+bw== X-Received: by 2002:a05:600c:3ba9:b0:4a2:1050:aff with SMTP id 5b1f17b1804b1-4bb8881c741mr1030369645e9.6.1796312065037; Thu, 03 Dec 2026 07:34:25 -0800 (PST) Received: from sp8 (213-146-237-228.ptr.skytron.de. [213.146.237.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab65cb42absm83352896f8f.1.2026.12.03.07.34.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 07:34:24 -0800 (PST) From: Sebastian To: linux-bluetooth@vger.kernel.org Cc: Sebastian Subject: [PATCH v3 4/6] input/hog: Accept Report Map longer than 512 octets Date: Thu, 3 Dec 2026 16:34:06 +0100 Message-ID: <20261203153408.31769-5-seb.witt@googlemail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261203153408.31769-1-seb.witt@googlemail.com> References: <20261203153408.31769-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") Closes: https://github.com/bluez/bluez/issues/2814 --- 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