Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp693459ybb; Wed, 25 Mar 2020 07:52:44 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu0+EswyWH5X2lqBDaw0galfIEGXPPKQ9g+W8rqhqRkCJdVG3X8KwWQkcLuTlpRYT1fdCid X-Received: by 2002:aca:706:: with SMTP id 6mr2581752oih.115.1585147964796; Wed, 25 Mar 2020 07:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585147964; cv=none; d=google.com; s=arc-20160816; b=BExx6NlwoBhw4uuAvVTPcZ5NYV29b+1leijqERaexElVvM2EjGY09LUQ/zMc42L5CN feXzgDjdNT0ax+VT+ejTRmvQFRmRx3vHoc6OL9718fuktzkI3O50dKqoDT5Ms4R5oW+7 ruGY8WMM/jgl/5j3wc5954WmxDCkS17TappVr7C7TWfXyWCH/ebBuABvKkony/v/m1e/ UaZ53OEUmJnRIqQLdg6vofVF4gr0F+So7NXdHptJtbo8EoKFPgT3LOoycmW8+BrLfkIY LWJn8Smbl2bcm3ql07cU2chdrQDAu96m9ny5/y5TV4t8eFj3q49f8D4c3qQZqt4yXT1p +rug== 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=FVfpCJEOchBHDIVhyra9PnNcgdTnuJAbgdx3WHUqOrg=; b=rBrummmIu4iKOrBQoIq+fkP0XEIJv2O7aNpgBXF3Uti5RDBqcoyh8YifLyBQaFZX3u T0N2KOqBEcV8BvPg2EBz3unKmbIt+FRdrcLR8Icx6nsczhY2RVCNmwmP4lmVX/zdr0SW FTF9x0l7RmebsT1q1CBjtDm01dhlezx7F2UI6WEUf+uDJjrK2hsDFyO0t8PUW8YvuEsP P7c/kJxAN1oFET/lpqSFNAwdQjGcW6QLEz7NbuQ+KLLStJleg+rGslO6+wEPZeO1Gc3J TnW1CuNzy8dMXHamtW+2s1PK9VPV4+ruNCT1WX6J/RbRDPiwEIDsd24MZCyKaHwD6HAz jIaQ== 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 64si6582628otn.173.2020.03.25.07.52.32; Wed, 25 Mar 2020 07:52:44 -0700 (PDT) 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 S1726969AbgCYOw1 (ORCPT + 99 others); Wed, 25 Mar 2020 10:52:27 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:44948 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727123AbgCYOw1 (ORCPT ); Wed, 25 Mar 2020 10:52:27 -0400 Received: from marcel-macpro.fritz.box (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id 29F18CECCF; Wed, 25 Mar 2020 16:01:56 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH v4] bluetooth: don't assume key size is 16 when the command fails. From: Marcel Holtmann In-Reply-To: <20200325144834.207572-1-alainm@chromium.org> Date: Wed, 25 Mar 2020 15:52:24 +0100 Cc: linux-bluetooth@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: <53AACEE6-56A0-4D14-AF46-D9AFFF984B2E@holtmann.org> References: <20200325144834.207572-1-alainm@chromium.org> To: Alain Michaud X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Alain, > With this change, the encryption key size is not assumed to be 16 if the > read_encryption_key_size command fails for any reason. This ensures > that if the controller fails the command for any reason that the > encryption key size isn't implicitely set to 16 and instead take a more > concervative posture to assume it is 0. > > Signed-off-by: Alain Michaud > > --- > > net/bluetooth/hci_event.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel