Skip to contentSkip to conversation

sfq: timer is deferrable

PATCH Applied Paul E. McKenney 3 participants 4 messages Jan 19, 2008 – Jan 21, 2008 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20080118144900.1df0dd90@deepthought

Paul E. McKenney

author Acked-by
#1 lore raw
Quoted 2 lines · Stephen Hemminger

The perturbation timer used for re-keying can be deferred, it doesn't need to be deterministic.

The only concern that I can come up with is that the sfq_perturbation timer might be on one CPU, and all the operations using the corresponding SFQ on another. This could in theory allow a nearly omniscient attacker to exploit an SFQ imbalance while preventing perturbation of the hash function.

This does not seem to be a valid concern at this point, since there are very few uses of init_timer_deferrable(). And if it should become a problem, one approach would be to have some sort of per-timer limit to the deferral. Of course, at that point one would need to figure out what this limit should be!

Quoted 16 lines
net/sched/sch_sfq.c +3 -1
@@ -426,7 +426,9 @@ static int sfq_init(struct Qdisc *sch, s
 	struct sfq_sched_data *q = qdisc_priv(sch);
 	int i;
 
-	setup_timer(&q->perturb_timer, sfq_perturbation, (unsigned long)sch);
+	q->perturb_timer.function = sfq_perturbation;
+	q->perturb_timer.data = (unsigned long)sch;;
+	init_timer_deferrable(&q->perturb_timer);
 
 	for (i=0; i<SFQ_HASH_DIVISOR; i++)
 		q->ht[i] = SFQ_DEPTH;
#2 lore raw
Quoted 10 lines · On Fri, 18 Jan 2008 20:34:46 -0800 "Paul E. McKenney"…
Quoted 2 lines · Stephen Hemminger

The perturbation timer used for re-keying can be deferred, it doesn't need to be deterministic.

The only concern that I can come up with is that the sfq_perturbation timer might be on one CPU, and all the operations using the corresponding SFQ on another. This could in theory allow a nearly omniscient attacker to exploit an SFQ imbalance while preventing perturbation of the hash function.

Quoted 7 lines

This does not seem to be a valid concern at this point, since there are very few uses of init_timer_deferrable(). And if it should become a problem, one approach would be to have some sort of per-timer limit to the deferral. Of course, at that point one would need to figure out what this limit should be!

But the only threat is getting more bandwidth for a longer interval. It is all kind of moot anyway because the bandwidth hogs all open multiple connections anyway, so SFQ is of no use.

Signature · 1 line
Stephen Hemminger <[email protected]>
#3 lore raw
Quoted 19 lines · Stephen Hemminger
Quoted 16 lines · On Fri, 18 Jan 2008 20:34:46 -0800 "Paul E. McKenney"…
Quoted 2 lines · Stephen Hemminger

The perturbation timer used for re-keying can be deferred, it doesn't need to be deterministic.

The only concern that I can come up with is that the sfq_perturbation timer might be on one CPU, and all the operations using the corresponding SFQ on another. This could in theory allow a nearly omniscient attacker to exploit an SFQ imbalance while preventing perturbation of the hash function.

This does not seem to be a valid concern at this point, since there are very few uses of init_timer_deferrable(). And if it should become a problem, one approach would be to have some sort of per-timer limit to the deferral. Of course, at that point one would need to figure out what this limit should be!

Quoted 5 lines
Quoted 1 line

But the only threat is getting more bandwidth for a longer interval. It is all kind of moot anyway because the bandwidth hogs all open multiple connections anyway, so SFQ is of no use.

Good point, and an additional reason for my Acked-by above. ;-)

Thanx, Paul

maintainer Applied
#4 lore raw

From: "Paul E. McKenney" <[email protected]>
Date: Fri, 18 Jan 2008 21:57:00 -0800

Quoted 20 lines · Stephen Hemminger
Quoted 19 lines
Quoted 16 lines · On Fri, 18 Jan 2008 20:34:46 -0800 "Paul E. McKenney"…
Quoted 2 lines · Stephen Hemminger

The perturbation timer used for re-keying can be deferred, it doesn't need to be deterministic.

The only concern that I can come up with is that the sfq_perturbation timer might be on one CPU, and all the operations using the corresponding SFQ on another. This could in theory allow a nearly omniscient attacker to exploit an SFQ imbalance while preventing perturbation of the hash function.

This does not seem to be a valid concern at this point, since there are very few uses of init_timer_deferrable(). And if it should become a problem, one approach would be to have some sort of per-timer limit to the deferral. Of course, at that point one would need to figure out what this limit should be!

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

But the only threat is getting more bandwidth for a longer interval. It is all kind of moot anyway because the bandwidth hogs all open multiple connections anyway, so SFQ is of no use.

Good point, and an additional reason for my Acked-by above. ;-)

I've applied this patch, thanks :-)