From d56f56f09c483b8aeaf0eba0ddf689f31b20a71a Mon Sep 17 00:00:00 2001 From: Arun P Madhavan Date: Tue, 30 Jul 2024 17:42:24 +0000 Subject: [PATCH 1/7] RDKE-157: add HID related kernelconfigs --- recipes-kernel/android/files/rdkv.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes-kernel/android/files/rdkv.cfg b/recipes-kernel/android/files/rdkv.cfg index eecbcc1..bfafb75 100644 --- a/recipes-kernel/android/files/rdkv.cfg +++ b/recipes-kernel/android/files/rdkv.cfg @@ -1,2 +1,5 @@ CONFIG_CFG80211=m CONFIG_BRCMFMAC=m +CONFIG_BT_HIDP=y +CONFIG_UHID=y +CONFIG_INPUT_UINPUT=y From 95aa41a0f5072ed23bfab262dcdf3af1ed3274bb Mon Sep 17 00:00:00 2001 From: Arun P Madhavan Date: Fri, 18 Oct 2024 17:37:43 +0000 Subject: [PATCH 2/7] RDKVREFPLT-3687: use the latest DSHAL v1.0.4 --- conf/include/vendor_pkg_versions.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/include/vendor_pkg_versions.inc b/conf/include/vendor_pkg_versions.inc index bf64348..51d9efb 100644 --- a/conf/include/vendor_pkg_versions.inc +++ b/conf/include/vendor_pkg_versions.inc @@ -182,7 +182,7 @@ SRCREV_pn-wayland-default-egl = "1.18.0" # RDKV HAL component versions # RDKV HAL component versions of raspberrypi4 -SRCREV_pn-devicesettings-hal-raspberrypi4 = "1.0.3" +SRCREV_pn-devicesettings-hal-raspberrypi4 = "1.0.4" PV_pn-devicesettings-hal-raspberrypi4 = "2.0.0" PR_pn-devicesettings-hal-raspberrypi4 = "r0" PACKAGE_ARCH_pn-devicesettings-hal-raspberrypi4 = "${VENDOR_LAYER_EXTENSION}" From 9af67248c67c8d7caba7a45f3ece0ef426bf4804 Mon Sep 17 00:00:00 2001 From: Arun P Madhavan Date: Mon, 21 Oct 2024 15:52:21 +0000 Subject: [PATCH 3/7] Bluetooth: refactor malicious adv data check --- .../android/android-raspberrypi_%.bbappend | 3 ++ ...th-refactor-malicious-adv-data-check.patch | 48 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 recipes-kernel/android/files/Bluetooth-refactor-malicious-adv-data-check.patch diff --git a/recipes-kernel/android/android-raspberrypi_%.bbappend b/recipes-kernel/android/android-raspberrypi_%.bbappend index 0b5ca34..ab7b36f 100644 --- a/recipes-kernel/android/android-raspberrypi_%.bbappend +++ b/recipes-kernel/android/android-raspberrypi_%.bbappend @@ -4,6 +4,9 @@ SRC_URI_append_hybrid = " file://rdkv.cfg" SRC_URI_append_client = " file://rdkv.cfg" SRC_URI_append_ipclient = " file://rdkv.cfg" +# Fix for annoying HCI logs in console; only need to be patched in dunfell. Kirkstone already has this. +SRC_URI_append_dunfell = " file://Bluetooth-refactor-malicious-adv-data-check.patch" + do_deploy_append() { if [ "${@bb.utils.contains("DISTRO_FEATURES", "DOBBY_CONTAINERS", "yes", "no", d)}" = "yes" ]; then if [ -f "${DEPLOYDIR}/bootfiles/cmdline.txt" ]; then diff --git a/recipes-kernel/android/files/Bluetooth-refactor-malicious-adv-data-check.patch b/recipes-kernel/android/files/Bluetooth-refactor-malicious-adv-data-check.patch new file mode 100644 index 0000000..f0ac2a6 --- /dev/null +++ b/recipes-kernel/android/files/Bluetooth-refactor-malicious-adv-data-check.patch @@ -0,0 +1,48 @@ +From: Brian Gix +To: linux-bluetooth@vger.kernel.org +Cc: marcel@holtmann.org, paskripkin@gmail.com, + Brian Gix +Subject: [PATCH v2] Bluetooth: refactor malicious adv data check +Date: Wed, 24 Nov 2021 12:16:28 -0800 [thread overview] +Message-ID: <20211124201628.405647-1-brian.gix@intel.com> (raw) + +Check for out-of-bound read was being performed at the end of while +num_reports loop, and would fill journal with false positives. Added +check to beginning of loop processing so that it doesn't get checked +after ptr has been advanced. + +Signed-off-by: Brian Gix +--- + net/bluetooth/hci_event.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c +index efc5458b1345..dee4ef22fc88 100644 +--- a/net/bluetooth/hci_event.c ++++ b/net/bluetooth/hci_event.c +@@ -5920,6 +5920,11 @@ static void hci_le_adv_report_evt(struct hci_dev *hdev, struct sk_buff *skb) + struct hci_ev_le_advertising_info *ev = ptr; + s8 rssi; + ++ if (ptr > (void *)skb_tail_pointer(skb) - sizeof(*ev)) { ++ bt_dev_err(hdev, "Malicious advertising data."); ++ break; ++ } ++ + if (ev->length <= HCI_MAX_AD_LENGTH && + ev->data + ev->length <= skb_tail_pointer(skb)) { + rssi = ev->data[ev->length]; +@@ -5931,11 +5936,6 @@ static void hci_le_adv_report_evt(struct hci_dev *hdev, struct sk_buff *skb) + } + + ptr += sizeof(*ev) + ev->length + 1; +- +- if (ptr > (void *) skb_tail_pointer(skb) - sizeof(*ev)) { +- bt_dev_err(hdev, "Malicious advertising data. Stopping processing"); +- break; +- } + } + + hci_dev_unlock(hdev); +-- +2.31.1 From 09c3cb5b2120f0671b3d05d20f2e344c9ad8894a Mon Sep 17 00:00:00 2001 From: Arun P Madhavan Date: Mon, 21 Oct 2024 17:42:51 +0000 Subject: [PATCH 4/7] RDKVREFPLT-3687: update the missing header --- conf/include/vendor_pkg_versions.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/include/vendor_pkg_versions.inc b/conf/include/vendor_pkg_versions.inc index 51d9efb..e10c78d 100644 --- a/conf/include/vendor_pkg_versions.inc +++ b/conf/include/vendor_pkg_versions.inc @@ -182,7 +182,7 @@ SRCREV_pn-wayland-default-egl = "1.18.0" # RDKV HAL component versions # RDKV HAL component versions of raspberrypi4 -SRCREV_pn-devicesettings-hal-raspberrypi4 = "1.0.4" +SRCREV_pn-devicesettings-hal-raspberrypi4 = "0dd67f02a40c92e382cbebfceb4a7c67f6c5660f" PV_pn-devicesettings-hal-raspberrypi4 = "2.0.0" PR_pn-devicesettings-hal-raspberrypi4 = "r0" PACKAGE_ARCH_pn-devicesettings-hal-raspberrypi4 = "${VENDOR_LAYER_EXTENSION}" From 9e0e45324839871565fc5f6fbba299ae6f1a62ff Mon Sep 17 00:00:00 2001 From: Arun P Madhavan <54109113+arun-madhavan-013@users.noreply.github.com> Date: Mon, 21 Oct 2024 19:27:35 -0400 Subject: [PATCH 5/7] Update DSHAL SRCREV to match v2.0.0 Impl --- conf/include/vendor_pkg_versions.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/include/vendor_pkg_versions.inc b/conf/include/vendor_pkg_versions.inc index e10c78d..87170f4 100644 --- a/conf/include/vendor_pkg_versions.inc +++ b/conf/include/vendor_pkg_versions.inc @@ -182,7 +182,7 @@ SRCREV_pn-wayland-default-egl = "1.18.0" # RDKV HAL component versions # RDKV HAL component versions of raspberrypi4 -SRCREV_pn-devicesettings-hal-raspberrypi4 = "0dd67f02a40c92e382cbebfceb4a7c67f6c5660f" +SRCREV_pn-devicesettings-hal-raspberrypi4 = "58db1e30c964384e79af041a8b4cc1ffd033207f" PV_pn-devicesettings-hal-raspberrypi4 = "2.0.0" PR_pn-devicesettings-hal-raspberrypi4 = "r0" PACKAGE_ARCH_pn-devicesettings-hal-raspberrypi4 = "${VENDOR_LAYER_EXTENSION}" From 74eb3d8494ead34bf41ffdc101d7f7951e0c2e12 Mon Sep 17 00:00:00 2001 From: Arun P Madhavan <54109113+arun-madhavan-013@users.noreply.github.com> Date: Mon, 21 Oct 2024 20:20:21 -0400 Subject: [PATCH 6/7] Use the stable DSHAL v2.0.0 --- conf/include/vendor_pkg_versions.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/include/vendor_pkg_versions.inc b/conf/include/vendor_pkg_versions.inc index 87170f4..49839c0 100644 --- a/conf/include/vendor_pkg_versions.inc +++ b/conf/include/vendor_pkg_versions.inc @@ -182,7 +182,7 @@ SRCREV_pn-wayland-default-egl = "1.18.0" # RDKV HAL component versions # RDKV HAL component versions of raspberrypi4 -SRCREV_pn-devicesettings-hal-raspberrypi4 = "58db1e30c964384e79af041a8b4cc1ffd033207f" +SRCREV_pn-devicesettings-hal-raspberrypi4 = "d283c12bdfea0101d5b71fbf7fcf658b8fefe35c" PV_pn-devicesettings-hal-raspberrypi4 = "2.0.0" PR_pn-devicesettings-hal-raspberrypi4 = "r0" PACKAGE_ARCH_pn-devicesettings-hal-raspberrypi4 = "${VENDOR_LAYER_EXTENSION}" From adca48d6a2e87f3fcf91fb9898eae21a9b0f191f Mon Sep 17 00:00:00 2001 From: Arun P Madhavan <54109113+arun-madhavan-013@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:32:09 -0400 Subject: [PATCH 7/7] Update vendor_pkg_versions.inc with DSHALv1.0.5 DSHAL v1.0.5 has dsHdmiIn.h implementation required for MW. --- conf/include/vendor_pkg_versions.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/include/vendor_pkg_versions.inc b/conf/include/vendor_pkg_versions.inc index 49839c0..8eb2060 100644 --- a/conf/include/vendor_pkg_versions.inc +++ b/conf/include/vendor_pkg_versions.inc @@ -182,7 +182,7 @@ SRCREV_pn-wayland-default-egl = "1.18.0" # RDKV HAL component versions # RDKV HAL component versions of raspberrypi4 -SRCREV_pn-devicesettings-hal-raspberrypi4 = "d283c12bdfea0101d5b71fbf7fcf658b8fefe35c" +SRCREV_pn-devicesettings-hal-raspberrypi4 = "1.0.5" PV_pn-devicesettings-hal-raspberrypi4 = "2.0.0" PR_pn-devicesettings-hal-raspberrypi4 = "r0" PACKAGE_ARCH_pn-devicesettings-hal-raspberrypi4 = "${VENDOR_LAYER_EXTENSION}"