Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp5671032rwb; Tue, 9 Aug 2022 01:58:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR42OK0dIZQCgYR+rdq+Alz/ha3TkXipwVuHdn9iOECefG/qnt+e5ZspG12cLOVKAgVVNReZ X-Received: by 2002:a17:907:2be3:b0:730:6866:a9b1 with SMTP id gv35-20020a1709072be300b007306866a9b1mr15931490ejc.693.1660035528641; Tue, 09 Aug 2022 01:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660035528; cv=none; d=google.com; s=arc-20160816; b=tAmGC4cx/8CFajAAcv3p3m2N33Gst2MON74kKNljzPfzIvlyCr1tvC1n2RX00KYDcg TgE1PRtUanFB86WWpZhnkPuA3hpDeT+PvEj2xbG/l7IV9wP1NPzuS4F+X3+lmr7Lb8Nv jzNKq3hpev4XIXLe5BNvqO85r+3aMkwOkG11vTkYDD0LLubxRqkTvH6ah0dSd1j+QliH fnUzPfUpzU8lIuQKQrQ2jlVHepjkdmvSijxKxRR8DW/pdovhsLWM65DcDnMQpnQm7juH 55O+/cYTy490vLsuj6frg2N8Lq634SBuurYT2q+b4EO/zJ2rQADm6J02s2LUFnbUZjCu 2hzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :in-reply-to:from:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=TaCxZlWNUBIqikL0MJqaqi4m3uwm9yQMLJvWiRgih7k=; b=TG67omAjgBjjch3m3mL+JXtxVEuC+X0PtYVuIqzySO+En4rRuXn9cwKA3S2cGrAYwL ty6D/MiGegSP6eqDtUl8Xyn0q/rLtSzQ6WeDBC5cDpCgMaVJ2aGEA3sLmt5IuAHmNZ0o Y/C+og6SOw2Ocm3d72zpDNxo0grmpaZP7BKXXgUHcZHCRa9Tax00t+2Lu2OLbaYkMK5B EeIj6hq+eZaxjZBN8R3GbY5lU3llU/vMmEb9UBI0E0Rhzj0PZVQJ9NQNaMNSrEPhf8IM ACKp6/38hQANsll24K3JZ9/DOFOHyOsKFmyw7Hpjdcr8NX49KClAF7jitdeyTlXhdxr7 1YVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VtEk6wNf; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o23-20020a056402039700b0043e18c7dee7si7368075edv.634.2022.08.09.01.58.08; Tue, 09 Aug 2022 01:58:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VtEk6wNf; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241172AbiHIIzF (ORCPT + 99 others); Tue, 9 Aug 2022 04:55:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236411AbiHIIzE (ORCPT ); Tue, 9 Aug 2022 04:55:04 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43F8122501 for ; Tue, 9 Aug 2022 01:55:02 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20220809085500euoutp0233b1b780cf5b786ff8cbdb0e6fc8768c~JoU_HTi8k1582115821euoutp02a for ; Tue, 9 Aug 2022 08:55:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20220809085500euoutp0233b1b780cf5b786ff8cbdb0e6fc8768c~JoU_HTi8k1582115821euoutp02a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1660035300; bh=TaCxZlWNUBIqikL0MJqaqi4m3uwm9yQMLJvWiRgih7k=; h=Date:Subject:To:From:In-Reply-To:References:From; b=VtEk6wNf6imzXiiN3cDOM5DsRmMi0sXfFO/BriRr1n+7K6+9RsHmVnV8hjsX64F+w AMIsej30epiB/e4qSD5tPiyzyb1+DnK6NngxWDoTdEtW8L/0El7vVJw3xPgjVY+Ljg i/sXh8QnUuGjB3rHHz/ASsTW++6LgQOeJMKoRjL8= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20220809085500eucas1p248c8f12a9247815e64558d882d7d0430~JoU_ACDJ_1533115331eucas1p2B; Tue, 9 Aug 2022 08:55:00 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 4F.73.09580.4E022F26; Tue, 9 Aug 2022 09:55:00 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20220809085500eucas1p18cb2752164ca55832787e7d3843f48ab~JoU9rzRF00514505145eucas1p1M; Tue, 9 Aug 2022 08:55:00 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20220809085500eusmtrp238f5a4e877574d8965805377af4fbcff~JoU9rNGiY2790027900eusmtrp2o; Tue, 9 Aug 2022 08:55:00 +0000 (GMT) X-AuditID: cbfec7f5-9adff7000000256c-3e-62f220e4c66c Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B3.9E.09038.4E022F26; Tue, 9 Aug 2022 09:55:00 +0100 (BST) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20220809085459eusmtip1368cb8892560f73a266bf08fd37fdf06~JoU9ckBTd2325223252eusmtip1e; Tue, 9 Aug 2022 08:54:59 +0000 (GMT) Message-ID: <749ed578-bc9d-b699-3602-bee444fff9bb@samsung.com> Date: Tue, 9 Aug 2022 10:54:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v7 2/7] Bluetooth: Add initial implementation of CIS connections Content-Language: en-US To: Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org From: Marek Szyprowski In-Reply-To: <20220711233535.3134546-2-luiz.dentz@gmail.com> Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMIsWRmVeSWpSXmKPExsWy7djPc7pPFD4lGbyZKW0x51ofs8XTz1NY HZg8ds66y+7xeZNcAFMUl01Kak5mWWqRvl0CV8a+N5+YC26qVFw+vo2xgfGETBcjJ4eEgInE zrUbGbsYuTiEBFYwSqz9cADK+cIoseDidWYI5zOjRHvPMWaYlr3Hu6CqljNKHFn2hgnC+cgo 8XDRf0aQKl4BO4nnc2+wgNgsAioSU3p7WSDighInZz4Bs0UFkiWe/V/MDmILC4RJfL/+C8xm FhCXuPVkPtBQDg4RgRCJnl2SIGE2AUOJrrddbCA2p4CNxNyfLSwQ5fIS29/OAbtUQqCTQ+LV y4OMEJe6SFxb3ckKYQtLvDq+hR3ClpH4vxNivoRAvsTfGcYQ4QqJa6/XQD1pLXHn3C82kBJm AU2J9bv0IcKOE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0veT83E2MwEjYduznlh2MK1991DvEyMTBeIhRgoNZSYT3yNr3SUK8KYmVValF+fFF pTmpxYcYTYH+n8gsJZqcD4zFvJJ4QzMDU0MTM0sDU0szYyVxXs+CjkQhgfTEktTs1NSC1CKY PiYOTqkGJhde3okx2x7O2VHYE1ngs2f7+941ixJ2rd1+T+3brJJKffvEGSfeHk7boJIdFaid aHkgbONuJi691g6uqtAiT7eV8wRsvPSveOnPDbi73zHWKEmS8+ixJbvnv5+gxxY+Mca2WPT0 m6jZSUv/512aF+j3Lkfr4KN5xvIfbwlU3Nj8SIpx0cEZnKZMfx5JqW8+yrdO/rVfX1tNW7rJ HfnnzR2NnZq5S7t0PsloxHfsvCS4+qLfDMH+RVUuU5JOJjNdtp3x5vuhfivuG1nnjDxWGR67 W535WWra2c6imLlTrrxoZpa8Hu2w+vrVA381iiN6cu/OX7xHfJr2hH7hF4k8ERsnVO3hP3zV U5hn62HhB0osxRmJhlrMRcWJAGq0nOUNAwAA X-CMS-MailID: 20220809085500eucas1p18cb2752164ca55832787e7d3843f48ab X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20220809085500eucas1p18cb2752164ca55832787e7d3843f48ab X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20220809085500eucas1p18cb2752164ca55832787e7d3843f48ab References: <20220711233535.3134546-1-luiz.dentz@gmail.com> <20220711233535.3134546-2-luiz.dentz@gmail.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Luiz, On 12.07.2022 01:35, Luiz Augusto von Dentz wrote: > From: Luiz Augusto von Dentz > > This adds the initial implementation of CIS connections and introduces > the ISO packets/links. > > == Central: Set CIG Parameters, create a CIS and Setup Data Path == > >> tools/isotest -s
> < HCI Command: LE Extended Create... (0x08|0x0043) plen 26 > ... >> HCI Event: Command Status (0x0f) plen 4 > LE Extended Create Connection (0x08|0x0043) ncmd 1 > Status: Success (0x00) >> HCI Event: LE Meta Event (0x3e) plen 31 > LE Enhanced Connection Complete (0x0a) > ... > < HCI Command: LE Create Connected... (0x08|0x0064) plen 5 > ... >> HCI Event: Command Status (0x0f) plen 4 > LE Create Connected Isochronous Stream (0x08|0x0064) ncmd 1 > Status: Success (0x00) >> HCI Event: LE Meta Event (0x3e) plen 29 > LE Connected Isochronous Stream Established (0x19) > ... > < HCI Command: LE Setup Isochronou.. (0x08|0x006e) plen 13 > ... >> HCI Event: Command Complete (0x0e) plen 6 > LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 > Status: Success (0x00) > Handle: 257 > < HCI Command: LE Setup Isochronou.. (0x08|0x006e) plen 13 > ... >> HCI Event: Command Complete (0x0e) plen 6 > LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 > Status: Success (0x00) > Handle: 257 > > == Peripheral: Accept CIS and Setup Data Path == > >> tools/isotest -d > HCI Event: LE Meta Event (0x3e) plen 7 > LE Connected Isochronous Stream Request (0x1a) > ... > < HCI Command: LE Accept Co.. (0x08|0x0066) plen 2 > ... >> HCI Event: LE Meta Event (0x3e) plen 29 > LE Connected Isochronous Stream Established (0x19) > ... > < HCI Command: LE Setup Is.. (0x08|0x006e) plen 13 > ... >> HCI Event: Command Complete (0x0e) plen 6 > LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 > Status: Success (0x00) > Handle: 257 > < HCI Command: LE Setup Is.. (0x08|0x006e) plen 13 > ... >> HCI Event: Command Complete (0x0e) plen 6 > LE Setup Isochronous Data Path (0x08|0x006e) ncmd 1 > Status: Success (0x00) > Handle: 257 > > Signed-off-by: Luiz Augusto von Dentz This patch landed recently in linux-next as commit 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections"). Unfortunately it causes a regression on my test systems. On almost all I've observed that calling a simple 'hcitool scan' command in a shell fails in an unexpected way: $ hcitool scan *** stack smashing detected ***: terminated Aborted $ The above 'stack smashing' issue I've observed on Raspberry Pi4 with ARM 32bit kernel. Bisecting this lead me to this commit. Reverting it on top of next-20220808, together with the following commits due to dependencies, fixes the issue: 26afbd826ee326e63a334c37fd45e82e50a615ec "Bluetooth: Add initial implementation of CIS connections" e78165d2ce798451d08ac09d704cd72caa962b81 "Bluetooth: hci_conn: Fix updating ISO QoS PHY" ccf74f2390d60a2f9a75ef496d2564abb478f46a "Bluetooth: Add BTPROTO_ISO socket type" f764a6c2c1e446f560faa3232271a0637369170b "Bluetooth: ISO: Add broadcast support" c85008a4e748051cddc6be6333f55df476f35362 "Bluetooth: ISO: unlock on error path in iso_sock_setsockopt()" 82e07ef4b474f466b4b2955bad76c52d6df98a30 "Bluetooth: ISO: Fix info leak in iso_sock_getsockopt()" c5d36b8a7dbdcf41da7316252b717c60c409992b "Bluetooth: ISO: Fix memory corruption" 8a3fd9bb4fac67ad5d44d6540c7ac20004767076 "Bluetooth: ISO: Fix iso_sock_getsockopt for BT_DEFER_SETUP" aac59090a068139550f9b73d46d1116e31cdd2d1 "Bluetooth: ISO: Fix not using the correct QoS" eca0ae4aea66914515e5e3098ea051b518ee5316 "Bluetooth: Add initial implementation of BIS connections" Let me know if I can help fixing this issue. > --- > include/net/bluetooth/bluetooth.h | 33 ++- > include/net/bluetooth/hci.h | 28 +- > include/net/bluetooth/hci_core.h | 107 +++++++- > include/net/bluetooth/hci_sock.h | 2 + > include/net/bluetooth/hci_sync.h | 3 + > net/bluetooth/Kconfig | 1 + > net/bluetooth/hci_conn.c | 440 ++++++++++++++++++++++++++++++ > net/bluetooth/hci_core.c | 230 ++++++++++++---- > net/bluetooth/hci_event.c | 307 ++++++++++++++++++++- > net/bluetooth/hci_sync.c | 49 +++- > 10 files changed, 1145 insertions(+), 55 deletions(-) > > ... Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland