From: kernel test robot <lkp@intel.com>
To: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>,
marcel@holtmann.org, luiz.dentz@gmail.com
Cc: oe-kbuild-all@lists.linux.dev, linux-bluetooth@vger.kernel.org,
linux-kernel@vger.kernel.org, amitkumar.karwar@nxp.com,
sherry.sun@nxp.com, dmitrii.lebed@nxp.com,
neeraj.sanjaykale@nxp.com
Subject: Re: [PATCH v1 09/11] Bluetooth: btnxpuart: Add command encryption for sensitive HCI commands
Date: Thu, 20 Nov 2025 16:40:43 +0800 [thread overview]
Message-ID: <202511201407.MPGCEuhy-lkp@intel.com> (raw)
In-Reply-To: <20251118142025.1982263-10-neeraj.sanjaykale@nxp.com>
Hi Neeraj,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bluetooth/master]
[also build test WARNING on bluetooth-next/master linus/master v6.18-rc6 next-20251119]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Neeraj-Sanjay-Kale/Bluetooth-btnxpuart-Add-firmware-metadata-parsing-for-secure-interface/20251118-223605
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
patch link: https://lore.kernel.org/r/20251118142025.1982263-10-neeraj.sanjaykale%40nxp.com
patch subject: [PATCH v1 09/11] Bluetooth: btnxpuart: Add command encryption for sensitive HCI commands
config: x86_64-randconfig-103-20251119 (https://download.01.org/0day-ci/archive/20251120/202511201407.MPGCEuhy-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511201407.MPGCEuhy-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
>> drivers/bluetooth/btnxpuart.c:2720:12-19: WARNING opportunity for kmemdup
vim +2720 drivers/bluetooth/btnxpuart.c
2698
2699 static struct sk_buff *nxp_crypto_encrypt_cmd(struct hci_dev *hdev,
2700 struct sk_buff *skb)
2701 {
2702 struct btnxpuart_dev *nxpdev = hci_get_drvdata(hdev);
2703 __le16 vendor_opcode = __cpu_to_le16(HCI_NXP_SHI_ENCRYPT);
2704 u8 nonce[GCM_AES_IV_SIZE];
2705 u8 tag[NXP_ENC_AUTH_TAG_SIZE];
2706 u8 *enc_data;
2707 u8 sub_opcode = 0x10;
2708 int ret;
2709 u32 plen, enc_data_len;
2710 struct nxp_tls_traffic_keys *keys = &nxpdev->crypto.keys;
2711
2712 if (skb->len > NXP_MAX_ENCRYPT_CMD_LEN) {
2713 bt_dev_err(hdev, "Invalid skb->len: %d", skb->len);
2714 return skb;
2715 }
2716
2717 nxp_data_calc_nonce(keys->h2d_iv, nxpdev->crypto.enc_seq_no, nonce);
2718
2719 enc_data_len = skb->len;
> 2720 enc_data = kzalloc(skb->len, GFP_KERNEL);
2721 if (!enc_data)
2722 return skb;
2723 memcpy(enc_data, skb->data, skb->len);
2724
2725 ret = nxp_aes_gcm_encrypt(hdev, enc_data, enc_data_len, tag,
2726 keys->h2d_key, nonce);
2727 if (ret) {
2728 kfree(enc_data);
2729 return skb;
2730 }
2731
2732 kfree_skb(skb);
2733
2734 plen = enc_data_len + NXP_ENC_AUTH_TAG_SIZE + 1;
2735 skb = bt_skb_alloc(plen, GFP_ATOMIC);
2736 if (!skb) {
2737 kfree(enc_data);
2738 return ERR_PTR(-ENOMEM);
2739 }
2740 hci_skb_pkt_type(skb) = HCI_COMMAND_PKT;
2741 skb_put_data(skb, &vendor_opcode, 2);
2742 skb_put_data(skb, &plen, 1);
2743 skb_put_data(skb, &sub_opcode, 1);
2744 skb_put_data(skb, enc_data, enc_data_len);
2745 skb_put_data(skb, tag, NXP_ENC_AUTH_TAG_SIZE);
2746
2747 nxpdev->crypto.enc_seq_no++;
2748 kfree(enc_data);
2749 return skb;
2750 }
2751
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-11-20 8:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 14:20 [PATCH v1 00/11] Bluetooth: btnxpuart: Add secure interface support for NXP chipsets Neeraj Sanjay Kale
2025-11-18 14:20 ` [PATCH v1 01/11] Bluetooth: btnxpuart: Add firmware metadata parsing for secure interface Neeraj Sanjay Kale
2025-11-18 15:07 ` Bluetooth: btnxpuart: Add secure interface support for NXP chipsets bluez.test.bot
2025-11-20 7:12 ` [PATCH v1 01/11] Bluetooth: btnxpuart: Add firmware metadata parsing for secure interface kernel test robot
2025-11-18 14:20 ` [PATCH v1 02/11] Bluetooth: btnxpuart: Print FW version and enable chip specific features Neeraj Sanjay Kale
2025-11-18 14:20 ` [PATCH v1 03/11] Bluetooth: btnxpuart: Add secure interface TLS authentication support Neeraj Sanjay Kale
2025-11-18 14:20 ` [PATCH v1 04/11] Bluetooth: btnxpuart: Implement TLS authentication crypto framework Neeraj Sanjay Kale
2025-11-18 14:20 ` [PATCH v1 05/11] Bluetooth: btnxpuart: Add TLS host hello handshake implementation Neeraj Sanjay Kale
2025-11-22 3:31 ` kernel test robot
2025-11-18 14:20 ` [PATCH v1 06/11] Bluetooth: btnxpuart: Add TLS device hello processing Neeraj Sanjay Kale
2025-11-18 14:20 ` [PATCH v1 07/11] Bluetooth: btnxpuart: Add device authentication Neeraj Sanjay Kale
2025-11-20 14:46 ` kernel test robot
2025-11-22 11:03 ` kernel test robot
2025-11-18 14:20 ` [PATCH v1 08/11] Bluetooth: btnxpuart: Derive traffic keys from TLS 1.3 handshake Neeraj Sanjay Kale
2025-11-18 14:20 ` [PATCH v1 09/11] Bluetooth: btnxpuart: Add command encryption for sensitive HCI commands Neeraj Sanjay Kale
2025-11-20 8:40 ` kernel test robot [this message]
2025-11-18 14:20 ` [PATCH v1 10/11] Bluetooth: btnxpuart: Add encrypted event handling Neeraj Sanjay Kale
2025-11-18 14:20 ` [PATCH v1 11/11] Bluetooth: btnxpuart: Select crypto algorithms for secure interface Neeraj Sanjay Kale
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202511201407.MPGCEuhy-lkp@intel.com \
--to=lkp@intel.com \
--cc=amitkumar.karwar@nxp.com \
--cc=dmitrii.lebed@nxp.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=neeraj.sanjaykale@nxp.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sherry.sun@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox