Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp19457471ybl; Sat, 4 Jan 2020 01:46:33 -0800 (PST) X-Google-Smtp-Source: APXvYqxjCREQ/t6NLcsbomiSXizlIExqzuJNT5uO4qpT/E4ABJrZRBapSmIMV9Dqi02/iiKsUsmk X-Received: by 2002:a05:6830:1d5b:: with SMTP id p27mr82548032oth.263.1578131193820; Sat, 04 Jan 2020 01:46:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578131193; cv=none; d=google.com; s=arc-20160816; b=g9a3JViVPeEhL746b/py5V52XyqxcHCfcfKZhewFXnnGZf9ITFTCEtzsi3pAMSOpzR nbA+e9PVWPIidQ+dqp4nHy790DLVN9np55S1UJAkiVa62Tom3p7jNm6xYSHqYVPl0KYQ a2xnnjQanhvt28vDmOnw92FgidOvnoWpgIBvYCce9kqALi2WVM1cqqUuVTgm1ykdo4jQ BvPC9EAh7P4acIOKfvENhIRK/FB5Bv+UZl5zeaT6Ip00b0n86a7AptiBJQM7WaKwRvzj ZqInU42bI06gaCHI0sz9d/eZlgoWW42uC5rbTfCkMMatHQgws4MVHBeEV/zOEECe+2nt TNvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=wBfvqIgWivGuHYK0IESlAxVrKB5hQLp77vOfSQPKJag=; b=h+PoPl6QQu2JbjOdCD9+XgSJwFW49NTsI7tO//yR2anY6qFi8VH74aAScnb/iSnhI2 9YGG5CZicAL1NKOjwxpIZvDhNKP68OSjhoc3t1CJvjR80UUsIC6QFqW3E14ytNXqk5wt gqRZLt1I67W4CQGAbJojkgMPCGh+eWHE4Ma3l9R+tW8IQT7auv/seesIyy23aS8iuWeq 1U5C2BaDRHO0O0EVj2nn1+YbmZjVcTtoIi6vpDuPwLv9630HKhOulzmUmVvA61at5qk+ 8gy8QzJ3veZB2QG5IyVPmI5FcnwAXC7d6H1ns/uz56Pdo+dVWw61gTMvoykBeBRv6wx6 R8vg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si31516616otm.189.2020.01.04.01.46.22; Sat, 04 Jan 2020 01:46:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726191AbgADJoy convert rfc822-to-8bit (ORCPT + 99 others); Sat, 4 Jan 2020 04:44:54 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:43695 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726103AbgADJoy (ORCPT ); Sat, 4 Jan 2020 04:44:54 -0500 Received: from marcel-macbook.fritz.box (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id 21420CED12; Sat, 4 Jan 2020 10:54:08 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: OCF_READ_LOCAL_CODECS is permitted only for root user From: Marcel Holtmann In-Reply-To: <20191228171212.56anj4d4kvjeqhms@pali> Date: Sat, 4 Jan 2020 10:44:52 +0100 Cc: linux-bluetooth@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: <45BB2908-4E16-4C74-9DB4-8BAD93B42A21@holtmann.org> References: <20191228171212.56anj4d4kvjeqhms@pali> To: =?utf-8?Q?Pali_Roh=C3=A1r?= X-Mailer: Apple Mail (2.3608.40.2.2.4) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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. Regards Marcel