From: Jason Xing <redacted>
Setting the @next of the last skb to NULL to prevent the panic in future
when someone does something to the last of the gro list but its @next is
invalid.
For example, without the fix (commit: ece23711dd95), a panic could happen
with the clsact loaded when skb is redirected and then validated in
validate_xmit_skb_list() which could access the error addr of the @next
of the last skb. Thus, "general protection fault" would appear after that.
Signed-off-by: Jason Xing <redacted>
---
net/core/skbuff.c | 1 +
1 file changed, 1 insertion(+)
From: Jason Xing <hidden> Date: 2021-10-27 07:24:10
On Tue, Oct 26, 2021 at 9:19 PM [off-list ref] wrote:
quoted hunk
From: Jason Xing <redacted>
Setting the @next of the last skb to NULL to prevent the panic in future
when someone does something to the last of the gro list but its @next is
invalid.
For example, without the fix (commit: ece23711dd95), a panic could happen
with the clsact loaded when skb is redirected and then validated in
validate_xmit_skb_list() which could access the error addr of the @next
of the last skb. Thus, "general protection fault" would appear after that.
Signed-off-by: Jason Xing <redacted>
---
net/core/skbuff.c | 1 +
1 file changed, 1 insertion(+)
Besides, I'm a little bit confused that this operation inserts the
newest skb into the tail of the flow, so the tail of flow is the
newest, head oldest. The patch (commit: 600adc18) introduces the flush
of the oldest when the flow is full to lower the latency, but actually
it fetches the tail of the flow. Do I get something wrong here? I feel
it is really odd.
Thanks,
Jason
From: Jason Xing <hidden> Date: 2021-10-27 08:07:51
On Wed, Oct 27, 2021 at 3:23 PM Jason Xing [off-list ref] wrote:
On Tue, Oct 26, 2021 at 9:19 PM [off-list ref] wrote:
quoted
From: Jason Xing <redacted>
Setting the @next of the last skb to NULL to prevent the panic in future
when someone does something to the last of the gro list but its @next is
invalid.
For example, without the fix (commit: ece23711dd95), a panic could happen
with the clsact loaded when skb is redirected and then validated in
validate_xmit_skb_list() which could access the error addr of the @next
of the last skb. Thus, "general protection fault" would appear after that.
Signed-off-by: Jason Xing <redacted>
---
net/core/skbuff.c | 1 +
1 file changed, 1 insertion(+)
Besides, I'm a little bit confused that this operation inserts the
newest skb into the tail of the flow, so the tail of flow is the
newest, head oldest. The patch (commit: 600adc18) introduces the flush
of the oldest when the flow is full to lower the latency, but actually
it fetches the tail of the flow. Do I get something wrong here? I feel
I have to update this part. The commit 600adc18 evicts and flushes the
oldest flow. But for the current kernel, when
"napi->gro_hash[hash].count >= MAX_GRO_SKBS" happens, the
gro_flush_oldest() flushes the oldest skb of one certain flow,
actually it is the newest skb because it is at the end of the list.
From: Jason Xing <hidden> Date: 2021-10-27 08:57:08
On Wed, Oct 27, 2021 at 4:07 PM Jason Xing [off-list ref] wrote:
On Wed, Oct 27, 2021 at 3:23 PM Jason Xing [off-list ref] wrote:
quoted
On Tue, Oct 26, 2021 at 9:19 PM [off-list ref] wrote:
quoted
From: Jason Xing <redacted>
Setting the @next of the last skb to NULL to prevent the panic in future
when someone does something to the last of the gro list but its @next is
invalid.
For example, without the fix (commit: ece23711dd95), a panic could happen
with the clsact loaded when skb is redirected and then validated in
validate_xmit_skb_list() which could access the error addr of the @next
of the last skb. Thus, "general protection fault" would appear after that.
Signed-off-by: Jason Xing <redacted>
---
net/core/skbuff.c | 1 +
1 file changed, 1 insertion(+)
Besides, I'm a little bit confused that this operation inserts the
newest skb into the tail of the flow, so the tail of flow is the
newest, head oldest. The patch (commit: 600adc18) introduces the flush
of the oldest when the flow is full to lower the latency, but actually
it fetches the tail of the flow. Do I get something wrong here? I feel
I have to update this part. The commit 600adc18 evicts and flushes the
oldest flow. But for the current kernel, when
"napi->gro_hash[hash].count >= MAX_GRO_SKBS" happens, the
gro_flush_oldest() flushes the oldest skb of one certain flow,
actually it is the newest skb because it is at the end of the list.
From: Yunsheng Lin <hidden> Date: 2021-10-27 12:40:46
On 2021/10/27 16:56, Jason Xing wrote:
On Wed, Oct 27, 2021 at 4:07 PM Jason Xing [off-list ref] wrote:
quoted
On Wed, Oct 27, 2021 at 3:23 PM Jason Xing [off-list ref] wrote:
quoted
On Tue, Oct 26, 2021 at 9:19 PM [off-list ref] wrote:
quoted
From: Jason Xing <redacted>
Setting the @next of the last skb to NULL to prevent the panic in future
when someone does something to the last of the gro list but its @next is
invalid.
For example, without the fix (commit: ece23711dd95), a panic could happen
with the clsact loaded when skb is redirected and then validated in
validate_xmit_skb_list() which could access the error addr of the @next
of the last skb. Thus, "general protection fault" would appear after that.
Signed-off-by: Jason Xing <redacted>
---
net/core/skbuff.c | 1 +
1 file changed, 1 insertion(+)
Besides, I'm a little bit confused that this operation inserts the
newest skb into the tail of the flow, so the tail of flow is the
newest, head oldest. The patch (commit: 600adc18) introduces the flush
of the oldest when the flow is full to lower the latency, but actually
it fetches the tail of the flow. Do I get something wrong here? I feel
I have to update this part. The commit 600adc18 evicts and flushes the
oldest flow. But for the current kernel, when
"napi->gro_hash[hash].count >= MAX_GRO_SKBS" happens, the
gro_flush_oldest() flushes the oldest skb of one certain flow,
actually it is the newest skb because it is at the end of the list.
From: Jason Xing <hidden> Date: 2021-10-27 12:54:50
On Wed, Oct 27, 2021 at 8:40 PM Yunsheng Lin [off-list ref] wrote:
On 2021/10/27 16:56, Jason Xing wrote:
quoted
On Wed, Oct 27, 2021 at 4:07 PM Jason Xing [off-list ref] wrote:
quoted
On Wed, Oct 27, 2021 at 3:23 PM Jason Xing [off-list ref] wrote:
quoted
On Tue, Oct 26, 2021 at 9:19 PM [off-list ref] wrote:
quoted
From: Jason Xing <redacted>
Setting the @next of the last skb to NULL to prevent the panic in future
when someone does something to the last of the gro list but its @next is
invalid.
For example, without the fix (commit: ece23711dd95), a panic could happen
with the clsact loaded when skb is redirected and then validated in
validate_xmit_skb_list() which could access the error addr of the @next
of the last skb. Thus, "general protection fault" would appear after that.
Signed-off-by: Jason Xing <redacted>
---
net/core/skbuff.c | 1 +
1 file changed, 1 insertion(+)
Besides, I'm a little bit confused that this operation inserts the
newest skb into the tail of the flow, so the tail of flow is the
newest, head oldest. The patch (commit: 600adc18) introduces the flush
of the oldest when the flow is full to lower the latency, but actually
it fetches the tail of the flow. Do I get something wrong here? I feel
I have to update this part. The commit 600adc18 evicts and flushes the
oldest flow. But for the current kernel, when
"napi->gro_hash[hash].count >= MAX_GRO_SKBS" happens, the
gro_flush_oldest() flushes the oldest skb of one certain flow,
actually it is the newest skb because it is at the end of the list.
What you said is the @skb->list but not the list between skbs which is
connected by skb->next when the new incoming skb needs to get merged.
The @skb->list->next/prev is not the same as @skb->next.
From: Jason Xing <hidden> Date: 2021-10-27 13:58:19
On Wed, Oct 27, 2021 at 8:54 PM Jason Xing [off-list ref] wrote:
On Wed, Oct 27, 2021 at 8:40 PM Yunsheng Lin [off-list ref] wrote:
quoted
On 2021/10/27 16:56, Jason Xing wrote:
quoted
On Wed, Oct 27, 2021 at 4:07 PM Jason Xing [off-list ref] wrote:
quoted
On Wed, Oct 27, 2021 at 3:23 PM Jason Xing [off-list ref] wrote:
quoted
On Tue, Oct 26, 2021 at 9:19 PM [off-list ref] wrote:
quoted
From: Jason Xing <redacted>
Setting the @next of the last skb to NULL to prevent the panic in future
when someone does something to the last of the gro list but its @next is
invalid.
For example, without the fix (commit: ece23711dd95), a panic could happen
with the clsact loaded when skb is redirected and then validated in
validate_xmit_skb_list() which could access the error addr of the @next
of the last skb. Thus, "general protection fault" would appear after that.
Signed-off-by: Jason Xing <redacted>
---
net/core/skbuff.c | 1 +
1 file changed, 1 insertion(+)
Besides, I'm a little bit confused that this operation inserts the
newest skb into the tail of the flow, so the tail of flow is the
newest, head oldest. The patch (commit: 600adc18) introduces the flush
of the oldest when the flow is full to lower the latency, but actually
it fetches the tail of the flow. Do I get something wrong here? I feel
I have to update this part. The commit 600adc18 evicts and flushes the
oldest flow. But for the current kernel, when
"napi->gro_hash[hash].count >= MAX_GRO_SKBS" happens, the
gro_flush_oldest() flushes the oldest skb of one certain flow,
actually it is the newest skb because it is at the end of the list.
What you said is the @skb->list but not the list between skbs which is
connected by skb->next when the new incoming skb needs to get merged.
The @skb->list->next/prev is not the same as @skb->next.
Emm, I think you're right, Yunsheng. The gro_flush_oldest() fetches
the list of @skb->list.
Do you think the tail of skb's next pointer should be set to NULL?
Thanks,
Jason
From: Eric Dumazet <hidden> Date: 2021-10-27 19:20:09
On 10/26/21 6:18 AM, kerneljasonxing@gmail.com wrote:
From: Jason Xing <redacted>
Setting the @next of the last skb to NULL to prevent the panic in future
when someone does something to the last of the gro list but its @next is
invalid.
For example, without the fix (commit: ece23711dd95), a panic could happen
with the clsact loaded when skb is redirected and then validated in
validate_xmit_skb_list() which could access the error addr of the @next
of the last skb. Thus, "general protection fault" would appear after that.
From: Eric Dumazet <hidden> Date: 2021-10-27 19:25:41
On 10/27/21 1:07 AM, Jason Xing wrote:
On Wed, Oct 27, 2021 at 3:23 PM Jason Xing [off-list ref] wrote:
quoted
On Tue, Oct 26, 2021 at 9:19 PM [off-list ref] wrote:
quoted
From: Jason Xing <redacted>
Setting the @next of the last skb to NULL to prevent the panic in future
when someone does something to the last of the gro list but its @next is
invalid.
For example, without the fix (commit: ece23711dd95), a panic could happen
with the clsact loaded when skb is redirected and then validated in
validate_xmit_skb_list() which could access the error addr of the @next
of the last skb. Thus, "general protection fault" would appear after that.
Signed-off-by: Jason Xing <redacted>
---
net/core/skbuff.c | 1 +
1 file changed, 1 insertion(+)
Besides, I'm a little bit confused that this operation inserts the
newest skb into the tail of the flow, so the tail of flow is the
newest, head oldest. The patch (commit: 600adc18) introduces the flush
of the oldest when the flow is full to lower the latency, but actually
it fetches the tail of the flow. Do I get something wrong here? I feel
I have to update this part. The commit 600adc18 evicts and flushes the
oldest flow. But for the current kernel, when
"napi->gro_hash[hash].count >= MAX_GRO_SKBS" happens, the
gro_flush_oldest() flushes the oldest skb of one certain flow,
actually it is the newest skb because it is at the end of the list.
GRO only keeps one skb per flow in the main hash/lru.
I think you are not understanding GRO correctly.