Linux Hardening
 help / color / mirror / Atom feed
* Re: [net] Revert "net: wwan: mhi_wwan_mbim: Avoid -Wflex-array-member-not-at-end warning"
       [not found]   ` <5e012074.84f7.19bdab162e4.Coremail.slark_xiao@163.com>
@ 2026-01-20  9:28     ` Gustavo A. R. Silva
  2026-01-22  1:30       ` Slark Xiao
  0 siblings, 1 reply; 4+ messages in thread
From: Gustavo A. R. Silva @ 2026-01-20  9:28 UTC (permalink / raw)
  To: Slark Xiao
  Cc: loic.poulain, ryazanov.s.a, johannes, andrew+netdev, davem,
	edumazet, kuba, pabeni, gustavoars, netdev, linux-kernel,
	linux-hardening



On 1/20/26 18:16, Slark Xiao wrote:
> 
> 
> At 2026-01-20 15:51:57, "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>> Hi Slark,
>>
>> On 1/20/26 16:20, Slark Xiao wrote:
>>> This reverts commit eeecf5d3a3a484cedfa3f2f87e6d51a7390ed960.
>>>
>>> This change lead to MHI WWAN device can't connect to internet.
>>> I found a netwrok issue with kernel 6.19-rc4, but network works
>>> well with kernel 6.18-rc1. After checking, this commit is the
>>> root cause.
>>
>> Thanks for the report.
>>
>> Could you please apply the following patch on top of this revert,
>> and let us know if the problem still manifests? Thank you!
>>
>> diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
>> index 1d7e3ad900c1..a271a72fed63 100644
>> --- a/drivers/net/wwan/mhi_wwan_mbim.c
>> +++ b/drivers/net/wwan/mhi_wwan_mbim.c
>> @@ -78,9 +78,12 @@ struct mhi_mbim_context {
>>
>>   struct mbim_tx_hdr {
>>          struct usb_cdc_ncm_nth16 nth16;
>> -       struct usb_cdc_ncm_ndp16 ndp16;
>> -       struct usb_cdc_ncm_dpe16 dpe16[2];
>> +       __TRAILING_OVERLAP(struct usb_cdc_ncm_ndp16, ndp16, dpe16, __packed,
>> +               struct usb_cdc_ncm_dpe16 dpe16[2];
>> +       );
>>   } __packed;
>> +static_assert(offsetof(struct mbim_tx_hdr, ndp16.dpe16) ==
>> +             offsetof(struct mbim_tx_hdr, dpe16));
>>
>>   static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim,
>>                                                     unsigned int session)
> This patch won't introduce previous problem.
> 

Thanks for confirming this.

I'll turn it into a proper patch.

-Gustavo


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

* Re:Re: [net] Revert "net: wwan: mhi_wwan_mbim: Avoid -Wflex-array-member-not-at-end warning"
  2026-01-20  9:28     ` [net] Revert "net: wwan: mhi_wwan_mbim: Avoid -Wflex-array-member-not-at-end warning" Gustavo A. R. Silva
@ 2026-01-22  1:30       ` Slark Xiao
  2026-01-22  2:14         ` Gustavo A. R. Silva
  0 siblings, 1 reply; 4+ messages in thread
From: Slark Xiao @ 2026-01-22  1:30 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: loic.poulain, ryazanov.s.a, johannes, andrew+netdev, davem,
	edumazet, kuba, pabeni, gustavoars, netdev, linux-kernel,
	linux-hardening



At 2026-01-20 17:28:42, "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>
>
>On 1/20/26 18:16, Slark Xiao wrote:
>> 
>> 
>> At 2026-01-20 15:51:57, "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>>> Hi Slark,
>>>
>>> On 1/20/26 16:20, Slark Xiao wrote:
>>>> This reverts commit eeecf5d3a3a484cedfa3f2f87e6d51a7390ed960.
>>>>
>>>> This change lead to MHI WWAN device can't connect to internet.
>>>> I found a netwrok issue with kernel 6.19-rc4, but network works
>>>> well with kernel 6.18-rc1. After checking, this commit is the
>>>> root cause.
>>>
>>> Thanks for the report.
>>>
>>> Could you please apply the following patch on top of this revert,
>>> and let us know if the problem still manifests? Thank you!
>>>
>>> diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
>>> index 1d7e3ad900c1..a271a72fed63 100644
>>> --- a/drivers/net/wwan/mhi_wwan_mbim.c
>>> +++ b/drivers/net/wwan/mhi_wwan_mbim.c
>>> @@ -78,9 +78,12 @@ struct mhi_mbim_context {
>>>
>>>   struct mbim_tx_hdr {
>>>          struct usb_cdc_ncm_nth16 nth16;
>>> -       struct usb_cdc_ncm_ndp16 ndp16;
>>> -       struct usb_cdc_ncm_dpe16 dpe16[2];
>>> +       __TRAILING_OVERLAP(struct usb_cdc_ncm_ndp16, ndp16, dpe16, __packed,
>>> +               struct usb_cdc_ncm_dpe16 dpe16[2];
>>> +       );
>>>   } __packed;
>>> +static_assert(offsetof(struct mbim_tx_hdr, ndp16.dpe16) ==
>>> +             offsetof(struct mbim_tx_hdr, dpe16));
>>>
>>>   static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim,
>>>                                                     unsigned int session)
>> This patch won't introduce previous problem.
>> 
>
>Thanks for confirming this.
>
>I'll turn it into a proper patch.
>
>-Gustavo
Hi,
Are you planing to add this revert commit to your coming patch?
Actually it's urgent to revert this change since the release deadline of v6.19 is coming soon
and all my MHI WWAN device have been impacted.
I don't know why this commit has been tagged as "Not Applicable" and who did this.

I hope we can fix it regression before the official v6.19 release.

Thanks

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

* Re: [net] Revert "net: wwan: mhi_wwan_mbim: Avoid -Wflex-array-member-not-at-end warning"
  2026-01-22  1:30       ` Slark Xiao
@ 2026-01-22  2:14         ` Gustavo A. R. Silva
  2026-01-22  2:18           ` Slark Xiao
  0 siblings, 1 reply; 4+ messages in thread
From: Gustavo A. R. Silva @ 2026-01-22  2:14 UTC (permalink / raw)
  To: Slark Xiao
  Cc: loic.poulain, ryazanov.s.a, johannes, andrew+netdev, davem,
	edumazet, kuba, pabeni, gustavoars, netdev, linux-kernel,
	linux-hardening



On 1/22/26 10:30, Slark Xiao wrote:
> 
> 
> At 2026-01-20 17:28:42, "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>>
>>
>> On 1/20/26 18:16, Slark Xiao wrote:
>>>
>>>
>>> At 2026-01-20 15:51:57, "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>>>> Hi Slark,
>>>>
>>>> On 1/20/26 16:20, Slark Xiao wrote:
>>>>> This reverts commit eeecf5d3a3a484cedfa3f2f87e6d51a7390ed960.
>>>>>
>>>>> This change lead to MHI WWAN device can't connect to internet.
>>>>> I found a netwrok issue with kernel 6.19-rc4, but network works
>>>>> well with kernel 6.18-rc1. After checking, this commit is the
>>>>> root cause.
>>>>
>>>> Thanks for the report.
>>>>
>>>> Could you please apply the following patch on top of this revert,
>>>> and let us know if the problem still manifests? Thank you!
>>>>
>>>> diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
>>>> index 1d7e3ad900c1..a271a72fed63 100644
>>>> --- a/drivers/net/wwan/mhi_wwan_mbim.c
>>>> +++ b/drivers/net/wwan/mhi_wwan_mbim.c
>>>> @@ -78,9 +78,12 @@ struct mhi_mbim_context {
>>>>
>>>>    struct mbim_tx_hdr {
>>>>           struct usb_cdc_ncm_nth16 nth16;
>>>> -       struct usb_cdc_ncm_ndp16 ndp16;
>>>> -       struct usb_cdc_ncm_dpe16 dpe16[2];
>>>> +       __TRAILING_OVERLAP(struct usb_cdc_ncm_ndp16, ndp16, dpe16, __packed,
>>>> +               struct usb_cdc_ncm_dpe16 dpe16[2];
>>>> +       );
>>>>    } __packed;
>>>> +static_assert(offsetof(struct mbim_tx_hdr, ndp16.dpe16) ==
>>>> +             offsetof(struct mbim_tx_hdr, dpe16));
>>>>
>>>>    static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim,
>>>>                                                      unsigned int session)
>>> This patch won't introduce previous problem.
>>>
>>
>> Thanks for confirming this.
>>
>> I'll turn it into a proper patch.
>>
>> -Gustavo
> Hi,
> Are you planing to add this revert commit to your coming patch?

No. I think the revert should be applied by the maintainers, first.

Thanks
-Gustavo

> Actually it's urgent to revert this change since the release deadline of v6.19 is coming soon
> and all my MHI WWAN device have been impacted.
> I don't know why this commit has been tagged as "Not Applicable" and who did this.
> 
> I hope we can fix it regression before the official v6.19 release.
> 
> Thanks


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

* Re:Re: [net] Revert "net: wwan: mhi_wwan_mbim: Avoid -Wflex-array-member-not-at-end warning"
  2026-01-22  2:14         ` Gustavo A. R. Silva
@ 2026-01-22  2:18           ` Slark Xiao
  0 siblings, 0 replies; 4+ messages in thread
From: Slark Xiao @ 2026-01-22  2:18 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Loic Poulain
  Cc: ryazanov.s.a, johannes, andrew+netdev, davem, edumazet, kuba,
	pabeni, gustavoars, netdev, linux-kernel, linux-hardening



At 2026-01-22 10:14:41, "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>
>
>On 1/22/26 10:30, Slark Xiao wrote:
>> 
>> 
>> At 2026-01-20 17:28:42, "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>>>
>>>
>>> On 1/20/26 18:16, Slark Xiao wrote:
>>>>
>>>>
>>>> At 2026-01-20 15:51:57, "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>>>>> Hi Slark,
>>>>>
>>>>> On 1/20/26 16:20, Slark Xiao wrote:
>>>>>> This reverts commit eeecf5d3a3a484cedfa3f2f87e6d51a7390ed960.
>>>>>>
>>>>>> This change lead to MHI WWAN device can't connect to internet.
>>>>>> I found a netwrok issue with kernel 6.19-rc4, but network works
>>>>>> well with kernel 6.18-rc1. After checking, this commit is the
>>>>>> root cause.
>>>>>
>>>>> Thanks for the report.
>>>>>
>>>>> Could you please apply the following patch on top of this revert,
>>>>> and let us know if the problem still manifests? Thank you!
>>>>>
>>>>> diff --git a/drivers/net/wwan/mhi_wwan_mbim.c b/drivers/net/wwan/mhi_wwan_mbim.c
>>>>> index 1d7e3ad900c1..a271a72fed63 100644
>>>>> --- a/drivers/net/wwan/mhi_wwan_mbim.c
>>>>> +++ b/drivers/net/wwan/mhi_wwan_mbim.c
>>>>> @@ -78,9 +78,12 @@ struct mhi_mbim_context {
>>>>>
>>>>>    struct mbim_tx_hdr {
>>>>>           struct usb_cdc_ncm_nth16 nth16;
>>>>> -       struct usb_cdc_ncm_ndp16 ndp16;
>>>>> -       struct usb_cdc_ncm_dpe16 dpe16[2];
>>>>> +       __TRAILING_OVERLAP(struct usb_cdc_ncm_ndp16, ndp16, dpe16, __packed,
>>>>> +               struct usb_cdc_ncm_dpe16 dpe16[2];
>>>>> +       );
>>>>>    } __packed;
>>>>> +static_assert(offsetof(struct mbim_tx_hdr, ndp16.dpe16) ==
>>>>> +             offsetof(struct mbim_tx_hdr, dpe16));
>>>>>
>>>>>    static struct mhi_mbim_link *mhi_mbim_get_link_rcu(struct mhi_mbim_context *mbim,
>>>>>                                                      unsigned int session)
>>>> This patch won't introduce previous problem.
>>>>
>>>
>>> Thanks for confirming this.
>>>
>>> I'll turn it into a proper patch.
>>>
>>> -Gustavo
>> Hi,
>> Are you planing to add this revert commit to your coming patch?
>
>No. I think the revert should be applied by the maintainers, first.
>
>Thanks
>-Gustavo
>
Hi Loic,
Could you help check this commit status?

Thanks
>> Actually it's urgent to revert this change since the release deadline of v6.19 is coming soon
>> and all my MHI WWAN device have been impacted.
>> I don't know why this commit has been tagged as "Not Applicable" and who did this.
>> 
>> I hope we can fix it regression before the official v6.19 release.
>> 
>> Thanks

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

end of thread, other threads:[~2026-01-22  2:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260120072018.29375-1-slark_xiao@163.com>
     [not found] ` <1228d107-4a60-4c33-a763-1a199c0b0961@embeddedor.com>
     [not found]   ` <5e012074.84f7.19bdab162e4.Coremail.slark_xiao@163.com>
2026-01-20  9:28     ` [net] Revert "net: wwan: mhi_wwan_mbim: Avoid -Wflex-array-member-not-at-end warning" Gustavo A. R. Silva
2026-01-22  1:30       ` Slark Xiao
2026-01-22  2:14         ` Gustavo A. R. Silva
2026-01-22  2:18           ` Slark Xiao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox