linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO
  2023-07-10  7:07 [PATCH] " Lee, Chun-Yi
@ 2023-07-10  7:37 ` bluez.test.bot
  0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2023-07-10  7:37 UTC (permalink / raw)
  To: linux-bluetooth, joeyli.kernel

[-- Attachment #1: Type: text/plain, Size: 3537 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=763894

---Test result---

Test Summary:
CheckPatch                    FAIL      0.82 seconds
GitLint                       FAIL      0.52 seconds
SubjectPrefix                 PASS      0.08 seconds
BuildKernel                   PASS      32.42 seconds
CheckAllWarning               PASS      35.37 seconds
CheckSparse                   PASS      39.97 seconds
CheckSmatch                   PASS      111.21 seconds
BuildKernel32                 PASS      30.96 seconds
TestRunnerSetup               PASS      472.90 seconds
TestRunner_l2cap-tester       PASS      22.50 seconds
TestRunner_iso-tester         PASS      40.91 seconds
TestRunner_bnep-tester        PASS      10.39 seconds
TestRunner_mgmt-tester        PASS      211.46 seconds
TestRunner_rfcomm-tester      PASS      15.46 seconds
TestRunner_sco-tester         PASS      16.31 seconds
TestRunner_ioctl-tester       PASS      17.21 seconds
TestRunner_mesh-tester        PASS      12.78 seconds
TestRunner_smp-tester         PASS      13.88 seconds
TestRunner_userchan-tester    PASS      10.72 seconds
IncrementalBuild              PASS      29.83 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#88: 
https://lore.kernel.org/lkml/CA+UBctDPEvHdkHMwD340=n02rh+jNRJNNQ5LBZNA+Wm4Keh2ow@mail.gmail.com/T/

WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report
#90: 
Reported-by: Weiteng Chen <wchen130@ucr.edu>
Reported-by: Yu Hao <yhao016@ucr.edu>

WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report
#91: 
Reported-by: Yu Hao <yhao016@ucr.edu>
Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>

WARNING: From:/Signed-off-by: email address mismatch: 'From: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>' != 'Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>'

total: 0 errors, 4 warnings, 9 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/13306348.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:
Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO

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
9: B1 Line exceeds max length (95>80): "https://lore.kernel.org/all/CA+UBctC3p49aTgzbVgkSZ2+TQcqq4fPDO7yZitFT5uBPDeCO2g@mail.gmail.com/"
12: B1 Line exceeds max length (98>80): "https://lore.kernel.org/lkml/CA+UBctDPEvHdkHMwD340=n02rh+jNRJNNQ5LBZNA+Wm4Keh2ow@mail.gmail.com/T/"


---
Regards,
Linux Bluetooth


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

* RE: Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO
  2023-07-10 15:17 Lee, Chun-Yi
@ 2023-07-10 16:02 ` bluez.test.bot
  0 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2023-07-10 16:02 UTC (permalink / raw)
  To: linux-bluetooth, joeyli.kernel

[-- Attachment #1: Type: text/plain, Size: 3015 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=764081

---Test result---

Test Summary:
CheckPatch                    FAIL      0.84 seconds
GitLint                       FAIL      0.51 seconds
SubjectPrefix                 PASS      0.09 seconds
BuildKernel                   PASS      33.31 seconds
CheckAllWarning               PASS      36.54 seconds
CheckSparse                   PASS      41.27 seconds
CheckSmatch                   PASS      114.64 seconds
BuildKernel32                 PASS      32.48 seconds
TestRunnerSetup               PASS      487.10 seconds
TestRunner_l2cap-tester       PASS      22.77 seconds
TestRunner_iso-tester         PASS      40.83 seconds
TestRunner_bnep-tester        PASS      10.48 seconds
TestRunner_mgmt-tester        PASS      211.04 seconds
TestRunner_rfcomm-tester      PASS      15.72 seconds
TestRunner_sco-tester         PASS      16.73 seconds
TestRunner_ioctl-tester       PASS      17.64 seconds
TestRunner_mesh-tester        PASS      12.98 seconds
TestRunner_smp-tester         PASS      13.90 seconds
TestRunner_userchan-tester    PASS      10.94 seconds
IncrementalBuild              PASS      30.52 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO
WARNING: From:/Signed-off-by: email address mismatch: 'From: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>' != 'Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>'

total: 0 errors, 1 warnings, 9 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/13307193.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:
Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO

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
13: B1 Line exceeds max length (107>80): "Closes: https://lore.kernel.org/all/CA+UBctC3p49aTgzbVgkSZ2+TQcqq4fPDO7yZitFT5uBPDeCO2g@mail.gmail.com/ [1]"
15: B1 Line exceeds max length (110>80): "Closes: https://lore.kernel.org/lkml/CA+UBctDPEvHdkHMwD340=n02rh+jNRJNNQ5LBZNA+Wm4Keh2ow@mail.gmail.com/T/ [2]"


---
Regards,
Linux Bluetooth


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

* [PATCH] Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO
@ 2023-07-14 16:08 Lee, Chun-Yi
  2023-07-14 16:16 ` bluez.test.bot
  2023-07-14 16:17 ` [PATCH] " joeyli
  0 siblings, 2 replies; 5+ messages in thread
From: Lee, Chun-Yi @ 2023-07-14 16:08 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg
  Cc: David S . Miller, linux-kernel, linux-bluetooth, Lee, Chun-Yi

This patch adds code to check HCI_UART_PROTO_READY flag before
accessing hci_uart->proto. It fixs the race condition in
hci_uart_tty_ioctl() between HCIUARTSETPROTO and HCIUARTGETPROTO.
This issue bug found by Yu Hao and Weiteng Chen:

BUG: general protection fault in hci_uart_tty_ioctl [1]

The information of C reproducer can also reference the link [2]

Reported-by: Yu Hao <yhao016@ucr.edu>
Closes: https://lore.kernel.org/all/CA+UBctC3p49aTgzbVgkSZ2+TQcqq4fPDO7yZitFT5uBPDeCO2g@mail.gmail.com/ [1]
Reported-by: Weiteng Chen <wchen130@ucr.edu>
Closes: https://lore.kernel.org/lkml/CA+UBctDPEvHdkHMwD340=n02rh+jNRJNNQ5LBZNA+Wm4Keh2ow@mail.gmail.com/T/ [2]
Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
---
 drivers/bluetooth/hci_ldisc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index efdda2c3fce8..a76eb98c0047 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -770,7 +770,8 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
 		break;
 
 	case HCIUARTGETPROTO:
-		if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
+		if (test_bit(HCI_UART_PROTO_SET, &hu->flags) &&
+		    test_bit(HCI_UART_PROTO_READY, &hu->flags))
 			err = hu->proto->id;
 		else
 			err = -EUNATCH;
-- 
2.35.3


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

* RE: Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO
  2023-07-14 16:08 [PATCH] Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO Lee, Chun-Yi
@ 2023-07-14 16:16 ` bluez.test.bot
  2023-07-14 16:17 ` [PATCH] " joeyli
  1 sibling, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2023-07-14 16:16 UTC (permalink / raw)
  To: linux-bluetooth, joeyli.kernel

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

This is an automated email and please do not reply to this email.

Dear Submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.

----- Output -----

error: patch failed: drivers/bluetooth/hci_ldisc.c:770
error: drivers/bluetooth/hci_ldisc.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch

Please resolve the issue and submit the patches again.


---
Regards,
Linux Bluetooth


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

* Re: [PATCH] Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO
  2023-07-14 16:08 [PATCH] Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO Lee, Chun-Yi
  2023-07-14 16:16 ` bluez.test.bot
@ 2023-07-14 16:17 ` joeyli
  1 sibling, 0 replies; 5+ messages in thread
From: joeyli @ 2023-07-14 16:17 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Marcel Holtmann, Johan Hedberg, David S . Miller, linux-kernel,
	linux-bluetooth, jlee

Hi Luiz Augusto von Dentz and all experts

Sorry for I send out a duplicate patch again. Just ignore this
duplicate patch, please.

Thanks!
Joey Lee

On Sat, Jul 15, 2023 at 12:08:54AM +0800, Lee, Chun-Yi wrote:
> This patch adds code to check HCI_UART_PROTO_READY flag before
> accessing hci_uart->proto. It fixs the race condition in
> hci_uart_tty_ioctl() between HCIUARTSETPROTO and HCIUARTGETPROTO.
> This issue bug found by Yu Hao and Weiteng Chen:
> 
> BUG: general protection fault in hci_uart_tty_ioctl [1]
> 
> The information of C reproducer can also reference the link [2]
> 
> Reported-by: Yu Hao <yhao016@ucr.edu>
> Closes: https://lore.kernel.org/all/CA+UBctC3p49aTgzbVgkSZ2+TQcqq4fPDO7yZitFT5uBPDeCO2g@mail.gmail.com/ [1]
> Reported-by: Weiteng Chen <wchen130@ucr.edu>
> Closes: https://lore.kernel.org/lkml/CA+UBctDPEvHdkHMwD340=n02rh+jNRJNNQ5LBZNA+Wm4Keh2ow@mail.gmail.com/T/ [2]
> Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
> ---
>  drivers/bluetooth/hci_ldisc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
> index efdda2c3fce8..a76eb98c0047 100644
> --- a/drivers/bluetooth/hci_ldisc.c
> +++ b/drivers/bluetooth/hci_ldisc.c
> @@ -770,7 +770,8 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
>  		break;
>  
>  	case HCIUARTGETPROTO:
> -		if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
> +		if (test_bit(HCI_UART_PROTO_SET, &hu->flags) &&
> +		    test_bit(HCI_UART_PROTO_READY, &hu->flags))
>  			err = hu->proto->id;
>  		else
>  			err = -EUNATCH;
> -- 
> 2.35.3

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-14 16:08 [PATCH] Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO Lee, Chun-Yi
2023-07-14 16:16 ` bluez.test.bot
2023-07-14 16:17 ` [PATCH] " joeyli
  -- strict thread matches above, loose matches on Subject: below --
2023-07-10 15:17 Lee, Chun-Yi
2023-07-10 16:02 ` bluez.test.bot
2023-07-10  7:07 [PATCH] " Lee, Chun-Yi
2023-07-10  7:37 ` bluez.test.bot

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).