* [PATCH] r8169: Apply configurations to the L0s/L1 entry delay of RTL8105e and RTL8401
@ 2021-11-19 18:47 Yeqi Fu
2021-11-19 20:06 ` Heiner Kallweit
0 siblings, 1 reply; 3+ messages in thread
From: Yeqi Fu @ 2021-11-19 18:47 UTC (permalink / raw)
To: hkallweit1, nic_swsd, davem, kuba; +Cc: netdev, linux-kernel, Yeqi Fu
We properly configure the L0s/L1 entry delay in the startup functions of
RTL8105e and RTL8401 through rtl_set_def_aspm_entry_latency(), which will
avoid local denial of service.
Signed-off-by: Yeqi Fu <fufuyqqqqqq@gmail.com>
---
drivers/net/ethernet/realtek/r8169_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index bbe21db20417..4f533007a456 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -3420,6 +3420,7 @@ static void rtl_hw_start_8401(struct rtl8169_private *tp)
{ 0x07, 0xffff, 0x8e68 },
};
+ rtl_set_def_aspm_entry_latency(tp);
rtl_ephy_init(tp, e_info_8401);
RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Beacon_en);
}
@@ -3437,6 +3438,7 @@ static void rtl_hw_start_8105e_1(struct rtl8169_private *tp)
{ 0x0a, 0, 0x0020 }
};
+ rtl_set_def_aspm_entry_latency(tp);
/* Force LAN exit from ASPM if Rx/Tx are not idle */
RTL_W32(tp, FuncEvent, RTL_R32(tp, FuncEvent) | 0x002800);
--
2.30.1 (Apple Git-130)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] r8169: Apply configurations to the L0s/L1 entry delay of RTL8105e and RTL8401
2021-11-19 18:47 [PATCH] r8169: Apply configurations to the L0s/L1 entry delay of RTL8105e and RTL8401 Yeqi Fu
@ 2021-11-19 20:06 ` Heiner Kallweit
[not found] ` <CANqj-X=6yri8wv=aHVxUkUDOZV20QbhK4YcGHVdSXWY7XwkQiA@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Heiner Kallweit @ 2021-11-19 20:06 UTC (permalink / raw)
To: Yeqi Fu, nic_swsd, davem, kuba; +Cc: netdev, linux-kernel
On 19.11.2021 19:47, Yeqi Fu wrote:
> We properly configure the L0s/L1 entry delay in the startup functions of
> RTL8105e and RTL8401 through rtl_set_def_aspm_entry_latency(), which will
> avoid local denial of service.
>
What do you mean with local denial of service? Are you aware of any issues
with these two chip versions?
Where do you got the info from that these calls are appropriate? At least
for RTL8401 even the r8101 vendor driver doesn't do it.
Your patch misses the net vs. net-next annotation. Is this supposed to be
a fix? Then a Fixes tag would be needed.
> Signed-off-by: Yeqi Fu <fufuyqqqqqq@gmail.com>
> ---
> drivers/net/ethernet/realtek/r8169_main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index bbe21db20417..4f533007a456 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -3420,6 +3420,7 @@ static void rtl_hw_start_8401(struct rtl8169_private *tp)
> { 0x07, 0xffff, 0x8e68 },
> };
>
> + rtl_set_def_aspm_entry_latency(tp);
> rtl_ephy_init(tp, e_info_8401);
> RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Beacon_en);
> }
> @@ -3437,6 +3438,7 @@ static void rtl_hw_start_8105e_1(struct rtl8169_private *tp)
> { 0x0a, 0, 0x0020 }
> };
>
> + rtl_set_def_aspm_entry_latency(tp);
> /* Force LAN exit from ASPM if Rx/Tx are not idle */
> RTL_W32(tp, FuncEvent, RTL_R32(tp, FuncEvent) | 0x002800);
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] r8169: Apply configurations to the L0s/L1 entry delay of RTL8105e and RTL8401
[not found] ` <CANqj-X=6yri8wv=aHVxUkUDOZV20QbhK4YcGHVdSXWY7XwkQiA@mail.gmail.com>
@ 2021-11-20 6:54 ` Heiner Kallweit
0 siblings, 0 replies; 3+ messages in thread
From: Heiner Kallweit @ 2021-11-20 6:54 UTC (permalink / raw)
To: Q1IQ Fu, Jakub Kicinski, David Miller; +Cc: netdev@vger.kernel.org
On 20.11.2021 07:41, Q1IQ Fu wrote:
> Thank you very much for your attention. We detected the presence of these two bugs through our new vulnerability scanning technology. We think there may be a security issue, if not, please ignore it.
>
What exactly is the security issue and how could it be exploited?
It's not the first time that I see a patch submitted based solely on the output of obscure tools.
Always check the result of tools, and you should be able to explain and interpret the tool output.
Especially you should be able to see whether a warning is a false positive.
> Heiner Kallweit <hkallweit1@gmail.com <mailto:hkallweit1@gmail.com>> 于2021年11月20日周六 上午4:06写道:
>
> On 19.11.2021 19:47, Yeqi Fu wrote:
> > We properly configure the L0s/L1 entry delay in the startup functions of
> > RTL8105e and RTL8401 through rtl_set_def_aspm_entry_latency(), which will
> > avoid local denial of service.
> >
>
> What do you mean with local denial of service? Are you aware of any issues
> with these two chip versions?
>
> Where do you got the info from that these calls are appropriate? At least
> for RTL8401 even the r8101 vendor driver doesn't do it.
>
> Your patch misses the net vs. net-next annotation. Is this supposed to be
> a fix? Then a Fixes tag would be needed.
>
> > Signed-off-by: Yeqi Fu <fufuyqqqqqq@gmail.com <mailto:fufuyqqqqqq@gmail.com>>
> > ---
> > drivers/net/ethernet/realtek/r8169_main.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> > index bbe21db20417..4f533007a456 100644
> > --- a/drivers/net/ethernet/realtek/r8169_main.c
> > +++ b/drivers/net/ethernet/realtek/r8169_main.c
> > @@ -3420,6 +3420,7 @@ static void rtl_hw_start_8401(struct rtl8169_private *tp)
> > { 0x07, 0xffff, 0x8e68 },
> > };
> >
> > + rtl_set_def_aspm_entry_latency(tp);
> > rtl_ephy_init(tp, e_info_8401);
> > RTL_W8(tp, Config3, RTL_R8(tp, Config3) & ~Beacon_en);
> > }
> > @@ -3437,6 +3438,7 @@ static void rtl_hw_start_8105e_1(struct rtl8169_private *tp)
> > { 0x0a, 0, 0x0020 }
> > };
> >
> > + rtl_set_def_aspm_entry_latency(tp);
> > /* Force LAN exit from ASPM if Rx/Tx are not idle */
> > RTL_W32(tp, FuncEvent, RTL_R32(tp, FuncEvent) | 0x002800);
> >
> >
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-20 6:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-19 18:47 [PATCH] r8169: Apply configurations to the L0s/L1 entry delay of RTL8105e and RTL8401 Yeqi Fu
2021-11-19 20:06 ` Heiner Kallweit
[not found] ` <CANqj-X=6yri8wv=aHVxUkUDOZV20QbhK4YcGHVdSXWY7XwkQiA@mail.gmail.com>
2021-11-20 6:54 ` Heiner Kallweit
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).