New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PW_SID:588225] Rework parsing of HCI events #659
Conversation
This patch adds workflow files for ci: [schedule_work.yml] - The workflow file for scheduled work - Sync the repo with upstream repo and rebase the workflow branch - Review the patches in the patchwork and creates the PR if needed [ci.yml] - The workflow file for CI tasks - Run CI tests when PR is created Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Like skb_pull but returns the original data pointer before pulling the data after performing a check against sbk->len. This allows to change code that does "struct foo *p = (void *)skb->data;" which is hard to audit and error prone, to: p = skb_pull_data(skb, sizeof(*p)); if (!p) return; Which is both safer and cleaner. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
This uses skb_pull_data to check the BR/EDR events received have the minimum required length. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This uses skb_pull_data to check the Command Complete events received have the minimum required length. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
… event This uses skb_pull_data to check the Number of Complete Packets events received have the minimum required length. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This uses skb_pull_data to check the Inquiry Result events received have the minimum required length. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
…vent This uses skb_pull_data to check the Inquiry Result with RSSI events received have the minimum required length. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This uses skb_pull_data to check the Extended Inquiry Result events received have the minimum required length. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This uses skb_pull_data to check the LE Metaevents received have the minimum required length. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This uses skb_pull_data to check the LE Advertising Report events received have the minimum required length. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
…event This uses skb_pull_data to check the LE Extended Advertising Report events received have the minimum required length. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
…rt event This uses skb_pull_data to check the LE Direct Advertising Report events received have the minimum required length. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This change the use of switch statement to a function table which is easier to extend and can include min/max length of each HCI event. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Reported-by: kernel test robot <lkp@intel.com>
This change the use of switch statement to a function table which is easier to extend and can include min/max length of each subevent. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This change the use of switch statement to a function table which is easier to extend and can include min/max length of each command. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This change the use of switch statement to a function table which is easier to extend. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
CheckPatch
|
GitLint
|
BuildKernel |
TestRunner: Setup |
TestRunner: l2cap-tester
|
TestRunner: bnep-tester
|
TestRunner: mgmt-tester
|
TestRunner: rfcomm-tester
|
TestRunner: sco-tester
|
TestRunner: smp-tester
|
TestRunner: userchan-tester
|
329f682
to
7005ccd
Compare
b9b1f01
to
acc09f8
Compare
From: Luiz Augusto von Dentz luiz.von.dentz@intel.com
This reworks the parsing of HCI events using skb_pull_data to check
event length, in addition to that it does introduce function tables to
handle events, LE subevents, Command Complete and Command Status which
simplify the callback by adding a common code that uses skb_pull_data
when parsing such events.
Luiz Augusto von Dentz (15):
skbuff: introduce skb_pull_data
Bluetooth: HCI: Use skb_pull_data to parse BR/EDR events
Bluetooth: HCI: Use skb_pull_data to parse Command Complete event
Bluetooth: HCI: Use skb_pull_data to parse Number of Complete Packets
event
Bluetooth: HCI: Use skb_pull_data to parse Inquiry Result event
Bluetooth: HCI: Use skb_pull_data to parse Inquiry Result with RSSI
event
Bluetooth: HCI: Use skb_pull_data to parse Extended Inquiry Result
event
Bluetooth: HCI: Use skb_pull_data to parse LE Metaevents
Bluetooth: HCI: Use skb_pull_data to parse LE Advertising Report event
Bluetooth: HCI: Use skb_pull_data to parse LE Ext Advertising Report
event
Bluetooth: HCI: Use skb_pull_data to parse LE Direct Advertising
Report event
Bluetooth: hci_event: Use of a function table to handle HCI events
Bluetooth: hci_event: Use of a function table to handle LE subevents
Bluetooth: hci_event: Use of a function table to handle Command
Complete
Bluetooth: hci_event: Use of a function table to handle Command Status
include/linux/skbuff.h | 2 +
include/net/bluetooth/hci.h | 59 +-