From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.170 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796321652; b=qHuusLjpeLuxMrR1VNyaWBcqPo65oSxv6hcEP7+2Rn2p8gLMf/rv9NqnQvaJ9zcyAY6Y ebIrKG2Uol5xz8e03+h+M9zTkw565dEn+VYgWewXwAdIScbTqkOEHNVzntzFlvnth8ReW FiaefStJVEDGrGJ7CFaHlMI3ffV9FLHPqr6L/833fzi95zYpc/pkNzVg288sfxtAY3rUI VHbR8Yj8ST1m8gqymcFqHZm7ONU5iaXWcBGyaqKCn0vWLB1F31xCBmI7ssqr45PusUi12 4z2M+0yyboXafjiUdzFXxXB5fgAX3uXCHmkIyVwMx1xz4Sfq/kqWi25ACXLsoQOMBFw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796321652; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Subject:Date: Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=0F8l2nF4O6iRVDXIQtsBEzC+FFuFwM8TCvjwPNUu0LQ=; b=OC6uRTn7caHqUmIWb1sDYyJWrIKnbaT/fV8H+hBGM2p4u1O0iM7AuExobWmSdZDCgVvN b5gJFZbqrxdLNlHLTS628id4vQhctsA2Um8THUPMnW+/ImC0r0JveQEyhG9C+Gz54MHNI Jj/aKHdEMCXwkXgYr567t2TQIhDLcJVvlFXHI4QxhdBQjTScB1uWaxjWsirepYUT8usoU 1hDZIWKcHqxd7N/gkszcfDjoBEYSmgwD7v/h0kQjCAXPA9OyZbK+gz6LvwasalWZMlq9/ NAhs/HhzHv4dyuLrG5FvmLHgSDRlW6k4nH32ERS5aeQUWm2YaTGKDG2JD1uqPrKwADg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="iTTLjY/t"; arc=none smtp.remote-ip=209.85.221.170 Received: from mail-vk1-f170.google.com (mail-vk1-f170.google.com [209.85.221.170]) (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 4C10B606A32F for ; Thu, 3 Dec 2026 18:14:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4C10B606A32F 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=iTTLjY/t Received: by mail-vk1-f170.google.com with SMTP id 71dfb90a1353d-5f0166fe304so10199e0c.0 for ; Thu, 03 Dec 2026 10:14:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796321651; x=1796926451; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=0F8l2nF4O6iRVDXIQtsBEzC+FFuFwM8TCvjwPNUu0LQ=; b=iTTLjY/twLFZGt3mxBABxUzoci3FsdhvoCRtryjdtjAQTEBJGAEarnLss9Z11rwrxJ jdq80JJh8PrORNd73tv4zFDWeuIOdvHT+1Kg4BH7cX2XeCQ6qmh16TJx6uCeuxpJNBSr LXPEDUBKTZgEcXGckcwKhnfGE5OYWjN72rktGdq5HQzi9+LapiTuuJsKVbPwA9H9cNpb 4yGwNeHdybBz2RGN6NKhfXbTeeN4wf/1lUdFfoKhPjCO09uEiimELks/WIh9iRXueFc0 dwb/B8GE5OjJ7GmkYcHI+21ZbR8tLUs8votMuUuOhjExJxapI8h9kjd6R7xlQzoVRYiY WUYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796321651; x=1796926451; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=0F8l2nF4O6iRVDXIQtsBEzC+FFuFwM8TCvjwPNUu0LQ=; b=IWEuoSflZZO1o9Op47m0njxgFbRKf1Kr5ZTeFqLKyE5V4AD/s9Q+mwYNvHrZw8rgi9 T9gPJkwA6NdxB428cRSXE6/bYwzn/+3ngH0BgdLiOPi3h+od3t51AGRviY4u7oe8JnIo JVzA5BtYT4ZfN5S5EWWKpreFi4Sod0XyE4y+ICTFR46qRkKUHO+K0skJqZqvmro5j8FD Y5OTWCwD9klp4Y0PsCIWw+kzEuB/ijFUQkUc1IxVQ6c/OGEa4k9e3PDbnPJYEnhUdOIm CYvYxQLwHrMpJzKOEOcq6JINLJZfk6xLZBufFLqhDfBj5th30Fi3N5bwu1ahd3vR7oJE 4agQ== X-Gm-Message-State: APuU4Z/lHNODwYyKc4Dub9icBDkJUFDcVtDWfCp2i5ZxiEEBrtMeKe6j y63GEA3y3Grhj9mQpvzvIpYwMseR1mNdmIx+WdIP2xC3AsTARjS5aqDQhEYpqs6o X-Gm-Gg: AZFdTZeyf0GWV88GNgs2qByp+yu3dxVW+myeHkXoA/JMrfKblwEtLeGjbi+8q5KXAW4 ab2eNG5AwukuKJNidEXkqggmKX7DLh25y0F7ZZCPKfNIdJC3hnnkJKXtZlrNmL8pAYO02b+6iTW ki+Hp47nOf5vEhubGNyuJSHfSA4buPVWdt57j37kcoHSlpVWfKJbvRIiq5b8YP7ZGBP/fmpKQRL ilbjifhgpx1cLwm4y1wiP9YAMTysNbMJGCyQ3arQHsTPJEeMGSbaldxa8PVnUl7UP+zErtUmMCD a4mweY48HQcTiaJtf4AR/TbcsYvPP4j35HdNESlHi910WVTqnkBXQkRIKeAjmlJ9p/Fx4nZO8oG +u65lh1/go9hWYS6ABaw450Mc5EVPp2fS68n7UM9FaqL0X2LOo0X1Zsr2v5p/IGKUSz/YtgGzyS wqJUWE4UWAya8/PQEs7/YJ6ybRPZwivTSFD/4NObFjXkaRpl0v93vYMQRseYd4JaTgGAz27diP/ fQLtWF7p6JwC7pHxZnoCEp+3MEHiKunf2ljtfhrC2kZIJOcYLjCmti12TLWu5PGitXoZeGnsNRH rDVcnMCoN7bJuC68+2wIVFMiIxu5CWV5/4XXx2rziMwaunkP4aNev4e5PCrDEegJgT7LgDDcnZY kqSL9NRLo6cfWCuRk8xiGARQLfAiypuIj6ube6C826PiKi5/xMn8ZAsw= X-Received: by 2002:a05:6122:d25:b0:5ee:4003:6b93 with SMTP id 71dfb90a1353d-5ee8af03fefmr29955923e0c.13.1796321651253; Thu, 03 Dec 2026 10:14:11 -0800 (PST) Received: from lvondent-mobl5 ([72.188.211.115]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5f01a1c2133sm202284e0c.2.2026.12.03.10.14.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 10:14:10 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v17 0/2] Bluetooth: L2CAP: Fix LE credits resuming channels pending security Date: Thu, 3 Dec 2026 13:13:59 -0500 Message-ID: <20261203181401.774560-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.56.1 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 From: Luiz Augusto von Dentz An LE Flow Control Credit packet resumes the channel, which on a CoC waiting for a security upgrade requested with BT_SECURITY drains queued data and clears the socket suspension before the upgrade completes. This version is a simplified rework of v16: rather than tracking the upgrade with a separate work, an established CoC is now moved to BT_CONFIG with FLAG_PENDING_SECURITY set, like ATT, while the upgrade is pending, so credits are only accounted, not acted upon, and the existing l2cap_security_cfm() path resumes or closes the channel once the upgrade completes. This set has a companion userspace set for BlueZ adding l2cap-tester cases covering it: [PATCH BlueZ v1 0/2] l2cap-tester: Add tests for changing LE security with SMP pending Changes in v17: - Drop the security work, SMP hooks and the ECRED/BT_RCVMTU changes. - Move established CoCs to BT_CONFIG while a BT_SECURITY upgrade is pending and accept credits and data in that state. v16: https://lore.kernel.org/linux-bluetooth/20261201022855.1483888-1-cochcoder@proton.me/ Kyle Pepper (2): Bluetooth: L2CAP: Restrict LE credits to connected CoCs Bluetooth: L2CAP: Keep credits from completing security upgrades net/bluetooth/l2cap_core.c | 38 +++++++++++++++++++++++++++++++++++++- net/bluetooth/l2cap_sock.c | 19 +++++++++++++++++-- 2 files changed, 54 insertions(+), 3 deletions(-) -- 2.56.1