linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] Bluetooth: MGMT: Use correct address for memcpy()
@ 2023-07-17  9:32 Andy Shevchenko
  2023-07-17 10:00 ` [v1,1/1] " bluez.test.bot
  2023-07-17 20:00 ` [PATCH v1 1/1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2023-07-17  9:32 UTC (permalink / raw)
  To: Luiz Augusto von Dentz, linux-bluetooth, linux-kernel
  Cc: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	Andy Shevchenko

In function ‘fortify_memcpy_chk’,
    inlined from ‘get_conn_info_complete’ at net/bluetooth/mgmt.c:7281:2:
include/linux/fortify-string.h:592:25: error: call to ‘__read_overflow2_field’ declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror=attribute-warning]
  592 |                         __read_overflow2_field(q_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

This is due to the wrong member is used for memcpy(). Use correct one.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 net/bluetooth/mgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 33c06f7c7641..d6c9b7bc8592 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -7278,7 +7278,7 @@ static void get_conn_info_complete(struct hci_dev *hdev, void *data, int err)
 
 	bt_dev_dbg(hdev, "err %d", err);
 
-	memcpy(&rp.addr, &cp->addr.bdaddr, sizeof(rp.addr));
+	memcpy(&rp.addr, &cp->addr, sizeof(rp.addr));
 
 	status = mgmt_status(err);
 	if (status == MGMT_STATUS_SUCCESS) {
-- 
2.40.0.1.gaa8946217a0b


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [v1,1/1] Bluetooth: MGMT: Use correct address for memcpy()
  2023-07-17  9:32 [PATCH v1 1/1] Bluetooth: MGMT: Use correct address for memcpy() Andy Shevchenko
@ 2023-07-17 10:00 ` bluez.test.bot
  2023-07-17 20:00 ` [PATCH v1 1/1] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-07-17 10:00 UTC (permalink / raw)
  To: linux-bluetooth, andriy.shevchenko

[-- Attachment #1: Type: text/plain, Size: 2970 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=766403

---Test result---

Test Summary:
CheckPatch                    FAIL      1.00 seconds
GitLint                       FAIL      0.63 seconds
SubjectPrefix                 PASS      0.12 seconds
BuildKernel                   PASS      33.07 seconds
CheckAllWarning               PASS      36.51 seconds
CheckSparse                   PASS      41.89 seconds
CheckSmatch                   PASS      111.84 seconds
BuildKernel32                 PASS      32.10 seconds
TestRunnerSetup               PASS      486.10 seconds
TestRunner_l2cap-tester       PASS      23.37 seconds
TestRunner_iso-tester         PASS      44.64 seconds
TestRunner_bnep-tester        PASS      10.67 seconds
TestRunner_mgmt-tester        PASS      219.00 seconds
TestRunner_rfcomm-tester      PASS      16.00 seconds
TestRunner_sco-tester         PASS      17.03 seconds
TestRunner_ioctl-tester       PASS      18.09 seconds
TestRunner_mesh-tester        PASS      13.41 seconds
TestRunner_smp-tester         PASS      14.44 seconds
TestRunner_userchan-tester    PASS      11.17 seconds
IncrementalBuild              PASS      30.70 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v1,1/1] Bluetooth: MGMT: Use correct address for memcpy()
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#70: 
    inlined from ‘get_conn_info_complete’ at net/bluetooth/mgmt.c:7281:2:

total: 0 errors, 1 warnings, 0 checks, 8 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13315359.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[v1,1/1] Bluetooth: MGMT: Use correct address for memcpy()

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
5: B1 Line exceeds max length (217>80): "include/linux/fortify-string.h:592:25: error: call to ‘__read_overflow2_field’ declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror=attribute-warning]"


---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] Bluetooth: MGMT: Use correct address for memcpy()
  2023-07-17  9:32 [PATCH v1 1/1] Bluetooth: MGMT: Use correct address for memcpy() Andy Shevchenko
  2023-07-17 10:00 ` [v1,1/1] " bluez.test.bot
@ 2023-07-17 20:00 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2023-07-17 20:00 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: luiz.von.dentz, linux-bluetooth, linux-kernel, marcel,
	johan.hedberg, luiz.dentz

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon, 17 Jul 2023 12:32:14 +0300 you wrote:
> In function ‘fortify_memcpy_chk’,
>     inlined from ‘get_conn_info_complete’ at net/bluetooth/mgmt.c:7281:2:
> include/linux/fortify-string.h:592:25: error: call to ‘__read_overflow2_field’ declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror=attribute-warning]
>   592 |                         __read_overflow2_field(q_size_field, size);
>       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> 
> [...]

Here is the summary with links:
  - [v1,1/1] Bluetooth: MGMT: Use correct address for memcpy()
    https://git.kernel.org/bluetooth/bluetooth-next/c/75401514ef1b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-17 20:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17  9:32 [PATCH v1 1/1] Bluetooth: MGMT: Use correct address for memcpy() Andy Shevchenko
2023-07-17 10:00 ` [v1,1/1] " bluez.test.bot
2023-07-17 20:00 ` [PATCH v1 1/1] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).