OSDN Git Service
Treehugger Robot [Fri, 21 Aug 2020 17:31:25 +0000 (17:31 +0000)]
Merge "GD Security: Improve Enforce() workflow" am:
cd7786f840
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1404971
Change-Id: Ia7864cf1ed6c0bb07cb76d9f4a3f1ca2a8059e8b
Treehugger Robot [Fri, 21 Aug 2020 17:15:26 +0000 (17:15 +0000)]
Merge "GD Security: Improve Enforce() workflow"
Jakub Pawlowski [Fri, 21 Aug 2020 07:27:09 +0000 (07:27 +0000)]
Fix address passing when we accept incoming connection am:
4354abb3ed
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1372437
Change-Id: I40de75420e7df4499ec6341869d31c3dea2ccd7d
Jakub Pawlowski [Fri, 24 Jul 2020 10:58:56 +0000 (12:58 +0200)]
Fix address passing when we accept incoming connection
Tag: #gd-refactor
Bug:
155399771
Test: gd/cert/run --host LeSecurityTest
Change-Id: I21ceb49fe1b69e447e3d2e282db5d02b7a0c1bfe
Hansong Zhang [Wed, 19 Aug 2020 21:52:53 +0000 (14:52 -0700)]
GD Security: Improve Enforce() workflow
InternalEnforceSecurityPolicy establishes the requirement
- ENCRYPTED_TRANSPORT: If paired but not encrypted, just wait for
encryption change; if unpaired, pair with NO_BOND_NO_MITM
- AUTHENTICATED_ENCRYPTED_TRANSPORT: Similar as above, but we need to
pair again if existing LK is not authenticated. Exception: If no MITM
is needed during pairing, we assume authenticated LK is not possible,
so we allow connection. In the future, use IO cap to check.
When link is encrypted, or new pairing is complete, we invoke
UpdateLinkSecurityCondition.
Test: cert/run --host
Test: CtsVerifier Insecure RFCOMM client
Tag: #gd-refactor
Bug:
141555841
Change-Id: Ic5792c8e967cd068e08df4702393ae3188c6d4e8
Treehugger Robot [Thu, 20 Aug 2020 22:35:04 +0000 (22:35 +0000)]
Merge "AclManager: Handle default data length" am:
3eeb3f9a47
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405187
Change-Id: Ibe08664b9b564811d097fc9254bfbd78460216b2
Treehugger Robot [Thu, 20 Aug 2020 22:34:58 +0000 (22:34 +0000)]
Merge "Remove unused API" am:
321029a933
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405178
Change-Id: I45b93527625fce65cde9f9e97a5b19fa2eb8a417
Treehugger Robot [Thu, 20 Aug 2020 22:34:52 +0000 (22:34 +0000)]
Merge changes I4b15d054,Id53d86f3,Icc604d09,Ib19ee20d,I550d96d1, ... am:
6c68f8edaa
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405177
Change-Id: I57b3e63ea7dbd90fd9e457e391c2a6425ff439a1
Treehugger Robot [Thu, 20 Aug 2020 22:20:44 +0000 (22:20 +0000)]
Merge "AclManager: Handle default data length"
Treehugger Robot [Thu, 20 Aug 2020 22:18:42 +0000 (22:18 +0000)]
Merge "Remove unused API"
Treehugger Robot [Thu, 20 Aug 2020 21:08:21 +0000 (21:08 +0000)]
Merge changes I4b15d054,Id53d86f3,Icc604d09,Ib19ee20d,I550d96d1, ...
* changes:
Unify def tBTM_SEC_CBACK=>tBTM_SEC_CALLBACK
Simplify stack/acl/btm_acl::btm_acl_created()
Removed unused tACL_CONN fields
Use API stack/acl/btm_acl
Add APIs to stack/acl/btm_acl
Use API stack/acl/btm_acl::btm_acl_connection_request
Add API stack/acl/btm_acl::btm_acl_connection_request
Wrap tL2C_LCB::link_role in API
Rename btm_dev_support_switch
Streamline stack/btm/btm_dev::btm_dev_support_switch
Replace BTM_ACL_PKT_TYPES_MASK_
Jakub Pawlowski [Thu, 20 Aug 2020 20:25:50 +0000 (20:25 +0000)]
Merge changes I1aa0ab27,Ice003a60 am:
05a62c110f
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1398109
Change-Id: I84ededccd9010746a66c47ba17f67dc1b434b950
Hansong Zhang [Thu, 20 Aug 2020 18:31:07 +0000 (11:31 -0700)]
Remove unused API
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6805be8b23b3ab284a1e6437387365d9b04cde50
Jakub Pawlowski [Thu, 20 Aug 2020 20:16:20 +0000 (20:16 +0000)]
Merge changes I1aa0ab27,Ice003a60
* changes:
hci: Add Broadcast Isochronous Sets related commands
hci: Add additional iso related commands
Chris Manton [Thu, 20 Aug 2020 17:39:23 +0000 (10:39 -0700)]
Unify def tBTM_SEC_CBACK=>tBTM_SEC_CALLBACK
The names were aliases to each other
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4b15d054adc53b0e13f916fc08dcaf17c91d6008
Chris Manton [Tue, 18 Aug 2020 17:34:35 +0000 (10:34 -0700)]
Simplify stack/acl/btm_acl::btm_acl_created()
Remove copy once/read never fields:
DEV_CLASS
BD_NAME
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id53d86f370777cc999c4a060aa99a87edd2eb08c
Chris Manton [Tue, 18 Aug 2020 17:25:30 +0000 (10:25 -0700)]
Removed unused tACL_CONN fields
tACL_CONN::BD_NAME
tACL_CONN::DEV_CLASS
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Icc604d09c9ca5e5ca30d6af622214f2580437f3a
Chris Manton [Thu, 20 Aug 2020 16:54:12 +0000 (09:54 -0700)]
Use API stack/acl/btm_acl
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib19ee20ddf598ba0bf1d74a12a5686d7558f2fce
Chris Manton [Thu, 20 Aug 2020 16:35:52 +0000 (09:35 -0700)]
Add APIs to stack/acl/btm_acl
acl_accept_connection_request
acl_reject_connection_request
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I550d96d1dc04b5576996db919def6580c9a947d1
Chris Manton [Thu, 20 Aug 2020 16:17:37 +0000 (09:17 -0700)]
Use API stack/acl/btm_acl::btm_acl_connection_request
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ie02b35f15f6e773b6f6a793c33b675f2208865fe
Chris Manton [Thu, 20 Aug 2020 15:59:29 +0000 (08:59 -0700)]
Add API stack/acl/btm_acl::btm_acl_connection_request
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iaa2bc3870b87b1394ed7363afa0827b93a9bb2ca
Chris Manton [Thu, 20 Aug 2020 15:48:32 +0000 (08:48 -0700)]
Wrap tL2C_LCB::link_role in API
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4a10763a8107f0a9dbc0ddf62d0671fe9b41a63f
Chris Manton [Mon, 17 Aug 2020 22:00:19 +0000 (15:00 -0700)]
Rename btm_dev_support_switch
=>btm_dev_support_role_switch
Streamline stack/btm/btm_dev::btm_dev_support_switch
Bug:
162984360
Tag: #refactor
Test: compiles and devices pair and work
Change-Id: I529006c587b67c6545656febc5a5f2b1daabe186
Chris Manton [Mon, 17 Aug 2020 21:32:08 +0000 (14:32 -0700)]
Streamline stack/btm/btm_dev::btm_dev_support_switch
Bug:
162984360
Tag: #refactor
Test: compiles and devices pair and work
Change-Id: I838a258471b484c29dc3828e1c940065451a10b0
Chris Manton [Sun, 16 Aug 2020 18:27:01 +0000 (11:27 -0700)]
Replace BTM_ACL_PKT_TYPES_MASK_
BTM_ACL_PKT_TYPES_MASK_DM1=>HCI_PKT_TYPES_MASK_DM1
BTM_ACL_PKT_TYPES_MASK_DH1=>HCI_PKT_TYPES_MASK_DH1
BTM_ACL_PKT_TYPES_MASK_DM3=>HCI_PKT_TYPES_MASK_DM3
BTM_ACL_PKT_TYPES_MASK_DH3=>HCI_PKT_TYPES_MASK_DH3
BTM_ACL_PKT_TYPES_MASK_DM5=>HCI_PKT_TYPES_MASK_DM5
BTM_ACL_PKT_TYPES_MASK_DH5=>HCI_PKT_TYPES_MASK_DH5
BTM_ACL_PKT_TYPES_MASK_NO_2_DH1=>HCI_PKT_TYPES_MASK_NO_2_DH1
BTM_ACL_PKT_TYPES_MASK_NO_3_DH1=>HCI_PKT_TYPES_MASK_NO_3_DH1
BTM_ACL_PKT_TYPES_MASK_NO_2_DH3=>HCI_PKT_TYPES_MASK_NO_2_DH3
BTM_ACL_PKT_TYPES_MASK_NO_3_DH3=>HCI_PKT_TYPES_MASK_NO_3_DH3
BTM_ACL_PKT_TYPES_MASK_NO_2_DH5=>HCI_PKT_TYPES_MASK_NO_2_DH5
BTM_ACL_PKT_TYPES_MASK_NO_3_DH5=>HCI_PKT_TYPES_MASK_NO_3_DH5
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6c1420266afdb584612cf96cbfae32d437a83a90
Treehugger Robot [Thu, 20 Aug 2020 18:27:34 +0000 (18:27 +0000)]
Merge changes Icedbc393,I396b7959 am:
180041861a
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1401334
Change-Id: I4a71138fb8424378a0ba9a4189588208ce0c9466
Treehugger Robot [Thu, 20 Aug 2020 18:19:52 +0000 (18:19 +0000)]
Merge changes Icedbc393,I396b7959
* changes:
Check for MITM required.
Fall back to local AuthenticationRequirements to set values
Myles Watson [Wed, 19 Aug 2020 06:26:22 +0000 (23:26 -0700)]
AclManager: Handle default data length
Bug:
145832107
Test: cert/run --host
Tag: #gd-refactor
Change-Id: I851f22db86687801232621e738deeecf2df51834
Hansong Zhang [Thu, 20 Aug 2020 17:16:48 +0000 (17:16 +0000)]
p_auth_complete_callback is no-op for HCI_SUCCESS case am:
31ecf7784a
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405429
Change-Id: I734ca7cd44d3b63edc70c31e937625a41778a265
Treehugger Robot [Thu, 20 Aug 2020 17:16:37 +0000 (17:16 +0000)]
Merge "Ensure IO Cap Response received before processing UserConfirmationRequest" am:
a63b1eef93
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405674
Change-Id: I95e24d14e9ecf6fe1f2e869dcb685335cffdac2c
Hansong Zhang [Thu, 20 Aug 2020 07:56:47 +0000 (00:56 -0700)]
p_auth_complete_callback is no-op for HCI_SUCCESS case
Remove.
Test: cert/run --host
Tag: #gd-refactor
Bug:
141555841
Change-Id: Id1e511b2358c8695da721ce6750a8a6eddd1dac4
Treehugger Robot [Thu, 20 Aug 2020 17:09:36 +0000 (17:09 +0000)]
Merge "Ensure IO Cap Response received before processing UserConfirmationRequest"
Treehugger Robot [Thu, 20 Aug 2020 17:03:37 +0000 (17:03 +0000)]
Merge changes I83637165,I4af96edd,I8e0ef282,I6bd6f659,I25e6810c, ... am:
7b5c5cba7d
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405671
Change-Id: Icf865fd9bff51b9a20c358624c1190664a2ae951
Treehugger Robot [Thu, 20 Aug 2020 16:40:08 +0000 (16:40 +0000)]
Merge changes I83637165,I4af96edd,I8e0ef282,I6bd6f659,I25e6810c, ...
* changes:
Wrap l2c::IsBonding in API
Streamline includes stack/l2cap/l2c_link
Move l2cu_get_next_buffer_to_send
Move stack/l2cap/::l2cu_get_next_channel_in_rr
Remove def L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
Remove def L2CAP_NUM_FIXED_CHNLS Optimization
Jakub Tyszkowski [Thu, 20 Aug 2020 15:54:31 +0000 (15:54 +0000)]
stack/btm: Support Reading Peer SCA am:
b59379b6ca
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1353772
Change-Id: I006399ccfb41410ecd7af32502ee2fa230894c2e
Grzegorz Kołodziejczyk [Tue, 11 Aug 2020 12:59:41 +0000 (14:59 +0200)]
hci: Add Broadcast Isochronous Sets related commands
This is required for audio broadcaster functionality.
Bug:
150670922
Tag: #feature
Sponsor: jpawlowski@
Test: compilation
Change-Id: I1aa0ab271e188f70eda579f212e6870557cef7e5
Grzegorz Kołodziejczyk [Tue, 11 Aug 2020 13:07:19 +0000 (15:07 +0200)]
hci: Add additional iso related commands
These are not necessary for the upcoming le audio implementation
but may become useful in near future.
Bug:
150670922
Tag: #feature
Sponsor: jpawlowski@
Test: compilation
Change-Id: Ice003a604da44d5430b6b356e6f16d0fcbdf1873
Chris Manton [Thu, 20 Aug 2020 06:04:53 +0000 (23:04 -0700)]
Wrap l2c::IsBonding in API
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8363716501145101ea025bd44aa35fa7f870b2eb
Chris Manton [Thu, 20 Aug 2020 00:50:06 +0000 (17:50 -0700)]
Streamline includes stack/l2cap/l2c_link
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4af96eddeb1dd30d10b766df1f617b4381a4e2f3
Chris Manton [Thu, 20 Aug 2020 00:23:45 +0000 (17:23 -0700)]
Move l2cu_get_next_buffer_to_send
From: stack/l2cap/l2c_utils
Into: stack/l2cap/l2c_link
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I8e0ef282d5bae9a0deb0e465b326d7889d67d5e8
Chris Manton [Thu, 20 Aug 2020 00:27:41 +0000 (17:27 -0700)]
Move stack/l2cap/::l2cu_get_next_channel_in_rr
From: stack/l2cap/l2c_utils
Into: stack/l2cap/l2c_link
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6bd6f659d312c893564de7d3c07d429d38da76a8
Chris Manton [Wed, 19 Aug 2020 23:40:24 +0000 (16:40 -0700)]
Remove def L2CAP_ROUND_ROBIN_CHANNEL_SERVICE
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I25e6810c157914ebca1d5d135394f70c4f3ffdaf
Chris Manton [Wed, 19 Aug 2020 23:10:27 +0000 (16:10 -0700)]
Remove def L2CAP_NUM_FIXED_CHNLS Optimization
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Idbfc3b0dd32cdb6161b38f8436e4b5d3a89b6d0a
Jakub Pawlowski [Thu, 20 Aug 2020 12:42:35 +0000 (12:42 +0000)]
Merge "btm: Initial Iso Manager implementation" am:
c55a0e8f0e
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1353770
Change-Id: I0976ea5973aedda82619ee3bdd942e052322f069
Jakub Tyszkowski [Tue, 18 Aug 2020 11:15:55 +0000 (13:15 +0200)]
stack/btm: Support Reading Peer SCA
Bug:
150670922
Tag: #feature
Sponsor: jpawlowski@
Test: compilation
Change-Id: Ia65d8aea66850a780909c240291934ea668cb6ea
Jakub Pawlowski [Thu, 20 Aug 2020 12:33:38 +0000 (12:33 +0000)]
Merge "btm: Initial Iso Manager implementation"
Treehugger Robot [Thu, 20 Aug 2020 11:49:21 +0000 (11:49 +0000)]
Merge "GD-HCI: Flush snoop log to kernel buffer on every write" am:
e3a5239a92
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405316
Change-Id: Ib24868326ffa039734944a90f91d212f1501d3e2
Zach Johnson [Thu, 20 Aug 2020 11:49:15 +0000 (11:49 +0000)]
Merge changes Ic895dce8,I80b661d6,I108d89b0,Ia0963f5e,I63d2703c, ... am:
b5c8af6af8
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405597
Change-Id: I9c464a042061bb0813bb3fcfea6775b9699472d7
Treehugger Robot [Thu, 20 Aug 2020 11:36:19 +0000 (11:36 +0000)]
Merge "GD-HCI: Flush snoop log to kernel buffer on every write"
Zach Johnson [Thu, 20 Aug 2020 11:34:35 +0000 (11:34 +0000)]
Merge changes Ic895dce8,I80b661d6,I108d89b0,Ia0963f5e,I63d2703c, ...
* changes:
More security flag hidings
More security flag hiding
More security flag hiding
Flatten BTA_JvIsEncrypted
Simplify BTA_JvIsEncrypted
Start hiding security flags
We don't do AMP
Remove p_authorize_callback, it's never used
btm_sec_are_all_trusted is never called
trusted_mask is self refrential and always 0
Remove trusted_mask from BTM_SecBond
Remove trusted mask from BTM_SecAddDevice
BTM_SEC_IS_SERVICE_TRUSTED is never used
BTM_SecClrTempAuthService does nothing
last_author_service_id is never meaningfully set
Remove BTM_SEC_AUTHORIZED, it's only removed or checked
Jakub Tyszkowski [Thu, 20 Aug 2020 10:58:19 +0000 (10:58 +0000)]
btm: Initial Iso Manager implementation
This adds the ISO Manager used to manage the CIG/CIS and
in future patches also BIG/BIS channels. It defines an API
for the user to call and callback interfaces that the user
has to implement and register in the ISO Manager to use it.
Bug:
150670922
Tag: #feature
Test: atest --host net_test_btm_iso
Sponsor: jpawlowski@
Change-Id: I0f4719b6efb74a7350cf3d6d9263bf855d60ce6f
Zach Johnson [Thu, 20 Aug 2020 10:28:58 +0000 (10:28 +0000)]
Merge changes Ifad48ac1,Iec6e7550,I68ff2112,Ibb875781,Iae859fcc, ... am:
7a729122b1
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405314
Change-Id: I6b43faab0f5cf67e6f60e14dc9047eed1fd4a273
Zach Johnson [Thu, 20 Aug 2020 10:20:38 +0000 (10:20 +0000)]
Merge changes Ifad48ac1,Iec6e7550,I68ff2112,Ibb875781,Iae859fcc, ...
* changes:
BTM_SEC_OUT_FLAGS used to include authorized
this used to check for authorized
Remove always false expressions
This expression is also never true
This condition is never true
Simpify boolean expression
Remove useless redefinition BTM_SEC_FLAG_AUTHORIZED
BTM_SEC_OUT_AUTHENTICATE is never set, only checked or removed
BTM_SEC_IN_AUTHORIZE is never set, only checked or removed
Remove BTA_AV_WITH_AVCTP_AUTHORIZATION
BTA_SEC_AUTHENTICATE does not include authorization
Flatten bta_av_cb.sec_mask
The security mask is always BTA_SEC_AUTHENTICATE
Internalize BTA_AvEnable's security mask
Flatten BTA_SEC_AUTHORIZE
Treehugger Robot [Thu, 20 Aug 2020 09:47:02 +0000 (09:47 +0000)]
Merge "Add boolean flag for indicating IO Cap Response received" am:
5dd4773ef3
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405673
Change-Id: I8b5e1174683b88084c7e1887d003df5af54d1c9f
Treehugger Robot [Thu, 20 Aug 2020 09:27:23 +0000 (09:27 +0000)]
Merge "Add boolean flag for indicating IO Cap Response received"
Treehugger Robot [Thu, 20 Aug 2020 08:59:18 +0000 (08:59 +0000)]
Merge "Ensure we delete the link key from the controller." am:
3523729335
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405672
Change-Id: I2c22c6b2017088e5e5903204de6d944b50ec2a0d
Treehugger Robot [Thu, 20 Aug 2020 08:44:21 +0000 (08:44 +0000)]
Merge "Ensure we delete the link key from the controller."
Jack He [Thu, 20 Aug 2020 08:29:24 +0000 (01:29 -0700)]
GD-HCI: Flush snoop log to kernel buffer on every write
* std::ofstream::flush() pushes user data into kernel memory. The data
will be written even if this process crashes. However, data will be lost
if there is a kernel panic, which is out of scope of BT snoop log.
* std::ofstream::write() followed by std::ofstream::flush() has similar
effect as UNIX write(fd, data, len) as write() syscall dumps data into
kernel memory directly
* Before this change, btsnoop log data might be partially stored in
memory when bluetooth stack crashes, causing broken log entries
or missing packets
Bug:
164973960
Test: make, flash phone, and test pairing
Tag: #gd-refactor
Change-Id: I611e0b9480511b569dadbb023775b0db8159f39d
Chris Manton [Thu, 20 Aug 2020 08:27:27 +0000 (08:27 +0000)]
Simplify stack/l2cap/::l2c_link_check_send_pkts am:
1f098dd15b
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405097
Change-Id: I21c8e9b76584acc45ce85111a910277c0f78e155
Martin Brabham [Fri, 14 Aug 2020 21:24:22 +0000 (14:24 -0700)]
Check for MITM required.
Per specification; if MITM is required then AUTO is NOT ALLOWED!
Bug:
162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: Icedbc393ae03610a3b8095c26a5f6ff5dfdec6c2
Martin Brabham [Thu, 20 Aug 2020 06:03:03 +0000 (23:03 -0700)]
Ensure IO Cap Response received before processing UserConfirmationRequest
Bug:
162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: Iab245ff61b9a747b6a93336f7a75e2f3e4727054
Martin Brabham [Thu, 20 Aug 2020 06:06:18 +0000 (23:06 -0700)]
Fall back to local AuthenticationRequirements to set values
Bug:
162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I396b79593653279cdfdbcdcb97a0392d0e465bf4
Zach Johnson [Thu, 20 Aug 2020 01:34:16 +0000 (18:34 -0700)]
More security flag hidings
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic895dce8b28a9a1dffca1800580dfd08b2c55941
Zach Johnson [Thu, 20 Aug 2020 01:13:55 +0000 (18:13 -0700)]
More security flag hiding
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I80b661d6a6e438368428927e8f1e803b0638696b
Zach Johnson [Thu, 20 Aug 2020 01:08:34 +0000 (18:08 -0700)]
More security flag hiding
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I108d89b0c340e5114a129f5af639a8a8fc5e2678
Zach Johnson [Thu, 20 Aug 2020 00:56:27 +0000 (17:56 -0700)]
Flatten BTA_JvIsEncrypted
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia0963f5e1ef783eb48b29e61ac5cbc96d62b5614
Zach Johnson [Thu, 20 Aug 2020 00:54:21 +0000 (17:54 -0700)]
Simplify BTA_JvIsEncrypted
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I63d2703c50fdaa67db035ce954b68ff681022d51
Zach Johnson [Thu, 20 Aug 2020 00:50:41 +0000 (17:50 -0700)]
Start hiding security flags
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ia88a7e71b4a2b4b8347a6f12a2f6d362232d090d
Zach Johnson [Thu, 20 Aug 2020 00:14:58 +0000 (17:14 -0700)]
We don't do AMP
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I87ab869e151465995728bd84ee9fa4b5b068bb4c
Zach Johnson [Thu, 20 Aug 2020 00:10:35 +0000 (17:10 -0700)]
Remove p_authorize_callback, it's never used
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I781796e16a5170aa69c344e54a6bcdcfc69fb7ee
Zach Johnson [Wed, 19 Aug 2020 23:16:16 +0000 (16:16 -0700)]
btm_sec_are_all_trusted is never called
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I6dfd7e4e16091ac55a4b30a4eb4bf4783a0efba2
Zach Johnson [Wed, 19 Aug 2020 23:08:43 +0000 (16:08 -0700)]
trusted_mask is self refrential and always 0
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4659415431ce835b2c8082a3c0f3fc65bf71cf82
Zach Johnson [Wed, 19 Aug 2020 22:33:32 +0000 (15:33 -0700)]
Remove trusted_mask from BTM_SecBond
it's always zero, does nothing, is useless
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4a4f7141fbd7d06e2e7d281416424c87da3033eb
Zach Johnson [Wed, 19 Aug 2020 22:08:31 +0000 (15:08 -0700)]
Remove trusted mask from BTM_SecAddDevice
It's just zeroed out, internalize it
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib840fad787ee1dc73fdbbf79bdae3f37742f38fa
Zach Johnson [Wed, 19 Aug 2020 22:00:21 +0000 (15:00 -0700)]
BTM_SEC_IS_SERVICE_TRUSTED is never used
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If4f892e78e9e95f6e426e4e4af883b14705fc9a2
Zach Johnson [Wed, 19 Aug 2020 21:57:56 +0000 (14:57 -0700)]
BTM_SecClrTempAuthService does nothing
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7a402fa6c9db09557f080ed65401e8e2549ed762
Zach Johnson [Wed, 19 Aug 2020 21:56:47 +0000 (14:56 -0700)]
last_author_service_id is never meaningfully set
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ieaa9e6865e4ffcefd9bf55c1e3ded7d6302aa599
Zach Johnson [Wed, 19 Aug 2020 21:47:06 +0000 (14:47 -0700)]
BTM_SEC_OUT_FLAGS used to include authorized
but now it doesn't so we only need the condition
above this one
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ifad48ac18f92e9922eaa9fe04fe66ca04bbd80b2
Zach Johnson [Wed, 19 Aug 2020 21:51:27 +0000 (14:51 -0700)]
Remove BTM_SEC_AUTHORIZED, it's only removed or checked
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0c200fd53f0ac1a932ab5b4c2ffd303481eef425
Zach Johnson [Wed, 19 Aug 2020 21:43:35 +0000 (14:43 -0700)]
this used to check for authorized
BTM_SEC_IN_FLAGS was BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT |
BTM_SEC_IN_AUTHORIZE
authorized is gone now, so we only need the condition just above this
one
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iec6e7550b29a72627a8f52d8b49ae918c3adadce
Zach Johnson [Wed, 19 Aug 2020 21:39:18 +0000 (14:39 -0700)]
Remove always false expressions
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I68ff2112c0fc395e82a0b2ab6ed0cc1f3829915f
Zach Johnson [Wed, 19 Aug 2020 21:33:14 +0000 (14:33 -0700)]
This expression is also never true
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ibb8757817e59a0b4db26c9cf78b12f6ddf25633b
Zach Johnson [Wed, 19 Aug 2020 21:23:00 +0000 (14:23 -0700)]
This condition is never true
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iae859fcc90f6f297bb28c9528f3e2dafdbfd1d0e
Zach Johnson [Wed, 19 Aug 2020 21:22:07 +0000 (14:22 -0700)]
Simpify boolean expression
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic8717d02f73c5fc0ca2f6f7be4173b1574613490
Zach Johnson [Wed, 19 Aug 2020 21:19:31 +0000 (14:19 -0700)]
Remove useless redefinition BTM_SEC_FLAG_AUTHORIZED
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I93b35b22801192ce68a7472f729a1b5eb54fe4f1
Zach Johnson [Wed, 19 Aug 2020 21:15:50 +0000 (14:15 -0700)]
BTM_SEC_OUT_AUTHENTICATE is never set, only checked or removed
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I3d97507cba7aafefb6d49a2ab60b0132d4ff1cde
Zach Johnson [Wed, 19 Aug 2020 21:09:43 +0000 (14:09 -0700)]
BTM_SEC_IN_AUTHORIZE is never set, only checked or removed
For clarity, falsed out these expressions in these
super complicated conditionals.
A future patch set will remove them.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib7e9fcbc0c3018c38ea243974e22a3aa39c7f2f7
Zach Johnson [Wed, 19 Aug 2020 20:49:36 +0000 (13:49 -0700)]
Remove BTA_AV_WITH_AVCTP_AUTHORIZATION
It's always false.
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I55953edf1676d347873262603ac207b6a1119512
Zach Johnson [Wed, 19 Aug 2020 20:45:08 +0000 (13:45 -0700)]
BTA_SEC_AUTHENTICATE does not include authorization
this expression can be simplified
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I51f7e771fd636910b9c0315020309005fded122f
Zach Johnson [Wed, 19 Aug 2020 20:14:25 +0000 (13:14 -0700)]
Flatten bta_av_cb.sec_mask
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Iabde7f44b7e4fa3392f44e4316ef61c2dd51ff49
Zach Johnson [Wed, 19 Aug 2020 19:50:31 +0000 (12:50 -0700)]
The security mask is always BTA_SEC_AUTHENTICATE
don't pass in the message
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ibfd208530a89116eaff1e1e12484b00cd3b90283
Zach Johnson [Wed, 19 Aug 2020 19:46:47 +0000 (12:46 -0700)]
Internalize BTA_AvEnable's security mask
it's always BTA_SEC_AUTHENTICATE
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I95e60d014a4173b33a032873bc7ca39c629e2fa2
Zach Johnson [Wed, 19 Aug 2020 19:41:20 +0000 (12:41 -0700)]
Flatten BTA_SEC_AUTHORIZE
Bug:
159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ic8167a794f880a416ad5c7cac87ed9abb1a63b7f
Martin Brabham [Thu, 20 Aug 2020 05:58:58 +0000 (22:58 -0700)]
Add boolean flag for indicating IO Cap Response received
Bug:
162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I293c8caf0a4728daf87b4b6789c2ea92a931ca30
Martin Brabham [Thu, 20 Aug 2020 05:55:40 +0000 (22:55 -0700)]
Ensure we delete the link key from the controller.
Bug:
162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I883bf501d7a1f95e3c4665ffdf0fdee6af67453c
Chris Manton [Wed, 19 Aug 2020 22:08:50 +0000 (15:08 -0700)]
Simplify stack/l2cap/::l2c_link_check_send_pkts
Towards proper interfaces
Bug:
163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Id83e752e56388283e87f8869017e435359cb0597
Treehugger Robot [Wed, 19 Aug 2020 22:40:44 +0000 (22:40 +0000)]
Merge changes I283667e2,Ibc685b5d,I54537140,Ic11c5809 am:
789939514f
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405233
Change-Id: Ic1db1158c0194e44c7bd4e9fe38d3cdb3d71442b
Treehugger Robot [Wed, 19 Aug 2020 22:40:15 +0000 (22:40 +0000)]
Merge changes I14a0dc1d,If34b5018,Icdba6206 am:
af886e8cbe
Original change: https://android-review.googlesource.com/c/platform/system/bt/+/
1405271
Change-Id: Ie306002144c20e1608636881c527726a60c9fb70
Treehugger Robot [Wed, 19 Aug 2020 22:15:02 +0000 (22:15 +0000)]
Merge changes I283667e2,Ibc685b5d,I54537140,Ic11c5809
* changes:
Move create_classic_conn from l2c to acl
Add API stack/acl/btm_acl::acl_create_classic_connection
Simplify stack/l2cap/l2c_utils::l2cu_create_conn_after_switch
Move stack/l2cap/l2c_link::btm_acl_connected
Treehugger Robot [Wed, 19 Aug 2020 21:55:06 +0000 (21:55 +0000)]
Merge changes I14a0dc1d,If34b5018,Icdba6206
* changes:
This if is always true
Remove useless line
Remove unused parameter in btif_dm_proc_io_req