Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2023931rdb; Sun, 11 Feb 2024 07:58:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEn0e6OL562XA1Ue0YzxgPpWQdQgwlSeHcix1tnASZh+WtvZd9qPH+w+1mjAnO9aiznL8m3 X-Received: by 2002:a17:906:b855:b0:a3c:1070:8054 with SMTP id ga21-20020a170906b85500b00a3c10708054mr3098721ejb.10.1707667082512; Sun, 11 Feb 2024 07:58:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707667082; cv=pass; d=google.com; s=arc-20160816; b=ZGqVkOv0fUKQyCkQ71+D88xtWaj68+9PIFzn+Mn/uE72fkL+ayfjSEYGnRwv4KG+pK M8dZK7c5wMYnjE8QOuA3uqe3RQRowMINrNKtNM/aWyKoVZoJdZ9TvZlBzkM72uKyDT7u DEatjF6+yQzlI0UUGrTIxEdrhOH0JE+sAGT0g0JqHESknoRdxDoT9O6cUovO9rj27Tfh u80ahAuuQTsbVDnihRbowI+lEop4cvTvaLCrsGMJ9CxfDc9rl+lUStNtVaYjFQyXyXtI zXJt02I8wdQXDm4l0hMlNvywCgs1WWbeeEt7YGfQNpaKerM1aIblaNdYC2z4aOFpMDqF l3Pg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=1hHa5kUPlIxFb3OXyDNX1LwLohhu/1WXPO430OUtUMM=; fh=ybxwnyDaxkd1zRaI0AXt5lvcTJpIKZoP6x/L0Xy+tlQ=; b=HCJj+pHwK7t9zWkuG54gvC5dPMIOsvynjAkZ6z5oXJv3KJT055pJ2UEMJ6H5aWZJSA BG23ArFlBZoEAiPESQnOqq2fYCXk0r5Uqyj2rtd74lTMzk1ySGX6VDhT+HhJ1un09FCf MAVfmbZnM6fTJtvVmdzGT5InGjp3y5AF/qSTIWmgrVFghh2Zbe3gHyI5BBgb9DiGI0AT NJm77cDMcPcHcoqWW6RlDp5uAz5NvMJyPErEexYdU9Y5s5CuuLwNgxBPngDWXylqrSG2 jdW/FqLemAF0tMhPEUcb+43+55DZR6f4A9RuEnOEJtIMthuziDT0HlHH0lg3Z/pG7bl8 NjEw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BpVcS5gG; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCXSJfTRohLllwGC4ZeCVLud5kcdG2FBX37ArKX3h3LBB0FM/1rfFWI0zQJt1A4KTxc1760HkVRjRntgUfEqar9HbSK5l8wDcjIqm1VQ9w== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dt8-20020a170907728800b00a3836739418si3149339ejc.342.2024.02.11.07.58.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 07:58:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BpVcS5gG; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 43EB01F23AED for ; Sun, 11 Feb 2024 15:58:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6AE15BAF1; Sun, 11 Feb 2024 15:57:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BpVcS5gG" Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 484611E506; Sun, 11 Feb 2024 15:57:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707667071; cv=none; b=UDSHj8fVdX2/AoYwvv9d7efOwbJxhJ9YwEaoVNrxKmh6xYqo3s2STWtq5EGTS4VMtG/3lecH69sN67vtV+bwpn+7AYifQqWqJIa9qCcEvg52BssM5rUCh5kZJwQezT0or6tZYWGWEi8vGVxfpPvZrs0TfNJ4cm0ecp1F2FFI8uE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707667071; c=relaxed/simple; bh=stmkEqJ1qXcSaTqWdTlvLqtEOfj+D0MgCx9mbqK/hAE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=CARe4KZ1I3670Z8RAw0z5zALb3gMkzZicz7Ylgec42dd0Emk6yRMFDrSAvtBbaNqPVweJVPxwfj80iSw/+DRO+9OGrhSFC1fasle7rLmdwrpGBj3I75NTx2JQIjv21kyZpAosonXYtBCh6bH0QwaGNzAvqgDPOFCH2IVAqBXO0U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BpVcS5gG; arc=none smtp.client-ip=209.85.208.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2d0aabed735so32488101fa.0; Sun, 11 Feb 2024 07:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707667067; x=1708271867; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1hHa5kUPlIxFb3OXyDNX1LwLohhu/1WXPO430OUtUMM=; b=BpVcS5gGzy29AbdSXIEGkJlPB2hKZnX7ErM5olltH8KsH7lbNXupQyvArg1Sudbf2G 9U2rAAER0jfdYLDBerTLlKnt16zA1p7o1hM30hmMGJhbpP7Oe7LT2tBGKJKSYmu/1znA INXAMt5x354fAxLmdJqZsDk5OFxqWROJCLO+QOp8tdWs0Ynh+46ntxZivxCkOYiIRcxz Gta+g2m/jSrnNMJzkglUMfeZYpi0DfDEjHCZGPhe4r4sQdOQSFKHvgg8ETtBCvR+be8G cCyENBU3ZW2nPAg8rYXz28Q/D1IsolQf9Su6RXphPC6CTP69Jf6armEC1mEQuEYJ1qsf jQrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707667067; x=1708271867; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1hHa5kUPlIxFb3OXyDNX1LwLohhu/1WXPO430OUtUMM=; b=oIQdN/MQP6hgjCz7+H2b4+ZMkDNV4GoVCOFnNxwPW5J1J3tnPJ9xECIUBNoHiihvhc 43GLRjcqZXWb1wPB8cKumWiwOppxIUtqjLejUjI+YHB+c/zxFoWfk7SzW2Q8L8akmt0C 2liKnKe5z+uKe+wYo1VlZfFbe76VwWA7/VYN5DIrDxIrBaHfH0CzwF5GNRYMxOvdxA+M 5d6oGpiDLyMogdLwzGZMqhdnImS0QTBP6YmhZeVwDXio1ri9jff3oVdW8Bk/cANWEZDo f6tqpbbgOvYPLujPl40e1oNWzf7Y2oed2LCCOg7Z18B5MspSdp/tOV7PFEtXu7ji6d+o fVGg== X-Gm-Message-State: AOJu0YwnLxzc66+Gw550v5n1yFN+X/gkZdsE4PUrh9T6SGO8eZml9kh+ I89tk7vv3IDV7dYFtdgYDsgiopcvZkOLuLzT3a2IbmuqAvAWKSPJinSfnJ+K1HkqQDwj3l8W6nM LRj8cgERCZSqNPMi7Y6/eVBMuu93bjzDk X-Received: by 2002:a2e:8519:0:b0:2cd:5cfd:b19 with SMTP id j25-20020a2e8519000000b002cd5cfd0b19mr3062812lji.19.1707667066875; Sun, 11 Feb 2024 07:57:46 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240210222226.890031-1-vibhavp@gmail.com> In-Reply-To: <20240210222226.890031-1-vibhavp@gmail.com> From: Luiz Augusto von Dentz Date: Sun, 11 Feb 2024 10:57:34 -0500 Message-ID: Subject: Re: [PATCH 0/1] Bluetooth: mgmt: Add command for getting device IO capabilities. To: Vibhav Pant Cc: linux-bluetooth@vger.kernel.org, marcel@holtmann.org, johan.hedberg@gmail.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Vibhav, On Sat, Feb 10, 2024 at 5:22=E2=80=AFPM Vibhav Pant wro= te: > > The following patch adds a new command to the bluetooth management interf= ace, > GET_DEVICE_IO_CAPABILITY. The command allows userspace to get the IO capa= bility, > and the authentication methods supported by a connected device. The comma= nd is > necessary in order to implement parts of the Win32 Bluetooth API in the W= ine, > specifically the following two structs: > > * BLUETOOTH_AUTHENTICATION_CALLBACK_PARAMS, which provides IO and auth ca= pabilities > info for an incoming authentication request from a device. > > * BTH_DEVICE_INFO, which contains flags indicating whether the device sup= ports > Simple Secure Pairing and MITM protection. The former is supported throug= h BlueZ's > "LegacyPairing" property. > > Because the Wine API are implemented on top of BlueZ, I'll also be provid= ing a > corresponding patch that uses the newly added management command to expos= e the > capabilities through new properties in the org.bluez.Device1 interface. Interesting, but the IO capability matching logic lives under the kernel so I wonder how useful this information is if you can't really do much about the authentication method used? And in case you are thinking of changing the pairing procedure to just leave it up to the upper layer to figure it out, I don't think that is a good idea because that is subject to qualification that would effectively be a new implementation. > Thanks, > Vibhav > > Vibhav Pant (1): > Bluetooth: mgmt: Add command for getting device IO capabilities. > > include/net/bluetooth/mgmt.h | 19 ++++++++ > net/bluetooth/mgmt.c | 89 ++++++++++++++++++++++++++++++++++++ > 2 files changed, 108 insertions(+) > > -- > 2.43.0 > > --=20 Luiz Augusto von Dentz