All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_event: Remove excessive bluetooth warning
@ 2022-03-12 16:45 Mike Lothian
  2022-03-12 17:44 ` bluez.test.bot
  2022-03-14 15:32 ` [PATCH] " Marcel Holtmann
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Lothian @ 2022-03-12 16:45 UTC (permalink / raw)
  Cc: Mike Lothian, Marcel Holtmann, Johan Hedberg,
	Luiz Augusto von Dentz, David S. Miller, Jakub Kicinski,
	linux-bluetooth, netdev, linux-kernel

Fixes: 3e54c5890c87a ("Bluetooth: hci_event: Use of a function table to handle HCI events")
Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
---
 net/bluetooth/hci_event.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index fc30f4c03d29..aa57fccd2e47 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -6818,14 +6818,6 @@ static void hci_event_func(struct hci_dev *hdev, u8 event, struct sk_buff *skb,
 		return;
 	}
 
-	/* Just warn if the length is over max_len size it still be
-	 * possible to partially parse the event so leave to callback to
-	 * decide if that is acceptable.
-	 */
-	if (skb->len > ev->max_len)
-		bt_dev_warn(hdev, "unexpected event 0x%2.2x length: %u > %u",
-			    event, skb->len, ev->max_len);
-
 	data = hci_ev_skb_pull(hdev, skb, event, ev->min_len);
 	if (!data)
 		return;
-- 
2.35.1


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

* RE: Bluetooth: hci_event: Remove excessive bluetooth warning
  2022-03-12 16:45 [PATCH] Bluetooth: hci_event: Remove excessive bluetooth warning Mike Lothian
@ 2022-03-12 17:44 ` bluez.test.bot
  2022-03-12 23:50   ` Mike Lothian
  2022-03-14 15:32 ` [PATCH] " Marcel Holtmann
  1 sibling, 1 reply; 5+ messages in thread
From: bluez.test.bot @ 2022-03-12 17:44 UTC (permalink / raw)
  To: linux-bluetooth, mike

[-- Attachment #1: Type: text/plain, Size: 553 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: net/bluetooth/hci_event.c:6818
error: net/bluetooth/hci_event.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: Bluetooth: hci_event: Remove excessive bluetooth warning
  2022-03-12 17:44 ` bluez.test.bot
@ 2022-03-12 23:50   ` Mike Lothian
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Lothian @ 2022-03-12 23:50 UTC (permalink / raw)
  To: linux-bluetooth

I get that I'm not supposed to reply, but I'm not sure what kernel
tree I should be basing this patch on

It's currently against 5.17-rc7

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

* Re: [PATCH] Bluetooth: hci_event: Remove excessive bluetooth warning
  2022-03-12 16:45 [PATCH] Bluetooth: hci_event: Remove excessive bluetooth warning Mike Lothian
  2022-03-12 17:44 ` bluez.test.bot
@ 2022-03-14 15:32 ` Marcel Holtmann
  2022-03-14 15:36   ` Mike Lothian
  1 sibling, 1 reply; 5+ messages in thread
From: Marcel Holtmann @ 2022-03-14 15:32 UTC (permalink / raw)
  To: Mike Lothian
  Cc: Johan Hedberg, Luiz Augusto von Dentz, David S. Miller,
	Jakub Kicinski, BlueZ, netdev, linux-kernel

Hi Mike,

> Fixes: 3e54c5890c87a ("Bluetooth: hci_event: Use of a function table to handle HCI events")
> Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
> ---
> net/bluetooth/hci_event.c | 8 --------
> 1 file changed, 8 deletions(-)
> 
> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> index fc30f4c03d29..aa57fccd2e47 100644
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -6818,14 +6818,6 @@ static void hci_event_func(struct hci_dev *hdev, u8 event, struct sk_buff *skb,
> 		return;
> 	}
> 
> -	/* Just warn if the length is over max_len size it still be
> -	 * possible to partially parse the event so leave to callback to
> -	 * decide if that is acceptable.
> -	 */
> -	if (skb->len > ev->max_len)
> -		bt_dev_warn(hdev, "unexpected event 0x%2.2x length: %u > %u",
> -			    event, skb->len, ev->max_len);
> -

which event type is this? You need to have a commit message giving details. I am also pretty sure that this is broken hardware and we can go for ratelimited version, but the warning is justified if the hardware is stupid. If our table is wrong, we fix the table, but not just silence an unpleasant warning.

Regards

Marcel


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

* Re: [PATCH] Bluetooth: hci_event: Remove excessive bluetooth warning
  2022-03-14 15:32 ` [PATCH] " Marcel Holtmann
@ 2022-03-14 15:36   ` Mike Lothian
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Lothian @ 2022-03-14 15:36 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Johan Hedberg, Luiz Augusto von Dentz, David S. Miller,
	Jakub Kicinski, BlueZ, netdev, linux-kernel

On Mon, 14 Mar 2022 at 15:32, Marcel Holtmann <marcel@holtmann.org> wrote:
>
> Hi Mike,
>
> > Fixes: 3e54c5890c87a ("Bluetooth: hci_event: Use of a function table to handle HCI events")
> > Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
> > ---
> > net/bluetooth/hci_event.c | 8 --------
> > 1 file changed, 8 deletions(-)
> >
> > diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> > index fc30f4c03d29..aa57fccd2e47 100644
> > --- a/net/bluetooth/hci_event.c
> > +++ b/net/bluetooth/hci_event.c
> > @@ -6818,14 +6818,6 @@ static void hci_event_func(struct hci_dev *hdev, u8 event, struct sk_buff *skb,
> >               return;
> >       }
> >
> > -     /* Just warn if the length is over max_len size it still be
> > -      * possible to partially parse the event so leave to callback to
> > -      * decide if that is acceptable.
> > -      */
> > -     if (skb->len > ev->max_len)
> > -             bt_dev_warn(hdev, "unexpected event 0x%2.2x length: %u > %u",
> > -                         event, skb->len, ev->max_len);
> > -
>
> which event type is this? You need to have a commit message giving details. I am also pretty sure that this is broken hardware and we can go for ratelimited version, but the warning is justified if the hardware is stupid. If our table is wrong, we fix the table, but not just silence an unpleasant warning.
>
> Regards
>
> Marcel
>

Hi Marcel

I noticed it had already been fixed in "Bluetooth: hci_event: Fix
HCI_EV_VENDOR max_len"

I've replied to that patch asking if it can be added to stable, would
be nice to get this into 5.17.0 before next week

Cheers

Mike

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

end of thread, other threads:[~2022-03-14 15:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-12 16:45 [PATCH] Bluetooth: hci_event: Remove excessive bluetooth warning Mike Lothian
2022-03-12 17:44 ` bluez.test.bot
2022-03-12 23:50   ` Mike Lothian
2022-03-14 15:32 ` [PATCH] " Marcel Holtmann
2022-03-14 15:36   ` Mike Lothian

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.