From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35C8EC2D0A8 for ; Wed, 30 Sep 2020 08:25:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F37B620EDD for ; Wed, 30 Sep 2020 08:25:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601454342; bh=h12YRtace030+4IgK0t+oBgFypBtI4JrBGHJTaTeLTw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=hLzPqZLW/mRiZh8FZEupex8wTvl8kP8k5G3C4rIYDI1Y1ok4nzc0IC5KdrCsfFGWR OGdgeQwn0MVVxepn+wlxdNsYtKTiYAbN/gU47cW4zd+YFvu+I001qIb/p/ekqlDODf l5mXtOtHrq67Z+rkZmwjSrP0pdDV5TBxXs1+gfMw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728655AbgI3IZl (ORCPT ); Wed, 30 Sep 2020 04:25:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:55226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728563AbgI3IZl (ORCPT ); Wed, 30 Sep 2020 04:25:41 -0400 Received: from pali.im (unknown [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5611021734; Wed, 30 Sep 2020 08:25:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601454340; bh=h12YRtace030+4IgK0t+oBgFypBtI4JrBGHJTaTeLTw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MeJnceBJMi3J8d4ZY4wOKANV2K6VqbiJPu9yK0Of/wIwdE0rcYfzeRMCg84uLRP9+ DAPQAHSpjkAizklVLj5l/B+2e3AFv5bpEgY7njpftZzABiwJa+s4rJeAXXaUMTem9Z Wo5I1LZaqRfByGW5iJdztmNhDKslMeazyrEfPUAQ= Received: by pali.im (Postfix) id 58F8E9D2; Wed, 30 Sep 2020 10:25:34 +0200 (CEST) Date: Wed, 30 Sep 2020 10:25:34 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Greg Kroah-Hartman Cc: Marcel Holtmann , Johan Hedberg , "David S. Miller" , Jakub Kicinski , Pavel Machek , Luiz Augusto von Dentz , Sebastian Reichel , David Heidelberg , Linus Torvalds , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Removal of HCI commands, userspace bluetooth regression? Message-ID: <20200930082534.rrck6qb3fntm25wz@pali> References: <20191228171212.56anj4d4kvjeqhms@pali> <45BB2908-4E16-4C74-9DB4-8BAD93B42A21@holtmann.org> <20200104102436.bhqagqrfwupj6hkm@pali> <20200209132137.7pi4pgnassosh3ax@pali> <20200414225618.zgh5h4jexahfukdl@pali> <20200808132747.4byefjg5ysddgkel@pali> <20200929213254.difivzrhapk766xp@pali> <20200930080205.GA1571308@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200930080205.GA1571308@kroah.com> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Wednesday 30 September 2020 10:02:05 Greg Kroah-Hartman wrote: > On Tue, Sep 29, 2020 at 11:32:54PM +0200, Pali Rohár wrote: > > CCing other lists and maintainers, hopefully, somebody would have a time to look at it... > > > > On Saturday 08 August 2020 15:27:47 Pali Rohár wrote: > > > On Wednesday 15 April 2020 00:56:18 Pali Rohár wrote: > > > > On Sunday 09 February 2020 14:21:37 Pali Rohár wrote: > > > > > On Saturday 04 January 2020 11:24:36 Pali Rohár wrote: > > > > > > On Saturday 04 January 2020 10:44:52 Marcel Holtmann wrote: > > > > > > > Hi Pali, > > > > > > > > > > > > > > > I wrote a simple script "sco_features.pl" which show all supported > > > > > > > > codecs by local HCI bluetooth adapter. Script is available at: > > > > > > > > > > > > > > > > https://github.com/pali/hsphfpd-prototype/blob/prototype/sco_features.pl > > > > > > > > > > > > > > > > And I found out that OCF_READ_LOCAL_CODECS HCI command cannot be send by > > > > > > > > non-root user. Kernel returns "Operation not permitted" error. > > > > > > > > > > > > > > > > What is reason that kernel blocks OCF_READ_LOCAL_CODECS command for > > > > > > > > non-root users? Without it (audio) application does not know which > > > > > > > > codecs local bluetooth adapter supports. > > > > > > > > > > > > > > > > E.g. OCF_READ_LOCAL_EXT_FEATURES or OCF_READ_VOICE_SETTING commands can > > > > > > > > be send also by non-root user and kernel does not block them. > > > > > > > > > > > > > > actually the direct access to HCI commands is being removed. So we have no plans to add new commands into the list since that it what the kernel is suppose to handle. If we wanted to expose this, then it has to be via mgmt. > > > > > > > > > > > > Hi Marcel! Thank you for information. I have not know that this API is > > > > > > "deprecated" and is going to be removed. But userspace audio > > > > > > applications need to know what bluetooth adapter supports, so can you > > > > > > export result of these commands to userspace? My script linked above > > > > > > calls: OCF_READ_VOICE_SETTING, OCF_READ_LOCAL_COMMANDS, > > > > > > OCF_READ_LOCAL_EXT_FEATURES, OCF_READ_LOCAL_CODECS > > > > > > > > > > Hello! Just a gently reminder for this question. How to retrieve > > > > > information about supported codecs from userspace by non-root user? > > > > > Because running all bluetooth audio applications by root is not really a > > > > > solution. Plus if above API for root user is going to be removed, what > > > > > is a replacement? > > > > > > > > Hello! > > > > > > > > I have not got any answer to my email from Marcel for months, so I'm > > > > adding other developers to loop. Could somebody tell me that is the > > > > replacement API if above one is going to be removed? > > > > > > > > I was not able to find any documentation where could be described this > > > > API nor information about deprecation / removal. > > > > > > > > And are you aware of the fact that removing of API could potentially > > > > break existing applications? > > > > > > > > I really need to know which API should I use, because when I use API > > > > which is going to be removed, then my application stops working. And I > > > > really want to avoid it. > > > > > > > > Also I have not got any response yet, how can I read list of supported > > > > codecs by bluetooth adapter by ordinary non-root user? Audio application > > > > needs to know list of supported codecs and it is really insane to run it > > > > as root. > > > > > > Hello! This is just another reminder that I have not got any reply to > > > this email. > > > > > > Does silence mean that audio applications are expected to work only > > > under root account and ordinary users are not able to use audio and list > > > supported codecs? > > > > Hello! I have not got any reply for this issue for 10 months and if you > > are going to remove (or after these 10 months you already did it?) > > existing HCI API from kernel it would break existing and working > > userspace application. How do you want to handle such regressions? > > What git commit caused this regression? Hello! Marcel in January wrote that access for HCI commands is being removed from kernel. I do not know if he managed to do it in since January, but I'm going to check it...