| To: | Krishna Kumar <kumarkr@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH]snmp6 64-bit counter support in proc.c |
| From: | "David S. Miller" <davem@xxxxxxxxxx> |
| Date: | Wed, 28 Jan 2004 11:09:45 -0800 |
| Cc: | kuznet@xxxxxxxxxxxxx, mashirle@xxxxxxxxxx, netdev@xxxxxxxxxxx, xma@xxxxxxxxxx |
| In-reply-to: | <OF27A95A54.FAB6CE99-ON88256E24.000E2136@xxxxxxxxxx> |
| References: | <OF27A95A54.FAB6CE99-ON88256E24.000E2136@xxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Thu, 22 Jan 2004 18:45:18 -0800 Krishna Kumar <kumarkr@xxxxxxxxxx> wrote: > / * Overflow, sync and re-read, the next read is guaranteed to > be greater > * than res1. > */ > synchronize_kernel(); > res2 = *((__u64 *) (((void *) per_cpu_ptr(mib[0], i)) + sizeof > (__u64) * nr))); I don't understand how your scheme can work. We're trying to detect if the upper 32-bit half of the 64-bit value belongs with the lower-half. We can overflow the lower-half TWICE in the res1=...res2=... sequence you do, and this res2 reread in the if branch can overflow itself again, combining a lower and upper half which do not belong to each other. This is not so trivial to fix, see? :) |
| Previous by Date: | Re: [BK] Updated 2.6 typhoon driver for 3CR990 & 3CR990B cards, Jeff Garzik |
|---|---|
| Next by Date: | Re: [PATCH]snmp6 64-bit counter support in proc.c, Krishna Kumar |
| Previous by Thread: | Re: [PATCH]snmp6 64-bit counter support in proc.c, Krishna Kumar |
| Next by Thread: | Re: [PATCH]snmp6 64-bit counter support in proc.c, Krishna Kumar |
| Indexes: | [Date] [Thread] [Top] [All Lists] |