From: "David S. Miller" <davem@redhat.com>
To: Krishna Kumar <kumarkr@us.ibm.com>
Cc: kuznet@ms2.inr.ac.ru, mashirle@us.ibm.com, netdev@oss.sgi.com,
xma@us.ibm.com
Subject: Re: [PATCH]snmp6 64-bit counter support in proc.c
Date: Wed, 28 Jan 2004 11:09:45 -0800 [thread overview]
Message-ID: <20040128110945.662a4d6a.davem@redhat.com> (raw)
In-Reply-To: <OF27A95A54.FAB6CE99-ON88256E24.000E2136@us.ibm.com>
On Thu, 22 Jan 2004 18:45:18 -0800
Krishna Kumar <kumarkr@us.ibm.com> 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? :)
next prev parent reply other threads:[~2004-01-28 19:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-23 2:45 [PATCH]snmp6 64-bit counter support in proc.c Krishna Kumar
2004-01-28 19:09 ` David S. Miller [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-01-28 20:15 Shirley Ma
2004-01-28 20:09 Shirley Ma
2004-01-28 19:19 Krishna Kumar
2004-01-28 19:33 ` David S. Miller
2004-01-23 18:06 Shirley Ma
2004-01-23 2:57 Krishna Kumar
2004-01-23 1:08 Shirley Ma
2004-01-23 1:43 ` David S. Miller
2004-01-22 22:50 Krishna Kumar
2004-01-23 0:35 ` David S. Miller
2004-01-22 21:18 Krishna Kumar
2004-01-22 22:10 ` David S. Miller
2004-01-21 23:44 Shirley Ma
2004-01-21 19:45 Shirley Ma
2004-01-21 20:27 ` YOSHIFUJI Hideaki / 吉藤英明
2004-01-21 22:05 ` David S. Miller
2004-01-22 18:26 ` kuznet
2003-12-05 21:55 Shirley Ma
2003-12-02 12:40 IPv6 MIB:ipv6PrefixTable implementation kuznet
2003-12-05 20:14 ` [PATCH]snmp6 64-bit counter support in proc.c Shirley Ma
2003-12-05 20:31 ` David S. Miller
2004-01-14 22:52 ` Shirley Ma
2004-01-15 8:57 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040128110945.662a4d6a.davem@redhat.com \
--to=davem@redhat.com \
--cc=kumarkr@us.ibm.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=mashirle@us.ibm.com \
--cc=netdev@oss.sgi.com \
--cc=xma@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.